diff options
author | Galin Simeonov <gts@volconst.com> | 2021-06-03 12:38:37 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-07-15 18:04:02 +0300 |
commit | 76fc38b3cdfded2911b464baa7b182b5102318d1 (patch) | |
tree | 389223f76086bff07a3cd762683e5a16d34d12d2 /src/backend/backend.h | |
parent | 85b23fbee717f047af5a89eac6f4dba8e7812524 (diff) | |
download | MEGATRON-76fc38b3cdfded2911b464baa7b182b5102318d1.tar.gz |
work on generated C code
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 |