From 943ed04b775949e8bc4948bcb8d762a32ab14f76 Mon Sep 17 00:00:00 2001 From: ov-4 Date: Thu, 29 Jan 2026 14:24:05 +0000 Subject: Added array --- include/cps/Lexer.h | 59 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'include/cps/Lexer.h') diff --git a/include/cps/Lexer.h b/include/cps/Lexer.h index a03c3f6..a7a6218 100644 --- a/include/cps/Lexer.h +++ b/include/cps/Lexer.h @@ -1,39 +1,46 @@ #pragma once #include -#include namespace cps { enum Token { tok_eof = -1, + tok_declare = -2, - tok_integer_kw = -3, // INTEGER + tok_integer_kw = -3, tok_input = -4, tok_output = -5, - tok_identifier = -6, - tok_number = -7, - tok_assign = -8, // <- - tok_colon = -9, // : - - tok_if = -10, - tok_then = -11, - tok_else = -12, - tok_endif = -13, - tok_while = -14, - tok_do = -15, - tok_endwhile = -16, - tok_repeat = -17, - tok_until = -18, - tok_for = -19, - tok_to = -24, - tok_step = -25, - tok_next = -26, - - tok_eq = -20, // = - tok_ne = -21, // <> - tok_le = -22, // <= - tok_ge = -23 // >= + tok_if = -6, + tok_then = -7, + tok_else = -8, + tok_endif = -9, + + tok_while = -10, + tok_do = -11, + tok_endwhile = -12, + + tok_repeat = -13, + tok_until = -14, + + tok_for = -15, + tok_to = -16, + tok_step = -17, + tok_next = -18, + + tok_array = -19, + tok_of = -20, + + tok_identifier = -100, + tok_number = -101, + + tok_assign = -200, // <- + tok_eq = -201, // = + tok_ne = -202, // <> + tok_le = -203, // <= + tok_ge = -204, // >= + + tok_colon = -300 // : }; class Lexer { @@ -44,4 +51,4 @@ public: int gettok(); }; -} // namespace cps +} -- cgit v1.3.1-4-g156e