diff --git a/src/bin/expect_tests/code_insertion.ml b/src/bin/expect_tests/code_insertion.ml index 6962b27cb..beb9dcd30 100644 --- a/src/bin/expect_tests/code_insertion.ml +++ b/src/bin/expect_tests/code_insertion.ml @@ -33,7 +33,7 @@ let%expect_test _ = run_ligo_bad [ "compile-contract" ; bad_contract "bad_michelson_insertion_2.ligo" ; "main" ] ; [%expect{| ligo: error - in file "bad_michelson_insertion_2.ligo", line 3, character 0 to line 5, character 41 + in file "bad_michelson_insertion_2.ligo", line 3, characters 9-13 Constant declaration 'main' Bad types: expected nat got ( nat * nat ) diff --git a/src/passes/01-parser/cameligo/AST.ml b/src/passes/01-parser/cameligo/AST.ml index 76654aac3..a6002e729 100644 --- a/src/passes/01-parser/cameligo/AST.ml +++ b/src/passes/01-parser/cameligo/AST.ml @@ -56,7 +56,6 @@ type c_Some = Region.t type arrow = Region.t (* "->" *) type cons = Region.t (* "::" *) -type percent = Region.t (* "%" *) type cat = Region.t (* "^" *) type append = Region.t (* "@" *) type dot = Region.t (* "." *) diff --git a/src/passes/01-parser/cameligo/Parser.mly b/src/passes/01-parser/cameligo/Parser.mly index 807bc6dd3..85ad87f3c 100644 --- a/src/passes/01-parser/cameligo/Parser.mly +++ b/src/passes/01-parser/cameligo/Parser.mly @@ -586,6 +586,12 @@ core_expr: | par(expr) { EPar $1 } | par(annot_expr) { EAnnot $1 } +code_inj: + "" expr "]" { + let region = cover $1.region $3 + and value = {language=$1; code=$2; rbracket=$3} + in {region; value} } + annot_expr: expr ":" type_expr { $1,$2,$3 } @@ -652,49 +658,41 @@ field_path_assignment : field_assignment: field_name "=" expr { let region = cover $1.region (expr_to_region $3) - and value = {field_name = $1; - assignment = $2; - field_expr = $3} + and value = {field_name=$1; assignment=$2; field_expr=$3} in {region; value} } path : "" { Name $1 } | projection { Path $1 } +(* Sequences *) + sequence: "begin" series? "end" { let region = cover $1 $3 and compound = BeginEnd ($1,$3) in - let elements, terminator = - match $2 with - None -> None, None - | Some (ne_elements, terminator) -> - Some ne_elements, terminator in - let value = {compound; elements; terminator} + let elements = $2 in + let value = {compound; elements; terminator=None} in {region; value} } series: - last_expr { - let expr, term = $1 in (expr, []), term - } -| seq_expr ";" series { - let rest, term = $3 in - let seq = Utils.nsepseq_cons $1 $2 rest - in seq, term } + seq_expr ";" series { Utils.nsepseq_cons $1 $2 $3 } +| last_expr { $1,[] } last_expr: - seq_expr ";"? -| fun_expr(seq_expr) ";"? -| match_expr(seq_expr) ";"? { - $1,$2 - } -| "let" ioption("rec") let_binding seq(Attr) "in" series { - let seq, term = $6 in + seq_expr +| fun_expr(last_expr) +| match_expr(last_expr) +| let_in_sequence { $1 } + +let_in_sequence: + "let" ioption("rec") let_binding seq(Attr) "in" series { + let seq = $6 in let stop = nsepseq_to_region expr_to_region seq in let region = cover $1 stop in let compound = BeginEnd (Region.ghost, Region.ghost) in let elements = Some seq in - let value = {compound; elements; terminator=term} in + let value = {compound; elements; terminator=None} in let body = ESeq {region; value} in let value = {kwd_let = $1; kwd_rec = $2; @@ -702,13 +700,7 @@ last_expr: attributes = $4; kwd_in = $5; body} - in ELetIn {region; value}, term } + in ELetIn {region; value} } seq_expr: disj_expr_level | if_then_else (seq_expr) { $1 } - -code_inj: - "" expr "]" { - let region = cover $1.region $3 - and value = {language=$1; code=$2; rbracket=$3} - in {region; value} } diff --git a/src/passes/01-parser/cameligo/dune b/src/passes/01-parser/cameligo/dune index ff5896de8..6c5257688 100644 --- a/src/passes/01-parser/cameligo/dune +++ b/src/passes/01-parser/cameligo/dune @@ -53,7 +53,7 @@ (executable (name ParserMain) (libraries parser_cameligo) - (modules ParserMain) + (modules ParserMain Parser_msg) (preprocess (pps bisect_ppx --conditional)) (flags (:standard -open Simple_utils -open Parser_shared -open Parser_cameligo))) @@ -65,6 +65,19 @@ (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))) +(rule + (targets Parser_msg.ml) + (deps Parser.mly ParToken.mly Parser.msg) + (action + (with-stdout-to %{targets} + (bash + "menhir \ + --compile-errors Parser.msg \ + --external-tokens LexToken \ + --base Parser \ + ParToken.mly \ + Parser.mly")))) + ;; Build of all the LIGO source file that cover all error states (rule @@ -74,27 +87,6 @@ ;; Error messages -;; Generate error messages from scratch -; (rule -; (targets error.messages) -; (deps Parser.mly ParToken.mly error.messages.checked-in) -; (action -; (with-stdout-to %{targets} -; (bash -; "menhir \ -; --unused-tokens \ -; --list-errors \ -; --table \ -; --strict \ -; --external-tokens LexToken.mli \ -; --base Parser.mly \ -; ParToken.mly \ -; Parser.mly -; " -; ) -; )) -; ) - (rule (targets error.messages) (mode (promote (until-clean) (only *))) diff --git a/src/passes/01-parser/cameligo/error.messages.checked-in b/src/passes/01-parser/cameligo/error.messages.checked-in index 24b134bc3..fcf04d5bb 100644 --- a/src/passes/01-parser/cameligo/error.messages.checked-in +++ b/src/passes/01-parser/cameligo/error.messages.checked-in @@ -1,20 +1,40 @@ -interactive_expr: Begin Fun WILD ARROW Bytes SEMI With +interactive_expr: Begin Fun WILD ARROW Bytes SEMI ## -## Ends in an error in state: 487. +## Ends in an error in state: 496. ## ## sequence -> Begin option(series) . End [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] ## ## The known suffix of the stack is as follows: ## Begin option(series) ## +## 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 226, spurious reduction of production call_expr_level -> core_expr +## In state 233, spurious reduction of production unary_expr_level -> call_expr_level +## In state 220, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 223, spurious reduction of production add_expr_level -> mult_expr_level +## In state 313, spurious reduction of production cons_expr_level -> add_expr_level +## In state 303, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 335, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 342, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 349, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 476, spurious reduction of production seq_expr -> disj_expr_level +## In state 440, spurious reduction of production last_expr -> seq_expr +## In state 443, spurious reduction of production fun_expr(last_expr) -> Fun nseq(irrefutable) ARROW last_expr +## In state 444, spurious reduction of production last_expr -> fun_expr(last_expr) +## In state 480, spurious reduction of production series -> last_expr +## In state 495, spurious reduction of production option(series) -> series +## interactive_expr: Begin Fun WILD ARROW With ## -## Ends in an error in state: 469. +## Ends in an error in state: 479. ## -## fun_expr(seq_expr) -> Fun nseq(irrefutable) ARROW . seq_expr [ SEMI End ] +## fun_expr(last_expr) -> Fun nseq(irrefutable) ARROW . last_expr [ End ] ## ## The known suffix of the stack is as follows: ## Fun nseq(irrefutable) ARROW @@ -24,9 +44,9 @@ interactive_expr: Begin Fun WILD ARROW With interactive_expr: Begin Fun With ## -## Ends in an error in state: 467. +## Ends in an error in state: 477. ## -## fun_expr(seq_expr) -> Fun . nseq(irrefutable) ARROW seq_expr [ SEMI End ] +## fun_expr(last_expr) -> Fun . nseq(irrefutable) ARROW last_expr [ End ] ## ## The known suffix of the stack is as follows: ## Fun @@ -36,7 +56,7 @@ interactive_expr: Begin Fun With interactive_expr: Begin If Verbatim Then Fun WILD ARROW With ## -## Ends in an error in state: 456. +## Ends in an error in state: 466. ## ## fun_expr(closed_if) -> Fun nseq(irrefutable) ARROW . closed_if [ Else ] ## @@ -48,7 +68,7 @@ interactive_expr: Begin If Verbatim Then Fun WILD ARROW With interactive_expr: Begin If Verbatim Then Fun With ## -## Ends in an error in state: 454. +## Ends in an error in state: 464. ## ## fun_expr(closed_if) -> Fun . nseq(irrefutable) ARROW closed_if [ Else ] ## @@ -60,7 +80,7 @@ interactive_expr: Begin If Verbatim Then Fun With interactive_expr: Begin If Verbatim Then If Verbatim Then Verbatim COMMA Bytes With ## -## Ends in an error in state: 459. +## Ends in an error in state: 469. ## ## if_then_else(closed_if) -> If expr Then closed_if . Else closed_if [ Else ] ## @@ -83,7 +103,7 @@ interactive_expr: Begin If Verbatim Then If Verbatim Then Verbatim COMMA Bytes W ## In state 346, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level ## In state 345, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) ## In state 222, spurious reduction of production tuple_expr -> tuple(disj_expr_level) -## In state 457, spurious reduction of production base_expr(closed_if) -> tuple_expr +## In state 467, spurious reduction of production base_expr(closed_if) -> tuple_expr ## In state 357, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) ## In state 356, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) ## @@ -92,7 +112,7 @@ interactive_expr: Begin If Verbatim Then If Verbatim Then Verbatim COMMA Bytes W interactive_expr: Begin If Verbatim Then If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 460. +## Ends in an error in state: 470. ## ## if_then_else(closed_if) -> If expr Then closed_if Else . closed_if [ Else ] ## @@ -104,7 +124,7 @@ interactive_expr: Begin If Verbatim Then If Verbatim Then Verbatim Else With interactive_expr: Begin If Verbatim Then If Verbatim Then With ## -## Ends in an error in state: 453. +## Ends in an error in state: 463. ## ## if_then_else(closed_if) -> If expr Then . closed_if Else closed_if [ Else ] ## @@ -116,7 +136,7 @@ interactive_expr: Begin If Verbatim Then If Verbatim Then With interactive_expr: Begin If Verbatim Then If Verbatim With ## -## Ends in an error in state: 452. +## Ends in an error in state: 462. ## ## if_then_else(closed_if) -> If expr . Then closed_if Else closed_if [ Else ] ## @@ -145,7 +165,7 @@ interactive_expr: Begin If Verbatim Then If Verbatim With interactive_expr: Begin If Verbatim Then If With ## -## Ends in an error in state: 451. +## Ends in an error in state: 461. ## ## if_then_else(closed_if) -> If . expr Then closed_if Else closed_if [ Else ] ## @@ -157,7 +177,7 @@ interactive_expr: Begin If Verbatim Then If With interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 449. +## Ends in an error in state: 459. ## ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) . In closed_if [ Else ] ## @@ -176,7 +196,7 @@ interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes Attr Type interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 450. +## Ends in an error in state: 460. ## ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) In . closed_if [ Else ] ## @@ -188,7 +208,7 @@ interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes In With interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 448. +## Ends in an error in state: 458. ## ## let_expr(closed_if) -> Let Rec let_binding . seq(Attr) In closed_if [ Else ] ## @@ -218,7 +238,7 @@ interactive_expr: Begin If Verbatim Then Let Rec WILD EQ Bytes With interactive_expr: Begin If Verbatim Then Let Rec With ## -## Ends in an error in state: 447. +## Ends in an error in state: 457. ## ## let_expr(closed_if) -> Let Rec . let_binding seq(Attr) In closed_if [ Else ] ## @@ -230,7 +250,7 @@ interactive_expr: Begin If Verbatim Then Let Rec With interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 462. +## Ends in an error in state: 472. ## ## let_expr(closed_if) -> Let let_binding seq(Attr) . In closed_if [ Else ] ## @@ -249,7 +269,7 @@ interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes Attr Type interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes In With ## -## Ends in an error in state: 463. +## Ends in an error in state: 473. ## ## let_expr(closed_if) -> Let let_binding seq(Attr) In . closed_if [ Else ] ## @@ -261,7 +281,7 @@ interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes In With interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes With ## -## Ends in an error in state: 461. +## Ends in an error in state: 471. ## ## let_expr(closed_if) -> Let let_binding . seq(Attr) In closed_if [ Else ] ## @@ -291,7 +311,7 @@ interactive_expr: Begin If Verbatim Then Let WILD EQ Bytes With interactive_expr: Begin If Verbatim Then Let With ## -## Ends in an error in state: 446. +## Ends in an error in state: 456. ## ## let_expr(closed_if) -> Let . let_binding seq(Attr) In closed_if [ Else ] ## let_expr(closed_if) -> Let . Rec let_binding seq(Attr) In closed_if [ Else ] @@ -401,7 +421,7 @@ interactive_expr: Begin If Verbatim Then Match With interactive_expr: Begin If Verbatim Then Verbatim COMMA Bytes With ## -## Ends in an error in state: 464. +## Ends in an error in state: 474. ## ## if_then_else(seq_expr) -> If expr Then closed_if . Else seq_expr [ SEMI End ] ## @@ -424,7 +444,7 @@ interactive_expr: Begin If Verbatim Then Verbatim COMMA Bytes With ## In state 346, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level ## In state 345, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) ## In state 222, spurious reduction of production tuple_expr -> tuple(disj_expr_level) -## In state 457, spurious reduction of production base_expr(closed_if) -> tuple_expr +## In state 467, spurious reduction of production base_expr(closed_if) -> tuple_expr ## In state 357, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) ## In state 356, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) ## @@ -433,7 +453,7 @@ interactive_expr: Begin If Verbatim Then Verbatim COMMA Bytes With interactive_expr: Begin If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 465. +## Ends in an error in state: 475. ## ## if_then_else(seq_expr) -> If expr Then closed_if Else . seq_expr [ SEMI End ] ## @@ -445,7 +465,7 @@ interactive_expr: Begin If Verbatim Then Verbatim Else With interactive_expr: Begin If Verbatim Then Verbatim With ## -## Ends in an error in state: 458. +## Ends in an error in state: 468. ## ## base_expr(closed_if) -> disj_expr_level . [ Else ] ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ Or Else COMMA BOOL_OR ] @@ -474,7 +494,7 @@ interactive_expr: Begin If Verbatim Then Verbatim With interactive_expr: Begin If Verbatim Then With ## -## Ends in an error in state: 445. +## Ends in an error in state: 455. ## ## if_then_else(seq_expr) -> If expr Then . closed_if Else seq_expr [ SEMI End ] ## @@ -486,7 +506,7 @@ interactive_expr: Begin If Verbatim Then With interactive_expr: Begin If Verbatim With ## -## Ends in an error in state: 444. +## Ends in an error in state: 454. ## ## if_then_else(seq_expr) -> If expr . Then closed_if Else seq_expr [ SEMI End ] ## @@ -515,7 +535,7 @@ interactive_expr: Begin If Verbatim With interactive_expr: Begin If With ## -## Ends in an error in state: 443. +## Ends in an error in state: 453. ## ## if_then_else(seq_expr) -> If . expr Then closed_if Else seq_expr [ SEMI End ] ## @@ -527,9 +547,9 @@ interactive_expr: Begin If With interactive_expr: Begin Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 441. +## Ends in an error in state: 451. ## -## last_expr -> Let Rec let_binding seq(Attr) . In series [ End ] +## let_in_sequence -> Let Rec let_binding seq(Attr) . In series [ End ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) @@ -546,9 +566,9 @@ interactive_expr: Begin Let Rec WILD EQ Bytes Attr Type interactive_expr: Begin Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 442. +## Ends in an error in state: 452. ## -## last_expr -> Let Rec let_binding seq(Attr) In . series [ End ] +## let_in_sequence -> Let Rec let_binding seq(Attr) In . series [ End ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) In @@ -558,9 +578,9 @@ interactive_expr: Begin Let Rec WILD EQ Bytes In With interactive_expr: Begin Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 440. +## Ends in an error in state: 450. ## -## last_expr -> Let Rec let_binding . seq(Attr) In series [ End ] +## let_in_sequence -> Let Rec let_binding . seq(Attr) In series [ End ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding @@ -588,9 +608,9 @@ interactive_expr: Begin Let Rec WILD EQ Bytes With interactive_expr: Begin Let Rec With ## -## Ends in an error in state: 439. +## Ends in an error in state: 449. ## -## last_expr -> Let Rec . let_binding seq(Attr) In series [ End ] +## let_in_sequence -> Let Rec . let_binding seq(Attr) In series [ End ] ## ## The known suffix of the stack is as follows: ## Let Rec @@ -600,9 +620,9 @@ interactive_expr: Begin Let Rec With interactive_expr: Begin Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 483. +## Ends in an error in state: 482. ## -## last_expr -> Let let_binding seq(Attr) . In series [ End ] +## let_in_sequence -> Let let_binding seq(Attr) . In series [ End ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) @@ -619,9 +639,9 @@ interactive_expr: Begin Let WILD EQ Bytes Attr Type interactive_expr: Begin Let WILD EQ Bytes In With ## -## Ends in an error in state: 484. +## Ends in an error in state: 483. ## -## last_expr -> Let let_binding seq(Attr) In . series [ End ] +## let_in_sequence -> Let let_binding seq(Attr) In . series [ End ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) In @@ -631,9 +651,9 @@ interactive_expr: Begin Let WILD EQ Bytes In With interactive_expr: Begin Let WILD EQ Bytes With ## -## Ends in an error in state: 482. +## Ends in an error in state: 481. ## -## last_expr -> Let let_binding . seq(Attr) In series [ End ] +## let_in_sequence -> Let let_binding . seq(Attr) In series [ End ] ## ## The known suffix of the stack is as follows: ## Let let_binding @@ -661,10 +681,10 @@ interactive_expr: Begin Let WILD EQ Bytes With interactive_expr: Begin Let With ## -## Ends in an error in state: 438. +## Ends in an error in state: 448. ## -## last_expr -> Let . let_binding seq(Attr) In series [ End ] -## last_expr -> Let . Rec let_binding seq(Attr) In series [ End ] +## let_in_sequence -> Let . let_binding seq(Attr) In series [ End ] +## let_in_sequence -> Let . Rec let_binding seq(Attr) In series [ End ] ## ## The known suffix of the stack is as follows: ## Let @@ -676,7 +696,7 @@ interactive_expr: Begin Match Verbatim Type ## ## Ends in an error in state: 244. ## -## match_expr(seq_expr) -> Match expr . With option(VBAR) cases(seq_expr) [ SEMI End ] +## match_expr(last_expr) -> Match expr . With option(VBAR) cases(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## Match expr @@ -705,7 +725,7 @@ interactive_expr: Begin Match Verbatim With VBAR Begin ## ## Ends in an error in state: 247. ## -## match_expr(seq_expr) -> Match expr With option(VBAR) . cases(seq_expr) [ SEMI End ] +## match_expr(last_expr) -> Match expr With option(VBAR) . cases(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## Match expr With option(VBAR) @@ -715,10 +735,10 @@ interactive_expr: Begin Match Verbatim With VBAR Begin interactive_expr: Begin Match Verbatim With WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 435. +## Ends in an error in state: 492. ## ## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ VBAR ] -## cases(seq_expr) -> cases(base_cond) VBAR . case_clause(seq_expr) [ SEMI End ] +## cases(last_expr) -> cases(base_cond) VBAR . case_clause(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## cases(base_cond) VBAR @@ -726,9 +746,35 @@ interactive_expr: Begin Match Verbatim With WILD ARROW Bytes VBAR With +interactive_expr: Begin Match Verbatim With WILD ARROW Fun WILD ARROW With +## +## Ends in an error in state: 439. +## +## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ VBAR ] +## fun_expr(last_expr) -> Fun nseq(irrefutable) ARROW . last_expr [ End ] +## +## The known suffix of the stack is as follows: +## Fun nseq(irrefutable) ARROW +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Fun With +## +## Ends in an error in state: 437. +## +## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ VBAR ] +## fun_expr(last_expr) -> Fun . nseq(irrefutable) ARROW last_expr [ End ] +## +## The known suffix of the stack is as follows: +## Fun +## + + + interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 428. +## Ends in an error in state: 415. ## ## if_then_else(base_cond) -> If expr Then closed_if Else . base_cond [ VBAR ] ## if_then_else(seq_expr) -> If expr Then closed_if Else . seq_expr [ SEMI End ] @@ -741,7 +787,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim Then Verbatim interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim Then With ## -## Ends in an error in state: 426. +## Ends in an error in state: 266. ## ## if_then(base_cond) -> If expr Then . base_cond [ VBAR ] ## if_then_else(base_cond) -> If expr Then . closed_if Else base_cond [ VBAR ] @@ -755,7 +801,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim Then With interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim With ## -## Ends in an error in state: 425. +## Ends in an error in state: 265. ## ## if_then(base_cond) -> If expr . Then base_cond [ VBAR ] ## if_then_else(base_cond) -> If expr . Then closed_if Else base_cond [ VBAR ] @@ -786,7 +832,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW If Verbatim With interactive_expr: Begin Match Verbatim With WILD ARROW If With ## -## Ends in an error in state: 424. +## Ends in an error in state: 264. ## ## if_then(base_cond) -> If . expr Then base_cond [ VBAR ] ## if_then_else(base_cond) -> If . expr Then closed_if Else base_cond [ VBAR ] @@ -798,12 +844,168 @@ interactive_expr: Begin Match Verbatim With WILD ARROW If With +interactive_expr: Begin Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes Attr Type +## +## Ends in an error in state: 262. +## +## let_expr(base_cond) -> Let Rec let_binding seq(Attr) . In base_cond [ VBAR ] +## let_in_sequence -> Let Rec let_binding seq(Attr) . In series [ End ] +## +## The known suffix of the stack is as follows: +## Let Rec let_binding seq(Attr) +## +## 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 174, spurious reduction of production seq(Attr) -> +## In state 175, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes In With +## +## Ends in an error in state: 263. +## +## let_expr(base_cond) -> Let Rec let_binding seq(Attr) In . base_cond [ VBAR ] +## let_in_sequence -> Let Rec let_binding seq(Attr) In . series [ End ] +## +## The known suffix of the stack is as follows: +## Let Rec let_binding seq(Attr) In +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes With +## +## Ends in an error in state: 261. +## +## let_expr(base_cond) -> Let Rec let_binding . seq(Attr) In base_cond [ VBAR ] +## let_in_sequence -> Let Rec let_binding . seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let Rec let_binding +## +## 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 226, spurious reduction of production call_expr_level -> core_expr +## In state 233, spurious reduction of production unary_expr_level -> call_expr_level +## In state 220, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 223, spurious reduction of production add_expr_level -> mult_expr_level +## In state 313, spurious reduction of production cons_expr_level -> add_expr_level +## In state 303, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 335, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 342, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 349, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 373, spurious reduction of production expr -> base_cond__open(expr) +## In state 379, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let Rec With +## +## Ends in an error in state: 260. +## +## let_expr(base_cond) -> Let Rec . let_binding seq(Attr) In base_cond [ VBAR ] +## let_in_sequence -> Let Rec . let_binding seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let Rec +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let WILD EQ Bytes Attr Type +## +## Ends in an error in state: 487. +## +## let_expr(base_cond) -> Let let_binding seq(Attr) . In base_cond [ VBAR ] +## let_in_sequence -> Let let_binding seq(Attr) . In series [ End ] +## +## The known suffix of the stack is as follows: +## Let let_binding seq(Attr) +## +## 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 174, spurious reduction of production seq(Attr) -> +## In state 175, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let WILD EQ Bytes In With +## +## Ends in an error in state: 488. +## +## let_expr(base_cond) -> Let let_binding seq(Attr) In . base_cond [ VBAR ] +## let_in_sequence -> Let let_binding seq(Attr) In . series [ End ] +## +## The known suffix of the stack is as follows: +## Let let_binding seq(Attr) In +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let WILD EQ Bytes With +## +## Ends in an error in state: 486. +## +## let_expr(base_cond) -> Let let_binding . seq(Attr) In base_cond [ VBAR ] +## let_in_sequence -> Let let_binding . seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let let_binding +## +## 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 226, spurious reduction of production call_expr_level -> core_expr +## In state 233, spurious reduction of production unary_expr_level -> call_expr_level +## In state 220, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 223, spurious reduction of production add_expr_level -> mult_expr_level +## In state 313, spurious reduction of production cons_expr_level -> add_expr_level +## In state 303, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 335, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 342, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 349, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 373, spurious reduction of production expr -> base_cond__open(expr) +## In state 379, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin Match Verbatim With WILD ARROW Let With +## +## Ends in an error in state: 259. +## +## let_expr(base_cond) -> Let . let_binding seq(Attr) In base_cond [ VBAR ] +## let_expr(base_cond) -> Let . Rec let_binding seq(Attr) In base_cond [ VBAR ] +## let_in_sequence -> Let . let_binding seq(Attr) In series [ End ] +## let_in_sequence -> Let . Rec let_binding seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let +## + + + interactive_expr: Begin Match Verbatim With WILD ARROW Verbatim COMMA Bytes With ## -## Ends in an error in state: 434. +## Ends in an error in state: 491. ## ## cases(base_cond) -> cases(base_cond) . VBAR case_clause(base_cond) [ VBAR ] -## cases(seq_expr) -> cases(base_cond) . VBAR case_clause(seq_expr) [ SEMI End ] +## cases(last_expr) -> cases(base_cond) . VBAR case_clause(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## cases(base_cond) @@ -824,7 +1026,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW Verbatim COMMA Bytes With ## In state 346, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level ## In state 345, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) ## In state 222, spurious reduction of production tuple_expr -> tuple(disj_expr_level) -## In state 419, spurious reduction of production base_expr(base_cond) -> tuple_expr +## In state 429, spurious reduction of production base_expr(base_cond) -> tuple_expr ## In state 358, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) ## In state 359, spurious reduction of production base_cond -> base_cond__open(base_cond) ## In state 405, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond @@ -835,7 +1037,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW Verbatim COMMA Bytes With interactive_expr: Begin Match Verbatim With WILD ARROW Verbatim With ## -## Ends in an error in state: 431. +## Ends in an error in state: 436. ## ## base_expr(base_cond) -> disj_expr_level . [ VBAR ] ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ VBAR SEMI Or End COMMA BOOL_OR ] @@ -868,7 +1070,7 @@ interactive_expr: Begin Match Verbatim With WILD ARROW With ## Ends in an error in state: 258. ## ## case_clause(base_cond) -> pattern ARROW . base_cond [ VBAR ] -## case_clause(seq_expr) -> pattern ARROW . seq_expr [ SEMI End ] +## case_clause(last_expr) -> pattern ARROW . last_expr [ End ] ## ## The known suffix of the stack is as follows: ## pattern ARROW @@ -881,7 +1083,7 @@ interactive_expr: Begin Match Verbatim With WILD CONS Bytes SEMI ## Ends in an error in state: 257. ## ## case_clause(base_cond) -> pattern . ARROW base_cond [ VBAR ] -## case_clause(seq_expr) -> pattern . ARROW seq_expr [ SEMI End ] +## case_clause(last_expr) -> pattern . ARROW last_expr [ End ] ## ## The known suffix of the stack is as follows: ## pattern @@ -900,7 +1102,7 @@ interactive_expr: Begin Match Verbatim With With ## ## Ends in an error in state: 245. ## -## match_expr(seq_expr) -> Match expr With . option(VBAR) cases(seq_expr) [ SEMI End ] +## match_expr(last_expr) -> Match expr With . option(VBAR) cases(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## Match expr With @@ -912,7 +1114,7 @@ interactive_expr: Begin Match With ## ## Ends in an error in state: 206. ## -## match_expr(seq_expr) -> Match . expr With option(VBAR) cases(seq_expr) [ SEMI End ] +## match_expr(last_expr) -> Match . expr With option(VBAR) cases(last_expr) [ End ] ## ## The known suffix of the stack is as follows: ## Match @@ -922,9 +1124,8 @@ interactive_expr: Begin Match With interactive_expr: Begin Verbatim SEMI With ## -## Ends in an error in state: 473. +## Ends in an error in state: 447. ## -## option(SEMI) -> SEMI . [ End ] ## series -> seq_expr SEMI . series [ End ] ## ## The known suffix of the stack is as follows: @@ -935,7 +1136,7 @@ interactive_expr: Begin Verbatim SEMI With interactive_expr: Begin Verbatim With ## -## Ends in an error in state: 466. +## Ends in an error in state: 476. ## ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ SEMI Or End BOOL_OR ] ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ SEMI Or End BOOL_OR ] @@ -1165,7 +1366,7 @@ interactive_expr: Ident WILD interactive_expr: If Verbatim Then Fun WILD ARROW With ## -## Ends in an error in state: 508. +## Ends in an error in state: 517. ## ## fun_expr(closed_if) -> Fun nseq(irrefutable) ARROW . closed_if [ Else ] ## fun_expr(expr) -> Fun nseq(irrefutable) ARROW . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1178,7 +1379,7 @@ interactive_expr: If Verbatim Then Fun WILD ARROW With interactive_expr: If Verbatim Then Fun With ## -## Ends in an error in state: 506. +## Ends in an error in state: 515. ## ## fun_expr(closed_if) -> Fun . nseq(irrefutable) ARROW closed_if [ Else ] ## fun_expr(expr) -> Fun . nseq(irrefutable) ARROW expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1191,7 +1392,7 @@ interactive_expr: If Verbatim Then Fun With interactive_expr: If Verbatim Then If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 513. +## Ends in an error in state: 522. ## ## if_then_else(closed_if) -> If expr Then closed_if Else . closed_if [ Else ] ## if_then_else(expr) -> If expr Then closed_if Else . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1204,7 +1405,7 @@ interactive_expr: If Verbatim Then If Verbatim Then Verbatim Else With interactive_expr: If Verbatim Then If Verbatim Then With ## -## Ends in an error in state: 505. +## Ends in an error in state: 514. ## ## if_then(expr) -> If expr Then . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(closed_if) -> If expr Then . closed_if Else closed_if [ Else ] @@ -1218,7 +1419,7 @@ interactive_expr: If Verbatim Then If Verbatim Then With interactive_expr: If Verbatim Then If Verbatim With ## -## Ends in an error in state: 504. +## Ends in an error in state: 513. ## ## if_then(expr) -> If expr . Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(closed_if) -> If expr . Then closed_if Else closed_if [ Else ] @@ -1249,7 +1450,7 @@ interactive_expr: If Verbatim Then If Verbatim With interactive_expr: If Verbatim Then If With ## -## Ends in an error in state: 503. +## Ends in an error in state: 512. ## ## if_then(expr) -> If . expr Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(closed_if) -> If . expr Then closed_if Else closed_if [ Else ] @@ -1263,7 +1464,7 @@ interactive_expr: If Verbatim Then If With interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 501. +## Ends in an error in state: 510. ## ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) . In closed_if [ Else ] ## let_expr(expr) -> Let Rec let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1283,7 +1484,7 @@ interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes Attr Type interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 502. +## Ends in an error in state: 511. ## ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) In . closed_if [ Else ] ## let_expr(expr) -> Let Rec let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1296,7 +1497,7 @@ interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes In With interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 500. +## Ends in an error in state: 509. ## ## let_expr(closed_if) -> Let Rec let_binding . seq(Attr) In closed_if [ Else ] ## let_expr(expr) -> Let Rec let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1327,7 +1528,7 @@ interactive_expr: If Verbatim Then Let Rec WILD EQ Bytes With interactive_expr: If Verbatim Then Let Rec With ## -## Ends in an error in state: 499. +## Ends in an error in state: 508. ## ## let_expr(closed_if) -> Let Rec . let_binding seq(Attr) In closed_if [ Else ] ## let_expr(expr) -> Let Rec . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1340,7 +1541,7 @@ interactive_expr: If Verbatim Then Let Rec With interactive_expr: If Verbatim Then Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 517. +## Ends in an error in state: 526. ## ## let_expr(closed_if) -> Let let_binding seq(Attr) . In closed_if [ Else ] ## let_expr(expr) -> Let let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1360,7 +1561,7 @@ interactive_expr: If Verbatim Then Let WILD EQ Bytes Attr Type interactive_expr: If Verbatim Then Let WILD EQ Bytes In With ## -## Ends in an error in state: 518. +## Ends in an error in state: 527. ## ## let_expr(closed_if) -> Let let_binding seq(Attr) In . closed_if [ Else ] ## let_expr(expr) -> Let let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1373,7 +1574,7 @@ interactive_expr: If Verbatim Then Let WILD EQ Bytes In With interactive_expr: If Verbatim Then Let WILD EQ Bytes With ## -## Ends in an error in state: 516. +## Ends in an error in state: 525. ## ## let_expr(closed_if) -> Let let_binding . seq(Attr) In closed_if [ Else ] ## let_expr(expr) -> Let let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1404,7 +1605,7 @@ interactive_expr: If Verbatim Then Let WILD EQ Bytes With interactive_expr: If Verbatim Then Let With ## -## Ends in an error in state: 498. +## Ends in an error in state: 507. ## ## let_expr(closed_if) -> Let . let_binding seq(Attr) In closed_if [ Else ] ## let_expr(closed_if) -> Let . Rec let_binding seq(Attr) In closed_if [ Else ] @@ -1419,7 +1620,7 @@ interactive_expr: If Verbatim Then Let With interactive_expr: If Verbatim Then Match Verbatim Type ## -## Ends in an error in state: 494. +## Ends in an error in state: 503. ## ## match_expr(base_cond) -> Match expr . With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## match_expr(base_if_then_else) -> Match expr . With option(VBAR) cases(base_if_then_else) [ Else ] @@ -1449,7 +1650,7 @@ interactive_expr: If Verbatim Then Match Verbatim Type interactive_expr: If Verbatim Then Match Verbatim With VBAR Begin ## -## Ends in an error in state: 496. +## Ends in an error in state: 505. ## ## match_expr(base_cond) -> Match expr With option(VBAR) . cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## match_expr(base_if_then_else) -> Match expr With option(VBAR) . cases(base_if_then_else) [ Else ] @@ -1792,7 +1993,7 @@ interactive_expr: If Verbatim Then Match Verbatim With WILD CONS Bytes SEMI interactive_expr: If Verbatim Then Match Verbatim With With ## -## Ends in an error in state: 495. +## Ends in an error in state: 504. ## ## match_expr(base_cond) -> Match expr With . option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## match_expr(base_if_then_else) -> Match expr With . option(VBAR) cases(base_if_then_else) [ Else ] @@ -1805,7 +2006,7 @@ interactive_expr: If Verbatim Then Match Verbatim With With interactive_expr: If Verbatim Then Match With ## -## Ends in an error in state: 493. +## Ends in an error in state: 502. ## ## match_expr(base_cond) -> Match . expr With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## match_expr(base_if_then_else) -> Match . expr With option(VBAR) cases(base_if_then_else) [ Else ] @@ -1818,7 +2019,7 @@ interactive_expr: If Verbatim Then Match With interactive_expr: If Verbatim Then Verbatim COMMA Bytes VBAR ## -## Ends in an error in state: 509. +## Ends in an error in state: 518. ## ## base_expr(closed_if) -> tuple_expr . [ Else ] ## base_expr(expr) -> tuple_expr . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1848,7 +2049,7 @@ interactive_expr: If Verbatim Then Verbatim COMMA Bytes VBAR interactive_expr: If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 521. +## Ends in an error in state: 530. ## ## if_then_else(expr) -> If expr Then closed_if Else . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -1860,7 +2061,7 @@ interactive_expr: If Verbatim Then Verbatim Else With interactive_expr: If Verbatim Then Verbatim VBAR ## -## Ends in an error in state: 510. +## Ends in an error in state: 519. ## ## base_expr(closed_if) -> disj_expr_level . [ Else ] ## base_expr(expr) -> disj_expr_level . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1890,7 +2091,7 @@ interactive_expr: If Verbatim Then Verbatim VBAR interactive_expr: If Verbatim Then With ## -## Ends in an error in state: 492. +## Ends in an error in state: 501. ## ## if_then(expr) -> If expr Then . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(expr) -> If expr Then . closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1903,7 +2104,7 @@ interactive_expr: If Verbatim Then With interactive_expr: If Verbatim With ## -## Ends in an error in state: 491. +## Ends in an error in state: 500. ## ## if_then(expr) -> If expr . Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(expr) -> If expr . Then closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -1946,7 +2147,7 @@ interactive_expr: If With interactive_expr: LBRACE Constr DOT Ident With ## -## Ends in an error in state: 525. +## Ends in an error in state: 534. ## ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With EQ ] ## @@ -1958,7 +2159,7 @@ interactive_expr: LBRACE Constr DOT Ident With interactive_expr: LBRACE Constr DOT With ## -## Ends in an error in state: 524. +## Ends in an error in state: 533. ## ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With EQ ] ## @@ -1970,7 +2171,7 @@ interactive_expr: LBRACE Constr DOT With interactive_expr: LBRACE Constr With ## -## Ends in an error in state: 523. +## Ends in an error in state: 532. ## ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With EQ ] ## @@ -1982,7 +2183,7 @@ interactive_expr: LBRACE Constr With interactive_expr: LBRACE Ident DOT Ident Verbatim ## -## Ends in an error in state: 529. +## Ends in an error in state: 538. ## ## update_record -> LBRACE path . With sep_or_term_list(field_path_assignment,SEMI) RBRACE [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] ## @@ -1995,14 +2196,14 @@ interactive_expr: LBRACE Ident DOT Ident Verbatim ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 188, spurious reduction of production nsepseq(selection,DOT) -> selection ## In state 191, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) -## In state 528, spurious reduction of production path -> projection +## In state 537, spurious reduction of production path -> projection ## interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 554. +## Ends in an error in state: 563. ## ## nsepseq(field_assignment,SEMI) -> field_assignment SEMI . nsepseq(field_assignment,SEMI) [ RBRACE ] ## seq(__anonymous_0(field_assignment,SEMI)) -> field_assignment SEMI . seq(__anonymous_0(field_assignment,SEMI)) [ RBRACE ] @@ -2015,7 +2216,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes With ## -## Ends in an error in state: 553. +## Ends in an error in state: 562. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACE ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACE ] @@ -2040,14 +2241,14 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes With ## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 373, spurious reduction of production expr -> base_cond__open(expr) -## In state 522, spurious reduction of production field_assignment -> Ident EQ expr +## In state 531, spurious reduction of production field_assignment -> Ident EQ expr ## interactive_expr: LBRACE Ident EQ Bytes SEMI Ident With ## -## Ends in an error in state: 550. +## Ends in an error in state: 559. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACE ] ## @@ -2059,7 +2260,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident With interactive_expr: LBRACE Ident EQ Bytes SEMI With ## -## Ends in an error in state: 549. +## Ends in an error in state: 558. ## ## nsepseq(field_assignment,SEMI) -> field_assignment SEMI . nsepseq(field_assignment,SEMI) [ RBRACE ] ## nseq(__anonymous_0(field_assignment,SEMI)) -> field_assignment SEMI . seq(__anonymous_0(field_assignment,SEMI)) [ RBRACE ] @@ -2072,7 +2273,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident EQ Bytes With ## -## Ends in an error in state: 548. +## Ends in an error in state: 557. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACE ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACE ] @@ -2097,7 +2298,7 @@ interactive_expr: LBRACE Ident EQ Bytes With ## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 373, spurious reduction of production expr -> base_cond__open(expr) -## In state 522, spurious reduction of production field_assignment -> Ident EQ expr +## In state 531, spurious reduction of production field_assignment -> Ident EQ expr ## @@ -2130,7 +2331,7 @@ interactive_expr: LBRACE Ident WILD interactive_expr: LBRACE Ident With Ident DOT Ident With ## -## Ends in an error in state: 534. +## Ends in an error in state: 543. ## ## field_path_assignment -> path . EQ expr [ SEMI RBRACE ] ## @@ -2143,14 +2344,14 @@ interactive_expr: LBRACE Ident With Ident DOT Ident With ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 188, spurious reduction of production nsepseq(selection,DOT) -> selection ## In state 191, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) -## In state 528, spurious reduction of production path -> projection +## In state 537, spurious reduction of production path -> projection ## interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 544. +## Ends in an error in state: 553. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACE ] ## seq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACE ] @@ -2163,7 +2364,7 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes With ## -## Ends in an error in state: 543. +## Ends in an error in state: 552. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACE ] @@ -2188,14 +2389,14 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes With ## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 373, spurious reduction of production expr -> base_cond__open(expr) -## In state 536, spurious reduction of production field_path_assignment -> path EQ expr +## In state 545, spurious reduction of production field_path_assignment -> path EQ expr ## interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI With ## -## Ends in an error in state: 540. +## Ends in an error in state: 549. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACE ] ## nseq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACE ] @@ -2208,7 +2409,7 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident With Ident EQ Bytes With ## -## Ends in an error in state: 539. +## Ends in an error in state: 548. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACE ] @@ -2233,14 +2434,14 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes With ## In state 370, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 372, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 373, spurious reduction of production expr -> base_cond__open(expr) -## In state 536, spurious reduction of production field_path_assignment -> path EQ expr +## In state 545, spurious reduction of production field_path_assignment -> path EQ expr ## interactive_expr: LBRACE Ident With Ident EQ With ## -## Ends in an error in state: 535. +## Ends in an error in state: 544. ## ## field_path_assignment -> path EQ . expr [ SEMI RBRACE ] ## @@ -2252,7 +2453,7 @@ interactive_expr: LBRACE Ident With Ident EQ With interactive_expr: LBRACE Ident With Ident With ## -## Ends in an error in state: 531. +## Ends in an error in state: 540. ## ## path -> Ident . [ EQ ] ## projection -> Ident . DOT nsepseq(selection,DOT) [ EQ ] @@ -2265,7 +2466,7 @@ interactive_expr: LBRACE Ident With Ident With interactive_expr: LBRACE Ident With With ## -## Ends in an error in state: 530. +## Ends in an error in state: 539. ## ## update_record -> LBRACE path With . sep_or_term_list(field_path_assignment,SEMI) RBRACE [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] ## @@ -2290,7 +2491,7 @@ interactive_expr: LBRACE With interactive_expr: LBRACKET Verbatim SEMI Verbatim SEMI With ## -## Ends in an error in state: 566. +## Ends in an error in state: 575. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -2303,7 +2504,7 @@ interactive_expr: LBRACKET Verbatim SEMI Verbatim SEMI With interactive_expr: LBRACKET Verbatim SEMI Verbatim With ## -## Ends in an error in state: 565. +## Ends in an error in state: 574. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -2334,7 +2535,7 @@ interactive_expr: LBRACKET Verbatim SEMI Verbatim With interactive_expr: LBRACKET Verbatim SEMI With ## -## Ends in an error in state: 562. +## Ends in an error in state: 571. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -2347,7 +2548,7 @@ interactive_expr: LBRACKET Verbatim SEMI With interactive_expr: LBRACKET Verbatim With ## -## Ends in an error in state: 561. +## Ends in an error in state: 570. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -2390,7 +2591,7 @@ interactive_expr: LBRACKET With interactive_expr: LPAR Verbatim COLON Ident VBAR ## -## Ends in an error in state: 575. +## Ends in an error in state: 584. ## ## par(annot_expr) -> LPAR annot_expr . RPAR [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] ## @@ -2404,14 +2605,14 @@ interactive_expr: LPAR Verbatim COLON Ident VBAR ## In state 28, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 27, spurious reduction of production type_expr -> fun_type -## In state 574, spurious reduction of production annot_expr -> expr COLON type_expr +## In state 583, spurious reduction of production annot_expr -> expr COLON type_expr ## interactive_expr: LPAR Verbatim COLON With ## -## Ends in an error in state: 573. +## Ends in an error in state: 582. ## ## annot_expr -> expr COLON . type_expr [ RPAR ] ## @@ -2423,7 +2624,7 @@ interactive_expr: LPAR Verbatim COLON With interactive_expr: LPAR Verbatim With ## -## Ends in an error in state: 571. +## Ends in an error in state: 580. ## ## annot_expr -> expr . COLON type_expr [ RPAR ] ## par(expr) -> LPAR expr . RPAR [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] @@ -2467,7 +2668,7 @@ interactive_expr: LPAR With interactive_expr: Lang Verbatim With ## -## Ends in an error in state: 585. +## Ends in an error in state: 594. ## ## code_inj -> Lang expr . RBRACKET [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let Lang LT LPAR LE LBRACKET LBRACE Int In Ident GT GE False End Else EQ EOF Constr CONS COMMA COLON CAT Bytes Begin BOOL_OR BOOL_AND Attr ] ## @@ -2581,7 +2782,7 @@ interactive_expr: Let Rec With interactive_expr: Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 569. +## Ends in an error in state: 578. ## ## let_expr(expr) -> Let let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2600,7 +2801,7 @@ interactive_expr: Let WILD EQ Bytes Attr Type interactive_expr: Let WILD EQ Bytes In With ## -## Ends in an error in state: 570. +## Ends in an error in state: 579. ## ## let_expr(expr) -> Let let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2612,7 +2813,7 @@ interactive_expr: Let WILD EQ Bytes In With interactive_expr: Let WILD EQ Bytes With ## -## Ends in an error in state: 568. +## Ends in an error in state: 577. ## ## let_expr(expr) -> Let let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2667,7 +2868,7 @@ interactive_expr: MINUS With interactive_expr: Match Verbatim Type ## -## Ends in an error in state: 578. +## Ends in an error in state: 587. ## ## match_expr(base_cond) -> Match expr . With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2709,7 +2910,7 @@ interactive_expr: Match Verbatim With LPAR Bytes RPAR With interactive_expr: Match Verbatim With VBAR Begin ## -## Ends in an error in state: 580. +## Ends in an error in state: 589. ## ## match_expr(base_cond) -> Match expr With option(VBAR) . cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2721,7 +2922,7 @@ interactive_expr: Match Verbatim With VBAR Begin interactive_expr: Match Verbatim With WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 584. +## Ends in an error in state: 593. ## ## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2733,7 +2934,7 @@ interactive_expr: Match Verbatim With WILD ARROW Bytes VBAR With interactive_expr: Match Verbatim With WILD ARROW Fun WILD ARROW With ## -## Ends in an error in state: 418. +## Ends in an error in state: 428. ## ## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -2745,7 +2946,7 @@ interactive_expr: Match Verbatim With WILD ARROW Fun WILD ARROW With interactive_expr: Match Verbatim With WILD ARROW Fun With ## -## Ends in an error in state: 416. +## Ends in an error in state: 426. ## ## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3011,7 +3212,7 @@ interactive_expr: Match Verbatim With WILD ARROW If Verbatim Then Let With interactive_expr: Match Verbatim With WILD ARROW If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 415. +## Ends in an error in state: 425. ## ## if_then_else(base_cond) -> If expr Then closed_if Else . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3053,7 +3254,7 @@ interactive_expr: Match Verbatim With WILD ARROW If Verbatim Then Verbatim End interactive_expr: Match Verbatim With WILD ARROW If Verbatim Then With ## -## Ends in an error in state: 266. +## Ends in an error in state: 423. ## ## if_then(base_cond) -> If expr Then . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(base_cond) -> If expr Then . closed_if Else base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -3066,7 +3267,7 @@ interactive_expr: Match Verbatim With WILD ARROW If Verbatim Then With interactive_expr: Match Verbatim With WILD ARROW If Verbatim With ## -## Ends in an error in state: 265. +## Ends in an error in state: 422. ## ## if_then(base_cond) -> If expr . Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(base_cond) -> If expr . Then closed_if Else base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -3096,7 +3297,7 @@ interactive_expr: Match Verbatim With WILD ARROW If Verbatim With interactive_expr: Match Verbatim With WILD ARROW If With ## -## Ends in an error in state: 264. +## Ends in an error in state: 421. ## ## if_then(base_cond) -> If . expr Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## if_then_else(base_cond) -> If . expr Then closed_if Else base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -3109,7 +3310,7 @@ interactive_expr: Match Verbatim With WILD ARROW If With interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 262. +## Ends in an error in state: 419. ## ## let_expr(base_cond) -> Let Rec let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3128,7 +3329,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes Attr Type interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 263. +## Ends in an error in state: 420. ## ## let_expr(base_cond) -> Let Rec let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3140,7 +3341,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes In With interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 261. +## Ends in an error in state: 418. ## ## let_expr(base_cond) -> Let Rec let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3170,7 +3371,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let Rec WILD EQ Bytes With interactive_expr: Match Verbatim With WILD ARROW Let Rec With ## -## Ends in an error in state: 260. +## Ends in an error in state: 417. ## ## let_expr(base_cond) -> Let Rec . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3182,7 +3383,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let Rec With interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 422. +## Ends in an error in state: 432. ## ## let_expr(base_cond) -> Let let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3201,7 +3402,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes Attr Type interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes In With ## -## Ends in an error in state: 423. +## Ends in an error in state: 433. ## ## let_expr(base_cond) -> Let let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3213,7 +3414,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes In With interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes With ## -## Ends in an error in state: 421. +## Ends in an error in state: 431. ## ## let_expr(base_cond) -> Let let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3243,7 +3444,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let WILD EQ Bytes With interactive_expr: Match Verbatim With WILD ARROW Let With ## -## Ends in an error in state: 259. +## Ends in an error in state: 416. ## ## let_expr(base_cond) -> Let . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## let_expr(base_cond) -> Let . Rec let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -3256,7 +3457,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let With interactive_expr: Match Verbatim With WILD ARROW Verbatim COMMA Bytes Else ## -## Ends in an error in state: 583. +## Ends in an error in state: 592. ## ## cases(base_cond) -> cases(base_cond) . VBAR case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## match_expr(base_cond) -> Match expr With option(VBAR) cases(base_cond) . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] @@ -3280,7 +3481,7 @@ interactive_expr: Match Verbatim With WILD ARROW Verbatim COMMA Bytes Else ## In state 346, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level ## In state 345, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) ## In state 222, spurious reduction of production tuple_expr -> tuple(disj_expr_level) -## In state 419, spurious reduction of production base_expr(base_cond) -> tuple_expr +## In state 429, spurious reduction of production base_expr(base_cond) -> tuple_expr ## In state 358, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) ## In state 359, spurious reduction of production base_cond -> base_cond__open(base_cond) ## In state 405, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond @@ -3291,7 +3492,7 @@ interactive_expr: Match Verbatim With WILD ARROW Verbatim COMMA Bytes Else interactive_expr: Match Verbatim With WILD ARROW Verbatim End ## -## Ends in an error in state: 420. +## Ends in an error in state: 430. ## ## base_expr(base_cond) -> disj_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In EOF COMMA COLON BOOL_OR Attr ] @@ -3320,7 +3521,7 @@ interactive_expr: Match Verbatim With WILD ARROW Verbatim End interactive_expr: Match Verbatim With WILD ARROW With ## -## Ends in an error in state: 582. +## Ends in an error in state: 591. ## ## case_clause(base_cond) -> pattern ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3369,7 +3570,7 @@ interactive_expr: Match Verbatim With WILD COMMA With interactive_expr: Match Verbatim With WILD CONS Bytes SEMI ## -## Ends in an error in state: 581. +## Ends in an error in state: 590. ## ## case_clause(base_cond) -> pattern . ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3413,7 +3614,7 @@ interactive_expr: Match Verbatim With WILD With interactive_expr: Match Verbatim With With ## -## Ends in an error in state: 579. +## Ends in an error in state: 588. ## ## match_expr(base_cond) -> Match expr With . option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## @@ -3803,7 +4004,7 @@ interactive_expr: Verbatim WILD interactive_expr: Verbatim With ## -## Ends in an error in state: 602. +## Ends in an error in state: 611. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -3832,7 +4033,7 @@ interactive_expr: Verbatim With interactive_expr: With ## -## Ends in an error in state: 600. +## Ends in an error in state: 609. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -4278,7 +4479,7 @@ contract: Let LPAR With contract: Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 589. +## Ends in an error in state: 598. ## ## let_declaration -> Let Rec let_binding . seq(Attr) [ Type Let EOF ] ## @@ -4403,7 +4604,7 @@ contract: Let WILD EQ Bytes Attr With contract: Let WILD EQ Bytes With ## -## Ends in an error in state: 591. +## Ends in an error in state: 600. ## ## let_declaration -> Let let_binding . seq(Attr) [ Type Let EOF ] ## @@ -4539,7 +4740,7 @@ contract: Type Ident EQ Constr With contract: Type Ident EQ Ident VBAR ## -## Ends in an error in state: 597. +## Ends in an error in state: 606. ## ## declarations -> declaration . [ EOF ] ## declarations -> declaration . declarations [ EOF ] @@ -4555,7 +4756,7 @@ contract: Type Ident EQ Ident VBAR ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 27, spurious reduction of production type_expr -> fun_type ## In state 61, spurious reduction of production type_decl -> Type Ident EQ type_expr -## In state 593, spurious reduction of production declaration -> type_decl +## In state 602, spurious reduction of production declaration -> type_decl ## diff --git a/src/passes/01-parser/pascaligo/AST.ml b/src/passes/01-parser/pascaligo/AST.ml index b6ba774ca..21c1d9b12 100644 --- a/src/passes/01-parser/pascaligo/AST.ml +++ b/src/passes/01-parser/pascaligo/AST.ml @@ -160,8 +160,7 @@ and attr_decl = string reg ne_injection reg and const_decl = { kwd_const : kwd_const; name : variable; - colon : colon; - const_type : type_expr; + const_type : (colon * type_expr) option; equal : equal; init : expr; terminator : semi option; @@ -208,8 +207,7 @@ and type_tuple = (type_expr, comma) nsepseq par reg and fun_expr = { kwd_function : kwd_function; param : parameters; - colon : colon; - ret_type : type_expr; + ret_type : (colon * type_expr) option; kwd_is : kwd_is; return : expr } @@ -219,8 +217,7 @@ and fun_decl = { kwd_function : kwd_function; fun_name : variable; param : parameters; - colon : colon; - ret_type : type_expr; + ret_type : (colon * type_expr) option; kwd_is : kwd_is; block_with : (block reg * kwd_with) option; return : expr; @@ -237,15 +234,13 @@ and param_decl = and param_const = { kwd_const : kwd_const; var : variable; - colon : colon; - param_type : type_expr + param_type : (colon * type_expr) option } and param_var = { kwd_var : kwd_var; var : variable; - colon : colon; - param_type : type_expr + param_type : (colon * type_expr) option } and block = { @@ -273,8 +268,7 @@ and data_decl = and var_decl = { kwd_var : kwd_var; name : variable; - colon : colon; - var_type : type_expr; + var_type : (colon * type_expr) option; assign : assign; init : expr; terminator : semi option; @@ -412,18 +406,14 @@ and for_loop = | ForCollect of for_collect reg and for_int = { - kwd_for : kwd_for; - assign : var_assign reg; - kwd_to : kwd_to; - bound : expr; - step : (kwd_step * expr) option; - block : block reg -} - -and var_assign = { - name : variable; - assign : assign; - expr : expr + kwd_for : kwd_for; + binder : variable; + assign : assign; + init : expr; + kwd_to : kwd_to; + bound : expr; + step : (kwd_step * expr) option; + block : block reg } and for_collect = { @@ -634,6 +624,7 @@ and pattern = | PTuple of tuple_pattern and constr_pattern = + (*What is a unit pattern what does it catch ? is it like PWild ? *) PUnit of c_Unit | PFalse of c_False | PTrue of c_True @@ -646,6 +637,7 @@ and tuple_pattern = (pattern, comma) nsepseq par reg and list_pattern = PListComp of pattern injection reg | PNil of kwd_nil + (* Currently hd # tl is PCons, i would expect this to have type pattern * cons * pattern just like PParCons*) | PParCons of (pattern * cons * pattern) par reg | PCons of (pattern, cons) nsepseq reg diff --git a/src/passes/01-parser/pascaligo/Parser.mly b/src/passes/01-parser/pascaligo/Parser.mly index dc0ca1cba..a6043a26c 100644 --- a/src/passes/01-parser/pascaligo/Parser.mly +++ b/src/passes/01-parser/pascaligo/Parser.mly @@ -142,6 +142,7 @@ type_decl: terminator = $5} in {region; value} } +type_expr_colon: ":" type_expr { $1,$2 } type_expr: fun_type | sum_type | record_type { $1 } @@ -239,52 +240,49 @@ field_decl: fun_expr: - "function" parameters ":" type_expr "is" expr { - let stop = expr_to_region $6 in + "function" parameters type_expr_colon? "is" expr { + let stop = expr_to_region $5 in let region = cover $1 stop and value = {kwd_function = $1; param = $2; - colon = $3; - ret_type = $4; - kwd_is = $5; - return = $6} + ret_type = $3; + kwd_is = $4; + return = $5} in {region; value} } (* Function declarations *) open_fun_decl: - ioption ("recursive") "function" fun_name parameters ":" type_expr "is" + ioption ("recursive") "function" fun_name parameters type_expr_colon? "is" block "with" expr { Scoping.check_reserved_name $3; - let stop = expr_to_region $10 in + let stop = expr_to_region $9 in let region = cover $2 stop and value = {kwd_recursive= $1; kwd_function = $2; fun_name = $3; param = $4; - colon = $5; - ret_type = $6; - kwd_is = $7; - block_with = Some ($8, $9); - return = $10; + ret_type = $5; + kwd_is = $6; + block_with = Some ($7, $8); + return = $9; terminator = None; attributes = None} in {region; value} } -| ioption ("recursive") "function" fun_name parameters ":" type_expr "is" +| ioption ("recursive") "function" fun_name parameters type_expr_colon? "is" expr { Scoping.check_reserved_name $3; - let stop = expr_to_region $8 in + let stop = expr_to_region $7 in let region = cover $2 stop and value = {kwd_recursive= $1; kwd_function = $2; fun_name = $3; param = $4; - colon = $5; - ret_type = $6; - kwd_is = $7; + ret_type = $5; + kwd_is = $6; block_with = None; - return = $8; + return = $7; terminator = None; attributes = None} in {region; value} } @@ -300,28 +298,26 @@ parameters: in Scoping.check_parameters params; $1 } param_decl: - "var" var ":" param_type { + "var" var param_type? { Scoping.check_reserved_name $2; - let stop = type_expr_to_region $4 in + let stop = match $3 with None -> $2.region | Some (_,t) -> type_expr_to_region t in let region = cover $1 stop and value = {kwd_var = $1; var = $2; - colon = $3; - param_type = $4} + param_type = $3} in ParamVar {region; value} } -| "const" var ":" param_type { +| "const" var param_type? { Scoping.check_reserved_name $2; - let stop = type_expr_to_region $4 in + let stop = match $3 with None -> $2.region | Some (_,t) -> type_expr_to_region t in let region = cover $1 stop and value = {kwd_const = $1; var = $2; - colon = $3; - param_type = $4} + param_type = $3} in ParamConst {region; value} } param_type: - fun_type { $1 } + ":" fun_type { $1,$2 } block: "begin" sep_or_term_list(statement,";") "end" { @@ -352,11 +348,10 @@ open_data_decl: open_const_decl: "const" unqualified_decl("=") { - let name, colon, const_type, equal, init, stop = $2 in + let name, const_type, equal, init, stop = $2 in let region = cover $1 stop and value = {kwd_const = $1; name; - colon; const_type; equal; init; @@ -366,11 +361,10 @@ open_const_decl: open_var_decl: "var" unqualified_decl(":=") { - let name, colon, var_type, assign, init, stop = $2 in + let name, var_type, assign, init, stop = $2 in let region = cover $1 stop and value = {kwd_var = $1; name; - colon; var_type; assign; init; @@ -378,10 +372,10 @@ open_var_decl: in {region; value} } unqualified_decl(OP): - var ":" type_expr OP expr { + var type_expr_colon? OP expr { Scoping.check_reserved_name $1; - let region = expr_to_region $5 - in $1, $2, $3, $4, $5, region } + let region = expr_to_region $4 + in $1, $2, $3, $4, region } const_decl: open_const_decl ";"? { @@ -616,26 +610,30 @@ while_loop: in While {region; value} } for_loop: - "for" var_assign "to" expr block { - let region = cover $1 $5.region in - let value = {kwd_for = $1; - assign = $2; - kwd_to = $3; - bound = $4; - step = None; - block = $5} - in For (ForInt {region; value}) - } -| "for" var_assign "to" expr "step" expr block { + "for" var ":=" expr "to" expr block { let region = cover $1 $7.region in let value = {kwd_for = $1; - assign = $2; - kwd_to = $3; - bound = $4; - step = Some ($5, $6); + 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} + in For (ForInt {region; value}) + } | "for" var arrow_clause? "in" collection expr block { Scoping.check_reserved_name $2; let region = cover $1 $7.region in @@ -653,13 +651,6 @@ collection: | "set" { Set $1 } | "list" { List $1 } -var_assign: - var ":=" expr { - Scoping.check_reserved_name $1; - let region = cover $1.region (expr_to_region $3) - and value = {name=$1; assign=$2; expr=$3} - in {region; value} } - arrow_clause: "->" var { Scoping.check_reserved_name $2; ($1,$2) } diff --git a/src/passes/01-parser/pascaligo/ParserLog.ml b/src/passes/01-parser/pascaligo/ParserLog.ml index e57d52c7a..511140ea7 100644 --- a/src/passes/01-parser/pascaligo/ParserLog.ml +++ b/src/passes/01-parser/pascaligo/ParserLog.ml @@ -64,6 +64,11 @@ let print_sepseq : None -> () | Some seq -> print_nsepseq state sep print seq +let print_option : state -> (state -> 'a -> unit ) -> 'a option -> unit = + fun state print -> function + None -> () + | Some opt -> print state opt + let print_token state region lexeme = let line = sprintf "%s: %s\n"(compact state region) lexeme @@ -132,12 +137,11 @@ and print_decl state = function | AttrDecl decl -> print_attr_decl state decl and print_const_decl state {value; _} = - let {kwd_const; name; colon; const_type; + let {kwd_const; name; const_type; equal; init; terminator; _} = value in print_token state kwd_const "const"; print_var state name; - print_token state colon ":"; - print_type_expr state const_type; + print_option state print_colon_type_expr const_type; print_token state equal "="; print_expr state init; print_terminator state terminator @@ -161,6 +165,10 @@ 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) = + print_token state colon ":"; + print_type_expr state type_expr; + and print_cartesian state {value; _} = print_nsepseq state "*" print_type_expr value @@ -209,14 +217,13 @@ and print_type_tuple state {value; _} = print_token state rpar ")" and print_fun_decl state {value; _} = - let {kwd_function; fun_name; param; colon; + let {kwd_function; fun_name; param; ret_type; kwd_is; block_with; return; terminator; _} = value in print_token state kwd_function "function"; print_var state fun_name; print_parameters state param; - print_token state colon ":"; - print_type_expr state ret_type; + print_option state print_colon_type_expr ret_type; print_token state kwd_is "is"; (match block_with with None -> () @@ -227,12 +234,11 @@ and print_fun_decl state {value; _} = print_terminator state terminator; and print_fun_expr state {value; _} = - let {kwd_function; param; colon; + let {kwd_function; param; ret_type; kwd_is; return} : fun_expr = value in print_token state kwd_function "function"; print_parameters state param; - print_token state colon ":"; - print_type_expr state ret_type; + print_option state print_colon_type_expr ret_type; print_token state kwd_is "is"; print_expr state return @@ -257,18 +263,16 @@ and print_param_decl state = function | ParamVar param_var -> print_param_var state param_var and print_param_const state {value; _} = - let {kwd_const; var; colon; param_type} = value in + let {kwd_const; var; param_type} = value in print_token state kwd_const "const"; print_var state var; - print_token state colon ":"; - print_type_expr state param_type + print_option state print_colon_type_expr param_type and print_param_var state {value; _} = - let {kwd_var; var; colon; param_type} = value in - print_token state kwd_var "var"; - print_var state var; - print_token state colon ":"; - print_type_expr state param_type + 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 and print_block state block = let {enclosing; statements; terminator} = block.value in @@ -291,12 +295,11 @@ and print_data_decl state = function | LocalFun decl -> print_fun_decl state decl and print_var_decl state {value; _} = - let {kwd_var; name; colon; var_type; + let {kwd_var; name; var_type; assign; init; terminator} = value in print_token state kwd_var "var"; print_var state name; - print_token state colon ":"; - print_type_expr state var_type; + print_option state print_colon_type_expr var_type; print_token state assign ":="; print_expr state init; print_terminator state terminator @@ -411,9 +414,11 @@ and print_for_loop state = function | ForCollect for_collect -> print_for_collect state for_collect and print_for_int state ({value; _} : for_int reg) = - let {kwd_for; assign; kwd_to; bound; step; block} = value in + let {kwd_for; binder; assign; init; kwd_to; bound; step; block} = value in print_token state kwd_for "for"; - print_var_assign state assign; + print_var state binder; + print_token state assign ":="; + print_expr state init; print_token state kwd_to "to"; print_expr state bound; (match step with @@ -423,12 +428,6 @@ and print_for_int state ({value; _} : for_int reg) = print_expr state expr); print_block state block -and print_var_assign state {value; _} = - let {name; assign; expr} = value in - print_var state name; - print_token state assign ":="; - print_expr state expr - and print_for_collect state ({value; _} : for_collect reg) = let {kwd_for; var; bind_to; kwd_in; collection; expr; block} = value in @@ -935,7 +934,7 @@ and pp_fun_decl state decl = let () = let state = state#pad arity (start + 2) in pp_node state ""; - pp_type_expr (state#pad 1 0) decl.ret_type in + 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 pp_node state ""; @@ -953,7 +952,7 @@ and pp_fun_decl state decl = and pp_const_decl state decl = let arity = 3 in pp_ident (state#pad arity 0) decl.name; - pp_type_expr (state#pad arity 1) decl.const_type; + print_option (state#pad arity 1) pp_type_expr @@ Option.map snd decl.const_type; pp_expr (state#pad arity 2) decl.init and pp_type_expr state = function @@ -1022,7 +1021,7 @@ and pp_fun_expr state (expr: fun_expr) = let () = let state = state#pad 3 1 in pp_node state ""; - pp_type_expr (state#pad 1 0) expr.ret_type in + print_option (state#pad 1 0) pp_type_expr @@ Option.map snd expr.ret_type in let () = let state = state#pad 3 2 in pp_node state ""; @@ -1050,11 +1049,11 @@ and pp_param_decl state = function ParamConst {value; region} -> pp_loc_node state "ParamConst" region; pp_ident (state#pad 2 0) value.var; - pp_type_expr (state#pad 2 1) value.param_type + print_option (state#pad 2 1) pp_type_expr @@ Option.map snd value.param_type | ParamVar {value; region} -> pp_loc_node state "ParamVar" region; pp_ident (state#pad 2 0) value.var; - pp_type_expr (state#pad 2 1) value.param_type + print_option (state#pad 2 1) pp_type_expr @@ Option.map snd value.param_type and pp_statements state statements = let statements = Utils.nsepseq_to_list statements in @@ -1342,13 +1341,15 @@ and pp_for_loop state = function pp_for_collect state value and pp_for_int state for_int = - let {assign; bound; step; block; _} = for_int in + let {binder; init; bound; step; block; _} = for_int in let arity = match step with None -> 3 | Some _ -> 4 in let () = let state = state#pad arity 0 in pp_node state ""; - pp_var_assign state assign.value in + pp_ident (state#pad 2 0) binder; + pp_expr (state#pad 2 1) init + in let () = let state = state#pad arity 1 in pp_node state ""; @@ -1367,10 +1368,6 @@ and pp_for_int state for_int = pp_statements state statements in () -and pp_var_assign state asgn = - pp_ident (state#pad 2 0) asgn.name; - pp_expr (state#pad 2 1) asgn.expr - and pp_for_collect state collect = let () = let state = state#pad 3 0 in @@ -1458,7 +1455,7 @@ and pp_data_decl state = function and pp_var_decl state decl = pp_ident (state#pad 3 0) decl.name; - pp_type_expr (state#pad 3 1) decl.var_type; + print_option (state#pad 3 1) pp_type_expr @@ Option.map snd decl.var_type; pp_expr (state#pad 3 2) decl.init and pp_expr state = function diff --git a/src/passes/01-parser/pascaligo/Pretty.ml b/src/passes/01-parser/pascaligo/Pretty.ml index cf3817089..52e1b1b7a 100644 --- a/src/passes/01-parser/pascaligo/Pretty.ml +++ b/src/passes/01-parser/pascaligo/Pretty.ml @@ -19,6 +19,11 @@ let pp_braces : ('a -> document) -> 'a braces reg -> document = fun printer {value; _} -> string "{" ^^ nest 1 (printer value.inside ^^ string "}") +let pp_option : ('a -> document) -> 'a option -> document = + fun printer -> function + None -> empty + | Some opt -> printer opt + let rec print ast = let app decl = group (pp_declaration decl) in let decl = Utils.nseq_to_list ast.decl in @@ -35,11 +40,11 @@ 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 start = string ("const " ^ name.value) in - let t_expr = pp_type_expr const_type in + let t_expr = const_type in let attr = match attributes with None -> empty | Some a -> hardline ^^ pp_attr_decl a in - group (start ^/^ nest 2 (string ": " ^^ t_expr)) + group (start ^/^ pp_option (fun (_, d) -> nest 2 (string ": " ^^ pp_type_expr d)) t_expr) ^^ group (break 1 ^^ nest 2 (string "= " ^^ pp_expr init)) ^^ attr @@ -123,10 +128,9 @@ and pp_fun_expr {value; _} = let {param; ret_type; return; _} : fun_expr = value in let start = string "function" in let parameters = pp_par pp_parameters param in - let return_t = pp_type_expr ret_type in let expr = pp_expr return in group (start ^^ nest 2 (break 1 ^^ parameters)) - ^^ group (break 1 ^^ nest 2 (string ": " ^^ return_t)) + ^^ pp_option (fun (_,d) -> group (break 1 ^^ nest 2 (string ": " ^^ pp_type_expr d))) ret_type ^^ string " is" ^^ group (nest 4 (break 1 ^^ expr)) and pp_fun_decl {value; _} = @@ -138,7 +142,6 @@ and pp_fun_decl {value; _} = | 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 return_t = pp_type_expr ret_type in let expr = pp_expr return in let body = match block_with with @@ -150,7 +153,7 @@ and pp_fun_decl {value; _} = None -> empty | Some a -> hardline ^^ pp_attr_decl a in prefix 2 1 start parameters - ^^ group (nest 2 (break 1 ^^ string ": " ^^ nest 2 return_t ^^ string " is")) + ^^ group (nest 2 (pp_option (fun (_, d) -> break 1 ^^ string ": " ^^ nest 2 (pp_type_expr d)) ret_type ^^ string " is")) ^^ body ^^ attr and pp_parameters p = pp_nsepseq ";" pp_param_decl p @@ -161,15 +164,13 @@ 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 - let t_expr = pp_type_expr param_type - in prefix 2 1 (name ^^ string " :") t_expr + let name = string ("const " ^ var.value) + in prefix 2 1 name @@ pp_option (fun (_,d) -> string ": " ^^ pp_type_expr d) param_type and pp_param_var {value; _} = let {var; param_type; _} : param_var = value in - let name = string ("var " ^ var.value) in - let t_expr = pp_type_expr param_type - in prefix 2 1 (name ^^ string " :") t_expr + let name = string ("var " ^ var.value) + in prefix 2 1 name @@ pp_option (fun (_,d) -> string ": " ^^ pp_type_expr d) param_type and pp_block {value; _} = string "block {" @@ -191,8 +192,7 @@ and pp_data_decl = function and pp_var_decl {value; _} = let {name; var_type; init; _} = value in let start = string ("var " ^ name.value) in - let t_expr = pp_type_expr var_type in - group (start ^/^ nest 2 (string ": " ^^ t_expr)) + group (start ^/^ pp_option (fun (_,d) -> nest 2 (string ": " ^^ pp_type_expr d)) var_type) ^^ group (break 1 ^^ nest 2 (string ":= " ^^ pp_expr init)) and pp_instruction = function @@ -330,19 +330,15 @@ and pp_for_loop = function | ForCollect l -> pp_for_collect l and pp_for_int {value; _} = - let {assign; bound; step; block; _} = value in + let {binder; init; bound; step; block; _} = value in let step = match step with None -> empty | Some (_, e) -> prefix 2 1 (string " step") (pp_expr e) in - prefix 2 1 (string "for") (pp_var_assign assign) + prefix 2 1 (string "for") (prefix 2 1 (pp_ident binder ^^ string " :=") (pp_expr init)) ^^ prefix 2 1 (string " to") (pp_expr bound) ^^ step ^^ hardline ^^ pp_block block -and pp_var_assign {value; _} = - let {name; expr; _} = value in - prefix 2 1 (pp_ident name ^^ string " :=") (pp_expr expr) - and pp_for_collect {value; _} = let {var; bind_to; collection; expr; block; _} = value in let binding = diff --git a/src/passes/01-parser/pascaligo/dune b/src/passes/01-parser/pascaligo/dune index 5b2f099ca..855fb0da9 100644 --- a/src/passes/01-parser/pascaligo/dune +++ b/src/passes/01-parser/pascaligo/dune @@ -66,6 +66,19 @@ (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))) +(rule + (targets Parser_msg.ml) + (deps Parser.mly ParToken.mly Parser.msg) + (action + (with-stdout-to %{targets} + (bash + "menhir \ + --compile-errors Parser.msg \ + --external-tokens LexToken \ + --base Parser \ + ParToken.mly \ + Parser.mly")))) + ;; Build of all the LIGO source file that cover all error states (rule @@ -75,27 +88,6 @@ ;; Error messages -;; Generate error messages from scratch -; (rule -; (targets error.messages) -; (deps Parser.mly ParToken.mly error.messages.checked-in) -; (action -; (with-stdout-to %{targets} -; (bash -; "menhir \ -; --unused-tokens \ -; --list-errors \ -; --table \ -; --strict \ -; --external-tokens LexToken.mli \ -; --base Parser.mly \ -; ParToken.mly \ -; Parser.mly -; " -; ) -; )) -; ) - (rule (targets error.messages) (mode (promote (until-clean) (only *))) @@ -155,8 +147,6 @@ ) ) - - (rule (targets ParErr.ml) (mode (promote (until-clean) (only *))) diff --git a/src/passes/01-parser/pascaligo/error.messages.checked-in b/src/passes/01-parser/pascaligo/error.messages.checked-in index 5688aff08..868b42a79 100644 --- a/src/passes/01-parser/pascaligo/error.messages.checked-in +++ b/src/passes/01-parser/pascaligo/error.messages.checked-in @@ -1,6 +1,6 @@ interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End ## -## Ends in an error in state: 148. +## Ends in an error in state: 149. ## ## 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 ] ## @@ -11,26 +11,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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: 142. ## ## 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 +43,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: 260. ## ## 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 +54,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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: 141. ## ## 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 ] @@ -88,7 +88,7 @@ interactive_expr: BigMap With 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 +100,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: 288. ## ## par(core_pattern) -> LPAR core_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -112,7 +112,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: 280. ## ## par(core_pattern) -> LPAR . core_pattern RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -124,7 +124,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: 279. ## ## constr_pattern -> C_Some . par(core_pattern) [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -136,7 +136,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: 294. ## ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . COMMA nsepseq(core_pattern,COMMA) [ RPAR ] @@ -149,7 +149,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: 278. ## ## par(nsepseq(core_pattern,COMMA)) -> LPAR . nsepseq(core_pattern,COMMA) RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -161,7 +161,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: 277. ## ## constr_pattern -> Constr . tuple_pattern [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -174,7 +174,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: 265. ## ## 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 +186,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: 329. ## ## 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 +197,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 327, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 331, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 328, 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: 264. ## ## 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 +228,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: 295. ## ## nsepseq(core_pattern,COMMA) -> core_pattern COMMA . nsepseq(core_pattern,COMMA) [ RPAR ] ## @@ -240,7 +240,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: 307. ## ## par(cons_pattern) -> LPAR cons_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -251,15 +251,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 301, spurious reduction of production pattern -> core_pattern +## In state 300, 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: 299. ## ## cons_pattern -> core_pattern CONS . pattern [ RPAR ] ## @@ -271,7 +271,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: 298. ## ## cons_pattern -> core_pattern . CONS pattern [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] @@ -285,7 +285,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: 273. ## ## 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 +298,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: 311. ## ## injection(List,core_pattern) -> List LBRACKET sep_or_term_list(core_pattern,SEMI) . RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -309,15 +309,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 315, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 314, 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: 309. ## ## 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 +330,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: 323. ## ## injection(List,core_pattern) -> List sep_or_term_list(core_pattern,SEMI) . End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -341,15 +341,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 315, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 314, 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: 320. ## ## 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 +362,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: 319. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -376,7 +376,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: 316. ## ## 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 +389,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: 315. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -403,7 +403,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: 272. ## ## 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 +418,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: 334. ## ## 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 +430,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: 335. ## ## 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 +441,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 327, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 331, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 328, 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: 331. ## ## 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 +472,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 327, 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: 332. ## ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) VBAR . nsepseq(case_clause(expr),VBAR) [ RBRACKET End ] ## @@ -501,7 +501,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: 326. ## ## case_clause(expr) -> pattern ARROW . expr [ VBAR RBRACKET End ] ## @@ -513,7 +513,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: 305. ## ## nsepseq(core_pattern,CONS) -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -525,7 +525,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: 304. ## ## nsepseq(core_pattern,CONS) -> core_pattern . [ RPAR ARROW ] ## nsepseq(core_pattern,CONS) -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -538,7 +538,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: 302. ## ## pattern -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -550,7 +550,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: 325. ## ## case_clause(expr) -> pattern . ARROW expr [ VBAR RBRACKET End ] ## @@ -561,14 +561,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 301, 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: 301. ## ## pattern -> core_pattern . [ RPAR ARROW ] ## pattern -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -581,7 +581,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: 263. ## ## 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 +594,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: 262. ## ## 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 +606,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 +635,7 @@ interactive_expr: Case With interactive_expr: Constr DOT And With ## -## Ends in an error in state: 176. +## Ends in an error in state: 177. ## ## 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 +648,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 +660,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 +673,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 +686,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 +699,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_expr_colon) . 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_expr_colon) ## ## 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_expr_colon -> COLON type_expr +## In state 89, spurious reduction of production option(type_expr_colon) -> type_expr_colon ## -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_expr_colon) 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_expr_colon) 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_expr_colon) 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 +746,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 +760,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 +770,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 +784,11 @@ 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) ## @@ -830,10 +797,22 @@ interactive_expr: Function LPAR Var Ident COLON With ## ## Ends in an error in state: 74. ## -## param_decl -> Var Ident COLON . param_type [ SEMI RPAR ] +## param_type -> COLON . fun_type [ SEMI RPAR ] ## ## The known suffix of the stack is as follows: -## Var Ident COLON +## 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 ## @@ -842,7 +821,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 @@ -854,7 +833,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 @@ -866,7 +845,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 @@ -876,9 +855,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_expr_colon) 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 @@ -888,7 +867,7 @@ interactive_expr: Function With interactive_expr: Ident DOT Ident ASS ## -## Ends in an error in state: 151. +## Ends in an error in state: 152. ## ## 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 ] @@ -900,15 +879,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 161, 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 ] ## @@ -920,7 +899,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 ] @@ -933,7 +912,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: 160. ## ## 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 ] ## @@ -945,7 +924,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: 244. ## ## 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 ] ## @@ -956,23 +935,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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: 243. ## ## 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 ] ## @@ -984,7 +963,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: 342. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -996,7 +975,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: 341. ## ## nsepseq(expr,COMMA) -> expr . [ RPAR ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -1008,23 +987,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 ] ## @@ -1036,7 +1015,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 ] @@ -1051,7 +1030,7 @@ interactive_expr: Ident While interactive_expr: Ident With Record Constr DOT Ident With ## -## Ends in an error in state: 163. +## Ends in an error in state: 164. ## ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] ## @@ -1063,7 +1042,7 @@ interactive_expr: Ident With Record Constr DOT Ident With interactive_expr: Ident With Record Constr DOT With ## -## Ends in an error in state: 162. +## Ends in an error in state: 163. ## ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] ## @@ -1075,7 +1054,7 @@ interactive_expr: Ident With Record Constr DOT With interactive_expr: Ident With Record Constr With ## -## Ends in an error in state: 161. +## Ends in an error in state: 162. ## ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] ## @@ -1087,7 +1066,7 @@ interactive_expr: Ident With Record Constr With interactive_expr: Ident With Record Ident EQ Bytes RBRACKET ## -## Ends in an error in state: 239. +## Ends in an error in state: 240. ## ## 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 ] ## @@ -1098,26 +1077,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 195, spurious reduction of production field_path_assignment -> path EQ expr +## In state 233, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 232, 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: 238. ## ## 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 ] @@ -1130,7 +1109,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: 237. ## ## 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 ] @@ -1143,24 +1122,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 195, 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: 234. ## ## 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 ] @@ -1173,7 +1152,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: 233. ## ## 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 ] @@ -1186,24 +1165,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 195, 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: 169. ## ## field_path_assignment -> path EQ . expr [ SEMI RBRACKET End ] ## @@ -1215,7 +1194,7 @@ interactive_expr: Ident With Record Ident EQ With interactive_expr: Ident With Record Ident While ## -## Ends in an error in state: 158. +## Ends in an error in state: 159. ## ## path -> Ident . [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] ## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] @@ -1228,7 +1207,7 @@ interactive_expr: Ident With Record Ident While interactive_expr: Ident With Record Ident With ## -## Ends in an error in state: 167. +## Ends in an error in state: 168. ## ## field_path_assignment -> path . EQ expr [ SEMI RBRACKET End ] ## @@ -1239,14 +1218,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 159, 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: 165. ## ## 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 ] ## @@ -1257,26 +1236,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 195, spurious reduction of production field_path_assignment -> path EQ expr +## In state 233, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 232, 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: 158. ## ## 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 ] ## @@ -1288,7 +1267,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: 157. ## ## 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 ] @@ -1301,7 +1280,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: 156. ## ## 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 ] ## @@ -1313,7 +1292,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: 349. ## ## 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 +1304,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: 348. ## ## 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 ] ## @@ -1337,7 +1316,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: 347. ## ## 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 ] ## @@ -1348,23 +1327,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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: 346. ## ## 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 ] ## @@ -1376,7 +1355,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: 345. ## ## 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 ] ## @@ -1387,23 +1366,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 ] ## @@ -1415,7 +1394,7 @@ interactive_expr: If With interactive_expr: LPAR Bytes RPAR With ## -## Ends in an error in state: 170. +## Ends in an error in state: 171. ## ## 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 ] ## @@ -1427,7 +1406,7 @@ interactive_expr: LPAR Bytes RPAR With interactive_expr: LPAR If Verbatim Then Bytes Else Bytes VBAR ## -## Ends in an error in state: 352. +## Ends in an error in state: 353. ## ## 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 ] @@ -1439,25 +1418,25 @@ 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 350, spurious reduction of production cond_expr -> If expr Then expr option(SEMI) Else expr +## In state 229, spurious reduction of production expr -> cond_expr ## interactive_expr: LPAR Verbatim COLON Ident VBAR ## -## Ends in an error in state: 359. +## Ends in an error in state: 360. ## ## 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 ] ## @@ -1472,14 +1451,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 359, 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: 358. ## ## annot_expr -> disj_expr COLON . type_expr [ RPAR ] ## @@ -1491,7 +1470,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: 355. ## ## tuple_comp -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -1503,7 +1482,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: 357. ## ## annot_expr -> disj_expr . COLON type_expr [ RPAR ] ## disj_expr -> disj_expr . Or conj_expr [ RPAR Or COMMA COLON ] @@ -1516,22 +1495,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, 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 ] @@ -1545,7 +1524,7 @@ interactive_expr: LPAR With interactive_expr: Lang Verbatim VBAR ## -## Ends in an error in state: 361. +## Ends in an error in state: 362. ## ## 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 ] ## @@ -1556,23 +1535,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 ] ## @@ -1584,7 +1563,7 @@ interactive_expr: Lang With interactive_expr: List LBRACKET Verbatim End ## -## Ends in an error in state: 365. +## Ends in an error in state: 366. ## ## 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 ] ## @@ -1595,25 +1574,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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: 364. ## ## 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 ] @@ -1626,7 +1605,7 @@ interactive_expr: List LBRACKET With interactive_expr: List Verbatim RBRACKET ## -## Ends in an error in state: 377. +## Ends in an error in state: 378. ## ## 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 ] ## @@ -1637,25 +1616,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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 ] @@ -1670,7 +1649,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 ] ## @@ -1682,7 +1661,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: 383. ## ## 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 ] ## @@ -1693,26 +1672,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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: 381. ## ## 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 ] @@ -1725,7 +1704,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: 386. ## ## 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 ] ## @@ -1736,26 +1715,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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: 257. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1768,7 +1747,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: 256. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1781,24 +1760,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, 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: 253. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1811,7 +1790,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: 252. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1824,24 +1803,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, 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: 250. ## ## binding -> expr ARROW . expr [ SEMI RBRACKET End ] ## @@ -1853,7 +1832,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: 249. ## ## binding -> expr . ARROW expr [ SEMI RBRACKET End ] ## @@ -1864,23 +1843,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 ] @@ -1895,7 +1874,7 @@ interactive_expr: Map With interactive_expr: Not Bytes With ## -## Ends in an error in state: 173. +## Ends in an error in state: 174. ## ## 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 ] @@ -1910,7 +1889,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 ] ## @@ -1922,7 +1901,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: 401. ## ## 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 ] ## @@ -1933,26 +1912,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, spurious reduction of production field_assignment -> Ident EQ expr +## In state 394, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 393, 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: 399. ## ## 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 ] @@ -1965,7 +1944,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: 398. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACKET End ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACKET End ] @@ -1978,24 +1957,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, 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: 395. ## ## 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 ] @@ -2008,7 +1987,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: 394. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACKET End ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACKET End ] @@ -2021,24 +2000,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, 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 ] ## @@ -2050,7 +2029,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 ] ## @@ -2062,7 +2041,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: 390. ## ## 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 ] ## @@ -2073,26 +2052,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, spurious reduction of production field_assignment -> Ident EQ expr +## In state 394, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 393, 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 ] ## @@ -2104,7 +2083,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 ] @@ -2117,7 +2096,7 @@ interactive_expr: Record With interactive_expr: Set LBRACKET Verbatim End ## -## Ends in an error in state: 404. +## Ends in an error in state: 405. ## ## 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 ] ## @@ -2128,25 +2107,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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: 403. ## ## 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 ] @@ -2159,7 +2138,7 @@ interactive_expr: Set LBRACKET With interactive_expr: Set Verbatim RBRACKET ## -## Ends in an error in state: 407. +## Ends in an error in state: 408. ## ## 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 ] ## @@ -2170,25 +2149,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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: 375. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] @@ -2201,7 +2180,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: 374. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] @@ -2214,23 +2193,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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: 371. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] @@ -2243,7 +2222,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: 370. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] @@ -2256,23 +2235,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 ] @@ -2287,7 +2266,7 @@ interactive_expr: Set With interactive_expr: Verbatim And With ## -## Ends in an error in state: 225. +## Ends in an error in state: 226. ## ## 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 ] ## @@ -2299,7 +2278,7 @@ interactive_expr: Verbatim And With interactive_expr: Verbatim CAT With ## -## Ends in an error in state: 201. +## Ends in an error in state: 202. ## ## 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 ] ## @@ -2311,7 +2290,7 @@ interactive_expr: Verbatim CAT With interactive_expr: Verbatim COLON ## -## Ends in an error in state: 195. +## Ends in an error in state: 196. ## ## 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 ] @@ -2323,22 +2302,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, 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: 209. ## ## 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 ] ## @@ -2350,7 +2329,7 @@ interactive_expr: Verbatim CONS With interactive_expr: Verbatim Contains With ## -## Ends in an error in state: 198. +## Ends in an error in state: 199. ## ## 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 ] ## @@ -2362,7 +2341,7 @@ interactive_expr: Verbatim Contains With interactive_expr: Verbatim EQ With ## -## Ends in an error in state: 221. +## Ends in an error in state: 222. ## ## 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 ] ## @@ -2374,7 +2353,7 @@ interactive_expr: Verbatim EQ With interactive_expr: Verbatim GE With ## -## Ends in an error in state: 219. +## Ends in an error in state: 220. ## ## 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 ] ## @@ -2386,7 +2365,7 @@ interactive_expr: Verbatim GE With interactive_expr: Verbatim GT With ## -## Ends in an error in state: 217. +## Ends in an error in state: 218. ## ## 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 ] ## @@ -2398,7 +2377,7 @@ interactive_expr: Verbatim GT With interactive_expr: Verbatim LE With ## -## Ends in an error in state: 215. +## Ends in an error in state: 216. ## ## 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 ] ## @@ -2410,7 +2389,7 @@ interactive_expr: Verbatim LE With interactive_expr: Verbatim LT With ## -## Ends in an error in state: 213. +## Ends in an error in state: 214. ## ## 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 ] ## @@ -2422,7 +2401,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: 208. ## ## 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 ] @@ -2437,7 +2416,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: 207. ## ## 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 ] ## @@ -2449,7 +2428,7 @@ interactive_expr: Verbatim MINUS With interactive_expr: Verbatim Mod With ## -## Ends in an error in state: 191. +## Ends in an error in state: 192. ## ## 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 ] ## @@ -2461,7 +2440,7 @@ interactive_expr: Verbatim Mod With interactive_expr: Verbatim NE With ## -## Ends in an error in state: 211. +## Ends in an error in state: 212. ## ## 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 ] ## @@ -2473,7 +2452,7 @@ interactive_expr: Verbatim NE With interactive_expr: Verbatim Or With ## -## Ends in an error in state: 196. +## Ends in an error in state: 197. ## ## 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 ] ## @@ -2485,7 +2464,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: 206. ## ## 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 ] @@ -2500,7 +2479,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: 205. ## ## 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 ] ## @@ -2512,7 +2491,7 @@ interactive_expr: Verbatim PLUS With interactive_expr: Verbatim SLASH With ## -## Ends in an error in state: 189. +## Ends in an error in state: 190. ## ## 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 ] ## @@ -2524,7 +2503,7 @@ interactive_expr: Verbatim SLASH With interactive_expr: Verbatim TIMES With ## -## Ends in an error in state: 174. +## Ends in an error in state: 175. ## ## 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 ] ## @@ -2536,7 +2515,7 @@ interactive_expr: Verbatim TIMES With interactive_expr: Verbatim VBAR ## -## Ends in an error in state: 604. +## Ends in an error in state: 601. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -2547,23 +2526,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## interactive_expr: Verbatim With ## -## Ends in an error in state: 197. +## Ends in an error in state: 198. ## ## 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 ] @@ -2576,7 +2555,7 @@ interactive_expr: Verbatim With interactive_expr: With ## -## Ends in an error in state: 602. +## Ends in an error in state: 599. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2588,7 +2567,7 @@ interactive_expr: With contract: Attributes LBRACKET String End ## -## Ends in an error in state: 548. +## Ends in an error in state: 545. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET sep_or_term_list(String,SEMI) . RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2599,15 +2578,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 537, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 548, 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: 544. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET . sep_or_term_list(String,SEMI) RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2619,7 +2598,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: 594. ## ## seq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2631,7 +2610,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: 592. ## ## nseq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2643,7 +2622,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: 587. ## ## attr_decl -> open_attr_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2655,7 +2634,7 @@ contract: Attributes String End With contract: Attributes String RBRACKET ## -## Ends in an error in state: 552. +## Ends in an error in state: 549. ## ## ne_injection(Attributes,String) -> Attributes sep_or_term_list(String,SEMI) . End [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2666,15 +2645,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 537, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 548, 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: 540. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2687,7 +2666,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: 539. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2701,7 +2680,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: 538. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2714,7 +2693,7 @@ contract: Attributes String SEMI With contract: Attributes String With ## -## Ends in an error in state: 540. +## Ends in an error in state: 537. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2728,7 +2707,7 @@ contract: Attributes String With contract: Attributes With ## -## Ends in an error in state: 539. +## Ends in an error in state: 536. ## ## 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 ] @@ -2739,9 +2718,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: 491. +## +## unqualified_decl(EQ) -> Ident option(type_expr_colon) . EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## +## The known suffix of the stack is as follows: +## Ident option(type_expr_colon) +## +## 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_expr_colon -> COLON type_expr +## In state 89, spurious reduction of production option(type_expr_colon) -> type_expr_colon +## + + + +contract: Const Ident COLON With +## +## Ends in an error in state: 87. +## +## type_expr_colon -> 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: 585. ## ## const_decl -> open_const_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2752,71 +2766,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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 493, spurious reduction of production unqualified_decl(EQ) -> Ident option(type_expr_colon) EQ expr +## In state 494, 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: 492. ## -## unqualified_decl(EQ) -> Ident COLON type_expr EQ . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## unqualified_decl(EQ) -> Ident option(type_expr_colon) 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 -## - - - -contract: Const Ident COLON With -## -## Ends in an error in state: 493. -## -## 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 +## Ident option(type_expr_colon) EQ ## contract: Const Ident With ## -## Ends in an error in state: 492. +## Ends in an error in state: 490. ## -## unqualified_decl(EQ) -> Ident . COLON type_expr EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## unqualified_decl(EQ) -> Ident . option(type_expr_colon) EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Ident @@ -2826,7 +2808,7 @@ contract: Const Ident With contract: Const With ## -## Ends in an error in state: 491. +## Ends in an error in state: 489. ## ## open_const_decl -> Const . unqualified_decl(EQ) [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2836,37 +2818,33 @@ 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: 461. ## -## fun_decl -> open_fun_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] +## open_fun_decl -> Function Ident parameters option(type_expr_colon) . Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident parameters option(type_expr_colon) . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## open_fun_decl +## Function Ident parameters option(type_expr_colon) ## ## 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 464, spurious reduction of production open_fun_decl -> Function Ident parameters COLON type_expr Is expr +## 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_expr_colon -> COLON type_expr +## In state 89, spurious reduction of production option(type_expr_colon) -> type_expr_colon ## -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 Begin Case Verbatim Of LBRACKET VBAR Block ## -## Ends in an error in state: 502. +## Ends in an error in state: 499. ## ## case(if_clause) -> Case expr Of LBRACKET option(VBAR) . cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2876,9 +2854,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -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 Is Begin Case Verbatim Of LBRACKET WILD ARROW Skip End ## -## Ends in an error in state: 531. +## Ends in an error in state: 528. ## ## case(if_clause) -> Case expr Of LBRACKET option(VBAR) cases(if_clause) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2889,15 +2867,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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) +## In state 530, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 527, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of LBRACKET With ## -## Ends in an error in state: 501. +## Ends in an error in state: 498. ## ## case(if_clause) -> Case expr Of LBRACKET . option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2907,9 +2885,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of VBAR Block +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of VBAR Block ## -## Ends in an error in state: 536. +## Ends in an error in state: 533. ## ## case(if_clause) -> Case expr Of option(VBAR) . cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2919,9 +2897,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip RBRACKET +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of WILD ARROW Skip RBRACKET ## -## Ends in an error in state: 537. +## Ends in an error in state: 534. ## ## case(if_clause) -> Case expr Of option(VBAR) cases(if_clause) . End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2932,15 +2910,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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) +## In state 530, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 527, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of WILD ARROW Skip VBAR With ## -## Ends in an error in state: 534. +## Ends in an error in state: 531. ## ## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) VBAR . nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] ## @@ -2950,9 +2928,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip With +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of WILD ARROW Skip With ## -## Ends in an error in state: 533. +## Ends in an error in state: 530. ## ## 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 ] @@ -2963,9 +2941,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW With +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of WILD ARROW With ## -## Ends in an error in state: 504. +## Ends in an error in state: 501. ## ## case_clause(if_clause) -> pattern ARROW . if_clause [ VBAR RBRACKET End ] ## @@ -2975,9 +2953,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD RPAR +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of WILD RPAR ## -## Ends in an error in state: 503. +## Ends in an error in state: 500. ## ## case_clause(if_clause) -> pattern . ARROW if_clause [ VBAR RBRACKET End ] ## @@ -2988,14 +2966,14 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 301, spurious reduction of production pattern -> core_pattern ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of With +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim Of With ## -## Ends in an error in state: 500. +## Ends in an error in state: 497. ## ## 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 ] @@ -3006,9 +2984,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin Case Verbatim VBAR ## -## Ends in an error in state: 499. +## Ends in an error in state: 496. ## ## 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 ] @@ -3020,23 +2998,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case With +contract: Function Ident LPAR Const Ident RPAR Is Begin Case With ## -## Ends in an error in state: 498. +## Ends in an error in state: 495. ## ## 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 ] @@ -3047,9 +3025,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr DOT And With +contract: Function Ident LPAR Const Ident RPAR Is Begin Constr DOT And With ## -## Ends in an error in state: 511. +## Ends in an error in state: 508. ## ## fun_call -> module_field . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3059,9 +3037,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr With +contract: Function Ident LPAR Const Ident RPAR Is Begin Constr With ## -## Ends in an error in state: 490. +## Ends in an error in state: 488. ## ## module_field -> Constr . DOT module_fun [ LPAR ] ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ LBRACKET ASS ] @@ -3072,9 +3050,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW Ident With +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ARROW Ident With ## -## Ends in an error in state: 474. +## Ends in an error in state: 479. ## ## for_loop -> For Ident option(arrow_clause) . In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3084,9 +3062,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW With +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ARROW With ## -## Ends in an error in state: 472. +## Ends in an error in state: 477. ## ## arrow_clause -> ARROW . Ident [ In ] ## @@ -3096,130 +3074,130 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim Step Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS Verbatim To Verbatim Step Verbatim VBAR ## -## Ends in an error in state: 487. +## Ends in an error in state: 474. ## -## for_loop -> For var_assign To expr Step expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS expr 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 +## For Ident ASS expr 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 +## In state 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS Verbatim To Verbatim Step With ## -## Ends in an error in state: 486. +## Ends in an error in state: 473. ## -## for_loop -> For var_assign To expr Step . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS expr 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 +## For Ident ASS expr To expr Step ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS Verbatim To Verbatim VBAR ## -## Ends in an error in state: 485. +## Ends in an error in state: 472. ## -## 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 ASS expr To expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS expr 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 +## 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 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS Verbatim To With ## -## Ends in an error in state: 484. +## Ends in an error in state: 471. ## -## 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 ASS expr To . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS expr To . expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## ## The known suffix of the stack is as follows: -## For var_assign To +## For Ident ASS expr 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS Verbatim VBAR ## ## Ends in an error in state: 470. ## -## var_assign -> Ident ASS . expr [ To ] +## for_loop -> For Ident ASS expr . To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS expr . To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## ## The known suffix of the stack is as follows: -## Ident ASS +## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In Set Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident ASS With ## -## Ends in an error in state: 480. +## Ends in an error in state: 469. +## +## for_loop -> For Ident ASS . expr To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident ASS . expr To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## +## The known suffix of the stack is as follows: +## For Ident ASS +## + + + +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident In Set Verbatim VBAR +## +## Ends in an error in state: 485. ## ## for_loop -> For Ident option(arrow_clause) In collection expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3230,23 +3208,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident In Set With ## -## Ends in an error in state: 479. +## Ends in an error in state: 484. ## ## for_loop -> For Ident option(arrow_clause) In collection . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3256,9 +3234,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In With +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident In With ## -## Ends in an error in state: 475. +## Ends in an error in state: 480. ## ## for_loop -> For Ident option(arrow_clause) In . collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3268,12 +3246,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident With +contract: Function Ident LPAR Const Ident RPAR Is Begin For Ident With ## -## Ends in an error in state: 469. +## Ends in an error in state: 468. ## +## for_loop -> For Ident . ASS expr To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For Ident . ASS expr 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 ] -## var_assign -> Ident . ASS expr [ To ] ## ## The known suffix of the stack is as follows: ## For Ident @@ -3281,12 +3260,12 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For With +contract: Function Ident LPAR Const Ident RPAR Is Begin For With ## -## Ends in an error in state: 468. +## Ends in an error in state: 467. ## -## 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 ASS expr To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] +## for_loop -> For . Ident ASS expr 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: @@ -3295,9 +3274,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident ASS With +contract: Function Ident LPAR Const Ident RPAR Is Begin Ident ASS With ## -## Ends in an error in state: 517. +## Ends in an error in state: 514. ## ## assignment -> lhs ASS . rhs [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3307,9 +3286,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident DOT Ident With +contract: Function Ident LPAR Const Ident RPAR Is Begin Ident DOT Ident With ## -## Ends in an error in state: 510. +## Ends in an error in state: 507. ## ## lhs -> path . [ ASS ] ## map_lookup -> path . brackets(expr) [ ASS ] @@ -3321,16 +3300,16 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 +## In state 128, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 161, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 167, spurious reduction of production path -> projection ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident LBRACKET Bytes RBRACKET With +contract: Function Ident LPAR Const Ident RPAR Is Begin Ident LBRACKET Bytes RBRACKET With ## -## Ends in an error in state: 516. +## Ends in an error in state: 513. ## ## assignment -> lhs . ASS rhs [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3340,7 +3319,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident With +contract: Function Ident LPAR Const Ident RPAR Is Begin Ident With ## ## Ends in an error in state: 457. ## @@ -3354,9 +3333,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then LBRACE Skip End +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then LBRACE Skip End ## -## Ends in an error in state: 568. +## Ends in an error in state: 565. ## ## clause_block -> LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3367,13 +3346,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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) +## In state 551, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 568, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then LBRACE With ## ## Ends in an error in state: 456. ## @@ -3385,9 +3364,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip Else With +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then Skip Else With ## -## Ends in an error in state: 574. +## Ends in an error in state: 571. ## ## conditional -> If expr Then if_clause option(SEMI) Else . if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3397,9 +3376,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip SEMI EQ +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then Skip SEMI EQ ## -## Ends in an error in state: 573. +## Ends in an error in state: 570. ## ## conditional -> If expr Then if_clause option(SEMI) . Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3409,9 +3388,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip With +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then Skip With ## -## Ends in an error in state: 572. +## Ends in an error in state: 569. ## ## conditional -> If expr Then if_clause . option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3421,7 +3400,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then With +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim Then With ## ## Ends in an error in state: 455. ## @@ -3433,7 +3412,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin If Verbatim VBAR ## ## Ends in an error in state: 454. ## @@ -3446,21 +3425,21 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If With +contract: Function Ident LPAR Const Ident RPAR Is Begin If With ## ## Ends in an error in state: 453. ## @@ -3472,7 +3451,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident VBAR ## ## Ends in an error in state: 430. ## @@ -3487,12 +3466,12 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 159, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Map LBRACKET Verbatim ARROW Bytes End ## ## Ends in an error in state: 446. ## @@ -3505,24 +3484,24 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Map LBRACKET With ## ## Ends in an error in state: 445. ## @@ -3534,7 +3513,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map Verbatim ARROW Bytes RBRACKET +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Map Verbatim ARROW Bytes RBRACKET ## ## Ends in an error in state: 448. ## @@ -3547,24 +3526,24 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 251, spurious reduction of production binding -> expr ARROW expr +## In state 252, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 248, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Map With ## ## Ends in an error in state: 444. ## @@ -3577,7 +3556,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record Ident EQ Bytes RBRACKET +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Record Ident EQ Bytes RBRACKET ## ## Ends in an error in state: 442. ## @@ -3590,24 +3569,24 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, spurious reduction of production field_assignment -> Ident EQ expr +## In state 394, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 393, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Record LBRACKET Ident EQ Bytes End ## ## Ends in an error in state: 440. ## @@ -3620,24 +3599,24 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 389, spurious reduction of production field_assignment -> Ident EQ expr +## In state 394, spurious reduction of production nsepseq(field_assignment,SEMI) -> field_assignment +## In state 393, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Record LBRACKET With ## ## Ends in an error in state: 439. ## @@ -3649,7 +3628,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record With +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Record With ## ## Ends in an error in state: 438. ## @@ -3662,7 +3641,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set LBRACKET Verbatim End +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Set LBRACKET Verbatim End ## ## Ends in an error in state: 434. ## @@ -3675,23 +3654,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Set LBRACKET With ## ## Ends in an error in state: 433. ## @@ -3703,7 +3682,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set Verbatim RBRACKET +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Set Verbatim RBRACKET ## ## Ends in an error in state: 436. ## @@ -3716,23 +3695,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 370, spurious reduction of production nsepseq(expr,SEMI) -> expr +## In state 369, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With Set With ## ## Ends in an error in state: 432. ## @@ -3745,7 +3724,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With With +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch Ident With With ## ## Ends in an error in state: 431. ## @@ -3759,7 +3738,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch With +contract: Function Ident LPAR Const Ident RPAR Is Begin Patch With ## ## Ends in an error in state: 429. ## @@ -3773,7 +3752,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Map With +contract: Function Ident LPAR Const Ident RPAR Is Begin Remove Verbatim From Map With ## ## Ends in an error in state: 427. ## @@ -3785,7 +3764,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Set With +contract: Function Ident LPAR Const Ident RPAR Is Begin Remove Verbatim From Set With ## ## Ends in an error in state: 425. ## @@ -3797,7 +3776,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From With +contract: Function Ident LPAR Const Ident RPAR Is Begin Remove Verbatim From With ## ## Ends in an error in state: 424. ## @@ -3810,7 +3789,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin Remove Verbatim VBAR ## ## Ends in an error in state: 423. ## @@ -3824,21 +3803,21 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove With +contract: Function Ident LPAR Const Ident RPAR Is Begin Remove With ## ## Ends in an error in state: 422. ## @@ -3851,33 +3830,33 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End While +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip End While +## +## Ends in an error in state: 464. +## +## open_fun_decl -> Function Ident parameters option(type_expr_colon) 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 option(type_expr_colon) Is block +## + + + +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip End With With ## ## 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 ] +## open_fun_decl -> Function Ident parameters option(type_expr_colon) 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 +## Function Ident parameters option(type_expr_colon) Is block With ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End With With +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip RBRACE ## -## 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. +## Ends in an error in state: 573. ## ## block -> Begin sep_or_term_list(statement,SEMI) . End [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3888,15 +3867,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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) +## In state 551, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 568, 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 +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip SEMI Skip SEMI With ## -## Ends in an error in state: 557. +## Ends in an error in state: 554. ## ## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] ## seq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] @@ -3907,9 +3886,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI Skip With +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip SEMI Skip With ## -## Ends in an error in state: 556. +## Ends in an error in state: 553. ## ## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] ## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] @@ -3921,9 +3900,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI With +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip SEMI With ## -## Ends in an error in state: 555. +## Ends in an error in state: 552. ## ## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] ## nseq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] @@ -3934,9 +3913,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip With +contract: Function Ident LPAR Const Ident RPAR Is Begin Skip With ## -## Ends in an error in state: 554. +## Ends in an error in state: 551. ## ## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] ## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] @@ -3948,55 +3927,46 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String ASS With +contract: Function Ident LPAR Const Ident RPAR Is Begin Var Ident ASS With ## ## Ends in an error in state: 418. ## -## unqualified_decl(ASS) -> Ident COLON type_expr ASS . expr [ SEMI RBRACE End ] +## unqualified_decl(ASS) -> Ident option(type_expr_colon) ASS . expr [ SEMI RBRACE End ] ## ## The known suffix of the stack is as follows: -## Ident COLON type_expr ASS +## Ident option(type_expr_colon) ASS ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin Var Ident COLON Ident VBAR ## ## Ends in an error in state: 417. ## -## unqualified_decl(ASS) -> Ident COLON type_expr . ASS expr [ SEMI RBRACE End ] +## unqualified_decl(ASS) -> Ident option(type_expr_colon) . ASS expr [ SEMI RBRACE End ] ## ## The known suffix of the stack is as follows: -## Ident COLON type_expr +## Ident option(type_expr_colon) ## ## 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_expr_colon -> COLON type_expr +## In state 89, spurious reduction of production option(type_expr_colon) -> type_expr_colon ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON With +contract: Function Ident LPAR Const Ident RPAR Is Begin Var Ident With ## ## Ends in an error in state: 416. ## -## unqualified_decl(ASS) -> Ident COLON . type_expr ASS expr [ SEMI RBRACE End ] -## -## The known suffix of the stack is as follows: -## Ident COLON -## - - - -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 ] +## unqualified_decl(ASS) -> Ident . option(type_expr_colon) ASS expr [ SEMI RBRACE End ] ## ## The known suffix of the stack is as follows: ## Ident @@ -4004,9 +3974,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var With +contract: Function Ident LPAR Const Ident RPAR Is Begin Var With ## -## Ends in an error in state: 414. +## Ends in an error in state: 415. ## ## open_var_decl -> Var . unqualified_decl(ASS) [ SEMI RBRACE End ] ## @@ -4016,9 +3986,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While Verbatim VBAR +contract: Function Ident LPAR Const Ident RPAR Is Begin While Verbatim VBAR ## -## Ends in an error in state: 412. +## Ends in an error in state: 413. ## ## while_loop -> While expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4029,23 +3999,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## 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 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While With +contract: Function Ident LPAR Const Ident RPAR Is Begin While With ## -## Ends in an error in state: 411. +## Ends in an error in state: 412. ## ## while_loop -> While . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4055,9 +4025,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin With +contract: Function Ident LPAR Const Ident RPAR Is Begin With ## -## Ends in an error in state: 413. +## Ends in an error in state: 414. ## ## block -> Begin . sep_or_term_list(statement,SEMI) End [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4067,9 +4037,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block LBRACE Skip End +contract: Function Ident LPAR Const Ident RPAR Is Block LBRACE Skip End ## -## Ends in an error in state: 579. +## Ends in an error in state: 576. ## ## block -> Block LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4080,15 +4050,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block ## 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) +## In state 551, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 568, 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 +contract: Function Ident LPAR Const Ident RPAR Is Block LBRACE With ## -## Ends in an error in state: 410. +## Ends in an error in state: 411. ## ## block -> Block LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4098,9 +4068,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block With +contract: Function Ident LPAR Const Ident RPAR Is Block With ## -## Ends in an error in state: 409. +## Ends in an error in state: 410. ## ## block -> Block . LBRACE sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4110,59 +4080,53 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With +contract: Function Ident LPAR Const Ident RPAR Is Bytes VBAR ## -## Ends in an error in state: 463. +## Ends in an error in state: 583. ## -## 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 ] +## fun_decl -> open_fun_decl . option(SEMI) [ Type Recursive Function 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 +## open_fun_decl ## ## 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 +## In state 198, spurious reduction of production unary_expr -> core_expr +## In state 145, spurious reduction of production mult_expr -> unary_expr +## In state 174, spurious reduction of production add_expr -> mult_expr +## In state 204, spurious reduction of production cons_expr -> add_expr +## In state 201, spurious reduction of production cat_expr -> cons_expr +## In state 224, spurious reduction of production comp_expr -> cat_expr +## In state 211, spurious reduction of production set_membership -> comp_expr +## In state 147, spurious reduction of production conj_expr -> set_membership +## In state 228, spurious reduction of production disj_expr -> conj_expr +## In state 196, spurious reduction of production expr -> disj_expr +## In state 463, spurious reduction of production open_fun_decl -> Function Ident parameters option(type_expr_colon) Is expr ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON With +contract: Function Ident LPAR Const Ident RPAR Is With ## -## Ends in an error in state: 461. +## 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 ] +## open_fun_decl -> Function Ident parameters option(type_expr_colon) Is . block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident parameters option(type_expr_colon) Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## Function Ident parameters COLON +## Function Ident parameters option(type_expr_colon) Is ## -contract: Function Ident LPAR Const Ident COLON Ident RPAR With +contract: Function Ident LPAR Const 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident parameters . option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function Ident parameters @@ -4174,8 +4138,8 @@ contract: Function Ident With ## ## Ends in an error in state: 459. ## -## 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function Ident . parameters option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function Ident @@ -4187,8 +4151,8 @@ contract: Function With ## ## Ends in an error in state: 458. ## -## 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Function . Ident parameters option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Function @@ -4196,52 +4160,15 @@ contract: Function With -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End While +contract: Recursive Function Ident LPAR Const Ident RPAR COLON String VBAR ## -## Ends in an error in state: 582. +## 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 option(type_expr_colon) . Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident parameters option(type_expr_colon) . 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 block -## - - - -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End With With -## -## Ends in an error in state: 583. -## -## open_fun_decl -> Recursive 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: -## Recursive Function Ident parameters COLON type_expr Is block With -## - - - -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With -## -## Ends in an error in state: 89. -## -## 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 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_expr_colon) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an @@ -4250,29 +4177,55 @@ 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_expr_colon -> COLON type_expr +## In state 89, spurious reduction of production option(type_expr_colon) -> type_expr_colon ## -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON With +contract: Recursive Function Ident LPAR Const Ident RPAR Is Begin Skip End While ## -## Ends in an error in state: 87. +## Ends in an error in state: 579. ## -## 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_expr_colon) Is block . With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: -## Recursive Function Ident parameters COLON +## Recursive Function Ident parameters option(type_expr_colon) Is block ## -contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR With +contract: Recursive Function Ident LPAR Const Ident RPAR Is Begin Skip End With With +## +## Ends in an error in state: 580. +## +## open_fun_decl -> Recursive Function Ident parameters option(type_expr_colon) Is block With . 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_expr_colon) Is block 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_expr_colon) Is . block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident parameters option(type_expr_colon) 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_expr_colon) 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident parameters . option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function Ident parameters @@ -4284,8 +4237,8 @@ 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function Ident . parameters option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function Ident @@ -4297,8 +4250,8 @@ 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive Function . Ident parameters option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive Function @@ -4310,8 +4263,8 @@ 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_expr_colon) Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] +## open_fun_decl -> Recursive . Function Ident parameters option(type_expr_colon) Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ## The known suffix of the stack is as follows: ## Recursive diff --git a/src/passes/01-parser/reasonligo/dune b/src/passes/01-parser/reasonligo/dune index f41445b7d..38170a812 100644 --- a/src/passes/01-parser/reasonligo/dune +++ b/src/passes/01-parser/reasonligo/dune @@ -65,6 +65,19 @@ (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 ))) +(rule + (targets Parser_msg.ml) + (deps Parser.mly ParToken.mly Parser.msg) + (action + (with-stdout-to %{targets} + (bash + "menhir \ + --compile-errors Parser.msg \ + --external-tokens LexToken \ + --base Parser \ + ParToken.mly \ + Parser.mly")))) + ;; Build of all the LIGO source file that cover all error states (rule @@ -72,28 +85,6 @@ (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 ))) -;; Error messages -;; Generate error messages from scratch -; (rule -; (targets error.messages) -; (deps Parser.mly ParToken.mly error.messages.checked-in) -; (action -; (with-stdout-to %{targets} -; (bash -; "menhir \ -; --unused-tokens \ -; --list-errors \ -; --table \ -; --strict \ -; --external-tokens LexToken.mli \ -; --base Parser.mly \ -; ParToken.mly \ -; Parser.mly -; " -; ) -; )) -; ) - (rule (targets error.messages) (mode (promote (until-clean) (only *))) diff --git a/src/passes/02-concrete_to_imperative/cameligo.ml b/src/passes/02-concrete_to_imperative/cameligo.ml index b72916018..2747a2fb4 100644 --- a/src/passes/02-concrete_to_imperative/cameligo.ml +++ b/src/passes/02-concrete_to_imperative/cameligo.ml @@ -541,7 +541,7 @@ and compile_fun lamb' : (expr , abs_error) result = let aux ((var : Raw.variable) , ty_opt) = match var.value , ty_opt with | "storage" , None -> - ok (var , t_variable "storage") + ok (var , t_variable ~loc @@ Var.fresh ~name:"storage" ()) | _ , None -> fail @@ untyped_fun_param var | _ , Some ty -> ( diff --git a/src/passes/02-concrete_to_imperative/errors_pascaligo.ml b/src/passes/02-concrete_to_imperative/errors_pascaligo.ml index dfb59afef..32b789496 100644 --- a/src/passes/02-concrete_to_imperative/errors_pascaligo.ml +++ b/src/passes/02-concrete_to_imperative/errors_pascaligo.ml @@ -10,32 +10,38 @@ type abs_error = [ | `Concrete_pascaligo_unknown_predefined_type of Raw.constr | `Concrete_pascaligo_unsupported_non_var_pattern of Raw.pattern | `Concrete_pascaligo_only_constructors of Raw.pattern - | `Concrete_pascaligo_unsupported_pattern_type of Raw.pattern list + | `Concrete_pascaligo_unsupported_pattern_type of Raw.pattern | `Concrete_pascaligo_unsupported_tuple_pattern of Raw.pattern | `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, Raw.wild) Parser_shared.Utils.nsepseq Raw.reg + | `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_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 | `Concrete_pascaligo_instruction_tracer of Raw.instruction * abs_error | `Concrete_pascaligo_program_tracer of Raw.declaration list * abs_error + | `Concrete_pascaligo_recursive_fun of Location.t + | `Concrete_pascaligo_block_attribute of Raw.block Region.reg ] let unsupported_cst_constr p = `Concrete_pascaligo_unsupported_constant_constr p let unknown_predefined_type name = `Concrete_pascaligo_unknown_predefined_type name let unsupported_non_var_pattern p = `Concrete_pascaligo_unsupported_non_var_pattern p +let untyped_recursive_fun loc = `Concrete_pascaligo_recursive_fun loc let only_constructors p = `Concrete_pascaligo_only_constructors p let unsupported_pattern_type pl = `Concrete_pascaligo_unsupported_pattern_type pl let unsupported_tuple_pattern p = `Concrete_pascaligo_unsupported_tuple_pattern p let unsupported_string_singleton te = `Concrete_pascaligo_unsupported_string_singleton te let unsupported_deep_some_patterns p = `Concrete_pascaligo_unsupported_deep_some_pattern p let unsupported_deep_list_patterns cons = `Concrete_pascaligo_unsupported_deep_list_pattern cons +let unsupported_deep_tuple_patterns t = `Concrete_pascaligo_unsupported_deep_tuple_pattern t let unknown_built_in name = `Concrete_pascaligo_unknown_built_in name let michelson_type_wrong texpr name = `Concrete_pascaligo_michelson_type_wrong (texpr,name) let michelson_type_wrong_arity loc name = `Concrete_pascaligo_michelson_type_wrong_arity (loc,name) let abstracting_instruction_tracer i err = `Concrete_pascaligo_instruction_tracer (i,err) let program_tracer decl err = `Concrete_pascaligo_program_tracer (decl,err) +let block_start_with_attribute block = `Concrete_pascaligo_block_attribute block let rec error_ppformat : display_format:string display_format -> Format.formatter -> abs_error -> unit = @@ -51,7 +57,7 @@ let rec error_ppformat : display_format:string display_format -> | `Concrete_pascaligo_unsupported_pattern_type pl -> Format.fprintf f "@[%a@Currently, only booleans, lists, options, and constructors are supported in patterns@]" - Location.pp_lift (List.fold_left (fun a p -> Region.cover a (Raw.pattern_to_region p)) Region.ghost pl) + Location.pp_lift @@ Raw.pattern_to_region pl | `Concrete_pascaligo_unsupported_tuple_pattern p -> Format.fprintf f "@[%a@The following tuple pattern is not supported yet:@\"%s\"@]" @@ -76,7 +82,11 @@ let rec error_ppformat : display_format:string display_format -> | `Concrete_pascaligo_unsupported_deep_list_pattern cons -> Format.fprintf f "@[%a@Currently, only empty lists and x::y are supported in list patterns@]" - Location.pp_lift @@ cons.Region.region + Location.pp_lift @@ Raw.pattern_to_region cons + | `Concrete_pascaligo_unsupported_deep_tuple_pattern tuple -> + Format.fprintf f + "@[%a@Currently, nested tuple pattern is not suppoerted@]" + Location.pp_lift @@ tuple.Region.region | `Concrete_pascaligo_only_constructors p -> Format.fprintf f "@[%a@Currently, only constructors are supported in patterns@]" @@ -105,6 +115,14 @@ let rec error_ppformat : display_format:string display_format -> "@[%a@Abstracting program@%a@]" Location.pp_lift (List.fold_left (fun a d -> Region.cover a (Raw.declaration_to_region d)) Region.ghost decl) (error_ppformat ~display_format) err + | `Concrete_pascaligo_recursive_fun loc -> + Format.fprintf f + "@[%a@Untyped recursive functions are not supported yet@]" + Location.pp loc + | `Concrete_pascaligo_block_attribute block -> + Format.fprintf f + "@[%a@Attributes have to follow the declaration it is attached@]" + Location.pp_lift @@ block.region ) @@ -125,9 +143,16 @@ let rec error_jsonformat : abs_error -> J.t = fun a -> ("location", `String loc); ("type", t ) ] in json_error ~stage ~content + | `Concrete_pascaligo_recursive_fun loc -> + let message = `String "Untyped recursive functions are not supported yet" in + let loc = Format.asprintf "%a" Location.pp loc in + let content = `Assoc [ + ("message", message ); + ("location", `String loc);] in + json_error ~stage ~content | `Concrete_pascaligo_unsupported_pattern_type pl -> let loc = Format.asprintf "%a" - Location.pp_lift (List.fold_left (fun a p -> Region.cover a (Raw.pattern_to_region p)) Region.ghost pl) in + Location.pp_lift @@ Raw.pattern_to_region pl in let message = `String "Currently, only booleans, lists, options, and constructors are supported in patterns" in let content = `Assoc [ ("message", message ); @@ -172,7 +197,14 @@ let rec error_jsonformat : abs_error -> J.t = fun a -> json_error ~stage ~content | `Concrete_pascaligo_unsupported_deep_list_pattern cons -> let message = `String "Currently, only empty lists and x::y are supported in list patterns" in - let loc = Format.asprintf "%a" Location.pp_lift @@ cons.Region.region in + let loc = Format.asprintf "%a" Location.pp_lift @@ Raw.pattern_to_region cons in + let content = `Assoc [ + ("message", message ); + ("location", `String loc);] in + json_error ~stage ~content + | `Concrete_pascaligo_unsupported_deep_tuple_pattern tuple -> + let message = `String "Currently, nested tuple pattern is not supported" in + let loc = Format.asprintf "%a" Location.pp_lift @@ tuple.Region.region in let content = `Assoc [ ("message", message ); ("location", `String loc);] in @@ -224,4 +256,11 @@ let rec error_jsonformat : abs_error -> J.t = fun a -> ("message", message ); ("location", `String loc); ("children", children) ] in - json_error ~stage ~content \ No newline at end of file + json_error ~stage ~content + | `Concrete_pascaligo_block_attribute block -> + let message = Format.asprintf "Attributes have to follow the declaration it is attached" in + let loc = Format.asprintf "%a" Location.pp_lift block.region in + let content = `Assoc [ + ("message", `String message ); + ("location", `String loc); ] in + json_error ~stage ~content diff --git a/src/passes/02-concrete_to_imperative/pascaligo.ml b/src/passes/02-concrete_to_imperative/pascaligo.ml index 10c6011d8..9bce219b9 100644 --- a/src/passes/02-concrete_to_imperative/pascaligo.ml +++ b/src/passes/02-concrete_to_imperative/pascaligo.ml @@ -1,1058 +1,812 @@ open Errors_pascaligo open Trace -open Ast_imperative -module Raw = Parser.Pascaligo.AST -module SMap = Map.String -(* module ParserLog = Parser_pascaligo.ParserLog *) +module CST = Parser.Pascaligo.AST +module AST = Ast_imperative -open Combinators +open AST let nseq_to_list (hd, tl) = hd :: tl let npseq_to_list (hd, tl) = hd :: (List.map snd tl) -let pseq_to_list = function - None -> [] -| Some lst -> npseq_to_list lst -let get_value : 'a Raw.reg -> 'a = fun x -> x.value +let npseq_to_ne_list (hd, tl) = (hd, List.map snd tl) + +let (<@) f g x = f (g x) open Operators.Concrete_to_imperative.Pascaligo let r_split = Location.r_split -(* Statements can't be simplified in isolation. [a ; b ; c] can get - simplified either as [let x = expr in (b ; c)] if [a] is a [const x - = expr] declaration or as [sequence(a, sequence(b, c))] for - everything else. Because of this, abstracting sequences depend on - their contents. To avoid peeking in their contents, we instead - simplify sequences elements as functions from their next elements - to the actual result. +let return = ok - For [return_let_in], if there is no follow-up element, an error is - triggered, as you can't have [let x = expr in ...] with no [...]. A - cleaner option might be to add a [unit] instead of failing. - - [return_statement] is used for non-let-in statements. - *) - -let return_let_in ?loc binder inline rhs = ok @@ fun expr'_opt -> - match expr'_opt with - | None -> ok @@ e_let_in ?loc binder inline rhs (e_skip ()) - | Some expr' -> ok @@ e_let_in ?loc binder inline rhs expr' - -let return_statement expr = ok @@ fun expr'_opt -> - match expr'_opt with - | None -> ok @@ expr - | Some expr' -> ok @@ e_sequence expr expr' - -let get_t_string_singleton_opt = function - | Raw.TString s -> Some s.value - | _ -> None - - -let rec compile_type_expression (t:Raw.type_expr) : (type_expression , (abs_error)) result = - match t with - TPar x -> compile_type_expression x.value.inside - | TVar v -> ( - let (v,loc) = r_split v in - match type_constants v with - | Some s -> ok @@ make_t ~loc @@ T_constant s - | None -> ok @@ make_t ~loc @@ T_variable (Var.of_name v) - ) - | TFun x -> ( - let (x,loc) = r_split x in - let%bind (a , b) = - let (a , _ , b) = x in - bind_map_pair compile_type_expression (a , b) in - ok @@ make_t ~loc @@ T_arrow {type1=a;type2=b} - ) - | TApp x -> - let (x, loc) = r_split x in - let (name, tuple) = x in - (match name.value with - | "michelson_or" -> - let lst = npseq_to_list tuple.value.inside in - (match lst with - | [a ; b ; c ; d ] -> ( - let%bind b' = - trace_option (michelson_type_wrong t name.value) @@ - get_t_string_singleton_opt b in - let%bind d' = - trace_option (michelson_type_wrong t name.value) @@ - get_t_string_singleton_opt d in - let%bind a' = compile_type_expression a in - let%bind c' = compile_type_expression c in - ok @@ t_michelson_or ~loc a' b' c' d' - ) - | _ -> fail @@ michelson_type_wrong_arity loc name.value) - | "michelson_pair" -> - let lst = npseq_to_list tuple.value.inside in - (match lst with - | [a ; b ; c ; d ] -> ( - let%bind b' = - trace_option (michelson_type_wrong t name.value) @@ - get_t_string_singleton_opt b in - let%bind d' = - trace_option (michelson_type_wrong t name.value) @@ - get_t_string_singleton_opt d in - let%bind a' = compile_type_expression a in - let%bind c' = compile_type_expression c in - ok @@ t_michelson_pair ~loc a' b' c' d' - ) - | _ -> fail @@ michelson_type_wrong_arity loc name.value) - | _ -> - let lst = npseq_to_list tuple.value.inside in - let%bind lst = - bind_list @@ List.map compile_type_expression lst in (** TODO: fix constant and operator*) - let%bind cst = - trace_option (unknown_predefined_type name) @@ - type_operators name.value in - ok @@ t_operator ~loc cst lst ) - | TProd p -> - let%bind tpl = compile_list_type_expression - @@ npseq_to_list p.value in - ok tpl - | TRecord r -> - let (r,loc ) = r_split r in - let aux = fun (x, y) -> - let%bind y = compile_type_expression y in - ok (x, y) - in - let order = fun i (x,y) -> - ((x,i),y) - in - let apply = - fun (x:Raw.field_decl Raw.reg) -> (x.value.field_name.value, x.value.field_type) in - let%bind lst = bind_list - @@ List.map aux - @@ List.mapi order - @@ List.map apply - @@ npseq_to_list r.ne_elements in - let m = List.fold_left (fun m ((x,i), y) -> LMap.add (Label x) {field_type=y;field_decl_pos=i} m) LMap.empty lst in - ok @@ make_t ~loc @@ T_record m - | TSum s -> - let (s,loc) = r_split s in - let aux i (v:Raw.variant Raw.reg) = - let args = - match v.value.arg with - None -> [] - | Some (_, TProd product) -> npseq_to_list product.value - | Some (_, t_expr) -> [t_expr] in - let%bind te = compile_list_type_expression @@ args in - ok ((v.value.constr.value,i), te) - in - let%bind lst = bind_list - @@ List.mapi aux - @@ npseq_to_list s in - let m = List.fold_left (fun m ((x,i), y) -> CMap.add (Constructor x) {ctor_type=y;ctor_decl_pos=i} m) CMap.empty lst in - ok @@ make_t ~loc @@ T_sum m - | TString _s -> fail @@ unsupported_string_singleton t - -and compile_list_type_expression (lst:Raw.type_expr list) : (type_expression , (abs_error)) result = - match lst with - | [] -> ok @@ t_unit () - | [hd] -> compile_type_expression hd - | lst -> - let%bind lst = bind_list @@ List.map compile_type_expression lst in - ok @@ t_tuple lst - -let compile_projection : Raw.projection Region.reg -> _ = fun p -> - let (p' , loc) = r_split p in - let var = - let name = Var.of_name p'.struct_name.value in - e_variable name in - let path = p'.field_path in - let path' = - let aux (s:Raw.selection) = - match s with - | FieldName property -> Access_record property.value - | Component index -> (Access_tuple (snd index.value)) +let rec compile_type_expression : CST.type_expr -> _ result = fun te -> + match te with + TSum sum -> + let (nsepseq, loc) = r_split sum in + let lst = npseq_to_list nsepseq in + let aux (variant : CST.variant CST.reg) = + let (v, _) = r_split variant in + let%bind type_expr = bind_map_option (compile_type_expression <@ snd) v.arg in + let type_expr = Option.unopt ~default:(t_unit ()) type_expr in + ok @@ (v.constr.value,type_expr) in - List.map aux @@ npseq_to_list path in - ok @@ e_accessor ~loc var path' + let%bind sum = bind_map_list aux lst in + return @@ t_sum_ez ~loc sum + | TRecord record -> + let (nsepseq, loc) = r_split record in + let lst = npseq_to_list nsepseq.ne_elements in + let aux (field : CST.field_decl CST.reg) = + let (f, _) = r_split field in + let%bind type_expr = compile_type_expression f.field_type in + return @@ (f.field_name.value,type_expr) + in + let%bind record = bind_map_list aux lst in + return @@ t_record_ez ~loc record + | TProd prod -> + let (nsepseq, loc) = r_split prod in + let lst = npseq_to_list nsepseq in + let%bind lst = bind_map_list compile_type_expression lst in + return @@ t_tuple ~loc lst + | TApp app -> + let get_t_string_singleton_opt = function + | CST.TString s -> Some s.value + | _ -> None + in + let ((operator,args), loc) = r_split app in + (* this is a bad design, michelson_or and pair should be an operator + see AnnotType *) + (match operator.value with + | "michelson_or" -> + let lst = npseq_to_list args.value.inside in + (match lst with + | [a ; b ; c ; d ] -> ( + let%bind b' = + trace_option (michelson_type_wrong te operator.value) @@ + get_t_string_singleton_opt b in + let%bind d' = + trace_option (michelson_type_wrong te operator.value) @@ + get_t_string_singleton_opt d in + let%bind a' = compile_type_expression a in + let%bind c' = compile_type_expression c in + return @@ t_michelson_or ~loc a' b' c' d' + ) + | _ -> fail @@ michelson_type_wrong_arity loc operator.value) + | "michelson_pair" -> + let lst = npseq_to_list args.value.inside in + (match lst with + | [a ; b ; c ; d ] -> ( + let%bind b' = + trace_option (michelson_type_wrong te operator.value) @@ + get_t_string_singleton_opt b in + let%bind d' = + trace_option (michelson_type_wrong te operator.value) @@ + get_t_string_singleton_opt d in + let%bind a' = compile_type_expression a in + let%bind c' = compile_type_expression c in + return @@ t_michelson_pair ~loc a' b' c' d' + ) + | _ -> fail @@ michelson_type_wrong_arity loc operator.value) + | _ -> + let%bind operators = + trace_option (unknown_predefined_type operator) @@ + type_operators operator.value in + let lst = npseq_to_list args.value.inside in + let%bind lst = bind_map_list compile_type_expression lst in + return @@ t_operator ~loc operators lst + ) + | TFun func -> + let ((input_type,_,output_type), loc) = r_split func in + let%bind input_type = compile_type_expression input_type in + let%bind output_type = compile_type_expression output_type in + return @@ t_function ~loc input_type output_type + | TPar par -> + let (par, _) = r_split par in + let type_expr = par.inside in + compile_type_expression type_expr + | TVar var -> + let (name,loc) = r_split var in + (match type_constants name with + Some const -> return @@ t_constant ~loc const + | None -> return @@ t_variable_ez ~loc name + ) + | TString _s -> fail @@ unsupported_string_singleton te +let compile_selection (selection : CST.selection) = + match selection with + FieldName name -> + let (name, loc) = r_split name in + (Access_record name, loc) + | Component comp -> + let ((_,index), loc) = r_split comp in + (Access_tuple index, loc) -let rec compile_expression (t:Raw.expr) : (expr , (abs_error)) result = - let return x = ok x in - match t with - | EAnnot a -> ( - let par, loc = r_split a in - let expr, _, type_expr = par.inside in - let%bind expr' = compile_expression expr in - let%bind type_expr' = compile_type_expression type_expr in - return @@ e_annotation ~loc expr' type_expr' +let rec compile_expression : CST.expr -> (AST.expr , Errors_pascaligo.abs_error) result = fun e -> + let compile_tuple_expression (tuple_expr : CST.tuple_expr) = + let (lst, loc) = r_split tuple_expr in + let%bind lst = bind_map_list compile_expression @@ npseq_to_list lst.inside in + match lst with + hd::[] -> return hd + | lst -> return @@ e_tuple ~loc lst + in + let compile_path (path : CST.path) = + match path with + Name var -> + let (var, loc) = r_split var in + return @@ e_variable_ez ~loc var + | Path proj -> + let (proj, loc) = r_split proj in + let (var, _loc_var) = r_split proj.struct_name in + let var = e_variable_ez ~loc var in + let (sels, _) = List.split @@ List.map compile_selection @@ npseq_to_list proj.field_path in + return @@ e_accessor var sels + in + let compile_bin_op (op_type : AST.constant') (op : _ CST.bin_op CST.reg) = + let (op, loc) = r_split op in + let%bind a = compile_expression op.arg1 in + let%bind b = compile_expression op.arg2 in + return @@ e_constant ~loc op_type [a; b] + in + let compile_un_op (op_type : AST.constant') (op : _ CST.un_op CST.reg) = + let (op, loc) = r_split op in + let%bind arg = compile_expression op.arg in + return @@ e_constant ~loc op_type [arg] + in + match e with + EVar var -> + let (var, loc) = r_split var in + (match constants var with + Some const -> return @@ e_constant ~loc const [] + | None -> return @@ e_variable_ez ~loc var ) - | EVar c -> ( - let (c', loc) = r_split c in - match constants c' with - | None -> return @@ e_variable ~loc (Var.of_name c.value) - | Some s -> return @@ e_constant ~loc s [] - ) - | ECall x -> ( - let ((f, args), loc) = r_split x in - let (args, args_loc) = r_split args in - let args' = npseq_to_list args.inside in - match f with - | EVar name -> ( - let (f_name , f_loc) = r_split name in - match constants f_name with - | None -> - let%bind arg = compile_tuple_expression ~loc:args_loc args' in - return @@ e_application ~loc (e_variable ~loc:f_loc (Var.of_name f_name)) arg - | Some s -> - let%bind lst = bind_map_list compile_expression args' in - return @@ e_constant ~loc s lst - ) - | f -> ( - let%bind f' = compile_expression f in - let%bind arg = compile_tuple_expression ~loc:args_loc args' in - return @@ e_application ~loc f' arg - ) - ) - | EPar x -> compile_expression x.value.inside + | EPar par -> compile_expression par.value.inside | EUnit reg -> let loc = Location.lift reg in - return @@ e_literal ~loc Literal_unit - | EBytes x -> - let (x' , loc) = r_split x in - return @@ e_literal ~loc (Literal_bytes (Hex.to_bytes @@ snd x')) - | ETuple tpl -> - let (tpl' , loc) = r_split tpl in - compile_tuple_expression ~loc @@ npseq_to_list tpl'.inside - | ERecord r -> - let%bind fields = bind_list - @@ List.map (fun ((k : _ Raw.reg), v) -> let%bind v = compile_expression v in ok (k.value, v)) - @@ List.map (fun (x:Raw.field_assignment Raw.reg) -> - (x.value.field_name, x.value.field_expr)) - @@ npseq_to_list r.value.ne_elements in - let aux prev (k, v) = SMap.add k v prev in - return @@ e_record (List.fold_left aux SMap.empty fields) - | EProj p -> compile_projection p - | EUpdate u -> compile_update u - | EConstr (ConstrApp c) -> ( - let ((c, args) , loc) = r_split c in - match args with - None -> - return @@ e_constructor ~loc c.value (e_unit ()) - | Some args -> - let args, args_loc = r_split args in - let%bind arg = - compile_tuple_expression ~loc:args_loc - @@ npseq_to_list args.inside in - return @@ e_constructor ~loc c.value arg - ) - | EConstr (SomeApp a) -> - let ((_, args) , loc) = r_split a in - let (args , args_loc) = r_split args in - let%bind arg = - compile_tuple_expression ~loc:args_loc - @@ npseq_to_list args.inside in - return @@ e_constant ~loc C_SOME [arg] - | EConstr (NoneExpr reg) -> ( - let loc = Location.lift reg in - return @@ e_none ~loc () - ) - | EArith (Add c) -> - compile_binop "ADD" c - | EArith (Sub c) -> - compile_binop "SUB" c - | EArith (Mult c) -> - compile_binop "TIMES" c - | EArith (Div c) -> - compile_binop "DIV" c - | EArith (Mod c) -> - compile_binop "MOD" c - | EArith (Int n) -> ( - let (n , loc) = r_split n in - let n = snd n in - return @@ e_literal ~loc (Literal_int n) - ) - | EArith (Nat n) -> ( - let (n , loc) = r_split n in - let n = snd @@ n in - return @@ e_literal ~loc (Literal_nat n) - ) - | EArith (Mutez n) -> ( - let (n , loc) = r_split n in - let n = snd @@ n in - return @@ e_literal ~loc (Literal_mutez n) + return @@ e_unit ~loc () + | EBytes bytes -> + let (bytes, loc) = r_split bytes in + let (_s,b) = bytes in + return @@ e_bytes_hex ~loc b + | EString str ->( + match str with + Cat c -> + let (op,loc) = r_split c in + let%bind a = compile_expression op.arg1 in + let%bind b = compile_expression op.arg2 in + return @@ e_constant ~loc C_CONCAT [a;b] + | String str -> + let (str, loc) = r_split str in + return @@ e_string ~loc str + | Verbatim str -> + let (str, loc) = r_split str in + return @@ e_verbatim ~loc str ) - | EArith (Neg e) -> compile_unop "NEG" e - | EString (String s) -> - let (s , loc) = r_split s in - return @@ e_literal ~loc (Literal_string (Standard s)) - | EString (Verbatim v) -> - let (v , loc) = r_split v in - return @@ e_literal ~loc (Literal_string (Verbatim v)) - | EString (Cat bo) -> - let (bo , loc) = r_split bo in - let%bind sl = compile_expression bo.arg1 in - let%bind sr = compile_expression bo.arg2 in - return @@ e_string_cat ~loc sl sr - | ELogic l -> compile_logic_expression l - | EList l -> compile_list_expression l - | ESet s -> compile_set_expression s - | ECond c -> - let (c , loc) = r_split c in - let%bind expr = compile_expression c.test in - let%bind match_true = compile_expression c.ifso in - let%bind match_false = compile_expression c.ifnot in - return @@ e_cond ~loc expr match_true match_false - - | ECase c -> ( - let (c , loc) = r_split c in - let%bind e = compile_expression c.expr in - let%bind lst = - let aux (x : Raw.expr Raw.case_clause) = - let%bind expr = compile_expression x.rhs in - ok (x.pattern, expr) in - bind_list - @@ List.map aux - @@ List.map get_value - @@ npseq_to_list c.cases.value in - let%bind cases = compile_cases lst in - return @@ e_matching ~loc e cases + | EArith arth -> + ( match arth with + Add plus -> compile_bin_op C_ADD plus + | Sub minus -> compile_bin_op C_SUB minus + | Mult times -> compile_bin_op C_MUL times + | Div slash -> compile_bin_op C_DIV slash + | Mod mod_ -> compile_bin_op C_MOD mod_ + | Neg minus -> compile_un_op C_NEG minus + | Int i -> + let ((_,i), loc) = r_split i in + return @@ e_int_z ~loc i + | Nat n -> + let ((_,n), loc) = r_split n in + return @@ e_nat_z ~loc n + | Mutez mtez -> + let ((_,mtez), loc) = r_split mtez in + return @@ e_mutez_z ~loc mtez ) - | EMap (MapInj mi) -> ( - let (mi , loc) = r_split mi in - let%bind lst = - let lst = List.map get_value @@ pseq_to_list mi.elements in - let aux : Raw.binding -> (expression * expression, (abs_error)) result = - fun b -> - let%bind src = compile_expression b.source in - let%bind dst = compile_expression b.image in - ok (src, dst) in - bind_map_list aux lst in - return @@ e_map ~loc lst + | ELogic logic -> ( + match logic with + BoolExpr be -> ( + match be with + Or or_ -> compile_bin_op C_OR or_ + | And and_ -> compile_bin_op C_AND and_ + | Not not_ -> compile_un_op C_NOT not_ + | True reg -> let loc = Location.lift reg in return @@ e_true ~loc () + | False reg -> let loc = Location.lift reg in return @@ e_false ~loc () ) - | EMap (BigMapInj mi) -> ( - let (mi , loc) = r_split mi in - let%bind lst = - let lst = List.map get_value @@ pseq_to_list mi.elements in - let aux : Raw.binding -> (expression * expression, (abs_error)) result = - fun b -> - let%bind src = compile_expression b.source in - let%bind dst = compile_expression b.image in - ok (src, dst) in - bind_map_list aux lst in - return @@ e_big_map ~loc lst + | CompExpr ce -> ( + match ce with + Lt lt -> compile_bin_op C_LT lt + | Leq le -> compile_bin_op C_LE le + | Gt gt -> compile_bin_op C_GT gt + | Geq ge -> compile_bin_op C_GE ge + | Equal eq -> compile_bin_op C_EQ eq + | Neq ne -> compile_bin_op C_NEQ ne ) - | EMap (MapLookUp lu) -> ( - let (lu , loc) = r_split lu in - let%bind path = match lu.path with - | Name v -> ( - let (v , loc) = r_split v in - return @@ e_variable ~loc (Var.of_name v) - ) - | Path p -> compile_projection p + ) + (* This case is due to a bad besign of our constant it as to change + with the new typer so LIGO-684 on Jira *) + | ECall {value=(EVar var,args);region} -> + let loc = Location.lift region in + let (var, loc_var) = r_split var in + (match constants var with + Some const -> + let (args, _) = r_split args in + let%bind args = bind_map_list compile_expression @@ npseq_to_list args.inside in + return @@ e_constant ~loc const args + | None -> + let func = e_variable_ez ~loc:loc_var var in + let%bind args = compile_tuple_expression args in + return @@ e_application ~loc func args + ) + | ECall call -> + let ((func, args), loc) = r_split call in + let%bind func = compile_expression func in + let%bind args = compile_tuple_expression args in + return @@ e_application ~loc func args + | ETuple lst -> + compile_tuple_expression lst + | ERecord record -> + let (record, loc) = r_split record in + let aux (fa : CST.field_assignment CST.reg) = + let (fa, _) = r_split fa in + let (name, _) = r_split fa.field_name in + let%bind expr = compile_expression fa.field_expr in + return (name, expr) + in + let%bind record = bind_map_list aux @@ npseq_to_list record.ne_elements in + return @@ e_record_ez ~loc record + | EProj proj -> + let (proj, loc) = r_split proj in + let (var, _loc_var) = r_split proj.struct_name in + let var = e_variable_ez ~loc var in + let (sels, _) = List.split @@ List.map compile_selection @@ npseq_to_list proj.field_path in + return @@ e_accessor var sels + | EUpdate update -> + let (update, _loc) = r_split update in + let%bind record = compile_path update.record in + let (updates, _loc) = r_split update.updates in + let aux (up : CST.field_path_assignment CST.reg) = + let (up, loc) = r_split up in + let path = up.field_path in + let%bind expr = compile_expression up.field_expr in + let path = (match path with + Name var -> [Access_record var.value] + | Path proj -> + let (proj, _) = r_split proj in + let (path, _) = List.split @@ List.map compile_selection @@ npseq_to_list proj.field_path in + (Access_record proj.struct_name.value)::path + ) in - let%bind index = compile_expression lu.index.value.inside in - return @@ e_accessor ~loc path [Access_map index] - ) - | EFun f -> - let (f , loc) = r_split f in - let%bind (_ty_opt, f') = compile_fun_expression ~loc f - in return @@ f' - | ECodeInj ci -> - let ci, loc = r_split ci in - let language = ci.language.value.value in - let%bind code = compile_expression ci.code - in ok @@ e_raw_code ~loc language code - -and compile_update (u: Raw.update Region.reg) = - let u, loc = r_split u in - let name, path = compile_path u.record in - let var = e_variable (Var.of_name name) in - let record = if path = [] then var else e_accessor var path in - let updates = u.updates.value.ne_elements in - let%bind updates' = - let aux (f: Raw.field_path_assignment Raw.reg) = - let f, _ = r_split f in - let%bind expr = compile_expression f.field_expr - in ok (compile_path f.field_path, expr) - in bind_map_list aux @@ npseq_to_list updates in - let aux ur ((var, path), expr) = - ok @@ e_update ~loc ur (Access_record var :: path) expr - in bind_fold_list aux record updates' - -and compile_logic_expression (t:Raw.logic_expr) : (expression , (abs_error)) result = - match t with - | BoolExpr (False reg) -> - ok @@ e_bool ~loc:(Location.lift reg) false - | BoolExpr (True reg) -> - ok @@ e_bool ~loc:(Location.lift reg) true - | BoolExpr (Or b) -> - compile_binop "OR" b - | BoolExpr (And b) -> - compile_binop "AND" b - | BoolExpr (Not b) -> - compile_unop "NOT" b - | CompExpr (Lt c) -> - compile_binop "LT" c - | CompExpr (Gt c) -> - compile_binop "GT" c - | CompExpr (Leq c) -> - compile_binop "LE" c - | CompExpr (Geq c) -> - compile_binop "GE" c - | CompExpr (Equal c) -> - compile_binop "EQ" c - | CompExpr (Neq c) -> - compile_binop "NEQ" c - -and compile_list_expression (t:Raw.list_expr) : (expression , (abs_error)) result = - let return x = ok x in - match t with - ECons c -> - compile_binop "CONS" c - | EListComp lst -> - let (lst , loc) = r_split lst in - let%bind lst' = - bind_map_list compile_expression @@ - pseq_to_list lst.elements in - return @@ e_list ~loc lst' - | ENil reg -> - let loc = Location.lift reg in + return (path, expr, loc) + in + let%bind updates = bind_map_list aux @@ npseq_to_list updates.ne_elements in + let aux e (path, update, loc) = e_update ~loc e path update in + return @@ List.fold_left aux record updates + | EFun func -> + let compile_param (param : CST.param_decl) = + match param with + ParamConst p -> + let (p, _) = r_split p in + let (var, _loc) = r_split p.var in + let%bind p_type = bind_map_option (compile_type_expression <@ snd) p.param_type in + return (var, p_type) + | ParamVar p -> + let (p, _) = r_split p in + let (var, _loc) = r_split p.var in + let%bind p_type = bind_map_option (compile_type_expression <@ snd) p.param_type in + return (var, p_type) + in + let (func, loc) = r_split func in + let (param, loc_par) = r_split func.param in + let%bind param = bind_map_list compile_param @@ npseq_to_list param.inside in + let (param, param_type) = List.split param in + let%bind ret_type = bind_map_option (compile_type_expression <@ snd )func.ret_type in + let%bind body = compile_expression func.return in + let (lambda, fun_type) = match param_type with + ty::[] -> + e_lambda ~loc (Var.of_name @@ List.hd param) ty ret_type body, + Option.map (fun (a,b) -> t_function a b)@@ Option.bind_pair (ty,ret_type) + (* Cannot be empty *) + | lst -> + let lst = Option.bind_list lst in + let input_type = Option.map t_tuple lst in + let binder = Var.fresh ~name:"parameter" () in + e_lambda ~loc binder input_type (ret_type) @@ + e_matching_tuple_ez ~loc:loc_par (e_variable binder) param lst body, + Option.map (fun (a,b) -> t_function a b)@@ Option.bind_pair (input_type,ret_type) + in + return @@ Option.unopt ~default:lambda @@ + Option.map (e_annotation ~loc lambda) fun_type + | EConstr (SomeApp some) -> + let ((_, arg), loc) = r_split some in + let%bind args = compile_tuple_expression arg in + return @@ e_some ~loc args + | EConstr (NoneExpr reg) -> + let loc = Location.lift reg in + return @@ e_none ~loc () + | EConstr (ConstrApp constr) -> + let ((constr,args_o), loc) = r_split constr in + let%bind args_o = bind_map_option compile_tuple_expression args_o in + let args = Option.unopt ~default:(e_unit ~loc:(Location.lift constr.region) ()) args_o in + return @@ e_constructor ~loc constr.value args + | ECase case -> + let (case, loc) = r_split case in + let%bind matchee = compile_expression case.expr in + let (cases, _) = r_split case.cases in + let%bind cases = compile_matching_expr compile_expression @@ npseq_to_ne_list cases in + return @@ e_matching ~loc matchee cases + | EAnnot annot -> + let (annot, loc) = r_split annot in + let (expr, _, ty) = annot.inside in + let%bind expr = compile_expression expr in + let%bind ty = compile_type_expression ty in + return @@ e_annotation ~loc expr ty + | ECond cond -> + let (cond, loc) = r_split cond in + let%bind test = compile_expression cond.test in + let%bind then_clause = compile_expression cond.ifso in + let%bind else_clause = compile_expression cond.ifnot in + return @@ e_cond ~loc test then_clause else_clause + | EList lst -> ( + match lst with + ECons cons -> + let (cons, loc) = r_split cons in + let%bind a = compile_expression cons.arg1 in + let%bind b = compile_expression cons.arg2 in + return @@ e_constant ~loc C_CONS [a; b] + | EListComp lc -> + let (lc,loc) = r_split lc in + let lst = + Option.unopt ~default:[] @@ + Option.map npseq_to_list lc.elements + in + let%bind lst = bind_map_list compile_expression lst in + return @@ e_list ~loc lst + | ENil nil -> + let loc = Location.lift nil in return @@ e_list ~loc [] - -and compile_set_expression (t:Raw.set_expr) : (expression , (abs_error)) result = - match t with - | SetMem x -> ( - let (x' , loc) = r_split x in - let%bind set' = compile_expression x'.set in - let%bind element' = compile_expression x'.element in - ok @@ e_constant ~loc C_SET_MEM [ element' ; set' ] + (* Is seems that either ENil is redondant or EListComp should be an nsepseq and not a sepseq *) ) - | SetInj x -> ( - let (x' , loc) = r_split x in - let elements = pseq_to_list x'.elements in - let%bind elements' = bind_map_list compile_expression elements in - ok @@ e_set ~loc elements' + | ESet set -> ( + match set with + SetInj si -> + let (si, loc) = r_split si in + let set = + Option.unopt ~default:[] @@ + Option.map npseq_to_list si.elements + in + let%bind set = bind_map_list compile_expression set in + return @@ e_set ~loc set + | SetMem sm -> + let (sm, loc) = r_split sm in + let%bind set = compile_expression sm.set in + let%bind elem = compile_expression sm.element in + return @@ e_constant ~loc C_SET_MEM [elem;set] ) + | EMap map -> ( + match map with + MapLookUp mlu -> -and compile_binop (name:string) (t:_ Raw.bin_op Region.reg) : (expression , (abs_error)) result = - let return x = ok x in - let (t , loc) = r_split t in - let%bind a = compile_expression t.arg1 in - let%bind b = compile_expression t.arg2 in - let%bind name = trace_option (unknown_built_in name) @@ constants name in - return @@ e_constant ~loc name [ a ; b ] + let (mlu, loc) = r_split mlu in + let%bind path = compile_path mlu.path in + let (index, _) = r_split mlu.index in + let%bind index = compile_expression index.inside in + return @@ e_accessor ~loc path [Access_map index] + | MapInj mij -> + let (mij, loc) = r_split mij in + let lst = Option.unopt ~default:[] @@ + Option.map npseq_to_list mij.elements in + let aux (binding : CST.binding CST.reg) = + let (binding, _) = r_split binding in + let%bind key = compile_expression binding.source in + let%bind value = compile_expression binding.image in + return (key,value) + in + let%bind map = bind_map_list aux lst in + return @@ e_map ~loc map + | BigMapInj mij -> + let (mij, loc) = r_split mij in + let lst = Option.unopt ~default:[] @@ + Option.map npseq_to_list mij.elements in + let aux (binding : CST.binding CST.reg) = + let (binding, _) = r_split binding in + let%bind key = compile_expression binding.source in + let%bind value = compile_expression binding.image in + return (key,value) + in + let%bind map = bind_map_list aux lst in + return @@ e_big_map ~loc map + ) + | ECodeInj ci -> + let (ci, loc) = r_split ci in + let (language, _) = r_split ci.language in + let (language, _) = r_split language in + let%bind code = compile_expression ci.code in + return @@ e_raw_code ~loc language code -and compile_unop (name:string) (t:_ Raw.un_op Region.reg) : (expression , (abs_error)) result = - let return x = ok x in - let (t , loc) = r_split t in - let%bind a = compile_expression t.arg in - let%bind name = trace_option (unknown_built_in name) @@ constants name in - return @@ e_constant ~loc name [ a ] - -and compile_tuple_expression ?loc (lst:Raw.expr list) : (expression , (abs_error)) result = - let return x = ok x in - match lst with - | [] -> return @@ e_literal Literal_unit - | [hd] -> compile_expression hd - | lst -> - let%bind lst = bind_list @@ List.map compile_expression lst - in return @@ e_tuple ?loc lst - -and compile_data_declaration : Raw.data_decl -> _ result = - fun t -> - match t with - | LocalVar x -> - let (x , loc) = r_split x in - let name = x.name.value in - let%bind t = compile_type_expression x.var_type in - let%bind expression = compile_expression x.init in - return_let_in ~loc (Var.of_name name, Some t) false expression - | LocalConst x -> - let (x , loc) = r_split x in - let name = x.name.value in - let%bind t = compile_type_expression x.const_type in - let%bind expression = compile_expression x.init in - let inline = - match x.attributes with - None -> false - | Some {value; _} -> - npseq_to_list value.ne_elements - |> List.exists (fun Region.{value; _} -> value = "\"inline\"") - in return_let_in ~loc (Var.of_name name, Some t) inline expression - | LocalFun f -> - let (f , loc) = r_split f in - let%bind (binder, expr) = compile_fun_decl ~loc f in - let inline = - match f.attributes with - None -> false - | Some {value; _} -> - npseq_to_list value.ne_elements - |> List.exists (fun Region.{value; _} -> value = "\"inline\"") - in return_let_in ~loc binder inline expr - -and compile_param : - Raw.param_decl -> (string * type_expression, (abs_error)) result = - fun t -> - match t with - | ParamConst c -> - let c = c.value in - let param_name = c.var.value in - let%bind type_expression = compile_type_expression c.param_type in - ok (param_name , type_expression) - | ParamVar v -> - let c = v.value in - let param_name = c.var.value in - let%bind type_expression = compile_type_expression c.param_type in - ok (param_name , type_expression) - -and compile_fun_decl : - loc:_ -> Raw.fun_decl -> - ((expression_variable * type_expression option) * expression , (abs_error)) result = - fun ~loc x -> - let open! Raw in - let {kwd_recursive;fun_name; param; ret_type; block_with; - return; attributes} : fun_decl = x in - let inline = - match attributes with - None -> false - | Some {value; _} -> - npseq_to_list value.ne_elements - |> List.exists (fun Region.{value; _} -> value = "\"inline\"") in - let statements = - match block_with with - | Some (block,_) -> npseq_to_list block.value.statements - | None -> [] +and compile_matching_expr : type a.(a -> _ result) -> a CST.case_clause CST.reg List.Ne.t -> _ = +fun compiler cases -> + let compile_pattern pattern = return pattern in + let compile_simple_pattern (pattern : CST.pattern) = + match pattern with + PVar var -> + let (var, _) = r_split var in + return @@ Var.of_name var + | _ -> fail @@ unsupported_non_var_pattern pattern in - (match param.value.inside with - a, [] -> ( - let%bind input = compile_param a in - let (binder , input_type) = input in - let%bind instructions = compile_statement_list statements in - let%bind result = compile_expression return in - let%bind output_type = compile_type_expression ret_type in - let body = instructions in - let%bind result = - let aux prec cur = cur (Some prec) in - bind_fold_right_list aux result body in - let binder = Var.of_name binder in - let fun_name = Var.of_name fun_name.value in - let fun_type = t_function input_type output_type in - let expression : expression = - e_lambda ~loc binder (Some input_type)(Some output_type) result in - let%bind expression = match kwd_recursive with - None -> ok @@ expression | - Some _ -> ok @@ e_recursive ~loc fun_name fun_type - @@ {binder;input_type=Some input_type; output_type= Some output_type; result} + let compile_list_pattern (cases : (CST.pattern * _) list) = + match cases with + [(PList PNil _, match_nil);(PList PCons cons, econs)] + | [(PList PCons cons, econs);(PList PNil _, match_nil)] -> + let (cons,_) = r_split cons in + let%bind (hd,tl) = match snd @@ List.split (snd cons) with + tl::[] -> return (fst cons,tl) + | _ -> fail @@ unsupported_deep_list_patterns @@ fst cons in - ok ((fun_name, Some fun_type), expression) - ) - | lst -> ( - let lst = npseq_to_list lst in - (* TODO wrong, should be fresh? *) - let arguments_name = Var.of_name "arguments" in - let%bind params = bind_map_list compile_param lst in - let (binder , input_type) = - let type_expression = t_tuple (List.map snd params) in - (arguments_name , type_expression) in - let%bind tpl_declarations = - let aux = fun i (param, type_expr) -> - let expr = - e_accessor (e_variable arguments_name) [Access_record (string_of_int i)] in - let type_variable = Some type_expr in - let ass = return_let_in (Var.of_name param , type_variable) inline expr in - ass - in - bind_list @@ List.mapi aux params in - let%bind instructions = compile_statement_list statements in - let%bind result = compile_expression return in - let%bind output_type = compile_type_expression ret_type in - let body = tpl_declarations @ instructions in - let%bind result = - let aux prec cur = cur (Some prec) in - bind_fold_right_list aux result body in - let fun_name = Var.of_name fun_name.value in - let fun_type = t_function input_type output_type in - let expression : expression = - e_lambda ~loc binder (Some input_type)(Some output_type) result in - let%bind expression = match kwd_recursive with - None -> ok @@ expression | - Some _ -> ok @@ e_recursive ~loc fun_name fun_type - @@ {binder;input_type=Some input_type; output_type= Some output_type; result} - in - ok ((fun_name, Some fun_type), expression) - ) - ) - -and compile_fun_expression : - loc:_ -> Raw.fun_expr -> (type_expression option * expression , (abs_error)) result = - fun ~loc x -> - let open! Raw in - let {param; ret_type; return; _} : fun_expr = x in - let statements = [] in - (match param.value.inside with - a, [] -> ( - let%bind input = compile_param a in - let (binder , input_type) = input in - let%bind instructions = compile_statement_list statements in - let%bind result = compile_expression return in - let%bind output_type = compile_type_expression ret_type in - - let body = instructions in - let%bind result = - let aux prec cur = cur (Some prec) in - bind_fold_right_list aux result body in - let binder = Var.of_name binder in - let fun_type = t_function input_type output_type in - let expression = - e_lambda ~loc binder (Some input_type)(Some output_type) result - in - ok (Some fun_type , expression) - ) - | lst -> ( - let lst = npseq_to_list lst in - (* TODO wrong, should be fresh? *) - let arguments_name = Var.of_name "arguments" in - let%bind params = bind_map_list compile_param lst in - let (binder , input_type) = - let type_expression = t_tuple (List.map snd params) in - (arguments_name , type_expression) in - let%bind tpl_declarations = - let aux = fun i (param, param_type) -> - let expr = e_accessor (e_variable arguments_name) [Access_tuple (Z.of_int i)] in - let type_variable = Some param_type in - let ass = return_let_in (Var.of_name param , type_variable) false expr in - ass - in - bind_list @@ List.mapi aux params in - let%bind instructions = compile_statement_list statements in - let%bind result = compile_expression return in - let%bind output_type = compile_type_expression ret_type in - let body = tpl_declarations @ instructions in - let%bind result = - let aux prec cur = cur (Some prec) in - bind_fold_right_list aux result body in - let fun_type = t_function input_type output_type in - let expression = - e_lambda ~loc binder (Some input_type)(Some output_type) result - in - ok (Some fun_type , expression) - ) - ) - -and compile_statement_list statements = - let open Raw in - let rec hook acc = function - [] -> acc - | [Attr _] -> - (* Detached attributes are erased. TODO: Warning. *) - acc - | Attr _ :: (Attr _ :: _ as statements) -> - (* Detached attributes are erased. TODO: Warning. *) - hook acc statements - | Attr decl :: Data (LocalConst {value; region}) :: statements -> - let new_const = - Data (LocalConst {value = {value with attributes = Some decl}; region}) - in hook acc (new_const :: statements) - | Attr decl :: Data (LocalFun {value; region}) :: statements -> - let new_fun = - Data (LocalFun {value = {value with attributes = Some decl}; region}) - in hook acc (new_fun :: statements) - | Attr _ :: statements -> - (* Detached attributes are erased. TODO: Warning. *) - hook acc statements - | Instr i :: statements -> - hook (compile_instruction i :: acc) statements - | Data d :: statements -> - hook (compile_data_declaration d :: acc) statements - in bind_list @@ hook [] (List.rev statements) - -and compile_single_instruction : Raw.instruction -> ((_ -> (expression , (abs_error)) result), (abs_error)) result = - fun t -> - match t with - | ProcCall x -> ( - let (f, args) , loc = r_split x in - let args, args_loc = r_split args in - let args' = npseq_to_list args.inside in - match f with - | EVar name -> ( - let (f_name , f_loc) = r_split name in - match constants f_name with - | None -> - let%bind arg = compile_tuple_expression ~loc:args_loc args' in - return_statement @@ e_application ~loc (e_variable ~loc:f_loc (Var.of_name f_name)) arg - | Some s -> - let%bind lst = bind_map_list compile_expression args' in - return_statement @@ e_constant ~loc s lst + let%bind (hd,tl) = bind_map_pair compile_simple_pattern (hd,tl) in + let match_cons = (hd,tl,econs) in + return (match_nil,match_cons) + | _ -> fail @@ unsupported_deep_list_patterns @@ fst @@ List.hd cases + in + let compile_simple_tuple_pattern (tuple : CST.tuple_pattern) = + let (lst, _) = r_split tuple in + match lst.inside with + hd,[] -> compile_simple_pattern hd + | _ -> fail @@ unsupported_deep_tuple_patterns tuple + in + let compile_constr_pattern (constr : CST.pattern) = + match constr with + PConstr c -> + ( match c with + PUnit _ -> + fail @@ unsupported_pattern_type constr + | PFalse _ -> return (Constructor "false", Var.of_name "_") + | PTrue _ -> return (Constructor "true", Var.of_name "_") + | PNone _ -> return (Constructor "None", Var.of_name "_") + | PSomeApp some -> + let (some,_) = r_split some in + let (_, pattern) = some in + let (pattern,_) = r_split pattern in + let%bind pattern = compile_simple_pattern pattern.inside in + return (Constructor "Some", pattern) + | PConstrApp constr -> + let (constr, _) = r_split constr in + let (constr, patterns) = constr in + let (constr, _) = r_split constr in + let%bind pattern = bind_map_option compile_simple_tuple_pattern patterns in + let pattern = Option.unopt ~default:(Var.of_name "_") pattern in + return (Constructor constr, pattern) ) - | f -> ( - let%bind f' = compile_expression f in - let%bind arg = compile_tuple_expression ~loc:args_loc args' in - return_statement @@ e_application ~loc f' arg - ) - ) - | Skip reg -> ( - let loc = Location.lift reg in - return_statement @@ e_skip ~loc () - ) - | Loop (While l) -> - let (wl, loc) = r_split l in - let%bind condition = compile_expression wl.cond in - let%bind body = compile_block wl.block.value in - let%bind body = body @@ None in - return_statement @@ e_while ~loc condition body - | Loop (For (ForInt fi)) -> ( - let (fi,loc) = r_split fi in - let binder = Var.of_name fi.assign.value.name.value in - let%bind start = compile_expression fi.assign.value.expr in - let%bind bound = compile_expression fi.bound in - let%bind step = match fi.step with - | None -> ok @@ e_int_z Z.one - | Some (_, step) -> compile_expression step in - let%bind body = compile_block fi.block.value in - let%bind body = body @@ None in - return_statement @@ e_for ~loc binder start bound step body - ) - | Loop (For (ForCollect fc)) -> - let (fc,loc) = r_split fc in - let binder = (Var.of_name fc.var.value, Option.map (fun x -> Var.of_name (snd x:string Raw.reg).value) fc.bind_to) in - let%bind collection = compile_expression fc.expr in - let collection_type = match fc.collection with - | Map _ -> Map - | Set _ -> Set - | List _ -> List - in - let%bind body = compile_block fc.block.value in - let%bind body = body @@ None in - return_statement @@ e_for_each ~loc binder collection collection_type body - | Cond c -> ( - let (c , loc) = r_split c in - let%bind expr = compile_expression c.test in - let%bind match_true = match c.ifso with - ClauseInstr i -> - compile_single_instruction i - | ClauseBlock b -> - match b with - LongBlock {value; _} -> - compile_block value - | ShortBlock {value; _} -> - compile_statements @@ fst value.inside in - let%bind match_false = match c.ifnot with - ClauseInstr i -> - compile_single_instruction i - | ClauseBlock b -> - match b with - LongBlock {value; _} -> - compile_block value - | ShortBlock {value; _} -> - compile_statements @@ fst value.inside in + | _ -> fail @@ unsupported_pattern_type constr + in + let aux (case : a CST.case_clause CST.reg) = + let (case, _loc) = r_split case in + let%bind pattern = compile_pattern case.pattern in + let%bind expr = compiler case.rhs in + return (pattern, expr) + in + let%bind cases = bind_map_ne_list aux cases in + match cases with + | (PVar var, expr), [] -> + let (var, _) = r_split var in + let var = Var.of_name var in + return @@ AST.Match_variable (var, None, expr) + | (PTuple tuple, _expr), [] -> + fail @@ unsupported_tuple_pattern @@ CST.PTuple tuple + | (PList _, _), _ -> + let%bind (match_nil,match_cons) = compile_list_pattern @@ List.Ne.to_list cases in + return @@ AST.Match_list {match_nil;match_cons} + | (PConstr _,_), _ -> + let (pattern, lst) = List.split @@ List.Ne.to_list cases in + let%bind constrs = bind_map_list compile_constr_pattern pattern in + return @@ AST.Match_variant (List.combine constrs lst) + | (p, _), _ -> fail @@ unsupported_pattern_type p - let%bind match_true = match_true None in - let%bind match_false = match_false None in - return_statement @@ e_cond ~loc expr match_true match_false - ) - | Assign a -> ( - let (a , loc) = r_split a in - let%bind value_expr = compile_expression a.rhs in - match a.lhs with - | Path path -> - let name , path' = compile_path path in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name path' value_expr - | MapPath v -> - let v' = v.value in - let%bind (varname,map,path) = match v'.path with - | Name name -> - ok (name.value , - e_variable (Var.of_name name.value), []) - | Path p -> - let name, p' = compile_path v'.path in - let%bind accessor = compile_projection p in - ok @@ (name, accessor, p') in - let%bind key_expr = - compile_expression v'.index.value.inside in - let expr' = e_map_add key_expr value_expr map in - let varname = Var.of_name varname in - return_statement @@ e_assign ~loc varname path expr' - ) - | CaseInstr c -> ( - let (c , loc) = r_split c in - let%bind expr = compile_expression c.expr in - let%bind cases = - let aux (x : Raw.if_clause Raw.case_clause Raw.reg) = - let%bind case_clause = - match x.value.rhs with - ClauseInstr i -> - compile_single_instruction i - | ClauseBlock b -> - match b with - LongBlock {value; _} -> - compile_block value - | ShortBlock {value; _} -> - compile_statements @@ fst value.inside in - let%bind case_clause = case_clause None in - ok (x.value.pattern, case_clause) in - bind_list - @@ List.map aux - @@ npseq_to_list c.cases.value in - let%bind m = compile_cases cases in - return_statement @@ e_matching ~loc expr m - ) - | RecordPatch r -> - let reg = r.region in - let r, loc = r_split r in - let aux (fa: Raw.field_assignment Raw.reg) : Raw.field_path_assignment Raw.reg = - {value = {field_path = Name fa.value.field_name; - assignment = fa.value.assignment; - field_expr = fa.value.field_expr}; - region = fa.region} in - let update : Raw.field_path_assignment Raw.reg Raw.ne_injection Raw.reg = { - value = Raw.map_ne_injection aux r.record_inj.value; - region = r.record_inj.region} in - let u : Raw.update = { - record = r.path; - kwd_with = r.kwd_with; - updates = update} in - let%bind expr = compile_update {value=u;region=reg} in - let name, access_path = compile_path r.path in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name access_path expr - | MapPatch patch -> - let map_p, loc = r_split patch in - let name, access_path = compile_path map_p.path in - let%bind inj = bind_list - @@ List.map (fun (x:Raw.binding Region.reg) -> - let x = x.value in - let (key, value) = x.source, x.image in - let%bind key' = compile_expression key in - let%bind value' = compile_expression value - in ok @@ (key', value') - ) - @@ npseq_to_list map_p.map_inj.value.ne_elements in - (match inj with - | [] -> return_statement @@ e_skip ~loc () - | _ :: _ -> - let assigns = List.fold_right - (fun (key, value) map -> (e_map_add key value map)) - inj - (e_accessor ~loc (e_variable (Var.of_name name)) access_path) - and name = Var.of_name name in - return_statement @@ e_assign ~loc name access_path assigns) - | SetPatch patch -> ( - let setp, loc = r_split patch in - let name, access_path = compile_path setp.path in - let%bind inj = - bind_list @@ - List.map compile_expression @@ - npseq_to_list setp.set_inj.value.ne_elements in - match inj with - | [] -> return_statement @@ e_skip ~loc () - | _ :: _ -> - let assigns = List.fold_right - (fun hd s -> e_constant C_SET_ADD [hd ; s]) - inj (e_accessor ~loc (e_variable (Var.of_name name)) access_path) in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name access_path assigns - ) - | MapRemove r -> - let (v , loc) = r_split r in - let key = v.key in - let%bind (name,map,path) = match v.map with - | Name v -> ok (v.value , e_variable (Var.of_name v.value) , []) - | Path p -> - let name, p' = compile_path v.map in - let%bind accessor = compile_projection p in - ok @@ (name , accessor , p') - in - let%bind key' = compile_expression key in - let expr = e_constant ~loc C_MAP_REMOVE [key' ; map] in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name path expr - | SetRemove r -> - let set_rm, loc = r_split r in - let%bind (name, set, path) = - match set_rm.set with - | Name v -> - ok (v.value, e_variable (Var.of_name v.value), []) - | Path path -> - let name, p' = compile_path set_rm.set in - let%bind accessor = compile_projection path in - ok @@ (name, accessor, p') in - let%bind removed' = compile_expression set_rm.element in - let expr = e_constant ~loc C_SET_REMOVE [removed' ; set] in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name path expr +let compile_attribute_declaration = function + None -> return false +| Some _ -> return true -and compile_path : Raw.path -> string * access list = function - Raw.Name v -> v.value, [] -| Raw.Path {value; _} -> - let Raw.{struct_name; field_path; _} = value in - let var = struct_name.value in - let path = List.map compile_selection @@ npseq_to_list field_path - in var, path +let compile_parameters (params : CST.parameters) = + let compile_param_decl (param : CST.param_decl) = + match param with + ParamConst pc -> + let (pc, _loc) = r_split pc in + let (var, _) = r_split pc.var in + let%bind param_type = bind_map_option (compile_type_expression <@ snd) pc.param_type in + return (var, param_type) + | ParamVar pv -> + let (pv, _loc) = r_split pv in + let (var, _) = r_split pv.var in + let%bind param_type = bind_map_option (compile_type_expression <@ snd) pv.param_type in + return (var, param_type) + in + let (params, _loc) = r_split params in + let params = npseq_to_list params.inside in + bind_map_list compile_param_decl params -and compile_selection : Raw.selection -> access = function - FieldName property -> Access_record property.value -| Component index -> Access_tuple (snd index.value) +let rec compile_instruction : ?next: AST.expression -> CST.instruction -> _ result = fun ?next instruction -> + let return expr = match next with + Some e -> return @@ e_sequence expr e + | None -> return expr + in + let compile_tuple_expression (tuple_expr : CST.tuple_expr) = + let (lst, loc) = r_split tuple_expr in + let%bind lst = bind_map_list compile_expression @@ npseq_to_list lst.inside in + match lst with + hd::[] -> return hd + | lst -> return @@ e_tuple ~loc lst + in + let compile_if_clause : ?next:AST.expression -> CST.if_clause -> _ = fun ?next if_clause -> + match if_clause with + ClauseInstr i -> compile_instruction ?next i + | ClauseBlock (LongBlock block) -> compile_block ?next block + | ClauseBlock (ShortBlock block) -> + (* This looks like it should be the job of the parser *) + let CST.{lbrace; inside; rbrace} = block.value in + let region = block.region in + let enclosing = CST.Block (Region.ghost, lbrace, rbrace) + and (statements,terminator) = inside in + let value = CST.{enclosing;statements;terminator} in + let block : _ CST.reg = {value; region} in + compile_block ?next block -and compile_cases : (Raw.pattern * expression) list -> (matching_expr , (abs_error)) result = fun t -> - let open Raw in - let get_var (t:Raw.pattern) = - match t with - | PVar v -> ok v.value - | p -> fail @@ unsupported_non_var_pattern p in - let get_tuple (t: Raw.pattern) = - match t with - | PTuple v -> npseq_to_list v.value.inside - | x -> [ x ] in - let get_single (t: Raw.pattern) = - let t' = get_tuple t in - let%bind () = - Assert.assert_list_size (unsupported_tuple_pattern t) t' 1 in - ok (List.hd t') in - let get_toplevel (t : Raw.pattern) = - match t with - | PList PCons x -> ( - let (x' , lst) = x.value in - match lst with - | [] -> ok x' - | _ -> ok t - ) - | pattern -> ok pattern in - let get_constr (t: Raw.pattern) = - match t with - | PConstr (PConstrApp v) -> ( - let value = v.value in - match value with - | constr, None -> - ok (constr.value, "unit") - | _ -> - let const, pat_opt = v.value in - let%bind pat = - trace_option (unsupported_cst_constr t) @@ - pat_opt in - let%bind single_pat = get_single (PTuple pat) in - let%bind var = get_var single_pat in - ok (const.value , var) - ) - | _ -> fail @@ only_constructors t in - let%bind patterns = - let aux (x , y) = - let%bind x' = get_toplevel x in - ok (x' , y) - in bind_map_list aux t in - match patterns with - | [(PConstr PFalse _ , f) ; (PConstr PTrue _ , t)] - | [(PConstr PTrue _ , t) ; (PConstr PFalse _ , f)] -> - ok @@ Match_variant ([((Constructor "true", Var.of_name "_"), t); ((Constructor "false", Var.of_name "_"), f)]) - | [(PConstr PSomeApp v , some) ; (PConstr PNone _ , none)] - | [(PConstr PNone _ , none) ; (PConstr PSomeApp v , some)] -> ( - let (_, v) = v.value in - let%bind v = match v.value.inside with - | PVar v -> ok v.value - | p -> fail @@ unsupported_deep_some_patterns p in - ok @@ Match_option {match_none = none ; match_some = (Var.of_name v, some) } + in + let compile_path : CST.path -> _ = fun path -> + match path with + Name var -> + let (var,loc) = r_split var in + let str = e_variable_ez ~loc var in + ok (str, var, []) + | Path proj -> + let (proj, loc) = r_split proj in + let (var, loc_var) = r_split proj.struct_name in + let path = List.map compile_selection @@ npseq_to_list proj.field_path in + let (path, _) = List.split path in + let str = e_accessor ~loc (e_variable_ez ~loc:loc_var var) path in + ok (str, var, path) + in + let compile_lhs : CST.lhs -> _ = fun lhs -> + match lhs with + | Path path -> + let%bind (_, var, path) = compile_path path in + ok @@ (var, path) + | MapPath (mlu) -> + let (mlu, _loc) = r_split mlu in + 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 -> + let (c, loc) = r_split c in + let%bind test = compile_expression c.test in + let%bind ifso = compile_if_clause c.ifso in + let%bind ifnot = compile_if_clause c.ifnot in + return @@ e_cond ~loc test ifso ifnot + | CaseInstr ci -> + let (ci, loc) = r_split ci in + let%bind matchee = compile_expression ci.expr in + let%bind cases = compile_matching_expr compile_if_clause @@ npseq_to_ne_list ci.cases.value in + return @@ e_matching ~loc matchee cases + | Assign a -> + let (a,loc) = r_split a in + let%bind (var,path) = compile_lhs a.lhs in + let%bind rhs = compile_expression a.rhs in + return @@ e_assign_ez ~loc var path rhs + | Loop (While wl) -> + let (wl, loc) = r_split wl in + let%bind cond = compile_expression wl.cond in + let%bind body = compile_block wl.block in + return @@ e_while ~loc cond body + | Loop (For (ForInt fl)) -> + let (fl, loc) = r_split fl in + let (binder, _) = r_split fl.binder in + let%bind start = compile_expression fl.init in + let%bind bound = compile_expression fl.bound in + let%bind increment = Option.unopt ~default:(ok @@ e_int_z Z.one) @@ + Option.map (compile_expression <@ snd) fl.step + in + let%bind body = compile_block fl.block in + return @@ e_for_ez ~loc binder start bound increment body + | Loop (For (ForCollect el)) -> + let (el, loc) = r_split el in + let binder = + let (key, _) = r_split el.var in + let value = Option.map (fun x -> fst (r_split (snd x))) el.bind_to in + (key,value) + in + let%bind collection = compile_expression el.expr in + let (collection_type, _) = match el.collection with + Map loc -> (Map, loc) | Set loc -> (Set, loc) | List loc -> (List, loc) + in + let%bind body = compile_block el.block in + return @@ e_for_each_ez ~loc binder collection collection_type body + | ProcCall {value=(EVar var,args);region} -> + let loc = Location.lift region in + let (var, loc_var) = r_split var in + (match constants var with + Some const -> + let (args, _) = r_split args in + let%bind args = bind_map_list compile_expression @@ npseq_to_list args.inside in + return @@ e_constant ~loc const args + | None -> + let func = e_variable_ez ~loc:loc_var var in + let%bind args = compile_tuple_expression args in + return @@ e_application ~loc func args ) - | [(PList PCons c, cons) ; (PList (PNil _), nil)] - | [(PList (PNil _), nil) ; (PList PCons c, cons)] -> - let%bind (a, b) = - match c.value with - | a, [(_, b)] -> - let%bind a = get_var a in - let%bind b = get_var b in - ok (a, b) - | _ -> fail @@ unsupported_deep_list_patterns c + | ProcCall pc -> + let (pc, loc) = r_split pc in + let (func, args) = pc in + let%bind func = compile_expression func in + let%bind args = compile_tuple_expression args in + return @@ e_application ~loc func args + | Skip s -> + let loc = Location.lift s in + return @@ e_skip ~loc () + | RecordPatch rp -> + let (rp, loc) = r_split rp in + let%bind (record, var, path) = compile_path rp.path in + let (updates, _) = r_split rp.record_inj in + let updates = npseq_to_list updates.ne_elements in + let aux record (update: CST.field_assignment CST.reg) = + let (update,loc) = r_split update in + let path = [Access_record update.field_name.value] in + let%bind expr = compile_expression update.field_expr in + ok @@ e_update ~loc record path expr + in + let%bind new_record = bind_fold_list aux record updates in + return @@ e_assign_ez ~loc var path @@ new_record + | MapPatch mp -> + let (mp, loc) = r_split mp in + let%bind (map, var, path) = compile_path mp.path in + let (updates, _) = r_split mp.map_inj in + let updates = npseq_to_list updates.ne_elements in + let aux map (update: CST.binding CST.reg) = + let (update,loc) = r_split update in + let%bind key = compile_expression update.source in + let%bind value = compile_expression update.image in + ok @@ e_map_add ~loc key value map + in + let%bind new_map = bind_fold_list aux map updates in + return @@ e_assign_ez ~loc var path @@ new_map + | SetPatch sp -> + let (sp, loc) = r_split sp in + let%bind (set, var, path) = compile_path sp.path in + let (updates, _) = r_split sp.set_inj in + let updates = npseq_to_list updates.ne_elements in + let aux set (update: CST.expr) = + let%bind key = compile_expression update in + ok @@ e_constant ~loc C_SET_ADD [key; set] + in + let%bind new_map = bind_fold_list aux set updates in + return @@ e_assign_ez ~loc var path @@ new_map + | MapRemove mr -> + let (mr, loc) = r_split mr in + let%bind (map, var, path) = compile_path mr.map in + let%bind key = compile_expression mr.key in + return @@ e_assign_ez ~loc var path @@ + e_constant ~loc C_MAP_REMOVE [key;map] + | SetRemove sr -> + let (sr, loc) = r_split sr in + let%bind (set, var, path) = compile_path sr.set in + let%bind ele = compile_expression sr.element in + return @@ e_assign_ez ~loc var path @@ + e_constant ~loc C_SET_REMOVE [ele;set] - in - ok @@ Match_list {match_cons = (Var.of_name a, Var.of_name b, cons) ; match_nil = nil} +and compile_data_declaration : next:AST.expression -> ?attr:CST.attr_decl -> CST.data_decl -> _ = fun ~next ?attr data_decl -> + let return loc name type_ init = + let%bind attr = compile_attribute_declaration attr in + ok @@ e_let_in_ez ~loc name type_ attr init next in + match data_decl with + LocalConst const_decl -> + let (cd, loc) = r_split const_decl in + let (name, _) = r_split cd.name in + let%bind type_ = bind_map_option (compile_type_expression <@ snd)cd.const_type in + let%bind init = compile_expression cd.init in + return loc name type_ init + | LocalVar var_decl -> + let (vd, loc) = r_split var_decl in + let (name, _) = r_split vd.name in + let%bind type_ = bind_map_option (compile_type_expression <@ snd) vd.var_type in + let%bind init = compile_expression vd.init in + return loc name type_ init + | LocalFun fun_decl -> + let (fun_decl,loc) = r_split fun_decl in + let%bind (fun_name,fun_type,_attr,lambda) = compile_fun_decl fun_decl in + return loc fun_name fun_type lambda + +and compile_statement : ?next:AST.expression -> CST.attr_decl option -> CST.statement -> _ result = fun ?next attr statement -> + match statement with + Instr i -> + let%bind i = compile_instruction ?next i in + return (Some i, None) + | Data dd -> + let next = Option.unopt ~default:(e_skip ()) next in + let%bind dd = compile_data_declaration ~next ?attr dd in + return (Some dd, None) + | Attr at -> return (next, Some at) + +and compile_block : ?next:AST.expression -> CST.block CST.reg -> _ result = fun ?next block -> + 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) + in + let%bind (block', _) = bind_fold_right_list aux (next,None) statements in + match block' with + Some block -> return block + | None -> fail @@ block_start_with_attribute block + +and compile_fun_decl ({kwd_recursive; fun_name; param; ret_type; block_with; return=r; attributes}: CST.fun_decl) = + let%bind attr = compile_attribute_declaration attributes in + let (fun_name, loc) = r_split fun_name in + let%bind ret_type = bind_map_option (compile_type_expression <@ snd) ret_type in + let%bind param = compile_parameters param in + let%bind r = compile_expression r in + let (param, param_type) = List.split param in + let%bind body = Option.unopt ~default:(return r) @@ + Option.map (compile_block ~next:r <@ fst) block_with + in + (* This handle the parameter case *) + let (lambda,fun_type) = (match param_type with + ty::[] -> + let lambda : AST.lambda = { + binder = (Var.of_name @@ List.hd param); + input_type = ty ; + output_type = ret_type ; + result = body; + } in + lambda,Option.map (fun (a,b) -> t_function a b)@@ Option.bind_pair (ty,ret_type) | lst -> - let%bind constrs = - trace_strong (unsupported_pattern_type (List.map fst lst)) @@ - let aux (x , y) = - let%bind x' = - get_constr x in - ok (x' , y) in - bind_map_list aux lst in - ok @@ ez_match_variant constrs + let lst = Option.bind_list lst in + let input_type = Option.map t_tuple lst in + let binder = Var.fresh ~name:"parameter" () in + let lambda : AST.lambda = { + binder; + input_type = input_type; + output_type = ret_type; + result = e_matching_tuple_ez (e_variable binder) param lst body; + } in + lambda,Option.map (fun (a,b) -> t_function a b)@@ Option.bind_pair (input_type,ret_type) + ) + in + (* This handle the recursion *) + let%bind func = match kwd_recursive with + Some reg -> + let%bind fun_type = trace_option (untyped_recursive_fun loc) @@ fun_type in + return @@ e_recursive_ez ~loc:(Location.lift reg) fun_name fun_type lambda + | None -> + return @@ make_e ~loc @@ E_lambda lambda + in + return (fun_name,fun_type, attr, func) -and compile_instruction : Raw.instruction -> ((_ -> (expression, (abs_error)) result) , (abs_error)) result = - fun t -> trace (abstracting_instruction_tracer t) @@ compile_single_instruction t +(* Currently attributes are badly proccess, some adaptation are made to accomodate this + maked as ATR *) +let compile_declaration : (CST.attr_decl option * _) -> CST.declaration -> _ = fun (attr, lst) decl -> + let return ?attr reg decl = + return (attr, (Location.wrap ~loc:(Location.lift reg) decl)::lst) in (*ATR*) + match decl with + TypeDecl {value={name; type_expr; _};region} -> + (* Todo : if attr isn't none, send warning *) + let (name,_) = r_split name in + let%bind type_expr = compile_type_expression type_expr in + return region @@ AST.Declaration_type (Var.of_name name, type_expr) + | ConstDecl {value={name; const_type; init; attributes=_};region} -> + let (name, _) = r_split name in + let attributes = attr in (*ATR*) + let%bind const_type = bind_map_option (compile_type_expression <@ snd) const_type in + let%bind init = compile_expression init in + let%bind attr = compile_attribute_declaration attributes in + return region @@ AST.Declaration_constant (Var.of_name name, const_type,attr,init) + | FunDecl {value;region} -> + let value = {value with attributes = attr} in (*ATR*) + let%bind (fun_name,fun_type,attr,lambda) = compile_fun_decl value in + return region @@ AST.Declaration_constant (Var.of_name fun_name, fun_type, attr, lambda) + | AttrDecl decl -> ok (Some decl, lst) (*ATR*) -and compile_statements : Raw.statements -> ((_ -> (expression,(abs_error)) result) , (abs_error)) result = - fun statements -> - let lst = npseq_to_list statements in - let%bind fs = compile_statement_list lst in - let aux : _ -> (expression option -> (expression, (abs_error)) result) -> _ = - fun prec cur -> - let%bind res = cur prec - in ok @@ Some res in - ok @@ fun (expr' : _ option) -> - let%bind ret = bind_fold_right_list aux expr' fs in - ok @@ Option.unopt_exn ret - -and compile_block : Raw.block -> ((_ -> (expression , (abs_error)) result) , (abs_error)) result = - fun t -> compile_statements t.statements - - -and compile_declaration_list declarations : (declaration Location.wrap list, (abs_error)) result = - let open Raw in - let rec hook acc = function - [] -> acc - | [AttrDecl _] -> - (* Detached attributes are erased. TODO: Warning. *) - acc - | AttrDecl _ :: (AttrDecl _ :: _ as declarations) -> - (* Detached attributes are erased. TODO: Warning. *) - hook acc declarations - | AttrDecl decl :: ConstDecl {value; region} :: declarations -> - let new_const = - ConstDecl {value = {value with attributes = Some decl}; region} - in hook acc (new_const :: declarations) - | AttrDecl decl :: FunDecl {value; region} :: declarations -> - let new_fun = - FunDecl {value = {value with attributes = Some decl}; region} - in hook acc (new_fun :: declarations) - | AttrDecl _ :: declarations -> - (* Detached attributes are erased. TODO: Warning. *) - hook acc declarations - | TypeDecl decl :: declarations -> - let decl, loc = r_split decl in - let {name; type_expr} : Raw.type_decl = decl in - let%bind type_expression = compile_type_expression type_expr in - let new_decl = - Declaration_type (Var.of_name name.value, type_expression) in - let res = Location.wrap ~loc new_decl in - hook (bind_list_cons res acc) declarations - | ConstDecl decl :: declarations -> - let compile_const_decl = - fun {name;const_type; init; attributes} -> - let%bind expression = compile_expression init in - let%bind t = compile_type_expression const_type in - let type_annotation = Some t in - let inline = - match attributes with - None -> false - | Some {value; _} -> - npseq_to_list value.ne_elements - |> List.exists (fun Region.{value; _} -> value = "\"inline\"") in - let new_decl = - Declaration_constant - (Var.of_name name.value, type_annotation, inline, expression) - in ok new_decl in - let%bind res = - bind_map_location compile_const_decl (Location.lift_region decl) - in hook (bind_list_cons res acc) declarations - | FunDecl fun_decl :: declarations -> - let decl, loc = r_split fun_decl in - let%bind ((name, ty_opt), expr) = compile_fun_decl ~loc decl in - let inline = - match fun_decl.value.attributes with - None -> false - | Some {value; _} -> - npseq_to_list value.ne_elements - |> List.exists (fun Region.{value; _} -> value = "\"inline\"") in - let new_decl = - Declaration_constant (name, ty_opt, inline, expr) in - let res = Location.wrap ~loc new_decl in - hook (bind_list_cons res acc) declarations - in hook (ok @@ []) (List.rev declarations) - -let compile_program : Raw.ast -> (program , (abs_error)) result = +(* This should be change to the commented function when attributes are fixed +let compile_program : CST.ast -> _ result = fun t -> + bind_map_list compile_declaration @@ nseq_to_list t.decl + *) +let compile_program : CST.ast -> _ result = fun t -> - let declarations = nseq_to_list t.decl in - trace (program_tracer declarations) @@ - compile_declaration_list declarations + let declarations = List.rev @@ nseq_to_list t.decl in + let attr = (None, []) in + let%bind (_, declarations) = bind_fold_list compile_declaration attr declarations in + return declarations diff --git a/src/passes/02-concrete_to_imperative/pascaligo.mli b/src/passes/02-concrete_to_imperative/pascaligo.mli index 0c7730c0f..9fecca4dc 100644 --- a/src/passes/02-concrete_to_imperative/pascaligo.mli +++ b/src/passes/02-concrete_to_imperative/pascaligo.mli @@ -1,15 +1,14 @@ (** Converts PascaLIGO programs to the Simplified Abstract Syntax Tree. *) open Trace -open Ast_imperative -module Raw = Parser.Pascaligo.AST -module SMap = Map.String +module AST = Ast_imperative +module CST = Parser.Pascaligo.AST (** Convert a concrete PascaLIGO expression AST to the imperative expression AST used by the compiler. *) -val compile_expression : Raw.expr -> (expr , Errors_pascaligo.abs_error) result +val compile_expression : CST.expr -> (AST.expr , Errors_pascaligo.abs_error) result (** Convert a concrete PascaLIGO program AST to the miperative program AST used by the compiler. *) -val compile_program : Raw.ast -> (program, Errors_pascaligo.abs_error) result +val compile_program : CST.ast -> (AST.program, Errors_pascaligo.abs_error) result diff --git a/src/passes/03-self_ast_imperative/helpers.ml b/src/passes/03-self_ast_imperative/helpers.ml index 8831b8588..e9847f2b7 100644 --- a/src/passes/03-self_ast_imperative/helpers.ml +++ b/src/passes/03-self_ast_imperative/helpers.ml @@ -97,8 +97,13 @@ let rec fold_expression : ('a, 'err) folder -> 'a -> expression -> ('a, 'err) re let ab = (expr1,expr2) in let%bind res = bind_fold_pair self init' ab in ok res - | E_assign {variable=_;access_path=_;expression} -> - let%bind res = self init' expression in + | E_assign {variable=_;access_path;expression} -> + let aux res a = match a with + | Access_map e -> self res e + | _ -> ok res + in + let%bind res = bind_fold_list aux init' access_path in + let%bind res = self res expression in ok res | E_for {body; _} -> let%bind res = self init' body in @@ -246,6 +251,13 @@ let rec map_expression : 'err exp_mapper -> expression -> (expression, 'err) res return @@ E_sequence {expr1;expr2} ) | E_assign {variable;access_path;expression} -> ( + let aux a = match a with + | Access_map e -> + let%bind e = self e in + ok @@ Access_map e + | e -> ok @@ e + in + let%bind access_path = bind_map_list aux access_path in let%bind expression = self expression in return @@ E_assign {variable;access_path;expression} ) @@ -437,7 +449,14 @@ let rec fold_map_expression : ('a, 'err) fold_mapper -> 'a -> expression -> ('a ok (res, return @@ E_sequence {expr1;expr2}) ) | E_assign {variable;access_path;expression} -> - let%bind (res, expression) = self init' expression in + let aux res a = match a with + | Access_map e -> + let%bind (res,e) = self res e in + ok @@ (res,Access_map e) + | e -> ok @@ (res,e) + in + let%bind (res, access_path) = bind_fold_map_list aux init' access_path in + let%bind (res, expression) = self res expression in ok (res, return @@ E_assign {variable;access_path;expression}) | E_for {binder; start; final; increment; body} -> let%bind (res, body) = self init' body in diff --git a/src/passes/03-self_ast_imperative/none_variant.ml b/src/passes/03-self_ast_imperative/none_variant.ml index 77f44b691..8a26de73d 100644 --- a/src/passes/03-self_ast_imperative/none_variant.ml +++ b/src/passes/03-self_ast_imperative/none_variant.ml @@ -7,4 +7,11 @@ let peephole_expression : expression -> (expression , self_ast_imperative_error) match e.expression_content with | E_constructor {constructor=Constructor "Some";element=e} -> return @@ E_constant {cons_name=C_SOME;arguments=[ e ]} | E_constructor {constructor=Constructor "None"; _} -> return @@ E_constant {cons_name=C_NONE ; arguments=[]} + | E_matching {matchee;cases=Match_variant [((Constructor "None", _),none_expr);((Constructor "Some", some),some_expr)]} + | E_matching {matchee;cases=Match_variant [((Constructor "Some", some),some_expr);((Constructor "None", _),none_expr)]} + -> + let match_none = none_expr in + let match_some = some,some_expr in + let cases = Match_option {match_none;match_some} in + return @@ E_matching {matchee;cases} | e -> return e diff --git a/src/passes/06-sugar_to_core/sugar_to_core.ml b/src/passes/06-sugar_to_core/sugar_to_core.ml index e5b91b124..de1e9f3b7 100644 --- a/src/passes/06-sugar_to_core/sugar_to_core.ml +++ b/src/passes/06-sugar_to_core/sugar_to_core.ml @@ -122,7 +122,7 @@ let rec compile_expression : I.expression -> (O.expression , sugar_to_core_error | I.Access_record a -> ok @@ O.e_record_update ?loc s (Label a) e | I.Access_map k -> let%bind k = compile_expression k in - ok @@ O.e_constant ?loc C_UPDATE [k;O.e_some (e);s] + ok @@ O.e_constant ?loc C_MAP_ADD [k;e;s] in let aux (s, e : O.expression * _) lst = let%bind s' = accessor ~loc:s.location s lst in diff --git a/src/stages/1-ast_imperative/combinators.ml b/src/stages/1-ast_imperative/combinators.ml index 94432921b..d52a4bdef 100644 --- a/src/stages/1-ast_imperative/combinators.ml +++ b/src/stages/1-ast_imperative/combinators.ml @@ -20,25 +20,24 @@ let t_key_hash ?loc () : type_expression = make_t ?loc @@ T_constant (TC_key_ let t_timestamp ?loc () : type_expression = make_t ?loc @@ T_constant (TC_timestamp) let t_option ?loc o : type_expression = make_t ?loc @@ T_operator (TC_option, [o]) let t_list ?loc t : type_expression = make_t ?loc @@ T_operator (TC_list, [t]) -let t_variable ?loc n : type_expression = make_t ?loc @@ T_variable (Var.of_name n) +let t_constant ?loc c : type_expression = make_t ?loc @@ T_constant c +let t_variable ?loc n : type_expression = make_t ?loc @@ T_variable n +let t_variable_ez ?loc n : type_expression = t_variable ?loc @@ Var.of_name n + +let t_record ?loc record : type_expression = make_t ?loc @@ T_record record let t_record_ez ?loc lst = let lst = List.mapi (fun i (k, v) -> (Label k, {field_type=v;field_decl_pos=i})) lst in - let m = LMap.of_list lst in - make_t ?loc @@ T_record (m:field_content label_map) -let t_record ?loc m : type_expression = - let lst = Map.String.to_kv_list m in - t_record_ez ?loc lst + let record = LMap.of_list lst in + t_record ?loc (record:field_content label_map) let t_tuple ?loc lst : type_expression = make_t ?loc @@ T_tuple lst let t_pair ?loc (a , b) : type_expression = t_tuple ?loc [a; b] -let ez_t_sum ?loc (lst:(string * type_expression) list) : type_expression = +let t_sum ?loc sum : type_expression = make_t ?loc @@ T_sum sum +let t_sum_ez ?loc (lst:(string * type_expression) list) : type_expression = let aux (prev,i) (k, v) = (CMap.add (Constructor k) {ctor_type=v;ctor_decl_pos=i} prev, i+1) in let (map,_) = List.fold_left aux (CMap.empty,0) lst in - make_t ?loc @@ T_sum (map: ctor_content constructor_map) -let t_sum ?loc m : type_expression = - let lst = Map.String.to_kv_list m in - ez_t_sum ?loc lst + t_sum ?loc (map: ctor_content constructor_map) let t_operator ?loc op lst: type_expression = make_t ?loc @@ T_operator (op, lst) let t_annoted ?loc ty str : type_expression = make_t ?loc @@ T_annoted (ty, str) @@ -86,14 +85,13 @@ let e'_bytes b : expression_content option = let bytes = Hex.to_bytes (`Hex b) in Some (E_literal (Literal_bytes bytes)) with _ -> None -let e_bytes_hex ?loc b : expression option = +let e_bytes_hex_ez ?loc b : expression option = match e'_bytes b with | Some e' -> Some (make_e ?loc e') | None -> None -let e_bytes_raw ?loc (b: bytes) : expression = - make_e ?loc @@ E_literal (Literal_bytes b) -let e_bytes_string ?loc (s: string) : expression = - make_e ?loc @@ E_literal (Literal_bytes (Hex.to_bytes (Hex.of_string s))) +let e_bytes_raw ?loc (b: bytes) : expression = make_e ?loc @@ E_literal (Literal_bytes b) +let e_bytes_hex ?loc b : expression = e_bytes_raw ?loc @@ Hex.to_bytes b +let e_bytes_string ?loc (s: string) : expression = e_bytes_hex ?loc @@ Hex.of_string s let e_some ?loc s : expression = make_e ?loc @@ E_constant {cons_name = C_SOME; arguments = [s]} let e_none ?loc () : expression = make_e ?loc @@ E_constant {cons_name = C_NONE; arguments = []} let e_string_cat ?loc sl sr : expression = make_e ?loc @@ E_constant {cons_name = C_CONCAT; arguments = [sl ; sr ]} @@ -102,13 +100,18 @@ let e_binop ?loc name a b = make_e ?loc @@ E_constant {cons_name = name ; argum let e_constant ?loc name lst = make_e ?loc @@ E_constant {cons_name=name ; arguments = lst} let e_variable ?loc v = make_e ?loc @@ E_variable v +let e_variable_ez ?loc v = e_variable ?loc @@ Var.of_name v let e_application ?loc a b = make_e ?loc @@ E_application {lamb=a ; args=b} let e_lambda ?loc binder input_type output_type result : expression = make_e ?loc @@ E_lambda {binder; input_type; output_type; result} let e_recursive ?loc fun_name fun_type lambda = make_e ?loc @@ E_recursive {fun_name; fun_type; lambda} -let e_let_in ?loc (binder, ascr) inline rhs let_result = make_e ?loc @@ E_let_in { let_binder = (binder, ascr) ; rhs ; let_result; inline } +let e_recursive_ez ?loc fun_name fun_type lambda = e_recursive ?loc (Var.of_name fun_name) fun_type lambda +let e_let_in ?loc let_binder inline rhs let_result = make_e ?loc @@ E_let_in { let_binder; rhs ; let_result; inline } +let e_let_in_ez ?loc binder ascr inline rhs let_result = e_let_in ?loc (Var.of_name binder, ascr) inline rhs let_result let e_raw_code ?loc language code = make_e ?loc @@ E_raw_code {language; code} let e_constructor ?loc s a : expression = make_e ?loc @@ E_constructor { constructor = Constructor s; element = a} +let e_true ?loc (): expression = e_constructor ?loc "true" @@ e_unit ?loc () +let e_false ?loc (): expression = e_constructor ?loc "false" @@ e_unit ?loc () let e_matching ?loc a b : expression = make_e ?loc @@ E_matching {matchee=a;cases=b} let e_accessor ?loc record path = make_e ?loc @@ E_accessor {record; path} @@ -132,26 +135,28 @@ let e_while ?loc condition body = make_e ?loc @@ E_while {condition; body} let e_for ?loc binder start final increment body = make_e ?loc @@ E_for {binder;start;final;increment;body} let e_for_each ?loc binder collection collection_type body = make_e ?loc @@ E_for_each {binder;collection;collection_type;body} +let e_for_ez ?loc binder start final increment body = e_for ?loc (Var.of_name binder) start final increment body +let e_for_each_ez ?loc (b,bo) collection collection_type body = e_for_each ?loc (Var.of_name b, Option.map Var.of_name bo) collection collection_type body + let e_bool ?loc b : expression = e_constructor ?loc (string_of_bool b) (e_unit ()) -let ez_match_variant (lst : ((string * string) * 'a) list) = - let lst = List.map (fun ((c,n),a) -> ((Constructor c, Var.of_name n), a) ) lst in - Match_variant lst -let e_matching_variant ?loc a (lst : ((string * string)* 'a) list) = - e_matching ?loc a (ez_match_variant lst) - +let e_matching_variant ?loc a lst = e_matching ?loc a @@ Match_variant lst let e_matching_record ?loc m lst ty_opt expr = e_matching ?loc m @@ Match_record (lst,ty_opt, expr) let e_matching_tuple ?loc m lst ty_opt expr = e_matching ?loc m @@ Match_tuple (lst,ty_opt, expr) let e_matching_variable ?loc m var ty_opt expr = e_matching ?loc m @@ Match_variable (var,ty_opt, expr) +let e_matching_tuple_ez ?loc m lst ty_opt expr = + let lst = List.map Var.of_name lst in + e_matching_tuple ?loc m lst ty_opt expr + +let ez_match_variant (lst : ((string * string) * 'a) list) = + let lst = List.map (fun ((c,n),a) -> ((Constructor c, Var.of_name n), a) ) lst in + Match_variant lst + +let e_record ?loc map = make_e ?loc @@ E_record map let e_record_ez ?loc (lst : (string * expr) list) : expression = let map = List.fold_left (fun m (x, y) -> LMap.add (Label x) y m) LMap.empty lst in - make_e ?loc @@ E_record map -let e_record ?loc map = - let lst = Map.String.to_kv_list map in - e_record_ez ?loc lst - - + e_record ?loc map let make_option_typed ?loc e t_opt = match t_opt with @@ -175,8 +180,9 @@ let e_typed_set ?loc lst k = e_annotation ?loc (e_set lst) (t_set k) -let e_assign ?loc variable access_path expression = - make_e ?loc @@ E_assign {variable;access_path;expression} +let e_assign ?loc variable access_path expression = make_e ?loc @@ E_assign {variable;access_path;expression} +let e_assign_ez ?loc variable access_path expression = e_assign ?loc (Var.of_name variable) access_path expression + let get_e_accessor = fun t -> match t with diff --git a/src/stages/1-ast_imperative/combinators.mli b/src/stages/1-ast_imperative/combinators.mli index 170f0a2c0..c03b88de5 100644 --- a/src/stages/1-ast_imperative/combinators.mli +++ b/src/stages/1-ast_imperative/combinators.mli @@ -17,15 +17,17 @@ val t_key_hash : ?loc:Location.t -> unit -> type_expression val t_timestamp : ?loc:Location.t -> unit -> type_expression val t_signature : ?loc:Location.t -> unit -> type_expression val t_list : ?loc:Location.t -> type_expression -> type_expression -val t_variable : ?loc:Location.t -> string -> type_expression +val t_constant : ?loc:Location.t -> type_constant -> type_expression +val t_variable : ?loc:Location.t -> type_variable -> type_expression +val t_variable_ez : ?loc:Location.t -> string -> type_expression val t_pair : ?loc:Location.t -> ( type_expression * type_expression ) -> type_expression val t_tuple : ?loc:Location.t -> type_expression list -> type_expression -val t_record : ?loc:Location.t -> type_expression Map.String.t -> type_expression +val t_record : ?loc:Location.t -> field_content label_map -> type_expression val t_record_ez : ?loc:Location.t -> (string * type_expression) list -> type_expression -val t_sum : ?loc:Location.t -> type_expression Map.String.t -> type_expression -val ez_t_sum : ?loc:Location.t -> ( string * type_expression ) list -> type_expression +val t_sum : ?loc:Location.t -> ctor_content constructor_map -> type_expression +val t_sum_ez : ?loc:Location.t -> ( string * type_expression ) list -> type_expression val t_function : ?loc:Location.t -> type_expression -> type_expression -> type_expression val t_map : ?loc:Location.t -> type_expression -> type_expression -> type_expression @@ -65,8 +67,11 @@ val e_key_hash : ?loc:Location.t -> string -> expression val e_chain_id : ?loc:Location.t -> string -> expression val e_mutez_z : ?loc:Location.t -> Z.t -> expression val e_mutez : ?loc:Location.t -> int -> expression +val e_true : ?loc:Location.t -> unit -> expression +val e_false : ?loc:Location.t -> unit -> expression val e'_bytes : string -> expression_content option -val e_bytes_hex : ?loc:Location.t -> string -> expression option +val e_bytes_hex_ez : ?loc:Location.t -> string -> expression option +val e_bytes_hex : ?loc:Location.t -> Hex.t -> expression val e_bytes_raw : ?loc:Location.t -> bytes -> expression val e_bytes_string : ?loc:Location.t -> string -> expression @@ -78,21 +83,27 @@ val e_map_add : ?loc:Location.t -> expression -> expression -> expression -> ex val e_constant : ?loc:Location.t -> constant' -> expression list -> expression val e_variable : ?loc:Location.t -> expression_variable -> expression +val e_variable_ez : ?loc:Location.t -> string -> expression val e_application : ?loc:Location.t -> expression -> expression -> expression val e_lambda : ?loc:Location.t -> expression_variable -> type_expression option -> type_expression option -> expression -> expression val e_recursive : ?loc:Location.t -> expression_variable -> type_expression -> lambda -> expression +val e_recursive_ez : ?loc:Location.t -> string -> type_expression -> lambda -> expression val e_let_in : ?loc:Location.t -> ( expression_variable * type_expression option ) -> bool -> expression -> expression -> expression +val e_let_in_ez : ?loc:Location.t -> string -> type_expression option -> bool -> expression -> expression -> expression val e_raw_code : ?loc:Location.t -> string -> expression -> expression val e_constructor : ?loc:Location.t -> string -> expression -> expression val e_matching : ?loc:Location.t -> expression -> matching_expr -> expression + val ez_match_variant : ((string * string ) * expression) list -> matching_expr -val e_matching_variant : ?loc:Location.t -> expression -> ((string * string) * expression) list -> expression +val e_matching_variant : ?loc:Location.t -> expression -> ((constructor' * expression_variable) * expression) list -> expression val e_matching_record : ?loc:Location.t -> expression -> (label * expression_variable) list -> type_expression list option -> expression -> expression val e_matching_tuple : ?loc:Location.t -> expression -> expression_variable list -> type_expression list option -> expression -> expression val e_matching_variable: ?loc:Location.t -> expression -> expression_variable -> type_expression option -> expression -> expression -val e_record : ?loc:Location.t -> expr Map.String.t -> expression +val e_matching_tuple_ez: ?loc:Location.t -> expression -> string list -> type_expression list option -> expression -> expression + +val e_record : ?loc:Location.t -> expr label_map -> expression val e_record_ez : ?loc:Location.t -> ( string * expr ) list -> expression val e_accessor : ?loc:Location.t -> expression -> access list -> expression val e_update : ?loc:Location.t -> expression -> access list -> expression -> expression @@ -112,11 +123,15 @@ val e_map : ?loc:Location.t -> ( expression * expression ) list -> expression val e_big_map : ?loc:Location.t -> ( expr * expr ) list -> expression val e_assign : ?loc:Location.t -> expression_variable -> access list -> expression -> expression +val e_assign_ez : ?loc:Location.t -> string -> access list -> expression -> expression val e_while : ?loc:Location.t -> expression -> expression -> expression val e_for : ?loc:Location.t -> expression_variable -> expression -> expression -> expression -> expression -> expression val e_for_each : ?loc:Location.t -> expression_variable * expression_variable option -> expression -> collect_type -> expression -> expression +val e_for_ez : ?loc:Location.t -> string -> expression -> expression -> expression -> expression -> expression +val e_for_each_ez : ?loc:Location.t -> string * string option -> expression -> collect_type -> expression -> expression + val make_option_typed : ?loc:Location.t -> expression -> type_expression option -> expression val e_typed_none : ?loc:Location.t -> type_expression -> expression diff --git a/src/stages/3-ast_core/misc.ml b/src/stages/3-ast_core/misc.ml index ca6519052..239e08c35 100644 --- a/src/stages/3-ast_core/misc.ml +++ b/src/stages/3-ast_core/misc.ml @@ -1,5 +1,59 @@ open Types +open Memory_proto_alpha.Protocol.Alpha_context +let assert_operation_eq (a: packed_internal_operation) (b: packed_internal_operation): unit option = + let Internal_operation {source=sa; operation=oa; nonce=na} = a in + let Internal_operation {source=sb; operation=ob; nonce=nb} = b in + let assert_source_eq sa sb = + let sa = Contract.to_b58check sa in + let sb = Contract.to_b58check sb in + if String.equal sa sb then Some () else None + in + let rec assert_param_eq (pa,pb) = + let open Tezos_micheline.Micheline in + match (pa, pb) with + | Int (la, ia), Int (lb, ib) when la = lb && ia = ib -> Some () + | String (la, sa), String (lb, sb) when la = lb && sa = sb -> Some () + | Bytes (la, ba), Bytes (lb, bb) when la = lb && ba = bb -> Some () + | Prim (la, pa, nla, aa), Prim (lb, pb, nlb, ab) when la = lb && pa = pb -> + let la = List.map assert_param_eq @@ List.combine nla nlb in + let lb = List.map ( fun (sa,sb) -> + if String.equal sa sb then Some () else None) @@ + List.combine aa ab + in + Option.map (fun _ -> ()) @@ Option.bind_list @@ la @ lb + | Seq (la, nla), Seq (lb, nlb) when la = lb -> + Option.map (fun _ -> ()) @@ Option.bind_list @@ List.map assert_param_eq @@ + List.combine nla nlb + | _ -> None + in + let assert_operation_eq (type a b) (oa: a manager_operation) (ob: b manager_operation) = + match (oa, ob) with + | Reveal sa, Reveal sb when sa = sb -> Some () + | Reveal _, _ -> None + | Transaction ta, Transaction tb -> + let aa,pa,ea,da = ta.amount,ta.parameters,ta.entrypoint,ta.destination in + let ab,pb,eb,db = tb.amount,tb.parameters,tb.entrypoint,tb.destination in + Format.printf "amount : %b; p : %b, e: %b, d : %b\n" (aa=ab) (pa=pb) (ea=eb) (da=db) ; + let (pa,pb) = Tezos_data_encoding.Data_encoding.(force_decode pa, force_decode pb) in + Option.bind (fun _ -> Some ()) @@ + Option.bind_list [ + Option.bind (fun (pa,pb) -> assert_param_eq Tezos_micheline.Micheline.(root pa, root pb)) @@ + Option.bind_pair (pa,pb); + if aa = ab && ea = eb && da = db then Some () else None ] + | Transaction _, _ -> None + | Origination _oa, Origination _ob -> Some () + | Origination _, _ -> None + | Delegation da, Delegation db when da = db -> Some () + | Delegation _, _ -> None + in + let assert_nonce_eq na nb = if na = nb then Some () else None in + Option.bind (fun _ -> Some ()) @@ + Option.bind_list [ + assert_source_eq sa sb; + assert_operation_eq oa ob; + assert_nonce_eq na nb] + let assert_literal_eq (a, b : literal * literal) : unit option = match (a, b) with | Literal_int a, Literal_int b when a = b -> Some () @@ -27,7 +81,7 @@ let assert_literal_eq (a, b : literal * literal) : unit option = | Literal_address a, Literal_address b when a = b -> Some () | Literal_address _, Literal_address _ -> None | Literal_address _, _ -> None - | Literal_operation _, Literal_operation _ -> None + | Literal_operation opa, Literal_operation opb -> assert_operation_eq opa opb | Literal_operation _, _ -> None | Literal_signature a, Literal_signature b when a = b -> Some () | Literal_signature _, Literal_signature _ -> None diff --git a/src/stages/common/PP.ml b/src/stages/common/PP.ml index 2a02fa4e0..7123a1c86 100644 --- a/src/stages/common/PP.ml +++ b/src/stages/common/PP.ml @@ -130,6 +130,57 @@ let constant ppf : constant' -> unit = function | C_CONVERT_FROM_RIGHT_COMB -> fprintf ppf "CONVERT_FROM_RIGHT_COMB" | C_CONVERT_FROM_LEFT_COMB -> fprintf ppf "CONVERT_FROM_LEFT_COMB" +let operation ppf (o : Memory_proto_alpha.Protocol.Alpha_context.packed_internal_operation) : unit = + let print_option f ppf o = + match o with + Some (s) -> fprintf ppf "%a" f s + | None -> fprintf ppf "None" + in + let open Tezos_micheline.Micheline in + let rec prim ppf (node : (_,Memory_proto_alpha.Protocol.Alpha_context.Script.prim) node)= match node with + | Int (l , i) -> fprintf ppf "Int (%i, %a)" l Z.pp_print i + | String (l , s) -> fprintf ppf "String (%i, %s)" l s + | Bytes (l, b) -> fprintf ppf "B (%i, %s)" l (Bytes.to_string b) + | Prim (l , p , nl, a) -> fprintf ppf "P (%i, %s, %a, %a)" l + (Memory_proto_alpha.Protocol.Michelson_v1_primitives.string_of_prim p) + (list_sep_d prim) nl + (list_sep_d (fun ppf s -> fprintf ppf "%s" s)) a + | Seq (l, nl) -> fprintf ppf "S (%i, %a)" l + (list_sep_d prim) nl + in + let l ppf (l: Memory_proto_alpha.Protocol.Alpha_context.Script.lazy_expr) = + let oo = Tezos_data_encoding.Data_encoding.force_decode l in + match oo with + Some o -> fprintf ppf "%a" prim (Tezos_micheline.Micheline.root o) + | None -> fprintf ppf "Fail decoding" + in + + let op ppf (type a) : a Memory_proto_alpha.Protocol.Alpha_context.manager_operation -> unit = function + | Reveal (s: Tezos_protocol_environment_006_PsCARTHA__Environment.Signature.Public_key.t) -> + fprintf ppf "R %a" Tezos_protocol_environment_006_PsCARTHA__Environment.Signature.Public_key.pp s + | Transaction {amount; parameters; entrypoint; destination} -> + fprintf ppf "T {%a; %a; %s; %a}" + Memory_proto_alpha.Protocol.Alpha_context.Tez.pp amount + l parameters + entrypoint + Memory_proto_alpha.Protocol.Alpha_context.Contract.pp destination + + | Origination {delegate; script; credit; preorigination} -> + fprintf ppf "O {%a; %a; %a; %a}" + (print_option Tezos_protocol_environment_006_PsCARTHA__Environment.Signature.Public_key_hash.pp) delegate + l script.code + Memory_proto_alpha.Protocol.Alpha_context.Tez.pp credit + (print_option Memory_proto_alpha.Protocol.Alpha_context.Contract.pp) preorigination + + | Delegation so -> + fprintf ppf "D %a" (print_option Tezos_protocol_environment_006_PsCARTHA__Environment.Signature.Public_key_hash.pp) so + in + let Internal_operation {source;operation;nonce} = o in + fprintf ppf "{source: %s; operation: %a; nonce: %i" + (Memory_proto_alpha.Protocol.Alpha_context.Contract.to_b58check source) + op operation + nonce + let literal ppf (l : literal) = match l with | Literal_unit -> fprintf ppf "unit" @@ -141,7 +192,7 @@ let literal ppf (l : literal) = | Literal_string s -> fprintf ppf "%a" Ligo_string.pp s | Literal_bytes b -> fprintf ppf "0x%a" Hex.pp (Hex.of_bytes b) | Literal_address s -> fprintf ppf "@%S" s - | Literal_operation _ -> fprintf ppf "Operation(...bytes)" + | Literal_operation o -> fprintf ppf "Operation(%a)" operation o | Literal_key s -> fprintf ppf "key %s" s | Literal_key_hash s -> fprintf ppf "key_hash %s" s | Literal_signature s -> fprintf ppf "Signature %s" s diff --git a/src/test/basic_multisig_tests.ml b/src/test/basic_multisig_tests.ml new file mode 100644 index 000000000..9efc9ea86 --- /dev/null +++ b/src/test/basic_multisig_tests.ml @@ -0,0 +1,203 @@ +open Trace +open Test_helpers + +let file = "./contracts/basic_multisig/multisig.ligo" +let mfile = "./contracts/basic_multisig/multisig.mligo" +let refile = "./contracts/basic_multisig/multisig.religo" + +let type_file f s = + let%bind typed,state = Ligo.Compile.Utils.type_file f s (Contract "main") in + ok @@ (typed,state) + +let get_program f st = + let s = ref None in + fun () -> match !s with + | Some s -> ok s + | None -> ( + let%bind program = type_file f st in + s := Some program ; + ok program + ) + +let compile_main f s () = + let%bind typed_prg,_ = type_file f s in + let%bind mini_c_prg = Ligo.Compile.Of_typed.compile typed_prg in + let%bind michelson_prg = Ligo.Compile.Of_mini_c.aggregate_and_compile_contract mini_c_prg "main" in + let%bind (_contract: Tezos_utils.Michelson.michelson) = + (* fails if the given entry point is not a valid contract *) + Ligo.Compile.Of_michelson.build_contract michelson_prg in + ok () + +open Ast_imperative + +let init_storage threshold counter pkeys = + let keys = List.map + (fun el -> + let (_,pk_str,_) = str_keys el in + e_key @@ pk_str) + pkeys in + e_record_ez [ + ("id" , e_string "MULTISIG" ) ; + ("counter" , e_nat counter ) ; + ("threshold" , e_nat threshold) ; + ("auth" , e_typed_list keys (t_key ())) ; + ] + +let (first_owner , first_contract) = + let open Proto_alpha_utils.Memory_proto_alpha in + let id = List.nth dummy_environment.identities 0 in + let kt = id.implicit_contract in + Protocol.Alpha_context.Contract.to_b58check kt , kt + + +let op_list = + let open Memory_proto_alpha.Protocol.Alpha_context in + let source : Contract.t = first_contract in + let%bind operation = + let parameters : Script.lazy_expr = Script.unit_parameter in + let entrypoint = "default" in + let open Proto_alpha_utils in + let%bind destination = + Trace.trace_alpha_tzresult (fun _ -> Main_errors.test_internal __LOC__) @@ + Contract.of_b58check "tz1PpDGHRXFQq3sYDuH8EpLWzPm5PFpe1sLE" + in + ok @@ Transaction {amount=Tez.zero; parameters; entrypoint; destination} in + ok @@ (e_typed_list [e_literal (Literal_operation (Internal_operation {source;operation;nonce=0}))] (t_operation ())) +let empty_payload = e_unit () + +let chain_id_zero = e_chain_id @@ Tezos_crypto.Base58.simple_encode + Tezos_base__TzPervasives.Chain_id.b58check_encoding + Tezos_base__TzPervasives.Chain_id.zero + +(* sign the message 'msg' with 'keys', if 'is_valid'=false the providid signature will be incorrect *) +let params counter payload keys is_validl f s = + let%bind program,_ = get_program f s () in + let aux = fun acc (key,is_valid) -> + let (_,_pk,sk) = key in + let (pkh,_,_) = str_keys key in + let msg = e_tuple + [ payload ; + e_nat counter ; + e_string (if is_valid then "MULTISIG" else "XX") ; + chain_id_zero ] in + let%bind signature = sign_message program msg sk in + ok @@ (e_pair (e_key_hash pkh) (e_signature signature))::acc in + let%bind signed_msgs = Trace.bind_fold_list aux [] (List.rev @@ List.combine keys is_validl) in + ok @@ e_record_ez [ + ("counter" , e_nat counter ) ; + ("payload" , payload) ; + ("signatures" , e_typed_list signed_msgs (t_pair (t_key_hash (),t_signature ())) ) ; + ] + +(* Provide one valid signature when the threshold is two of two keys *) +let not_enough_1_of_2 f s () = + let%bind program = get_program f s () in + let exp_failwith = "Not enough signatures passed the check" in + let keys = gen_keys () in + let%bind test_params = params 0 empty_payload [keys] [true] f s in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~sender:first_contract () in + let%bind () = expect_string_failwith + program ~options "main" (e_pair test_params (init_storage 2 0 [keys;gen_keys()])) exp_failwith in + ok () + +let unmatching_counter f s () = + let%bind program = get_program f s () in + let exp_failwith = "Counters does not match" in + let keys = gen_keys () in + let%bind test_params = params 1 empty_payload [keys] [true] f s in + let%bind () = expect_string_failwith + program "main" (e_pair test_params (init_storage 1 0 [keys])) exp_failwith in + ok () + +(* Provide one invalid signature (correct key but incorrect signature) + when the threshold is one of one key *) +let invalid_1_of_1 f s () = + let%bind program = get_program f s () in + let exp_failwith = "Invalid signature" in + let keys = [gen_keys ()] in + let%bind test_params = params 0 empty_payload keys [false] f s in + let%bind () = expect_string_failwith + program "main" (e_pair test_params (init_storage 1 0 keys)) exp_failwith in + ok () + +(* Provide one valid signature when the threshold is one of one key *) +let valid_1_of_1 f s () = + let%bind program = get_program f s () in + let%bind op_list = op_list in + let keys = gen_keys () in + let%bind () = expect_eq_n_trace_aux [0;1;2] program "main" + (fun n -> + let%bind params = params n empty_payload [keys] [true] f s in + ok @@ e_pair params (init_storage 1 n [keys]) + ) + (fun n -> + ok @@ e_pair op_list (init_storage 1 (n+1) [keys]) + ) in + ok () + +(* Provive two valid signatures when the threshold is two of three keys *) +let valid_2_of_3 f s () = + let%bind program = get_program f s () in + let%bind op_list = op_list in + let param_keys = [gen_keys (); gen_keys ()] in + let st_keys = param_keys @ [gen_keys ()] in + let%bind () = expect_eq_n_trace_aux [0;1;2] program "main" + (fun n -> + let%bind params = params n empty_payload param_keys [true;true] f s in + ok @@ e_pair params (init_storage 2 n st_keys) + ) + (fun n -> + ok @@ e_pair op_list (init_storage 2 (n+1) st_keys) + ) in + ok () + +(* Provide one invalid signature and two valid signatures when the threshold is two of three keys *) +let invalid_3_of_3 f s () = + let%bind program = get_program f s () in + let valid_keys = [gen_keys() ; gen_keys()] in + let invalid_key = gen_keys () in + let param_keys = valid_keys @ [invalid_key] in + let st_keys = valid_keys @ [gen_keys ()] in + let%bind test_params = params 0 empty_payload param_keys [false;true;true] f s in + let exp_failwith = "Invalid signature" in + let%bind () = expect_string_failwith + program "main" (e_pair test_params (init_storage 2 0 st_keys)) exp_failwith in + ok () + +(* Provide two valid signatures when the threshold is three of three keys *) +let not_enough_2_of_3 f s () = + let%bind program = get_program f s() in + let valid_keys = [gen_keys() ; gen_keys()] in + let st_keys = gen_keys () :: valid_keys in + let%bind test_params = params 0 empty_payload (valid_keys) [true;true] f s in + let exp_failwith = "Not enough signatures passed the check" in + let%bind () = expect_string_failwith + program "main" (e_pair test_params (init_storage 3 0 st_keys)) exp_failwith in + ok () + +let main = test_suite "Basic Multisig" [ + test "compile" (compile_main file "pascaligo"); + test "unmatching_counter" (unmatching_counter file "pascaligo"); + test "valid_1_of_1" (valid_1_of_1 file "pascaligo"); + test "invalid_1_of_1" (invalid_1_of_1 file "pascaligo"); + test "not_enough_signature" (not_enough_1_of_2 file "pascaligo"); + test "valid_2_of_3" (valid_2_of_3 file "pascaligo"); + test "invalid_3_of_3" (invalid_3_of_3 file "pascaligo"); + test "not_enough_2_of_3" (not_enough_2_of_3 file "pascaligo"); + test "compile (mligo)" (compile_main mfile "cameligo"); + test "unmatching_counter (mligo)" (unmatching_counter mfile "cameligo"); + test "valid_1_of_1 (mligo)" (valid_1_of_1 mfile "cameligo"); + test "invalid_1_of_1 (mligo)" (invalid_1_of_1 mfile "cameligo"); + test "not_enough_signature (mligo)" (not_enough_1_of_2 mfile "cameligo"); + test "valid_2_of_3 (mligo)" (valid_2_of_3 mfile "cameligo"); + test "invalid_3_of_3 (mligo)" (invalid_3_of_3 mfile "cameligo"); + test "not_enough_2_of_3 (mligo)" (not_enough_2_of_3 mfile "cameligo"); + test "compile (religo)" (compile_main refile "reasonligo"); + test "unmatching_counter (religo)" (unmatching_counter refile "reasonligo"); + test "valid_1_of_1 (religo)" (valid_1_of_1 refile "reasonligo"); + test "invalid_1_of_1 (religo)" (invalid_1_of_1 refile "reasonligo"); + test "not_enough_signature (religo)" (not_enough_1_of_2 refile "reasonligo"); + test "valid_2_of_3 (religo)" (valid_2_of_3 refile "reasonligo"); + test "invalid_3_of_3 (religo)" (invalid_3_of_3 refile "reasonligo"); + test "not_enough_2_of_3 (religo)" (not_enough_2_of_3 refile "reasonligo"); + ] diff --git a/src/test/contracts/basic_multisig/config.ligo b/src/test/contracts/basic_multisig/config.ligo new file mode 100644 index 000000000..1cee7a1cc --- /dev/null +++ b/src/test/contracts/basic_multisig/config.ligo @@ -0,0 +1,5 @@ +type c_counter_type is nat +type c_payload_type is unit + +const c_address : address = + ("tz1PpDGHRXFQq3sYDuH8EpLWzPm5PFpe1sLE": address) diff --git a/src/test/contracts/basic_multisig/config.mligo b/src/test/contracts/basic_multisig/config.mligo new file mode 100644 index 000000000..81b6ef584 --- /dev/null +++ b/src/test/contracts/basic_multisig/config.mligo @@ -0,0 +1,5 @@ +type c_counter_type = nat +type c_payload_type = unit + +let c_address : address = + ("tz1PpDGHRXFQq3sYDuH8EpLWzPm5PFpe1sLE": address) diff --git a/src/test/contracts/basic_multisig/multisig.ligo b/src/test/contracts/basic_multisig/multisig.ligo new file mode 100644 index 000000000..10088213a --- /dev/null +++ b/src/test/contracts/basic_multisig/multisig.ligo @@ -0,0 +1,71 @@ +#include "config.ligo" + +// storage type + +type counter is c_counter_type +type threshold is c_counter_type +type authorized_keys is list (key) + +type storage is + record [ + id : string; + counter : counter; + threshold : threshold; + auth : authorized_keys + ] + +// I/O types + +type payload is c_payload_type +type signatures is list (key_hash * signature) + +type parameter is + record [ + counter : counter; + payload : payload; + signatures : signatures + ] + +type return is list (operation) * storage + + +function main (const p : parameter; const s : storage) : return is +block { + + var payload: payload := p.payload; + + + if p.counter =/= s.counter then + failwith ("Counters does not match") + else { + const packed_payload : bytes = + Bytes.pack ((payload, p.counter, s.id, Tezos.chain_id)); + var valid : nat := 0n; + + var pkh_sigs : signatures := p.signatures; + for key in list s.auth block { + case pkh_sigs of + nil -> skip + | pkh_sig # tl -> block { + if pkh_sig.0 = Crypto.hash_key (key) then block { + pkh_sigs := tl; + if Crypto.check (key, pkh_sig.1, packed_payload) + then valid := valid + 1n + else failwith ("Invalid signature") + } + else skip + } + end + }; + + if valid < s.threshold then + failwith ("Not enough signatures passed the check") + else s.counter := s.counter + 1n + }; + const contract_opt : option (contract(payload)) = Tezos.get_contract_opt(c_address); + var op : list(operation) := nil; + case contract_opt of + | Some (c) -> op := list [Tezos.transaction (payload, 0tez, c)] + | None -> failwith ("Contract not found") + end; +} with (op, s) diff --git a/src/test/contracts/basic_multisig/multisig.mligo b/src/test/contracts/basic_multisig/multisig.mligo new file mode 100644 index 000000000..747cd0419 --- /dev/null +++ b/src/test/contracts/basic_multisig/multisig.mligo @@ -0,0 +1,65 @@ +#include "config.mligo" + +// storage type + +type counter = c_counter_type +type threshold = c_counter_type +type authorized_keys = key list + +type storage = { + id : string; + counter : counter; + threshold : threshold; + auth : authorized_keys +} + +// I/O types + +type payload = c_payload_type +type signatures = (key_hash * signature) list + +type parameter = { + counter : counter; + payload : payload; + signatures : signatures +} + +type return = operation list * storage + + +let main (p, s : parameter * storage) : return = + let payload : payload = p.payload in + let s = + if p.counter <> s.counter then + (failwith "Counters does not match" : storage) + else + let packed_payload : bytes = + Bytes.pack (payload, p.counter, s.id, Tezos.chain_id) in + let valid : nat = 0n in + let keys : authorized_keys = s.auth in + let aux = + fun (vk, pkh_sig: (nat * authorized_keys)*(key_hash * signature)) -> + let valid, keys = vk in + match keys with + | [] -> vk + | key::keys -> + if pkh_sig.0 = Crypto.hash_key key + then + let valid = + if Crypto.check key pkh_sig.1 packed_payload + then valid + 1n + else (failwith "Invalid signature" : nat) + in valid, keys + else valid, keys in + let valid, keys = + List.fold aux p.signatures (valid, keys) in + if valid < s.threshold then + (failwith ("Not enough signatures passed the check") : storage) + else {s with counter = s.counter + 1n} + in + let contract_opt : payload contract option = Tezos.get_contract_opt(c_address) in + let op = match contract_opt with + Some (c) -> [Tezos.transaction payload 0tez c] + | None -> (failwith ("Contract not found") : operation list) + in + op, s diff --git a/src/test/contracts/basic_multisig/multisig.religo b/src/test/contracts/basic_multisig/multisig.religo new file mode 100644 index 000000000..fbdc22899 --- /dev/null +++ b/src/test/contracts/basic_multisig/multisig.religo @@ -0,0 +1,74 @@ +#include "config.mligo" + +// storage type + +type counter = c_counter_type +type threshold = c_counter_type +type authorized_keys = list (key); + +type storage = { + id : string, + counter : counter, + threshold : threshold, + auth : authorized_keys +}; + +// I/O types + +type payload = c_payload_type +type dummy = (key_hash,signature); +type signatures = list ((key_hash,signature)); /* Waiting to be fixed */ + +type parameter = { + counter : counter, + payload : payload, + signatures : signatures +}; + +type return = (list (operation),storage); + +let main = ((p, s): (parameter, storage)) : return => +{ + let payload : payload = p.payload; + let s = + if (p.counter != s.counter) { + (failwith ("Counters does not match") : storage); + } else { + let packed_payload : bytes = + Bytes.pack ((payload, p.counter, s.id, Tezos.chain_id)); + let valid : nat = 0n; + let keys : authorized_keys = s.auth; + let aux = ((vk, pkh_sig) : + ((nat, authorized_keys), (key_hash, signature))) + : (nat, authorized_keys) => { + let (valid, keys) = vk; + switch (keys) { + | [] => vk; + | [key, ...keys] => + if (pkh_sig[0] == Crypto.hash_key (key)) { + let valid = + if (Crypto.check (key, pkh_sig[1], packed_payload)) { + valid + 1n; + } + else { (failwith ("Invalid signature") : nat) }; + (valid, keys); + } + else { (valid, keys); }; + }; + }; + let (valid, keys) = + List.fold (aux, p.signatures, (valid, keys)); + if (valid < s.threshold) { + (failwith ("Not enough signatures passed the check") : storage); + } + else { + {...s,counter : s.counter + 1n}; + }; + }; + let contract_opt : option (contract (payload)) = Tezos.get_contract_opt(c_address); + let op = switch (contract_opt) { + | Some (c) => [Tezos.transaction(payload, 0tez, c)] + | None => (failwith ("Contract not found") : list (operation)) + }; + (op,s) +}; diff --git a/src/test/dune b/src/test/dune index cc571bfdf..5625b81e6 100644 --- a/src/test/dune +++ b/src/test/dune @@ -6,6 +6,7 @@ simple-utils ligo alcotest + tezos-utils tezos-crypto ) (preprocess diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index e9d283458..022942e31 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -410,13 +410,13 @@ let string_arithmetic_religo () : (unit, _) result = let bytes_arithmetic () : (unit, _) result = let%bind program = type_file "./contracts/bytes_arithmetic.ligo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in - let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex "7070" in - let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex "" in - let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex "ff7a7aff" in - let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex "7a7a" in - let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex "ba" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in + let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7070" in + let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "" in + let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ff7a7aff" in + let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7a7a" in + let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ba" in let%bind () = expect_eq program "concat_op" foo foototo in let%bind () = expect_eq program "concat_op" empty toto in let%bind () = expect_eq program "slice_op" tata at in @@ -454,8 +454,8 @@ let comparable_mligo () : (unit, _) result = let crypto () : (unit, _) result = let%bind program = type_file "./contracts/crypto.ligo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in let%bind b1 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foo in let%bind () = expect_eq_core program "hasherman512" foo b1 in let%bind b2 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foototo in @@ -468,8 +468,8 @@ let crypto () : (unit, _) result = let crypto_mligo () : (unit, _) result = let%bind program = mtype_file "./contracts/crypto.mligo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in let%bind b1 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foo in let%bind () = expect_eq_core program "hasherman512" foo b1 in let%bind b2 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foototo in @@ -482,8 +482,8 @@ let crypto_mligo () : (unit, _) result = let crypto_religo () : (unit, _) result = let%bind program = retype_file "./contracts/crypto.religo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in let%bind b1 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foo in let%bind () = expect_eq_core program "hasherman512" foo b1 in let%bind b2 = Test_helpers.run_typed_program_with_imperative_input program "hasherman512" foototo in @@ -496,13 +496,13 @@ let crypto_religo () : (unit, _) result = let bytes_arithmetic_mligo () : (unit, _) result = let%bind program = mtype_file "./contracts/bytes_arithmetic.mligo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in - let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex "7070" in - let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex "" in - let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex "ff7a7aff" in - let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex "7a7a" in - let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex "ba" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in + let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7070" in + let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "" in + let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ff7a7aff" in + let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7a7a" in + let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ba" in let%bind () = expect_eq program "concat_op" foo foototo in let%bind () = expect_eq program "concat_op" empty toto in let%bind () = expect_eq program "slice_op" tata at in @@ -516,13 +516,13 @@ let bytes_arithmetic_mligo () : (unit, _) result = let bytes_arithmetic_religo () : (unit, _) result = let%bind program = retype_file "./contracts/bytes_arithmetic.religo" in - let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f00" in - let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex "0f007070" in - let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex "7070" in - let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex "" in - let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex "ff7a7aff" in - let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex "7a7a" in - let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex "ba" in + let%bind foo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f00" in + let%bind foototo = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "0f007070" in + let%bind toto = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7070" in + let%bind empty = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "" in + let%bind tata = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ff7a7aff" in + let%bind at = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "7a7a" in + let%bind ba = trace_option (test_internal __LOC__) @@ e_bytes_hex_ez "ba" in let%bind () = expect_eq program "concat_op" foo foototo in let%bind () = expect_eq program "concat_op" empty toto in let%bind () = expect_eq program "slice_op" tata at in diff --git a/src/test/test.ml b/src/test/test.ml index b6a9a9c41..9e6d3a927 100644 --- a/src/test/test.ml +++ b/src/test/test.ml @@ -13,6 +13,7 @@ let () = Id_tests.main ; Id_tests_p.main ; Id_tests_r.main ; + Basic_multisig_tests.main; Multisig_tests.main ; Multisig_v2_tests.main ; Replaceable_id_tests.main ;