diff --git a/src/bin/expect_tests/transpiler_test.ml b/src/bin/expect_tests/transpiler_test.ml index 1110ed54b..142fa24d7 100644 --- a/src/bin/expect_tests/transpiler_test.ml +++ b/src/bin/expect_tests/transpiler_test.ml @@ -676,26 +676,26 @@ let%expect_test _ = type entrypointReturn is list (operation) * storage - const errorTokenUndefined = "TOKEN_UNDEFINED" + const errorTokenUndefined = "TOKEN_UNDEFINED" - const errorNotOwner = "NOT_OWNER" + const errorNotOwner = "NOT_OWNER" - const errorInsufficientBalance = "INSUFFICIENT_BALANCE" + const errorInsufficientBalance = "INSUFFICIENT_BALANCE" type transferContentsIteratorAccumulator is storage * tokenOwner function transferContentsIterator - (const gen__P - : transferContentsIteratorAccumulator * + (const gen__P : + transferContentsIteratorAccumulator * transferContentsMichelson) is block { - const gen__rhs1 = gen__P; - const accumulator = gen__rhs1.0; - const transferContentsMichelson = gen__rhs1.1; - const gen__rhs2 = accumulator; - const storage = gen__rhs2.0; - const from_ = gen__rhs2.1; + const gen__rhs1 = gen__P; + const accumulator = gen__rhs1.0; + const transferContentsMichelson = gen__rhs1.1; + const gen__rhs2 = accumulator; + const storage = gen__rhs2.0; + const from_ = gen__rhs2.1; const transferContents = (Layout.convert_from_right_comb (transferContentsMichelson) @@ -726,37 +726,37 @@ let%expect_test _ = function transferIterator (const gen__P : storage * transferMichelson) is block { - const gen__rhs7 = gen__P; - const storage = gen__rhs7.0; - const transferMichelson = gen__rhs7.1; + const gen__rhs7 = gen__P; + const storage = gen__rhs7.0; + const transferMichelson = gen__rhs7.1; const transferAuxiliary2 = (Layout.convert_from_right_comb (transferMichelson) : transferAuxiliary); - const from_ = (transferAuxiliary2.from_ : tokenOwner); + const from_ = (transferAuxiliary2.from_ : tokenOwner); allowOnlyOwnTransfer (from_); const gen__rhs10 = List.fold (transferContentsIterator, transferAuxiliary2.txs, (storage, from_)); - const storage = gen__rhs10.0; - const _ = gen__rhs10.1 + const storage = gen__rhs10.0; + const _ = gen__rhs10.1 } with storage function transfer (const gen__P : transferParameter * storage) is block { - const gen__rhs11 = gen__P; - const transferParameter = gen__rhs11.0; - const storage = gen__rhs11.1; + const gen__rhs11 = gen__P; + const transferParameter = gen__rhs11.0; + const storage = gen__rhs11.1; const storage = List.fold (transferIterator, transferParameter, storage) } with ((list [] : list (operation)), storage) function main (const gen__P : entrypointParameter) is block { - const gen__rhs13 = gen__P; - const parameter = gen__rhs13.0; - const storage = gen__rhs13.1 + const gen__rhs13 = gen__P; + const parameter = gen__rhs13.0; + const storage = gen__rhs13.1 } with case parameter of [ Transfer (transferParameter) -> @@ -1086,7 +1086,7 @@ let%expect_test _ = = if EQ (Tezos.sender, p.address_from) then block { - const new_allowances = s.allowances; + const new_allowances = s.allowances; gen__env9.new_allowances := new_allowances; skip } with gen__env9 @@ -1127,14 +1127,14 @@ let%expect_test _ = gen__env9.new_allowances := new_allowances; skip } with gen__env9; - const new_allowances = gen__env9.new_allowances; + const new_allowances = gen__env9.new_allowances; const sender_balance : nat = case Map.find_opt (p.address_from, s.tokens) of [ Some (value) -> value | None -> 0n ]; const new_tokens : tokens = big_map []; - const gen__env12 = record [new_tokens = new_tokens]; + const gen__env12 = record [new_tokens = new_tokens]; const gen__env12 = if LT (sender_balance, p.value) then @@ -1164,7 +1164,7 @@ let%expect_test _ = gen__env12.new_tokens := new_tokens; skip } with gen__env12; - const new_tokens = gen__env12.new_tokens + const new_tokens = gen__env12.new_tokens } with ((list [] : list (operation)), s with @@ -1205,7 +1205,7 @@ let%expect_test _ = gen__env14.new_allowances := new_allowances; skip } with gen__env14; - const new_allowances = gen__env14.new_allowances + const new_allowances = gen__env14.new_allowances } with ((list [] : list (operation)), s with @@ -1801,22 +1801,22 @@ let%expect_test _ = function foobar (const i : int) : int is block { const p : parameter = (Zero (42n)); - const gen__env7 = record [i = i]; + const gen__env7 = record [i = i]; const gen__env7 = if GT (i, 0) then block { - const i = ADD (i, 1); + const i = ADD (i, 1); gen__env7.i := i; - const gen__env5 = record [i = i]; + const gen__env5 = record [i = i]; const gen__env5 = if GT (i, 10) then block { - const i = 20; + const i = 20; gen__env5.i := i; failwith ("who knows"); - const i = 30; + const i = 30; gen__env5.i := i; skip } with gen__env5 @@ -1824,7 +1824,7 @@ let%expect_test _ = block { skip } with gen__env5; - const i = gen__env5.i; + const i = gen__env5.i; gen__env7.i := i; skip } with gen__env7 @@ -1835,7 +1835,7 @@ let%expect_test _ = | Pos (n) -> skip ] } with gen__env7; - const i = gen__env7.i + const i = gen__env7.i } with case p of [ Zero (n) -> i diff --git a/src/passes/01-parsing/cameligo.ml b/src/passes/01-parsing/cameligo.ml index 9332b8a34..1525d226b 100644 --- a/src/passes/01-parsing/cameligo.ml +++ b/src/passes/01-parsing/cameligo.ml @@ -1,11 +1,12 @@ module CST = Cst.Cameligo -module LexToken = Parser_cameligo.LexToken -module Lexer = Lexer.Make(LexToken) +module LexToken = Lexer_cameligo.LexToken +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Scoping = Parser_cameligo.Scoping module Region = Simple_utils.Region module ParErr = Parser_cameligo.ParErr module SSet = Set.Make (String) module Pretty = Parser_cameligo.Pretty +module EvalOpt = Lexer_shared.EvalOpt (* Mock IOs TODO: Fill them with CLI options *) diff --git a/src/passes/01-parsing/cameligo/.links b/src/passes/01-parsing/cameligo/.links index 8dcc06146..c4aeb0081 100644 --- a/src/passes/01-parsing/cameligo/.links +++ b/src/passes/01-parsing/cameligo/.links @@ -5,17 +5,24 @@ $HOME/git/OCaml-build/Makefile ../shared/LexerLib.ml ../shared/EvalOpt.ml ../shared/EvalOpt.mli -../shared/FQueue.ml -../shared/FQueue.mli ../shared/LexerLog.mli ../shared/LexerLog.ml ../shared/Markup.ml ../shared/Markup.mli -../shared/Utils.mli -../shared/Utils.ml ../shared/ParserAPI.mli ../shared/ParserAPI.ml ../shared/LexerUnit.mli ../shared/LexerUnit.ml ../shared/ParserUnit.mli ../shared/ParserUnit.ml + +./Stubs/Lexer_shared.ml +./Stubs/Lexer_cameligo.ml +./Stubs/Parser_shared.ml +./Stubs/Parser_cameligo.ml +./Stubs/Cst.ml +./Stubs/Cst_cameligo.ml + +$HOME/git/ligo/src/stages/1-cst/cameligo/CST.ml +$HOME/git/ligo/src/stages/1-cst/cameligo/ParserLog.mli +$HOME/git/ligo/src/stages/1-cst/cameligo/ParserLog.ml diff --git a/src/passes/01-parsing/cameligo/LexToken.mli b/src/passes/01-parsing/cameligo/LexToken.mli index b05b94318..0746a301e 100644 --- a/src/passes/01-parsing/cameligo/LexToken.mli +++ b/src/passes/01-parsing/cameligo/LexToken.mli @@ -21,13 +21,16 @@ aliased to [token]. *) +(* Dependencies *) + module Region = Simple_utils.Region module Pos = Simple_utils.Pos - -type lexeme = string +module Markup = Lexer_shared.Markup (* TOKENS *) +type lexeme = string + type t = (* Identifiers, labels, numbers and strings *) diff --git a/src/passes/01-parsing/cameligo/LexToken.mll b/src/passes/01-parsing/cameligo/LexToken.mll index 1c0bc389a..9c4378c82 100644 --- a/src/passes/01-parsing/cameligo/LexToken.mll +++ b/src/passes/01-parsing/cameligo/LexToken.mll @@ -1,17 +1,19 @@ +(* ocamlex specification for CameLIGO *) { - (* START HEADER *) +(* START HEADER *) -type lexeme = string - -let sprintf = Printf.sprintf +(* Dependencies *) module Region = Simple_utils.Region module Pos = Simple_utils.Pos -module SMap = Utils.String.Map -module SSet = Utils.String.Set +module Markup = Lexer_shared.Markup +module SMap = Map.Make (String) +module SSet = Set.Make (String) (* TOKENS *) +type lexeme = string + type t = (* Identifiers, labels, numbers and strings *) @@ -107,6 +109,8 @@ type t = (* Projections *) +let sprintf = Printf.sprintf + type token = t let proj_token = function diff --git a/src/passes/01-parsing/cameligo/LexerMain.ml b/src/passes/01-parsing/cameligo/LexerMain.ml index 498098035..071f6a07a 100644 --- a/src/passes/01-parsing/cameligo/LexerMain.ml +++ b/src/passes/01-parsing/cameligo/LexerMain.ml @@ -1,6 +1,14 @@ (* Driver for the CameLIGO lexer *) -module Region = Simple_utils.Region +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerUnit = Lexer_shared.LexerUnit +module LexToken = Lexer_cameligo.LexToken + +(* Input/Output *) module IO = struct diff --git a/src/passes/01-parsing/cameligo/ParToken.mly b/src/passes/01-parsing/cameligo/ParToken.mly index 093968ee4..86ad6fb1e 100644 --- a/src/passes/01-parsing/cameligo/ParToken.mly +++ b/src/passes/01-parsing/cameligo/ParToken.mly @@ -1,4 +1,5 @@ %{ +module LexToken = Lexer_cameligo.LexToken %} (* Tokens (mirroring thise defined in module LexToken) *) diff --git a/src/passes/01-parsing/cameligo/Parser.mly b/src/passes/01-parsing/cameligo/Parser.mly index 015a5b2f2..7f45829ff 100644 --- a/src/passes/01-parsing/cameligo/Parser.mly +++ b/src/passes/01-parsing/cameligo/Parser.mly @@ -15,8 +15,8 @@ open CST (* Entry points *) %start contract interactive_expr -%type contract -%type interactive_expr +%type contract +%type interactive_expr %% diff --git a/src/passes/01-parsing/cameligo/ParserMain.ml b/src/passes/01-parsing/cameligo/ParserMain.ml index 0ccb71a01..0f2e547c1 100644 --- a/src/passes/01-parsing/cameligo/ParserMain.ml +++ b/src/passes/01-parsing/cameligo/ParserMain.ml @@ -1,7 +1,16 @@ (* Driver for the CameLIGO parser *) -module Region = Simple_utils.Region -module SSet = Set.Make (String) +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module LexToken = Lexer_cameligo.LexToken +module CST = Cst.Cameligo +module SSet = Set.Make (String) +module ParserUnit = Parser_shared.ParserUnit +module Pretty = Parser_cameligo.Pretty + +(* Input/Output *) module IO = struct @@ -55,22 +64,22 @@ module SubIO = module Parser = struct - type ast = AST.t - type expr = AST.expr - include Parser + type ast = CST.t + type expr = CST.expr + include Parser_cameligo.Parser end module ParserLog = struct - type ast = AST.t - type expr = AST.expr - include ParserLog + type ast = CST.t + type expr = CST.expr + include Cst_cameligo.ParserLog end -module Lexer = Lexer.Make (LexToken) +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(CST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) diff --git a/src/passes/01-parsing/cameligo/Pretty.ml b/src/passes/01-parsing/cameligo/Pretty.ml index cfe384a0e..2ec773de2 100644 --- a/src/passes/01-parsing/cameligo/Pretty.ml +++ b/src/passes/01-parsing/cameligo/Pretty.ml @@ -1,10 +1,11 @@ [@@@warning "-42"] -module CST=Cst.Cameligo +module CST = Cst.Cameligo open CST module Region = Simple_utils.Region open! Region open! PPrint +module Option = Simple_utils.Option let pp_par printer {value; _} = string "(" ^^ nest 1 (printer value.inside ^^ string ")") diff --git a/src/passes/01-parsing/cameligo/README.txt b/src/passes/01-parsing/cameligo/README.txt new file mode 100644 index 000000000..4b332db99 --- /dev/null +++ b/src/passes/01-parsing/cameligo/README.txt @@ -0,0 +1,2 @@ +Note: The files Scoping.mli and Scoping.ml are the destination of +symbolic links from ../reasonligo. diff --git a/src/passes/01-parsing/cameligo/Scoping.ml b/src/passes/01-parsing/cameligo/Scoping.ml index 5b9820132..a409a8f80 100644 --- a/src/passes/01-parsing/cameligo/Scoping.ml +++ b/src/passes/01-parsing/cameligo/Scoping.ml @@ -1,7 +1,9 @@ [@@@warning "-42"] +(* Dependencies *) + module Region = Simple_utils.Region -module CST = Cst.Cameligo +module CST = Cst.Cameligo type t = Reserved_name of CST.variable @@ -17,7 +19,7 @@ open Region (* Useful modules *) -module SSet = Utils.String.Set +module SSet = Set.Make (String) module Ord = struct diff --git a/src/passes/01-parsing/cameligo/Stubs/Cst.ml b/src/passes/01-parsing/cameligo/Stubs/Cst.ml new file mode 100644 index 000000000..fcd70f2bb --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Cst.ml @@ -0,0 +1 @@ +module Cameligo = CST diff --git a/src/passes/01-parsing/cameligo/Stubs/Cst_cameligo.ml b/src/passes/01-parsing/cameligo/Stubs/Cst_cameligo.ml new file mode 100644 index 000000000..011ad3f5e --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Cst_cameligo.ml @@ -0,0 +1 @@ +module ParserLog = ParserLog diff --git a/src/passes/01-parsing/cameligo/Stubs/Lexer_cameligo.ml b/src/passes/01-parsing/cameligo/Stubs/Lexer_cameligo.ml new file mode 100644 index 000000000..0b6aa4f73 --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Lexer_cameligo.ml @@ -0,0 +1 @@ +module LexToken = LexToken diff --git a/src/passes/01-parsing/cameligo/Stubs/Lexer_shared.ml b/src/passes/01-parsing/cameligo/Stubs/Lexer_shared.ml new file mode 100644 index 000000000..71d9cc522 --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Lexer_shared.ml @@ -0,0 +1,6 @@ +module EvalOpt = EvalOpt +module Markup = Markup +module Lexer = Lexer +module LexerUnit = LexerUnit +module LexerLog = LexerLog +module LexerLib = LexerLib diff --git a/src/passes/01-parsing/cameligo/Stubs/Parser_cameligo.ml b/src/passes/01-parsing/cameligo/Stubs/Parser_cameligo.ml new file mode 100644 index 000000000..9479f6e5f --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Parser_cameligo.ml @@ -0,0 +1,2 @@ +module Pretty = Pretty +module Parser = Parser diff --git a/src/passes/01-parsing/cameligo/Stubs/Parser_shared.ml b/src/passes/01-parsing/cameligo/Stubs/Parser_shared.ml new file mode 100644 index 000000000..f1e238ebf --- /dev/null +++ b/src/passes/01-parsing/cameligo/Stubs/Parser_shared.ml @@ -0,0 +1 @@ +module ParserUnit = ParserUnit diff --git a/src/passes/01-parsing/cameligo/cameligo.ml b/src/passes/01-parsing/cameligo/cameligo.ml deleted file mode 100644 index d85ec4700..000000000 --- a/src/passes/01-parsing/cameligo/cameligo.ml +++ /dev/null @@ -1,3 +0,0 @@ -module Parser = Parser -module Lexer = Lexer -module LexToken = LexToken diff --git a/src/passes/01-parsing/cameligo/dune b/src/passes/01-parsing/cameligo/dune index 197c92f69..552860c01 100644 --- a/src/passes/01-parsing/cameligo/dune +++ b/src/passes/01-parsing/cameligo/dune @@ -1,13 +1,48 @@ +;; -------------------------------------------------------------------- +;; LEXING + ;; Build of the lexer (ocamllex LexToken) +;; Build of the lexer as a library + +(library + (name lexer_cameligo) + (public_name ligo.lexer.cameligo) + (modules LexToken) + (libraries + ;; Ligo + lexer_shared + ;; Third party + hex) + (preprocess + (pps bisect_ppx --conditional))) + +;; Build of a standalone lexer + +(executable + (name LexerMain) + (libraries + ;; Ligo + lexer_shared + lexer_cameligo + ;; Third party + hex) + (modules LexerMain) + (preprocess + (pps bisect_ppx --conditional))) + +;; -------------------------------------------------------------------- +;; PARSING + ;; Build of the parser (menhir (merge_into Parser) (modules ParToken Parser) - (flags -la 1 --table --strict --explain --external-tokens LexToken)) + (flags -la 1 --table --strict --explain + --external-tokens Lexer_cameligo.LexToken)) ;; Build of the parser as a library @@ -15,50 +50,47 @@ (name parser_cameligo) (public_name ligo.parser.cameligo) (modules - Scoping cameligo Parser LexToken ParErr Pretty) + Scoping Parser ParErr Pretty) (libraries - pprint - terminal_size - menhirLib - parser_shared - str - simple-utils - tezos-utils - cst - ) + ;; Ligo + lexer_cameligo + parser_shared + cst + ;; Vendors + simple-utils + ;; Third party + pprint + terminal_size + menhirLib + hex) (preprocess (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Simple_utils))) + (flags (:standard -open Cst_cameligo))) ;; For CST in Parser.mli -;; Build of the unlexer (for covering the error states of the LR -;; automaton) +;; Build of the unlexer (for covering the +;; error states of the LR automaton) (executable (name Unlexer) (libraries str) + (modules Unlexer) (preprocess - (pps bisect_ppx --conditional)) - (modules Unlexer)) - -;; Local build of a standalone lexer - -(executable - (name LexerMain) - (libraries parser_cameligo) - (modules LexerMain) - (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Parser_cameligo))) + (pps bisect_ppx --conditional))) ;; Local build of a standalone parser (executable (name ParserMain) - (libraries parser_cameligo) + (libraries + ;; Ligo + parser_shared + parser_cameligo + cst + ;; Third party + hex) (modules ParserMain Parser_msg) (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Simple_utils -open Parser_shared -open Parser_cameligo))) + (pps bisect_ppx --conditional))) ;; Build of the covering of error states in the LR automaton @@ -85,7 +117,14 @@ (rule (targets all.mligo) (deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe) - (action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=mligo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly ))) + (action (run %{script_cover} + --lex-tokens=LexToken.mli + --par-tokens=ParToken.mly + --ext=mligo + --unlexer=./Unlexer.exe + --messages=Parser.msg + --dir=. + --concatenate Parser.mly))) ;; Error messages @@ -95,60 +134,45 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --update-errors error.messages.checked-in - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - )) -) + (run menhir + --unused-tokens + --update-errors error.messages.checked-in + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (rule (target error.messages.new) (mode (promote (until-clean) (only *))) (action (with-stdout-to %{target} - (run - menhir - --unused-tokens - --list-errors - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - ) - ) -) + (run menhir + --unused-tokens + --list-errors + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (alias (name runtest) (deps error.messages error.messages.new) (action - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compare-errors error.messages.new - --compare-errors error.messages - ) - ) - ) - - + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compare-errors error.messages.new + --compare-errors error.messages))) (rule (targets ParErr.ml) @@ -156,16 +180,12 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compile-errors error.messages.checked-in - ) - )) -) + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compile-errors error.messages.checked-in)))) diff --git a/src/passes/01-parsing/parser.ml b/src/passes/01-parsing/parser.ml index ba2c27cb6..5d66daa7d 100644 --- a/src/passes/01-parsing/parser.ml +++ b/src/passes/01-parsing/parser.ml @@ -2,4 +2,4 @@ module Pascaligo = Pascaligo module Cameligo = Cameligo module Reasonligo = Reasonligo module Errors = Errors -module Formatter = Formatter \ No newline at end of file +module Formatter = Formatter diff --git a/src/passes/01-parsing/pascaligo.ml b/src/passes/01-parsing/pascaligo.ml index 15564e207..360870957 100644 --- a/src/passes/01-parsing/pascaligo.ml +++ b/src/passes/01-parsing/pascaligo.ml @@ -1,6 +1,9 @@ +(* Dependencies *) + +module EvalOpt = Lexer_shared.EvalOpt module CST = Cst.Pascaligo -module LexToken = Parser_pascaligo.LexToken -module Lexer = Lexer.Make(LexToken) +module LexToken = Lexer_pascaligo.LexToken +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Scoping = Parser_pascaligo.Scoping module Region = Simple_utils.Region module ParErr = Parser_pascaligo.ParErr diff --git a/src/passes/01-parsing/pascaligo/.links b/src/passes/01-parsing/pascaligo/.links index aca47d8ff..ac3ad0e4c 100644 --- a/src/passes/01-parsing/pascaligo/.links +++ b/src/passes/01-parsing/pascaligo/.links @@ -6,14 +6,10 @@ $HOME/git/OCaml-build/Makefile ../shared/LexerLib.ml ../shared/EvalOpt.ml ../shared/EvalOpt.mli -../shared/FQueue.ml -../shared/FQueue.mli ../shared/LexerLog.mli ../shared/LexerLog.ml ../shared/Markup.ml ../shared/Markup.mli -../shared/Utils.mli -../shared/Utils.ml ../shared/ParserAPI.mli ../shared/ParserAPI.ml ../shared/LexerUnit.mli @@ -21,3 +17,14 @@ $HOME/git/OCaml-build/Makefile ../shared/ParserUnit.mli ../shared/ParserUnit.ml ../shared/LexerLib.ml + +./Stubs/Lexer_shared.ml +./Stubs/Lexer_pascaligo.ml +./Stubs/Parser_shared.ml +./Stubs/Parser_pascaligo.ml +./Stubs/Cst.ml +./Stubs/Cst_pascaligo.ml + +$HOME/git/ligo/src/stages/1-cst/pascaligo/CST.ml +$HOME/git/ligo/src/stages/1-cst/pascaligo/ParserLog.mli +$HOME/git/ligo/src/stages/1-cst/pascaligo/ParserLog.ml diff --git a/src/passes/01-parsing/pascaligo/LexToken.mli b/src/passes/01-parsing/pascaligo/LexToken.mli index 6c445e4b9..505c46425 100644 --- a/src/passes/01-parsing/pascaligo/LexToken.mli +++ b/src/passes/01-parsing/pascaligo/LexToken.mli @@ -21,13 +21,16 @@ aliased to [token]. *) +(* Dependencies *) + module Region = Simple_utils.Region module Pos = Simple_utils.Pos - -type lexeme = string +module Markup = Lexer_shared.Markup (* TOKENS *) +type lexeme = string + type attribute = { header : string; string : lexeme Region.reg diff --git a/src/passes/01-parsing/pascaligo/LexToken.mll b/src/passes/01-parsing/pascaligo/LexToken.mll index e037f252e..1c68e21f7 100644 --- a/src/passes/01-parsing/pascaligo/LexToken.mll +++ b/src/passes/01-parsing/pascaligo/LexToken.mll @@ -1,21 +1,20 @@ -(* Lexer specification for LIGO, to be processed by [ocamllex] *) +(* ocamlex specification for PascaLIGO *) { (* START HEADER *) -(* Shorthands *) +(* Dependencies *) module Region = Simple_utils.Region module Pos = Simple_utils.Pos +module Markup = Lexer_shared.Markup module SMap = Map.Make (String) module SSet = Set.Make (String) -type lexeme = string - -let sprintf = Printf.sprintf - (* TOKENS *) +type lexeme = string + type attribute = { header : string; string : lexeme Region.reg @@ -117,6 +116,8 @@ type t = (* Projections *) +let sprintf = Printf.sprintf + type token = t let proj_token = function diff --git a/src/passes/01-parsing/pascaligo/LexerMain.ml b/src/passes/01-parsing/pascaligo/LexerMain.ml index a497df466..1365531ba 100644 --- a/src/passes/01-parsing/pascaligo/LexerMain.ml +++ b/src/passes/01-parsing/pascaligo/LexerMain.ml @@ -1,6 +1,14 @@ (* Driver for the PascaLIGO lexer *) -module Region = Simple_utils.Region +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerUnit = Lexer_shared.LexerUnit +module LexToken = Lexer_pascaligo.LexToken + +(* Input/Output *) module IO = struct @@ -10,8 +18,12 @@ module IO = in read ~block ~line:"//" ".ligo" end +(* Instantiating the standalone lexer *) + module M = LexerUnit.Make (IO) (Lexer.Make (LexToken)) +(* Tracing all tokens in the source *) + let () = match M.trace () with Stdlib.Ok () -> () diff --git a/src/passes/01-parsing/pascaligo/ParToken.mly b/src/passes/01-parsing/pascaligo/ParToken.mly index 2ed734bb7..cbd994c45 100644 --- a/src/passes/01-parsing/pascaligo/ParToken.mly +++ b/src/passes/01-parsing/pascaligo/ParToken.mly @@ -1,4 +1,5 @@ %{ +module LexToken = Lexer_pascaligo.LexToken %} (* Tokens (mirroring thise defined in module LexToken) *) diff --git a/src/passes/01-parsing/pascaligo/Parser.mly b/src/passes/01-parsing/pascaligo/Parser.mly index 287e3c750..395ec6649 100644 --- a/src/passes/01-parsing/pascaligo/Parser.mly +++ b/src/passes/01-parsing/pascaligo/Parser.mly @@ -1,10 +1,13 @@ +(* Menhir specification of the parsing of PascaLIGO *) %{ (* START HEADER *) [@@@warning "-42"] +(* Dependencies *) + open Simple_utils.Region -module CST = Cst.Pascaligo +module CST = Cst.Pascaligo open CST (* END HEADER *) @@ -15,8 +18,8 @@ open CST (* Entry points *) %start contract interactive_expr -%type contract -%type interactive_expr +%type contract +%type interactive_expr %% @@ -143,7 +146,9 @@ type_decl: terminator = $5} in {region; value} } -type_expr_colon: ":" type_expr { $1,$2 } +type_annot: + ":" type_expr { $1,$2 } + type_expr: fun_type | sum_type | record_type { $1 } @@ -241,7 +246,7 @@ field_decl: fun_expr: - "function" parameters type_expr_colon? "is" expr { + "function" parameters type_annot? "is" expr { let stop = expr_to_region $5 in let region = cover $1 stop and value = {kwd_function = $1; @@ -254,8 +259,7 @@ fun_expr: (* Function declarations *) open_fun_decl: - ioption ("recursive") "function" fun_name parameters type_expr_colon? "is" - expr { + ioption("recursive") "function" fun_name parameters type_annot? "is" expr { Scoping.check_reserved_name $3; let stop = expr_to_region $7 in let region = cover $2 stop @@ -356,7 +360,7 @@ open_var_decl: in {region; value} } unqualified_decl(OP): - var type_expr_colon? OP expr { + var type_annot? OP expr { Scoping.check_reserved_name $1; let region = expr_to_region $4 in $1, $2, $3, $4, region } @@ -594,28 +598,17 @@ while_loop: in While {region; value} } for_loop: - "for" var ":=" expr "to" expr block { - let region = cover $1 $7.region in - let value = {kwd_for = $1; - binder = $2; - assign = $3; - init = $4; - kwd_to = $5; - bound = $6; - step = None; - block = $7} - in For (ForInt {region; value}) - } -| "for" var ":=" expr "to" expr "step" expr block { - let region = cover $1 $9.region in - let value = {kwd_for = $1; - binder = $2; - assign = $3; - init = $4; - kwd_to = $5; - bound = $6; - step = Some ($7, $8); - block = $9} + "for" var ":=" expr "to" expr step_clause? block { + Scoping.check_reserved_name $2; + let region = cover $1 $8.region in + let value = {kwd_for = $1; + binder = $2; + assign = $3; + init = $4; + kwd_to = $5; + bound = $6; + step = $7; + block = $8} in For (ForInt {region; value}) } | "for" var arrow_clause? "in" collection expr block { @@ -630,6 +623,9 @@ for_loop: block = $7} in For (ForCollect {region; value}) } +step_clause: + "step" expr { $1,$2 } + collection: "map" { Map $1 } | "set" { Set $1 } @@ -650,18 +646,13 @@ expr: | fun_expr { EFun $1 } | block_with { EBlock $1 } -block_with : +block_with: block "with" expr { - let start = $2 - and stop = expr_to_region $3 in + let start = $2 + and stop = expr_to_region $3 in let region = cover start stop in - let value : CST.block_with = { - block = $1; - kwd_with = $2; - expr = $3; - } - in {value;region} - } + let value = {block=$1; kwd_with=$2; expr=$3} + in {region; value} } cond_expr: "if" expr "then" expr ";"? "else" expr { diff --git a/src/passes/01-parsing/pascaligo/ParserMain.ml b/src/passes/01-parsing/pascaligo/ParserMain.ml index 6158dc5da..8a91d8c42 100644 --- a/src/passes/01-parsing/pascaligo/ParserMain.ml +++ b/src/passes/01-parsing/pascaligo/ParserMain.ml @@ -1,7 +1,16 @@ (* Driver for the PascaLIGO parser *) -module Region = Simple_utils.Region -module SSet = Set.Make (String) +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module LexToken = Lexer_pascaligo.LexToken +module CST = Cst.Pascaligo +module SSet = Set.Make (String) +module ParserUnit = Parser_shared.ParserUnit +module Pretty = Parser_pascaligo.Pretty + +(* Input/Output *) module IO = struct @@ -55,22 +64,22 @@ module SubIO = module Parser = struct - type ast = AST.t - type expr = AST.expr - include Parser + type ast = CST.t + type expr = CST.expr + include Parser_pascaligo.Parser end module ParserLog = struct - type ast = AST.t - type expr = AST.expr - include ParserLog + type ast = CST.t + type expr = CST.expr + include Cst_pascaligo.ParserLog end -module Lexer = Lexer.Make (LexToken) +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(CST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) diff --git a/src/passes/01-parsing/pascaligo/Pretty.ml b/src/passes/01-parsing/pascaligo/Pretty.ml index e6a7a6c3b..c4601cf7c 100644 --- a/src/passes/01-parsing/pascaligo/Pretty.ml +++ b/src/passes/01-parsing/pascaligo/Pretty.ml @@ -40,12 +40,16 @@ and pp_attr_decl decl = pp_ne_injection pp_string decl and pp_const_decl {value; _} = let {name; const_type; init; attributes; _} = value in + let attr = match attributes with + None -> empty + | Some a -> hardline ^^ pp_attr_decl a in let start = string ("const " ^ name.value) in - let t_expr = const_type in - let attr = match attributes with - None -> empty - | Some a -> hardline ^^ pp_attr_decl a in - group (start ^/^ pp_option (fun (_, d) -> nest 2 (string ": " ^^ pp_type_expr d)) t_expr) + let start = + match const_type with + None -> start + | Some (_, e) -> + group (start ^/^ nest 2 (string ": " ^^ pp_type_expr e)) in + start ^^ group (break 1 ^^ nest 2 (string "= " ^^ pp_expr init)) ^^ attr @@ -127,34 +131,46 @@ and pp_type_tuple {value; _} = and pp_fun_expr {value; _} = let {param; ret_type; return; _} : fun_expr = value in - let start = string "function" in + let start = string "function" in let parameters = pp_par pp_parameters param in - let expr = pp_expr return in + let t_annot = + match ret_type with + None -> empty + | Some (_, e) -> + group (break 1 ^^ nest 2 (string ": " ^^ pp_type_expr e)) in group (start ^^ nest 2 (break 1 ^^ parameters)) - ^^ pp_option (fun (_,d) -> group (break 1 ^^ nest 2 (string ": " ^^ pp_type_expr d))) ret_type - ^^ string " is" ^^ group (nest 4 (break 1 ^^ expr)) + ^^ t_annot + ^^ string " is" ^^ group (nest 4 (break 1 ^^ pp_expr return)) and pp_fun_decl {value; _} = - let {kwd_recursive; fun_name; param; - ret_type; return; attributes; _} = value in + let {kwd_recursive; fun_name; param; ret_type; + return; attributes; _} = value in let start = match kwd_recursive with None -> string "function" | Some _ -> string "recursive" ^/^ string "function" in - let start = start ^^ group (break 1 ^^ nest 2 (pp_ident fun_name)) in - let parameters = pp_par pp_parameters param in - let expr = pp_expr return in - let body = + let start = start ^^ group (break 1 ^^ nest 2 (pp_ident fun_name)) + and parameters = pp_par pp_parameters param + and t_annot_is = + match ret_type with + None -> string " is" + | Some (_, e) -> + let ret_type = pp_type_expr e in + group (nest 2 (break 1 ^^ string ": " ^^ nest 2 ret_type + ^^ string " is")) + and body = + let expr = pp_expr return in match return with EBlock _ -> group (break 1 ^^ expr) | _ -> group (nest 2 (break 1 ^^ expr)) and attr = match attributes with - None -> empty + None -> empty | Some a -> hardline ^^ pp_attr_decl a in prefix 2 1 start parameters - ^^ group (nest 2 (pp_option (fun (_, d) -> break 1 ^^ string ": " ^^ nest 2 (pp_type_expr d)) ret_type ^^ string " is")) - ^^ body ^^ attr + ^^ t_annot_is + ^^ body + ^^ attr and pp_parameters p = pp_nsepseq ";" pp_param_decl p @@ -164,13 +180,19 @@ and pp_param_decl = function and pp_param_const {value; _} = let {var; param_type; _} : param_const = value in - let name = string ("const " ^ var.value) - in prefix 2 1 name @@ pp_option (fun (_,d) -> string ": " ^^ pp_type_expr d) param_type + let name = string ("const " ^ var.value) in + match param_type with + None -> name + | Some (_, e) -> + prefix 2 1 (name ^^ string " :") (pp_type_expr e) and pp_param_var {value; _} = let {var; param_type; _} : param_var = value in - let name = string ("var " ^ var.value) - in prefix 2 1 name @@ pp_option (fun (_,d) -> string ": " ^^ pp_type_expr d) param_type + let name = string ("var " ^ var.value) in + match param_type with + None -> name + | Some (_, e) -> + prefix 2 1 (name ^^ string " :") (pp_type_expr e) and pp_block {value; _} = string "block {" @@ -192,7 +214,12 @@ and pp_data_decl = function and pp_var_decl {value; _} = let {name; var_type; init; _} = value in let start = string ("var " ^ name.value) in - group (start ^/^ pp_option (fun (_,d) -> nest 2 (string ": " ^^ pp_type_expr d)) var_type) + let start = + match var_type with + None -> start + | Some (_, e) -> + group (start ^/^ nest 2 (string ": " ^^ pp_type_expr e)) in + start ^^ group (break 1 ^^ nest 2 (string ":= " ^^ pp_expr init)) and pp_instruction = function @@ -381,11 +408,11 @@ and pp_expr = function | EBlock e -> pp_block_with e and pp_block_with {value; _} = - let {block;kwd_with; expr;_} = value in + let {block; kwd_with; expr} = value in let expr = value.expr in let expr = pp_expr expr in - group(pp_block block ^^ string " with" - ^^ group (nest 4 (break 1 ^^ expr))) + group (pp_block block ^^ string " with" + ^^ group (nest 4 (break 1 ^^ expr))) and pp_annot_expr {value; _} = let expr, _, type_expr = value.inside in diff --git a/src/passes/01-parsing/pascaligo/Scoping.ml b/src/passes/01-parsing/pascaligo/Scoping.ml index 300abbfc7..ad2224053 100644 --- a/src/passes/01-parsing/pascaligo/Scoping.ml +++ b/src/passes/01-parsing/pascaligo/Scoping.ml @@ -1,7 +1,13 @@ +(* This module exports checks on scoping, called from the parser. *) + [@@@warning "-42"] +(* Dependencies *) + module Region = Simple_utils.Region -module CST = Cst.Pascaligo +module CST = Cst.Pascaligo + +(* Errors *) type t = Reserved_name of CST.variable @@ -18,7 +24,7 @@ open Region (* Useful modules *) -module SSet = Utils.String.Set +module SSet = Set.Make (String) module Ord = struct diff --git a/src/passes/01-parsing/pascaligo/Scoping.mli b/src/passes/01-parsing/pascaligo/Scoping.mli index 7cf0f176e..2a38309c6 100644 --- a/src/passes/01-parsing/pascaligo/Scoping.mli +++ b/src/passes/01-parsing/pascaligo/Scoping.mli @@ -1,7 +1,11 @@ (* This module exports checks on scoping, called from the parser. *) +(* Dependencies *) + module Region = Simple_utils.Region -module CST = Cst.Pascaligo +module CST = Cst.Pascaligo + +(* Errors *) type t = Reserved_name of CST.variable diff --git a/src/passes/01-parsing/pascaligo/Stubs/Cst.ml b/src/passes/01-parsing/pascaligo/Stubs/Cst.ml new file mode 100644 index 000000000..23b6f9878 --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Cst.ml @@ -0,0 +1 @@ +module Pascaligo = CST diff --git a/src/passes/01-parsing/pascaligo/Stubs/Cst_pascaligo.ml b/src/passes/01-parsing/pascaligo/Stubs/Cst_pascaligo.ml new file mode 100644 index 000000000..011ad3f5e --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Cst_pascaligo.ml @@ -0,0 +1 @@ +module ParserLog = ParserLog diff --git a/src/passes/01-parsing/pascaligo/Stubs/Lexer_pascaligo.ml b/src/passes/01-parsing/pascaligo/Stubs/Lexer_pascaligo.ml new file mode 100644 index 000000000..0b6aa4f73 --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Lexer_pascaligo.ml @@ -0,0 +1 @@ +module LexToken = LexToken diff --git a/src/passes/01-parsing/pascaligo/Stubs/Lexer_shared.ml b/src/passes/01-parsing/pascaligo/Stubs/Lexer_shared.ml new file mode 100644 index 000000000..71d9cc522 --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Lexer_shared.ml @@ -0,0 +1,6 @@ +module EvalOpt = EvalOpt +module Markup = Markup +module Lexer = Lexer +module LexerUnit = LexerUnit +module LexerLog = LexerLog +module LexerLib = LexerLib diff --git a/src/passes/01-parsing/pascaligo/Stubs/Parser_pascaligo.ml b/src/passes/01-parsing/pascaligo/Stubs/Parser_pascaligo.ml new file mode 100644 index 000000000..9479f6e5f --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Parser_pascaligo.ml @@ -0,0 +1,2 @@ +module Pretty = Pretty +module Parser = Parser diff --git a/src/passes/01-parsing/pascaligo/Stubs/Parser_shared.ml b/src/passes/01-parsing/pascaligo/Stubs/Parser_shared.ml new file mode 100644 index 000000000..f1e238ebf --- /dev/null +++ b/src/passes/01-parsing/pascaligo/Stubs/Parser_shared.ml @@ -0,0 +1 @@ +module ParserUnit = ParserUnit diff --git a/src/passes/01-parsing/pascaligo/dune b/src/passes/01-parsing/pascaligo/dune index 4851e927c..5cc2a75d0 100644 --- a/src/passes/01-parsing/pascaligo/dune +++ b/src/passes/01-parsing/pascaligo/dune @@ -1,13 +1,48 @@ +;; -------------------------------------------------------------------- +;; LEXING + ;; Build of the lexer (ocamllex LexToken) +;; Build of the lexer as a library + +(library + (name lexer_pascaligo) + (public_name ligo.lexer.pascaligo) + (modules LexToken) + (libraries + ;; Ligo + lexer_shared + ;; Third party + hex) + (preprocess + (pps bisect_ppx --conditional))) + +;; Build of a standalone lexer + +(executable + (name LexerMain) + (libraries + ;; Ligo + lexer_shared + lexer_pascaligo + ;; Third party + hex) + (modules LexerMain) + (preprocess + (pps bisect_ppx --conditional))) + +;; -------------------------------------------------------------------- +;; PARSING + ;; Build of the parser (menhir (merge_into Parser) (modules ParToken Parser) - (flags -la 1 --table --strict --explain --external-tokens LexToken)) + (flags -la 1 --table --strict --explain + --external-tokens Lexer_pascaligo.LexToken)) ;; Build of the parser as a library @@ -15,19 +50,22 @@ (name parser_pascaligo) (public_name ligo.parser.pascaligo) (modules - Scoping pascaligo Parser LexToken ParErr Pretty) + Scoping Parser ParErr Pretty) (libraries - pprint - terminal_size - menhirLib - parser_shared - hex - Preprocessor - simple-utils - cst) + ;; Ligo + lexer_pascaligo + parser_shared + cst + ;; Vendors + simple-utils + ;; Third party + pprint + terminal_size + menhirLib + hex) (preprocess (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Simple_utils))) + (flags (:standard -open Cst_pascaligo))) ;; For CST in Parser.mli ;; Build of the unlexer (for covering the ;; error states of the LR automaton) @@ -35,30 +73,24 @@ (executable (name Unlexer) (libraries str) + (modules Unlexer) (preprocess - (pps bisect_ppx --conditional)) - (modules Unlexer)) - -;; Local build of a standalone lexer - -(executable - (name LexerMain) - (libraries - hex simple-utils tezos-utils parser_pascaligo) - (modules LexerMain) - (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Parser_pascaligo))) + (pps bisect_ppx --conditional))) ;; Local build of a standalone parser (executable (name ParserMain) - (libraries parser_pascaligo) - (modules ParserMain) + (libraries + ;; Ligo + parser_shared + parser_pascaligo + cst + ;; Third party + hex) + (modules ParserMain Parser_msg) (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Simple_utils -open Parser_shared -open Parser_pascaligo))) + (pps bisect_ppx --conditional))) ;; Build of the covering of error states in the LR automaton @@ -85,7 +117,14 @@ (rule (targets all.ligo) (deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe) - (action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=ligo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly))) + (action (run %{script_cover} + --lex-tokens=LexToken.mli + --par-tokens=ParToken.mly + --ext=ligo + --unlexer=./Unlexer.exe + --messages=Parser.msg + --dir=. + --concatenate Parser.mly))) ;; Error messages @@ -95,58 +134,45 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --update-errors error.messages.checked-in - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - )) -) + (run menhir + --unused-tokens + --update-errors error.messages.checked-in + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (rule (target error.messages.new) (mode (promote (until-clean) (only *))) (action (with-stdout-to %{target} - (run - menhir - --unused-tokens - --list-errors - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - ) - ) -) + (run menhir + --unused-tokens + --list-errors + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (alias (name runtest) (deps error.messages error.messages.new) (action - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compare-errors error.messages.new - --compare-errors error.messages - ) - ) - ) + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compare-errors error.messages.new + --compare-errors error.messages))) (rule (targets ParErr.ml) @@ -154,16 +180,12 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compile-errors error.messages.checked-in - ) - )) -) + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compile-errors error.messages.checked-in)))) diff --git a/src/passes/01-parsing/pascaligo/error.messages.checked-in b/src/passes/01-parsing/pascaligo/error.messages.checked-in index 4a5dc1b33..d7255de09 100644 --- a/src/passes/01-parsing/pascaligo/error.messages.checked-in +++ b/src/passes/01-parsing/pascaligo/error.messages.checked-in @@ -1,7 +1,1247 @@ -interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End +interactive_expr: Begin Case Verbatim Of LBRACKET VBAR Block +## +## Ends in an error in state: 367. +## +## case(if_clause) -> Case expr Of LBRACKET option(VBAR) . cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of LBRACKET option(VBAR) +## + + + +interactive_expr: Begin Case Verbatim Of LBRACKET WILD ARROW Skip End +## +## Ends in an error in state: 455. +## +## case(if_clause) -> Case expr Of LBRACKET option(VBAR) cases(if_clause) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of LBRACKET option(VBAR) cases(if_clause) +## +## 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 457, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 454, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) +## + + + +interactive_expr: Begin Case Verbatim Of LBRACKET With +## +## Ends in an error in state: 366. +## +## case(if_clause) -> Case expr Of LBRACKET . option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of LBRACKET +## + + + +interactive_expr: Begin Case Verbatim Of VBAR Block +## +## Ends in an error in state: 460. +## +## case(if_clause) -> Case expr Of option(VBAR) . cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of option(VBAR) +## + + + +interactive_expr: Begin Case Verbatim Of WILD ARROW Skip RBRACKET +## +## Ends in an error in state: 461. +## +## case(if_clause) -> Case expr Of option(VBAR) cases(if_clause) . End [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of option(VBAR) cases(if_clause) +## +## 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 457, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 454, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) +## + + + +interactive_expr: Begin Case Verbatim Of WILD ARROW Skip VBAR With +## +## Ends in an error in state: 458. +## +## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) VBAR . nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] +## +## The known suffix of the stack is as follows: +## case_clause(if_clause) VBAR +## + + + +interactive_expr: Begin Case Verbatim Of WILD ARROW Skip With +## +## Ends in an error in state: 457. +## +## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . [ RBRACKET End ] +## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . VBAR nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] +## +## The known suffix of the stack is as follows: +## case_clause(if_clause) +## + + + +interactive_expr: Begin Case Verbatim Of WILD ARROW With +## +## Ends in an error in state: 428. +## +## case_clause(if_clause) -> pattern ARROW . if_clause [ VBAR RBRACKET End ] +## +## The known suffix of the stack is as follows: +## pattern ARROW +## + + + +interactive_expr: Begin Case Verbatim Of WILD RPAR +## +## Ends in an error in state: 427. +## +## case_clause(if_clause) -> pattern . ARROW if_clause [ VBAR RBRACKET End ] +## +## The known suffix of the stack is as follows: +## pattern +## +## 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 403, spurious reduction of production pattern -> core_pattern +## + + + +interactive_expr: Begin Case Verbatim Of With +## +## Ends in an error in state: 365. +## +## case(if_clause) -> Case expr Of . option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## case(if_clause) -> Case expr Of . LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr Of +## + + + +interactive_expr: Begin Case Verbatim VBAR +## +## Ends in an error in state: 364. +## +## case(if_clause) -> Case expr . Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## case(if_clause) -> Case expr . Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin Case With +## +## Ends in an error in state: 363. +## +## case(if_clause) -> Case . expr Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## case(if_clause) -> Case . expr Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Case +## + + + +interactive_expr: Begin Constr DOT And With +## +## Ends in an error in state: 435. +## +## fun_call -> module_field . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## module_field +## + + + +interactive_expr: Begin Constr With +## +## Ends in an error in state: 356. +## +## module_field -> Constr . DOT module_fun [ LPAR ] +## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ LBRACKET ASS ] +## +## The known suffix of the stack is as follows: +## Constr +## + + + +interactive_expr: Begin For Ident ARROW Ident With +## +## Ends in an error in state: 347. +## +## for_loop -> For Ident option(arrow_clause) . In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident option(arrow_clause) +## + + + +interactive_expr: Begin For Ident ARROW With +## +## Ends in an error in state: 345. +## +## arrow_clause -> ARROW . Ident [ In ] +## +## The known suffix of the stack is as follows: +## ARROW +## + + + +interactive_expr: Begin For Ident ASS Verbatim To Verbatim Step Verbatim Attributes +## +## Ends in an error in state: 343. +## +## for_loop -> For Ident ASS expr To expr option(step_clause) . block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS expr To expr option(step_clause) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 341, spurious reduction of production step_clause -> Step expr +## In state 342, spurious reduction of production option(step_clause) -> step_clause +## + + + +interactive_expr: Begin For Ident ASS Verbatim To Verbatim Step With +## +## Ends in an error in state: 340. +## +## step_clause -> Step . expr [ Block Begin ] +## +## The known suffix of the stack is as follows: +## Step +## + + + +interactive_expr: Begin For Ident ASS Verbatim To Verbatim VBAR +## +## Ends in an error in state: 339. +## +## for_loop -> For Ident ASS expr To expr . option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS expr To expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin For Ident ASS Verbatim To With +## +## Ends in an error in state: 338. +## +## for_loop -> For Ident ASS expr To . expr option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS expr To +## + + + +interactive_expr: Begin For Ident ASS Verbatim VBAR +## +## Ends in an error in state: 337. +## +## for_loop -> For Ident ASS expr . To expr option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin For Ident ASS With +## +## Ends in an error in state: 336. +## +## for_loop -> For Ident ASS . expr To expr option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS +## + + + +interactive_expr: Begin For Ident In Set Verbatim VBAR +## +## Ends in an error in state: 353. +## +## for_loop -> For Ident option(arrow_clause) In collection expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident option(arrow_clause) In collection expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin For Ident In Set With +## +## Ends in an error in state: 352. +## +## for_loop -> For Ident option(arrow_clause) In collection . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident option(arrow_clause) In collection +## + + + +interactive_expr: Begin For Ident In With +## +## Ends in an error in state: 348. +## +## for_loop -> For Ident option(arrow_clause) In . collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident option(arrow_clause) In +## + + + +interactive_expr: Begin For Ident With +## +## Ends in an error in state: 335. +## +## for_loop -> For Ident . ASS expr To expr option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident . option(arrow_clause) In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident +## + + + +interactive_expr: Begin For With +## +## Ends in an error in state: 334. +## +## for_loop -> For . Ident ASS expr To expr option(step_clause) block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For . Ident option(arrow_clause) In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For +## + + + +interactive_expr: Begin Ident ASS With +## +## Ends in an error in state: 441. +## +## assignment -> lhs ASS . rhs [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## lhs ASS +## + + + +interactive_expr: Begin Ident DOT Ident With +## +## Ends in an error in state: 434. +## +## lhs -> path . [ ASS ] +## map_lookup -> path . brackets(expr) [ ASS ] +## +## The known suffix of the stack is as follows: +## path +## +## 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 128, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 167, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 173, spurious reduction of production path -> projection +## + + + +interactive_expr: Begin Ident LBRACKET Bytes RBRACKET With +## +## Ends in an error in state: 440. +## +## assignment -> lhs . ASS rhs [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## lhs +## + + + +interactive_expr: Begin Ident With +## +## Ends in an error in state: 325. +## +## fun_call -> Ident . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] +## path -> Ident . [ LBRACKET ASS ] +## projection -> Ident . DOT nsepseq(selection,DOT) [ LBRACKET ASS ] +## +## The known suffix of the stack is as follows: +## Ident +## + + + +interactive_expr: Begin If Verbatim Then LBRACE Skip End +## +## Ends in an error in state: 492. +## +## clause_block -> LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## LBRACE sep_or_term_list(statement,SEMI) +## +## 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 478, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 495, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## + + + +interactive_expr: Begin If Verbatim Then LBRACE With +## +## Ends in an error in state: 324. +## +## clause_block -> LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## LBRACE +## + + + +interactive_expr: Begin If Verbatim Then Skip Else With +## +## Ends in an error in state: 498. +## +## conditional -> If expr Then if_clause option(SEMI) Else . if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If expr Then if_clause option(SEMI) Else +## + + + +interactive_expr: Begin If Verbatim Then Skip SEMI EQ +## +## Ends in an error in state: 497. +## +## conditional -> If expr Then if_clause option(SEMI) . Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If expr Then if_clause option(SEMI) +## + + + +interactive_expr: Begin If Verbatim Then Skip With +## +## Ends in an error in state: 496. +## +## conditional -> If expr Then if_clause . option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If expr Then if_clause +## + + + +interactive_expr: Begin If Verbatim Then With +## +## Ends in an error in state: 323. +## +## conditional -> If expr Then . if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If expr Then +## + + + +interactive_expr: Begin If Verbatim VBAR +## +## Ends in an error in state: 322. +## +## conditional -> If expr . Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin If With +## +## Ends in an error in state: 321. +## +## conditional -> If . expr Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## If +## + + + +interactive_expr: Begin Patch Constr DOT Ident With +## +## Ends in an error in state: 170. +## +## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr DOT Ident +## + + + +interactive_expr: Begin Patch Constr DOT With +## +## Ends in an error in state: 169. +## +## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr DOT +## + + + +interactive_expr: Begin Patch Constr With +## +## Ends in an error in state: 168. +## +## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr +## + + + +interactive_expr: Begin Patch Ident VBAR +## +## Ends in an error in state: 268. +## +## map_patch -> Patch path . With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] +## record_patch -> Patch path . With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_patch -> Patch path . With ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Patch path +## +## 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 165, spurious reduction of production path -> Ident +## + + + +interactive_expr: Begin Patch Ident While +## +## Ends in an error in state: 165. +## +## path -> Ident . [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Ident +## + + + +interactive_expr: Begin Patch Ident With Map LBRACKET Verbatim ARROW Bytes End +## +## Ends in an error in state: 302. +## +## ne_injection(Map,binding) -> Map LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Map LBRACKET sep_or_term_list(binding,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Map LBRACKET With +## +## Ends in an error in state: 301. +## +## ne_injection(Map,binding) -> Map LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Map LBRACKET +## + + + +interactive_expr: Begin Patch Ident With Map Verbatim ARROW Bytes RBRACKET +## +## Ends in an error in state: 316. +## +## ne_injection(Map,binding) -> Map sep_or_term_list(binding,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Map sep_or_term_list(binding,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Map With +## +## Ends in an error in state: 300. +## +## ne_injection(Map,binding) -> Map . sep_or_term_list(binding,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## ne_injection(Map,binding) -> Map . LBRACKET sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Map +## + + + +interactive_expr: Begin Patch Ident With Record Ident EQ Bytes RBRACKET +## +## Ends in an error in state: 298. +## +## ne_injection(Record,field_assignment) -> Record sep_or_term_list(field_assignment,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Record sep_or_term_list(field_assignment,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr +## In state 291, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 290, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Record LBRACKET Ident EQ Bytes End +## +## Ends in an error in state: 287. +## +## ne_injection(Record,field_assignment) -> Record LBRACKET sep_or_term_list(field_assignment,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Record LBRACKET sep_or_term_list(field_assignment,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr +## In state 291, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 290, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Record LBRACKET With +## +## Ends in an error in state: 286. +## +## ne_injection(Record,field_assignment) -> Record LBRACKET . sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Record LBRACKET +## + + + +interactive_expr: Begin Patch Ident With Record With +## +## Ends in an error in state: 285. +## +## ne_injection(Record,field_assignment) -> Record . sep_or_term_list(field_assignment,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## ne_injection(Record,field_assignment) -> Record . LBRACKET sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Record +## + + + +interactive_expr: Begin Patch Ident With Set LBRACKET Verbatim End +## +## Ends in an error in state: 272. +## +## ne_injection(Set,expr) -> Set LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Set LBRACKET sep_or_term_list(expr,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Set LBRACKET With +## +## Ends in an error in state: 271. +## +## ne_injection(Set,expr) -> Set LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Set LBRACKET +## + + + +interactive_expr: Begin Patch Ident With Set Verbatim RBRACKET +## +## Ends in an error in state: 283. +## +## ne_injection(Set,expr) -> Set sep_or_term_list(expr,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Set sep_or_term_list(expr,SEMI) +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## + + + +interactive_expr: Begin Patch Ident With Set With +## +## Ends in an error in state: 270. +## +## ne_injection(Set,expr) -> Set . sep_or_term_list(expr,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] +## ne_injection(Set,expr) -> Set . LBRACKET sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Set +## + + + +interactive_expr: Begin Patch Ident With With +## +## Ends in an error in state: 269. +## +## map_patch -> Patch path With . ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] +## record_patch -> Patch path With . ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_patch -> Patch path With . ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Patch path With +## + + + +interactive_expr: Begin Patch With +## +## Ends in an error in state: 267. +## +## map_patch -> Patch . path With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] +## record_patch -> Patch . path With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_patch -> Patch . path With ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Patch +## + + + +interactive_expr: Begin Remove Verbatim From Map With +## +## Ends in an error in state: 265. +## +## map_remove -> Remove expr From Map . path [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Remove expr From Map +## + + + +interactive_expr: Begin Remove Verbatim From Set With +## +## Ends in an error in state: 263. +## +## set_remove -> Remove expr From Set . path [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Remove expr From Set +## + + + +interactive_expr: Begin Remove Verbatim From With +## +## Ends in an error in state: 262. +## +## map_remove -> Remove expr From . Map path [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_remove -> Remove expr From . Set path [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Remove expr From +## + + + +interactive_expr: Begin Remove Verbatim VBAR +## +## Ends in an error in state: 261. +## +## map_remove -> Remove expr . From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_remove -> Remove expr . From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Remove expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin Remove With +## +## Ends in an error in state: 260. +## +## map_remove -> Remove . expr From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] +## set_remove -> Remove . expr From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Remove +## + + + +interactive_expr: Begin Skip End While +## +## Ends in an error in state: 238. +## +## block_with -> block . With expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## +## The known suffix of the stack is as follows: +## block +## + + + +interactive_expr: Begin Skip End With With +## +## Ends in an error in state: 239. +## +## block_with -> block With . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## +## The known suffix of the stack is as follows: +## block With +## + + + +interactive_expr: Begin Skip RBRACE +## +## Ends in an error in state: 500. +## +## block -> Begin sep_or_term_list(statement,SEMI) . End [ With VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Begin sep_or_term_list(statement,SEMI) +## +## 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 478, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 495, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## + + + +interactive_expr: Begin Skip SEMI Skip SEMI With +## +## Ends in an error in state: 481. +## +## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] +## seq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] +## +## The known suffix of the stack is as follows: +## statement SEMI +## + + + +interactive_expr: Begin Skip SEMI Skip With +## +## Ends in an error in state: 480. +## +## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] +## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] +## seq(__anonymous_0(statement,SEMI)) -> statement . SEMI seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] +## +## The known suffix of the stack is as follows: +## statement +## + + + +interactive_expr: Begin Skip SEMI With +## +## Ends in an error in state: 479. +## +## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] +## nseq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] +## +## The known suffix of the stack is as follows: +## statement SEMI +## + + + +interactive_expr: Begin Skip With +## +## Ends in an error in state: 478. +## +## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] +## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] +## nseq(__anonymous_0(statement,SEMI)) -> statement . SEMI seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] +## +## The known suffix of the stack is as follows: +## statement +## + + + +interactive_expr: Begin Var Ident ASS With +## +## Ends in an error in state: 151. +## +## unqualified_decl(ASS) -> Ident option(type_annot) ASS . expr [ SEMI RBRACE End ] +## +## The known suffix of the stack is as follows: +## Ident option(type_annot) ASS +## + + + +interactive_expr: Begin Var Ident COLON Ident VBAR +## +## Ends in an error in state: 150. +## +## unqualified_decl(ASS) -> Ident option(type_annot) . ASS expr [ SEMI RBRACE End ] +## +## The known suffix of the stack is as follows: +## Ident option(type_annot) +## +## 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 16, spurious reduction of production core_type -> Ident +## In state 30, spurious reduction of production cartesian -> core_type +## In state 36, spurious reduction of production fun_type -> cartesian +## In state 44, spurious reduction of production type_expr -> fun_type +## In state 88, spurious reduction of production type_annot -> COLON type_expr +## In state 89, spurious reduction of production option(type_annot) -> type_annot +## + + + +interactive_expr: Begin Var Ident With +## +## Ends in an error in state: 149. +## +## unqualified_decl(ASS) -> Ident . option(type_annot) ASS expr [ SEMI RBRACE End ] +## +## The known suffix of the stack is as follows: +## Ident +## + + + +interactive_expr: Begin Var With ## ## Ends in an error in state: 148. ## +## open_var_decl -> Var . unqualified_decl(ASS) [ SEMI RBRACE End ] +## +## The known suffix of the stack is as follows: +## Var +## + + + +interactive_expr: Begin While Verbatim VBAR +## +## Ends in an error in state: 507. +## +## while_loop -> While expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## While expr +## +## 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 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## + + + +interactive_expr: Begin While With +## +## Ends in an error in state: 143. +## +## while_loop -> While . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## While +## + + + +interactive_expr: Begin With +## +## Ends in an error in state: 147. +## +## block -> Begin . sep_or_term_list(statement,SEMI) End [ With VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Begin +## + + + +interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End +## +## Ends in an error in state: 502. +## ## injection(BigMap,binding) -> BigMap LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## ## The known suffix of the stack is as follows: @@ -11,26 +1251,26 @@ interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: BigMap LBRACKET With ## -## Ends in an error in state: 141. +## Ends in an error in state: 145. ## ## injection(BigMap,binding) -> BigMap LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(BigMap,binding) -> BigMap LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -43,7 +1283,7 @@ interactive_expr: BigMap LBRACKET With interactive_expr: BigMap Verbatim ARROW Bytes RBRACKET ## -## Ends in an error in state: 259. +## Ends in an error in state: 505. ## ## injection(BigMap,binding) -> BigMap sep_or_term_list(binding,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -54,26 +1294,26 @@ interactive_expr: BigMap Verbatim ARROW Bytes RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: BigMap With ## -## Ends in an error in state: 140. +## Ends in an error in state: 144. ## ## injection(BigMap,binding) -> BigMap . sep_or_term_list(binding,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(BigMap,binding) -> BigMap . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -86,9 +1326,52 @@ interactive_expr: BigMap With +interactive_expr: Block LBRACE Skip End +## +## Ends in an error in state: 509. +## +## block -> Block LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Block LBRACE sep_or_term_list(statement,SEMI) +## +## 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 478, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 495, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## + + + +interactive_expr: Block LBRACE With +## +## Ends in an error in state: 142. +## +## block -> Block LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Block LBRACE +## + + + +interactive_expr: Block With +## +## Ends in an error in state: 141. +## +## block -> Block . LBRACE sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## Block +## + + + interactive_expr: C_Some With ## -## Ends in an error in state: 136. +## Ends in an error in state: 137. ## ## core_expr -> C_Some . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -100,7 +1383,7 @@ interactive_expr: C_Some With interactive_expr: Case Verbatim Of C_Some LPAR WILD With ## -## Ends in an error in state: 287. +## Ends in an error in state: 390. ## ## par(core_pattern) -> LPAR core_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -112,7 +1395,7 @@ interactive_expr: Case Verbatim Of C_Some LPAR WILD With interactive_expr: Case Verbatim Of C_Some LPAR With ## -## Ends in an error in state: 279. +## Ends in an error in state: 382. ## ## par(core_pattern) -> LPAR . core_pattern RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -124,7 +1407,7 @@ interactive_expr: Case Verbatim Of C_Some LPAR With interactive_expr: Case Verbatim Of C_Some With ## -## Ends in an error in state: 278. +## Ends in an error in state: 381. ## ## constr_pattern -> C_Some . par(core_pattern) [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -136,7 +1419,7 @@ interactive_expr: Case Verbatim Of C_Some With interactive_expr: Case Verbatim Of Constr LPAR WILD With ## -## Ends in an error in state: 293. +## Ends in an error in state: 396. ## ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . COMMA nsepseq(core_pattern,COMMA) [ RPAR ] @@ -149,7 +1432,7 @@ interactive_expr: Case Verbatim Of Constr LPAR WILD With interactive_expr: Case Verbatim Of Constr LPAR With ## -## Ends in an error in state: 277. +## Ends in an error in state: 380. ## ## par(nsepseq(core_pattern,COMMA)) -> LPAR . nsepseq(core_pattern,COMMA) RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -161,7 +1444,7 @@ interactive_expr: Case Verbatim Of Constr LPAR With interactive_expr: Case Verbatim Of Constr With ## -## Ends in an error in state: 276. +## Ends in an error in state: 379. ## ## constr_pattern -> Constr . tuple_pattern [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -174,7 +1457,7 @@ interactive_expr: Case Verbatim Of Constr With interactive_expr: Case Verbatim Of LBRACKET VBAR Block ## -## Ends in an error in state: 264. +## Ends in an error in state: 514. ## ## case(expr) -> Case expr Of LBRACKET option(VBAR) . cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -186,7 +1469,7 @@ interactive_expr: Case Verbatim Of LBRACKET VBAR Block interactive_expr: Case Verbatim Of LBRACKET WILD ARROW Bytes End ## -## Ends in an error in state: 328. +## Ends in an error in state: 519. ## ## case(expr) -> Case expr Of LBRACKET option(VBAR) cases(expr) . RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -197,26 +1480,26 @@ interactive_expr: Case Verbatim Of LBRACKET WILD ARROW Bytes End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 326, spurious reduction of production case_clause(expr) -> pattern ARROW expr -## In state 330, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) -## In state 327, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 517, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 521, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 518, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) ## interactive_expr: Case Verbatim Of LBRACKET With ## -## Ends in an error in state: 263. +## Ends in an error in state: 513. ## ## case(expr) -> Case expr Of LBRACKET . option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -228,7 +1511,7 @@ interactive_expr: Case Verbatim Of LBRACKET With interactive_expr: Case Verbatim Of LPAR WILD COMMA With ## -## Ends in an error in state: 294. +## Ends in an error in state: 397. ## ## nsepseq(core_pattern,COMMA) -> core_pattern COMMA . nsepseq(core_pattern,COMMA) [ RPAR ] ## @@ -240,7 +1523,7 @@ interactive_expr: Case Verbatim Of LPAR WILD COMMA With interactive_expr: Case Verbatim Of LPAR WILD CONS Bytes ARROW ## -## Ends in an error in state: 306. +## Ends in an error in state: 409. ## ## par(cons_pattern) -> LPAR cons_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -251,15 +1534,15 @@ interactive_expr: Case Verbatim Of LPAR WILD CONS Bytes ARROW ## 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 300, spurious reduction of production pattern -> core_pattern -## In state 299, spurious reduction of production cons_pattern -> core_pattern CONS pattern +## In state 403, spurious reduction of production pattern -> core_pattern +## In state 402, spurious reduction of production cons_pattern -> core_pattern CONS pattern ## interactive_expr: Case Verbatim Of LPAR WILD CONS With ## -## Ends in an error in state: 298. +## Ends in an error in state: 401. ## ## cons_pattern -> core_pattern CONS . pattern [ RPAR ] ## @@ -271,7 +1554,7 @@ interactive_expr: Case Verbatim Of LPAR WILD CONS With interactive_expr: Case Verbatim Of LPAR WILD With ## -## Ends in an error in state: 297. +## Ends in an error in state: 400. ## ## cons_pattern -> core_pattern . CONS pattern [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] @@ -285,7 +1568,7 @@ interactive_expr: Case Verbatim Of LPAR WILD With interactive_expr: Case Verbatim Of LPAR With ## -## Ends in an error in state: 272. +## Ends in an error in state: 375. ## ## par(cons_pattern) -> LPAR . cons_pattern RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## par(nsepseq(core_pattern,COMMA)) -> LPAR . nsepseq(core_pattern,COMMA) RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -298,7 +1581,7 @@ interactive_expr: Case Verbatim Of LPAR With interactive_expr: Case Verbatim Of List LBRACKET WILD End ## -## Ends in an error in state: 310. +## Ends in an error in state: 413. ## ## injection(List,core_pattern) -> List LBRACKET sep_or_term_list(core_pattern,SEMI) . RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -309,15 +1592,15 @@ interactive_expr: Case Verbatim Of List LBRACKET WILD End ## 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 314, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern -## In state 313, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) +## In state 417, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 416, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) ## interactive_expr: Case Verbatim Of List LBRACKET With ## -## Ends in an error in state: 308. +## Ends in an error in state: 411. ## ## injection(List,core_pattern) -> List LBRACKET . sep_or_term_list(core_pattern,SEMI) RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## injection(List,core_pattern) -> List LBRACKET . RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -330,7 +1613,7 @@ interactive_expr: Case Verbatim Of List LBRACKET With interactive_expr: Case Verbatim Of List WILD RBRACKET ## -## Ends in an error in state: 322. +## Ends in an error in state: 425. ## ## injection(List,core_pattern) -> List sep_or_term_list(core_pattern,SEMI) . End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -341,15 +1624,15 @@ interactive_expr: Case Verbatim Of List WILD RBRACKET ## 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 314, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern -## In state 313, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) +## In state 417, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 416, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) ## interactive_expr: Case Verbatim Of List WILD SEMI WILD SEMI With ## -## Ends in an error in state: 319. +## Ends in an error in state: 422. ## ## nsepseq(core_pattern,SEMI) -> core_pattern SEMI . nsepseq(core_pattern,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(core_pattern,SEMI)) -> core_pattern SEMI . seq(__anonymous_0(core_pattern,SEMI)) [ RBRACKET End ] @@ -362,7 +1645,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI WILD SEMI With interactive_expr: Case Verbatim Of List WILD SEMI WILD With ## -## Ends in an error in state: 318. +## Ends in an error in state: 421. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -376,7 +1659,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI WILD With interactive_expr: Case Verbatim Of List WILD SEMI With ## -## Ends in an error in state: 315. +## Ends in an error in state: 418. ## ## nsepseq(core_pattern,SEMI) -> core_pattern SEMI . nsepseq(core_pattern,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(core_pattern,SEMI)) -> core_pattern SEMI . seq(__anonymous_0(core_pattern,SEMI)) [ RBRACKET End ] @@ -389,7 +1672,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI With interactive_expr: Case Verbatim Of List WILD With ## -## Ends in an error in state: 314. +## Ends in an error in state: 417. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -403,7 +1686,7 @@ interactive_expr: Case Verbatim Of List WILD With interactive_expr: Case Verbatim Of List With ## -## Ends in an error in state: 271. +## Ends in an error in state: 374. ## ## injection(List,core_pattern) -> List . sep_or_term_list(core_pattern,SEMI) End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## injection(List,core_pattern) -> List . End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -418,7 +1701,7 @@ interactive_expr: Case Verbatim Of List With interactive_expr: Case Verbatim Of VBAR Block ## -## Ends in an error in state: 333. +## Ends in an error in state: 524. ## ## case(expr) -> Case expr Of option(VBAR) . cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -430,7 +1713,7 @@ interactive_expr: Case Verbatim Of VBAR Block interactive_expr: Case Verbatim Of WILD ARROW Bytes RBRACKET ## -## Ends in an error in state: 334. +## Ends in an error in state: 525. ## ## case(expr) -> Case expr Of option(VBAR) cases(expr) . End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -441,26 +1724,26 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 326, spurious reduction of production case_clause(expr) -> pattern ARROW expr -## In state 330, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) -## In state 327, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 517, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 521, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 518, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) ## interactive_expr: Case Verbatim Of WILD ARROW Bytes Type ## -## Ends in an error in state: 330. +## Ends in an error in state: 521. ## ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) . [ RBRACKET End ] ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) . VBAR nsepseq(case_clause(expr),VBAR) [ RBRACKET End ] @@ -472,24 +1755,24 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes Type ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 326, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 517, spurious reduction of production case_clause(expr) -> pattern ARROW expr ## interactive_expr: Case Verbatim Of WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 331. +## Ends in an error in state: 522. ## ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) VBAR . nsepseq(case_clause(expr),VBAR) [ RBRACKET End ] ## @@ -501,7 +1784,7 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes VBAR With interactive_expr: Case Verbatim Of WILD ARROW With ## -## Ends in an error in state: 325. +## Ends in an error in state: 516. ## ## case_clause(expr) -> pattern ARROW . expr [ VBAR RBRACKET End ] ## @@ -513,7 +1796,7 @@ interactive_expr: Case Verbatim Of WILD ARROW With interactive_expr: Case Verbatim Of WILD CONS WILD CONS With ## -## Ends in an error in state: 304. +## Ends in an error in state: 407. ## ## nsepseq(core_pattern,CONS) -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -525,7 +1808,7 @@ interactive_expr: Case Verbatim Of WILD CONS WILD CONS With interactive_expr: Case Verbatim Of WILD CONS WILD With ## -## Ends in an error in state: 303. +## Ends in an error in state: 406. ## ## nsepseq(core_pattern,CONS) -> core_pattern . [ RPAR ARROW ] ## nsepseq(core_pattern,CONS) -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -538,7 +1821,7 @@ interactive_expr: Case Verbatim Of WILD CONS WILD With interactive_expr: Case Verbatim Of WILD CONS With ## -## Ends in an error in state: 301. +## Ends in an error in state: 404. ## ## pattern -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -550,7 +1833,7 @@ interactive_expr: Case Verbatim Of WILD CONS With interactive_expr: Case Verbatim Of WILD RPAR ## -## Ends in an error in state: 324. +## Ends in an error in state: 515. ## ## case_clause(expr) -> pattern . ARROW expr [ VBAR RBRACKET End ] ## @@ -561,14 +1844,14 @@ interactive_expr: Case Verbatim Of WILD RPAR ## 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 300, spurious reduction of production pattern -> core_pattern +## In state 403, spurious reduction of production pattern -> core_pattern ## interactive_expr: Case Verbatim Of WILD With ## -## Ends in an error in state: 300. +## Ends in an error in state: 403. ## ## pattern -> core_pattern . [ RPAR ARROW ] ## pattern -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -581,7 +1864,7 @@ interactive_expr: Case Verbatim Of WILD With interactive_expr: Case Verbatim Of With ## -## Ends in an error in state: 262. +## Ends in an error in state: 512. ## ## case(expr) -> Case expr Of . option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case expr Of . LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -594,7 +1877,7 @@ interactive_expr: Case Verbatim Of With interactive_expr: Case Verbatim VBAR ## -## Ends in an error in state: 261. +## Ends in an error in state: 511. ## ## case(expr) -> Case expr . Of option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case expr . Of LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -606,23 +1889,23 @@ interactive_expr: Case Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Case With ## -## Ends in an error in state: 135. +## Ends in an error in state: 136. ## ## case(expr) -> Case . expr Of option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case . expr Of LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -635,7 +1918,7 @@ interactive_expr: Case With interactive_expr: Constr DOT And With ## -## Ends in an error in state: 176. +## Ends in an error in state: 183. ## ## core_expr -> module_field . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## fun_call -> module_field . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -648,7 +1931,7 @@ interactive_expr: Constr DOT And With interactive_expr: Constr DOT Ident DOT With ## -## Ends in an error in state: 124. +## Ends in an error in state: 125. ## ## projection -> Constr DOT Ident DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -660,7 +1943,7 @@ interactive_expr: Constr DOT Ident DOT With interactive_expr: Constr DOT Ident With ## -## Ends in an error in state: 123. +## Ends in an error in state: 124. ## ## module_fun -> Ident . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -673,7 +1956,7 @@ interactive_expr: Constr DOT Ident With interactive_expr: Constr DOT With ## -## Ends in an error in state: 119. +## Ends in an error in state: 120. ## ## module_field -> Constr DOT . module_fun [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -686,7 +1969,7 @@ interactive_expr: Constr DOT With interactive_expr: Constr With ## -## Ends in an error in state: 118. +## Ends in an error in state: 119. ## ## core_expr -> Constr . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## core_expr -> Constr . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -699,55 +1982,46 @@ interactive_expr: Constr With -interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String Is With +interactive_expr: Function LPAR Const Ident RPAR COLON Ident VBAR ## ## Ends in an error in state: 116. ## -## fun_expr -> Function parameters COLON type_expr Is . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## fun_expr -> Function parameters option(type_annot) . Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## ## The known suffix of the stack is as follows: -## Function parameters COLON type_expr Is -## - - - -interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String VBAR -## -## Ends in an error in state: 115. -## -## fun_expr -> Function parameters COLON type_expr . Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Function parameters COLON type_expr +## Function parameters option(type_annot) ## ## 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 16, spurious reduction of production core_type -> Ident ## In state 30, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 44, spurious reduction of production type_expr -> fun_type +## In state 88, spurious reduction of production type_annot -> COLON type_expr +## In state 89, spurious reduction of production option(type_annot) -> type_annot ## -interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON With +interactive_expr: Function LPAR Const Ident RPAR Is With ## -## Ends in an error in state: 114. +## Ends in an error in state: 117. ## -## fun_expr -> Function parameters COLON . type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## fun_expr -> Function parameters option(type_annot) Is . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## ## The known suffix of the stack is as follows: -## Function parameters COLON +## Function parameters option(type_annot) Is ## -interactive_expr: Function LPAR Const Ident COLON Ident RPAR With +interactive_expr: Function LPAR Const Ident RPAR With ## -## Ends in an error in state: 113. +## Ends in an error in state: 115. ## -## fun_expr -> Function parameters . COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## fun_expr -> Function parameters . option(type_annot) Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## ## The known suffix of the stack is as follows: ## Function parameters @@ -755,23 +2029,11 @@ interactive_expr: Function LPAR Const Ident COLON Ident RPAR With -interactive_expr: Function LPAR Const Ident COLON With +interactive_expr: Function LPAR Const Ident With ## ## Ends in an error in state: 79. ## -## param_decl -> Const Ident COLON . param_type [ SEMI RPAR ] -## -## The known suffix of the stack is as follows: -## Const Ident COLON -## - - - -interactive_expr: Function LPAR Const Ident With -## -## Ends in an error in state: 78. -## -## param_decl -> Const Ident . COLON param_type [ SEMI RPAR ] +## param_decl -> Const Ident . option(param_type) [ SEMI RPAR ] ## ## The known suffix of the stack is as follows: ## Const Ident @@ -781,9 +2043,9 @@ interactive_expr: Function LPAR Const Ident With interactive_expr: Function LPAR Const With ## -## Ends in an error in state: 77. +## Ends in an error in state: 78. ## -## param_decl -> Const . Ident COLON param_type [ SEMI RPAR ] +## param_decl -> Const . Ident option(param_type) [ SEMI RPAR ] ## ## The known suffix of the stack is as follows: ## Const @@ -791,19 +2053,7 @@ interactive_expr: Function LPAR Const With -interactive_expr: Function LPAR Var Ident COLON Ident SEMI With -## -## Ends in an error in state: 82. -## -## nsepseq(param_decl,SEMI) -> param_decl SEMI . nsepseq(param_decl,SEMI) [ RPAR ] -## -## The known suffix of the stack is as follows: -## param_decl SEMI -## - - - -interactive_expr: Function LPAR Var Ident COLON Ident VBAR +interactive_expr: Function LPAR Var Ident COLON String VBAR ## ## Ends in an error in state: 81. ## @@ -817,11 +2067,35 @@ interactive_expr: Function LPAR Var Ident COLON Ident VBAR ## 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 16, spurious reduction of production core_type -> Ident ## In state 30, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian -## In state 76, spurious reduction of production param_type -> fun_type -## In state 75, spurious reduction of production param_decl -> Var Ident COLON param_type +## In state 75, spurious reduction of production param_type -> COLON fun_type +## In state 76, spurious reduction of production option(param_type) -> param_type +## In state 77, spurious reduction of production param_decl -> Var Ident option(param_type) +## + + + +interactive_expr: Function LPAR Var Ident COLON With +## +## Ends in an error in state: 74. +## +## param_type -> COLON . fun_type [ SEMI RPAR ] +## +## The known suffix of the stack is as follows: +## COLON +## + + + +interactive_expr: Function LPAR Var Ident SEMI With +## +## Ends in an error in state: 82. +## +## nsepseq(param_decl,SEMI) -> param_decl SEMI . nsepseq(param_decl,SEMI) [ RPAR ] +## +## The known suffix of the stack is as follows: +## param_decl SEMI ## @@ -830,7 +2104,7 @@ interactive_expr: Function LPAR Var Ident With ## ## Ends in an error in state: 73. ## -## param_decl -> Var Ident . COLON param_type [ SEMI RPAR ] +## param_decl -> Var Ident . option(param_type) [ SEMI RPAR ] ## ## The known suffix of the stack is as follows: ## Var Ident @@ -842,7 +2116,7 @@ interactive_expr: Function LPAR Var With ## ## Ends in an error in state: 72. ## -## param_decl -> Var . Ident COLON param_type [ SEMI RPAR ] +## param_decl -> Var . Ident option(param_type) [ SEMI RPAR ] ## ## The known suffix of the stack is as follows: ## Var @@ -854,7 +2128,7 @@ interactive_expr: Function LPAR With ## ## Ends in an error in state: 71. ## -## par(nsepseq(param_decl,SEMI)) -> LPAR . nsepseq(param_decl,SEMI) RPAR [ COLON ] +## par(nsepseq(param_decl,SEMI)) -> LPAR . nsepseq(param_decl,SEMI) RPAR [ Is COLON ] ## ## The known suffix of the stack is as follows: ## LPAR @@ -864,9 +2138,9 @@ interactive_expr: Function LPAR With interactive_expr: Function With ## -## Ends in an error in state: 112. +## Ends in an error in state: 114. ## -## fun_expr -> Function . parameters COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] +## fun_expr -> Function . parameters option(type_annot) Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## ## The known suffix of the stack is as follows: ## Function @@ -876,7 +2150,7 @@ interactive_expr: Function With interactive_expr: Ident DOT Ident ASS ## -## Ends in an error in state: 151. +## Ends in an error in state: 158. ## ## fun_call_or_par_or_projection -> projection . option(arguments) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## path -> projection . [ With LBRACKET ] @@ -888,15 +2162,15 @@ interactive_expr: Ident DOT Ident ASS ## 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 127, spurious reduction of production nsepseq(selection,DOT) -> selection -## In state 160, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 128, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 167, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) ## interactive_expr: Ident DOT Int DOT With ## -## Ends in an error in state: 128. +## Ends in an error in state: 129. ## ## nsepseq(selection,DOT) -> selection DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -908,7 +2182,7 @@ interactive_expr: Ident DOT Int DOT With interactive_expr: Ident DOT Int While ## -## Ends in an error in state: 127. +## Ends in an error in state: 128. ## ## nsepseq(selection,DOT) -> selection . [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## nsepseq(selection,DOT) -> selection . DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -921,7 +2195,7 @@ interactive_expr: Ident DOT Int While interactive_expr: Ident DOT With ## -## Ends in an error in state: 159. +## Ends in an error in state: 166. ## ## projection -> Ident DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -933,7 +2207,7 @@ interactive_expr: Ident DOT With interactive_expr: Ident LBRACKET Verbatim VBAR ## -## Ends in an error in state: 243. +## Ends in an error in state: 254. ## ## brackets(expr) -> LBRACKET expr . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -944,23 +2218,23 @@ interactive_expr: Ident LBRACKET Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Ident LBRACKET With ## -## Ends in an error in state: 242. +## Ends in an error in state: 253. ## ## brackets(expr) -> LBRACKET . expr RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -972,7 +2246,7 @@ interactive_expr: Ident LBRACKET With interactive_expr: Ident LPAR Verbatim COMMA With ## -## Ends in an error in state: 341. +## Ends in an error in state: 531. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -984,7 +2258,7 @@ interactive_expr: Ident LPAR Verbatim COMMA With interactive_expr: Ident LPAR Verbatim VBAR ## -## Ends in an error in state: 340. +## Ends in an error in state: 530. ## ## nsepseq(expr,COMMA) -> expr . [ RPAR ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -996,23 +2270,23 @@ interactive_expr: Ident LPAR Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Ident LPAR With ## -## Ends in an error in state: 111. +## Ends in an error in state: 113. ## ## par(nsepseq(expr,COMMA)) -> LPAR . nsepseq(expr,COMMA) RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1024,7 +2298,7 @@ interactive_expr: Ident LPAR With interactive_expr: Ident While ## -## Ends in an error in state: 110. +## Ends in an error in state: 112. ## ## core_expr -> Ident . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## fun_call -> Ident . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1037,45 +2311,9 @@ interactive_expr: Ident While -interactive_expr: Ident With Record Constr DOT Ident With -## -## Ends in an error in state: 163. -## -## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] -## -## The known suffix of the stack is as follows: -## Constr DOT Ident -## - - - -interactive_expr: Ident With Record Constr DOT With -## -## Ends in an error in state: 162. -## -## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] -## -## The known suffix of the stack is as follows: -## Constr DOT -## - - - -interactive_expr: Ident With Record Constr With -## -## Ends in an error in state: 161. -## -## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] -## -## The known suffix of the stack is as follows: -## Constr -## - - - interactive_expr: Ident With Record Ident EQ Bytes RBRACKET ## -## Ends in an error in state: 239. +## Ends in an error in state: 250. ## ## ne_injection(Record,field_path_assignment) -> Record sep_or_term_list(field_path_assignment,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1086,26 +2324,26 @@ interactive_expr: Ident With Record Ident EQ Bytes RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 194, spurious reduction of production field_path_assignment -> path EQ expr -## In state 232, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment -## In state 231, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 201, spurious reduction of production field_path_assignment -> path EQ expr +## In state 243, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 242, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) ## interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 237. +## Ends in an error in state: 248. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACKET End ] @@ -1118,7 +2356,7 @@ interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes SEMI With interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## -## Ends in an error in state: 236. +## Ends in an error in state: 247. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACKET End ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] @@ -1131,24 +2369,24 @@ interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 194, spurious reduction of production field_path_assignment -> path EQ expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 201, spurious reduction of production field_path_assignment -> path EQ expr ## interactive_expr: Ident With Record Ident EQ Bytes SEMI With ## -## Ends in an error in state: 233. +## Ends in an error in state: 244. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACKET End ] @@ -1161,7 +2399,7 @@ interactive_expr: Ident With Record Ident EQ Bytes SEMI With interactive_expr: Ident With Record Ident EQ Bytes VBAR ## -## Ends in an error in state: 232. +## Ends in an error in state: 243. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACKET End ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] @@ -1174,24 +2412,24 @@ interactive_expr: Ident With Record Ident EQ Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 194, spurious reduction of production field_path_assignment -> path EQ expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 201, spurious reduction of production field_path_assignment -> path EQ expr ## interactive_expr: Ident With Record Ident EQ With ## -## Ends in an error in state: 168. +## Ends in an error in state: 175. ## ## field_path_assignment -> path EQ . expr [ SEMI RBRACKET End ] ## @@ -1201,22 +2439,9 @@ interactive_expr: Ident With Record Ident EQ With -interactive_expr: Ident With Record Ident While -## -## Ends in an error in state: 158. -## -## path -> Ident . [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] -## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] -## -## The known suffix of the stack is as follows: -## Ident -## - - - interactive_expr: Ident With Record Ident With ## -## Ends in an error in state: 167. +## Ends in an error in state: 174. ## ## field_path_assignment -> path . EQ expr [ SEMI RBRACKET End ] ## @@ -1227,14 +2452,14 @@ interactive_expr: Ident With Record Ident With ## 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 158, spurious reduction of production path -> Ident +## In state 165, spurious reduction of production path -> Ident ## interactive_expr: Ident With Record LBRACKET Ident EQ Bytes End ## -## Ends in an error in state: 164. +## Ends in an error in state: 171. ## ## ne_injection(Record,field_path_assignment) -> Record LBRACKET sep_or_term_list(field_path_assignment,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1245,26 +2470,26 @@ interactive_expr: Ident With Record LBRACKET Ident EQ Bytes End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 194, spurious reduction of production field_path_assignment -> path EQ expr -## In state 232, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment -## In state 231, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 201, spurious reduction of production field_path_assignment -> path EQ expr +## In state 243, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 242, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) ## interactive_expr: Ident With Record LBRACKET With ## -## Ends in an error in state: 157. +## Ends in an error in state: 164. ## ## ne_injection(Record,field_path_assignment) -> Record LBRACKET . sep_or_term_list(field_path_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1276,7 +2501,7 @@ interactive_expr: Ident With Record LBRACKET With interactive_expr: Ident With Record With ## -## Ends in an error in state: 156. +## Ends in an error in state: 163. ## ## ne_injection(Record,field_path_assignment) -> Record . sep_or_term_list(field_path_assignment,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## ne_injection(Record,field_path_assignment) -> Record . LBRACKET sep_or_term_list(field_path_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1289,7 +2514,7 @@ interactive_expr: Ident With Record With interactive_expr: Ident With With ## -## Ends in an error in state: 155. +## Ends in an error in state: 162. ## ## update_record -> path With . ne_injection(Record,field_path_assignment) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1301,7 +2526,7 @@ interactive_expr: Ident With With interactive_expr: If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 348. +## Ends in an error in state: 537. ## ## cond_expr -> If expr Then expr option(SEMI) Else . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1313,7 +2538,7 @@ interactive_expr: If Verbatim Then Verbatim Else With interactive_expr: If Verbatim Then Verbatim SEMI EQ ## -## Ends in an error in state: 347. +## Ends in an error in state: 536. ## ## cond_expr -> If expr Then expr option(SEMI) . Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1325,7 +2550,7 @@ interactive_expr: If Verbatim Then Verbatim SEMI EQ interactive_expr: If Verbatim Then Verbatim VBAR ## -## Ends in an error in state: 346. +## Ends in an error in state: 535. ## ## cond_expr -> If expr Then expr . option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1336,23 +2561,23 @@ interactive_expr: If Verbatim Then Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: If Verbatim Then With ## -## Ends in an error in state: 345. +## Ends in an error in state: 534. ## ## cond_expr -> If expr Then . expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1364,7 +2589,7 @@ interactive_expr: If Verbatim Then With interactive_expr: If Verbatim VBAR ## -## Ends in an error in state: 344. +## Ends in an error in state: 533. ## ## cond_expr -> If expr . Then expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1375,23 +2600,23 @@ interactive_expr: If Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: If With ## -## Ends in an error in state: 109. +## Ends in an error in state: 111. ## ## cond_expr -> If . expr Then expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1401,21 +2626,9 @@ interactive_expr: If With -interactive_expr: LPAR Bytes RPAR With +interactive_expr: LPAR Begin Skip End With Bytes VBAR ## -## Ends in an error in state: 170. -## -## fun_call_or_par_or_projection -> par(expr) . option(arguments) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] -## -## The known suffix of the stack is as follows: -## par(expr) -## - - - -interactive_expr: LPAR If Verbatim Then Bytes Else Bytes VBAR -## -## Ends in an error in state: 352. +## Ends in an error in state: 541. ## ## par(expr) -> LPAR expr . RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## tuple_comp -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -1427,25 +2640,37 @@ interactive_expr: LPAR If Verbatim Then Bytes Else Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 349, spurious reduction of production cond_expr -> If expr Then expr option(SEMI) Else expr -## In state 228, spurious reduction of production expr -> cond_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 240, spurious reduction of production block_with -> block With expr +## In state 237, spurious reduction of production expr -> block_with +## + + + +interactive_expr: LPAR Bytes RPAR With +## +## Ends in an error in state: 177. +## +## fun_call_or_par_or_projection -> par(expr) . option(arguments) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] +## +## The known suffix of the stack is as follows: +## par(expr) ## interactive_expr: LPAR Verbatim COLON Ident VBAR ## -## Ends in an error in state: 359. +## Ends in an error in state: 548. ## ## par(annot_expr) -> LPAR annot_expr . RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1460,14 +2685,14 @@ interactive_expr: LPAR Verbatim COLON Ident VBAR ## In state 30, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 44, spurious reduction of production type_expr -> fun_type -## In state 358, spurious reduction of production annot_expr -> disj_expr COLON type_expr +## In state 547, spurious reduction of production annot_expr -> disj_expr COLON type_expr ## interactive_expr: LPAR Verbatim COLON With ## -## Ends in an error in state: 357. +## Ends in an error in state: 546. ## ## annot_expr -> disj_expr COLON . type_expr [ RPAR ] ## @@ -1479,7 +2704,7 @@ interactive_expr: LPAR Verbatim COLON With interactive_expr: LPAR Verbatim COMMA With ## -## Ends in an error in state: 354. +## Ends in an error in state: 543. ## ## tuple_comp -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -1491,7 +2716,7 @@ interactive_expr: LPAR Verbatim COMMA With interactive_expr: LPAR Verbatim VBAR ## -## Ends in an error in state: 356. +## Ends in an error in state: 545. ## ## annot_expr -> disj_expr . COLON type_expr [ RPAR ] ## disj_expr -> disj_expr . Or conj_expr [ RPAR Or COMMA COLON ] @@ -1504,22 +2729,22 @@ interactive_expr: LPAR Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr ## interactive_expr: LPAR With ## -## Ends in an error in state: 107. +## Ends in an error in state: 109. ## ## par(annot_expr) -> LPAR . annot_expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## par(expr) -> LPAR . expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1533,7 +2758,7 @@ interactive_expr: LPAR With interactive_expr: Lang Verbatim VBAR ## -## Ends in an error in state: 361. +## Ends in an error in state: 550. ## ## code_inj -> Lang expr . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1544,23 +2769,23 @@ interactive_expr: Lang Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Lang With ## -## Ends in an error in state: 106. +## Ends in an error in state: 108. ## ## code_inj -> Lang . expr RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1572,7 +2797,7 @@ interactive_expr: Lang With interactive_expr: List LBRACKET Verbatim End ## -## Ends in an error in state: 365. +## Ends in an error in state: 554. ## ## injection(List,expr) -> List LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1583,25 +2808,25 @@ interactive_expr: List LBRACKET Verbatim End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) ## interactive_expr: List LBRACKET With ## -## Ends in an error in state: 363. +## Ends in an error in state: 552. ## ## injection(List,expr) -> List LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(List,expr) -> List LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1614,7 +2839,7 @@ interactive_expr: List LBRACKET With interactive_expr: List Verbatim RBRACKET ## -## Ends in an error in state: 377. +## Ends in an error in state: 557. ## ## injection(List,expr) -> List sep_or_term_list(expr,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1625,25 +2850,25 @@ interactive_expr: List Verbatim RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) ## interactive_expr: List With ## -## Ends in an error in state: 105. +## Ends in an error in state: 107. ## ## injection(List,expr) -> List . sep_or_term_list(expr,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(List,expr) -> List . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1658,7 +2883,7 @@ interactive_expr: List With interactive_expr: MINUS With ## -## Ends in an error in state: 104. +## Ends in an error in state: 106. ## ## unary_expr -> MINUS . core_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1670,7 +2895,7 @@ interactive_expr: MINUS With interactive_expr: Map LBRACKET Verbatim ARROW Bytes End ## -## Ends in an error in state: 382. +## Ends in an error in state: 562. ## ## injection(Map,binding) -> Map LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1681,26 +2906,26 @@ interactive_expr: Map LBRACKET Verbatim ARROW Bytes End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: Map LBRACKET With ## -## Ends in an error in state: 380. +## Ends in an error in state: 560. ## ## injection(Map,binding) -> Map LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Map,binding) -> Map LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1713,7 +2938,7 @@ interactive_expr: Map LBRACKET With interactive_expr: Map Verbatim ARROW Bytes RBRACKET ## -## Ends in an error in state: 385. +## Ends in an error in state: 565. ## ## injection(Map,binding) -> Map sep_or_term_list(binding,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1724,26 +2949,26 @@ interactive_expr: Map Verbatim ARROW Bytes RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr +## In state 309, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 305, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes SEMI With ## -## Ends in an error in state: 256. +## Ends in an error in state: 314. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1756,7 +2981,7 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes SEMI With interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes VBAR ## -## Ends in an error in state: 255. +## Ends in an error in state: 313. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1769,24 +2994,24 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr ## interactive_expr: Map Verbatim ARROW Bytes SEMI With ## -## Ends in an error in state: 252. +## Ends in an error in state: 310. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1799,7 +3024,7 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI With interactive_expr: Map Verbatim ARROW Bytes VBAR ## -## Ends in an error in state: 251. +## Ends in an error in state: 309. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1812,24 +3037,24 @@ interactive_expr: Map Verbatim ARROW Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 308, spurious reduction of production binding -> expr ARROW expr ## interactive_expr: Map Verbatim ARROW With ## -## Ends in an error in state: 249. +## Ends in an error in state: 307. ## ## binding -> expr ARROW . expr [ SEMI RBRACKET End ] ## @@ -1841,7 +3066,7 @@ interactive_expr: Map Verbatim ARROW With interactive_expr: Map Verbatim VBAR ## -## Ends in an error in state: 248. +## Ends in an error in state: 306. ## ## binding -> expr . ARROW expr [ SEMI RBRACKET End ] ## @@ -1852,23 +3077,23 @@ interactive_expr: Map Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Map With ## -## Ends in an error in state: 103. +## Ends in an error in state: 105. ## ## injection(Map,binding) -> Map . sep_or_term_list(binding,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Map,binding) -> Map . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1883,7 +3108,7 @@ interactive_expr: Map With interactive_expr: Not Bytes With ## -## Ends in an error in state: 173. +## Ends in an error in state: 180. ## ## add_expr -> mult_expr . [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## mult_expr -> mult_expr . TIMES unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1898,7 +3123,7 @@ interactive_expr: Not Bytes With interactive_expr: Not With ## -## Ends in an error in state: 99. +## Ends in an error in state: 101. ## ## unary_expr -> Not . core_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1910,7 +3135,7 @@ interactive_expr: Not With interactive_expr: Record Ident EQ Bytes RBRACKET ## -## Ends in an error in state: 400. +## Ends in an error in state: 571. ## ## record_expr -> Record sep_or_term_list(field_assignment,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1921,26 +3146,26 @@ interactive_expr: Record Ident EQ Bytes RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr -## In state 393, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment -## In state 392, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr +## In state 291, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 290, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) ## interactive_expr: Record Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 398. +## Ends in an error in state: 296. ## ## nsepseq(field_assignment,SEMI) -> field_assignment SEMI . nsepseq(field_assignment,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(field_assignment,SEMI)) -> field_assignment SEMI . seq(__anonymous_0(field_assignment,SEMI)) [ RBRACKET End ] @@ -1953,7 +3178,7 @@ interactive_expr: Record Ident EQ Bytes SEMI Ident EQ Bytes SEMI With interactive_expr: Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## -## Ends in an error in state: 397. +## Ends in an error in state: 295. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACKET End ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACKET End ] @@ -1966,24 +3191,24 @@ interactive_expr: Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr ## interactive_expr: Record Ident EQ Bytes SEMI With ## -## Ends in an error in state: 394. +## Ends in an error in state: 292. ## ## nsepseq(field_assignment,SEMI) -> field_assignment SEMI . nsepseq(field_assignment,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(field_assignment,SEMI)) -> field_assignment SEMI . seq(__anonymous_0(field_assignment,SEMI)) [ RBRACKET End ] @@ -1996,7 +3221,7 @@ interactive_expr: Record Ident EQ Bytes SEMI With interactive_expr: Record Ident EQ Bytes VBAR ## -## Ends in an error in state: 393. +## Ends in an error in state: 291. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACKET End ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACKET End ] @@ -2009,24 +3234,24 @@ interactive_expr: Record Ident EQ Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr ## interactive_expr: Record Ident EQ With ## -## Ends in an error in state: 98. +## Ends in an error in state: 100. ## ## field_assignment -> Ident EQ . expr [ SEMI RBRACKET End ] ## @@ -2038,7 +3263,7 @@ interactive_expr: Record Ident EQ With interactive_expr: Record Ident With ## -## Ends in an error in state: 97. +## Ends in an error in state: 99. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACKET End ] ## @@ -2050,7 +3275,7 @@ interactive_expr: Record Ident With interactive_expr: Record LBRACKET Ident EQ Bytes End ## -## Ends in an error in state: 389. +## Ends in an error in state: 569. ## ## record_expr -> Record LBRACKET sep_or_term_list(field_assignment,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2061,26 +3286,26 @@ interactive_expr: Record LBRACKET Ident EQ Bytes End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr -## In state 393, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment -## In state 392, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 568, spurious reduction of production field_assignment -> Ident EQ expr +## In state 291, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 290, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) ## interactive_expr: Record LBRACKET With ## -## Ends in an error in state: 96. +## Ends in an error in state: 98. ## ## record_expr -> Record LBRACKET . sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2092,7 +3317,7 @@ interactive_expr: Record LBRACKET With interactive_expr: Record With ## -## Ends in an error in state: 95. +## Ends in an error in state: 97. ## ## record_expr -> Record . sep_or_term_list(field_assignment,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## record_expr -> Record . LBRACKET sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2105,7 +3330,7 @@ interactive_expr: Record With interactive_expr: Set LBRACKET Verbatim End ## -## Ends in an error in state: 404. +## Ends in an error in state: 575. ## ## injection(Set,expr) -> Set LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2116,25 +3341,25 @@ interactive_expr: Set LBRACKET Verbatim End ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) ## interactive_expr: Set LBRACKET With ## -## Ends in an error in state: 402. +## Ends in an error in state: 573. ## ## injection(Set,expr) -> Set LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Set,expr) -> Set LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2147,7 +3372,7 @@ interactive_expr: Set LBRACKET With interactive_expr: Set Verbatim RBRACKET ## -## Ends in an error in state: 407. +## Ends in an error in state: 578. ## ## injection(Set,expr) -> Set sep_or_term_list(expr,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2158,25 +3383,25 @@ interactive_expr: Set Verbatim RBRACKET ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 276, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 275, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) ## interactive_expr: Set Verbatim SEMI Verbatim SEMI With ## -## Ends in an error in state: 374. +## Ends in an error in state: 281. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] @@ -2189,7 +3414,7 @@ interactive_expr: Set Verbatim SEMI Verbatim SEMI With interactive_expr: Set Verbatim SEMI Verbatim VBAR ## -## Ends in an error in state: 373. +## Ends in an error in state: 280. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] @@ -2202,23 +3427,23 @@ interactive_expr: Set Verbatim SEMI Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Set Verbatim SEMI With ## -## Ends in an error in state: 370. +## Ends in an error in state: 277. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] @@ -2231,7 +3456,7 @@ interactive_expr: Set Verbatim SEMI With interactive_expr: Set Verbatim VBAR ## -## Ends in an error in state: 369. +## Ends in an error in state: 276. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] @@ -2244,23 +3469,23 @@ interactive_expr: Set Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Set With ## -## Ends in an error in state: 94. +## Ends in an error in state: 96. ## ## injection(Set,expr) -> Set . sep_or_term_list(expr,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Set,expr) -> Set . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2275,7 +3500,7 @@ interactive_expr: Set With interactive_expr: Verbatim And With ## -## Ends in an error in state: 225. +## Ends in an error in state: 232. ## ## conj_expr -> conj_expr And . set_membership [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of Function From End Else EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2287,7 +3512,7 @@ interactive_expr: Verbatim And With interactive_expr: Verbatim CAT With ## -## Ends in an error in state: 201. +## Ends in an error in state: 208. ## ## cat_expr -> cons_expr CAT . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2299,7 +3524,7 @@ interactive_expr: Verbatim CAT With interactive_expr: Verbatim COLON ## -## Ends in an error in state: 195. +## Ends in an error in state: 202. ## ## disj_expr -> disj_expr . Or conj_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## expr -> disj_expr . [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -2311,22 +3536,22 @@ interactive_expr: Verbatim COLON ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr ## interactive_expr: Verbatim CONS With ## -## Ends in an error in state: 208. +## Ends in an error in state: 215. ## ## cons_expr -> add_expr CONS . cons_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2338,7 +3563,7 @@ interactive_expr: Verbatim CONS With interactive_expr: Verbatim Contains With ## -## Ends in an error in state: 198. +## Ends in an error in state: 205. ## ## set_membership -> core_expr Contains . set_membership [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of Function From End Else EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2350,7 +3575,7 @@ interactive_expr: Verbatim Contains With interactive_expr: Verbatim EQ With ## -## Ends in an error in state: 221. +## Ends in an error in state: 228. ## ## comp_expr -> comp_expr EQ . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2362,7 +3587,7 @@ interactive_expr: Verbatim EQ With interactive_expr: Verbatim GE With ## -## Ends in an error in state: 219. +## Ends in an error in state: 226. ## ## comp_expr -> comp_expr GE . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2374,7 +3599,7 @@ interactive_expr: Verbatim GE With interactive_expr: Verbatim GT With ## -## Ends in an error in state: 217. +## Ends in an error in state: 224. ## ## comp_expr -> comp_expr GT . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2386,7 +3611,7 @@ interactive_expr: Verbatim GT With interactive_expr: Verbatim LE With ## -## Ends in an error in state: 215. +## Ends in an error in state: 222. ## ## comp_expr -> comp_expr LE . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2398,7 +3623,7 @@ interactive_expr: Verbatim LE With interactive_expr: Verbatim LT With ## -## Ends in an error in state: 213. +## Ends in an error in state: 220. ## ## comp_expr -> comp_expr LT . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2410,7 +3635,7 @@ interactive_expr: Verbatim LT With interactive_expr: Verbatim MINUS Verbatim With ## -## Ends in an error in state: 207. +## Ends in an error in state: 214. ## ## add_expr -> add_expr MINUS mult_expr . [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## mult_expr -> mult_expr . TIMES unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2425,7 +3650,7 @@ interactive_expr: Verbatim MINUS Verbatim With interactive_expr: Verbatim MINUS With ## -## Ends in an error in state: 206. +## Ends in an error in state: 213. ## ## add_expr -> add_expr MINUS . mult_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2437,7 +3662,7 @@ interactive_expr: Verbatim MINUS With interactive_expr: Verbatim Mod With ## -## Ends in an error in state: 191. +## Ends in an error in state: 198. ## ## mult_expr -> mult_expr Mod . unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2449,7 +3674,7 @@ interactive_expr: Verbatim Mod With interactive_expr: Verbatim NE With ## -## Ends in an error in state: 211. +## Ends in an error in state: 218. ## ## comp_expr -> comp_expr NE . cat_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of NE LT LE GT GE Function From End Else EQ EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## @@ -2461,7 +3686,7 @@ interactive_expr: Verbatim NE With interactive_expr: Verbatim Or With ## -## Ends in an error in state: 196. +## Ends in an error in state: 203. ## ## disj_expr -> disj_expr Or . conj_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of Function From End Else EOF Const COMMA COLON Block Begin Attributes ARROW ] ## @@ -2473,7 +3698,7 @@ interactive_expr: Verbatim Or With interactive_expr: Verbatim PLUS Verbatim With ## -## Ends in an error in state: 205. +## Ends in an error in state: 212. ## ## add_expr -> add_expr PLUS mult_expr . [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## mult_expr -> mult_expr . TIMES unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2488,7 +3713,7 @@ interactive_expr: Verbatim PLUS Verbatim With interactive_expr: Verbatim PLUS With ## -## Ends in an error in state: 204. +## Ends in an error in state: 211. ## ## add_expr -> add_expr PLUS . mult_expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2500,7 +3725,7 @@ interactive_expr: Verbatim PLUS With interactive_expr: Verbatim SLASH With ## -## Ends in an error in state: 189. +## Ends in an error in state: 196. ## ## mult_expr -> mult_expr SLASH . unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2512,7 +3737,7 @@ interactive_expr: Verbatim SLASH With interactive_expr: Verbatim TIMES With ## -## Ends in an error in state: 174. +## Ends in an error in state: 181. ## ## mult_expr -> mult_expr TIMES . unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2524,7 +3749,7 @@ interactive_expr: Verbatim TIMES With interactive_expr: Verbatim VBAR ## -## Ends in an error in state: 604. +## Ends in an error in state: 600. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -2535,23 +3760,23 @@ interactive_expr: Verbatim VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr ## interactive_expr: Verbatim With ## -## Ends in an error in state: 197. +## Ends in an error in state: 204. ## ## set_membership -> core_expr . Contains set_membership [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Or Of Function From End Else EOF Const COMMA COLON Block Begin Attributes And ARROW ] ## unary_expr -> core_expr . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2564,7 +3789,7 @@ interactive_expr: Verbatim With interactive_expr: With ## -## Ends in an error in state: 602. +## Ends in an error in state: 598. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2576,7 +3801,7 @@ interactive_expr: With contract: Attributes LBRACKET String End ## -## Ends in an error in state: 548. +## Ends in an error in state: 472. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET sep_or_term_list(String,SEMI) . RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2587,15 +3812,15 @@ contract: Attributes LBRACKET String End ## 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 540, spurious reduction of production nsepseq(String,SEMI) -> String -## In state 551, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) +## In state 464, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 475, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) ## contract: Attributes LBRACKET With ## -## Ends in an error in state: 547. +## Ends in an error in state: 471. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET . sep_or_term_list(String,SEMI) RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2607,7 +3832,7 @@ contract: Attributes LBRACKET With contract: Attributes String End Attributes String End SEMI With ## -## Ends in an error in state: 597. +## Ends in an error in state: 593. ## ## seq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2619,7 +3844,7 @@ contract: Attributes String End Attributes String End SEMI With contract: Attributes String End SEMI With ## -## Ends in an error in state: 595. +## Ends in an error in state: 591. ## ## nseq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2631,7 +3856,7 @@ contract: Attributes String End SEMI With contract: Attributes String End With ## -## Ends in an error in state: 590. +## Ends in an error in state: 586. ## ## attr_decl -> open_attr_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2643,7 +3868,7 @@ contract: Attributes String End With contract: Attributes String RBRACKET ## -## Ends in an error in state: 552. +## Ends in an error in state: 476. ## ## ne_injection(Attributes,String) -> Attributes sep_or_term_list(String,SEMI) . End [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2654,15 +3879,15 @@ contract: Attributes String RBRACKET ## 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 540, spurious reduction of production nsepseq(String,SEMI) -> String -## In state 551, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) +## In state 464, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 475, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) ## contract: Attributes String SEMI String SEMI With ## -## Ends in an error in state: 543. +## Ends in an error in state: 467. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2675,7 +3900,7 @@ contract: Attributes String SEMI String SEMI With contract: Attributes String SEMI String With ## -## Ends in an error in state: 542. +## Ends in an error in state: 466. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2689,7 +3914,7 @@ contract: Attributes String SEMI String With contract: Attributes String SEMI With ## -## Ends in an error in state: 541. +## Ends in an error in state: 465. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2702,7 +3927,7 @@ contract: Attributes String SEMI With contract: Attributes String With ## -## Ends in an error in state: 540. +## Ends in an error in state: 464. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2716,7 +3941,7 @@ contract: Attributes String With contract: Attributes With ## -## Ends in an error in state: 539. +## Ends in an error in state: 463. ## ## ne_injection(Attributes,String) -> Attributes . sep_or_term_list(String,SEMI) End [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ne_injection(Attributes,String) -> Attributes . LBRACKET sep_or_term_list(String,SEMI) RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -2727,9 +3952,44 @@ contract: Attributes With -contract: Const Ident COLON Ident EQ Bytes VBAR +contract: Const Ident COLON Ident VBAR ## -## Ends in an error in state: 588. +## Ends in an error in state: 359. +## +## unqualified_decl(EQ) -> Ident option(type_annot) . EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## +## The known suffix of the stack is as follows: +## Ident option(type_annot) +## +## 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 16, spurious reduction of production core_type -> Ident +## In state 30, spurious reduction of production cartesian -> core_type +## In state 36, spurious reduction of production fun_type -> cartesian +## In state 44, spurious reduction of production type_expr -> fun_type +## In state 88, spurious reduction of production type_annot -> COLON type_expr +## In state 89, spurious reduction of production option(type_annot) -> type_annot +## + + + +contract: Const Ident COLON With +## +## Ends in an error in state: 87. +## +## type_annot -> COLON . type_expr [ Is EQ ASS ] +## +## The known suffix of the stack is as follows: +## COLON +## + + + +contract: Const Ident EQ Bytes VBAR +## +## Ends in an error in state: 584. ## ## const_decl -> open_const_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2740,59 +4000,39 @@ contract: Const Ident COLON Ident EQ Bytes VBAR ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 496, spurious reduction of production unqualified_decl(EQ) -> Ident COLON type_expr EQ expr -## In state 497, spurious reduction of production open_const_decl -> Const unqualified_decl(EQ) +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 361, spurious reduction of production unqualified_decl(EQ) -> Ident option(type_annot) EQ expr +## In state 362, spurious reduction of production open_const_decl -> Const unqualified_decl(EQ) ## -contract: Const Ident COLON String EQ With +contract: Const Ident EQ With ## -## Ends in an error in state: 495. +## Ends in an error in state: 360. ## -## unqualified_decl(EQ) -> Ident COLON type_expr EQ . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## unqualified_decl(EQ) -> Ident option(type_annot) EQ . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## Ident COLON type_expr EQ -## - - - -contract: Const Ident COLON String VBAR -## -## Ends in an error in state: 494. -## -## unqualified_decl(EQ) -> Ident COLON type_expr . EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Ident COLON type_expr -## -## 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 30, spurious reduction of production cartesian -> core_type -## In state 36, spurious reduction of production fun_type -> cartesian -## In state 44, spurious reduction of production type_expr -> fun_type +## Ident option(type_annot) EQ ## contract: Const Ident With ## -## Ends in an error in state: 492. +## Ends in an error in state: 358. ## -## unqualified_decl(EQ) -> Ident . COLON type_expr EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## unqualified_decl(EQ) -> Ident . option(type_annot) EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Ident @@ -2802,7 +4042,7 @@ contract: Const Ident With contract: Const With ## -## Ends in an error in state: 491. +## Ends in an error in state: 357. ## ## open_const_decl -> Const . unqualified_decl(EQ) [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2812,9 +4052,32 @@ contract: Const With -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON Ident Is Bytes VBAR +contract: Function Ident LPAR Const Ident RPAR COLON Ident VBAR ## -## Ends in an error in state: 586. +## Ends in an error in state: 330. +## +## open_fun_decl -> Function Ident parameters option(type_annot) . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## +## The known suffix of the stack is as follows: +## Function Ident parameters option(type_annot) +## +## 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 16, spurious reduction of production core_type -> Ident +## In state 30, spurious reduction of production cartesian -> core_type +## In state 36, spurious reduction of production fun_type -> cartesian +## In state 44, spurious reduction of production type_expr -> fun_type +## In state 88, spurious reduction of production type_annot -> COLON type_expr +## In state 89, spurious reduction of production option(type_annot) -> type_annot +## + + + +contract: Function Ident LPAR Const Ident RPAR Is Bytes VBAR +## +## Ends in an error in state: 582. ## ## fun_decl -> open_fun_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2825,1295 +4088,38 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON Ident Is Bytes ## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 464, spurious reduction of production open_fun_decl -> Function Ident parameters COLON type_expr Is expr +## In state 204, spurious reduction of production unary_expr -> core_expr +## In state 153, spurious reduction of production mult_expr -> unary_expr +## In state 180, spurious reduction of production add_expr -> mult_expr +## In state 210, spurious reduction of production cons_expr -> add_expr +## In state 207, spurious reduction of production cat_expr -> cons_expr +## In state 230, spurious reduction of production comp_expr -> cat_expr +## In state 217, spurious reduction of production set_membership -> comp_expr +## In state 155, spurious reduction of production conj_expr -> set_membership +## In state 234, spurious reduction of production disj_expr -> conj_expr +## In state 202, spurious reduction of production expr -> disj_expr +## In state 332, spurious reduction of production open_fun_decl -> Function Ident parameters option(type_annot) Is expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET VBAR Block +contract: Function Ident LPAR Const Ident RPAR Is With ## -## Ends in an error in state: 502. +## Ends in an error in state: 331. ## -## case(if_clause) -> Case expr Of LBRACKET option(VBAR) . cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] +## open_fun_decl -> Function Ident parameters option(type_annot) Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## Case expr Of LBRACKET option(VBAR) +## Function Ident parameters option(type_annot) Is ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET WILD ARROW Skip End +contract: Function Ident LPAR Const Ident RPAR With ## -## Ends in an error in state: 531. +## Ends in an error in state: 329. ## -## case(if_clause) -> Case expr Of LBRACKET option(VBAR) cases(if_clause) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr Of LBRACKET option(VBAR) cases(if_clause) -## -## 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 533, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) -## In state 530, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET With -## -## Ends in an error in state: 501. -## -## case(if_clause) -> Case expr Of LBRACKET . option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr Of LBRACKET -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of VBAR Block -## -## Ends in an error in state: 536. -## -## case(if_clause) -> Case expr Of option(VBAR) . cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr Of option(VBAR) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip RBRACKET -## -## Ends in an error in state: 537. -## -## case(if_clause) -> Case expr Of option(VBAR) cases(if_clause) . End [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr Of option(VBAR) cases(if_clause) -## -## 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 533, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) -## In state 530, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip VBAR With -## -## Ends in an error in state: 534. -## -## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) VBAR . nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] -## -## The known suffix of the stack is as follows: -## case_clause(if_clause) VBAR -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip With -## -## Ends in an error in state: 533. -## -## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . [ RBRACKET End ] -## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . VBAR nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] -## -## The known suffix of the stack is as follows: -## case_clause(if_clause) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW With -## -## Ends in an error in state: 504. -## -## case_clause(if_clause) -> pattern ARROW . if_clause [ VBAR RBRACKET End ] -## -## The known suffix of the stack is as follows: -## pattern ARROW -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD RPAR -## -## Ends in an error in state: 503. -## -## case_clause(if_clause) -> pattern . ARROW if_clause [ VBAR RBRACKET End ] -## -## The known suffix of the stack is as follows: -## pattern -## -## 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 300, spurious reduction of production pattern -> core_pattern -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of With -## -## Ends in an error in state: 500. -## -## case(if_clause) -> Case expr Of . option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## case(if_clause) -> Case expr Of . LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr Of -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim VBAR -## -## Ends in an error in state: 499. -## -## case(if_clause) -> Case expr . Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## case(if_clause) -> Case expr . Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case With -## -## Ends in an error in state: 498. -## -## case(if_clause) -> Case . expr Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## case(if_clause) -> Case . expr Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Case -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr DOT And With -## -## Ends in an error in state: 511. -## -## fun_call -> module_field . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## module_field -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr With -## -## Ends in an error in state: 490. -## -## module_field -> Constr . DOT module_fun [ LPAR ] -## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ LBRACKET ASS ] -## -## The known suffix of the stack is as follows: -## Constr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW Ident With -## -## Ends in an error in state: 474. -## -## for_loop -> For Ident option(arrow_clause) . In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For Ident option(arrow_clause) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW With -## -## Ends in an error in state: 472. -## -## arrow_clause -> ARROW . Ident [ In ] -## -## The known suffix of the stack is as follows: -## ARROW -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim Step Verbatim VBAR -## -## Ends in an error in state: 487. -## -## for_loop -> For var_assign To expr Step expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For var_assign To expr Step expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim Step With -## -## Ends in an error in state: 486. -## -## for_loop -> For var_assign To expr Step . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For var_assign To expr Step -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim VBAR -## -## Ends in an error in state: 485. -## -## for_loop -> For var_assign To expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] -## for_loop -> For var_assign To expr . Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For var_assign To expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To With -## -## Ends in an error in state: 484. -## -## for_loop -> For var_assign To . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## for_loop -> For var_assign To . expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For var_assign To -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes VBAR -## -## Ends in an error in state: 483. -## -## for_loop -> For var_assign . To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## for_loop -> For var_assign . To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For var_assign -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 471, spurious reduction of production var_assign -> Ident ASS expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS With -## -## Ends in an error in state: 470. -## -## var_assign -> Ident ASS . expr [ To ] -## -## The known suffix of the stack is as follows: -## Ident ASS -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In Set Verbatim VBAR -## -## Ends in an error in state: 480. -## -## for_loop -> For Ident option(arrow_clause) In collection expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For Ident option(arrow_clause) In collection expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In Set With -## -## Ends in an error in state: 479. -## -## for_loop -> For Ident option(arrow_clause) In collection . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For Ident option(arrow_clause) In collection -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In With -## -## Ends in an error in state: 475. -## -## for_loop -> For Ident option(arrow_clause) In . collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For Ident option(arrow_clause) In -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident With -## -## Ends in an error in state: 469. -## -## for_loop -> For Ident . option(arrow_clause) In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## var_assign -> Ident . ASS expr [ To ] -## -## The known suffix of the stack is as follows: -## For Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For With -## -## Ends in an error in state: 468. -## -## for_loop -> For . var_assign To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## for_loop -> For . var_assign To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## for_loop -> For . Ident option(arrow_clause) In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## For -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident ASS With -## -## Ends in an error in state: 517. -## -## assignment -> lhs ASS . rhs [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## lhs ASS -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident DOT Ident With -## -## Ends in an error in state: 510. -## -## lhs -> path . [ ASS ] -## map_lookup -> path . brackets(expr) [ ASS ] -## -## The known suffix of the stack is as follows: -## path -## -## 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 127, spurious reduction of production nsepseq(selection,DOT) -> selection -## In state 160, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) -## In state 166, spurious reduction of production path -> projection -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident LBRACKET Bytes RBRACKET With -## -## Ends in an error in state: 516. -## -## assignment -> lhs . ASS rhs [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## lhs -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident With -## -## Ends in an error in state: 457. -## -## fun_call -> Ident . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] -## path -> Ident . [ LBRACKET ASS ] -## projection -> Ident . DOT nsepseq(selection,DOT) [ LBRACKET ASS ] -## -## The known suffix of the stack is as follows: -## Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then LBRACE Skip End -## -## Ends in an error in state: 568. -## -## clause_block -> LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## LBRACE sep_or_term_list(statement,SEMI) -## -## 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 554, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 571, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then LBRACE With -## -## Ends in an error in state: 456. -## -## clause_block -> LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## LBRACE -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip Else With -## -## Ends in an error in state: 574. -## -## conditional -> If expr Then if_clause option(SEMI) Else . if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If expr Then if_clause option(SEMI) Else -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip SEMI EQ -## -## Ends in an error in state: 573. -## -## conditional -> If expr Then if_clause option(SEMI) . Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If expr Then if_clause option(SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip With -## -## Ends in an error in state: 572. -## -## conditional -> If expr Then if_clause . option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If expr Then if_clause -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then With -## -## Ends in an error in state: 455. -## -## conditional -> If expr Then . if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If expr Then -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim VBAR -## -## Ends in an error in state: 454. -## -## conditional -> If expr . Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If With -## -## Ends in an error in state: 453. -## -## conditional -> If . expr Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## If -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident VBAR -## -## Ends in an error in state: 430. -## -## map_patch -> Patch path . With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] -## record_patch -> Patch path . With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_patch -> Patch path . With ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Patch path -## -## 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 158, spurious reduction of production path -> Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map LBRACKET Verbatim ARROW Bytes End -## -## Ends in an error in state: 446. -## -## ne_injection(Map,binding) -> Map LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Map LBRACKET sep_or_term_list(binding,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map LBRACKET With -## -## Ends in an error in state: 445. -## -## ne_injection(Map,binding) -> Map LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Map LBRACKET -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map Verbatim ARROW Bytes RBRACKET -## -## Ends in an error in state: 448. -## -## ne_injection(Map,binding) -> Map sep_or_term_list(binding,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Map sep_or_term_list(binding,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 250, spurious reduction of production binding -> expr ARROW expr -## In state 251, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 247, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map With -## -## Ends in an error in state: 444. -## -## ne_injection(Map,binding) -> Map . sep_or_term_list(binding,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## ne_injection(Map,binding) -> Map . LBRACKET sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Map -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record Ident EQ Bytes RBRACKET -## -## Ends in an error in state: 442. -## -## ne_injection(Record,field_assignment) -> Record sep_or_term_list(field_assignment,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Record sep_or_term_list(field_assignment,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr -## In state 393, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment -## In state 392, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record LBRACKET Ident EQ Bytes End -## -## Ends in an error in state: 440. -## -## ne_injection(Record,field_assignment) -> Record LBRACKET sep_or_term_list(field_assignment,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Record LBRACKET sep_or_term_list(field_assignment,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 388, spurious reduction of production field_assignment -> Ident EQ expr -## In state 393, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment -## In state 392, spurious reduction of production sep_or_term_list(field_assignment,SEMI) -> nsepseq(field_assignment,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record LBRACKET With -## -## Ends in an error in state: 439. -## -## ne_injection(Record,field_assignment) -> Record LBRACKET . sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Record LBRACKET -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record With -## -## Ends in an error in state: 438. -## -## ne_injection(Record,field_assignment) -> Record . sep_or_term_list(field_assignment,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## ne_injection(Record,field_assignment) -> Record . LBRACKET sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Record -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set LBRACKET Verbatim End -## -## Ends in an error in state: 434. -## -## ne_injection(Set,expr) -> Set LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Set LBRACKET sep_or_term_list(expr,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set LBRACKET With -## -## Ends in an error in state: 433. -## -## ne_injection(Set,expr) -> Set LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Set LBRACKET -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set Verbatim RBRACKET -## -## Ends in an error in state: 436. -## -## ne_injection(Set,expr) -> Set sep_or_term_list(expr,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Set sep_or_term_list(expr,SEMI) -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## In state 369, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 368, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set With -## -## Ends in an error in state: 432. -## -## ne_injection(Set,expr) -> Set . sep_or_term_list(expr,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] -## ne_injection(Set,expr) -> Set . LBRACKET sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Set -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With With -## -## Ends in an error in state: 431. -## -## map_patch -> Patch path With . ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] -## record_patch -> Patch path With . ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_patch -> Patch path With . ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Patch path With -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch With -## -## Ends in an error in state: 429. -## -## map_patch -> Patch . path With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] -## record_patch -> Patch . path With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_patch -> Patch . path With ne_injection(Set,expr) [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Patch -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Map With -## -## Ends in an error in state: 427. -## -## map_remove -> Remove expr From Map . path [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Remove expr From Map -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Set With -## -## Ends in an error in state: 425. -## -## set_remove -> Remove expr From Set . path [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Remove expr From Set -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From With -## -## Ends in an error in state: 424. -## -## map_remove -> Remove expr From . Map path [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_remove -> Remove expr From . Set path [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Remove expr From -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim VBAR -## -## Ends in an error in state: 423. -## -## map_remove -> Remove expr . From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_remove -> Remove expr . From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Remove expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove With -## -## Ends in an error in state: 422. -## -## map_remove -> Remove . expr From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] -## set_remove -> Remove . expr From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Remove -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End While -## -## Ends in an error in state: 465. -## -## open_fun_decl -> Function Ident parameters COLON type_expr Is block . With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Function Ident parameters COLON type_expr Is block -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End With With -## -## Ends in an error in state: 466. -## -## open_fun_decl -> Function Ident parameters COLON type_expr Is block With . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Function Ident parameters COLON type_expr Is block With -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip RBRACE -## -## Ends in an error in state: 576. -## -## block -> Begin sep_or_term_list(statement,SEMI) . End [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Begin sep_or_term_list(statement,SEMI) -## -## 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 554, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 571, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI Skip SEMI With -## -## Ends in an error in state: 557. -## -## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] -## seq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] -## -## The known suffix of the stack is as follows: -## statement SEMI -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI Skip With -## -## Ends in an error in state: 556. -## -## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] -## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] -## seq(__anonymous_0(statement,SEMI)) -> statement . SEMI seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] -## -## The known suffix of the stack is as follows: -## statement -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI With -## -## Ends in an error in state: 555. -## -## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] -## nseq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] -## -## The known suffix of the stack is as follows: -## statement SEMI -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip With -## -## Ends in an error in state: 554. -## -## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] -## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] -## nseq(__anonymous_0(statement,SEMI)) -> statement . SEMI seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] -## -## The known suffix of the stack is as follows: -## statement -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String ASS With -## -## Ends in an error in state: 418. -## -## unqualified_decl(ASS) -> Ident COLON type_expr ASS . expr [ SEMI RBRACE End ] -## -## The known suffix of the stack is as follows: -## Ident COLON type_expr ASS -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String VBAR -## -## Ends in an error in state: 417. -## -## unqualified_decl(ASS) -> Ident COLON type_expr . ASS expr [ SEMI RBRACE End ] -## -## The known suffix of the stack is as follows: -## Ident COLON type_expr -## -## 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 30, spurious reduction of production cartesian -> core_type -## In state 36, spurious reduction of production fun_type -> cartesian -## In state 44, spurious reduction of production type_expr -> fun_type -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident With -## -## Ends in an error in state: 415. -## -## unqualified_decl(ASS) -> Ident . COLON type_expr ASS expr [ SEMI RBRACE End ] -## -## The known suffix of the stack is as follows: -## Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var With -## -## Ends in an error in state: 414. -## -## open_var_decl -> Var . unqualified_decl(ASS) [ SEMI RBRACE End ] -## -## The known suffix of the stack is as follows: -## Var -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While Verbatim VBAR -## -## Ends in an error in state: 412. -## -## while_loop -> While expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## While expr -## -## 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 197, spurious reduction of production unary_expr -> core_expr -## In state 144, spurious reduction of production mult_expr -> unary_expr -## In state 173, spurious reduction of production add_expr -> mult_expr -## In state 203, spurious reduction of production cons_expr -> add_expr -## In state 200, spurious reduction of production cat_expr -> cons_expr -## In state 223, spurious reduction of production comp_expr -> cat_expr -## In state 210, spurious reduction of production set_membership -> comp_expr -## In state 146, spurious reduction of production conj_expr -> set_membership -## In state 227, spurious reduction of production disj_expr -> conj_expr -## In state 195, spurious reduction of production expr -> disj_expr -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While With -## -## Ends in an error in state: 411. -## -## while_loop -> While . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## While -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin With -## -## Ends in an error in state: 413. -## -## block -> Begin . sep_or_term_list(statement,SEMI) End [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Begin -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block LBRACE Skip End -## -## Ends in an error in state: 579. -## -## block -> Block LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Block LBRACE sep_or_term_list(statement,SEMI) -## -## 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 554, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 571, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block LBRACE With -## -## Ends in an error in state: 410. -## -## block -> Block LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Block LBRACE -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block With -## -## Ends in an error in state: 409. -## -## block -> Block . LBRACE sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Block -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With -## -## Ends in an error in state: 463. -## -## open_fun_decl -> Function Ident parameters COLON type_expr Is . block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Function Ident parameters COLON type_expr Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Function Ident parameters COLON type_expr Is -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String VBAR -## -## Ends in an error in state: 462. -## -## open_fun_decl -> Function Ident parameters COLON type_expr . Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Function Ident parameters COLON type_expr . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Function Ident parameters COLON type_expr -## -## 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 30, spurious reduction of production cartesian -> core_type -## In state 36, spurious reduction of production fun_type -> cartesian -## In state 44, spurious reduction of production type_expr -> fun_type -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR With -## -## Ends in an error in state: 460. -## -## open_fun_decl -> Function Ident parameters . COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Function Ident parameters . COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident parameters . option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function Ident parameters @@ -4123,10 +4129,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR With contract: Function Ident With ## -## Ends in an error in state: 459. +## Ends in an error in state: 328. ## -## open_fun_decl -> Function Ident . parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Function Ident . parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident . parameters option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function Ident @@ -4136,10 +4141,9 @@ contract: Function Ident With contract: Function With ## -## Ends in an error in state: 458. +## Ends in an error in state: 327. ## -## open_fun_decl -> Function . Ident parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Function . Ident parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function . Ident parameters option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function @@ -4147,28 +4151,14 @@ contract: Function With -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With +contract: Recursive Function Ident LPAR Const Ident RPAR COLON String VBAR ## -## Ends in an error in state: 89. +## Ends in an error in state: 90. ## -## open_fun_decl -> Recursive Function Ident parameters COLON type_expr Is . block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive Function Ident parameters COLON type_expr Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident parameters option(type_annot) . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## Recursive Function Ident parameters COLON type_expr Is -## - - - -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String VBAR -## -## Ends in an error in state: 88. -## -## open_fun_decl -> Recursive Function Ident parameters COLON type_expr . Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive Function Ident parameters COLON type_expr . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## -## The known suffix of the stack is as follows: -## Recursive Function Ident parameters COLON type_expr +## Recursive Function Ident parameters option(type_annot) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an @@ -4177,16 +4167,29 @@ contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON Strin ## In state 30, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 44, spurious reduction of production type_expr -> fun_type +## In state 88, spurious reduction of production type_annot -> COLON type_expr +## In state 89, spurious reduction of production option(type_annot) -> type_annot ## -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR With +contract: Recursive Function Ident LPAR Const Ident RPAR Is With +## +## Ends in an error in state: 91. +## +## open_fun_decl -> Recursive Function Ident parameters option(type_annot) Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## +## The known suffix of the stack is as follows: +## Recursive Function Ident parameters option(type_annot) Is +## + + + +contract: Recursive Function Ident LPAR Const Ident RPAR With ## ## Ends in an error in state: 86. ## -## open_fun_decl -> Recursive Function Ident parameters . COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive Function Ident parameters . COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident parameters . option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function Ident parameters @@ -4198,8 +4201,7 @@ contract: Recursive Function Ident With ## ## Ends in an error in state: 70. ## -## open_fun_decl -> Recursive Function Ident . parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive Function Ident . parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident . parameters option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function Ident @@ -4211,8 +4213,7 @@ contract: Recursive Function With ## ## Ends in an error in state: 69. ## -## open_fun_decl -> Recursive Function . Ident parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive Function . Ident parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function . Ident parameters option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function @@ -4224,8 +4225,7 @@ contract: Recursive With ## ## Ends in an error in state: 68. ## -## open_fun_decl -> Recursive . Function Ident parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] -## open_fun_decl -> Recursive . Function Ident parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive . Function Ident parameters option(type_annot) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive @@ -4720,3 +4720,4 @@ contract: With ## + diff --git a/src/passes/01-parsing/pascaligo/pascaligo.ml b/src/passes/01-parsing/pascaligo/pascaligo.ml deleted file mode 100644 index 2421f543f..000000000 --- a/src/passes/01-parsing/pascaligo/pascaligo.ml +++ /dev/null @@ -1,3 +0,0 @@ -module Lexer = Lexer -module LexToken = LexToken -module Parser = Parser diff --git a/src/passes/01-parsing/reasonligo.ml b/src/passes/01-parsing/reasonligo.ml index 777203b98..64be09c83 100644 --- a/src/passes/01-parsing/reasonligo.ml +++ b/src/passes/01-parsing/reasonligo.ml @@ -1,12 +1,13 @@ module CST = Cst.Cameligo -module LexToken = Parser_reasonligo.LexToken -module Lexer = Lexer.Make (LexToken) +module LexToken = Lexer_reasonligo.LexToken +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Scoping = Parser_cameligo.Scoping module Region = Simple_utils.Region module ParErr = Parser_reasonligo.ParErr module SyntaxError = Parser_reasonligo.SyntaxError module SSet = Set.Make (String) module Pretty = Parser_reasonligo.Pretty +module EvalOpt = Lexer_shared.EvalOpt (* Mock IOs TODO: Fill them with CLI options *) diff --git a/src/passes/01-parsing/reasonligo/.links b/src/passes/01-parsing/reasonligo/.links index e85766c2b..d8ba17996 100644 --- a/src/passes/01-parsing/reasonligo/.links +++ b/src/passes/01-parsing/reasonligo/.links @@ -5,14 +5,10 @@ $HOME/git/OCaml-build/Makefile ../shared/LexerLib.ml ../shared/EvalOpt.ml ../shared/EvalOpt.mli -../shared/FQueue.ml -../shared/FQueue.mli ../shared/LexerLog.mli ../shared/LexerLog.ml ../shared/Markup.ml ../shared/Markup.mli -../shared/Utils.mli -../shared/Utils.ml ../shared/ParserAPI.mli ../shared/ParserAPI.ml ../shared/LexerUnit.mli @@ -20,10 +16,13 @@ $HOME/git/OCaml-build/Makefile ../shared/ParserUnit.mli ../shared/ParserUnit.ml -Stubs/Parser_cameligo.ml +./Stubs/Lexer_shared.ml +./Stubs/Lexer_reasonligo.ml +./Stubs/Parser_shared.ml +./Stubs/Parser_reasonligo.ml +./Stubs/Cst.ml +./Stubs/Cst_cameligo.ml -../cameligo/AST.ml -../cameligo/ParserLog.mli -../cameligo/ParserLog.ml -../cameligo/Scoping.mli -../cameligo/Scoping.ml +$HOME/git/ligo/src/stages/1-cst/cameligo/CST.ml +$HOME/git/ligo/src/stages/1-cst/cameligo/ParserLog.mli +$HOME/git/ligo/src/stages/1-cst/cameligo/ParserLog.ml diff --git a/src/passes/01-parsing/reasonligo/LexToken.mli b/src/passes/01-parsing/reasonligo/LexToken.mli index 3f91a0f71..0368aff6e 100644 --- a/src/passes/01-parsing/reasonligo/LexToken.mli +++ b/src/passes/01-parsing/reasonligo/LexToken.mli @@ -21,13 +21,16 @@ aliased to [token]. *) +(* Dependencies *) + module Region = Simple_utils.Region module Pos = Simple_utils.Pos - -type lexeme = string +module Markup = Lexer_shared.Markup (* TOKENS *) +type lexeme = string + type t = (* Identifiers, labels, numbers and strings *) diff --git a/src/passes/01-parsing/reasonligo/LexToken.mll b/src/passes/01-parsing/reasonligo/LexToken.mll index 4e7fa6079..737fdb797 100644 --- a/src/passes/01-parsing/reasonligo/LexToken.mll +++ b/src/passes/01-parsing/reasonligo/LexToken.mll @@ -1,19 +1,19 @@ +(* ocamlex specification for ReasonLIGO *) { (* START OF HEADER *) -(* Shorthands *) +(* Dependencies *) module Region = Simple_utils.Region module Pos = Simple_utils.Pos -module SMap = Utils.String.Map -module SSet = Utils.String.Set - -type lexeme = string - -let sprintf = Printf.sprintf +module Markup = Lexer_shared.Markup +module SMap = Map.Make (String) +module SSet = Set.Make (String) (* TOKENS *) +type lexeme = string + type t = (* Identifiers, labels, numbers and strings *) @@ -103,6 +103,8 @@ type t = (* Projections *) +let sprintf = Printf.sprintf + type token = t let proj_token = function diff --git a/src/passes/01-parsing/reasonligo/LexerMain.ml b/src/passes/01-parsing/reasonligo/LexerMain.ml index f0d6fdfa1..69b9d40e2 100644 --- a/src/passes/01-parsing/reasonligo/LexerMain.ml +++ b/src/passes/01-parsing/reasonligo/LexerMain.ml @@ -1,6 +1,14 @@ (* Driver for the ReasonLIGO lexer *) -module Region = Simple_utils.Region +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerUnit = Lexer_shared.LexerUnit +module LexToken = Lexer_reasonligo.LexToken + +(* Input/Output *) module IO = struct diff --git a/src/passes/01-parsing/reasonligo/ParToken.mly b/src/passes/01-parsing/reasonligo/ParToken.mly index 01bbc839c..337a8d7e8 100644 --- a/src/passes/01-parsing/reasonligo/ParToken.mly +++ b/src/passes/01-parsing/reasonligo/ParToken.mly @@ -1,4 +1,5 @@ %{ +module LexToken = Lexer_reasonligo.LexToken %} (* Tokens (mirroring those defined in module LexToken) *) diff --git a/src/passes/01-parsing/reasonligo/ParserMain.ml b/src/passes/01-parsing/reasonligo/ParserMain.ml index 3dd94d37e..30d71deb5 100644 --- a/src/passes/01-parsing/reasonligo/ParserMain.ml +++ b/src/passes/01-parsing/reasonligo/ParserMain.ml @@ -1,7 +1,16 @@ (* Driver for the ReasonLIGO parser *) -module Region = Simple_utils.Region -module SSet = Set.Make (String) +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module LexToken = Lexer_reasonligo.LexToken +module CST = Cst.Cameligo +module SSet = Set.Make (String) +module ParserUnit = Parser_shared.ParserUnit +module Pretty = Parser_reasonligo.Pretty + +(* Input/Output *) module IO = struct @@ -55,22 +64,22 @@ module SubIO = module Parser = struct - type ast = AST.t - type expr = AST.expr - include Parser + type ast = CST.t + type expr = CST.expr + include Parser_reasonligo.Parser end module ParserLog = struct - type ast = AST.t - type expr = AST.expr - include ParserLog + type ast = CST.t + type expr = CST.expr + include Cst_cameligo.ParserLog end -module Lexer = Lexer.Make (LexToken) +module Lexer = Lexer_shared.Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(CST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) diff --git a/src/passes/01-parsing/reasonligo/Pretty.ml b/src/passes/01-parsing/reasonligo/Pretty.ml index 597fa713f..862faa63f 100644 --- a/src/passes/01-parsing/reasonligo/Pretty.ml +++ b/src/passes/01-parsing/reasonligo/Pretty.ml @@ -5,6 +5,7 @@ open CST module Region = Simple_utils.Region open! Region open! PPrint +module Option = Simple_utils.Option let rec print ast = let app decl = group (pp_declaration decl) in diff --git a/src/passes/01-parsing/reasonligo/Scoping.ml b/src/passes/01-parsing/reasonligo/Scoping.ml new file mode 120000 index 000000000..f89a36ef0 --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Scoping.ml @@ -0,0 +1 @@ +../cameligo/Scoping.ml \ No newline at end of file diff --git a/src/passes/01-parsing/reasonligo/Scoping.mli b/src/passes/01-parsing/reasonligo/Scoping.mli new file mode 120000 index 000000000..5e0c71af4 --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Scoping.mli @@ -0,0 +1 @@ +../cameligo/Scoping.mli \ No newline at end of file diff --git a/src/passes/01-parsing/reasonligo/Stubs/Cst.ml b/src/passes/01-parsing/reasonligo/Stubs/Cst.ml new file mode 100644 index 000000000..fcd70f2bb --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Cst.ml @@ -0,0 +1 @@ +module Cameligo = CST diff --git a/src/passes/01-parsing/reasonligo/Stubs/Cst_cameligo.ml b/src/passes/01-parsing/reasonligo/Stubs/Cst_cameligo.ml new file mode 100644 index 000000000..011ad3f5e --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Cst_cameligo.ml @@ -0,0 +1 @@ +module ParserLog = ParserLog diff --git a/src/passes/01-parsing/reasonligo/Stubs/Lexer_reasonligo.ml b/src/passes/01-parsing/reasonligo/Stubs/Lexer_reasonligo.ml new file mode 100644 index 000000000..0b6aa4f73 --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Lexer_reasonligo.ml @@ -0,0 +1 @@ +module LexToken = LexToken diff --git a/src/passes/01-parsing/reasonligo/Stubs/Lexer_shared.ml b/src/passes/01-parsing/reasonligo/Stubs/Lexer_shared.ml new file mode 100644 index 000000000..71d9cc522 --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Lexer_shared.ml @@ -0,0 +1,6 @@ +module EvalOpt = EvalOpt +module Markup = Markup +module Lexer = Lexer +module LexerUnit = LexerUnit +module LexerLog = LexerLog +module LexerLib = LexerLib diff --git a/src/passes/01-parsing/reasonligo/Stubs/Parser_cameligo.ml b/src/passes/01-parsing/reasonligo/Stubs/Parser_cameligo.ml deleted file mode 100644 index bf4e0962a..000000000 --- a/src/passes/01-parsing/reasonligo/Stubs/Parser_cameligo.ml +++ /dev/null @@ -1 +0,0 @@ -module AST = AST diff --git a/src/passes/01-parsing/reasonligo/Stubs/Parser_reasonligo.ml b/src/passes/01-parsing/reasonligo/Stubs/Parser_reasonligo.ml new file mode 100644 index 000000000..9479f6e5f --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Parser_reasonligo.ml @@ -0,0 +1,2 @@ +module Pretty = Pretty +module Parser = Parser diff --git a/src/passes/01-parsing/reasonligo/Stubs/Parser_shared.ml b/src/passes/01-parsing/reasonligo/Stubs/Parser_shared.ml new file mode 100644 index 000000000..f1e238ebf --- /dev/null +++ b/src/passes/01-parsing/reasonligo/Stubs/Parser_shared.ml @@ -0,0 +1 @@ +module ParserUnit = ParserUnit diff --git a/src/passes/01-parsing/reasonligo/SyntaxError.ml b/src/passes/01-parsing/reasonligo/SyntaxError.ml index cab81f352..434625931 100644 --- a/src/passes/01-parsing/reasonligo/SyntaxError.ml +++ b/src/passes/01-parsing/reasonligo/SyntaxError.ml @@ -1,6 +1,6 @@ module CST = Cst.Cameligo -type error = +type error = | WrongFunctionArguments of CST.expr | InvalidWild of CST.expr diff --git a/src/passes/01-parsing/reasonligo/dune b/src/passes/01-parsing/reasonligo/dune index 38170a812..b0c88b150 100644 --- a/src/passes/01-parsing/reasonligo/dune +++ b/src/passes/01-parsing/reasonligo/dune @@ -1,30 +1,71 @@ +;; -------------------------------------------------------------------- +;; LEXING + ;; Build of the lexer (ocamllex LexToken) +;; Build of the lexer as a library + +(library + (name lexer_reasonligo) + (public_name ligo.lexer.reasonligo) + (modules LexToken) + (libraries + ;; Ligo + lexer_shared + ;; Third party + hex) + (preprocess + (pps bisect_ppx --conditional))) + +;; Build of a standalone lexer + +(executable + (name LexerMain) + (libraries + ;; Ligo + lexer_shared + lexer_reasonligo + ;; Third party + hex) + (modules LexerMain) + (preprocess + (pps bisect_ppx --conditional))) + +;; -------------------------------------------------------------------- +;; PARSING + ;; Build of the parser (menhir (merge_into Parser) (modules ParToken Parser) - (flags -la 1 --table --strict --explain --external-tokens LexToken)) + (flags -la 1 --table --strict --explain + --external-tokens Lexer_reasonligo.LexToken)) ;; Build of the parser as a library (library - (name parser_reasonligo) - (public_name ligo.parser.reasonligo) - (modules - SyntaxError reasonligo LexToken ParErr Parser Pretty) - (libraries - menhirLib + (name parser_reasonligo) + (public_name ligo.parser.reasonligo) + (modules + SyntaxError Scoping Parser ParErr Pretty) + (libraries + ;; Ligo + lexer_reasonligo parser_shared - parser_cameligo - str - simple-utils) - (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Simple_utils -open Parser_cameligo))) + cst + ;; Vendors + simple-utils + ;; Third party + pprint + terminal_size + menhirLib + hex) + (preprocess + (pps bisect_ppx --conditional)) + (flags (:standard -open Cst_cameligo))) ;; For CST in Parser.mli ;; Build of the unlexer (for covering the ;; error states of the LR automaton) @@ -32,38 +73,31 @@ (executable (name Unlexer) (libraries str) + (modules Unlexer) (preprocess - (pps bisect_ppx --conditional)) - (modules Unlexer)) - -;; Local build of a standalone lexer - -(executable - (name LexerMain) - (libraries parser_reasonligo) - (modules LexerMain) - (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Parser_shared -open Parser_reasonligo))) + (pps bisect_ppx --conditional))) ;; Local build of a standalone parser (executable (name ParserMain) (libraries - parser_reasonligo - parser_cameligo) - (modules ParserMain) + ;; Ligo + parser_shared + parser_reasonligo + cst + ;; Third party + hex) + (modules ParserMain Parser_msg) (preprocess - (pps bisect_ppx --conditional)) - (flags (:standard -open Simple_utils -open Parser_cameligo -open Parser_shared -open Parser_reasonligo))) + (pps bisect_ppx --conditional))) ;; Build of the covering of error states in the LR automaton (rule (targets Parser.msg) (deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly) - (action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly ))) + (action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly))) (rule (targets Parser_msg.ml) @@ -83,7 +117,16 @@ (rule (targets all.religo) (deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe) - (action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=religo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly ))) + (action (run %{script_cover} + --lex-tokens=LexToken.mli + --par-tokens=ParToken.mly + --ext=religo + --unlexer=./Unlexer.exe + --messages=Parser.msg + --dir=. + --concatenate Parser.mly))) + +;; Error messages (rule (targets error.messages) @@ -91,60 +134,45 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --update-errors error.messages.checked-in - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - )) -) + (run menhir + --unused-tokens + --update-errors error.messages.checked-in + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (rule (target error.messages.new) (mode (promote (until-clean) (only *))) (action (with-stdout-to %{target} - (run - menhir - --unused-tokens - --list-errors - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - ) - ) - ) -) + (run menhir + --unused-tokens + --list-errors + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly)))) (alias (name runtest) (deps error.messages error.messages.new) (action - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compare-errors error.messages.new - --compare-errors error.messages - ) - ) - ) - - + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compare-errors error.messages.new + --compare-errors error.messages))) (rule (targets ParErr.ml) @@ -152,16 +180,12 @@ (deps Parser.mly ParToken.mly error.messages.checked-in LexToken.mli) (action (with-stdout-to %{targets} - (run - menhir - --unused-tokens - --table - --strict - --external-tokens LexToken.mli - --base Parser.mly - ParToken.mly - Parser.mly - --compile-errors error.messages.checked-in - ) - )) -) + (run menhir + --unused-tokens + --table + --strict + --external-tokens LexToken.mli + --base Parser.mly + ParToken.mly + Parser.mly + --compile-errors error.messages.checked-in)))) diff --git a/src/passes/01-parsing/reasonligo/reasonligo.ml b/src/passes/01-parsing/reasonligo/reasonligo.ml deleted file mode 100644 index 8ac1f47fa..000000000 --- a/src/passes/01-parsing/reasonligo/reasonligo.ml +++ /dev/null @@ -1,4 +0,0 @@ -module Parser = Parser -module Lexer = Lexer -module LexToken = LexToken -module SyntaxError = SyntaxError diff --git a/src/passes/01-parsing/shared/Lexer.mll b/src/passes/01-parsing/shared/Lexer.mll index 172c957ca..787a21a9b 100644 --- a/src/passes/01-parsing/shared/Lexer.mll +++ b/src/passes/01-parsing/shared/Lexer.mll @@ -438,13 +438,13 @@ and scan state = parse (* String *) -| '"' { let opening, _, state = state#sync lexbuf in - let thread = LexerLib.mk_thread opening "" in - scan_string thread state lexbuf |> mk_string } +| '"' { let opening, _, state = state#sync lexbuf in + let thread = LexerLib.mk_thread opening in + scan_string thread state lexbuf |> mk_string } | "{|" { let opening, _, state = state#sync lexbuf in - let thread = LexerLib.mk_thread opening "" in - scan_verbatim thread state lexbuf |> mk_verbatim } + let thread = LexerLib.mk_thread opening in + scan_verbatim thread state lexbuf |> mk_verbatim } (* Comments *) @@ -453,33 +453,28 @@ and scan state = parse match state#block with Some block when block#opening = lexeme -> let opening, _, state = state#sync lexbuf in - let thread = LexerLib.mk_thread opening lexeme in - let thread, state = scan_block block thread state lexbuf in - let state = state#push_block thread - in scan state lexbuf - | Some _ | None -> - let n = String.length lexeme in - begin - LexerLib.rollback lexbuf; - assert (n > 0); - scan (scan_n_sym n state lexbuf) lexbuf - end } + let thread = LexerLib.mk_thread opening in + let thread = thread#push_string lexeme in + let thread, state = scan_block block thread state lexbuf + in scan (state#push_block thread) lexbuf + | Some _ | None -> (* Not a comment for this LIGO syntax *) + let n = String.length lexeme in + let () = LexerLib.rollback lexbuf in + scan (scan_n_sym n state lexbuf) lexbuf } | line_comments { let lexeme = Lexing.lexeme lexbuf in match state#line with Some line when line = lexeme -> let opening, _, state = state#sync lexbuf in - let thread = LexerLib.mk_thread opening lexeme in - let thread, state = scan_line thread state lexbuf in - let state = state#push_line thread - in scan state lexbuf - | Some _ | None -> - let n = String.length lexeme in - begin - LexerLib.rollback lexbuf; - scan (scan_n_sym n state lexbuf) lexbuf - end } + let thread = LexerLib.mk_thread opening in + let thread = thread#push_string lexeme in + let thread, state = scan_line thread state lexbuf + in scan (state#push_line thread) lexbuf + | Some _ | None -> (* Not a comment for this LIGO syntax *) + let n = String.length lexeme in + let () = LexerLib.rollback lexbuf in + scan (scan_n_sym n state lexbuf) lexbuf } | _ as c { let region, _, _ = state#sync lexbuf in fail region (Unexpected_character c) } @@ -488,8 +483,7 @@ and scan state = parse and scan_n_sym n state = parse symbol { let state = mk_sym state lexbuf in - if n = 1 then state - else scan_n_sym (n-1) state lexbuf } + if n = 1 then state else scan_n_sym (n-1) state lexbuf } (* Scanning #include flag *) @@ -552,7 +546,6 @@ and scan_block block thread state = parse in scan_block block thread state lexbuf else let () = LexerLib.rollback lexbuf in let n = String.length lexeme in - let () = assert (n > 0) in let state = scan_n_sym n state lexbuf in scan_block block thread state lexbuf } @@ -563,7 +556,6 @@ and scan_block block thread state = parse in thread#push_string lexeme, state else let () = LexerLib.rollback lexbuf in let n = String.length lexeme in - let () = assert (n > 0) in let state = scan_n_sym n state lexbuf in scan_block block thread state lexbuf } @@ -588,27 +580,6 @@ and scan_block block thread state = parse let region = Region.make ~start:state#pos ~stop:pos in fail region error } -(* Finishing a line comment *) - -and scan_line thread state = parse - nl as nl { let () = Lexing.new_line lexbuf - and thread = thread#push_string nl - and state = state#set_pos (state#pos#new_line nl) - in thread, state } -| eof { thread, state } -| _ { let () = LexerLib.rollback lexbuf in - let len = thread#length in - let thread, - status = scan_utf8_inline thread state lexbuf in - let delta = thread#length - len in - let pos = state#pos#shift_one_uchar delta in - match status with - Stdlib.Ok () -> - scan_line thread (state#set_pos pos) lexbuf - | Error error -> - let region = Region.make ~start:state#pos ~stop:pos - in fail region error } - and scan_utf8 block thread state = parse eof { let err = Unterminated_comment block#closing in fail thread#opening err } @@ -621,6 +592,27 @@ and scan_utf8 block thread state = parse | `Await -> scan_utf8 block thread state lexbuf | `End -> assert false } +(* Finishing a line comment *) + +and scan_line thread state = parse + nl as nl { let () = Lexing.new_line lexbuf + and thread = thread#push_string nl + and state = state#set_pos (state#pos#new_line nl) + in thread, state } +| eof { thread, state } +| _ { let () = LexerLib.rollback lexbuf in + let len = thread#length in + let thread, + status = scan_utf8_inline thread state lexbuf in + let delta = thread#length - len in + let pos = state#pos#shift_one_uchar delta in + match status with + Stdlib.Ok () -> + scan_line thread (state#set_pos pos) lexbuf + | Error error -> + let region = Region.make ~start:state#pos ~stop:pos + in fail region error } + and scan_utf8_inline thread state = parse eof { thread, Stdlib.Ok () } | _ as c { let thread = thread#push_char c in diff --git a/src/passes/01-parsing/shared/LexerLib.ml b/src/passes/01-parsing/shared/LexerLib.ml index e6ba62b9e..86cae1f2c 100644 --- a/src/passes/01-parsing/shared/LexerLib.ml +++ b/src/passes/01-parsing/shared/LexerLib.ml @@ -1,5 +1,8 @@ +(* A library for writing UTF8-aware lexers *) + module Region = Simple_utils.Region -module Pos = Simple_utils.Pos +module Pos = Simple_utils.Pos +module FQueue = Simple_utils.FQueue (* LEXER ENGINE *) @@ -69,7 +72,7 @@ type thread = < set_opening : Region.t -> thread > -let mk_thread region lexeme : thread = +let mk_thread region : thread = (* The call [explode s a] is the list made by pushing the characters in the string [s] on top of [a], in reverse order. For example, [explode "ba" ['c';'d'] = ['a'; 'b'; 'c'; 'd']]. *) @@ -83,10 +86,10 @@ let mk_thread region lexeme : thread = val opening = region method opening = opening - val length = String.length lexeme + val length = 0 method length = length - val acc = explode lexeme [] + val acc = [] method acc = acc method set_opening opening = {< opening; length; acc >} @@ -100,10 +103,10 @@ let mk_thread region lexeme : thread = acc = explode str acc >} (* The value of [thread#to_string] is a string of length - [thread#length] containing the [thread#length] characters in - the list [thread#acc], in reverse order. For instance, - [thread#to_string = "abc"] if [thread#length = 3] and - [thread#acc = ['c';'b';'a']]. *) + [thread#length] containing the characters in the list + [thread#acc], in reverse order. For instance, [thread#to_string + = "abc"] if [thread#length = 3] and [thread#acc = + ['c';'b';'a']]. *) method to_string = let bytes = Bytes.make length ' ' in @@ -159,15 +162,16 @@ type 'token window = | Two of 'token * 'token type 'token state = < - units : (Markup.t list * 'token) FQueue.t; - markup : Markup.t list; - window : 'token window; - last : Region.t; - pos : Pos.t; - decoder : Uutf.decoder; - supply : Bytes.t -> int -> int -> unit; - block : EvalOpt.block_comment option; - line : EvalOpt.line_comment option; + units : (Markup.t list * 'token) FQueue.t; + markup : Markup.t list; + comments : Markup.comment FQueue.t; + window : 'token window; + last : Region.t; + pos : Pos.t; + decoder : Uutf.decoder; + supply : Bytes.t -> int -> int -> unit; + block : EvalOpt.block_comment option; + line : EvalOpt.line_comment option; enqueue : 'token -> 'token state; set_units : (Markup.t list * 'token) FQueue.t -> 'token state; @@ -184,25 +188,28 @@ type 'token state = < push_tabs : Lexing.lexbuf -> 'token state; push_bom : Lexing.lexbuf -> 'token state; push_markup : Markup.t -> 'token state; + push_comment : Markup.comment -> 'token state > -let mk_state ~units ~markup ~window ~last ~pos ~decoder ~supply +let mk_state ~units ~markup ~comments ~window ~last ~pos ~decoder ~supply ?block ?line () : _ state = object (self) - val units = units - method units = units - val markup = markup - method markup = markup - val window = window - method window = window - val last = last - method last = last - val pos = pos - method pos = pos - method decoder = decoder - method supply = supply - method block = block - method line = line + val units = units + method units = units + val markup = markup + method markup = markup + val comments = comments + method comments = comments + val window = window + method window = window + val last = last + method last = last + val pos = pos + method pos = pos + method decoder = decoder + method supply = supply + method block = block + method line = line method enqueue token = {< units = FQueue.enq (markup, token) units; @@ -229,6 +236,9 @@ let mk_state ~units ~markup ~window ~last ~pos ~decoder ~supply (* Committing markup to the current logical state *) + method push_comment comment = + {< comments = FQueue.enq comment comments >} + method push_markup unit = {< markup = unit :: markup >} method push_newline buffer = @@ -238,21 +248,23 @@ let mk_state ~units ~markup ~window ~last ~pos ~decoder ~supply let stop = start#new_line value in let region = Region.make ~start ~stop in let unit = Markup.Newline Region.{region; value} - in {< pos = stop; markup = unit::markup >} + in (self#push_markup unit)#set_pos stop method push_line thread = let start = thread#opening#start in let region = Region.make ~start ~stop:self#pos and value = thread#to_string in - let unit = Markup.LineCom Region.{region; value} - in {< markup = unit::markup >} + let reg = Region.{region; value} in + let unit = Markup.LineCom reg + in (self#push_markup unit)#push_comment (Markup.Line reg) method push_block thread = let start = thread#opening#start in let region = Region.make ~start ~stop:self#pos and value = thread#to_string in - let unit = Markup.BlockCom Region.{region; value} - in {< markup = unit::markup >} + let reg = Region.{region; value} in + let unit = Markup.BlockCom reg + in (self#push_markup unit)#push_comment (Markup.Block reg) method push_space buffer = let region, lex, state = self#sync buffer in @@ -283,14 +295,15 @@ type input = type 'token logger = Markup.t list -> 'token -> unit type 'token instance = { - input : input; - read : log:('token logger) -> Lexing.lexbuf -> 'token; - buffer : Lexing.lexbuf; - get_win : unit -> 'token window; - get_pos : unit -> Pos.t; - get_last : unit -> Region.t; - get_file : unit -> file_path; - close : unit -> unit + input : input; + read : log:('token logger) -> Lexing.lexbuf -> 'token; + buffer : Lexing.lexbuf; + close : unit -> unit; + get_win : unit -> 'token window; + get_pos : unit -> Pos.t; + get_last : unit -> Region.t; + get_file : unit -> file_path; + get_comments : unit -> Markup.comment FQueue.t } type open_err = File_opening of string @@ -329,15 +342,18 @@ let open_token_stream ?line ?block ~scan ~window:Nil ~pos ~markup:[] + ~comments:FQueue.empty ~decoder ~supply ?block ?line ()) in - let get_pos () = !state#pos - and get_last () = !state#last - and get_win () = !state#window - and get_file () = file_path in + + let get_pos () = !state#pos + and get_last () = !state#last + and get_win () = !state#window + and get_comments () = !state#comments + and get_file () = file_path in let patch_buffer (start, stop) buffer = let open Lexing in @@ -368,8 +384,8 @@ let open_token_stream ?line ?block ~scan | Some (units, (left_mark, token)) -> log left_mark token; state := ((!state#set_units units) - #set_last (token_to_region token)) - #slide_token token; + #set_last (token_to_region token)) + #slide_token token; style token (next_token scan) buffer; patch_buffer (token_to_region token)#byte_pos buffer; token in @@ -382,6 +398,7 @@ let open_token_stream ?line ?block ~scan | _ -> () in let instance = { read = read scan ~token_to_region ~style; - input; buffer; get_win; get_pos; get_last; get_file; close} + input; buffer; close; + get_win; get_pos; get_last; get_file; get_comments} in Ok instance | Error _ as e -> e diff --git a/src/passes/01-parsing/shared/LexerLib.mli b/src/passes/01-parsing/shared/LexerLib.mli index 95f580f2a..1af30a058 100644 --- a/src/passes/01-parsing/shared/LexerLib.mli +++ b/src/passes/01-parsing/shared/LexerLib.mli @@ -1,7 +1,8 @@ (* A library for writing UTF8-aware lexers *) module Region = Simple_utils.Region -module Pos = Simple_utils.Pos +module Pos = Simple_utils.Pos +module FQueue = Simple_utils.FQueue (* The function [rollback] resets the lexing buffer to the state it was when it matched the last regular expression. This function is @@ -39,7 +40,7 @@ type thread = < set_opening : Region.t -> thread > -val mk_thread : Region.t -> lexeme -> thread +val mk_thread : Region.t -> thread (* STATE *) @@ -108,15 +109,16 @@ type 'token window = | Two of 'token * 'token type 'token state = < - units : (Markup.t list * 'token) FQueue.t; - markup : Markup.t list; - window : 'token window; - last : Region.t; - pos : Pos.t; - decoder : Uutf.decoder; - supply : Bytes.t -> int -> int -> unit; - block : EvalOpt.block_comment option; - line : EvalOpt.line_comment option; + units : (Markup.t list * 'token) FQueue.t; + markup : Markup.t list; + comments : Markup.comment FQueue.t; + window : 'token window; + last : Region.t; + pos : Pos.t; + decoder : Uutf.decoder; + supply : Bytes.t -> int -> int -> unit; + block : EvalOpt.block_comment option; + line : EvalOpt.line_comment option; enqueue : 'token -> 'token state; set_units : (Markup.t list * 'token) FQueue.t -> 'token state; @@ -133,6 +135,7 @@ type 'token state = < push_tabs : Lexing.lexbuf -> 'token state; push_bom : Lexing.lexbuf -> 'token state; push_markup : Markup.t -> 'token state; + push_comment : Markup.comment -> 'token state > (* LEXER INSTANCE *) @@ -178,11 +181,12 @@ type 'token instance = { input : input; read : log:('token logger) -> Lexing.lexbuf -> 'token; buffer : Lexing.lexbuf; + close : unit -> unit; get_win : unit -> 'token window; get_pos : unit -> Pos.t; get_last : unit -> Region.t; get_file : unit -> file_path; - close : unit -> unit + get_comments : unit -> Markup.comment FQueue.t } type open_err = File_opening of string diff --git a/src/passes/01-parsing/shared/Markup.ml b/src/passes/01-parsing/shared/Markup.ml index 3b94830cb..29e2fad00 100644 --- a/src/passes/01-parsing/shared/Markup.ml +++ b/src/passes/01-parsing/shared/Markup.ml @@ -42,3 +42,9 @@ let to_string markup ?(offsets=true) mode = region, sprintf "BOM \"%s\"" (String.escaped value) in let reg_str = region#compact ~offsets mode in sprintf "%s: %s" reg_str val_str + +(* Comments *) + +type comment = + Line of lexeme Region.reg +| Block of lexeme Region.reg diff --git a/src/passes/01-parsing/shared/Markup.mli b/src/passes/01-parsing/shared/Markup.mli index 6b31c0647..7a11eaee3 100644 --- a/src/passes/01-parsing/shared/Markup.mli +++ b/src/passes/01-parsing/shared/Markup.mli @@ -1,11 +1,12 @@ -(** This module defines the sorts of markup recognised by the LIGO +(* This module defines the sorts of markup recognised by the LIGO lexer *) module Region = Simple_utils.Region -(** A lexeme is piece of concrete syntax belonging to a token. In +(* A lexeme is piece of concrete syntax belonging to a token. In algebraic terms, a token is also a piece of abstract lexical syntax. Lexical units emcompass both markup and lexemes. *) + type lexeme = string type t = @@ -18,7 +19,7 @@ type t = type markup = t -(** Pretty-printing of markup +(* Pretty-printing of markup The difference between [to_lexeme] and [to_string] is that the former builds the corresponding concrete syntax (the lexeme), @@ -31,3 +32,9 @@ type markup = t val to_lexeme : t -> lexeme val to_string : t -> ?offsets:bool -> [`Byte | `Point] -> string + +(* Comments *) + +type comment = + Line of lexeme Region.reg +| Block of lexeme Region.reg diff --git a/src/passes/01-parsing/shared/Memo.ml b/src/passes/01-parsing/shared/Misc/Memo.ml similarity index 100% rename from src/passes/01-parsing/shared/Memo.ml rename to src/passes/01-parsing/shared/Misc/Memo.ml diff --git a/src/passes/01-parsing/shared/Memo.mli b/src/passes/01-parsing/shared/Misc/Memo.mli similarity index 100% rename from src/passes/01-parsing/shared/Memo.mli rename to src/passes/01-parsing/shared/Misc/Memo.mli diff --git a/src/passes/01-parsing/shared/Doc/shared.txt b/src/passes/01-parsing/shared/Misc/shared.txt similarity index 100% rename from src/passes/01-parsing/shared/Doc/shared.txt rename to src/passes/01-parsing/shared/Misc/shared.txt diff --git a/src/passes/01-parsing/shared/ParserAPI.ml b/src/passes/01-parsing/shared/ParserAPI.ml index 73b384302..a93f5dff2 100644 --- a/src/passes/01-parsing/shared/ParserAPI.ml +++ b/src/passes/01-parsing/shared/ParserAPI.ml @@ -1,6 +1,14 @@ (* Generic parser for LIGO *) -module Region = Simple_utils.Region +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerLib = Lexer_shared.LexerLib +module LexerLog = Lexer_shared.LexerLog + +(* Input/Output *) type options = < offsets : bool; diff --git a/src/passes/01-parsing/shared/ParserAPI.mli b/src/passes/01-parsing/shared/ParserAPI.mli index 90d51c392..44fafbc78 100644 --- a/src/passes/01-parsing/shared/ParserAPI.mli +++ b/src/passes/01-parsing/shared/ParserAPI.mli @@ -1,6 +1,13 @@ (* Generic parser API for LIGO *) -module Region = Simple_utils.Region +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerLib = Lexer_shared.LexerLib + +(* Input/Output *) type options = < offsets : bool; diff --git a/src/passes/01-parsing/shared/ParserUnit.ml b/src/passes/01-parsing/shared/ParserUnit.ml index 8c15c1db2..1f892ca44 100644 --- a/src/passes/01-parsing/shared/ParserUnit.ml +++ b/src/passes/01-parsing/shared/ParserUnit.ml @@ -1,8 +1,16 @@ (* Functor to build a LIGO parser *) -module Region = Simple_utils.Region -module Preproc = Preprocessor.Preproc -module SSet = Set.Make (String) +(* Dependencies *) + +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module LexerLib = Lexer_shared.LexerLib +module LexerLog = Lexer_shared.LexerLog +module Preproc = Preprocessor.Preproc +module SSet = Set.Make (String) + +(* A subtype of [EvalOpt.options] *) module type SubIO = sig diff --git a/src/passes/01-parsing/shared/ParserUnit.mli b/src/passes/01-parsing/shared/ParserUnit.mli index fe3b90dc1..3551af00e 100644 --- a/src/passes/01-parsing/shared/ParserUnit.mli +++ b/src/passes/01-parsing/shared/ParserUnit.mli @@ -1,8 +1,12 @@ (* Functor to build a standalone LIGO parser *) -module Region = Simple_utils.Region +(* Dependencies *) -module SSet : Set.S with type elt = string and type t = Set.Make(String).t +module Region = Simple_utils.Region +module EvalOpt = Lexer_shared.EvalOpt +module Lexer = Lexer_shared.Lexer +module SSet : Set.S with type elt = string + and type t = Set.Make(String).t (* A subtype of [EvalOpt.options] *) diff --git a/src/passes/01-parsing/shared/dune b/src/passes/01-parsing/shared/dune index db0ce3e46..e94994956 100644 --- a/src/passes/01-parsing/shared/dune +++ b/src/passes/01-parsing/shared/dune @@ -1,29 +1,51 @@ +;; Build of the lexer in common to all Ligo's dialects + (ocamllex Lexer) +;; Build of the lexer as a library + +(library + (name lexer_shared) + (public_name ligo.lexer.shared) + (libraries + ;; Ligo + simple-utils + ;; Vendors + Preprocessor + ;; Third party + uutf + getopt + zarith) + (modules + LexerLib + LexerUnit + Lexer + LexerLog + Markup + EvalOpt + Version) + (preprocess + (pps bisect_ppx --conditional))) + +;; Build of the parser as a library + (library (name parser_shared) (public_name ligo.parser.shared) (libraries - menhirLib + ;; Ligo + lexer_shared simple-utils - uutf - getopt - zarith - Preprocessor) - (preprocess - (pps bisect_ppx --conditional)) + ;; Third party + menhirLib) (modules - LexerLib - LexerUnit ParserUnit - ParserAPI - Lexer - LexerLog - Markup - Utils - FQueue - EvalOpt - Version)) + ParserAPI) + (preprocess + (pps bisect_ppx --conditional))) +;; (flags (:standard -open Lexer_shared))) + +;; Build of the version source (for the user, as a CLI option) (rule (targets Version.ml) diff --git a/src/passes/03-tree_abstraction/cameligo/decompiler.ml b/src/passes/03-tree_abstraction/cameligo/decompiler.ml index ee19bc15c..e278d25a1 100644 --- a/src/passes/03-tree_abstraction/cameligo/decompiler.ml +++ b/src/passes/03-tree_abstraction/cameligo/decompiler.ml @@ -13,14 +13,14 @@ let wrap : type a. a -> a CST.reg = fun value -> {value;region=rg} let list_to_sepseq lst = match lst with [] -> None - | hd :: lst -> + | hd :: lst -> let aux e = (rg, e) in Some (hd, List.map aux lst) -let list_to_nsepseq lst = +let list_to_nsepseq lst = match list_to_sepseq lst with Some s -> ok @@ s | None -> failwith "List is empty" - + let nelist_to_npseq (hd, lst) = (hd, List.map (fun e -> (rg, e)) lst) let npseq_cons hd lst = hd,(rg, fst lst)::(snd lst) @@ -39,7 +39,7 @@ let decompile_variable : type a. a Var.t -> CST.variable = fun var -> if String.contains var '#' then let var = String.split_on_char '#' var in wrap @@ "gen__" ^ (String.concat "" var) - else + else if String.length var > 4 && String.equal "gen__" @@ String.sub var 0 5 then wrap @@ "user__" ^ var else @@ -51,23 +51,23 @@ let rec decompile_type_expr : AST.type_expression -> _ result = fun te -> T_sum sum -> let sum = AST.CMap.to_kv_list sum in let aux (AST.Constructor c, AST.{ctor_type;_}) = - let constr = wrap c in + let constr = wrap c in let%bind arg = decompile_type_expr ctor_type in let arg = Some (rg, arg) in let variant : CST.variant = {constr;arg} in - ok @@ wrap variant + ok @@ wrap variant in let%bind sum = bind_map_list aux sum in let%bind sum = list_to_nsepseq sum in return @@ CST.TSum (wrap sum) - | T_record record -> + | T_record record -> let record = AST.LMap.to_kv_list record in let aux (AST.Label c, AST.{field_type;_}) = - let field_name = wrap c in + let field_name = wrap c in let colon = rg in let%bind field_type = decompile_type_expr field_type in let variant : CST.field_decl = {field_name;colon;field_type} in - ok @@ wrap variant + ok @@ wrap variant in let%bind record = bind_map_list aux record in let%bind record = list_to_nsepseq record in @@ -97,27 +97,27 @@ let rec decompile_type_expr : AST.type_expression -> _ result = fun te -> failwith "let's work on it later" let get_e_variable : AST.expression -> _ result = fun expr -> - match expr.expression_content with + match expr.expression_content with E_variable var -> ok @@ var.wrap_content - | _ -> failwith @@ + | _ -> failwith @@ Format.asprintf "%a should be a variable expression" AST.PP.expression expr let get_e_tuple : AST.expression -> _ result = fun expr -> - match expr.expression_content with + match expr.expression_content with E_tuple tuple -> ok @@ tuple | E_variable _ | E_literal _ | E_constant _ | E_lambda _ -> ok @@ [expr] - | _ -> failwith @@ + | _ -> failwith @@ Format.asprintf "%a should be a tuple expression" AST.PP.expression expr let pattern_type var ty_opt = let var = CST.PVar (decompile_variable var) in match ty_opt with - Some s -> + Some s -> let%bind type_expr = decompile_type_expr s in ok @@ CST.PTyped (wrap @@ CST.{pattern=var;colon=rg;type_expr}) | None -> ok @@ var @@ -126,7 +126,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> let return_expr expr = ok @@ expr in let return_expr_with_par expr = return_expr @@ CST.EPar (wrap @@ par @@ expr) in match expr.expression_content with - E_variable name -> + E_variable name -> let var = decompile_variable name.wrap_content in return_expr @@ CST.EVar (var) | E_constant {cons_name; arguments} -> @@ -145,7 +145,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> Literal_unit -> return_expr @@ CST.EUnit (wrap (rg,rg)) | Literal_int i -> return_expr @@ CST.EArith (Int (wrap ("",i))) | Literal_nat n -> return_expr @@ CST.EArith (Nat (wrap ("",n))) - | Literal_timestamp time -> + | Literal_timestamp time -> let time = Tezos_utils.Time.Protocol.to_notation @@ Tezos_utils.Time.Protocol.of_seconds @@ Z.to_int64 time in (* TODO combinators for CSTs. *) @@ -175,15 +175,15 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> let kh = CST.EString (String (wrap kh)) in let%bind ty = decompile_type_expr @@ AST.t_key_hash () in return_expr @@ CST.EAnnot (wrap @@ par (kh,rg,ty)) - | Literal_chain_id _ + | Literal_chain_id _ | Literal_void | Literal_operation _ -> failwith "chain_id, void, operation are not created currently ?" ) | E_application {lamb;args} -> let%bind lamb = decompile_expression lamb in - let%bind args = map List.Ne.of_list @@ - bind (bind_map_list decompile_expression) @@ + let%bind args = map List.Ne.of_list @@ + bind (bind_map_list decompile_expression) @@ get_e_tuple args in return_expr @@ CST.ECall (wrap (lamb,args)) @@ -220,7 +220,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> return_expr @@ CST.ECase (wrap cases) | E_record record -> let record = AST.LMap.to_kv_list record in - let aux (AST.Label str, expr) = + let aux (AST.Label str, expr) = let field_name = wrap str in let%bind field_expr = decompile_expression expr in let field : CST.field_assign = {field_name;assignment=rg;field_expr} in @@ -256,10 +256,10 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> | E_update {record={expression_content=E_update _;_} as record;path;update} -> let%bind record = decompile_expression record in let%bind (record,updates) = match record with - CST.EUpdate {value;_} -> ok @@ (value.record,value.updates) - | _ -> failwith @@ Format.asprintf "Inpossible case %a" AST.PP.expression expr + CST.EUpdate {value;_} -> ok @@ (value.record,value.updates) + | _ -> failwith @@ Format.asprintf "Inpossible case %a" AST.PP.expression expr in - let%bind var,path = match path with + let%bind var,path = match path with Access_record var::path -> ok @@ (var,path) | _ -> failwith "Impossible case %a" in @@ -275,7 +275,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> let%bind field_expr = decompile_expression update in let (struct_name,field_path) = List.Ne.of_list path in (match field_path with - [] -> + [] -> (match struct_name with Access_record name -> let record : CST.path = Name record in @@ -299,7 +299,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> | _ -> let%bind struct_name = match struct_name with Access_record name -> ok @@ wrap name - | Access_tuple i -> ok @@ wrap @@ Z.to_string i + | Access_tuple i -> ok @@ wrap @@ Z.to_string i | Access_map _ -> failwith @@ Format.asprintf "invalid map update %a" AST.PP.expression expr in (match List.rev field_path with @@ -347,7 +347,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> let%bind map = bind_map_list (bind_map_pair decompile_expression) map in let aux (k,v) = CST.ETuple (wrap (k,[(rg,v)])) in let map = List.map aux map in - (match map with + (match map with [] -> return_expr @@ CST.EVar (wrap "Big_map.empty") | _ -> let var = CST.EVar (wrap "Map.literal") in @@ -357,7 +357,7 @@ let rec decompile_expression : AST.expression -> _ result = fun expr -> let%bind big_map = bind_map_list (bind_map_pair decompile_expression) big_map in let aux (k,v) = CST.ETuple (wrap (k,[(rg,v)])) in let big_map = List.map aux big_map in - (match big_map with + (match big_map with [] -> return_expr @@ CST.EVar (wrap "Big_map.empty") | _ -> let var = CST.EVar (wrap "Big_map.literal") in @@ -409,28 +409,28 @@ and decompile_attributes = function true -> [wrap "inline"] | false -> [] -and decompile_matching_cases : AST.matching_expr -> ((CST.expr CST.case_clause Region.reg, Region.t) Parser_shared.Utils.nsepseq Region.reg,_) result = +and decompile_matching_cases : AST.matching_expr -> ((CST.expr CST.case_clause Region.reg, Region.t) Simple_utils.Utils.nsepseq Region.reg,_) result = fun m -> let%bind cases = match m with Match_variable (var, ty_opt, expr) -> - let%bind pattern = pattern_type var.wrap_content ty_opt in + let%bind pattern = pattern_type var.wrap_content ty_opt in let%bind rhs = decompile_expression expr in let case : _ CST.case_clause = {pattern; arrow=rg; rhs}in ok @@ [wrap case] | Match_tuple (lst, ty_opt, expr) -> - let%bind tuple = match ty_opt with + let%bind tuple = match ty_opt with Some ty_lst -> - let aux (var, ty) = + let aux (var, ty) = let pattern = CST.PVar (decompile_variable var) in let%bind type_expr = decompile_type_expr ty in - ok @@ CST.PTyped (wrap @@ CST.{pattern;colon=rg;type_expr}) + ok @@ CST.PTyped (wrap @@ CST.{pattern;colon=rg;type_expr}) in bind list_to_nsepseq @@ bind_map_list aux @@ List.combine (List.map (fun (e:AST.expression_variable) -> e.wrap_content) lst) ty_lst | None -> let aux (var:AST.expression_variable) = CST.PVar (decompile_variable var.wrap_content) in - list_to_nsepseq @@ List.map aux lst + list_to_nsepseq @@ List.map aux lst in - let pattern : CST.pattern = PTuple (wrap @@ tuple) in + let pattern : CST.pattern = PTuple (wrap @@ tuple) in let%bind rhs = decompile_expression expr in let case : _ CST.case_clause = {pattern; arrow=rg; rhs}in ok @@ [wrap case] @@ -453,7 +453,7 @@ fun m -> let nil_case : _ CST.case_clause = {pattern=PList (PListComp (wrap @@ inject brackets None));arrow=rg; rhs} in ok @@ [wrap cons_case; wrap nil_case] | Match_variant lst -> - let aux ((c,(v:AST.expression_variable)),e) = + let aux ((c,(v:AST.expression_variable)),e) = let AST.Constructor c = c in let constr = wrap @@ c in let var : CST.pattern = PVar (decompile_variable v.wrap_content) in diff --git a/src/passes/03-tree_abstraction/pascaligo/compiler.ml b/src/passes/03-tree_abstraction/pascaligo/compiler.ml index 3ce39f998..22fbb8e7a 100644 --- a/src/passes/03-tree_abstraction/pascaligo/compiler.ml +++ b/src/passes/03-tree_abstraction/pascaligo/compiler.ml @@ -584,7 +584,6 @@ and compile_instruction : ?next: AST.expression -> CST.instruction -> _ result let%bind (_, var, path) = compile_path mlu.path in let%bind index = compile_expression @@ mlu.index.value.inside in ok @@ (var, path @ [Access_map index]) - in match instruction with Cond c -> @@ -747,8 +746,8 @@ and compile_block : ?next:AST.expression -> CST.block CST.reg -> _ result = fun let (block', _loc) = r_split block in let statements = npseq_to_list block'.statements in let aux (next,attr) statement = - let%bind (statement, attr) = compile_statement ?next attr statement in - return (statement,attr) + let%bind (statement, attr) = compile_statement ?next attr statement + in return (statement,attr) in let%bind (block', _) = bind_fold_right_list aux (next,None) statements in match block' with diff --git a/src/passes/03-tree_abstraction/pascaligo/decompiler.ml b/src/passes/03-tree_abstraction/pascaligo/decompiler.ml index ad1088d36..999812f98 100644 --- a/src/passes/03-tree_abstraction/pascaligo/decompiler.ml +++ b/src/passes/03-tree_abstraction/pascaligo/decompiler.ml @@ -13,10 +13,10 @@ let wrap : type a. a -> a CST.reg = fun value -> {value;region=rg} let list_to_sepseq lst = match lst with [] -> None - | hd :: lst -> + | hd :: lst -> let aux e = (rg, e) in Some (hd, List.map aux lst) -let list_to_nsepseq lst = +let list_to_nsepseq lst = match list_to_sepseq lst with Some s -> ok @@ s | None -> failwith "List is not a non_empty list" @@ -40,7 +40,7 @@ let decompile_variable : type a. a Var.t -> CST.variable = fun var -> if String.contains var '#' then let var = String.split_on_char '#' var in wrap @@ "gen__" ^ (String.concat "" var) - else + else if String.length var > 4 && String.equal "gen__" @@ String.sub var 0 5 then wrap @@ "user__" ^ var else @@ -52,23 +52,23 @@ let rec decompile_type_expr : AST.type_expression -> _ result = fun te -> T_sum sum -> let sum = AST.CMap.to_kv_list sum in let aux (AST.Constructor c, AST.{ctor_type;_}) = - let constr = wrap c in + let constr = wrap c in let%bind arg = decompile_type_expr ctor_type in let arg = Some (rg, arg) in let variant : CST.variant = {constr;arg} in - ok @@ wrap variant + ok @@ wrap variant in let%bind sum = bind_map_list aux sum in let%bind sum = list_to_nsepseq sum in return @@ CST.TSum (wrap sum) - | T_record record -> + | T_record record -> let record = AST.LMap.to_kv_list record in let aux (AST.Label c, AST.{field_type;_}) = - let field_name = wrap c in + let field_name = wrap c in let colon = rg in let%bind field_type = decompile_type_expr field_type in let variant : CST.field_decl = {field_name;colon;field_type} in - ok @@ wrap variant + ok @@ wrap variant in let%bind record = bind_map_list aux record in let%bind record = list_to_nsepseq record in @@ -98,30 +98,30 @@ let rec decompile_type_expr : AST.type_expression -> _ result = fun te -> failwith "let's work on it later" let get_e_variable : AST.expression -> _ result = fun expr -> - match expr.expression_content with + match expr.expression_content with E_variable var -> ok @@ var.wrap_content - | _ -> failwith @@ + | _ -> failwith @@ Format.asprintf "%a should be a variable expression" AST.PP.expression expr - + let rec get_e_accessor : AST.expression -> _ result = fun expr -> - match expr.expression_content with + match expr.expression_content with E_variable var -> ok @@ (var, []) | E_accessor {record;path} -> let%bind (var, lst) = get_e_accessor record in ok @@ (var, lst @ path) - | _ -> failwith @@ + | _ -> failwith @@ Format.asprintf "%a should be a variable expression" AST.PP.expression expr let get_e_tuple : AST.expression -> _ result = fun expr -> - match expr.expression_content with + match expr.expression_content with E_tuple tuple -> ok @@ tuple | E_variable _ | E_literal _ | E_constant _ | E_lambda _ -> ok @@ [expr] - | _ -> failwith @@ + | _ -> failwith @@ Format.asprintf "%a should be a tuple expression" AST.PP.expression expr type eos = @@ -138,7 +138,7 @@ let statements_of_expression : CST.expr -> CST.statement List.Ne.t option = fun let rec decompile_expression : AST.expression -> _ result = fun e -> let%bind (block,expr) = decompile_to_block e in match expr with - Some expr -> + Some expr -> ( match block with Some block -> let block = wrap @@ block in @@ -146,7 +146,7 @@ let rec decompile_expression : AST.expression -> _ result = fun e -> | None -> ok @@ expr ) | None -> - failwith @@ Format.asprintf + failwith @@ Format.asprintf "An expression was expected, but this was decompile to statements. \n Expr : %a Loc : %a" @@ -157,8 +157,8 @@ and decompile_statements : AST.expression -> _ result = fun expr -> let%bind (stat,_) = decompile_eos Statements expr in match stat with Some stat -> ok @@ stat - | None -> - failwith @@ Format.asprintf + | None -> + failwith @@ Format.asprintf "Statements was expected, but this was decompile to expression. \n Expr : %a Loc : %a" @@ -185,7 +185,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* let return_stat_ez stat = return_stat @@ (stat, []) in let return_inst inst = return_stat_ez @@ CST.Instr inst in match expr.expression_content with - E_variable name -> + E_variable name -> let var = decompile_variable name.wrap_content in return_expr @@ CST.EVar (var) | E_constant {cons_name; arguments} -> @@ -195,7 +195,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* | _ -> let%bind arguments = decompile_to_tuple_expr arguments in let const : CST.fun_call = wrap (expr, arguments) in - (match output with + (match output with Expression -> return_expr (CST.ECall const) | Statements -> return_inst (CST.ProcCall const) ) @@ -205,7 +205,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* Literal_unit -> return_expr @@ CST.EUnit rg | Literal_int i -> return_expr @@ CST.EArith (Int (wrap ("",i))) | Literal_nat n -> return_expr @@ CST.EArith (Nat (wrap ("",n))) - | Literal_timestamp time -> + | Literal_timestamp time -> let time = Tezos_utils.Time.Protocol.to_notation @@ Tezos_utils.Time.Protocol.of_seconds @@ Z.to_int64 time in (* TODO combinators for CSTs. *) @@ -235,7 +235,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* let kh = CST.EString (String (wrap kh)) in let%bind ty = decompile_type_expr @@ AST.t_key_hash () in return_expr @@ CST.EAnnot (wrap @@ par (kh,rg,ty)) - | Literal_chain_id _ + | Literal_chain_id _ | Literal_void | Literal_operation _ -> failwith "chain_id, void, operation are not created currently ?" @@ -244,7 +244,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* let%bind lamb = decompile_expression lamb in let%bind args = bind decompile_to_tuple_expr @@ get_e_tuple args in (match output with - Expression -> + Expression -> return_expr @@ CST.ECall (wrap (lamb,args)) | Statements -> return_inst @@ CST.ProcCall (wrap (lamb,args)) @@ -281,7 +281,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* | E_let_in {let_binder;rhs;let_result;inline} -> let%bind lin = decompile_to_data_decl let_binder rhs inline in let%bind (lst, expr) = decompile_eos Expression let_result in - let lst = match lst with + let lst = match lst with Some lst -> List.Ne.cons (CST.Data lin) lst | None -> (CST.Data lin, []) in @@ -310,7 +310,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* ) | E_record record -> let record = AST.LMap.to_kv_list record in - let aux (AST.Label str, expr) = + let aux (AST.Label str, expr) = let field_name = wrap str in let%bind field_expr = decompile_expression expr in let field : CST.field_assignment = {field_name;assignment=rg;field_expr} in @@ -350,10 +350,10 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* | E_update {record={expression_content=E_update _;_} as record;path;update} -> let%bind record = decompile_expression record in let%bind (record,updates) = match record with - CST.EUpdate {value;_} -> ok @@ (value.record,value.updates) - | _ -> failwith @@ Format.asprintf "Inpossible case %a" AST.PP.expression expr + CST.EUpdate {value;_} -> ok @@ (value.record,value.updates) + | _ -> failwith @@ Format.asprintf "Inpossible case %a" AST.PP.expression expr in - let%bind var,path = match path with + let%bind var,path = match path with Access_record var::path -> ok @@ (var,path) | _ -> failwith "Impossible case %a" in @@ -369,7 +369,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* let%bind field_expr = decompile_expression update in let (struct_name,field_path) = List.Ne.of_list path in (match field_path with - [] -> + [] -> (match struct_name with Access_record name -> let record : CST.path = Name record in @@ -483,7 +483,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* let var = decompile_variable @@ (fst binder).wrap_content in let bind_to = Option.map (fun (x:AST.expression_variable) -> (rg,decompile_variable x.wrap_content)) @@ snd binder in let%bind expr = decompile_expression collection in - let collection = match collection_type with + let collection = match collection_type with Map -> CST.Map rg | Set -> Set rg | List -> List rg in let%bind (block,_next) = decompile_to_block body in let block = wrap @@ Option.unopt ~default:(empty_block) block in @@ -498,7 +498,7 @@ and decompile_eos : eos -> AST.expression -> ((CST.statement List.Ne.t option)* and decompile_if_clause : AST.expression -> (CST.if_clause, _) result = fun e -> let%bind clause = decompile_statements e in - match clause with + match clause with CST.Instr instr,[] -> ok @@ CST.ClauseInstr instr | _ -> @@ -508,12 +508,12 @@ and decompile_if_clause : AST.expression -> (CST.if_clause, _) result = fun e -> and decompile_to_data_decl : (AST.expression_variable * AST.type_expression option) -> AST.expression -> bool -> (CST.data_decl, _) result = fun (name,ty_opt) expr inline -> let name = decompile_variable name.wrap_content in let%bind const_type = bind_map_option (bind_compose (ok <@ prefix_colon) decompile_type_expr) ty_opt in - let attributes : CST.attr_decl option = match inline with + let attributes : CST.attr_decl option = match inline with true -> Some (wrap @@ ne_inject (NEInjAttr rg) @@ (wrap @@ "inline",[])) | false -> None in let fun_name = name in - match expr.expression_content with + match expr.expression_content with E_lambda lambda -> let%bind (param,ret_type,return) = decompile_lambda lambda in let fun_decl : CST.fun_decl = {kwd_recursive=None;kwd_function=rg;fun_name;param;ret_type;kwd_is=rg;return;terminator=Some rg;attributes} in @@ -531,14 +531,14 @@ and decompile_to_data_decl : (AST.expression_variable * AST.type_expression opti and decompile_to_lhs : AST.expression_variable -> AST.access list -> (CST.lhs, _) result = fun var access -> match List.rev access with [] -> ok @@ (CST.Path (Name (decompile_variable var.wrap_content)) : CST.lhs) - | hd :: tl -> - match hd with + | hd :: tl -> + match hd with | AST.Access_map e -> let%bind path = decompile_to_path var @@ List.rev tl in let%bind index = map (wrap <@ brackets) @@ decompile_expression e in let mlu: CST.map_lookup = {path;index} in ok @@ CST.MapPath (wrap @@ mlu) - | _ -> + | _ -> let%bind path = decompile_to_path var @@ access in ok @@ (CST.Path (path) : CST.lhs) @@ -570,18 +570,18 @@ and decompile_lambda : AST.lambda -> _ = fun {binder;input_type;output_type;resu let%bind return = decompile_expression result in ok @@ (param,ret_type,return) -and decompile_matching_expr : type a.(AST.expr ->(a,_) result) -> AST.matching_expr -> ((a CST.case_clause Region.reg, Region.t) Parser_shared.Utils.nsepseq Region.reg,_) result = +and decompile_matching_expr : type a.(AST.expr ->(a,_) result) -> AST.matching_expr -> ((a CST.case_clause Region.reg, Region.t) Simple_utils.Utils.nsepseq Region.reg,_) result = fun f m -> let%bind cases = match m with Match_variable (var, _ty_opt, expr) -> - let pattern : CST.pattern = PVar (decompile_variable var.wrap_content) in + let pattern : CST.pattern = PVar (decompile_variable var.wrap_content) in let%bind rhs = f expr in let case : _ CST.case_clause = {pattern; arrow=rg; rhs}in ok @@ [wrap case] | Match_tuple (lst, _ty_opt, expr) -> let aux (var:AST.expression_variable) = CST.PVar (decompile_variable var.wrap_content) in let%bind tuple = list_to_nsepseq @@ List.map aux lst in - let pattern : CST.pattern = PTuple (wrap @@ par @@ tuple) in + let pattern : CST.pattern = PTuple (wrap @@ par @@ tuple) in let%bind rhs = f expr in let case : _ CST.case_clause = {pattern; arrow=rg; rhs}in ok @@ [wrap case] @@ -604,7 +604,7 @@ fun f m -> let nil_case : _ CST.case_clause = {pattern=PList (PNil rg);arrow=rg; rhs} in ok @@ [wrap cons_case; wrap nil_case] | Match_variant lst -> - let aux ((c,(v:AST.expression_variable)),e) = + let aux ((c,(v:AST.expression_variable)),e) = let AST.Constructor c = c in let constr = wrap @@ c in let var : CST.pattern = PVar (decompile_variable v.wrap_content) in @@ -630,9 +630,9 @@ let decompile_declaration : AST.declaration Location.wrap -> (CST.declaration, _ ok @@ CST.TypeDecl (wrap (CST.{kwd_type; name; kwd_is; type_expr; terminator})) | Declaration_constant (var, ty_opt, inline, expr) -> let attributes = match inline with - true -> + true -> let attr = wrap "inline" in - let ne_inj : _ CST.ne_injection = + let ne_inj : _ CST.ne_injection = {kind=NEInjAttr rg;enclosing=End rg;ne_elements=(attr, []);terminator=Some rg} in let attr_decl = wrap ne_inj in Some attr_decl diff --git a/src/passes/03-tree_abstraction/pascaligo/errors.ml b/src/passes/03-tree_abstraction/pascaligo/errors.ml index 7760ea91a..cdbce4dbc 100644 --- a/src/passes/03-tree_abstraction/pascaligo/errors.ml +++ b/src/passes/03-tree_abstraction/pascaligo/errors.ml @@ -15,7 +15,7 @@ type abs_error = [ | `Concrete_pascaligo_unsupported_string_singleton of Raw.type_expr | `Concrete_pascaligo_unsupported_deep_some_pattern of Raw.pattern | `Concrete_pascaligo_unsupported_deep_list_pattern of Raw.pattern - | `Concrete_pascaligo_unsupported_deep_tuple_pattern of (Raw.pattern, Raw.wild) Parser_shared.Utils.nsepseq Raw.par Raw.reg + | `Concrete_pascaligo_unsupported_deep_tuple_pattern of (Raw.pattern, Raw.wild) Simple_utils.Utils.nsepseq Raw.par Raw.reg | `Concrete_pascaligo_unknown_built_in of string | `Concrete_pascaligo_michelson_type_wrong of Raw.type_expr * string | `Concrete_pascaligo_michelson_type_wrong_arity of Location.t * string diff --git a/src/stages/1-cst/cameligo/CST.ml b/src/stages/1-cst/cameligo/CST.ml index e62ecaf93..2fbb2f650 100644 --- a/src/stages/1-cst/cameligo/CST.ml +++ b/src/stages/1-cst/cameligo/CST.ml @@ -6,6 +6,7 @@ (* Utilities *) +module Utils = Simple_utils.Utils open Utils (* Regions @@ -23,6 +24,10 @@ module Region = Simple_utils.Region type 'a reg = 'a Region.reg +(* Lexemes *) + +type lexeme = string + (* Keywords of OCaml *) type keyword = Region.t @@ -169,7 +174,7 @@ and type_expr = | TFun of (type_expr * arrow * type_expr) reg | TPar of type_expr par reg | TVar of variable -| TString of Lexer.lexeme reg +| TString of lexeme reg and cartesian = (type_expr, times) nsepseq reg @@ -192,9 +197,9 @@ and pattern = | PFalse of kwd_false | PTrue of kwd_true | PVar of variable -| PInt of (Lexer.lexeme * Z.t) reg -| PNat of (Lexer.lexeme * Z.t) reg -| PBytes of (Lexer.lexeme * Hex.t) reg +| PInt of (lexeme * Z.t) reg +| PNat of (lexeme * Z.t) reg +| PBytes of (lexeme * Hex.t) reg | PString of string reg | PVerbatim of string reg | PWild of wild diff --git a/src/stages/1-cst/cameligo/cameligo.ml b/src/stages/1-cst/cameligo/cameligo.ml deleted file mode 100644 index 0429a03db..000000000 --- a/src/stages/1-cst/cameligo/cameligo.ml +++ /dev/null @@ -1 +0,0 @@ -include CST diff --git a/src/stages/1-cst/cameligo/dune b/src/stages/1-cst/cameligo/dune index 5249351d2..53a613ebc 100644 --- a/src/stages/1-cst/cameligo/dune +++ b/src/stages/1-cst/cameligo/dune @@ -2,12 +2,11 @@ (name cst_cameligo) (public_name ligo.cst.cameligo) (libraries + ;; Ligo simple-utils - tezos-utils - parser_shared - ) + ;; Third party + hex + zarith) + (modules CST ParserLog) (preprocess - (pps ppx_let bisect_ppx --conditional) - ) - (flags (:standard -open Parser_shared -open Simple_utils )) -) + (pps ppx_let bisect_ppx --conditional))) diff --git a/src/stages/1-cst/dune b/src/stages/1-cst/dune index 10a31affb..c29294227 100644 --- a/src/stages/1-cst/dune +++ b/src/stages/1-cst/dune @@ -2,13 +2,7 @@ (name cst) (public_name ligo.cst) (libraries - simple-utils - tezos-utils cst_cameligo - cst_pascaligo - ) + cst_pascaligo) (preprocess - (pps ppx_let bisect_ppx --conditional) - ) - (flags (:standard -open Simple_utils )) -) + (pps ppx_let bisect_ppx --conditional))) diff --git a/src/stages/1-cst/pascaligo/CST.ml b/src/stages/1-cst/pascaligo/CST.ml index 5315ee73c..797a2a333 100644 --- a/src/stages/1-cst/pascaligo/CST.ml +++ b/src/stages/1-cst/pascaligo/CST.ml @@ -6,6 +6,7 @@ (* Utilities *) +module Utils = Simple_utils.Utils open Utils (* Regions @@ -23,6 +24,10 @@ module Region = Simple_utils.Region type 'a reg = 'a Region.reg +(* Lexemes *) + +type lexeme = string + (* Keywords of LIGO *) type keyword = Region.t @@ -185,7 +190,7 @@ and type_expr = | TFun of (type_expr * arrow * type_expr) reg | TPar of type_expr par reg | TVar of variable -| TString of Lexer.lexeme reg +| TString of lexeme reg and cartesian = (type_expr, times) nsepseq reg @@ -227,7 +232,7 @@ and fun_decl = { and block_with = { block : block reg; kwd_with : kwd_with; - expr : expr; + expr : expr } and parameters = (param_decl, semi) nsepseq par reg @@ -460,15 +465,15 @@ and expr = | EProj of projection reg | EUpdate of update reg | EMap of map_expr -| EVar of Lexer.lexeme reg +| EVar of lexeme reg | ECall of fun_call -| EBytes of (Lexer.lexeme * Hex.t) reg +| EBytes of (lexeme * Hex.t) reg | EUnit of c_Unit | ETuple of tuple_expr | EPar of expr par reg | EFun of fun_expr reg | ECodeInj of code_inj reg -| EBlock of block_with reg +| EBlock of block_with reg and annot_expr = expr * colon * type_expr @@ -527,14 +532,14 @@ and arith_expr = | Div of slash bin_op reg | Mod of kwd_mod bin_op reg | Neg of minus un_op reg -| Int of (Lexer.lexeme * Z.t) reg -| Nat of (Lexer.lexeme * Z.t) reg -| Mutez of (Lexer.lexeme * Z.t) reg +| Int of (lexeme * Z.t) reg +| Nat of (lexeme * Z.t) reg +| Mutez of (lexeme * Z.t) reg and string_expr = Cat of cat bin_op reg -| String of Lexer.lexeme reg -| Verbatim of Lexer.lexeme reg +| String of lexeme reg +| Verbatim of lexeme reg and list_expr = ECons of cons bin_op reg @@ -574,7 +579,7 @@ and field_path_assignment = { and selection = FieldName of field_name -| Component of (Lexer.lexeme * Z.t) reg +| Component of (lexeme * Z.t) reg and tuple_expr = (expr, comma) nsepseq par reg @@ -618,12 +623,12 @@ and ne_injection_kwd = and pattern = PConstr of constr_pattern -| PVar of Lexer.lexeme reg +| PVar of lexeme reg | PWild of wild -| PInt of (Lexer.lexeme * Z.t) reg -| PNat of (Lexer.lexeme * Z.t) reg -| PBytes of (Lexer.lexeme * Hex.t) reg -| PString of Lexer.lexeme reg +| PInt of (lexeme * Z.t) reg +| PNat of (lexeme * Z.t) reg +| PBytes of (lexeme * Hex.t) reg +| PString of lexeme reg | PList of list_pattern | PTuple of tuple_pattern diff --git a/src/stages/1-cst/pascaligo/ParserLog.ml b/src/stages/1-cst/pascaligo/ParserLog.ml index f536133a0..f1e04eda5 100644 --- a/src/stages/1-cst/pascaligo/ParserLog.ml +++ b/src/stages/1-cst/pascaligo/ParserLog.ml @@ -64,7 +64,7 @@ let print_sepseq : None -> () | Some seq -> print_nsepseq state sep print seq -let print_option : state -> (state -> 'a -> unit ) -> 'a option -> unit = +let print_option : state -> (state -> 'a -> unit) -> 'a option -> unit = fun state print -> function None -> () | Some opt -> print state opt @@ -141,7 +141,7 @@ and print_const_decl state {value; _} = equal; init; terminator; _} = value in print_token state kwd_const "const"; print_var state name; - print_option state print_colon_type_expr const_type; + print_option state print_type_annot const_type; print_token state equal "="; print_expr state init; print_terminator state terminator @@ -165,7 +165,7 @@ and print_type_expr state = function | TVar type_var -> print_var state type_var | TString str -> print_string state str -and print_colon_type_expr state (colon, type_expr) = +and print_type_annot state (colon, type_expr) = print_token state colon ":"; print_type_expr state type_expr; @@ -223,7 +223,7 @@ and print_fun_decl state {value; _} = print_token state kwd_function "function"; print_var state fun_name; print_parameters state param; - print_option state print_colon_type_expr ret_type; + print_option state print_type_annot ret_type; print_token state kwd_is "is"; print_expr state return; print_terminator state terminator; @@ -233,7 +233,7 @@ and print_fun_expr state {value; _} = ret_type; kwd_is; return} : fun_expr = value in print_token state kwd_function "function"; print_parameters state param; - print_option state print_colon_type_expr ret_type; + print_option state print_type_annot ret_type; print_token state kwd_is "is"; print_expr state return @@ -255,9 +255,9 @@ and print_block_expr state {value; _} = and print_parameters state {value; _} = let {lpar; inside; rpar} = value in - print_token state lpar "("; + print_token state lpar "("; print_nsepseq state ";" print_param_decl inside; - print_token state rpar ")" + print_token state rpar ")" and print_param_decl state = function ParamConst param_const -> print_param_const state param_const @@ -265,15 +265,15 @@ and print_param_decl state = function and print_param_const state {value; _} = let {kwd_const; var; param_type} = value in - print_token state kwd_const "const"; - print_var state var; - print_option state print_colon_type_expr param_type + print_token state kwd_const "const"; + print_var state var; + print_option state print_type_annot param_type and print_param_var state {value; _} = let {kwd_var; var; param_type} = value in print_token state kwd_var "var"; print_var state var; - print_option state print_colon_type_expr param_type + print_option state print_type_annot param_type and print_block state block = let {enclosing; statements; terminator} = block.value in @@ -300,7 +300,7 @@ and print_var_decl state {value; _} = assign; init; terminator} = value in print_token state kwd_var "var"; print_var state name; - print_option state print_colon_type_expr var_type; + print_option state print_type_annot var_type; print_token state assign ":="; print_expr state init; print_terminator state terminator @@ -919,35 +919,49 @@ and pp_declaration state = function and pp_attr_decl state = pp_ne_injection pp_string state and pp_fun_decl state decl = - let arity, start = + let kwd_recursive = if decl.kwd_recursive = None then 0 else 1 in + let ret_type = if decl.ret_type = None then 0 else 1 in + let arity = kwd_recursive + ret_type + 3 in + let index = 0 in + let index = match decl.kwd_recursive with - None -> 4,0 - | Some _ -> - let state = state#pad 5 0 in - let () = pp_node state "recursive" - in 5,1 in - let () = - let state = state#pad arity start in - pp_ident state decl.fun_name in - let () = - let state = state#pad arity (start + 1) in + None -> index + | Some _ -> let state = state#pad arity index in + pp_node state "recursive"; + index + 1 in + let index = + let state = state#pad arity index in + pp_ident state decl.fun_name; + index + 1 in + let index = + let state = state#pad arity index in pp_node state ""; - pp_parameters state decl.param in + pp_parameters state decl.param; + index + 1 in + let index = + match decl.ret_type with + None -> index + | Some (_, t_expr) -> + let state = state#pad arity index in + pp_node state ""; + pp_type_expr (state#pad 1 0) t_expr; + index+1 in let () = - let state = state#pad arity (start + 2) in - pp_node state ""; - print_option (state#pad 1 0) pp_type_expr @@ Option.map snd decl.ret_type in - let () = - let state = state#pad arity (start + 3) in + let state = state#pad arity index in pp_node state ""; pp_expr (state#pad 1 0) decl.return in () and pp_const_decl state decl = - let arity = 3 in - pp_ident (state#pad arity 0) decl.name; - print_option (state#pad arity 1) pp_type_expr @@ Option.map snd decl.const_type; - pp_expr (state#pad arity 2) decl.init + let arity = if decl.const_type = None then 2 else 3 in + let index = 0 in + let index = + pp_ident (state#pad arity 0) decl.name; index+1 in + let index = + pp_type_annot (state#pad arity index) index decl.const_type in + let () = + pp_expr (state#pad arity index) decl.init + in () and pp_type_expr state = function TProd cartesian -> @@ -1008,43 +1022,49 @@ and pp_type_tuple state {value; _} = in List.iteri (List.length components |> apply) components and pp_fun_expr state (expr: fun_expr) = - let () = - let state = state#pad 3 0 in + let arity = if expr.ret_type = None then 2 else 3 in + let index = 0 in + let index = + let state = state#pad arity index in pp_node state ""; - pp_parameters state expr.param in + pp_parameters state expr.param; + index + 1 in + let index = + match expr.ret_type with + None -> index + | Some (_, t_expr) -> + let state = state#pad arity index in + pp_node state ""; + pp_type_expr (state#pad 1 0) t_expr; + index + 1 in let () = - let state = state#pad 3 1 in - pp_node state ""; - print_option (state#pad 1 0) pp_type_expr @@ Option.map snd expr.ret_type in - let () = - let state = state#pad 3 2 in + let state = state#pad arity index in pp_node state ""; pp_expr (state#pad 1 0) expr.return in () -and pp_code_inj state rc = +and pp_code_inj state node = let () = let state = state#pad 2 0 in pp_node state ""; - pp_string (state#pad 1 0) rc.language.value in + pp_string (state#pad 1 0) node.language.value in let () = let state = state#pad 2 1 in pp_node state ""; - pp_expr (state#pad 1 0) rc.code + pp_expr (state#pad 1 0) node.code in () -and pp_block_expr state (bw : block_with) = - let {block;expr;_}:CST.block_with = bw in +and pp_block_expr state node = + let {block; expr; _} : block_with = node in let () = let state = state#pad 2 0 in pp_node state ""; - pp_statements state block.value.statements - in + pp_statements state block.value.statements in let () = let state = state#pad 2 1 in pp_node state ""; - pp_expr (state#pad 1 0) expr in - () + pp_expr (state#pad 1 0) expr + in () and pp_parameters state {value; _} = let params = Utils.nsepseq_to_list value.inside in @@ -1054,13 +1074,15 @@ and pp_parameters state {value; _} = and pp_param_decl state = function ParamConst {value; region} -> + let arity = if value.param_type = None then 1 else 2 in pp_loc_node state "ParamConst" region; - pp_ident (state#pad 2 0) value.var; - print_option (state#pad 2 1) pp_type_expr @@ Option.map snd value.param_type + pp_ident (state#pad arity 0) value.var; + ignore (pp_type_annot (state#pad arity 1) 1 value.param_type) | ParamVar {value; region} -> + let arity = if value.param_type = None then 1 else 2 in pp_loc_node state "ParamVar" region; pp_ident (state#pad 2 0) value.var; - print_option (state#pad 2 1) pp_type_expr @@ Option.map snd value.param_type + ignore (pp_type_annot (state#pad arity 1) 1 value.param_type) and pp_statements state statements = let statements = Utils.nsepseq_to_list statements in @@ -1461,9 +1483,11 @@ and pp_data_decl state = function pp_fun_decl state value and pp_var_decl state decl = - pp_ident (state#pad 3 0) decl.name; - print_option (state#pad 3 1) pp_type_expr @@ Option.map snd decl.var_type; - pp_expr (state#pad 3 2) decl.init + let arity = if decl.var_type = None then 2 else 3 in + let index = 0 in + let index = pp_ident (state#pad arity index) decl.name; index+1 in + let index = pp_type_annot (state#pad arity index) index decl.var_type + in pp_expr (state#pad arity index) decl.init and pp_expr state = function ECase {value; region} -> @@ -1663,3 +1687,7 @@ and pp_bin_op node region state op = pp_loc_node state node region; pp_expr (state#pad 2 0) op.arg1; pp_expr (state#pad 2 1) op.arg2 + +and pp_type_annot state index = function + None -> index +| Some (_, e) -> pp_type_expr state e; index+1 diff --git a/src/stages/1-cst/pascaligo/dune b/src/stages/1-cst/pascaligo/dune index 242fcfc0f..cc20f6a01 100644 --- a/src/stages/1-cst/pascaligo/dune +++ b/src/stages/1-cst/pascaligo/dune @@ -2,12 +2,11 @@ (name cst_pascaligo) (public_name ligo.cst.pascaligo) (libraries + ;; Ligo simple-utils - tezos-utils - parser_shared - ) + ;; Third party + hex + zarith) + (modules CST ParserLog) (preprocess - (pps ppx_let bisect_ppx --conditional) - ) - (flags (:standard -open Parser_shared -open Simple_utils )) -) + (pps ppx_let bisect_ppx --conditional))) diff --git a/src/stages/1-cst/pascaligo/pascaligo.ml b/src/stages/1-cst/pascaligo/pascaligo.ml deleted file mode 100644 index 0429a03db..000000000 --- a/src/stages/1-cst/pascaligo/pascaligo.ml +++ /dev/null @@ -1 +0,0 @@ -include CST diff --git a/vendors/Preprocessor/dune b/vendors/Preprocessor/dune index dc61c5cee..db8e82013 100644 --- a/vendors/Preprocessor/dune +++ b/vendors/Preprocessor/dune @@ -5,11 +5,17 @@ (public_name Preprocessor) (wrapped true) (libraries - getopt - simple-utils) - (modules EvalOpt E_Parser E_Lexer E_AST Preproc) + getopt + simple-utils) + (modules + EvalOpt + E_Parser + E_Lexer + E_AST + Preproc) (preprocess - (pps bisect_ppx --conditional))) + (pps bisect_ppx --conditional)) + (flags (:standard -open Simple_utils))) ;; Building the lexers of the preprocessor diff --git a/src/passes/01-parsing/shared/FQueue.ml b/vendors/ligo-utils/simple-utils/FQueue.ml similarity index 100% rename from src/passes/01-parsing/shared/FQueue.ml rename to vendors/ligo-utils/simple-utils/FQueue.ml diff --git a/src/passes/01-parsing/shared/FQueue.mli b/vendors/ligo-utils/simple-utils/FQueue.mli similarity index 100% rename from src/passes/01-parsing/shared/FQueue.mli rename to vendors/ligo-utils/simple-utils/FQueue.mli diff --git a/src/passes/01-parsing/shared/Utils.ml b/vendors/ligo-utils/simple-utils/Utils.ml similarity index 100% rename from src/passes/01-parsing/shared/Utils.ml rename to vendors/ligo-utils/simple-utils/Utils.ml diff --git a/src/passes/01-parsing/shared/Utils.mli b/vendors/ligo-utils/simple-utils/Utils.mli similarity index 100% rename from src/passes/01-parsing/shared/Utils.mli rename to vendors/ligo-utils/simple-utils/Utils.mli diff --git a/vendors/ligo-utils/simple-utils/dune b/vendors/ligo-utils/simple-utils/dune index 73b0f7dd1..b1fec4c63 100644 --- a/vendors/ligo-utils/simple-utils/dune +++ b/vendors/ligo-utils/simple-utils/dune @@ -4,9 +4,6 @@ (libraries yojson unix - str - ) + str) (preprocess - (pps ppx_let) - ) -) + (pps ppx_let))) diff --git a/vendors/ligo-utils/simple-utils/simple-utils.opam b/vendors/ligo-utils/simple-utils/simple-utils.opam index eeeaab8b0..6fe5cadb2 100644 --- a/vendors/ligo-utils/simple-utils/simple-utils.opam +++ b/vendors/ligo-utils/simple-utils/simple-utils.opam @@ -3,20 +3,16 @@ name : "simple-utils" version : "dev" synopsis : "LIGO utilities, to be used by other libraries" maintainer : "Galfour " -authors : "Galfour" +authors : "Galfour, Christian Rinderknecht" license : "MIT" -homepage: "https://gitlab.com/ligolang/ligo-utils" -bug-reports: "https://gitlab.com/ligolang/ligo-utils/issues" -depends: [ - "dune" - "base" - "yojson" - "ppx_let" - # from ppx_let: - "ocaml" {>= "4.04.2" & < "4.08.0"} - "dune" {build & >= "1.5.1"} - "ppxlib" {>= "0.5.0"} -] -build: [ - ["dune" "build" "-p" name] -] +homepage : "https://gitlab.com/ligolang/ligo-utils" +bug-reports : "https://gitlab.com/ligolang/ligo-utils/issues" +depends : ["dune" + "base" + "yojson" + "ppx_let" + # from ppx_let: + "ocaml" {>= "4.04.2" & < "4.08.0"} + "dune" {build & >= "1.5.1"} + "ppxlib" {>= "0.5.0"}] +build : [["dune" "build" "-p" name]] diff --git a/vendors/ligo-utils/simple-utils/simple_utils.ml b/vendors/ligo-utils/simple-utils/simple_utils.ml index 2df09573f..4ccd97689 100644 --- a/vendors/ligo-utils/simple-utils/simple_utils.ml +++ b/vendors/ligo-utils/simple-utils/simple_utils.ml @@ -10,10 +10,14 @@ module Int = X_int module Tuple = Tuple module Map = X_map module Tree = Tree -module Region = Region -module Pos = Pos module Var = Var module Ligo_string = X_string module Display = Display module Runned_result = Runned_result +(* Originally by Christian Rinderknecht *) + +module Pos = Pos +module Region = Region +module Utils = Utils +module FQueue = FQueue