From fbb038282af00eb09bc5a8ef7a0e7a7b76998683 Mon Sep 17 00:00:00 2001 From: Galin Simeonov Date: Wed, 14 Jul 2021 01:43:40 +0300 Subject: added ability to attach statements to entry and exit of a given state --- src/frontend/parser.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/frontend/parser.h') 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); -- cgit v1.2.3