diff options
author | Galin Simeonov <gts@volconst.com> | 2021-05-17 17:29:08 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-07-15 18:00:15 +0300 |
commit | f768d9bdb84e846d89aac66a4f3433a44241c298 (patch) | |
tree | b7e8248bebd80c8b1f911f666260ad52b7213b84 /lexer.h | |
parent | 679cbe58c4e53f0163588a7731154f3afe2d25aa (diff) | |
download | MEGATRON-f768d9bdb84e846d89aac66a4f3433a44241c298.tar.gz |
parser formed
Diffstat (limited to 'lexer.h')
-rw-r--r-- | lexer.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); |