From c2a3cecc1ab2d3f27dcea40a6f0f353b0306d66a Mon Sep 17 00:00:00 2001 From: ov-4 Date: Thu, 29 Jan 2026 10:20:58 +0000 Subject: Added INPUT, OUTPUT and DECLARE --- include/cps/Lexer.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/cps/Lexer.h (limited to 'include/cps/Lexer.h') diff --git a/include/cps/Lexer.h b/include/cps/Lexer.h new file mode 100644 index 0000000..0ad5609 --- /dev/null +++ b/include/cps/Lexer.h @@ -0,0 +1,27 @@ +#pragma once +#include +#include + +namespace cps { + +enum Token { + tok_eof = -1, + tok_declare = -2, + tok_integer_kw = -3, // INTEGER + tok_input = -4, + tok_output = -5, + tok_identifier = -6, + tok_number = -7, + tok_assign = -8, // <- + tok_colon = -9 // : +}; + +class Lexer { +public: + std::string IdentifierStr; + int NumVal; + + int gettok(); +}; + +} // namespace cps -- cgit v1.3.1-4-g156e