From 182bf3f1fd2f506b7783645815c86a0d50474d36 Mon Sep 17 00:00:00 2001 From: Galin Simeonov Date: Fri, 1 Oct 2021 15:18:34 +0300 Subject: fixed documentation and added an error message for execute statement fail --- doc/bulgarian/.project.mg.swp | Bin 16384 -> 0 bytes doc/en.txt | 4 ++-- src/frontend/parser.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 doc/bulgarian/.project.mg.swp diff --git a/doc/bulgarian/.project.mg.swp b/doc/bulgarian/.project.mg.swp deleted file mode 100644 index f512973..0000000 Binary files a/doc/bulgarian/.project.mg.swp and /dev/null differ diff --git a/doc/en.txt b/doc/en.txt index 95f1f91..68e115a 100644 --- a/doc/en.txt +++ b/doc/en.txt @@ -17,8 +17,8 @@ Syntax: := { ";" | ";" | ";" \ | "starting" "on" ";" } - := "states" "[" { [ "on" "entering" ] \ - [ "on" "exiting" ] }+ "]" + := "states" "[" { [ "[" ( "on" "entering" ";" ] \ + [ "on" "exiting" ";" ] "]" }+ "]" := "events" "[" { }+ "]" := "transitions" "[" { ";" }+ "]" 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; } } -- cgit v1.2.3