aboutsummaryrefslogtreecommitdiffstats
path: root/lexer.h
diff options
context:
space:
mode:
authorGalin Simeonov <gts@volconst.com>2021-05-17 17:29:08 +0300
committerGalin Simeonov <gts@volconst.com>2021-07-15 18:00:15 +0300
commitf768d9bdb84e846d89aac66a4f3433a44241c298 (patch)
treeb7e8248bebd80c8b1f911f666260ad52b7213b84 /lexer.h
parent679cbe58c4e53f0163588a7731154f3afe2d25aa (diff)
downloadMEGATRON-f768d9bdb84e846d89aac66a4f3433a44241c298.tar.gz
parser formed
Diffstat (limited to 'lexer.h')
-rw-r--r--lexer.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lexer.h b/lexer.h
index e69e23b..320146c 100644
--- a/lexer.h
+++ b/lexer.h
@@ -3,6 +3,7 @@
#include <ctype.h> //isspace
#include <program.h>
#include <queue.h>
+#include <map.h>
struct Translation_Data;
struct Source;
@@ -10,7 +11,6 @@ struct Source;
enum Keyword
{
KW_MACHINE,
- KW_STATE,
KW_FROM,
KW_TO,
KW_ON,
@@ -23,6 +23,12 @@ enum Keyword
KW_PIPE,
KW_SEMI_COLUMN,
KW_STARTING,
+ KW_STATES,
+ KW_EVENTS,
+ KW_EVENT,
+ KW_EXECUTE,
+ KW_TRANSITIONS,
+ KW_COMMA,
};
struct token
{
@@ -38,6 +44,7 @@ struct token* lex_step(struct Source *src,struct Translation_Data *translation_d
struct token* get_token(char *data,size_t size,enum Keyword type,size_t row,size_t column);
void skip_white_space(struct Source *src);
+void push_token_into_map(struct token *token,struct Map *map,void *thing);
void delete_token(struct token *token);