diff options
author | Galin Simeonov <gts@volconst.com> | 2021-07-14 01:43:40 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-07-15 18:07:29 +0300 |
commit | fbb038282af00eb09bc5a8ef7a0e7a7b76998683 (patch) | |
tree | f36565027c4da5edd5c03b53a78db4998b5cfb7c /src/frontend/parser.h | |
parent | 3877ff9860d2cbeda7127d932e45573ff0d9600b (diff) | |
download | MEGATRON-fbb038282af00eb09bc5a8ef7a0e7a7b76998683.tar.gz |
added ability to attach statements to entry and exit of a given state
Diffstat (limited to 'src/frontend/parser.h')
-rw-r--r-- | src/frontend/parser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/frontend/parser.h b/src/frontend/parser.h index 8845507..17e64e3 100644 --- a/src/frontend/parser.h +++ b/src/frontend/parser.h @@ -37,6 +37,8 @@ struct AST_State struct token *name; struct AST_Machine *parent; size_t number; + struct AST *on_entry_statement; + struct AST *on_exit_statement; }; struct AST_Event { @@ -138,7 +140,7 @@ struct AST_Transition* parse_transition(struct Translation_Data *translation_dat struct AST* parse_transition_granted(struct Translation_Data *translation_data,struct AST_States *states,struct AST_Events *events); -struct AST* parse_statement(struct Translation_Data *translation_data,struct AST_States *states,struct AST_Events *events); +struct AST* parse_statement(struct Translation_Data *translation_data); struct AST_Pipeline* parse_pipeline(struct Translation_Data *translation_data); struct AST_Command* parse_command(struct Translation_Data *translation_data); @@ -150,7 +152,7 @@ struct AST* parse_and_expression(struct Translation_Data *translation_data); struct AST* parse_not_expression(struct Translation_Data *translation_data); struct AST* parse_primary_expression(struct Translation_Data *translation_data); -struct AST_State* get_ast_state(struct token *id); +struct AST_State* get_ast_state(struct token *id,struct AST *entry,struct AST *exit); struct AST_Event* get_ast_event(struct token *id); struct AST_States* get_ast_states(struct Queue *states,struct Translation_Data *translation_data); struct AST_Events* get_ast_events(struct Queue *events); |