From f768d9bdb84e846d89aac66a4f3433a44241c298 Mon Sep 17 00:00:00 2001 From: Galin Simeonov Date: Mon, 17 May 2021 17:29:08 +0300 Subject: parser formed --- lexer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lexer.h') diff --git a/lexer.h b/lexer.h index e69e23b..320146c 100644 --- a/lexer.h +++ b/lexer.h @@ -3,6 +3,7 @@ #include //isspace #include #include +#include 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); -- cgit v1.2.3