diff options
author | Chimrod <> | 2023-12-11 16:42:56 +0100 |
---|---|---|
committer | Chimrod <> | 2023-12-11 16:59:52 +0100 |
commit | 32cc150b5fc06e0c547b6d464cc6fa547ba874ba (patch) | |
tree | 9a2ef6e11351449a521f1a66d3b5d3246e879cd5 /lib | |
parent | 6dc8d7789aa165663d135c62a9f766b6b26c4920 (diff) |
Added a new error message in case of missing operand
Diffstat (limited to 'lib')
-rw-r--r-- | lib/qparser/expression_parser.messages | 265 |
1 files changed, 31 insertions, 234 deletions
diff --git a/lib/qparser/expression_parser.messages b/lib/qparser/expression_parser.messages index e15c3fd..5345ebf 100644 --- a/lib/qparser/expression_parser.messages +++ b/lib/qparser/expression_parser.messages @@ -1,282 +1,69 @@ main: LOCATION_START EOL IDENT SET -## -## Ends in an error in state: 13. -## -## variable -> IDENT . option(delimited(L_BRACKET,option(expression),R_BRACKET)) [ STAR R_PAREN R_BRACKET PLUS OR MULT_EQUAL MOD MINUS LT INCR GT EXCLAMATION EQUAL EOL ELSE DIV DECR COMA COLUMN AND AMPERSAND ] -## -## The known suffix of the stack is as follows: -## IDENT -## -Unexpected expression here. + Unexpected expression here. main: LOCATION_START EOL L_PAREN INTEGER SET -## -## Ends in an error in state: 69. -## -## expression -> L_PAREN expression . R_PAREN [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] -## expression -> expression . EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . LT GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . EXCLAMATION expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . PLUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . MINUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . STAR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . DIV expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . MOD expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . AND expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . GT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . LT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . EQUAL GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . EQUAL LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## expression -> expression . OR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] -## -## The known suffix of the stack is as follows: -## L_PAREN expression -## - -Unexpected '('. Did you forgot a function before ? + + Unexpected '('. Did you forgot a function before ? main: LOCATION_START EOL IF INTEGER SET -## -## Ends in an error in state: 87. -## -## expression -> expression . EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EXCLAMATION expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . PLUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . MINUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . STAR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . DIV expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . MOD expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . AND expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . GT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EQUAL GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EQUAL LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . OR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## line_statement -> IF expression . COLUMN nonempty_list(EOL) list(line_statement) elif_else_body END option(IF) nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## line_statement -> IF expression . COLUMN nonempty_list(EOL) list(line_statement) elif_else_body END option(IF) nonempty_list(AMPERSAND) list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## onliner(IF) -> IF expression . COLUMN final_inline_instruction [ EOL ELSE AMPERSAND ] -## -## The known suffix of the stack is as follows: -## IF expression -## - -The `IF` expression does not end properly. A `:` is expected before any instruction. + + The `IF` expression does not end properly. A `:` is expected before any instruction. main: LOCATION_START EOL COLUMN STAR -## -## Ends in an error in state: 92. -## -## line_statement -> COLUMN . IDENT list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## -## The known suffix of the stack is as follows: -## COLUMN -## -A location is expected after ':' not an expression + A location is expected after ':' not an expression main: LOCATION_START EOL ACT INTEGER SET -Invalid `ACT` label. You probably missed a ':' + Invalid `ACT` label. You probably missed a ':' main: LOCATION_START EOL ACT IDENT COLUMN EOL LOCATION_END -## -## Ends in an error in state: 100. -## -## line_statement -> ACT expression COLUMN nonempty_list(EOL) . list(line_statement) empty_body END option(ACT) nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## line_statement -> ACT expression COLUMN nonempty_list(EOL) . list(line_statement) empty_body END option(ACT) nonempty_list(AMPERSAND) list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## -## The known suffix of the stack is as follows: -## ACT expression COLUMN nonempty_list(EOL) -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 7, spurious reduction of production nonempty_list(EOL) -> EOL -## A block starting with `ACT` is not closed by `END` If there are nested blocks, the error will points the highest block. main: LOCATION_START EOL IF IDENT COLUMN ELSE R_PAREN -## -## Ends in an error in state: 106. -## -## inline_action -> onliner(IF) ELSE . inline_action [ EOL ELSE AMPERSAND ] -## option(preceded(ELSE,instruction)) -> ELSE . instruction [ EOL ELSE AMPERSAND ] -## -## The known suffix of the stack is as follows: -## onliner(IF) ELSE -## - -Too manies instructions on a single line. + + Too manies instructions on a single line. main: LOCATION_START EOL IF IDENT COLUMN EOL IDENT AMPERSAND LOCATION_END -## -## Ends in an error in state: 155. -## -## line_statement -> IF expression COLUMN nonempty_list(EOL) list(line_statement) . elif_else_body END option(IF) nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## line_statement -> IF expression COLUMN nonempty_list(EOL) list(line_statement) . elif_else_body END option(IF) nonempty_list(AMPERSAND) list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] -## -## The known suffix of the stack is as follows: -## IF expression COLUMN nonempty_list(EOL) list(line_statement) -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 117, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND -## In state 149, spurious reduction of production list(EOL) -> -## In state 150, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) -## In state 145, spurious reduction of production list(line_statement) -> -## In state 146, spurious reduction of production list(line_statement) -> line_statement list(line_statement) -## Unclosed `IF` block. Another block ends before the `END` instruction. main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE EOL LOCATION_END -## -## Ends in an error in state: 163. -## -## else_ -> ELSE nonempty_list(EOL) . list(line_statement) [ END ] -## -## The known suffix of the stack is as follows: -## ELSE nonempty_list(EOL) -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 7, spurious reduction of production nonempty_list(EOL) -> EOL -## A block starting with `IF` is not closed by `END` If there are nested blocks, the error will points the highest block. main: LOCATION_START EOL IDENT AMPERSAND END -## -## Ends in an error in state: 175. -## -## main -> list(before_location) LOCATION_START nonempty_list(EOL) list(line_statement) . LOCATION_END [ # ] -## -## The known suffix of the stack is as follows: -## list(before_location) LOCATION_START nonempty_list(EOL) list(line_statement) -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 117, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND -## In state 149, spurious reduction of production list(EOL) -> -## In state 150, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) -## In state 145, spurious reduction of production list(line_statement) -> -## In state 146, spurious reduction of production list(line_statement) -> line_statement list(line_statement) -## Unexpected `END`. Maybe you added an `END` after an inline `ACT` or `IF` ? main: STAR -## -## Ends in an error in state: 0. -## -## main' -> . main [ # ] -## -## The known suffix of the stack is as follows: -## -## -Missing location name + Missing location name main: LOCATION_START EOL INTEGER SET -## -## Ends in an error in state: 132. -## -## expression -> expression . EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . LT GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . EXCLAMATION expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . PLUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . MINUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . STAR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . DIV expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . MOD expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . AND expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . GT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . LT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . EQUAL GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . EQUAL LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## expression -> expression . OR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] -## single_instruction -> expression . [ EOL ELSE AMPERSAND ] -## -## The known suffix of the stack is as follows: -## expression -## - -Unexpected expression here. + + Unexpected expression here. main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF INTEGER SET -## -## Ends in an error in state: 157. -## -## elif -> ELIF expression . COLUMN nonempty_list(EOL) list(line_statement) [ END ELSE ELIF ] -## expression -> expression . EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EXCLAMATION expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . PLUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . MINUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . STAR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . DIV expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . MOD expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . AND expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . GT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . LT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EQUAL GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . EQUAL LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## expression -> expression . OR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COLUMN AND ] -## -## The known suffix of the stack is as follows: -## ELIF expression -## - -The `ELIF` expression does not end properly. A `:` is expected before any instruction. + + The `ELIF` expression does not end properly. A `:` is expected before any instruction. main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF IDENT COLUMN EOL IDENT AMPERSAND LOCATION_END -Unclosed `ELIF` block. Another block ends before the `END` instruction. + Unclosed `ELIF` block. Another block ends before the `END` instruction. main: EOL STAR -## -## Ends in an error in state: 177. -## -## list(before_location) -> before_location . list(before_location) [ LOCATION_START ] -## -## The known suffix of the stack is as follows: -## before_location -## -The context does not allow an instruction here. + The context does not allow an instruction here. main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE STAR -## -## Ends in an error in state: 162. -## -## else_ -> ELSE . nonempty_list(EOL) list(line_statement) [ END ] -## -## The known suffix of the stack is as follows: -## ELSE -## -Unexpected operator after `ELSE` + Unexpected operator after `ELSE` main: LOCATION_START EOL IDENT DECR INTEGER SET main: LOCATION_START EOL SET IDENT DECR INTEGER SET @@ -284,17 +71,27 @@ main: LOCATION_START EOL LET IDENT DECR INTEGER SET main: LOCATION_START EOL KEYWORD INTEGER TEXT_MARKER main: LOCATION_START EOL KEYWORD IDENT COMA INTEGER TEXT_MARKER -Missing separator between instructions + Missing separator between instructions main: LOCATION_START EOL IF STAR main: LOCATION_START EOL IDENT DECR STAR -Missing operand + Missing operand main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF IDENT COLUMN STAR -Mix between `IF` block and inline `ELIF` + Mix between `IF` block and inline `ELIF` main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE EOL IDENT AMPERSAND LOCATION_END -Unclosed `ELSE` block. Another block ends before the `END` instruction. + Unclosed `ELSE` block. Another block ends before the `END` instruction. + +main: LOCATION_START EOL INTEGER EQUAL STAR +main: LOCATION_START EOL IDENT AND STAR +main: LOCATION_START EOL IDENT OR STAR +main: LOCATION_START EOL IDENT GT STAR +main: LOCATION_START EOL IDENT LT STAR +main: LOCATION_START EOL IDENT GT EQUAL STAR +main: LOCATION_START EOL IDENT LT EQUAL STAR + + Missing boolean after operator |