diff options
Diffstat (limited to 'src/backend/backend.h')
-rw-r--r-- | src/backend/backend.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/backend.h b/src/backend/backend.h index 1857cd0..8b865fd 100644 --- a/src/backend/backend.h +++ b/src/backend/backend.h @@ -2,6 +2,7 @@ #define BACKEND_H BACKEND_H #include <parser.h> #include <ast_to_c.h> +#include <map.h> /* * describes a given state and the transitions coming out of it @@ -15,4 +16,16 @@ struct State_And_Transitions }; /*returns an array of state_and_transition structs*/ struct State_And_Transitions** extract_transition_table(struct AST_States *states,struct AST_Transitions *transitions); +/*extracts a state from the expression that belongs in the states structure*/ +struct AST_State* extract_state(struct AST *expression,struct AST_States *states); + +void anotate_unchecked_states(struct AST_Translation_Unit *unit,struct Translation_Data *translation_data); +void anotate_machine(struct AST_Machine *machine,struct AST_Translation_Unit *unit,struct Translation_Data *translation_data); +struct AST* anotate_expression(struct AST *expression,struct AST_Translation_Unit *unit,struct AST_Machine *current_machine,struct Translation_Data *translation_data); + +_Bool expression_is_binary(struct AST* expression); +_Bool expression_is_unary(struct AST* expression); +_Bool state_is_in_states(struct AST_State *state,struct AST_States *states); +_Bool check_expression(struct AST *state,struct AST_Translation_Unit *unit); +_Bool check_transition(struct AST *state,struct AST_Translation_Unit *unit); #endif |