diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/targets/C/ast_to_c.c | 5 | ||||
-rw-r--r-- | src/backend/targets/print/print.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/targets/C/ast_to_c.c b/src/backend/targets/C/ast_to_c.c index 9b8f95c..cd01e67 100644 --- a/src/backend/targets/C/ast_to_c.c +++ b/src/backend/targets/C/ast_to_c.c @@ -209,7 +209,9 @@ void ast_transitions_of_state_to_c(FILE *out,struct AST_Machine *machine,struct if(vector->number_of_transitions>0) { - fprintf(out,"\n\t%smachine_states_lock=1;\n",context_arrow); + fprintf(out,"\n\t%smachine_states_lock=1;\n\n",context_arrow); + ast_statement_to_c(out,1,vector->state->on_exit_statement,options); + fprintf(out,"\n"); fprintf(out,"\tswitch(event)\n\t{\n"); for(i=0;i<vector->number_of_transitions;++i) { @@ -227,6 +229,7 @@ void ast_transitions_of_state_to_c(FILE *out,struct AST_Machine *machine,struct //ast_pipeline_to_c(out,3,vector->transitions[i]->pipeline); ast_statement_to_c(out,indentation,vector->transitions[i]->statement,options); + ast_statement_to_c(out,indentation,vector->transitions[i]->to->on_entry_statement,options); ast_to_c_print_tabs(out,indentation); fprintf(out,"%smachine_states[",context_arrow); ast_token_to_c(out,machine->id); diff --git a/src/backend/targets/print/print.c b/src/backend/targets/print/print.c index cfe22e9..162031f 100644 --- a/src/backend/targets/print/print.c +++ b/src/backend/targets/print/print.c @@ -90,6 +90,12 @@ void print_keyword_enum(enum Keyword code) case KW_GRANTED: printf("KW_GRANTED"); break; + case KW_ENTERING: + printf("KW_ENTERING"); + break; + case KW_EXITING: + printf("KW_EXITING"); + break; default: printf("LEXERROR"); } |