aboutsummaryrefslogtreecommitdiff
path: root/include/cps/Lexer.h
diff options
context:
space:
mode:
authorov-4 <hausemasterstream@gmail.com>2026-01-29 10:20:58 +0000
committerov-4 <hausemasterstream@gmail.com>2026-01-29 10:20:58 +0000
commitc2a3cecc1ab2d3f27dcea40a6f0f353b0306d66a (patch)
tree3adfa6ed51620adcf6b129eade1622b01527c8a9 /include/cps/Lexer.h
parent3f48a1d3af588242cd745e344b6b0b02cfb26131 (diff)
Added INPUT, OUTPUT and DECLARE
Diffstat (limited to 'include/cps/Lexer.h')
-rw-r--r--include/cps/Lexer.h27
1 files changed, 27 insertions, 0 deletions
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 <string>
+#include <iostream>
+
+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