diff options
author | Chimrod <> | 2023-09-22 14:12:14 +0200 |
---|---|---|
committer | Chimrod <> | 2023-09-22 14:12:14 +0200 |
commit | bd9d82035b21c8b0695c18208827c184785398af (patch) | |
tree | 5c6b03d6a82155b867e5ec2ceecd260b8868579a |
first commit
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | bin/dune | 6 | ||||
-rw-r--r-- | bin/main.ml | 11 | ||||
-rw-r--r-- | dune-project | 28 | ||||
-rw-r--r-- | lib/analyzer.ml | 44 | ||||
-rw-r--r-- | lib/dune | 30 | ||||
-rwxr-xr-x | lib/explain.sh | 5 | ||||
-rw-r--r-- | lib/expression_parser.messages | 2040 | ||||
-rwxr-xr-x | lib/generate_errors.sh | 8 | ||||
-rw-r--r-- | lib/interpreter.ml | 70 | ||||
-rw-r--r-- | lib/lexer.mll | 361 | ||||
-rw-r--r-- | lib/parser.mly | 91 | ||||
-rw-r--r-- | lib/qsp_expression.mly | 88 | ||||
-rw-r--r-- | lib/qsp_instruction.mly | 93 | ||||
-rw-r--r-- | lib/tokens.mly | 70 | ||||
-rw-r--r-- | syntax/S.ml | 91 | ||||
-rw-r--r-- | syntax/dune | 6 | ||||
-rw-r--r-- | syntax/t.ml | 77 | ||||
-rw-r--r-- | syntax/tree.ml | 95 | ||||
-rw-r--r-- | syntax/tree.mli | 51 | ||||
-rw-r--r-- | test/dune | 11 | ||||
-rw-r--r-- | test/qsp_parser_test.ml | 727 |
22 files changed, 4008 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c04e3b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +lib/*.conflicts +lib/expression_parser.messages_new +lib/all_errors +examples/ +_build/ diff --git a/bin/dune b/bin/dune new file mode 100644 index 0000000..36f9b41 --- /dev/null +++ b/bin/dune @@ -0,0 +1,6 @@ +(executable + (public_name qsp_parser) + (name main) + (libraries + qsp_syntax + qsp_parser)) diff --git a/bin/main.ml b/bin/main.ml new file mode 100644 index 0000000..1e8ff45 --- /dev/null +++ b/bin/main.ml @@ -0,0 +1,11 @@ +let () = + let file_name = Sys.argv.(1) in + let ic = Stdlib.open_in file_name in + let lexer = Lexing.from_channel ~with_positions:true ic in + let result = Qsp_parser.Analyzer.parse (module Qsp_syntax.Tree) lexer in + match result with + | Ok _ -> exit 0 + | Error e -> + Format.fprintf Format.std_formatter "\nError in location %s\n%a" file_name + Qsp_parser.Analyzer.format_error e; + exit 1 diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..b5e5b87 --- /dev/null +++ b/dune-project @@ -0,0 +1,28 @@ +(lang dune 3.10) +(using menhir 2.0) + +(name qsp_parser) + +(generate_opam_files true) +(implicit_transitive_deps true) + +(source + (github username/reponame)) + +(authors "Chimrod") + +(maintainers "Chimrod") + +(license LICENSE) + +(documentation https://url/to/documentation) + +(package + (name qsp_parser) + (synopsis "A short synopsis") + (description "A longer description") + (depends ocaml dune) + (tags + (topics "to describe" your project))) + +; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project diff --git a/lib/analyzer.ml b/lib/analyzer.ml new file mode 100644 index 0000000..1a9b17b --- /dev/null +++ b/lib/analyzer.ml @@ -0,0 +1,44 @@ +type error = { + message : string; + start_pos : Lexing.position; + end_pos : Lexing.position; +} +(** Error reported when the syntax is invalid *) + +let format_error : Format.formatter -> error -> unit = + fun f e -> + let start_c = e.start_pos.Lexing.pos_cnum - e.start_pos.Lexing.pos_bol + and end_c = e.end_pos.Lexing.pos_cnum - e.end_pos.Lexing.pos_bol + and start_line = e.start_pos.Lexing.pos_lnum + and end_line = e.end_pos.Lexing.pos_lnum in + + if start_line != end_line then + Format.fprintf f "Lines %d-%d %s" start_line end_line e.message + else Format.fprintf f "Line %d %d:%d %s" start_line start_c end_c e.message + +(** + Run the QSP parser and apply the analyzer over it. + + See [syntax/S] + *) +let parse : + (module Qsp_syntax.S.Analyzer with type Location.repr = 'a) -> + Lexing.lexbuf -> + ('a, error) Result.t = + fun (type a) (module S : Qsp_syntax.S.Analyzer with type Location.repr = a) -> + let module Parser = Parser.Make (Qsp_syntax.Tree) in + let module IncrementalParser = + Interpreter.Interpreter (Parser.MenhirInterpreter) in + fun lexbuf -> + IncrementalParser.of_lexbuf lexbuf Lexer.token Parser.Incremental.main + |> Result.map_error (fun e -> + let message = + match e.Interpreter.code with + | Interpreter.InvalidSyntax -> "Invalid Syntax" + | Interpreter.MenhirCode c -> + String.concat "" + [ + "(Code "; string_of_int c; ")\n"; Parser_messages.message c; + ] + in + { message; start_pos = e.start_pos; end_pos = e.end_pos }) diff --git a/lib/dune b/lib/dune new file mode 100644 index 0000000..284ab67 --- /dev/null +++ b/lib/dune @@ -0,0 +1,30 @@ +(library + (name qsp_parser) + (libraries + qsp_syntax + menhirLib) + (preprocess (pps + ppx_deriving.show + ppx_deriving.eq )) + ) + + +(rule + (targets parser_messages.ml) + (deps expression_parser.messages tokens.mly qsp_expression.mly qsp_instruction.mly parser.mly) + (action (with-stdout-to %{targets} (run menhir --base parser.mly --compile-errors %{deps})))) + +(menhir + (modules tokens) + (flags --only-tokens) +) + + +(menhir + (modules tokens parser qsp_instruction qsp_expression) + (flags --table --external-tokens Tokens) + (merge_into parser) +) + +(ocamllex lexer) + diff --git a/lib/explain.sh b/lib/explain.sh new file mode 100755 index 0000000..609d208 --- /dev/null +++ b/lib/explain.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +menhir --explain tokens.mly qsp_expression.mly --base qsp_expression.mly +menhir --explain tokens.mly qsp_expression.mly qsp_instruction.mly --base qsp_instruction.mly +menhir --explain tokens.mly qsp_expression.mly qsp_instruction.mly parser.mly --base parser.mly diff --git a/lib/expression_parser.messages b/lib/expression_parser.messages new file mode 100644 index 0000000..174f037 --- /dev/null +++ b/lib/expression_parser.messages @@ -0,0 +1,2040 @@ +main: LOCATION_START EOL IDENT SET +## +## Ends in an error in state: 12. +## +## variable -> IDENT . option(delimited(L_BRACKET,option(expression),R_BRACKET)) [ STAR R_PAREN R_BRACKET PLUS OR 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. + +main: LOCATION_START EOL L_PAREN INTEGER SET +## +## Ends in an error in state: 70. +## +## 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 . 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 . AND 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 ? + +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 . 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 . AND 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 LOC 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 LOC 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 +## + +Invalid `IF` condition. You probably missed a ':' + +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 LOC 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 + +main: LOCATION_START EOL ACT INTEGER SET +## +## Ends in an error in state: 96. +## +## 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 . 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 . AND 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 -> 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 LOC 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 LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## onliner(ACT) -> ACT expression . COLUMN final_inline_instruction [ EOL AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ACT expression +## + +Invalid `ACT` label. You probably missed a ':' + +main: LOCATION_START EOL ACT IDENT COLUMN EOL LOCATION_END +## +## Ends in an error in state: 98. +## +## 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 LOC 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 LOC 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 6, 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: 104. +## +## option(preceded(ELSE,instruction)) -> ELSE . instruction [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ELSE +## + +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: 152. +## +## 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 LOC 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 LOC 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 132, spurious reduction of production list(EOL) -> +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## In state 128, spurious reduction of production list(line_statement) -> +## In state 129, spurious reduction of production list(line_statement) -> line_statement list(line_statement) +## + +Unclosed statement. +(The error may be above in the code, for example a missing `END` after an `IF`) + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE EOL LOCATION_END +## +## Ends in an error in state: 160. +## +## 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 6, 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: 172. +## +## main -> list(EOL) LOCATION_START nonempty_list(EOL) list(line_statement) . LOCATION_END list(EOL) EOF [ # ] +## +## The known suffix of the stack is as follows: +## list(EOL) 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 132, spurious reduction of production list(EOL) -> +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## In state 128, spurious reduction of production list(line_statement) -> +## In state 129, 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 + +main: LOCATION_START EOL R_PAREN +## +## Ends in an error in state: 6. +## +## nonempty_list(EOL) -> EOL . [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## nonempty_list(EOL) -> EOL . nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## EOL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL STAR STAR +## +## Ends in an error in state: 9. +## +## keyword -> STAR . KEYWORD [ PLUS OBJ NO MINUS L_PAREN LOC LITERAL INTEGER IDENT FUNCTION EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## STAR +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL SET STAR +## +## Ends in an error in state: 11. +## +## let_assignation -> SET . variable assignation_operator expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## SET +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT L_BRACKET STAR +## +## Ends in an error in state: 13. +## +## option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> L_BRACKET . option(expression) R_BRACKET [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT INCR GT EXCLAMATION EQUAL EOL ELSE DIV DECR COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## L_BRACKET +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL L_PAREN STAR +## +## Ends in an error in state: 18. +## +## 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 ] +## +## The known suffix of the stack is as follows: +## L_PAREN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL FUNCTION STAR +## +## Ends in an error in state: 22. +## +## expression -> FUNCTION . qsp_expression_argument(expression) [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## FUNCTION +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL FUNCTION L_PAREN STAR +## +## Ends in an error in state: 23. +## +## 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 ] +## qsp_expression_argument(expression) -> L_PAREN . arguments(expression) R_PAREN [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## L_PAREN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LOC STAR +## +## Ends in an error in state: 25. +## +## expression -> unary_operator . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## unary_operator +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LOC INTEGER SET +## +## Ends in an error in state: 26. +## +## expression -> unary_operator expression . [ 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 R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## unary_operator expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT STAR STAR +## +## Ends in an error in state: 27. +## +## expression -> expression STAR . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression STAR +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT STAR INTEGER SET +## +## Ends in an error in state: 28. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression STAR expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression STAR expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT PLUS STAR +## +## Ends in an error in state: 29. +## +## expression -> expression PLUS . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression PLUS +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT PLUS INTEGER SET +## +## Ends in an error in state: 30. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression PLUS expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression PLUS expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT MOD STAR +## +## Ends in an error in state: 31. +## +## expression -> expression MOD . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression MOD +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT MOD INTEGER SET +## +## Ends in an error in state: 32. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression MOD expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression MOD expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT MINUS STAR +## +## Ends in an error in state: 33. +## +## expression -> expression MINUS . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression MINUS +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT MINUS INTEGER SET +## +## Ends in an error in state: 34. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression MINUS expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression MINUS expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT STAR +## +## Ends in an error in state: 35. +## +## expression -> expression LT . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression LT . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression LT . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT GT STAR +## +## Ends in an error in state: 36. +## +## expression -> expression LT GT . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT GT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT GT INTEGER SET +## +## Ends in an error in state: 37. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression LT GT expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT GT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT GT STAR +## +## Ends in an error in state: 38. +## +## expression -> expression GT . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression GT . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression GT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT GT EQUAL STAR +## +## Ends in an error in state: 39. +## +## expression -> expression GT EQUAL . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression GT EQUAL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT GT EQUAL INTEGER SET +## +## Ends in an error in state: 40. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression GT EQUAL expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression GT EQUAL expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL STAR +## +## Ends in an error in state: 41. +## +## expression -> expression EQUAL . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression EQUAL . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression EQUAL . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL LT STAR +## +## Ends in an error in state: 42. +## +## expression -> expression EQUAL LT . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL LT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL LT INTEGER SET +## +## Ends in an error in state: 43. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression EQUAL LT expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL LT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT DIV STAR +## +## Ends in an error in state: 44. +## +## expression -> expression DIV . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression DIV +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT DIV INTEGER SET +## +## Ends in an error in state: 45. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression DIV expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression DIV expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL GT STAR +## +## Ends in an error in state: 46. +## +## expression -> expression EQUAL GT . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL GT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL GT INTEGER SET +## +## Ends in an error in state: 47. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression EQUAL GT expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL GT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER EQUAL INTEGER SET +## +## Ends in an error in state: 48. +## +## expression -> expression . EQUAL expression [ 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 R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EQUAL expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT GT INTEGER SET +## +## Ends in an error in state: 49. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression GT expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression GT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT EQUAL STAR +## +## Ends in an error in state: 50. +## +## expression -> expression LT EQUAL . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT EQUAL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT EQUAL INTEGER SET +## +## Ends in an error in state: 51. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression LT EQUAL expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT EQUAL expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT LT INTEGER SET +## +## Ends in an error in state: 52. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression LT expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression LT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT OR STAR +## +## Ends in an error in state: 53. +## +## expression -> expression OR . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression OR +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT OR INTEGER SET +## +## Ends in an error in state: 54. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression OR expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression OR expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT AND STAR +## +## Ends in an error in state: 55. +## +## expression -> expression AND . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression AND +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT AND INTEGER SET +## +## Ends in an error in state: 56. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression AND expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression AND expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD L_PAREN INTEGER SET +## +## Ends in an error in state: 57. +## +## arguments(expression) -> expression . COMA separated_nonempty_list(COMA,expression) [ R_PAREN ] +## 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 COMA AND ] +## expression -> expression . LT GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . PLUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . MINUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . STAR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . DIV expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . MOD expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . AND expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## expression -> expression . OR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV COMA AND ] +## +## The known suffix of the stack is as follows: +## L_PAREN expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT EXCLAMATION STAR +## +## Ends in an error in state: 59. +## +## expression -> expression EXCLAMATION . expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EXCLAMATION +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT EXCLAMATION INTEGER SET +## +## Ends in an error in state: 60. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression EXCLAMATION expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression EXCLAMATION expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD IDENT COMA STAR +## +## Ends in an error in state: 61. +## +## arguments(expression) -> expression COMA . separated_nonempty_list(COMA,expression) [ R_PAREN EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression COMA +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD IDENT COMA INTEGER SET +## +## Ends in an error in state: 63. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## separated_nonempty_list(COMA,expression) -> expression . [ R_PAREN EOL ELSE AMPERSAND ] +## separated_nonempty_list(COMA,expression) -> expression . COMA separated_nonempty_list(COMA,expression) [ R_PAREN EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD IDENT COMA IDENT COMA STAR +## +## Ends in an error in state: 64. +## +## separated_nonempty_list(COMA,expression) -> expression COMA . separated_nonempty_list(COMA,expression) [ R_PAREN EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression COMA +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL FUNCTION L_PAREN IDENT COMA IDENT EOL +## +## Ends in an error in state: 66. +## +## qsp_expression_argument(expression) -> L_PAREN arguments(expression) . R_PAREN [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## L_PAREN arguments(expression) +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## In state 24, spurious reduction of production expression -> variable +## In state 63, spurious reduction of production separated_nonempty_list(COMA,expression) -> expression +## In state 62, spurious reduction of production arguments(expression) -> expression COMA separated_nonempty_list(COMA,expression) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL FUNCTION INTEGER SET +## +## Ends in an error in state: 69. +## +## expression -> expression . EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . AND expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## expression -> expression . OR expression [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## qsp_expression_argument(expression) -> expression . [ STAR R_PAREN R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA COLUMN AND AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT L_BRACKET INTEGER SET +## +## Ends in an error in state: 73. +## +## expression -> expression . EQUAL expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . LT GT expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . EXCLAMATION expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . PLUS expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . MINUS expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . STAR expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . DIV expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . MOD expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . GT expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . LT expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . GT EQUAL expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . LT EQUAL expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . EQUAL GT expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . EQUAL LT expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . AND expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## expression -> expression . OR expression [ STAR R_BRACKET PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL DIV AND ] +## option(expression) -> expression . [ R_BRACKET ] +## +## The known suffix of the stack is as follows: +## expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL SET IDENT STAR +## +## Ends in an error in state: 75. +## +## let_assignation -> SET variable . assignation_operator expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## SET variable +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL SET IDENT DECR STAR +## +## Ends in an error in state: 79. +## +## let_assignation -> SET variable assignation_operator . expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## SET variable assignation_operator +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL SET IDENT DECR INTEGER SET +## +## Ends in an error in state: 80. +## +## 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 . 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 . AND 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 ] +## let_assignation -> SET variable assignation_operator expression . [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## SET variable assignation_operator expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LET STAR +## +## Ends in an error in state: 81. +## +## let_assignation -> LET . variable assignation_operator expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## LET +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LET IDENT STAR +## +## Ends in an error in state: 82. +## +## let_assignation -> LET variable . assignation_operator expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## LET variable +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LET IDENT DECR STAR +## +## Ends in an error in state: 83. +## +## let_assignation -> LET variable assignation_operator . expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## LET variable assignation_operator +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LET IDENT DECR INTEGER SET +## +## Ends in an error in state: 84. +## +## 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 . 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 . AND 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 ] +## let_assignation -> LET variable assignation_operator expression . [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## LET variable assignation_operator expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF STAR +## +## Ends in an error in state: 86. +## +## 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 LOC 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 LOC 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 +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN R_PAREN +## +## Ends in an error in state: 88. +## +## 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 LOC 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 LOC 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 COLUMN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL LOCATION_END +## +## Ends in an error in state: 89. +## +## 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 LOC 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 LOC 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) +## +## 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 6, spurious reduction of production nonempty_list(EOL) -> EOL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL COMMENT STAR +## +## Ends in an error in state: 90. +## +## line_statement -> COMMENT . nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## COMMENT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL COLUMN IDENT R_PAREN +## +## Ends in an error in state: 93. +## +## line_statement -> COLUMN IDENT . list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## COLUMN IDENT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT STAR +## +## Ends in an error in state: 95. +## +## 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 LOC 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 LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## onliner(ACT) -> ACT . expression COLUMN final_inline_instruction [ EOL AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ACT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN R_PAREN +## +## Ends in an error in state: 97. +## +## 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 LOC 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 LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## onliner(ACT) -> ACT expression COLUMN . final_inline_instruction [ EOL AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ACT expression COLUMN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT R_PAREN +## +## Ends in an error in state: 99. +## +## expression -> variable . [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV AND AMPERSAND ] +## let_assignation -> variable . assignation_operator expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## variable +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT DECR STAR +## +## Ends in an error in state: 100. +## +## let_assignation -> variable assignation_operator . expression [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## variable assignation_operator +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT DECR INTEGER SET +## +## Ends in an error in state: 101. +## +## 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 . 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 . AND 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 ] +## let_assignation -> variable assignation_operator expression . [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## variable assignation_operator expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN COMMENT STAR +## +## Ends in an error in state: 103. +## +## inline_action -> onliner(IF) . option(preceded(ELSE,instruction)) [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## onliner(IF) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD STAR +## +## Ends in an error in state: 106. +## +## single_instruction -> keyword . qsp_instruction_argument(expression) [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## keyword +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD L_PAREN STAR +## +## Ends in an error in state: 107. +## +## expression -> L_PAREN . expression R_PAREN [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## optionnal_delimited(L_PAREN,arguments(expression),R_PAREN) -> L_PAREN . arguments(expression) R_PAREN [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## L_PAREN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD L_PAREN IDENT COMA IDENT EOL +## +## Ends in an error in state: 108. +## +## optionnal_delimited(L_PAREN,arguments(expression),R_PAREN) -> L_PAREN arguments(expression) . R_PAREN [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## L_PAREN arguments(expression) +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## In state 24, spurious reduction of production expression -> variable +## In state 63, spurious reduction of production separated_nonempty_list(COMA,expression) -> expression +## In state 62, spurious reduction of production arguments(expression) -> expression COMA separated_nonempty_list(COMA,expression) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL KEYWORD INTEGER SET +## +## Ends in an error in state: 112. +## +## arguments(expression) -> expression . COMA separated_nonempty_list(COMA,expression) [ EOL ELSE AMPERSAND ] +## expression -> expression . EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EXCLAMATION expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . PLUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . MINUS expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . STAR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . DIV expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . MOD expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . GT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . LT EQUAL expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EQUAL GT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . EQUAL LT expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . AND expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## expression -> expression . OR expression [ STAR PLUS OR MOD MINUS LT GT EXCLAMATION EQUAL EOL ELSE DIV COMA AND AMPERSAND ] +## qsp_instruction_argument(expression) -> expression . [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL INTEGER SET +## +## Ends in an error in state: 115. +## +## 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 . 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 . AND 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. + +main: LOCATION_START EOL ACT IDENT COLUMN EOL IDENT AMPERSAND LOCATION_END +## +## Ends in an error in state: 119. +## +## 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 LOC 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 LOC 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) list(line_statement) empty_body +## +## 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 132, spurious reduction of production list(EOL) -> +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## In state 128, spurious reduction of production list(line_statement) -> +## In state 129, spurious reduction of production list(line_statement) -> line_statement list(line_statement) +## In state 118, spurious reduction of production empty_body -> +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN EOL END STAR +## +## Ends in an error in state: 120. +## +## 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 LOC 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 LOC 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) list(line_statement) empty_body END +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN EOL END ACT STAR +## +## Ends in an error in state: 122. +## +## 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 LOC 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 LOC 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) list(line_statement) empty_body END option(ACT) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT AMPERSAND R_PAREN +## +## Ends in an error in state: 123. +## +## nonempty_list(AMPERSAND) -> AMPERSAND . [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION EOL END ELSE ELIF COMMENT COLUMN AMPERSAND ACT ] +## nonempty_list(AMPERSAND) -> AMPERSAND . nonempty_list(AMPERSAND) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION EOL END ELSE ELIF COMMENT COLUMN AMPERSAND ACT ] +## +## The known suffix of the stack is as follows: +## AMPERSAND +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT AMPERSAND EOL EOF +## +## Ends in an error in state: 128. +## +## list(line_statement) -> line_statement . list(line_statement) [ LOCATION_END END ELSE ELIF ] +## +## The known suffix of the stack is as follows: +## 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 1, spurious reduction of production list(EOL) -> +## In state 2, spurious reduction of production list(EOL) -> EOL list(EOL) +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IDENT ELSE +## +## Ends in an error in state: 130. +## +## line_statement -> instruction . nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## line_statement -> instruction . nonempty_list(AMPERSAND) list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## instruction +## +## 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 12, spurious reduction of production option(delimited(L_BRACKET,option(expression),R_BRACKET)) -> +## In state 74, spurious reduction of production variable -> IDENT option(delimited(L_BRACKET,option(expression),R_BRACKET)) +## In state 99, spurious reduction of production expression -> variable +## In state 115, spurious reduction of production single_instruction -> expression +## In state 102, spurious reduction of production instruction -> single_instruction +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN COMMENT STAR +## +## Ends in an error in state: 134. +## +## line_statement -> inline_action . nonempty_list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## line_statement -> inline_action . nonempty_list(AMPERSAND) list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## inline_action +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN IDENT AMPERSAND LOCATION_END +## +## Ends in an error in state: 138. +## +## final_inline_instruction -> inline_instruction . instruction [ EOL ELSE AMPERSAND ] +## final_inline_instruction -> inline_instruction . inline_action [ EOL ELSE AMPERSAND ] +## final_inline_instruction -> inline_instruction . COMMENT [ EOL ELSE AMPERSAND ] +## final_inline_instruction -> inline_instruction . [ EOL ELSE AMPERSAND ] +## inline_instruction -> inline_instruction . single_instruction nonempty_list(AMPERSAND) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION EOL ELSE COMMENT AMPERSAND ACT ] +## +## The known suffix of the stack is as follows: +## inline_instruction +## +## 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 149, spurious reduction of production inline_instruction -> inline_instruction single_instruction nonempty_list(AMPERSAND) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN IF STAR +## +## Ends in an error in state: 139. +## +## onliner(IF) -> IF . expression COLUMN final_inline_instruction [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## IF +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN IF INTEGER SET +## +## Ends in an error in state: 140. +## +## 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 . 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 . AND 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 ] +## onliner(IF) -> IF expression . COLUMN final_inline_instruction [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## IF expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN ACT STAR +## +## Ends in an error in state: 144. +## +## onliner(ACT) -> ACT . expression COLUMN final_inline_instruction [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ACT +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN ACT INTEGER SET +## +## Ends in an error in state: 145. +## +## 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 . 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 . AND 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 ] +## onliner(ACT) -> ACT expression . COLUMN final_inline_instruction [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## ACT expression +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL ACT IDENT COLUMN KEYWORD L_PAREN R_PAREN STAR +## +## Ends in an error in state: 148. +## +## inline_instruction -> inline_instruction single_instruction . nonempty_list(AMPERSAND) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION EOL ELSE COMMENT AMPERSAND ACT ] +## instruction -> single_instruction . [ EOL ELSE AMPERSAND ] +## +## The known suffix of the stack is as follows: +## inline_instruction single_instruction +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF STAR +## +## Ends in an error in state: 153. +## +## elif -> ELIF . expression COLUMN nonempty_list(EOL) list(line_statement) [ END ELSE ELIF ] +## +## The known suffix of the stack is as follows: +## ELIF +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF INTEGER SET +## +## Ends in an error in state: 154. +## +## 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 . 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 . AND 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 +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF IDENT COLUMN STAR +## +## Ends in an error in state: 155. +## +## elif -> ELIF expression COLUMN . nonempty_list(EOL) list(line_statement) [ END ELSE ELIF ] +## +## The known suffix of the stack is as follows: +## ELIF expression COLUMN +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF IDENT COLUMN EOL LOCATION_END +## +## Ends in an error in state: 156. +## +## elif -> ELIF expression COLUMN nonempty_list(EOL) . list(line_statement) [ END ELSE ELIF ] +## +## The known suffix of the stack is as follows: +## ELIF 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 6, spurious reduction of production nonempty_list(EOL) -> EOL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE STAR +## +## Ends in an error in state: 159. +## +## else_ -> ELSE . nonempty_list(EOL) list(line_statement) [ END ] +## +## The known suffix of the stack is as follows: +## ELSE +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELSE EOL IDENT AMPERSAND LOCATION_END +## +## Ends in an error in state: 163. +## +## 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 LOC 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 LOC 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) elif_else_body +## +## 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 132, spurious reduction of production list(EOL) -> +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## In state 128, spurious reduction of production list(line_statement) -> +## In state 129, spurious reduction of production list(line_statement) -> line_statement list(line_statement) +## In state 161, spurious reduction of production else_ -> ELSE nonempty_list(EOL) list(line_statement) +## In state 162, spurious reduction of production elif_else_body -> list(elif) else_ +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL END STAR +## +## Ends in an error in state: 164. +## +## 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 LOC 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 LOC 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) elif_else_body END +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL END IF STAR +## +## Ends in an error in state: 166. +## +## 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 LOC 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 LOC 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) elif_else_body END option(IF) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL IF IDENT COLUMN EOL ELIF IDENT COLUMN EOL IDENT AMPERSAND LOCATION_END +## +## Ends in an error in state: 170. +## +## list(elif) -> elif . list(elif) [ END ELSE ] +## +## The known suffix of the stack is as follows: +## elif +## +## 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 123, spurious reduction of production nonempty_list(AMPERSAND) -> AMPERSAND +## In state 132, spurious reduction of production list(EOL) -> +## In state 133, spurious reduction of production line_statement -> instruction nonempty_list(AMPERSAND) list(EOL) +## In state 128, spurious reduction of production list(line_statement) -> +## In state 129, spurious reduction of production list(line_statement) -> line_statement list(line_statement) +## In state 157, spurious reduction of production elif -> ELIF expression COLUMN nonempty_list(EOL) list(line_statement) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LOCATION_END STAR +## +## Ends in an error in state: 173. +## +## main -> list(EOL) LOCATION_START nonempty_list(EOL) list(line_statement) LOCATION_END . list(EOL) EOF [ # ] +## +## The known suffix of the stack is as follows: +## list(EOL) LOCATION_START nonempty_list(EOL) list(line_statement) LOCATION_END +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL LOCATION_END EOL STAR +## +## Ends in an error in state: 174. +## +## main -> list(EOL) LOCATION_START nonempty_list(EOL) list(line_statement) LOCATION_END list(EOL) . EOF [ # ] +## +## The known suffix of the stack is as follows: +## list(EOL) LOCATION_START nonempty_list(EOL) list(line_statement) LOCATION_END 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 1, spurious reduction of production list(EOL) -> +## In state 2, spurious reduction of production list(EOL) -> EOL list(EOL) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: EOL R_PAREN +## +## Ends in an error in state: 1. +## +## list(EOL) -> EOL . list(EOL) [ STAR SET PLUS OBJ NO MINUS L_PAREN LOCATION_START LOCATION_END LOC LITERAL LET KEYWORD INTEGER IF IDENT FUNCTION EOF END ELSE ELIF COMMENT COLUMN ACT ] +## +## The known suffix of the stack is as follows: +## EOL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: EOL STAR +## +## Ends in an error in state: 4. +## +## main -> list(EOL) . LOCATION_START nonempty_list(EOL) list(line_statement) LOCATION_END list(EOL) EOF [ # ] +## +## The known suffix of the stack is as follows: +## 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 1, spurious reduction of production list(EOL) -> +## In state 2, spurious reduction of production list(EOL) -> EOL list(EOL) +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START STAR +## +## Ends in an error in state: 5. +## +## main -> list(EOL) LOCATION_START . nonempty_list(EOL) list(line_statement) LOCATION_END list(EOL) EOF [ # ] +## +## The known suffix of the stack is as follows: +## list(EOL) LOCATION_START +## + +<YOUR SYNTAX ERROR MESSAGE HERE> + +main: LOCATION_START EOL END +## +## Ends in an error in state: 8. +## +## main -> list(EOL) LOCATION_START nonempty_list(EOL) . list(line_statement) LOCATION_END list(EOL) EOF [ # ] +## +## The known suffix of the stack is as follows: +## list(EOL) LOCATION_START 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 6, spurious reduction of production nonempty_list(EOL) -> EOL +## + +<YOUR SYNTAX ERROR MESSAGE HERE> diff --git a/lib/generate_errors.sh b/lib/generate_errors.sh new file mode 100755 index 0000000..3cff769 --- /dev/null +++ b/lib/generate_errors.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Generate the error file with the helper messages. This script is required +# when the syntax is modified because menhir will change the state number and +# we need to make it match with the comment in the messages. + +menhir --list-errors *.mly --base parser.mly > all_errors +menhir --merge-errors expression_parser.messages --merge-errors all_errors *.mly --base parser.mly > expression_parser.messages_new diff --git a/lib/interpreter.ml b/lib/interpreter.ml new file mode 100644 index 0000000..b41d74e --- /dev/null +++ b/lib/interpreter.ml @@ -0,0 +1,70 @@ +(** + This module provide a way to build the syntax parser with the menhir + incremental engine. This feature allow to see the state of the parser, and + get detailed error message but is not intended to be used directly. + + Refer to the menhir manual in order to see the values. + + The interresting function here is [of_lexer] which return the error code in + case of invalid syntax. + *) + +type error_code = InvalidSyntax | MenhirCode of int + +type error = { + code : error_code; + start_pos : Lexing.position; + end_pos : Lexing.position; +} + +module Interpreter (MI : MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE) = +struct + module E = MenhirLib.ErrorReports + module L = MenhirLib.LexerUtil + + let range_message start_pos end_pos code = { code; start_pos; end_pos } + + let get_parse_error default_position env : error = + match MI.stack env with + | (lazy Nil) -> + range_message default_position.Lexing.lex_start_p + default_position.Lexing.lex_curr_p InvalidSyntax + | (lazy (Cons (MI.Element (state, _, start_pos, end_pos), _))) -> + range_message start_pos end_pos (MenhirCode (MI.number state)) + + let rec _parse : + (Lexing.lexbuf -> MI.token) -> + Lexing.lexbuf -> + 'a MI.checkpoint -> + ('a, error) Result.t = + fun get_token (lexbuf : Lexing.lexbuf) (checkpoint : 'a MI.checkpoint) -> + match checkpoint with + | MI.InputNeeded _env -> + let token = get_token lexbuf in + let startp = lexbuf.Lexing.lex_start_p and endp = lexbuf.lex_curr_p in + let checkpoint = MI.offer checkpoint (token, startp, endp) in + _parse get_token lexbuf checkpoint + | MI.Shifting _ | MI.AboutToReduce _ -> + let checkpoint = MI.resume checkpoint in + _parse get_token lexbuf checkpoint + | MI.HandlingError _env -> + let err = get_parse_error lexbuf _env in + Error err + | MI.Accepted v -> Ok v + | MI.Rejected -> + let err = + range_message lexbuf.lex_start_p lexbuf.lex_curr_p InvalidSyntax + in + Error err + + type 'a builder = Lexing.position -> 'a MI.checkpoint + + let of_lexbuf : + Lexing.lexbuf -> + (Lexing.lexbuf -> MI.token) -> + 'a builder -> + ('a, error) result = + fun lexbuf lexer f -> + let init = f lexbuf.lex_curr_p in + _parse lexer lexbuf init +end diff --git a/lib/lexer.mll b/lib/lexer.mll new file mode 100644 index 0000000..4796e62 --- /dev/null +++ b/lib/lexer.mll @@ -0,0 +1,361 @@ +{ + open Tokens + module T = Qsp_syntax.T + + exception UnclosedQuote of { content: string ; line : int} + + (* The comment system is terrible. The same symbol can be used for : + - starting a comment + - inequality operation + In order to manage this, I try to identify the context in a very basic way, + using a flag True False for determining the token to send. + *) + module Bucket = Ephemeron.K1.Bucket + type bucket = (Lexing.lexbuf, int) Bucket.t + let is_expression : bucket = Bucket.make () + + let incr_level lexbuf = + match Bucket.find is_expression lexbuf with + | None -> Bucket.add is_expression lexbuf 1 + | Some v -> Bucket.add is_expression lexbuf (v+1) + + let decr_level lexbuf = + match Bucket.find is_expression lexbuf with + | None -> () + | Some v -> + if v > 1 then + Bucket.add is_expression lexbuf (v-1) + else + Bucket.remove is_expression lexbuf + + let keyword_table = Hashtbl.create 53 + let _ = + List.iter (fun (kwd, tok) -> Hashtbl.add keyword_table kwd tok) + [ "ACT", ACT + ; "ADDLIB", KEYWORD "INCLIB" + ; "ADDOBJ", KEYWORD "ADDOBJ" + ; "ADD OBJ", KEYWORD "ADDOBJ" + ; "ADDQST", KEYWORD "INCLIB" + ; "AND", AND + ; "ARRCOMP", FUNCTION T.Arrcomp + ; "ARRPOS", FUNCTION T.Arrpos + ; "ARRSIZE", FUNCTION T.Arrsize +(* + ; "BACKIMAGE", KEYWORD "BACKIMAGE" + ; "$BACKIMAGE", KEYWORD "BACKIMAGE" + ; "BCOLOR", KEYWORD "BCOLOR" +*) + ; "CLA", KEYWORD "CLA" + ; "CLEAR", KEYWORD "CLEAR" + ; "*CLEAR", KEYWORD "*CLEAR" + ; "CLOSE", KEYWORD "CLOSE" + ; "CLOSE ALL", KEYWORD "CLOSEALL" + ; "CLR", KEYWORD "CLEAR" + ; "*CLR", KEYWORD "*CLEAR" + ; "CLS", KEYWORD "CLS" + ; "CMDCLEAR", KEYWORD "CMDCLEAR" + ; "CMDCLR", KEYWORD "CMDCLEAR" + ; "COPYARR", KEYWORD "COPYARR" + ; "COUNTOBJ", FUNCTION T.Countobj + ; "CURACTS", IDENT "CURACTS" + ; "$CURACTS", IDENT "CURACTS" + ; "CURLOC", IDENT "CURLOC" + ; "$CURLOC", IDENT "CURLOC" +(* + ; "DEBUG", KEYWORD "DEBUG" +*) + ; "DELACT", KEYWORD "DELACT" + ; "DEL ACT", KEYWORD "DELACT" + ; "DELLIB", KEYWORD "FREELIB" + ; "DELOBJ", KEYWORD "DELOBJ" + ; "DEL OBJ", KEYWORD "DELOBJ" + ; "DESC", FUNCTION T.Desc + ; "$DESC", FUNCTION T.Desc' +(* + ; "DISABLESCROLL", KEYWORD "DISABLESCROLL" + ; "DISABLESUBEX", KEYWORD "DISABLESUBEX" +*) + ; "DYNAMIC", KEYWORD "DYNAMIC" + ; "DYNEVAL", FUNCTION T.Dyneval + ; "$DYNEVAL", FUNCTION T.Dyneval' + ; "ELSE", ELSE + ; "ELSEIF", ELIF + ; "END", END + ; "EXEC", KEYWORD "EXEC" + ; "EXIT", KEYWORD "EXIT" +(* + ; "FCOLOR", KEYWORD "FCOLOR" + ; "$FNAME", KEYWORD "$FNAME" +*) + ; "FREELIB", KEYWORD "FREELIB" +(* + ; "FSIZE", KEYWORD "FSIZE" +*) + ; "FUNC", FUNCTION T.Func + ; "$FUNC", FUNCTION T.Func' + ; "GETOBJ", FUNCTION T.Getobj + ; "$GETOBJ", FUNCTION T.Getobj' + ; "GOSUB", KEYWORD "GOSUB" + ; "GOTO", KEYWORD "GOTO" +(* + ; "GC", KEYWORD "GC" +*) + ; "GS", KEYWORD "GOSUB" + ; "GT", KEYWORD "GOTO" + ; "IF", IF + ; "IIF", FUNCTION T.Iif + ; "$IIF", FUNCTION T.Iif' + ; "INCLIB", KEYWORD "INCLIB" + ; "INPUT", FUNCTION T.Input + ; "$INPUT", FUNCTION T.Input' + ; "INSTR", FUNCTION T.Instr + ; "ISNUM", FUNCTION T.Isnum + ; "ISPLAY", FUNCTION T.Isplay + ; "JUMP", KEYWORD "JUMP" + ; "KILLALL", KEYWORD "KILLALL" + ; "KILLOBJ", KEYWORD "KILLOBJ" + ; "KILLQST", KEYWORD "FREELIB" + ; "KILLVAR", KEYWORD "KILLVAR" + ; "LCASE", FUNCTION T.Lcase + ; "$LCASE", FUNCTION T.Lcase' +(* + ; "LCOLOR", KEYWORD "LCOLOR" +*) + ; "LEN", FUNCTION T.Len + ; "LET", LET + ; "LOC", LOC + ; "MAINTXT", IDENT "MAINTXT" + ; "$MAINTXT", IDENT "MAINTXT" + ; "MAX", FUNCTION T.Max + ; "$MAX", FUNCTION T.Max' + ; "MENU", KEYWORD "MENU" + ; "MID", FUNCTION T.Mid + ; "$MID", FUNCTION T.Mid' + ; "MIN", FUNCTION T.Min + ; "$MIN", FUNCTION T.Min' + ; "MOD", MOD + ; "MSECSCOUNT", FUNCTION T.Msecscount + ; "MSG", KEYWORD "MSG" + ; "NL", KEYWORD "NL" + ; "*NL", KEYWORD "*NL" + ; "NO", NO +(* + ; "NOSAVE", KEYWORD "NOSAVE" +*) + ; "OBJ", OBJ + ; "$ONACTSEL", IDENT "$ONACTSEL" + ; "$ONGLOAD", IDENT "$ONGLOAD" + ; "$ONGSAVE", IDENT "$ONGSAVE" + ; "$ONNEWLOC", IDENT "$ONNEWLOC" + ; "$ONOBJADD", IDENT "$ONOBJADD" + ; "$ONOBJDEL", IDENT "$ONOBJDEL" + ; "$ONOBJSEL", IDENT "$ONOBJSEL" + ; "OPENGAME", KEYWORD "OPENGAME" + ; "OPENQST", KEYWORD "OPENQST" + ; "OR", OR + ; "P", KEYWORD "P" + ; "*P", KEYWORD "*P" + ; "PL", KEYWORD "PL" + ; "*PL", KEYWORD "*PL" + ; "PLAY", KEYWORD "PLAY" + ; "QSPVER", FUNCTION T.Qspver + ; "$QSPVER", FUNCTION T.Qspver' + ; "RAND", FUNCTION T.Rand + ; "REFINT", KEYWORD "REFINT" + ; "REPLACE", FUNCTION T.Replace + ; "$REPLACE", FUNCTION T.Replace' + ; "RGB", FUNCTION T.Rgb + ; "RND", FUNCTION T.Rnd + ; "SAVEGAME", KEYWORD "SAVEGAME" + ; "SELACT", FUNCTION T.Selact + ; "$SELACT", IDENT "SELACT" + ; "SELOBJ", IDENT "SELOBJ" + ; "$SELOBJ", IDENT "SELOBJ" + ; "SET", SET + ; "SETTIMER", KEYWORD "SETTIMER" + ; "SHOWACTS", KEYWORD "SHOWACTS" + ; "SHOWINPUT", KEYWORD "SHOWINPUT" + ; "SHOWOBJS", KEYWORD "SHOWOBJS" + ; "SHOWSTAT", KEYWORD "SHOWSTAT" + ; "STATTXT", FUNCTION T.Stattxt + ; "$STATTXT", FUNCTION T.Stattxt' + ; "STR", FUNCTION T.Str + ; "$STR", FUNCTION T.Str' + ; "STRCOMP", FUNCTION T.Strcomp + ; "STRFIND", FUNCTION T.Strfind + ; "$STRFIND", FUNCTION T.Strfind' + ; "STRPOS", FUNCTION T.Strpos + ; "TRIM", FUNCTION T.Trim + ; "$TRIM", FUNCTION T.Trim' + ; "UCASE", FUNCTION T.Ucase + ; "$UCASE", FUNCTION T.Ucase' + ; "UNSEL", KEYWORD "UNSELECT" + ; "UNSELECT", KEYWORD "UNSELECT" + ; "USEHTML", IDENT "USEHTML" + ; "USERCOM", IDENT "USERCOM" + ; "$USERCOM", IDENT "USERCOM" + ; "USER_TEXT", IDENT "USER_TEXT" + ; "$USER_TEXT", IDENT "USER_TEXT" + ; "USRTXT", IDENT "USER_TEXT" + ; "$USRTXT", IDENT "USER_TEXT" + ; "VAL", FUNCTION T.Val + ; "VIEW", KEYWORD "VIEW" + ; "WAIT", KEYWORD "WAIT" + ; "XGOTO", KEYWORD "XGOTO" + ; "XGT", KEYWORD "XGOTO" + ] + + let ident lexbuf id = + let id = String.uppercase_ascii id in + try + let value = Hashtbl.find keyword_table id in + let _ = match value with + | IF | ELIF -> incr_level lexbuf + | _ -> () in + value + + with Not_found -> IDENT id + + let wait_balance rule lexbuf = + try[@warning "-52"] + rule (Buffer.create 17) lexbuf + with + Failure "lexing: empty token" -> + let line = lexbuf.Lexing.lex_curr_p.pos_lnum + and content = Bytes.to_string lexbuf.Lexing.lex_buffer in + raise (UnclosedQuote {line; content}) + [@warning "+52"] +} + +let space = [ ' ' '\t' ] +let coma = ',' +let letters = [^ '!' ':' '&' '=' '<' '>' '+' '-' '*' '/' ',' '"' '\'' '(' ')' '[' ']' ' ' '\t' '\n' '\r' '{' '}'] +let digit = [ '0'-'9' ] +let eol = [ '\r' '\n' ] +let spaces = space+ +let ident = (letters # digit) letters* + +rule token = parse + +| '#' spaces* (('!' | '$' | '#' | '^')+)? (ident as loc) { + Lexing.set_filename lexbuf loc; + LOCATION_START loc} +| (digit+) as l { INTEGER l} +| '+' { PLUS } +| '-' { MINUS } +| "+=" { INCR } +| "-=" { DECR } +| '/' { DIV } +| '*' { STAR } +| ':' { + (* We are leaving the block, the comment will be handled again *) + decr_level lexbuf; + COLUMN } +| '-' '-'+ [ ^ '\r' '\n']* { LOCATION_END } +| '[' { L_BRACKET } +| ']' { R_BRACKET } +| '(' { + incr_level lexbuf; + L_PAREN } +| ')' { + decr_level lexbuf; + R_PAREN } +| '<' { LT } +| '>' { GT } +| coma { COMA } +| eof { + Bucket.remove is_expression lexbuf; + EOF } +| '=' { + incr_level lexbuf; + EQUAL } +| ident as l { ident lexbuf l} +| eol { + Bucket.add is_expression lexbuf 0; + Lexing.new_line lexbuf; EOL } +| '&' { + Bucket.add is_expression lexbuf 0; + AMPERSAND } +| '!' { + match Bucket.find is_expression lexbuf with + | Some i when i <> 0 -> EXCLAMATION + | _ -> skip_comment lexbuf +} +| spaces { token lexbuf } +| '\'' { LITERAL (wait_balance read_quoted_string lexbuf) } +| '"' { LITERAL (wait_balance read_dquoted_string lexbuf) } +| '{' { LITERAL (wait_balance (read_long_string 0) lexbuf) } + +and skip_comment = parse +| [^ '\'' '"' '{' '\r' '\n' ] { skip_comment lexbuf } +| '{' { + let _ = wait_balance (read_long_string 0) lexbuf in + skip_comment lexbuf } +| '\'' { + let _ = wait_balance read_quoted_string lexbuf in + skip_comment lexbuf +} +| '"' { + let _ = wait_balance read_dquoted_string lexbuf in + skip_comment lexbuf +} +| eol { + (* Ugly hack used in order to put the eol in the front of the next + parsing. *) + lexbuf.lex_curr_pos <- lexbuf.lex_curr_pos - 1; + (*Lexing.new_line lexbuf;*) + COMMENT +} + +(* Read the content until we got another one quote *) +and read_quoted_string buf = parse + | "''" + { Buffer.add_char buf '\''; + read_quoted_string buf lexbuf + } + | [^ '\'' '\n' '\r']+ + { Buffer.add_string buf (Lexing.lexeme lexbuf); + read_quoted_string buf lexbuf + } + | '\'' + { (Buffer.contents buf) + } + | ['\n' '\r'] + { Buffer.add_string buf (Lexing.lexeme lexbuf); + Lexing.new_line lexbuf ; + read_quoted_string buf lexbuf + } + +and read_dquoted_string buf = parse + | [^ '"' ]+ + { Buffer.add_string buf (Lexing.lexeme lexbuf); + read_dquoted_string buf lexbuf + } + | "\"\"" + { Buffer.add_char buf '"'; + read_dquoted_string buf lexbuf + } + | '"' + { (Buffer.contents buf) + } + +and read_long_string level buf = parse + | [^ '{' '}' '\r' '\n' ]+ + { Buffer.add_string buf (Lexing.lexeme lexbuf); + read_long_string level buf lexbuf + } + | '{' + { Buffer.add_string buf (Lexing.lexeme lexbuf); + read_long_string (level + 1) buf lexbuf } + | '}' + { match level with + | 0 -> (Buffer.contents buf) + | _ -> Buffer.add_string buf (Lexing.lexeme lexbuf); + read_long_string (level - 1) buf lexbuf + } +| eol +{ + Lexing.new_line lexbuf; + Buffer.add_string buf (Lexing.lexeme lexbuf); + read_long_string level buf lexbuf +} diff --git a/lib/parser.mly b/lib/parser.mly new file mode 100644 index 0000000..c506e9c --- /dev/null +++ b/lib/parser.mly @@ -0,0 +1,91 @@ + +%{ + + + module T = Qsp_syntax.T + + let dummy_pos = (Lexing.dummy_pos, Lexing.dummy_pos) + +%} + +%parameter<Analyzer: Qsp_syntax.S.Analyzer> +%start <Analyzer.Location.repr>main + +%% + +main: + | EOL* + LOCATION_START + EOL+ + expressions = line_statement* + LOCATION_END + EOL* + EOF + { + Analyzer.Location.location $loc expressions + } + +(* All these statement should terminate with EOL *) +line_statement: + | COMMENT EOL+ { Analyzer.Instruction.comment $loc } + | COLUMN i=IDENT EOL* { Analyzer.Instruction.location $loc i } + | s = terminated(instruction, line_sep) + | s = terminated(inline_action, line_sep) + { s } + | a = action_bloc(IF, elif_else_body) + { let loc, expression, statements, loc_s, body = a in + let elifs, else_ = match body with + | None -> [], [] + | Some (elifs, else_) -> (elifs, else_) + in + Analyzer.Instruction.if_ + loc + (loc_s, expression, statements) + ~elifs + ~else_ + } + | a = action_bloc(ACT, empty_body) + { let loc, label, statements, _, _ = a in + Analyzer.Instruction.act loc ~label statements + } + +(** Represent an instruction which can either be on a single line, + or created in a block until an END + *) +%inline action_bloc(TOKEN, BODY): + | TOKEN + e = expression + COLUMN EOL+ + s = line_statement* + b = BODY + END TOKEN? + line_sep + { $loc, e, s, $loc(s), b } + +empty_body: + | { None } + +elif: + | ELIF + e = expression + COLUMN EOL+ + s = line_statement* + { $loc, e, s } + +else_: + | ELSE EOL+ + expressions = line_statement* + { expressions } + | { [] } + + +elif_else_body: + | elifs = elif* + else_ = else_ + { Some (elifs, else_) } + + +%inline line_sep: + | EOL+ + | AMPERSAND+ EOL* + {} diff --git a/lib/qsp_expression.mly b/lib/qsp_expression.mly new file mode 100644 index 0000000..07da032 --- /dev/null +++ b/lib/qsp_expression.mly @@ -0,0 +1,88 @@ +(* %start <(Elements.pos) Elements.exppression>expression *) + +%% + +%public arguments(X): + (** This rule allow the difference between elements with a single argument + (when the separator is required) which allow to write a spectif case when + we only have one element. + *) + | hd = X + COMA + tl = separated_nonempty_list(COMA, X) + { hd :: tl } + (** The case where we have nothing is easy to manage here *) + | + { [] } + (** The remaining case (only one argument) is handled outside of this + block: if we have a single argument we don’t have to bother with the + paren, they belongs to the expression. + *) + +argument(X): + | a = delimited(L_PAREN, arguments(X), R_PAREN) { a } + | a = X { [ a ] } + +(** Declare an expression *) +%public expression: + | ex = delimited(L_PAREN, expression, R_PAREN) + { ex } + | op = unary_operator + expr = expression + { Analyzer.Expression.uoperator $loc op expr } + %prec NO + | + expr1 = expression + op = binary_operator + expr2 = expression + { Analyzer.Expression.boperator $loc op expr1 expr2 } + %prec EQUAL + | v = LITERAL { Analyzer.Expression.literal $loc v } + | i = INTEGER { Analyzer.Expression.integer $loc i } + | v = variable { Analyzer.Expression.ident v } + %prec p_variable + | k = FUNCTION + arg = argument(expression) + { + (Analyzer.Expression.function_ $loc k arg) + } + +unary_operator: + | OBJ + | LOC + | NO { T.No } + | MINUS { T.Neg } + | PLUS { T.Add } + +%inline binary_operator: + | EQUAL { T.Eq } + | LT GT { T.Neq } + | EXCLAMATION { T.Neq } + | PLUS { T.Plus } + | MINUS { T.Minus } + | STAR { T.Product } + | DIV { T.Div } + | MOD { T.Mod } + | GT { T.Gt } + | LT { T.Lt } + | GT EQUAL { T.Gte } + | LT EQUAL { T.Lte } + | EQUAL GT { T.Gte } + | EQUAL LT { T.Lte } + | AND { T.And } + | OR { T.Or } + +(** Declare a variable, either in the assignation (let var = …) or as a + reference is an expression + *) +%public variable: + | name = IDENT + brackets = delimited(L_BRACKET, expression?, R_BRACKET)? + { + let index = match brackets with + | None -> + (* No declaration, consider index at 0 *) + Some (Analyzer.Expression.integer dummy_pos "0") + | Some other -> other in + Analyzer.Expression.{ pos = $loc ; name ; index } + } diff --git a/lib/qsp_instruction.mly b/lib/qsp_instruction.mly new file mode 100644 index 0000000..cfc6124 --- /dev/null +++ b/lib/qsp_instruction.mly @@ -0,0 +1,93 @@ +%% + +optionnal_delimited(opening, X, closing): + | v = delimited(opening, X, closing) { v } + | v = X { v } + +argument(X): + | a = optionnal_delimited(L_PAREN, arguments(X), R_PAREN) { a } + | a = X { [ a ] } + +(** At the opposite of an expression, an instruction does not return anything. *) +%public instruction: + | s = single_instruction { s } + +(** Action like act or if in a single line *) +%public inline_action: + | a = onliner(ACT) + { let loc, label, statements, _, _ = a in + Analyzer.Instruction.act loc ~label statements + } + | a = onliner(IF) + else_opt = preceded(ELSE, instruction)? + { let loc, expression, statements, loc_s, _body = a in + let elifs = [] + and else_ = Option.to_list else_opt in + Analyzer.Instruction.if_ + loc + (loc_s, expression, statements) + ~elifs + ~else_ + } + +single_instruction: + | expr = expression + { + Analyzer.Instruction.expression expr + } + | e = let_assignation { e } + | k = keyword + arg = argument(expression) + { + Analyzer.Instruction.call $loc k arg + } + +keyword: + | STAR k = KEYWORD { "*" ^ k } + | k = KEYWORD { k } + +let_assignation: + | assignation + variable = variable + op = assignation_operator + value = expression + { + Analyzer.Instruction.assign $loc variable op value + } + +%inline assignation: + | + | LET + | SET {} + +assignation_operator: + | EQUAL { T.Eq' } + | INCR { T.Inc } + | DECR { T.Decr } + +inline_instruction: + | hd = inline_instruction + tl = single_instruction + AMPERSAND+ + { tl :: hd } + | + { [] } + +final_inline_instruction: + | hd = inline_instruction + tl = instruction + | hd = inline_instruction + tl = inline_action + { tl :: hd } + | hd = inline_instruction + COMMENT + { (Analyzer.Instruction.comment $loc) :: hd } + | hd = inline_instruction + { hd } + +onliner(TOKEN): + | TOKEN + e = expression + COLUMN + s = rev (final_inline_instruction) + { $loc, e, s, $loc(s), None } diff --git a/lib/tokens.mly b/lib/tokens.mly new file mode 100644 index 0000000..7f907a3 --- /dev/null +++ b/lib/tokens.mly @@ -0,0 +1,70 @@ +%token <string>LOCATION_START +%token LOCATION_END + +%token PLUS +%token MINUS +%token INCR DECR +%token STAR +%token DIV +%token MOD + +%token AMPERSAND +%token COMA +%token EQUAL +%token COLUMN +%token L_BRACKET R_BRACKET +%token L_PAREN R_PAREN +%token LT GT +%token EXCLAMATION +%token AND OR + +%token EOF +%token EOL + +%token <string>IDENT +%token <string>LITERAL +%token <string>INTEGER + +%token COMMENT + +%token ACT +%token IF +%token ELSE +%token ELIF +%token END +%token LET +%token SET +%token OBJ +%token LOC +%token NO +%token <string>KEYWORD +%token <Qsp_syntax.T.function_>FUNCTION + +(* +(b) if the token was declared left-associative, then the conflict is resolved +in favor of reduction; + +(c) if the token was declared right-associative, then the conflict is resolved +in favor of shifting. + *) + +(* Exclamation should have the lower priority because the comments shall never + take place of the statements + *) +%right EXCLAMATION +%right NO +(* The priority for the variable should be lower than the equality priority + if I want to allow declare new variables *) +%nonassoc p_variable +%left AND OR +%right EQUAL GT LT GTE LTE +%left PLUS MINUS +%left STAR DIV +%left MOD +%left FUNCTION +%left L_PAREN +%right R_PAREN +%left COMA +%left KEYWORD + +%% diff --git a/syntax/S.ml b/syntax/S.ml new file mode 100644 index 0000000..3873eed --- /dev/null +++ b/syntax/S.ml @@ -0,0 +1,91 @@ +(** + This module describe the type an analyzer must implement in order to be + used with the parser. + + The module is divided in three modules : + - Expression : the finest part of the QSP syntax. + - Instruction : if/act block, + - Location + + All the elements of the syntax are represented with a dedicated function + (instead of a big sum type). The module [Tree] provide an implementation + which build the AST. + + *) + +type pos = Lexing.position * Lexing.position +type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option } + +(** Represent the evaluation over an expression *) +module type Expression = sig + type 'a obs + type repr + + type variable = { pos : pos; name : string; index : repr option } + (** + Describe a variable, using the name in capitalized text, and an optionnal + index. + + If missing, the index should be considered as [0]. + *) + + val ident : variable -> repr + + (* + Basic values, text, number… + *) + + val integer : pos -> string -> repr + val literal : pos -> string -> repr + + val function_ : pos -> T.function_ -> repr list -> repr + (** Call a function. The functions list is hardcoded in lib/lexer.mll *) + + val uoperator : pos -> T.uoperator -> repr -> repr + (** Unary operator like [-123] or [+'Text']*) + + val boperator : pos -> T.boperator -> repr -> repr -> repr + (** Binary operator, for a comparaison, or an operation *) +end + +module type Instruction = sig + type repr + type expression + type variable + + val call : pos -> string -> expression list -> repr + (** Call for an instruction like [GT] or [*CLR] *) + + val location : pos -> string -> repr + (** Label for a loop *) + + val comment : pos -> repr + (** Comment *) + + val expression : expression -> repr + (** Raw expression *) + + type clause = pos * expression * repr list + + val if_ : pos -> clause -> elifs:clause list -> else_:repr list -> repr + val act : pos -> label:expression -> repr list -> repr + val assign : pos -> variable -> T.assignation_operator -> expression -> repr +end + +module type Location = sig + type repr + type instruction + + val location : pos -> instruction list -> repr +end + +module type Analyzer = sig + module Expression : Expression + + module Instruction : + Instruction + with type expression = Expression.repr + and type variable = Expression.variable + + module Location : Location with type instruction = Instruction.repr +end diff --git a/syntax/dune b/syntax/dune new file mode 100644 index 0000000..8188de8 --- /dev/null +++ b/syntax/dune @@ -0,0 +1,6 @@ +(library + (name qsp_syntax) + + (preprocess (pps + ppx_deriving.show + ppx_deriving.eq ))) diff --git a/syntax/t.ml b/syntax/t.ml new file mode 100644 index 0000000..12be4b4 --- /dev/null +++ b/syntax/t.ml @@ -0,0 +1,77 @@ +(** + This module contains the basic operators used in the QSP syntax. + *) + +type boperator = + | Eq + | Neq + | Plus + | Minus + | Product + | Div + | Gt + | Lt + | Gte + | Lte + | And + | Or + | Mod +[@@deriving eq, show] + +and uoperator = No | Neg | Add [@@deriving eq, show] + +and assignation_operator = Eq' | Inc (** += *) | Decr (** -= *) +[@@deriving eq, show] + +type function_ = + | Arrcomp + | Arrpos + | Arrsize + | Countobj + | Desc + | Desc' + | Dyneval + | Dyneval' + | Func + | Func' + | Getobj + | Getobj' + | Iif + | Iif' + | Input + | Input' + | Instr + | Isnum + | Isplay + | Lcase + | Lcase' + | Len + | Max + | Max' + | Mid + | Mid' + | Min + | Min' + | Msecscount + | Qspver + | Qspver' + | Rand + | Replace + | Replace' + | Rgb + | Rnd + | Selact + | Stattxt + | Stattxt' + | Str + | Str' + | Strcomp + | Strfind + | Strfind' + | Strpos + | Trim + | Trim' + | Ucase + | Ucase' + | Val +[@@deriving eq, show] diff --git a/syntax/tree.ml b/syntax/tree.ml new file mode 100644 index 0000000..bb31253 --- /dev/null +++ b/syntax/tree.ml @@ -0,0 +1,95 @@ +type pos = Lexing.position * Lexing.position + +module Ast = struct + type nonrec pos = pos + + type 'a variable = { pos : 'a; name : string; index : 'a expression option } + [@@deriving eq, show] + + and 'a expression = + | Integer of 'a * string + | Literal of 'a * string + | Ident of 'a variable + | BinaryOp of 'a * T.boperator * 'a expression * 'a expression + | Op of 'a * T.uoperator * 'a expression + | Function of 'a * T.function_ * 'a expression list + [@@deriving eq, show] + + and 'a condition = 'a * 'a expression * 'a statement list + + and 'a statement = + | If of { + loc : 'a; + then_ : 'a condition; + elifs : 'a condition list; + else_ : 'a statement list; + } + | Act of { loc : 'a; label : 'a expression; statements : 'a statement list } + | Declaration of ('a * 'a variable * T.assignation_operator * 'a expression) + | Expression of 'a expression + | Comment of 'a + | Call of 'a * string * 'a expression list + | Location of 'a * string + [@@deriving eq, show] +end + +(** Default implementation for the expression *) +module Expression : S.Expression with type repr = pos Ast.expression = struct + type 'a obs + type repr = pos Ast.expression + type variable = { pos : pos; name : string; index : repr option } + + let integer : pos -> string -> repr = fun pos i -> Ast.Integer (pos, i) + let literal : pos -> string -> repr = fun pos l -> Ast.Literal (pos, l) + + let function_ : pos -> T.function_ -> repr list -> repr = + fun pos name args -> Ast.Function (pos, name, args) + + let uoperator : pos -> T.uoperator -> repr -> repr = + fun pos op expression -> Ast.Op (pos, op, expression) + + let boperator : pos -> T.boperator -> repr -> repr -> repr = + fun pos op op1 op2 -> Ast.BinaryOp (pos, op, op1, op2) + + let ident : variable -> repr = + fun { pos; name; index } -> Ast.Ident { pos; name; index } +end + +module Instruction : + S.Instruction + with type expression = Expression.repr + and type repr = pos Ast.statement + and type variable = Expression.variable = struct + type repr = pos Ast.statement + type expression = Expression.repr + type variable = Expression.variable + + let call : pos -> string -> expression list -> repr = + fun pos name args -> Ast.Call (pos, name, args) + + let location : pos -> string -> repr = + fun loc label -> Ast.Location (loc, label) + + let comment : pos -> repr = fun pos -> Ast.Comment pos + let expression : expression -> repr = fun expr -> Ast.Expression expr + + type clause = pos * expression * repr list + + let if_ : pos -> clause -> elifs:clause list -> else_:repr list -> repr = + fun pos predicate ~elifs ~else_ -> + Ast.If { loc = pos; then_ = predicate; elifs; else_ } + + let act : pos -> label:expression -> repr list -> repr = + fun pos ~label statements -> Ast.Act { loc = pos; label; statements } + + let assign : pos -> variable -> T.assignation_operator -> expression -> repr = + fun pos_loc { pos; name; index } op expr -> + Ast.Declaration (pos_loc, { pos; name; index }, op, expr) +end + +module Location = struct + type instruction = pos Ast.statement + type repr = pos * instruction list + + let location : pos -> instruction list -> repr = fun pos block -> (pos, block) +end diff --git a/syntax/tree.mli b/syntax/tree.mli new file mode 100644 index 0000000..ca5a639 --- /dev/null +++ b/syntax/tree.mli @@ -0,0 +1,51 @@ +(** + Implementation for S.Analyzer for building a complete Ast. + + Used in the unit test in order to check if the grammar is interpreted as + expected, not really usefull over a big qsp. + *) + +(** This module is the result of the evaluation. *) +module Ast : sig + type pos = Lexing.position * Lexing.position + + type 'a variable = { pos : 'a; name : string; index : 'a expression option } + [@@deriving eq, show] + (** A variable, used both in an expression (reference) or in a statement + (assignation) *) + + and 'a expression = + | Integer of 'a * string + | Literal of 'a * string + | Ident of 'a variable + | BinaryOp of 'a * T.boperator * 'a expression * 'a expression + | Op of 'a * T.uoperator * 'a expression + | Function of 'a * T.function_ * 'a expression list + [@@deriving eq, show] + + and 'a condition = 'a * 'a expression * 'a statement list + (** A condition in if or elseif statement *) + + and 'a statement = + | If of { + loc : 'a; + then_ : 'a condition; + elifs : 'a condition list; + else_ : 'a statement list; + } + | Act of { loc : 'a; label : 'a expression; statements : 'a statement list } + | Declaration of ('a * 'a variable * T.assignation_operator * 'a expression) + | Expression of 'a expression + | Comment of 'a + | Call of 'a * string * 'a expression list + | Location of 'a * string + [@@deriving eq, show] +end + +(** / **) + +include + S.Analyzer + with type Expression.repr = Ast.pos Ast.expression + and type Instruction.repr = Ast.pos Ast.statement + and type Location.repr = Ast.pos * Ast.pos Ast.statement list diff --git a/test/dune b/test/dune new file mode 100644 index 0000000..a01215d --- /dev/null +++ b/test/dune @@ -0,0 +1,11 @@ +(test + (name qsp_parser_test) + (libraries + alcotest + qsp_parser + qsp_syntax + ) + (preprocess (pps + ppx_deriving.show + ppx_deriving.eq )) + ) diff --git a/test/qsp_parser_test.ml b/test/qsp_parser_test.ml new file mode 100644 index 0000000..4665737 --- /dev/null +++ b/test/qsp_parser_test.ml @@ -0,0 +1,727 @@ +module Parser = Qsp_parser.Parser.Make (Qsp_syntax.Tree) +module Ast = Qsp_syntax.Tree.Ast +module T = Ast + +let _position = (Lexing.dummy_pos, Lexing.dummy_pos) + +type 'a location = 'a * 'a Ast.statement list [@@deriving eq, show] + +let parse : string -> T.pos location = + fun content -> + let lexing = Lexing.from_string content in + Parser.main Qsp_parser.Lexer.token lexing + +let location : T.pos location Alcotest.testable = + let equal = equal_location (fun _ _ -> true) in + let pp = + pp_location (fun formater _ -> Format.fprintf formater "_position") + in + Alcotest.testable pp equal + +let test_empty_location () = + let expected = (_position, []) + and actual = parse {|# Location +------- |} + and msg = "Empty location" in + + Alcotest.(check' location ~msg ~expected ~actual) + +let test_location_without_database () = + let expected = (_position, []) + and actual = parse {|# $Location +------- |} + and msg = "Location without database" in + + let () = Alcotest.(check' location ~msg ~expected ~actual) in + + let actual = parse {|# !Location +------- |} in + let () = Alcotest.(check' location ~msg ~expected ~actual) in + + let actual = parse {|# ^Location +------- |} in + Alcotest.(check' location ~msg ~expected ~actual) + +let _test_instruction : string -> Ast.pos Ast.statement list -> unit = + fun literal expected -> + let expected = (_position, expected) + and _location = Printf.sprintf {|# Location +%s +------- |} literal in + let actual = parse _location and msg = literal in + + Alcotest.(check' location ~msg ~expected ~actual) + +let test_numeric_expression () = + _test_instruction "123" [ Expression (Integer (_position, "123")) ] + +let test_negative_numeric_expression () = + _test_instruction "-123" + [ Expression (Op (_position, Neg, Integer (_position, "123"))) ] + +let test_negative_numeric_expression2 () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "CURTIMESUN"; index } in + _test_instruction "-(780-CurTimeSun)" + Ast. + [ + Expression + (Op + ( _position, + Neg, + BinaryOp (_position, Minus, Integer (_position, "780"), Ident var) + )); + ] + +let test_str_variable () = + let index = Some T.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "$VALUE"; index } in + _test_instruction "$value" [ Expression (Ident var) ] + +let test_variable () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "VALUE"; index } in + _test_instruction "value" [ Expression (Ident var) ] + +let test_indexed_variable () = + let index = Some Ast.(Integer (_position, "1")) in + let var = { Ast.pos = _position; name = "VALUE"; index } in + _test_instruction "value[1]" [ Expression (Ident var) ] + +let test_let_literal () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "VALUE"; index } in + _test_instruction "let value = '123'" + Ast.[ Declaration (_position, var, Eq', Literal (_position, "123")) ] + +let test_set_array_append () = + let var = { Ast.pos = _position; name = "$VALUE"; index = None } in + _test_instruction "set $value[] = ''" + Ast.[ Declaration (_position, var, Eq', Literal (_position, "")) ] + +let test_direct_assignation () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { T.pos = _position; name = "VALUE"; index } in + _test_instruction "value = '123'" + Ast.[ Declaration (_position, var, Eq', Literal (_position, "123")) ] + +let test_command_assignation () = + let index = Some Ast.(Integer (_position, "0")) in + let st_1 = { Ast.pos = _position; name = "ST_1"; index } in + _test_instruction "st_1 = input 'Enter the amount'" + Ast. + [ + Declaration + ( _position, + st_1, + Eq', + Function + (_position, Input, [ Literal (_position, "Enter the amount") ]) ); + ] + +let test_assignation2 () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "VALUE"; index } in + _test_instruction "set value += 123" + Ast.[ Declaration (_position, var, Inc, Integer (_position, "123")) ] + +let test_multilie_literal () = + let index = Some Ast.(Integer (_position, "0")) in + let var = { Ast.pos = _position; name = "VALUE"; index } in + _test_instruction {| + value = { +$a = '123' +}|} + Ast. + [ + Declaration (_position, var, Eq', Literal (_position, "\n$a = '123'\n")); + ] + +let test_nested_literal () = + _test_instruction + {| + value = { + + { + + } +}|} + [ + Ast.Declaration + ( _position, + { + Ast.pos = _position; + name = "VALUE"; + index = Some (Ast.Integer (_position, "0")); + }, + Qsp_syntax.T.Eq', + Ast.Literal (_position, "\n\n {\n\n }\n") ); + ] + +let test_concat_literal () = + _test_instruction {| + '123' + +'456' +|} + [ + Ast.Expression (Ast.Literal (_position, "123")); + Ast.Expression + (Ast.Op (_position, Qsp_syntax.T.Add, Ast.Literal (_position, "456"))); + ] + +let test_literal () = + _test_instruction "'123'" [ Expression (Literal (_position, "123")) ] + +let test_qutoted_literal () = + _test_instruction "'12''3'" [ Expression (Literal (_position, "12'3")) ] + +let test_multiline1 () = + let content = {| +apples = 5 +pears = 10 +|} in + + let index = Some Ast.(Integer (_position, "0")) in + let apples = { Ast.pos = _position; name = "APPLES"; index } + and pears = { Ast.pos = _position; name = "PEARS"; index } + and value_5 = Ast.Integer (_position, "5") + and value_10 = Ast.Integer (_position, "10") in + _test_instruction content + Ast. + [ + Declaration (_position, apples, Eq', value_5); + Declaration (_position, pears, Eq', value_10); + ] + +let test_multiline2 () = + let content = "apples = 5 & pears = 10" in + + let index = Some Ast.(Integer (_position, "0")) in + let apples = { Ast.pos = _position; name = "APPLES"; index } + and pears = { Ast.pos = _position; name = "PEARS"; index } + and value_5 = Ast.Integer (_position, "5") + and value_10 = Ast.Integer (_position, "10") in + _test_instruction content + [ + Declaration (_position, apples, Eq', value_5); + Declaration (_position, pears, Eq', value_10); + ] + +let test_equality () = + let content = "apples = 5 = pears" in + let index = Some Ast.(Integer (_position, "0")) in + let apples = { Ast.pos = _position; name = "APPLES"; index } + and pears = { Ast.pos = _position; name = "PEARS"; index } + and value_5 = Ast.Integer (_position, "5") in + _test_instruction content + [ + Declaration + (_position, apples, Eq', BinaryOp (_position, Eq, value_5, Ident pears)); + ] + +let test_plus () = + let content = {| +apples = 5 + pears +|} in + let index = Some Ast.(Integer (_position, "0")) in + let apples = { Ast.pos = _position; name = "APPLES"; index } + and pears = { Ast.pos = _position; name = "PEARS"; index } + and value_5 = Ast.Integer (_position, "5") in + _test_instruction content + [ + Declaration + ( _position, + apples, + Eq', + BinaryOp (_position, Plus, value_5, Ident pears) ); + ] + +let test_plus_litt () = + let content = {| +'five'+ pears +|} in + let index = Some Ast.(Integer (_position, "0")) in + let pears = { Ast.pos = _position; name = "PEARS"; index } in + _test_instruction content + [ + Ast.( + Expression + (BinaryOp (_position, Plus, Literal (_position, "five"), Ident pears))); + ] + +let test_concat () = + let content = {| +$firstName + ' ' + $lastName +|} in + let index = Some Ast.(Integer (_position, "0")) in + let firstname = { Ast.pos = _position; name = "$FIRSTNAME"; index } + and lastName = { Ast.pos = _position; name = "$LASTNAME"; index } + and space = Ast.Literal (_position, " ") in + _test_instruction content + [ + Expression + (BinaryOp + ( _position, + Plus, + Ident firstname, + BinaryOp (_position, Plus, space, Ident lastName) )); + ] + +let test_comment () = _test_instruction "! Comment" [ Comment _position ] + +let test_comment2 () = + let index = Some Ast.(Integer (_position, "0")) in + let a = { Ast.pos = _position; name = "A"; index } + and value_0 = Ast.Integer (_position, "0") in + _test_instruction "a = 0 &! Comment" + Ast.[ Declaration (_position, a, Eq', value_0); Comment _position ] + +let test_comment3 () = _test_instruction {|!!1234 + |} [ Comment _position ] + +(** The exclamation mark here is an operation and not a comment *) +let test_comment4 () = + let index = Some Ast.(Integer (_position, "0")) in + let a = { Ast.pos = _position; name = "A"; index } + and value_0 = Ast.Integer (_position, "0") in + _test_instruction "a = rand(0, 1) ! 0" + [ + Ast.( + Declaration + ( _position, + a, + Eq', + BinaryOp + ( _position, + Neq, + Function + ( _position, + Rand, + [ Integer (_position, "0"); Integer (_position, "1") ] ), + value_0 ) )); + ] + +let test_comment5 () = + _test_instruction "a = rand() &! Comment" + [ + Ast.Declaration + ( _position, + { + Ast.pos = _position; + name = "A"; + index = Some (Ast.Integer (_position, "0")); + }, + Qsp_syntax.T.Eq', + Ast.Function (_position, Rand, []) ); + Ast.Comment _position; + ] + +let test_comment6 () = + _test_instruction + "gs 'stat' &!! It should be here, because some of the strigs have to be \ + initialized" + [ + Ast.Call (_position, "GOSUB", [ Ast.Literal (_position, "stat") ]); + Ast.Comment _position; + ] + +let test_long_comment () = + _test_instruction + {| !'this part of the comment is inside +single quotes' but "this is still part +of the same comment because sometimes +life is unfair." Oh yeah, {curly brackets +also count}. This is still the same comment. |} + [ Comment _position ] + +(** This test ensure that the unary operator is applied to the whole expression + *) +let test_precedence () = + let index = Some Ast.(Integer (_position, "0")) in + let x = Ast.Ident { Ast.pos = _position; name = "X"; index } + and y = Ast.Ident { Ast.pos = _position; name = "Y"; index } in + _test_instruction "no x = y" + Ast.[ Expression (Op (_position, No, BinaryOp (_position, Eq, x, y))) ] + +(** This test ensure that a ! is not considered as a comment in an + expression *) +let test_precedence2 () = + let index = Some Ast.(Integer (_position, "0")) in + let x = { Ast.pos = _position; name = "X"; index } + and y = Ast.Ident { Ast.pos = _position; name = "Y"; index } in + _test_instruction "x = y ! 0" + Ast. + [ + Declaration + ( _position, + x, + Eq', + BinaryOp (_position, Neq, y, Integer (_position, "0")) ); + ] + +let test_if () = + let index = Some Ast.(Integer (_position, "0")) in + let args = Ast.(Ident { pos = _position; name = "$ARGS"; index }) + and expr1 = Ast.(Literal (_position, "blockA")) + and expr2 = Ast.(Expression (Literal (_position, "You are in block A"))) in + _test_instruction {| if $ARGS[0] = 'blockA': + 'You are in block A' +end |} + Ast. + [ + If + { + loc = _position; + then_ = (_position, BinaryOp (_position, Eq, args, expr1), [ expr2 ]); + elifs = []; + else_ = []; + }; + ] + +let test_if2 () = + let index = Some Ast.(Integer (_position, "0")) in + let args = Ast.(Ident { pos = _position; name = "$ARGS"; index }) + and expr1 = Ast.(Literal (_position, "blockA")) + and expr2 = Ast.(Expression (Literal (_position, "You are in block A"))) in + _test_instruction {| if $ARGS[0] = 'blockA': + 'You are in block A' +end if|} + Ast. + [ + If + { + loc = _position; + then_ = (_position, BinaryOp (_position, Eq, args, expr1), [ expr2 ]); + elifs = []; + else_ = []; + }; + ] + +let test_if_chained () = + let value_0 = Ast.Integer (_position, "0") in + _test_instruction {| if 0: + 0 +end &! -- |} + Ast. + [ + If + { + loc = _position; + then_ = (_position, value_0, [ Expression value_0 ]); + elifs = []; + else_ = []; + }; + Comment _position; + ] + +let test_if_equality () = + _test_instruction {| +if 0 = 0: +end &! -- +|} + [ + Ast.If + { + loc = _position; + then_ = + ( _position, + Ast.BinaryOp + ( _position, + Qsp_syntax.T.Eq, + Ast.Integer (_position, "0"), + Ast.Integer (_position, "0") ), + [] ); + elifs = []; + else_ = []; + }; + Ast.Comment _position; + ] + +let test_if_inline () = + let value_0 = Ast.Integer (_position, "0") in + _test_instruction "if 0: 0 else 0" + Ast. + [ + If + { + loc = _position; + then_ = (_position, value_0, [ Expression value_0 ]); + elifs = []; + else_ = [ Expression value_0 ]; + }; + ] + +let test_if_inline_comment () = + let value_0 = Ast.Integer (_position, "0") in + _test_instruction "if 0: 0 else 0 &! comment " + Ast. + [ + If + { + loc = _position; + then_ = (_position, value_0, [ Expression value_0 ]); + elifs = []; + else_ = [ Expression value_0 ]; + }; + Comment _position; + ] + +let test_if_inline_comment2 () = + _test_instruction "if 0: 1 & !! Comment" + [ + Ast.If + { + loc = _position; + then_ = + ( _position, + Ast.Integer (_position, "0"), + [ + Ast.Expression (Ast.Integer (_position, "1")); + Ast.Comment _position; + ] ); + elifs = []; + else_ = []; + }; + ] + +let test_if_inline_act () = + _test_instruction "if 1 and hour >= 8: minut += 1 & act 'go': gt 'go'" + [ + Ast.If + { + loc = _position; + then_ = + ( _position, + Ast.BinaryOp + ( _position, + Qsp_syntax.T.And, + Ast.Integer (_position, "1"), + Ast.BinaryOp + ( _position, + Qsp_syntax.T.Gte, + Ast.Ident + { + Ast.pos = _position; + name = "HOUR"; + index = Some (Ast.Integer (_position, "0")); + }, + Ast.Integer (_position, "8") ) ), + [ + Ast.Declaration + ( _position, + { + Ast.pos = _position; + name = "MINUT"; + index = Some (Ast.Integer (_position, "0")); + }, + Qsp_syntax.T.Inc, + Ast.Integer (_position, "1") ); + Ast.Act + { + loc = _position; + label = Ast.Literal (_position, "go"); + statements = + [ + Ast.Call + (_position, "GOTO", [ Ast.Literal (_position, "go") ]); + ]; + }; + ] ); + elifs = []; + else_ = []; + }; + ] + +let test_if_inline_act2 () = + _test_instruction "if 1: act 'go': gt 'go' &! comment " + [ + Ast.If + { + loc = _position; + then_ = + ( _position, + Ast.Integer (_position, "1"), + [ + Ast.Act + { + loc = _position; + label = Ast.Literal (_position, "go"); + statements = + [ + Ast.Call + (_position, "GOTO", [ Ast.Literal (_position, "go") ]); + Ast.Comment _position; + ]; + }; + ] ); + elifs = []; + else_ = []; + }; + ] + +let test_precedence3 () = + let index = Some Ast.(Integer (_position, "0")) in + let args = Ast.(Ident { pos = _position; name = "$ARGS"; index }) + and expr1 = Ast.(Literal (_position, "blockA")) + and expr2 = Ast.(Expression (Literal (_position, "You are in block A"))) + and expr3 = Ast.(Expression (Integer (_position, "0"))) in + _test_instruction {| if $ARGS[0] = 'blockA': 'You are in block A' & 0|} + Ast. + [ + If + { + loc = _position; + then_ = + ( _position, + BinaryOp (_position, Eq, args, expr1), + [ expr2; expr3 ] ); + elifs = []; + else_ = []; + }; + ] + +let test_gs () = + _test_instruction "gs '123'" + [ Ast.(Call (_position, "GOSUB", [ Literal (_position, "123") ])) ] + +let test_gt () = + _test_instruction "gt $curloc" + [ + Ast.Call + ( _position, + "GOTO", + [ + Ast.Ident + { + Ast.pos = _position; + name = "CURLOC"; + index = Some (Ast.Integer (_position, "0")); + }; + ] ); + ] + +let test_nl () = + _test_instruction "*NL 'It'" + [ Ast.Call (_position, "*NL", [ Ast.Literal (_position, "It") ]) ] + +let test_function () = + _test_instruction "iif(123, 1, 0)" + [ + Ast.( + Expression + (Function + ( _position, + Iif, + [ + Integer (_position, "123"); + Integer (_position, "1"); + Integer (_position, "0"); + ] ))); + ] + +(** Include a space before the parameters *) +let test_function2 () = + _test_instruction "rand (0, 1)" + [ + Ast.( + Expression + (Function + ( _position, + Rand, + [ Integer (_position, "0"); Integer (_position, "1") ] ))); + ] + +let test_precedence4 () = + _test_instruction "trim()" Ast.[ Expression (Function (_position, Trim, [])) ] + +(** This should not be a keyword without arguments, followed by an expression *) +let test_precedence5 () = + _test_instruction "clear()" Ast.[ Call (_position, "CLEAR", []) ] + +(** An identifier cannot start by a number *0 is a product and not an + identifier *) +let test_operator () = + let index = Some Ast.(Integer (_position, "0")) in + let a = { Ast.pos = _position; name = "A"; index } + and value_0 = Ast.Integer (_position, "0") in + _test_instruction "a *0" + Ast.[ Expression (BinaryOp (_position, Product, Ident a, value_0)) ] + +let test_operator2 () = + let value_0 = Ast.Integer (_position, "0") in + _test_instruction "0 *rand()" + Ast. + [ + Expression + (BinaryOp (_position, Product, value_0, Function (_position, Rand, []))); + ] + +let test_dyneval () = + _test_instruction "dyneval ''" + [ + Ast.Expression + (Ast.Function (_position, Dyneval, [ Ast.Literal (_position, "") ])); + ] + +let syntax = + ( "Syntax", + [ + Alcotest.test_case "Location" `Quick test_empty_location; + Alcotest.test_case "Location" `Quick test_location_without_database; + Alcotest.test_case " Numeric expression" `Quick test_numeric_expression; + Alcotest.test_case "-Numeric expression" `Quick + test_negative_numeric_expression; + Alcotest.test_case "-Numeric expression2" `Quick + test_negative_numeric_expression2; + Alcotest.test_case "$Variable expression" `Quick test_str_variable; + Alcotest.test_case " Variable expression" `Quick test_variable; + Alcotest.test_case "Indexed Variable expression" `Quick + test_indexed_variable; + Alcotest.test_case "Let instruction" `Quick test_let_literal; + Alcotest.test_case "Set array_append" `Quick test_set_array_append; + Alcotest.test_case "Variable_assignation" `Quick test_direct_assignation; + Alcotest.test_case "Command assignation" `Quick test_command_assignation; + Alcotest.test_case "Variable_assignation2" `Quick test_assignation2; + Alcotest.test_case "Literal" `Quick test_literal; + Alcotest.test_case "Literal2" `Quick test_qutoted_literal; + Alcotest.test_case "Literal3" `Quick test_multilie_literal; + Alcotest.test_case "Concat Literal" `Quick test_concat_literal; + Alcotest.test_case "Nested Literal" `Quick test_nested_literal; + Alcotest.test_case "Multiline1" `Quick test_multiline1; + Alcotest.test_case "Multiline2" `Quick test_multiline2; + Alcotest.test_case "Equality" `Quick test_equality; + Alcotest.test_case "Plus" `Quick test_plus; + Alcotest.test_case "Plus_litt" `Quick test_plus_litt; + Alcotest.test_case "PlusChained" `Quick test_concat; + Alcotest.test_case "Comment" `Quick test_comment; + Alcotest.test_case "Comment2" `Quick test_comment2; + Alcotest.test_case "Comment3" `Quick test_comment3; + Alcotest.test_case "Comment4" `Quick test_comment4; + Alcotest.test_case "Comment5" `Quick test_comment5; + Alcotest.test_case "Comment6" `Quick test_comment6; + Alcotest.test_case "Multiline Comment" `Quick test_long_comment; + Alcotest.test_case "If" `Quick test_if; + Alcotest.test_case "If - end if" `Quick test_if2; + Alcotest.test_case "If_chained" `Quick test_if_chained; + Alcotest.test_case "If_equality" `Quick test_if_equality; + Alcotest.test_case "If inline" `Quick test_if_inline; + Alcotest.test_case "If inline &!" `Quick test_if_inline_comment; + Alcotest.test_case "If inline & !!" `Quick test_if_inline_comment2; + Alcotest.test_case "If : act" `Quick test_if_inline_act; + Alcotest.test_case "If : act: &!" `Quick test_if_inline_act2; + Alcotest.test_case "Precedence1" `Quick test_precedence; + Alcotest.test_case "Precedence2" `Quick test_precedence2; + Alcotest.test_case "Precedence3" `Quick test_precedence3; + Alcotest.test_case "Call gs" `Quick test_gs; + Alcotest.test_case "Call gt" `Quick test_gt; + Alcotest.test_case "Call nl" `Quick test_nl; + Alcotest.test_case "Function iif" `Quick test_function; + Alcotest.test_case "Function rand" `Quick test_function2; + Alcotest.test_case "Precedence4" `Quick test_precedence4; + Alcotest.test_case "Precedence5" `Quick test_precedence5; + Alcotest.test_case "Operator" `Quick test_operator; + Alcotest.test_case "Operator2" `Quick test_operator2; + Alcotest.test_case "Dyneval" `Quick test_dyneval; + ] ) + +let () = Alcotest.run "qsp_parser" [ syntax ] |