diff options
author | Galin Simeonov <gts@volconst.com> | 2021-10-01 15:18:34 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-10-01 15:18:34 +0300 |
commit | 182bf3f1fd2f506b7783645815c86a0d50474d36 (patch) | |
tree | 6db3fd02422ec1cd864b1c1c59e40690533f7d37 | |
parent | b2b6003a8feec30490bf77daa2519afec187e438 (diff) | |
download | MEGATRON-master.tar.gz |
-rw-r--r-- | doc/bulgarian/.project.mg.swp | bin | 16384 -> 0 bytes | |||
-rw-r--r-- | doc/en.txt | 4 | ||||
-rw-r--r-- | src/frontend/parser.c | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/doc/bulgarian/.project.mg.swp b/doc/bulgarian/.project.mg.swp Binary files differdeleted file mode 100644 index f512973..0000000 --- a/doc/bulgarian/.project.mg.swp +++ /dev/null @@ -17,8 +17,8 @@ Syntax: <machine internals> := { <states definition> ";" | <events definition> ";" | <transitions definition> ";" \ | "starting" "on" <id> ";" } - <states definition> := "states" "[" { <id> [ "on" "entering" <execute statement> ] \ - [ "on" "exiting" <execute statement> ] }+ "]" + <states definition> := "states" "[" { <id> [ "[" ( "on" "entering" <execute statement> ";" ] \ + [ "on" "exiting" <execute statement> ";" ] "]" }+ "]" <events definition> := "events" "[" { <id> }+ "]" <transitions definition> := "transitions" "[" { <transition> ";" }+ "]" diff --git a/src/frontend/parser.c b/src/frontend/parser.c index 4e370c0..99a1e13 100644 --- a/src/frontend/parser.c +++ b/src/frontend/parser.c @@ -284,9 +284,7 @@ struct AST_State* parse_state(struct Translation_Data *translation_data) else break; } - if(get_and_check(translation_data,KW_CLOSE_SQUARE)) - { - }else + if(!get_and_check(translation_data,KW_CLOSE_SQUARE)) { if(hold_entry) delete_ast(hold_entry); @@ -472,6 +470,7 @@ struct AST* parse_statement(struct Translation_Data *translation_data) } }else { + push_parsing_error("expected 'execute' in statement",translation_data); return NULL; } } |