From 716751553ebac0d3a050e6750ed5e6e0d49ffcbc Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Thu, 30 Apr 2020 18:27:49 +0200 Subject: [PATCH 01/29] add cameligo contract --- src/test/contracts/FA1.2.mligo | 109 +++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 src/test/contracts/FA1.2.mligo diff --git a/src/test/contracts/FA1.2.mligo b/src/test/contracts/FA1.2.mligo new file mode 100644 index 000000000..f03f3c2f9 --- /dev/null +++ b/src/test/contracts/FA1.2.mligo @@ -0,0 +1,109 @@ +type tokens = (address, nat) big_map +type allowances = (address * address, nat) big_map (* (sender,account) -> value *) + +type storage = { + tokens : tokens; + allowances : allowances; + total_amount : nat; +} + +type transfer = { + address_from : address; + address_to : address; + value : nat; +} + +type approve = { + spender : address; + value : nat; +} + +type getAllowance = { + owner : address; + spender : address; + callback : nat contract; +} + +type getBalance = { + owner : address; + callback : nat contract; +} + +type getTotalSupply = { + callback : nat contract; +} + +type action = + Transfer of transfer +| Approve of approve +| GetAllowance of getAllowance +| GetBalance of getBalance +| GetTotalSupply of getTotalSupply + +let transfer (p,s : transfer * storage) : operation list * storage = + let new_allowances = + if Tezos.sender = p.address_from then s.allowances + else + let authorized_value = match Big_map.find_opt (Tezos.sender,p.address_from) s.allowances with + Some value -> value + | None -> 0n + in + if (authorized_value < p.value) + then (failwith "Not Enough Allowance" : allowances) + else Big_map.update (Tezos.sender,p.address_from) (Some (abs(authorized_value - p.value))) s.allowances + in + let sender_balance = match Big_map.find_opt p.address_from s.tokens with + Some value -> value + | None -> 0n + in + if (sender_balance < p.value) + then (failwith "Not Enough Balance" : operation list * storage) + else + let new_tokens = Big_map.update p.address_from (Some (abs(sender_balance - p.value))) s.tokens in + let receiver_balance = match Big_map.find_opt p.address_to s.tokens with + Some value -> value + | None -> 0n + in + let new_tokens = Big_map.update p.address_to (Some (receiver_balance + p.value)) new_tokens in + ([]:operation list), {s with tokens = new_tokens; allowances = new_allowances} + +let approve (p,s : approve * storage) : operation list * storage = + let previous_value = match Big_map.find_opt (p.spender, Tezos.sender) s.allowances with + Some value -> value + | None -> 0n + in + if previous_value > 0n && p.value > 0n + then (failwith "Unsafe Allowance Change" : operation list * storage) + else + let new_allowances = Big_map.update (p.spender, Tezos.sender) (Some (p.value)) s.allowances in + ([] : operation list), {s with allowances = new_allowances} + +let getAllowance (p,s : getAllowance * storage) : operation list * storage = + let value = match Big_map.find_opt (p.owner, p.spender) s.allowances with + Some value -> value + | None -> 0n + in + let op = Tezos.transaction value 0mutez p.callback in + ([op],s) + +let getBalance (p,s : getBalance * storage) : operation list * storage = + let value = match Big_map.find_opt p.owner s.tokens with + Some value -> value + | None -> 0n + in + let op = Tezos.transaction value 0mutez p.callback in + ([op],s) + +let getTotalSupply (p,s : getTotalSupply * storage) : operation list * storage = + let total = s.total_amount in + let op = Tezos.transaction total 0mutez p.callback in + ([op],s) + + +let main (a,s:action * storage) = + match a with + Transfer p -> transfer (p,s) + | Approve p -> approve (p,s) + | GetAllowance p -> getAllowance (p,s) + | GetBalance p -> getBalance (p,s) + | GetTotalSupply p -> getTotalSupply (p,s) From 059a566d4b059b20f741e55dfb517dac470b0b10 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 4 May 2020 13:39:44 +0200 Subject: [PATCH 02/29] add PascaLigo contract --- src/test/contracts/FA1.2.ligo | 116 ++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 src/test/contracts/FA1.2.ligo diff --git a/src/test/contracts/FA1.2.ligo b/src/test/contracts/FA1.2.ligo new file mode 100644 index 000000000..15d3bb917 --- /dev/null +++ b/src/test/contracts/FA1.2.ligo @@ -0,0 +1,116 @@ +type tokens is big_map (address, nat) +type allowances is big_map (address * address, nat) (* (sender,account) -> value *) + +type storage is record [ + tokens : tokens; + allowances : allowances; + total_amount : nat; +] + +type transfer is record [ + address_from : address; + address_to : address; + value : nat; +] + +type approve is record [ + spender : address; + value : nat; +] + +type getAllowance is record [ + owner : address; + spender : address; + callback : contract (nat); +] + +type getBalance is record [ + owner : address; + callback : contract (nat); +] + +type getTotalSupply is record [ + callback : contract (nat); +] + +type action is + Transfer of transfer +| Approve of approve +| GetAllowance of getAllowance +| GetBalance of getBalance +| GetTotalSupply of getTotalSupply + +function transfer (const p : transfer; const s: storage) : list (operation) * storage is block { + var new_allowances : allowances := Big_map.empty; + if Tezos.sender = p.address_from + then { new_allowances := s.allowances; } + else { + var authorized_value : nat := + case (Big_map.find_opt ((Tezos.sender,p.address_from), s.allowances)) of + Some (value) -> value + | None -> 0n + end; + if (authorized_value < p.value) + then { failwith("Not Enough Allowance")} + else { new_allowances := Big_map.update ((Tezos.sender,p.address_from), (Some (abs(authorized_value - p.value))), s.allowances) } + }; + var sender_balance : nat := case (Big_map.find_opt (p.address_from, s.tokens)) of + Some (value) -> value + | None -> 0n + end; + var new_tokens : tokens := Big_map.empty; + if (sender_balance < p.value) + then { failwith ("Not Enough Balance")} + else { + new_tokens := Big_map.update (p.address_from, (Some (abs(sender_balance - p.value))), s.tokens); + var receiver_balance : nat := case (Big_map.find_opt (p.address_to, s.tokens)) of + Some (value) -> value + | None -> 0n + end; + new_tokens := Big_map.update (p.address_to, (Some (receiver_balance + p.value)), new_tokens); + } +} with ((nil: list (operation)), s with record [tokens = new_tokens; allowances = new_allowances]) + +function approve (const p : approve; const s : storage) : list (operation) * storage is block { + var previous_value : nat := case Big_map.find_opt ((p.spender, Tezos.sender), s.allowances) of + Some (value) -> value + | None -> 0n + end; + var new_allowances : allowances := Big_map.empty; + if previous_value > 0n and p.value > 0n + then { failwith ("Unsafe Allowance Change")} + else { + new_allowances := Big_map.update ((p.spender, Tezos.sender), (Some (p.value)), s.allowances); + } +} with ((nil: list (operation)), s with record [allowances = new_allowances]) + +function getAllowance (const p : getAllowance; const s : storage) : list (operation) * storage is block { + var value : nat := case Big_map.find_opt ((p.owner, p.spender), s.allowances) of + Some (value) -> value + | None -> 0n + end; + var op : operation := Tezos.transaction (value, 0mutez, p.callback); +} with (list [op],s) + +function getBalance (const p : getBalance; const s : storage) : list (operation) * storage is block { + var value : nat := case Big_map.find_opt (p.owner, s.tokens) of + Some (value) -> value + | None -> 0n + end; + var op : operation := Tezos.transaction (value, 0mutez, p.callback); +} with (list [op],s) + +function getTotalSupply (const p : getTotalSupply; const s : storage) : list (operation) * storage is block { + var total : nat := s.total_amount; + var op : operation := Tezos.transaction (total, 0mutez, p.callback); +} with (list [op],s) + + +function main (const a : action; const s : storage) : list (operation) * storage is + case a of + Transfer (p) -> transfer (p,s) + | Approve (p) -> approve (p,s) + | GetAllowance (p) -> getAllowance (p,s) + | GetBalance (p) -> getBalance (p,s) + | GetTotalSupply (p) -> getTotalSupply (p,s) + end; From 426a1b6620e036f82c4860364c6c69694562d74c Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 4 May 2020 15:12:44 +0200 Subject: [PATCH 03/29] adding ReasonLigo contract --- src/test/contracts/FA1.2.religo | 115 ++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 src/test/contracts/FA1.2.religo diff --git a/src/test/contracts/FA1.2.religo b/src/test/contracts/FA1.2.religo new file mode 100644 index 000000000..37b194738 --- /dev/null +++ b/src/test/contracts/FA1.2.religo @@ -0,0 +1,115 @@ +type tokens = big_map (address, nat) +type allowances = big_map ((address, address), nat) /* (sender,account) -> value */ + +type storage = { + tokens : tokens, + allowances : allowances, + total_amount : nat, +} + +type transfer = { + address_from : address, + address_to : address, + value : nat, +} + +type approve = { + spender : address, + value : nat, +} + +type getAllowance = { + owner : address, + spender : address, + callback : contract (nat), +} + +type getBalance = { + owner : address, + callback : contract (nat), +} + +type getTotalSupply = { + callback : contract (nat), +} + +type action = +| Transfer ( transfer ) +| Approve ( approve ) +| GetAllowance ( getAllowance ) +| GetBalance ( getBalance ) +| GetTotalSupply ( getTotalSupply ) + +let transfer = ((p,s) : (transfer, storage)) : (list (operation), storage) => { + let new_allowances = + if (Tezos.sender == p.address_from) { s.allowances; } + else { + let authorized_value = switch (Big_map.find_opt ((Tezos.sender,p.address_from), s.allowances)) { + | Some value => value + | None => 0n + }; + if (authorized_value < p.value) { (failwith ("Not Enough Allowance") : allowances); } + else { Big_map.update ((Tezos.sender,p.address_from), (Some (abs(authorized_value - p.value))), s.allowances); }; + }; + let sender_balance = switch (Big_map.find_opt (p.address_from, s.tokens)) { + | Some value => value + | None => 0n + }; + if (sender_balance < p.value) { (failwith ("Not Enough Balance") : (list (operation), storage)); } + else { + let new_tokens = Big_map.update (p.address_from, (Some (abs(sender_balance - p.value))), s.tokens); + let receiver_balance = switch (Big_map.find_opt (p.address_to, s.tokens)) { + | Some value => value + | None => 0n + }; + let new_tokens = Big_map.update (p.address_to, (Some (receiver_balance + p.value)), new_tokens); + (([]: list (operation)), { ...s,tokens:new_tokens, allowances:new_allowances}); + }; +}; + +let approve = ((p,s) : (approve, storage)) : (list (operation), storage) => { + let previous_value = switch (Big_map.find_opt ((p.spender, Tezos.sender), s.allowances)){ + | Some value => value + | None => 0n + }; + if (previous_value > 0n && p.value > 0n) + { (failwith ("Unsafe Allowance Change") : (list (operation), storage)); } + else { + let new_allowances = Big_map.update ((p.spender, Tezos.sender), (Some (p.value)), s.allowances); + (([] : list (operation)), { ...s, allowances : new_allowances}); + }; +}; + +let getAllowance = ((p,s) : (getAllowance, storage)) : (list (operation), storage) => { + let value = switch (Big_map.find_opt ((p.owner, p.spender), s.allowances)) { + | Some value => value + | None => 0n + }; + let op = Tezos.transaction (value, 0mutez, p.callback); + ([op],s) +}; + +let getBalance = ((p,s) : (getBalance, storage)) : (list (operation), storage) => { + let value = switch (Big_map.find_opt (p.owner, s.tokens)) { + | Some value => value + | None => 0n + }; + let op = Tezos.transaction (value, 0mutez, p.callback); + ([op],s) +}; + +let getTotalSupply = ((p,s) : (getTotalSupply, storage)) : (list (operation), storage) => { + let total = s.total_amount; + let op = Tezos.transaction (total, 0mutez, p.callback); + ([op],s) +}; + + +let main = ((a,s): (action, storage)) => + switch a { + | Transfer p => transfer ((p,s)) + | Approve p => approve ((p,s)) + | GetAllowance p => getAllowance ((p,s)) + | GetBalance p => getBalance ((p,s)) + | GetTotalSupply p => getTotalSupply ((p,s)) + }; From ddb2eac6ca07569b9c087fee3c9dbf1a47b9c67e Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 4 May 2020 15:14:56 +0200 Subject: [PATCH 04/29] add test --- src/stages/1-ast_imperative/combinators.mli | 1 + src/test/test.ml | 1 + src/test/tzip12_tests.ml | 190 ++++++++++++++++++++ 3 files changed, 192 insertions(+) create mode 100644 src/test/tzip12_tests.ml diff --git a/src/stages/1-ast_imperative/combinators.mli b/src/stages/1-ast_imperative/combinators.mli index a35375610..75b65404f 100644 --- a/src/stages/1-ast_imperative/combinators.mli +++ b/src/stages/1-ast_imperative/combinators.mli @@ -49,6 +49,7 @@ val t_michelson_pair : ?loc:Location.t -> type_expression -> michelson_prct_anno val t_operator : ?loc:Location.t -> type_operator -> type_expression list -> type_expression result val t_set : ?loc:Location.t -> type_expression -> type_expression +val t_contract : ?loc:Location.t -> type_expression -> type_expression val make_e : ?loc:Location.t -> expression_content -> expression diff --git a/src/test/test.ml b/src/test/test.ml index c21411092..01d8a78f6 100644 --- a/src/test/test.ml +++ b/src/test/test.ml @@ -18,5 +18,6 @@ let () = Hash_lock_tests.main ; Time_lock_repeat_tests.main ; Pledge_tests.main ; + Tzip12_tests.main ; ] ; () diff --git a/src/test/tzip12_tests.ml b/src/test/tzip12_tests.ml new file mode 100644 index 000000000..db5996c9e --- /dev/null +++ b/src/test/tzip12_tests.ml @@ -0,0 +1,190 @@ +open Trace +open Test_helpers + +let file_FA12 = "./contracts/FA1.2.ligo" +let mfile_FA12 = "./contracts/FA1.2.mligo" +let refile_FA12 = "./contracts/FA1.2.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,_ = get_program 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 (sender , 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 external_contract = + let open Proto_alpha_utils.Memory_proto_alpha in + let id = List.nth dummy_environment.identities 4 in + let kh = id.public_key_hash in + Tezos_utils.Signature.Public_key_hash.to_string kh + +let from_ = e_address @@ addr 5 +let to_ = e_address @@ addr 2 +let sender = e_address @@ sender +let external_contract = e_annotation (e_constant C_IMPLICIT_ACCOUNT [e_key_hash external_contract]) (t_contract (t_nat ())) + +let transfer f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair sender from_, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("address_from", from_);("address_to",to_); ("value",e_nat 10)] in + let new_storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 90); (to_, e_nat 110)]); + ("allowances", e_big_map [(e_pair sender from_, e_nat 90)]); + ("total_amount",e_nat 300); + ] in + let input = e_pair parameter storage in + let expected = e_pair (e_typed_list [] (t_operation ())) new_storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_eq program ~options "transfer" input expected + +let transfer_not_e_allowance f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair sender from_, e_nat 0)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("address_from", from_);("address_to",to_); ("value",e_nat 10)] in + let input = e_pair parameter storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_string_failwith ~options program "transfer" input + "Not Enough Allowance" + +let transfer_not_e_balance f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 0); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair sender from_, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("address_from", from_);("address_to",to_); ("value",e_nat 10)] in + let input = e_pair parameter storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_string_failwith ~options program "transfer" input + "Not Enough Balance" + +let approve f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 0)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("spender", from_);("value",e_nat 100)] in + let new_storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let input = e_pair parameter storage in + let expected = e_pair (e_typed_list [] (t_operation ())) new_storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_eq program ~options "approve" input expected + +let approve_unsafe f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("spender", from_);("value",e_nat 100)] in + let input = e_pair parameter storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_string_failwith ~options program "approve" input + "Unsafe Allowance Change" + +let get_allowance f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("owner", from_);("spender",sender); ("callback", external_contract)] in + let input = e_pair parameter storage in + let expected = e_pair (e_typed_list [] (t_operation ())) storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_eq program ~options "getAllowance" input expected + +let get_balance f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("owner", from_);("callback", external_contract)] in + let input = e_pair parameter storage in + let expected = e_pair (e_typed_list [] (t_operation ())) storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_eq program ~options "getBalance" input expected + +let get_total_supply f s () = + let%bind program,_ = get_program f s () in + let storage = e_record_ez [ + ("tokens", e_big_map [(sender, e_nat 100); (from_, e_nat 100); (to_, e_nat 100)]); + ("allowances", e_big_map [(e_pair from_ sender, e_nat 100)]); + ("total_amount",e_nat 300); + ] in + let parameter = e_record_ez [("callback", external_contract)] in + let input = e_pair parameter storage in + let expected = e_pair (e_typed_list [] (t_operation ())) storage in + let options = Proto_alpha_utils.Memory_proto_alpha.make_options () in + expect_eq program ~options "getTotalSupply" input expected + +let main = test_suite "tzip-12" [ + test "transfer" (transfer file_FA12 "pascaligo"); + test "transfer (not enough allowance)" (transfer_not_e_allowance file_FA12 "pascaligo"); + test "transfer (not enough balance)" (transfer_not_e_balance file_FA12 "pascaligo"); + test "approve" (approve file_FA12 "pascaligo"); + test "approve (unsafe allowance change)" (approve_unsafe file_FA12 "pascaligo"); + (* test "getAllowance" (get_allowance file_FA12 "pascaligo"); + test "getBalance" (get_balance file_FA12 "pascaligo"); + test "getTotalSupply" (get_total_supply file_FA12 "pascaligo"); waiting for a dummy_contract with type nat contractt*) + test "transfer" (transfer mfile_FA12 "cameligo"); + test "transfer (not enough allowance)" (transfer_not_e_allowance mfile_FA12 "cameligo"); + test "transfer (not enough balance)" (transfer_not_e_balance mfile_FA12 "cameligo"); + test "approve" (approve mfile_FA12 "cameligo"); + test "approve (unsafe allowance change)" (approve_unsafe mfile_FA12 "cameligo"); + (* test "getAllowance" (get_allowance mfile_FA12 "cameligo"); + test "getBalance" (get_balance mfile_FA12 "cameligo"); + test "getTotalSupply" (get_total_supply mfile_FA12 "cameligo"); waiting for a dummy_contract with type nat contractt*) + test "transfer" (transfer refile_FA12 "reasonligo"); + test "transfer (not enough allowance)" (transfer_not_e_allowance refile_FA12 "reasonligo"); + test "transfer (not enough balance)" (transfer_not_e_balance refile_FA12 "reasonligo"); + test "approve" (approve refile_FA12 "reasonligo"); + test "approve (unsafe allowance change)" (approve_unsafe refile_FA12 "reasonligo"); + (* test "getAllowance" (get_allowance refile_FA12 "reasonligo"); + test "getBalance" (get_balance refile_FA12 "reasonligo"); + test "getTotalSupply" (get_total_supply refile_FA12 "reasonligo"); waiting for a dummy_contract with type nat contractt*) + ] From 0ccc637c9b8b199b4fa7434c7f77d3e8024a2808 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Fri, 15 May 2020 17:08:46 +0200 Subject: [PATCH 05/29] Allow comparison of "comparable pair" (left is a simple comparable type, right is a comparable type) --- src/passes/operators/helpers.ml | 38 ++++++++++++++++++++++++++++- src/test/contracts/comparable.mligo | 30 +++++++++++++++++++++++ src/test/integration_tests.ml | 25 +++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 src/test/contracts/comparable.mligo diff --git a/src/passes/operators/helpers.ml b/src/passes/operators/helpers.ml index 639f706ad..f99024539 100644 --- a/src/passes/operators/helpers.ml +++ b/src/passes/operators/helpers.ml @@ -18,7 +18,25 @@ module Typer = struct ("b" , fun () -> Format.asprintf "%a" PP.type_expression b ) ] in error ~data title message () + + let error_comparator_composed a () = + let title () = "We only allow composed types of not more than two element to be compared" in + let message () = "" in + let data = [ + ("received" , fun () -> Format.asprintf "%a" PP.type_expression a); + ] in + error ~data title message () + + let error_first_field_comp_pair a () = + let title () = "this field is not allowed at the left of a comparable pair" in + let message () = "" in + let data = [ + ("received" , fun () -> Format.asprintf "%a" PP.type_expression a); + ] in + error ~data title message () + end + open Errors type type_result = type_expression @@ -105,7 +123,7 @@ module Typer = struct let assert_eq_1 ?msg a b = Assert.assert_true ?msg (eq_1 a b) - let comparator : string -> typer = fun s -> typer_2 s @@ fun a b -> + let simple_comparator : string -> typer = fun s -> typer_2 s @@ fun a b -> let%bind () = trace_strong (error_uncomparable_types a b) @@ Assert.assert_true @@ @@ -122,6 +140,24 @@ module Typer = struct ] in ok @@ t_bool () + let rec pair_comparator : string -> typer = fun s -> typer_2 s @@ fun a b -> + let%bind () = + trace_strong (error_uncomparable_types a b) @@ + Assert.assert_true @@ eq_1 a b + in + let%bind (a_k, a_v) = + trace_strong (error_comparator_composed a) @@ + get_t_pair a in + let%bind (b_k, b_v) = get_t_pair b in + let%bind _ = + trace_strong (error_first_field_comp_pair a) @@ + simple_comparator s [a_k;b_k] None + in + comparator s [a_v;b_v] None + + and comparator : string -> typer = fun s -> typer_2 s @@ fun a b -> + bind_or (simple_comparator s [a;b] None, pair_comparator s [a;b] None) + let boolean_operator_2 : string -> typer = fun s -> typer_2 s @@ fun a b -> let%bind () = trace_strong (simple_error "A isn't of type bool") @@ diff --git a/src/test/contracts/comparable.mligo b/src/test/contracts/comparable.mligo new file mode 100644 index 000000000..5eed67ceb --- /dev/null +++ b/src/test/contracts/comparable.mligo @@ -0,0 +1,30 @@ +(* This test check that the type are comparable *) + +let int_ (a: int) = a < a +let nat_ (a: nat) = a < a +let bool_ (a: bool) = a < a +let mutez_ (a: tez) = a < a +let string_ (a: string) = a < a +let bytes_ (a: bytes) = a < a +let address_ (a: address) = a < a +let timestamp_ (a: timestamp) = a < a +let key_hash_ (a: key_hash) = a < a + +type comp_pair = int * int + +let comp_pair (a: comp_pair) = a < a + +(* +type uncomp_pair_1 = int * int * int + +let uncomp_pair_1 (a: uncomp_pair_1) = a < a + +type uncomp_pair_2 = comp_pair * int + +let uncomp_pair_2 (a: uncomp_pair_2) = a < a +*) + +type inner_record = (int,"one",nat,"two") michelson_pair +type comb_record = (int,"three",inner_record,"four") michelson_pair + +let comb_record (a : comb_record) = a < a diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index 740071375..cf4120cea 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -433,6 +433,30 @@ let bytes_arithmetic () : unit result = let%bind () = Assert.assert_fail @@ Ast_core.Misc.assert_value_eq (b3 , b1) in ok () +let comparable_mligo () : unit result = + let%bind program = mtype_file "./contracts/comparable.mligo" in + let%bind () = expect_eq program "int_" (e_int 1) (e_bool false) in + let%bind () = expect_eq program "nat_" (e_nat 1) (e_bool false) in + let%bind () = expect_eq program "bool_" (e_bool true) (e_bool false) in + let%bind () = expect_eq program "mutez_" (e_mutez 1) (e_bool false) in + let%bind () = expect_eq program "string_" (e_string "foo") (e_bool false) in + let%bind () = expect_eq program "bytes_" (e_bytes_string "deadbeaf") (e_bool false) in + let%bind () = expect_eq program "address_" (e_address "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx") (e_bool false) in + let%bind () = expect_eq program "timestamp_" (e_timestamp 101112) (e_bool false) in + let open Tezos_crypto in + let pkh, _, _ = Signature.generate_key () in + let key_hash = Signature.Public_key_hash.to_b58check @@ pkh in + let%bind () = expect_eq program "key_hash_" (e_key_hash key_hash) (e_bool false) in + let pair = e_pair (e_int 1) (e_int 2) in + let%bind () = expect_eq program "comp_pair" pair (e_bool false) in + (* let tuple = e_tuple [e_int 1; e_int 2; e_int 3] in + let%bind () = expect_string_failwith program "uncomp_pair_1" tuple "" in + let pair = e_pair pair (e_int 3) in + let%bind () = expect_string_failwith program "uncomp_pair_2" pair "" in *) + let comb = e_pair (e_int 3) (e_pair (e_int 1) (e_nat 2)) in + let%bind () = expect_eq program "comb_record" comb (e_bool false) in + ok () + let crypto () : unit result = let%bind program = type_file "./contracts/crypto.ligo" in let%bind foo = e_bytes_hex "0f00" in @@ -2417,6 +2441,7 @@ let main = test_suite "Integration (End to End)" [ test "bytes_arithmetic" bytes_arithmetic ; test "bytes_arithmetic (mligo)" bytes_arithmetic_mligo ; test "bytes_arithmetic (religo)" bytes_arithmetic_religo ; + test "comparable (mligo)" comparable_mligo; test "crypto" crypto ; test "crypto (mligo)" crypto_mligo ; test "crypto (religo)" crypto_religo ; From 7244b91c454c97cf273dfd3dd29aa73b6b57feb9 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Fri, 15 May 2020 17:46:56 +0200 Subject: [PATCH 06/29] fix/keep region information in the simplifier --- src/bin/expect_tests/contract_tests.ml | 6 +-- src/bin/expect_tests/typer_error_tests.ml | 4 +- .../2-concrete_to_imperative/cameligo.ml | 44 ++++++++++--------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/bin/expect_tests/contract_tests.ml b/src/bin/expect_tests/contract_tests.ml index d069c62aa..bc2ec34eb 100644 --- a/src/bin/expect_tests/contract_tests.ml +++ b/src/bin/expect_tests/contract_tests.ml @@ -1549,7 +1549,7 @@ let%expect_test _ = let%expect_test _ = run_ligo_bad [ "compile-contract" ; bad_contract "bad_contract.mligo" ; "main" ] ; [%expect {| - ligo: in file "", line 0, characters 0-0. badly typed contract: unexpected entrypoint type {"location":"in file \"\", line 0, characters 0-0","entrypoint":"main","entrypoint_type":"( nat * int ) -> int"} + ligo: in file "bad_contract.mligo", line 4, characters 0-3. badly typed contract: unexpected entrypoint type {"location":"in file \"bad_contract.mligo\", line 4, characters 0-3","entrypoint":"main","entrypoint_type":"( nat * int ) -> int"} If you're not sure how to fix this error, you can @@ -1562,7 +1562,7 @@ let%expect_test _ = run_ligo_bad [ "compile-contract" ; bad_contract "bad_contract2.mligo" ; "main" ] ; [%expect {| - ligo: in file "", line 0, characters 0-0. bad return type: expected (type_operator: list(operation)), got string {"location":"in file \"\", line 0, characters 0-0","entrypoint":"main"} + ligo: in file "bad_contract2.mligo", line 5, characters 0-3. bad return type: expected (type_operator: list(operation)), got string {"location":"in file \"bad_contract2.mligo\", line 5, characters 0-3","entrypoint":"main"} If you're not sure how to fix this error, you can @@ -1575,7 +1575,7 @@ let%expect_test _ = run_ligo_bad [ "compile-contract" ; bad_contract "bad_contract3.mligo" ; "main" ] ; [%expect {| - ligo: in file "", line 0, characters 0-0. badly typed contract: expected {int} and {string} to be the same in the entrypoint type {"location":"in file \"\", line 0, characters 0-0","entrypoint":"main","entrypoint_type":"( nat * int ) -> ( (type_operator: list(operation)) * string )"} + ligo: in file "bad_contract3.mligo", line 5, characters 0-3. badly typed contract: expected {int} and {string} to be the same in the entrypoint type {"location":"in file \"bad_contract3.mligo\", line 5, characters 0-3","entrypoint":"main","entrypoint_type":"( nat * int ) -> ( (type_operator: list(operation)) * string )"} If you're not sure how to fix this error, you can diff --git a/src/bin/expect_tests/typer_error_tests.ml b/src/bin/expect_tests/typer_error_tests.ml index 1718b83a0..c8690a3e5 100644 --- a/src/bin/expect_tests/typer_error_tests.ml +++ b/src/bin/expect_tests/typer_error_tests.ml @@ -3,7 +3,7 @@ open Cli_expect let%expect_test _ = run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_function_annotation_1.mligo"; "main"]; [%expect {| - ligo: in file "", line 0, characters 0-0. different type constructors: Expected these two constant type constructors to be the same, but they're different {"a":"unit","b":"int"} + ligo: in file "error_function_annotation_1.mligo", line 1, characters 0-3. different type constructors: Expected these two constant type constructors to be the same, but they're different {"a":"unit","b":"int"} If you're not sure how to fix this error, you can @@ -29,7 +29,7 @@ let%expect_test _ = run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_function_annotation_3.mligo"; "f"]; [%expect {| - ligo: in file "", line 0, characters 0-0. different kinds: {"a":"( (type_operator: list(operation)) * sum[Add -> int , Sub -> int] )","b":"sum[Add -> int , Sub -> int]"} + ligo: in file "error_function_annotation_3.mligo", line 6, characters 0-3. different kinds: {"a":"( (type_operator: list(operation)) * sum[Add -> int , Sub -> int] )","b":"sum[Add -> int , Sub -> int]"} If you're not sure how to fix this error, you can diff --git a/src/passes/2-concrete_to_imperative/cameligo.ml b/src/passes/2-concrete_to_imperative/cameligo.ml index 11a714460..a57a5e833 100644 --- a/src/passes/2-concrete_to_imperative/cameligo.ml +++ b/src/passes/2-concrete_to_imperative/cameligo.ml @@ -37,13 +37,13 @@ module Errors = struct Raw.pattern_to_region actual)] in error ~data title message - let unsupported_let_in_function (patterns : Raw.pattern list) = + let unsupported_let_in_function (region : Region.t) (patterns : Raw.pattern list) = let title () = "" in let message () = "\nDefining functions with \"let ... in\" \ is not supported yet.\n" in let patterns_loc = List.fold_left (fun a p -> Region.cover a (Raw.pattern_to_region p)) - Region.ghost patterns in + region patterns in let data = [ ("location", fun () -> Format.asprintf "%a" Location.pp_lift @@ patterns_loc)] @@ -398,19 +398,21 @@ let rec compile_expression : match t with Raw.ELetIn e -> let Raw.{kwd_rec; binding; body; attributes; _} = e.value in + let region = e.region in + let loc = Location.lift region in let inline = List.exists (fun (a: Raw.attribute) -> a.value = "inline") attributes in let Raw.{binders; lhs_type; let_rhs; _} = binding in begin match binders with | (p, []) -> let%bind variables = tuple_pattern_to_typed_vars p in let%bind ty_opt = - bind_map_option (fun (_,te) -> compile_type_expression te) lhs_type in + bind_map_option (fun (re,te) -> let%bind te = compile_type_expression te in ok(Location.lift re,te)) lhs_type in let%bind rhs = compile_expression let_rhs in let rhs_b = Var.fresh ~name: "rhs" () in let rhs',rhs_b_expr = match ty_opt with - None -> rhs, e_variable rhs_b - | Some ty -> (e_annotation rhs ty), e_annotation (e_variable rhs_b) ty in + None -> rhs, e_variable ~loc rhs_b + | Some (lt,ty) -> (e_annotation ~loc:lt rhs ty), e_annotation ~loc:lt (e_variable ~loc rhs_b) ty in let%bind body = compile_expression body in let prepare_variable (ty_var: Raw.variable * Raw.type_expr option) = let variable, ty_opt = ty_var in @@ -435,12 +437,12 @@ let rec compile_expression : match variables with | hd :: [] -> if (List.length prep_vars = 1) - then e_let_in hd inline rhs_b_expr body - else e_let_in hd inline (e_record_accessor rhs_b_expr (string_of_int ((List.length prep_vars) - 1))) body + then e_let_in ~loc hd inline rhs_b_expr body + else e_let_in ~loc hd inline (e_record_accessor ~loc rhs_b_expr (string_of_int ((List.length prep_vars) - 1))) body | hd :: tl -> - e_let_in hd + e_let_in ~loc hd inline - (e_record_accessor rhs_b_expr (string_of_int ((List.length prep_vars) - (List.length tl) - 1))) + (e_record_accessor ~loc rhs_b_expr (string_of_int ((List.length prep_vars) - (List.length tl) - 1))) (chain_let_in tl body) | [] -> body (* Precluded by corner case assertion above *) in @@ -454,7 +456,7 @@ let rec compile_expression : ok @@ (List.fold_right' aux lhs_type' ty) | _ -> ok None ) - | Some t -> ok @@ Some t + | Some (_,t) -> ok @@ Some t in let%bind ret_expr = if List.length prep_vars = 1 then ok (chain_let_in prep_vars body) @@ -491,7 +493,7 @@ let rec compile_expression : (* let f p1 ps... = rhs in body *) | (f, p1 :: ps) -> - fail @@ unsupported_let_in_function (f :: p1 :: ps) + fail @@ unsupported_let_in_function e.region (f :: p1 :: ps) end | Raw.EAnnot a -> let Raw.{inside=expr, _, type_expr; _}, loc = r_split a in @@ -680,12 +682,12 @@ and compile_fun lamb' : expr result = let pt_pattern = unpar_pattern pt.value.pattern in match pt_pattern with | Raw.PVar _ -> params - | Raw.PTuple _ -> + | Raw.PTuple t -> [Raw.PTyped - {region=Region.ghost; + {region=t.region; value= { pt.value with pattern= - Raw.PVar {region=Region.ghost; + Raw.PVar {region=pt.region; value="#P"}}}] | _ -> params end @@ -727,7 +729,7 @@ and compile_fun lamb' : expr result = {binders = (PTuple vars, []) ; lhs_type=None; eq=Region.ghost; - let_rhs=(Raw.EVar {region=Region.ghost; value="#P"}); + let_rhs=(Raw.EVar {region=pt.region; value="#P"}); } in let let_in: Raw.let_in = @@ -741,7 +743,7 @@ and compile_fun lamb' : expr result = in ok (Raw.ELetIn { - region=Region.ghost; + region=pt.region; value=let_in }) | Raw.PVar _ -> ok lamb.body @@ -842,7 +844,7 @@ and compile_declaration : Raw.declaration -> declaration Location.wrap list resu let%bind type_expression = compile_type_expression type_expr in ok @@ [loc x @@ Declaration_type (Var.of_name name.value , type_expression)] | Let x -> ( - let (_, recursive, let_binding, attributes), _ = r_split x in + let (region, recursive, let_binding, attributes), _ = r_split x in let inline = List.exists (fun (a: Raw.attribute) -> a.value = "inline") attributes in let binding = let_binding in let {binders; lhs_type; let_rhs} = binding in @@ -876,7 +878,7 @@ and compile_declaration : Raw.declaration -> declaration Location.wrap list resu field_path = ( (Component - {region = Region.ghost; + {region = v.region; value = name, Z.of_int i;} : Raw.selection) , []); } @@ -927,7 +929,7 @@ and compile_declaration : Raw.declaration -> declaration Location.wrap list resu let f_args = nseq_to_list (param1,others) in let%bind ty = bind_map_list typed_pattern_to_typed_vars f_args in let aux acc ty = Option.map (t_function (snd ty)) acc in - ok (Raw.EFun {region=Region.ghost ; value=fun_},List.fold_right' aux lhs_type' ty) + ok (Raw.EFun {region; value=fun_},List.fold_right' aux lhs_type' ty) in let%bind rhs' = compile_expression let_rhs in let%bind lhs_type = match lhs_type with @@ -982,10 +984,10 @@ and compile_cases : type a . (Raw.pattern * a) list -> (a, unit) matching_conten | PConstr v -> let const, pat_opt = match v with - PConstrApp {value; _} -> + PConstrApp {value; region} -> (match value with | constr, None -> - constr, Some (PVar {value = "unit"; region = Region.ghost}) + constr, Some (PVar {value = "unit"; region}) | _ -> value) | PSomeApp {value=region,pat; _} -> {value="Some"; region}, Some pat From ae3a555c91733545b0d67a6dcc68bb21e7d9cbfc Mon Sep 17 00:00:00 2001 From: Edmond Lee Date: Fri, 15 May 2020 17:32:49 -0700 Subject: [PATCH 07/29] update logo src --- tools/webide/packages/client/src/components/header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/webide/packages/client/src/components/header.tsx b/tools/webide/packages/client/src/components/header.tsx index e3e3f826f..25b9ce0fd 100644 --- a/tools/webide/packages/client/src/components/header.tsx +++ b/tools/webide/packages/client/src/components/header.tsx @@ -36,7 +36,7 @@ export const HeaderComponent = () => { - + From f6ff6b85c401a8d8b65c86c4316a4b32b55cfafc Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 27 Apr 2020 11:30:59 +0200 Subject: [PATCH 08/29] add ligo_string in simple_utils --- vendors/ligo-utils/simple-utils/simple_utils.ml | 2 +- vendors/ligo-utils/simple-utils/x_string.ml | 11 +++++++++++ vendors/ligo-utils/simple-utils/x_string.mli | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 vendors/ligo-utils/simple-utils/x_string.ml create mode 100644 vendors/ligo-utils/simple-utils/x_string.mli diff --git a/vendors/ligo-utils/simple-utils/simple_utils.ml b/vendors/ligo-utils/simple-utils/simple_utils.ml index 1db630bb7..c0748367b 100644 --- a/vendors/ligo-utils/simple-utils/simple_utils.ml +++ b/vendors/ligo-utils/simple-utils/simple_utils.ml @@ -14,4 +14,4 @@ module Tree = Tree module Region = Region module Pos = Pos module Var = Var - +module Ligo_string = X_string diff --git a/vendors/ligo-utils/simple-utils/x_string.ml b/vendors/ligo-utils/simple-utils/x_string.ml new file mode 100644 index 000000000..f7155375c --- /dev/null +++ b/vendors/ligo-utils/simple-utils/x_string.ml @@ -0,0 +1,11 @@ +type t = + Standard of string +| Verbatim of string + +let pp ppf = function + Standard s -> Format.fprintf ppf "%S" s + | Verbatim v -> Format.fprintf ppf "{|%s|}" v + +let extract = function + Standard s -> s + | Verbatim v -> v diff --git a/vendors/ligo-utils/simple-utils/x_string.mli b/vendors/ligo-utils/simple-utils/x_string.mli new file mode 100644 index 000000000..5ded5f73f --- /dev/null +++ b/vendors/ligo-utils/simple-utils/x_string.mli @@ -0,0 +1,11 @@ +(* +Ligo_string represent string as they are writen in a ligo program, +delimited either with double quotes (standard) or with `{|...|}` (Varbatim) +*) + +type t = + Standard of string +| Verbatim of string + +val pp : Format.formatter -> t -> unit +val extract : t -> string From 6c8b76b3de75185739c9741bde6aab402356bf55 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 27 Apr 2020 11:31:16 +0200 Subject: [PATCH 09/29] add verbatim in lexer and parser --- src/passes/1-parser/cameligo/AST.ml | 42 ++++++++-------- src/passes/1-parser/cameligo/LexToken.mli | 40 ++++++++------- src/passes/1-parser/cameligo/LexToken.mll | 25 ++++++---- src/passes/1-parser/cameligo/ParToken.mly | 17 ++++--- src/passes/1-parser/cameligo/Parser.mly | 2 + src/passes/1-parser/cameligo/ParserLog.ml | 17 ++++++- src/passes/1-parser/cameligo/Scoping.ml | 3 +- src/passes/1-parser/pascaligo/AST.ml | 10 ++-- src/passes/1-parser/pascaligo/LexToken.mli | 38 +++++++------- src/passes/1-parser/pascaligo/LexToken.mll | 24 ++++++--- src/passes/1-parser/pascaligo/ParToken.mly | 15 +++--- src/passes/1-parser/pascaligo/Parser.mly | 1 + src/passes/1-parser/pascaligo/ParserLog.ml | 5 ++ src/passes/1-parser/reasonligo/LexToken.mli | 40 ++++++++------- src/passes/1-parser/reasonligo/LexToken.mll | 22 +++++--- src/passes/1-parser/reasonligo/ParToken.mly | 17 ++++--- src/passes/1-parser/reasonligo/Parser.mly | 26 +++++----- src/passes/1-parser/shared/Lexer.mli | 21 ++++---- src/passes/1-parser/shared/Lexer.mll | 50 ++++++++++++++----- src/passes/10-interpreter/interpreter.ml | 2 +- src/passes/10-transpiler/transpiler.ml | 2 +- src/passes/10-transpiler/untranspiler.ml | 2 + .../2-concrete_to_imperative/cameligo.ml | 12 ++--- .../2-concrete_to_imperative/pascaligo.ml | 11 ++-- .../tezos_type_annotation.ml | 18 ++++--- .../9-self_ast_typed/contract_passes.ml | 2 +- src/stages/1-ast_imperative/combinators.ml | 3 +- src/stages/1-ast_imperative/combinators.mli | 1 + src/stages/2-ast_sugar/combinators.mli | 2 +- src/stages/3-ast_core/combinators.mli | 2 +- src/stages/4-ast_typed/PP.ml | 2 +- src/stages/4-ast_typed/PP_generic.ml | 2 + src/stages/4-ast_typed/combinators.mli | 4 +- .../4-ast_typed/combinators_environment.mli | 2 +- src/stages/4-ast_typed/types.ml | 2 +- src/stages/4-ast_typed/types_utils.ml | 1 + src/stages/common/PP.ml | 2 +- src/stages/common/types.ml | 3 +- src/test/contracts/string.ligo | 1 + src/test/typer_tests.ml | 6 +-- 40 files changed, 296 insertions(+), 201 deletions(-) diff --git a/src/passes/1-parser/cameligo/AST.ml b/src/passes/1-parser/cameligo/AST.ml index df94dc783..1282806fb 100644 --- a/src/passes/1-parser/cameligo/AST.ml +++ b/src/passes/1-parser/cameligo/AST.ml @@ -184,21 +184,22 @@ and field_decl = { and type_tuple = (type_expr, comma) nsepseq par reg and pattern = - PConstr of constr_pattern -| PUnit of the_unit reg -| PFalse of kwd_false -| PTrue of kwd_true -| PVar of variable -| PInt of (Lexer.lexeme * Z.t) reg -| PNat of (Lexer.lexeme * Z.t) reg -| PBytes of (Lexer.lexeme * Hex.t) reg -| PString of string reg -| PWild of wild -| PList of list_pattern -| PTuple of (pattern, comma) nsepseq reg -| PPar of pattern par reg -| PRecord of field_pattern reg ne_injection reg -| PTyped of typed_pattern reg + PConstr of constr_pattern +| PUnit of the_unit reg +| PFalse of kwd_false +| PTrue of kwd_true +| PVar of variable +| PInt of (Lexer.lexeme * Z.t) reg +| PNat of (Lexer.lexeme * Z.t) reg +| PBytes of (Lexer.lexeme * Hex.t) reg +| PString of string reg +| PVerbatim of string reg +| PWild of wild +| PList of list_pattern +| PTuple of (pattern, comma) nsepseq reg +| PPar of pattern par reg +| PRecord of field_pattern reg ne_injection reg +| PTyped of typed_pattern reg and constr_pattern = PNone of c_None @@ -266,8 +267,9 @@ and list_expr = (*| Append of (expr * append * expr) reg*) and string_expr = - Cat of cat bin_op reg -| String of string reg + Cat of cat bin_op reg +| String of string reg +| Verbatim of string reg and constr_expr = ENone of c_None @@ -425,8 +427,8 @@ let pattern_to_region = function | PTrue region | PFalse region | PTuple {region;_} | PVar {region;_} | PInt {region;_} -| PString {region;_} | PWild region -| PPar {region;_} +| PString {region;_} | PVerbatim {region;_} +| PWild region | PPar {region;_} | PRecord {region; _} | PTyped {region; _} | PNat {region; _} | PBytes {region; _} -> region @@ -452,7 +454,7 @@ let arith_expr_to_region = function | Nat {region; _} -> region let string_expr_to_region = function - String {region;_} | Cat {region;_} -> region + Verbatim {region;_} | String {region;_} | Cat {region;_} -> region let list_expr_to_region = function ECons {region; _} | EListComp {region; _} diff --git a/src/passes/1-parser/cameligo/LexToken.mli b/src/passes/1-parser/cameligo/LexToken.mli index 4af326823..fabddb2fa 100644 --- a/src/passes/1-parser/cameligo/LexToken.mli +++ b/src/passes/1-parser/cameligo/LexToken.mli @@ -78,14 +78,15 @@ type t = (* Identifiers, labels, numbers and strings *) -| Ident of string Region.reg -| Constr of string Region.reg -| Int of (string * Z.t) Region.reg -| Nat of (string * Z.t) Region.reg -| Mutez of (string * Z.t) Region.reg -| String of string Region.reg -| Bytes of (string * Hex.t) Region.reg -| Attr of string Region.reg +| Ident of string Region.reg +| Constr of string Region.reg +| Int of (string * Z.t) Region.reg +| Nat of (string * Z.t) Region.reg +| Mutez of (string * Z.t) Region.reg +| String of string Region.reg +| Verbatim of string Region.reg +| Bytes of (string * Hex.t) Region.reg +| Attr of string Region.reg (* Keywords *) @@ -142,17 +143,18 @@ type sym_err = Invalid_symbol type attr_err = Invalid_attribute type kwd_err = Invalid_keyword -val mk_int : lexeme -> Region.t -> (token, int_err) result -val mk_nat : lexeme -> Region.t -> (token, nat_err) result -val mk_mutez : lexeme -> Region.t -> (token, int_err) result -val mk_ident : lexeme -> Region.t -> (token, ident_err) result -val mk_sym : lexeme -> Region.t -> (token, sym_err) result -val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result -val mk_string : lexeme -> Region.t -> token -val mk_bytes : lexeme -> Region.t -> token -val mk_constr : lexeme -> Region.t -> token -val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result -val eof : Region.t -> token +val mk_int : lexeme -> Region.t -> (token, int_err) result +val mk_nat : lexeme -> Region.t -> (token, nat_err) result +val mk_mutez : lexeme -> Region.t -> (token, int_err) result +val mk_ident : lexeme -> Region.t -> (token, ident_err) result +val mk_sym : lexeme -> Region.t -> (token, sym_err) result +val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result +val mk_string : lexeme -> Region.t -> token +val mk_verbatim : lexeme -> Region.t -> token +val mk_bytes : lexeme -> Region.t -> token +val mk_constr : lexeme -> Region.t -> token +val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result +val eof : Region.t -> token (* Predicates *) diff --git a/src/passes/1-parser/cameligo/LexToken.mll b/src/passes/1-parser/cameligo/LexToken.mll index a87150cf7..509e5fae2 100644 --- a/src/passes/1-parser/cameligo/LexToken.mll +++ b/src/passes/1-parser/cameligo/LexToken.mll @@ -62,14 +62,15 @@ type t = (* Identifiers, labels, numbers and strings *) -| Ident of string Region.reg -| Constr of string Region.reg -| Int of (string * Z.t) Region.reg -| Nat of (string * Z.t) Region.reg -| Mutez of (string * Z.t) Region.reg -| String of string Region.reg -| Bytes of (string * Hex.t) Region.reg -| Attr of string Region.reg +| Ident of string Region.reg +| Constr of string Region.reg +| Int of (string * Z.t) Region.reg +| Nat of (string * Z.t) Region.reg +| Mutez of (string * Z.t) Region.reg +| String of string Region.reg +| Verbatim of string Region.reg +| Bytes of (string * Hex.t) Region.reg +| Attr of string Region.reg (* Keywords *) @@ -111,7 +112,9 @@ let proj_token = function (* Literals *) String Region.{region; value} -> - region, sprintf "Str %s" value + region, sprintf "String %s" value +| Verbatim Region.{region; value} -> + region, sprintf "Verbatim {|%s|}" value | Bytes Region.{region; value = s,b} -> region, sprintf "Bytes (\"%s\", \"0x%s\")" s (Hex.show b) @@ -193,6 +196,7 @@ let to_lexeme = function (* Literals *) String s -> String.escaped s.Region.value +| Verbatim v -> String.escaped v.Region.value | Bytes b -> fst b.Region.value | Int i | Nat i @@ -405,6 +409,9 @@ and scan_constr region lexicon = parse let mk_string lexeme region = String Region.{region; value=lexeme} +let mk_verbatim lexeme region = + Verbatim Region.{region; value=lexeme} + let mk_bytes lexeme region = let norm = Str.(global_replace (regexp "_") "" lexeme) in let value = lexeme, `Hex norm diff --git a/src/passes/1-parser/cameligo/ParToken.mly b/src/passes/1-parser/cameligo/ParToken.mly index 0d32e61de..0214d56a3 100644 --- a/src/passes/1-parser/cameligo/ParToken.mly +++ b/src/passes/1-parser/cameligo/ParToken.mly @@ -5,14 +5,15 @@ (* Literals *) -%token String "" -%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" -%token <(string * Z.t) Region.reg> Int "" -%token <(string * Z.t) Region.reg> Nat "" -%token <(string * Z.t) Region.reg> Mutez "" -%token Ident "" -%token Constr "" -%token Attr "" +%token String "" +%token Verbatim "" +%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" +%token <(string * Z.t) Region.reg> Int "" +%token <(string * Z.t) Region.reg> Nat "" +%token <(string * Z.t) Region.reg> Mutez "" +%token Ident "" +%token Constr "" +%token Attr "" (* Symbols *) diff --git a/src/passes/1-parser/cameligo/Parser.mly b/src/passes/1-parser/cameligo/Parser.mly index 12352480d..7d7f32be5 100644 --- a/src/passes/1-parser/cameligo/Parser.mly +++ b/src/passes/1-parser/cameligo/Parser.mly @@ -292,6 +292,7 @@ core_pattern: | "" { PNat $1 } | "" { PBytes $1 } | "" { PString $1 } +| "" { PVerbatim $1 } | unit { PUnit $1 } | "false" { PFalse $1 } | "true" { PTrue $1 } @@ -585,6 +586,7 @@ core_expr: | "" | module_field { EVar $1 } | projection { EProj $1 } | "" { EString (String $1) } +| "" { EString (Verbatim $1) } | unit { EUnit $1 } | "false" { ELogic (BoolExpr (False $1)) } | "true" { ELogic (BoolExpr (True $1)) } diff --git a/src/passes/1-parser/cameligo/ParserLog.ml b/src/passes/1-parser/cameligo/ParserLog.ml index 6ebe07c73..f1de7c5a6 100644 --- a/src/passes/1-parser/cameligo/ParserLog.ml +++ b/src/passes/1-parser/cameligo/ParserLog.ml @@ -97,7 +97,13 @@ let print_uident state {region; value} = let print_string state {region; value} = let line = - sprintf "%s: String %s\n" + sprintf "%s: String %S\n" + (compact state region) value + in Buffer.add_string state#buffer line + +let print_verbatim state {region; value} = + let line = + sprintf "%s: Verbatim {|%s|}\n" (compact state region) value in Buffer.add_string state#buffer line @@ -280,6 +286,7 @@ and print_pattern state = function | PNat i -> print_nat state i | PBytes b -> print_bytes state b | PString s -> print_string state s +| PVerbatim v -> print_verbatim state v | PWild wild -> print_token state wild "_" | PPar {value={lpar;inside=p;rpar}; _} -> print_token state lpar "("; @@ -459,6 +466,8 @@ and print_string_expr state = function print_expr state arg2 | String s -> print_string state s +| Verbatim v -> + print_verbatim state v and print_logic_expr state = function BoolExpr e -> print_bool_expr state e @@ -693,6 +702,9 @@ and pp_pattern state = function | PString s -> pp_node state "PString"; pp_string (state#pad 1 0) s +| PVerbatim v -> + pp_node state "PVerbatim"; + pp_string (state#pad 1 0) v | PUnit {region; _} -> pp_loc_node state "PUnit" region | PFalse region -> @@ -992,6 +1004,9 @@ and pp_string_expr state = function | String s -> pp_node state "String"; pp_string (state#pad 1 0) s +| Verbatim v -> + pp_node state "Verbatim"; + pp_string (state#pad 1 0) v and pp_arith_expr state = function Add {value; region} -> diff --git a/src/passes/1-parser/cameligo/Scoping.ml b/src/passes/1-parser/cameligo/Scoping.ml index 4b44a0189..651306022 100644 --- a/src/passes/1-parser/cameligo/Scoping.ml +++ b/src/passes/1-parser/cameligo/Scoping.ml @@ -77,7 +77,8 @@ let rec vars_of_pattern env = function PConstr p -> vars_of_pconstr env p | PUnit _ | PFalse _ | PTrue _ | PInt _ | PNat _ | PBytes _ -| PString _ | PWild _ -> env +| PString _ | PVerbatim _ +| PWild _ -> env | PVar var -> if VarSet.mem var env then raise (Error (Non_linear_pattern var)) diff --git a/src/passes/1-parser/pascaligo/AST.ml b/src/passes/1-parser/pascaligo/AST.ml index fa22a7b25..076bbe0fd 100644 --- a/src/passes/1-parser/pascaligo/AST.ml +++ b/src/passes/1-parser/pascaligo/AST.ml @@ -555,8 +555,9 @@ and arith_expr = | Mutez of (Lexer.lexeme * Z.t) reg and string_expr = - Cat of cat bin_op reg -| String of Lexer.lexeme reg + Cat of cat bin_op reg +| String of Lexer.lexeme reg +| Verbatim of Lexer.lexeme reg and list_expr = ECons of cons bin_op reg @@ -726,8 +727,9 @@ and arith_expr_to_region = function | Mutez {region; _} -> region and string_expr_to_region = function - Cat {region; _} -| String {region; _} -> region + Cat {region; _} +| String {region; _} +| Verbatim {region; _} -> region and annot_expr_to_region {region; _} = region diff --git a/src/passes/1-parser/pascaligo/LexToken.mli b/src/passes/1-parser/pascaligo/LexToken.mli index be263d9a5..a217a6370 100644 --- a/src/passes/1-parser/pascaligo/LexToken.mli +++ b/src/passes/1-parser/pascaligo/LexToken.mli @@ -36,13 +36,14 @@ type attribute = { type t = (* Literals *) - String of lexeme Region.reg -| Bytes of (lexeme * Hex.t) Region.reg -| Int of (lexeme * Z.t) Region.reg -| Nat of (lexeme * Z.t) Region.reg -| Mutez of (lexeme * Z.t) Region.reg -| Ident of lexeme Region.reg -| Constr of lexeme Region.reg + String of lexeme Region.reg +| Verbatim of lexeme Region.reg +| Bytes of (lexeme * Hex.t) Region.reg +| Int of (lexeme * Z.t) Region.reg +| Nat of (lexeme * Z.t) Region.reg +| Mutez of (lexeme * Z.t) Region.reg +| Ident of lexeme Region.reg +| Constr of lexeme Region.reg (* Symbols *) @@ -149,17 +150,18 @@ type sym_err = Invalid_symbol type attr_err = Invalid_attribute type kwd_err = Invalid_keyword -val mk_int : lexeme -> Region.t -> (token, int_err) result -val mk_nat : lexeme -> Region.t -> (token, nat_err) result -val mk_mutez : lexeme -> Region.t -> (token, int_err) result -val mk_ident : lexeme -> Region.t -> (token, ident_err) result -val mk_sym : lexeme -> Region.t -> (token, sym_err) result -val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result -val mk_string : lexeme -> Region.t -> token -val mk_bytes : lexeme -> Region.t -> token -val mk_constr : lexeme -> Region.t -> token -val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result -val eof : Region.t -> token +val mk_int : lexeme -> Region.t -> (token, int_err) result +val mk_nat : lexeme -> Region.t -> (token, nat_err) result +val mk_mutez : lexeme -> Region.t -> (token, int_err) result +val mk_ident : lexeme -> Region.t -> (token, ident_err) result +val mk_sym : lexeme -> Region.t -> (token, sym_err) result +val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result +val mk_string : lexeme -> Region.t -> token +val mk_verbatim : lexeme -> Region.t -> token +val mk_bytes : lexeme -> Region.t -> token +val mk_constr : lexeme -> Region.t -> token +val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result +val eof : Region.t -> token (* Predicates *) diff --git a/src/passes/1-parser/pascaligo/LexToken.mll b/src/passes/1-parser/pascaligo/LexToken.mll index 933db3cdb..4f28b9e71 100644 --- a/src/passes/1-parser/pascaligo/LexToken.mll +++ b/src/passes/1-parser/pascaligo/LexToken.mll @@ -24,13 +24,14 @@ type attribute = { type t = (* Literals *) - String of lexeme Region.reg -| Bytes of (lexeme * Hex.t) Region.reg -| Int of (lexeme * Z.t) Region.reg -| Nat of (lexeme * Z.t) Region.reg -| Mutez of (lexeme * Z.t) Region.reg -| Ident of lexeme Region.reg -| Constr of lexeme Region.reg + String of lexeme Region.reg +| Verbatim of lexeme Region.reg +| Bytes of (lexeme * Hex.t) Region.reg +| Int of (lexeme * Z.t) Region.reg +| Nat of (lexeme * Z.t) Region.reg +| Mutez of (lexeme * Z.t) Region.reg +| Ident of lexeme Region.reg +| Constr of lexeme Region.reg (* Symbols *) @@ -121,7 +122,11 @@ let proj_token = function (* Literals *) String Region.{region; value} -> - region, sprintf "String %s" value + region, sprintf "String %S" value + +| Verbatim Region.{region; value} -> + region, sprintf "Verbatim {|%s|}" value + | Bytes Region.{region; value = s,b} -> region, sprintf "Bytes (\"%s\", \"0x%s\")" s (Hex.show b) @@ -221,6 +226,7 @@ let to_lexeme = function (* Literals *) String s -> String.escaped s.Region.value +| Verbatim v -> String.escaped v.Region.value | Bytes b -> fst b.Region.value | Int i | Nat i @@ -442,6 +448,8 @@ and scan_constr region lexicon = parse let mk_string lexeme region = String Region.{region; value=lexeme} +let mk_verbatim lexeme region = Verbatim Region.{region; value=lexeme} + let mk_bytes lexeme region = let norm = Str.(global_replace (regexp "_") "" lexeme) in let value = lexeme, `Hex norm diff --git a/src/passes/1-parser/pascaligo/ParToken.mly b/src/passes/1-parser/pascaligo/ParToken.mly index d7d587fc2..49a90168e 100644 --- a/src/passes/1-parser/pascaligo/ParToken.mly +++ b/src/passes/1-parser/pascaligo/ParToken.mly @@ -5,13 +5,14 @@ (* Literals *) -%token String "" -%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" -%token <(LexToken.lexeme * Z.t) Region.reg> Int "" -%token <(LexToken.lexeme * Z.t) Region.reg> Nat "" -%token <(LexToken.lexeme * Z.t) Region.reg> Mutez "" -%token Ident "" -%token Constr "" +%token String "" +%token Verbatim "" +%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" +%token <(LexToken.lexeme * Z.t) Region.reg> Int "" +%token <(LexToken.lexeme * Z.t) Region.reg> Nat "" +%token <(LexToken.lexeme * Z.t) Region.reg> Mutez "" +%token Ident "" +%token Constr "" (* Symbols *) diff --git a/src/passes/1-parser/pascaligo/Parser.mly b/src/passes/1-parser/pascaligo/Parser.mly index 21d9420b7..668fb29e6 100644 --- a/src/passes/1-parser/pascaligo/Parser.mly +++ b/src/passes/1-parser/pascaligo/Parser.mly @@ -849,6 +849,7 @@ core_expr: | "" { EArith (Mutez $1) } | "" | module_field { EVar $1 } | "" { EString (String $1) } +| "" { EString (Verbatim $1) } | "" { EBytes $1 } | "False" { ELogic (BoolExpr (False $1)) } | "True" { ELogic (BoolExpr (True $1)) } diff --git a/src/passes/1-parser/pascaligo/ParserLog.ml b/src/passes/1-parser/pascaligo/ParserLog.ml index 6347b07f7..ae6ca8511 100644 --- a/src/passes/1-parser/pascaligo/ParserLog.ml +++ b/src/passes/1-parser/pascaligo/ParserLog.ml @@ -592,6 +592,8 @@ and print_string_expr state = function print_expr state arg2 | String s -> print_string state s +| Verbatim v -> + print_string state v and print_list_expr state = function ECons {value = {arg1; op; arg2}; _} -> @@ -1572,6 +1574,9 @@ and pp_string_expr state = function | String s -> pp_node state "String"; pp_string (state#pad 1 0) s +| Verbatim v -> + pp_node state "Verbatim"; + pp_string (state#pad 1 0) v and pp_annotated state (expr, t_expr) = pp_expr (state#pad 2 0) expr; diff --git a/src/passes/1-parser/reasonligo/LexToken.mli b/src/passes/1-parser/reasonligo/LexToken.mli index f568b5894..43c0bb9a3 100644 --- a/src/passes/1-parser/reasonligo/LexToken.mli +++ b/src/passes/1-parser/reasonligo/LexToken.mli @@ -81,14 +81,15 @@ type t = (* Identifiers, labels, numbers and strings *) -| Ident of string Region.reg -| Constr of string Region.reg -| Int of (string * Z.t) Region.reg -| Nat of (string * Z.t) Region.reg -| Mutez of (string * Z.t) Region.reg -| String of string Region.reg -| Bytes of (string * Hex.t) Region.reg -| Attr of string Region.reg +| Ident of string Region.reg +| Constr of string Region.reg +| Int of (string * Z.t) Region.reg +| Nat of (string * Z.t) Region.reg +| Mutez of (string * Z.t) Region.reg +| String of string Region.reg +| Verbatim of string Region.reg +| Bytes of (string * Hex.t) Region.reg +| Attr of string Region.reg (* Keywords *) @@ -141,17 +142,18 @@ type sym_err = Invalid_symbol type attr_err = Invalid_attribute type kwd_err = Invalid_keyword -val mk_int : lexeme -> Region.t -> (token, int_err) result -val mk_nat : lexeme -> Region.t -> (token, nat_err) result -val mk_mutez : lexeme -> Region.t -> (token, int_err) result -val mk_ident : lexeme -> Region.t -> (token, ident_err) result -val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result -val mk_sym : lexeme -> Region.t -> (token, sym_err) result -val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result -val mk_string : lexeme -> Region.t -> token -val mk_bytes : lexeme -> Region.t -> token -val mk_constr : lexeme -> Region.t -> token -val eof : Region.t -> token +val mk_int : lexeme -> Region.t -> (token, int_err) result +val mk_nat : lexeme -> Region.t -> (token, nat_err) result +val mk_mutez : lexeme -> Region.t -> (token, int_err) result +val mk_ident : lexeme -> Region.t -> (token, ident_err) result +val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result +val mk_sym : lexeme -> Region.t -> (token, sym_err) result +val mk_kwd : lexeme -> Region.t -> (token, kwd_err) result +val mk_string : lexeme -> Region.t -> token +val mk_verbatim : lexeme -> Region.t -> token +val mk_bytes : lexeme -> Region.t -> token +val mk_constr : lexeme -> Region.t -> token +val eof : Region.t -> token (* Predicates *) diff --git a/src/passes/1-parser/reasonligo/LexToken.mll b/src/passes/1-parser/reasonligo/LexToken.mll index a4245fb6d..9021e93c4 100644 --- a/src/passes/1-parser/reasonligo/LexToken.mll +++ b/src/passes/1-parser/reasonligo/LexToken.mll @@ -67,14 +67,15 @@ type t = (* Identifiers, labels, numbers and strings *) -| Ident of string Region.reg -| Constr of string Region.reg -| Int of (string * Z.t) Region.reg -| Nat of (string * Z.t) Region.reg -| Mutez of (string * Z.t) Region.reg -| String of string Region.reg -| Bytes of (string * Hex.t) Region.reg -| Attr of string Region.reg +| Ident of string Region.reg +| Constr of string Region.reg +| Int of (string * Z.t) Region.reg +| Nat of (string * Z.t) Region.reg +| Mutez of (string * Z.t) Region.reg +| String of string Region.reg +| Verbatim of string Region.reg +| Bytes of (string * Hex.t) Region.reg +| Attr of string Region.reg (* Keywords *) @@ -108,6 +109,8 @@ let proj_token = function String Region.{region; value} -> region, sprintf "String %s" value +| Verbatim Region.{region; value} -> + region, sprintf "Verbatim {|%s|}" value | Bytes Region.{region; value = s,b} -> region, sprintf "Bytes (\"%s\", \"0x%s\")" s (Hex.show b) @@ -172,6 +175,7 @@ let to_lexeme = function (* Literals *) String s -> s.Region.value +| Verbatim v -> String.escaped v.Region.value | Bytes b -> fst b.Region.value | Int i | Nat i @@ -385,6 +389,8 @@ let line_comment_start lexeme = lexeme = "//" let mk_string lexeme region = String Region.{region; value=lexeme} +let mk_verbatim lexeme region = Verbatim Region.{region; value=lexeme} + let mk_bytes lexeme region = let norm = Str.(global_replace (regexp "_") "" lexeme) in let value = lexeme, `Hex norm diff --git a/src/passes/1-parser/reasonligo/ParToken.mly b/src/passes/1-parser/reasonligo/ParToken.mly index 8191b17ec..4d7dcc913 100644 --- a/src/passes/1-parser/reasonligo/ParToken.mly +++ b/src/passes/1-parser/reasonligo/ParToken.mly @@ -5,14 +5,15 @@ (* Literals *) -%token String "" -%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" -%token <(string * Z.t) Region.reg> Int "" -%token <(string * Z.t) Region.reg> Nat "" -%token <(string * Z.t) Region.reg> Mutez "" -%token Ident "" -%token Constr "" -%token Attr "" +%token String "" +%token Verbatim "" +%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes "" +%token <(string * Z.t) Region.reg> Int "" +%token <(string * Z.t) Region.reg> Nat "" +%token <(string * Z.t) Region.reg> Mutez "" +%token Ident "" +%token Constr "" +%token Attr "" (* Symbols *) diff --git a/src/passes/1-parser/reasonligo/Parser.mly b/src/passes/1-parser/reasonligo/Parser.mly index 702094ecd..2d2ffcc2f 100644 --- a/src/passes/1-parser/reasonligo/Parser.mly +++ b/src/passes/1-parser/reasonligo/Parser.mly @@ -357,19 +357,20 @@ sub_pattern: | core_pattern { $1 } core_pattern: - "" { PVar $1 } -| "_" { PWild $1 } -| unit { PUnit $1 } -| "" { PInt $1 } -| "" { PNat $1 } -| "" { PBytes $1 } -| "true" { PTrue $1 } -| "false" { PFalse $1 } -| "" { PString $1 } -| par(ptuple) { PPar $1 } + "" { PVar $1 } +| "_" { PWild $1 } +| unit { PUnit $1 } +| "" { PInt $1 } +| "" { PNat $1 } +| "" { PBytes $1 } +| "true" { PTrue $1 } +| "false" { PFalse $1 } +| "" { PString $1 } +| "" { PVerbatim $1 } +| par(ptuple) { PPar $1 } | list__(sub_pattern) { PList (PListComp $1) } -| constr_pattern { PConstr $1 } -| record_pattern { PRecord $1 } +| constr_pattern { PConstr $1 } +| record_pattern { PRecord $1 } record_pattern: "{" sep_or_term_list(field_pattern,",") "}" { @@ -802,6 +803,7 @@ common_expr: | "_" { EVar {value = "_"; region = $1} } | update_record { EUpdate $1 } | "" { EString (String $1) } +| "" { EString (Verbatim $1) } | unit { EUnit $1 } | "false" { ELogic (BoolExpr (False $1)) } | "true" { ELogic (BoolExpr (True $1)) } diff --git a/src/passes/1-parser/shared/Lexer.mli b/src/passes/1-parser/shared/Lexer.mli index d3993fec8..fd94773ed 100644 --- a/src/passes/1-parser/shared/Lexer.mli +++ b/src/passes/1-parser/shared/Lexer.mli @@ -69,16 +69,17 @@ module type TOKEN = (* Injections *) - val mk_int : lexeme -> Region.t -> (token, int_err) result - val mk_nat : lexeme -> Region.t -> (token, nat_err) result - val mk_mutez : lexeme -> Region.t -> (token, int_err) result - val mk_ident : lexeme -> Region.t -> (token, ident_err) result - val mk_sym : lexeme -> Region.t -> (token, sym_err) result - val mk_string : lexeme -> Region.t -> token - val mk_bytes : lexeme -> Region.t -> token - val mk_constr : lexeme -> Region.t -> token - val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result - val eof : Region.t -> token + val mk_int : lexeme -> Region.t -> (token, int_err) result + val mk_nat : lexeme -> Region.t -> (token, nat_err) result + val mk_mutez : lexeme -> Region.t -> (token, int_err) result + val mk_ident : lexeme -> Region.t -> (token, ident_err) result + val mk_sym : lexeme -> Region.t -> (token, sym_err) result + val mk_string : lexeme -> Region.t -> token + val mk_verbatim : lexeme -> Region.t -> token + val mk_bytes : lexeme -> Region.t -> token + val mk_constr : lexeme -> Region.t -> token + val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result + val eof : Region.t -> token (* Predicates *) diff --git a/src/passes/1-parser/shared/Lexer.mll b/src/passes/1-parser/shared/Lexer.mll index dcfe3d91c..05d2ee1f1 100644 --- a/src/passes/1-parser/shared/Lexer.mll +++ b/src/passes/1-parser/shared/Lexer.mll @@ -33,16 +33,17 @@ module type TOKEN = (* Injections *) - val mk_int : lexeme -> Region.t -> (token, int_err) result - val mk_nat : lexeme -> Region.t -> (token, nat_err) result - val mk_mutez : lexeme -> Region.t -> (token, int_err) result - val mk_ident : lexeme -> Region.t -> (token, ident_err) result - val mk_sym : lexeme -> Region.t -> (token, sym_err) result - val mk_string : lexeme -> Region.t -> token - val mk_bytes : lexeme -> Region.t -> token - val mk_constr : lexeme -> Region.t -> token - val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result - val eof : Region.t -> token + val mk_int : lexeme -> Region.t -> (token, int_err) result + val mk_nat : lexeme -> Region.t -> (token, nat_err) result + val mk_mutez : lexeme -> Region.t -> (token, int_err) result + val mk_ident : lexeme -> Region.t -> (token, ident_err) result + val mk_sym : lexeme -> Region.t -> (token, sym_err) result + val mk_string : lexeme -> Region.t -> token + val mk_verbatim : lexeme -> Region.t -> token + val mk_bytes : lexeme -> Region.t -> token + val mk_constr : lexeme -> Region.t -> token + val mk_attr : string -> lexeme -> Region.t -> (token, attr_err) result + val eof : Region.t -> token (* Predicates *) @@ -111,6 +112,7 @@ module Make (Token : TOKEN) : (S with module Token = Token) = | Unexpected_character of char | Undefined_escape_sequence | Unterminated_string + | Unterminated_verbatim | Unterminated_comment of string | Non_canonical_zero | Broken_string @@ -133,6 +135,9 @@ module Make (Token : TOKEN) : (S with module Token = Token) = | Unterminated_string -> "Unterminated string.\n\ Hint: Close with double quotes." + | Unterminated_verbatim -> + "Unterminated verbatim.\n\ + Hint: Close with \"|}\"." | Unterminated_comment ending -> sprintf "Unterminated comment.\n\ Hint: Close with \"%s\"." ending @@ -179,6 +184,14 @@ module Make (Token : TOKEN) : (S with module Token = Token) = let token = Token.mk_string lexeme region in state#enqueue token + let mk_verbatim (thread, state) = + let start = thread#opening#start in + let stop = state#pos in + let region = Region.make ~start ~stop in + let lexeme = thread#to_string in + let token = Token.mk_verbatim lexeme region + in state#enqueue token + let mk_bytes bytes state buffer = let region, _, state = state#sync buffer in let token = Token.mk_bytes bytes region @@ -414,10 +427,14 @@ and scan state = parse (* String *) -| '"' { let opening, lexeme, state = state#sync lexbuf in - let thread = LexerLib.mk_thread opening lexeme in +| '"' { let opening, _, state = state#sync lexbuf in + let thread = LexerLib.mk_thread opening "" in scan_string thread state lexbuf |> mk_string } +| "{|" { let opening, _, state = state#sync lexbuf in + let thread = LexerLib.mk_thread opening "" in + scan_verbatim thread state lexbuf |> mk_verbatim } + (* Comments *) | block_comment_openings { @@ -484,7 +501,7 @@ and scan_string thread state = parse { let region, _, _ = state#sync lexbuf in fail region Invalid_character_in_string } | '"' { let _, _, state = state#sync lexbuf - in thread#push_char '"', state } + in thread, state } | esc { let _, lexeme, state = state#sync lexbuf in let thread = thread#push_string lexeme in scan_string thread state lexbuf } @@ -493,6 +510,13 @@ and scan_string thread state = parse | _ as c { let _, _, state = state#sync lexbuf in scan_string (thread#push_char c) state lexbuf } +and scan_verbatim thread state = parse +| eof { fail thread#opening Unterminated_verbatim} +| "|}" { let _, _, state = state#sync lexbuf + in thread, state } +| _ as c { let _, _, state = state#sync lexbuf in + scan_verbatim (thread#push_char c) state lexbuf } + (* Finishing a block comment (For Emacs: ("(*") The lexing of block comments must take care of diff --git a/src/passes/10-interpreter/interpreter.ml b/src/passes/10-interpreter/interpreter.ml index 85c15c6fb..c76b464f7 100644 --- a/src/passes/10-interpreter/interpreter.ml +++ b/src/passes/10-interpreter/interpreter.ml @@ -258,7 +258,7 @@ and eval_literal : Ast_typed.literal -> value result = function | Literal_int i -> ok @@ V_Ct (C_int i) | Literal_nat n -> ok @@ V_Ct (C_nat n) | Literal_timestamp i -> ok @@ V_Ct (C_timestamp i) - | Literal_string s -> ok @@ V_Ct (C_string s) + | Literal_string s -> ok @@ V_Ct (C_string (Ligo_string.extract s)) | Literal_bytes s -> ok @@ V_Ct (C_bytes s) | Literal_mutez t -> ok @@ V_Ct (C_mutez t) | Literal_address s -> ok @@ V_Ct (C_address s) diff --git a/src/passes/10-transpiler/transpiler.ml b/src/passes/10-transpiler/transpiler.ml index aa3ae5680..0a3ae7360 100644 --- a/src/passes/10-transpiler/transpiler.ml +++ b/src/passes/10-transpiler/transpiler.ml @@ -372,7 +372,7 @@ let rec transpile_literal : AST.literal -> value = fun l -> match l with | Literal_timestamp n -> D_timestamp n | Literal_mutez n -> D_mutez n | Literal_bytes s -> D_bytes s - | Literal_string s -> D_string s + | Literal_string s -> D_string (Ligo_string.extract s) | Literal_address s -> D_string s | Literal_signature s -> D_string s | Literal_key s -> D_string s diff --git a/src/passes/10-transpiler/untranspiler.ml b/src/passes/10-transpiler/untranspiler.ml index 26e2dd287..a6864bff9 100644 --- a/src/passes/10-transpiler/untranspiler.ml +++ b/src/passes/10-transpiler/untranspiler.ml @@ -92,6 +92,7 @@ let rec untranspile (v : value) (t : AST.type_expression) : AST.expression resul let%bind n = trace_strong (wrong_mini_c_value "string" v) @@ get_string v in + let n = Ligo_string.Standard n in return (E_literal (Literal_string n)) ) | TC_bytes -> ( @@ -246,6 +247,7 @@ let rec untranspile (v : value) (t : AST.type_expression) : AST.expression resul let%bind n = trace_strong (wrong_mini_c_value "lambda as string" v) @@ get_string v in + let n = Ligo_string.Standard n in return (E_literal (Literal_string n)) | T_variable _ -> fail @@ corner_case ~loc:__LOC__ "trying to untranspile at variable type" diff --git a/src/passes/2-concrete_to_imperative/cameligo.ml b/src/passes/2-concrete_to_imperative/cameligo.ml index 11a714460..6562ed20c 100644 --- a/src/passes/2-concrete_to_imperative/cameligo.ml +++ b/src/passes/2-concrete_to_imperative/cameligo.ml @@ -169,7 +169,7 @@ open Operators.Concrete_to_imperative.Cameligo let r_split = Location.r_split let get_t_string_singleton_opt = function - | Raw.TStringLiteral s -> Some (String.(sub s.value 1 ((length s.value)-2))) + | Raw.TStringLiteral s -> Some s.value | _ -> None let rec pattern_to_var : Raw.pattern -> _ = fun p -> @@ -583,11 +583,11 @@ let rec compile_expression : | EArith (Neg e) -> compile_unop "NEG" e | EString (String s) -> ( let (s , loc) = r_split s in - let s' = - let s = s in - String.(sub s 1 ((length s) - 2)) - in - return @@ e_literal ~loc (Literal_string s') + 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 c) -> let (c, loc) = r_split c in diff --git a/src/passes/2-concrete_to_imperative/pascaligo.ml b/src/passes/2-concrete_to_imperative/pascaligo.ml index 9d27ec0bc..1d5d51ef3 100644 --- a/src/passes/2-concrete_to_imperative/pascaligo.ml +++ b/src/passes/2-concrete_to_imperative/pascaligo.ml @@ -152,7 +152,7 @@ let return_statement expr = ok @@ fun expr'_opt -> | Some expr' -> ok @@ e_sequence expr expr' let get_t_string_singleton_opt = function - | Raw.TStringLiteral s -> Some (String.(sub s.value 1 ((length s.value)-2))) + | Raw.TStringLiteral s -> Some s.value | _ -> None @@ -384,11 +384,10 @@ let rec compile_expression (t:Raw.expr) : expr result = | EArith (Neg e) -> compile_unop "NEG" e | EString (String s) -> let (s , loc) = r_split s in - let s' = - (* S contains quotes *) - String.(sub s 1 (length s - 2)) - in - return @@ e_literal ~loc (Literal_string s') + 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 diff --git a/src/passes/3-self_ast_imperative/tezos_type_annotation.ml b/src/passes/3-self_ast_imperative/tezos_type_annotation.ml index 133cdd9a6..163e061d2 100644 --- a/src/passes/3-self_ast_imperative/tezos_type_annotation.ml +++ b/src/passes/3-self_ast_imperative/tezos_type_annotation.ml @@ -17,21 +17,23 @@ let peephole_expression : expression -> expression result = fun e -> match e.expression_content with | E_ascription {anno_expr=e'; type_annotation=t} as e -> ( match (e'.expression_content , t.type_content) with - | (E_literal (Literal_string s) , T_constant (TC_key_hash)) -> return @@ E_literal (Literal_key_hash s) - | (E_literal (Literal_string s) , T_constant (TC_signature)) -> return @@ E_literal (Literal_signature s) - | (E_literal (Literal_string s) , T_constant (TC_key)) -> return @@ E_literal (Literal_key s) - | (E_literal (Literal_int i) , T_constant (TC_timestamp)) -> return @@ E_literal (Literal_timestamp i) + | (E_literal (Literal_string s) , T_constant (TC_key_hash)) -> return @@ E_literal (Literal_key_hash (Ligo_string.extract s)) + | (E_literal (Literal_string s) , T_constant (TC_signature)) -> return @@ E_literal (Literal_signature (Ligo_string.extract s)) + | (E_literal (Literal_string s) , T_constant (TC_key)) -> return @@ E_literal (Literal_key (Ligo_string.extract s)) + | (E_literal (Literal_int i) , T_constant (TC_timestamp)) -> return @@ E_literal (Literal_timestamp i) | (E_literal (Literal_string str) , T_constant (TC_timestamp)) -> + let str = Ligo_string.extract str in let%bind time = trace_option (bad_string_timestamp str e'.location) @@ Memory_proto_alpha.Protocol.Alpha_context.Timestamp.of_notation str in let itime = Z.of_int64 @@ Tezos_utils.Time.Protocol.to_seconds time in return @@ E_literal (Literal_timestamp itime) - | (E_literal (Literal_string str) , T_constant (TC_address)) -> return @@ E_literal (Literal_address str) + | (E_literal (Literal_string str) , T_constant (TC_address)) -> return @@ E_literal (Literal_address (Ligo_string.extract str)) | (E_literal (Literal_string str) , T_constant (TC_bytes)) -> ( - let%bind e' = e'_bytes str in - return e' - ) + let str = Ligo_string.extract str in + let%bind e' = e'_bytes str in + return e' + ) | _ -> return e ) | e -> return e diff --git a/src/passes/9-self_ast_typed/contract_passes.ml b/src/passes/9-self_ast_typed/contract_passes.ml index a98d466e8..764319a2c 100644 --- a/src/passes/9-self_ast_typed/contract_passes.ml +++ b/src/passes/9-self_ast_typed/contract_passes.ml @@ -59,7 +59,7 @@ let self_typing : contract_pass_data -> expression -> (bool * contract_pass_data match e.expression_content , e.type_expression with | E_constant {cons_name=C_SELF ; arguments=[entrypoint_exp]}, {type_content = T_operator (TC_contract t) ; type_meta=_} -> let%bind entrypoint = match entrypoint_exp.expression_content with - | E_literal (Literal_string ep) -> check_entrypoint_annotation_format ep entrypoint_exp + | E_literal (Literal_string ep) -> check_entrypoint_annotation_format (Ligo_string.extract ep) entrypoint_exp | _ -> fail @@ Errors.entrypoint_annotation_not_literal entrypoint_exp.location in let%bind entrypoint_t = match dat.contract_type.parameter.type_content with | T_sum cmap -> diff --git a/src/stages/1-ast_imperative/combinators.ml b/src/stages/1-ast_imperative/combinators.ml index 15a611ba2..4a4e88ed3 100644 --- a/src/stages/1-ast_imperative/combinators.ml +++ b/src/stages/1-ast_imperative/combinators.ml @@ -96,7 +96,8 @@ let e_nat_z ?loc n : expression = make_e ?loc @@ E_literal (Literal_nat n) let e_nat ?loc n : expression = e_nat_z ?loc @@ Z.of_int n let e_timestamp_z ?loc n : expression = make_e ?loc @@ E_literal (Literal_timestamp n) let e_timestamp ?loc n : expression = e_timestamp_z ?loc @@ Z.of_int n -let e_string ?loc s : expression = make_e ?loc @@ E_literal (Literal_string s) +let e_string ?loc s : expression = make_e ?loc @@ E_literal (Literal_string (Standard s)) +let e_verbatim ?loc v : expression = make_e ?loc @@ E_literal (Literal_string (Verbatim v)) let e_address ?loc s : expression = make_e ?loc @@ E_literal (Literal_address s) let e_mutez_z ?loc s : expression = make_e ?loc @@ E_literal (Literal_mutez s) let e_mutez ?loc s : expression = e_mutez_z ?loc @@ Z.of_int s diff --git a/src/stages/1-ast_imperative/combinators.mli b/src/stages/1-ast_imperative/combinators.mli index a35375610..9e1a28b5b 100644 --- a/src/stages/1-ast_imperative/combinators.mli +++ b/src/stages/1-ast_imperative/combinators.mli @@ -62,6 +62,7 @@ val e_nat : ?loc:Location.t -> int -> expression val e_timestamp : ?loc:Location.t -> int -> expression val e_bool : ?loc:Location.t -> bool -> expression val e_string : ?loc:Location.t -> string -> expression +val e_verbatim : ?loc:Location.t -> string -> expression val e_address : ?loc:Location.t -> string -> expression val e_signature : ?loc:Location.t -> string -> expression val e_key : ?loc:Location.t -> string -> expression diff --git a/src/stages/2-ast_sugar/combinators.mli b/src/stages/2-ast_sugar/combinators.mli index 95e937fab..3faebef21 100644 --- a/src/stages/2-ast_sugar/combinators.mli +++ b/src/stages/2-ast_sugar/combinators.mli @@ -53,7 +53,7 @@ val e_int : ?loc:Location.t -> Z.t -> expression val e_nat : ?loc:Location.t -> Z.t -> expression val e_timestamp : ?loc:Location.t -> Z.t -> expression val e_bool : ?loc:Location.t -> bool -> expression -val e_string : ?loc:Location.t -> string -> expression +val e_string : ?loc:Location.t -> ligo_string -> expression val e_address : ?loc:Location.t -> string -> expression val e_signature : ?loc:Location.t -> string -> expression val e_key : ?loc:Location.t -> string -> expression diff --git a/src/stages/3-ast_core/combinators.mli b/src/stages/3-ast_core/combinators.mli index 1a7ec2efa..a271991da 100644 --- a/src/stages/3-ast_core/combinators.mli +++ b/src/stages/3-ast_core/combinators.mli @@ -54,7 +54,7 @@ val e_int : ?loc:Location.t -> Z.t -> expression val e_nat : ?loc:Location.t -> Z.t -> expression val e_timestamp : ?loc:Location.t -> Z.t -> expression val e_bool : ?loc:Location.t -> bool -> expression -val e_string : ?loc:Location.t -> string -> expression +val e_string : ?loc:Location.t -> ligo_string -> expression val e_address : ?loc:Location.t -> string -> expression val e_signature : ?loc:Location.t -> string -> expression val e_key : ?loc:Location.t -> string -> expression diff --git a/src/stages/4-ast_typed/PP.ml b/src/stages/4-ast_typed/PP.ml index 23c2e3b01..5691cac65 100644 --- a/src/stages/4-ast_typed/PP.ml +++ b/src/stages/4-ast_typed/PP.ml @@ -188,7 +188,7 @@ let literal ppf (l : literal) = | Literal_nat z -> fprintf ppf "+%a" Z.pp_print z | Literal_timestamp z -> fprintf ppf "+%a" Z.pp_print z | Literal_mutez z -> fprintf ppf "%amutez" Z.pp_print z - | Literal_string s -> fprintf ppf "%S" s + | 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)" diff --git a/src/stages/4-ast_typed/PP_generic.ml b/src/stages/4-ast_typed/PP_generic.ml index b2a2bf179..c36fcebcb 100644 --- a/src/stages/4-ast_typed/PP_generic.ml +++ b/src/stages/4-ast_typed/PP_generic.ml @@ -15,6 +15,7 @@ let needs_parens = { int = (fun _ _ _ -> false) ; z = (fun _ _ _ -> false) ; string = (fun _ _ _ -> false) ; + ligo_string = (fun _ _ _ -> false) ; bytes = (fun _ _ _ -> false) ; unit = (fun _ _ _ -> false) ; packed_internal_operation = (fun _ _ _ -> false) ; @@ -54,6 +55,7 @@ let op ppf = { bool = (fun _visitor () b -> fprintf ppf "%s" (if b then "true" else "false")) ; z = (fun _visitor () i -> fprintf ppf "%a" Z.pp_print i) ; string = (fun _visitor () str -> fprintf ppf "\"%s\"" str) ; + ligo_string = (fun _visitor () str -> fprintf ppf "%a" Ligo_string.pp str) ; bytes = (fun _visitor () _bytes -> fprintf ppf "bytes...") ; unit = (fun _visitor () () -> fprintf ppf "()") ; packed_internal_operation = (fun _visitor () _op -> fprintf ppf "Operation(...bytes)") ; diff --git a/src/stages/4-ast_typed/combinators.mli b/src/stages/4-ast_typed/combinators.mli index 7568455d5..192939c72 100644 --- a/src/stages/4-ast_typed/combinators.mli +++ b/src/stages/4-ast_typed/combinators.mli @@ -120,7 +120,7 @@ val e_int : Z.t -> expression_content val e_nat : Z.t -> expression_content val e_mutez : Z.t -> expression_content val e_bool : bool -> environment -> expression_content -val e_string : string -> expression_content +val e_string : ligo_string -> expression_content val e_bytes : bytes -> expression_content val e_timestamp : Z.t -> expression_content val e_address : string -> expression_content @@ -140,7 +140,7 @@ val e_a_int : Z.t -> environment -> expression val e_a_nat : Z.t -> environment -> expression val e_a_mutez : Z.t -> environment -> expression val e_a_bool : bool -> environment -> expression -val e_a_string : string -> environment -> expression +val e_a_string : ligo_string -> environment -> expression val e_a_address : string -> environment -> expression val e_a_pair : expression -> expression -> environment -> expression val e_a_some : expression -> environment -> expression diff --git a/src/stages/4-ast_typed/combinators_environment.mli b/src/stages/4-ast_typed/combinators_environment.mli index 861d67083..64b325975 100644 --- a/src/stages/4-ast_typed/combinators_environment.mli +++ b/src/stages/4-ast_typed/combinators_environment.mli @@ -7,7 +7,7 @@ val e_a_empty_int : Z.t -> expression val e_a_empty_nat : Z.t -> expression val e_a_empty_mutez : Z.t -> expression val e_a_empty_bool : bool -> expression -val e_a_empty_string : string -> expression +val e_a_empty_string : ligo_string -> expression val e_a_empty_address : string -> expression val e_a_empty_pair : expression -> expression -> expression val e_a_empty_some : expression -> expression diff --git a/src/stages/4-ast_typed/types.ml b/src/stages/4-ast_typed/types.ml index 195efe054..be7a7a287 100644 --- a/src/stages/4-ast_typed/types.ml +++ b/src/stages/4-ast_typed/types.ml @@ -80,7 +80,7 @@ type literal = | Literal_nat of z | Literal_timestamp of z | Literal_mutez of z - | Literal_string of string + | Literal_string of ligo_string | Literal_bytes of bytes | Literal_address of string | Literal_signature of string diff --git a/src/stages/4-ast_typed/types_utils.ml b/src/stages/4-ast_typed/types_utils.ml index b9367fa0c..2c77f5c7d 100644 --- a/src/stages/4-ast_typed/types_utils.ml +++ b/src/stages/4-ast_typed/types_utils.ml @@ -11,6 +11,7 @@ type expression_variable = Stage_common.Types.expression_variable type type_ = Stage_common.Types.type_ type type_variable = Stage_common.Types.type_variable type z = Z.t +type ligo_string = Stage_common.Types.ligo_string type constructor' = | Constructor of string diff --git a/src/stages/common/PP.ml b/src/stages/common/PP.ml index 2e72e085e..579c2a327 100644 --- a/src/stages/common/PP.ml +++ b/src/stages/common/PP.ml @@ -138,7 +138,7 @@ let literal ppf (l : literal) = | Literal_nat z -> fprintf ppf "+%a" Z.pp_print z | Literal_timestamp z -> fprintf ppf "+%a" Z.pp_print z | Literal_mutez z -> fprintf ppf "%amutez" Z.pp_print z - | Literal_string s -> fprintf ppf "%S" s + | 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)" diff --git a/src/stages/common/types.ml b/src/stages/common/types.ml index b97a9357d..cfa765fa8 100644 --- a/src/stages/common/types.ml +++ b/src/stages/common/types.ml @@ -3,6 +3,7 @@ and expression_variable = expression_ Var.t type type_ and type_variable = type_ Var.t +type ligo_string = Simple_utils.Ligo_string.t type constructor' = Constructor of string type label = Label of string @@ -178,7 +179,7 @@ type literal = | Literal_nat of Z.t | Literal_timestamp of Z.t | Literal_mutez of Z.t - | Literal_string of string + | Literal_string of ligo_string | Literal_bytes of bytes | Literal_address of string | Literal_signature of string diff --git a/src/test/contracts/string.ligo b/src/test/contracts/string.ligo index c563cd16c..d0e9123e6 100644 --- a/src/test/contracts/string.ligo +++ b/src/test/contracts/string.ligo @@ -1,3 +1,4 @@ const s : string = "toto" const x : string = s ^ "bar" const y : string = "foo" ^ x +const v : string = {|deadbeef|} diff --git a/src/test/typer_tests.ml b/src/test/typer_tests.ml index 92df6e911..e4ea12df5 100644 --- a/src/test/typer_tests.ml +++ b/src/test/typer_tests.ml @@ -39,7 +39,7 @@ module TestExpressions = struct let unit () : unit result = test_expression I.(e_unit ()) O.(t_unit ()) let int () : unit result = test_expression I.(e_int (Z.of_int 32)) O.(t_int ()) let bool () : unit result = test_expression I.(e_bool true) O.(t_bool ()) - let string () : unit result = test_expression I.(e_string "s") O.(t_string ()) + let string () : unit result = test_expression I.(e_string (Standard "s")) O.(t_string ()) let bytes () : unit result = let%bind b = I.e_bytes_hex "0b" in test_expression b O.(t_bytes ()) @@ -51,7 +51,7 @@ module TestExpressions = struct let tuple () : unit result = test_expression - I.(e_record @@ LMap.of_list [(Label "0",e_int (Z.of_int 32)); (Label "1",e_string "foo")]) + I.(e_record @@ LMap.of_list [(Label "0",e_int (Z.of_int 32)); (Label "1", e_string (Standard "foo"))]) O.(make_t_ez_record [("0",t_int ()); ("1",t_string ())]) let constructor () : unit result = @@ -65,7 +65,7 @@ module TestExpressions = struct let record () : unit result = test_expression - I.(e_record @@ LMap.of_list [(Label "foo", e_int (Z.of_int 32)); (Label "bar", e_string "foo")]) + I.(e_record @@ LMap.of_list [(Label "foo", e_int (Z.of_int 32)); (Label "bar", e_string (Standard "foo"))]) O.(make_t_ez_record [("foo", t_int ()); ("bar", t_string ())]) From 551bf176fe34438f49a605904130db94d8ab09e7 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Mon, 20 Apr 2020 18:55:04 +0200 Subject: [PATCH 10/29] add srcloc in mini-c --- src/passes/10-transpiler/transpiler.ml | 16 +++++++------ src/stages/5-mini_c/PP.ml | 4 ++-- src/stages/5-mini_c/combinators.ml | 33 ++++++++++++++------------ src/stages/5-mini_c/combinators.mli | 28 +++++++++++----------- src/stages/5-mini_c/misc.ml | 1 + src/stages/5-mini_c/types.ml | 2 ++ 6 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/passes/10-transpiler/transpiler.ml b/src/passes/10-transpiler/transpiler.ml index aa3ae5680..c0e1f9ea9 100644 --- a/src/passes/10-transpiler/transpiler.ml +++ b/src/passes/10-transpiler/transpiler.ml @@ -234,7 +234,7 @@ let transpile_constant' : AST.constant' -> constant' = function | C_CONVERT_FROM_RIGHT_COMB -> C_CONVERT_FROM_RIGHT_COMB let rec transpile_type (t:AST.type_expression) : type_expression result = - let return tc = ok @@ Expression.make_t @@ tc in + let return tc = ok @@ Expression.make_t ~loc:t.location @@ tc in match t.type_content with | T_variable (name) when Var.equal name Stage_common.Constant.t_bool -> return (T_base TB_bool) | t when (compare t (t_bool ()).type_content) = 0-> return (T_base TB_bool) @@ -392,7 +392,7 @@ and tree_of_sum : AST.type_expression -> (AST.constructor' * AST.type_expression and transpile_annotated_expression (ae:AST.expression) : expression result = let%bind tv = transpile_type ae.type_expression in - let return ?(tv = tv) expr = ok @@ Combinators.Expression.make_tpl (expr, tv) in + let return ?(tv = tv) expr = ok @@ Combinators.Expression.make_tpl ~loc:ae.location (expr, tv) in let info = let title () = "translating expression" in let content () = Format.asprintf "%a" Location.pp ae.location in @@ -474,10 +474,12 @@ and transpile_annotated_expression (ae:AST.expression) : expression result = let aux = fun pred (ty, lr) -> let c = match lr with | `Left -> C_CAR - | `Right -> C_CDR in - Combinators.Expression.make_tpl (E_constant {cons_name=c;arguments=[pred]} , ty) in + | `Right -> C_CDR + in + return ~tv:ty @@ E_constant {cons_name=c;arguments=[pred]} + in let%bind record' = transpile_annotated_expression record in - let expr = List.fold_left aux record' path in + let%bind expr = bind_fold_list aux record' path in ok expr | E_record_update {record; path; update} -> let rec aux res (r,p,up) = @@ -654,14 +656,14 @@ and transpile_lambda l (input_type , output_type) = let tv = Combinators.t_function input output in let binder = binder in let closure = E_closure { binder; body = result'} in - ok @@ Combinators.Expression.make_tpl (closure , tv) + ok @@ Combinators.Expression.make_tpl ~loc:result.location (closure , tv) and transpile_recursive {fun_name; fun_type; lambda} = let rec map_lambda : AST.expression_variable -> type_expression -> AST.expression -> (expression * expression_variable list) result = fun fun_name loop_type e -> match e.expression_content with E_lambda {binder;result} -> let%bind (body,l) = map_lambda fun_name loop_type result in - ok @@ (Expression.make (E_closure {binder;body}) loop_type, binder::l) + ok @@ (Expression.make ~loc:e.location (E_closure {binder;body}) loop_type, binder::l) | _ -> let%bind res = replace_callback fun_name loop_type false e in ok @@ (res, []) diff --git a/src/stages/5-mini_c/PP.ml b/src/stages/5-mini_c/PP.ml index 3ccde2f15..e69dddbc3 100644 --- a/src/stages/5-mini_c/PP.ml +++ b/src/stages/5-mini_c/PP.ml @@ -259,8 +259,8 @@ let%expect_test _ = let%expect_test _ = let pp = expression_content Format.std_formatter in - let dummy_type = {type_content=T_base TB_unit} in - let wrap e = { content = e ; type_expression = dummy_type} in + let dummy_type = {type_content=T_base TB_unit;location=Location.generated} in + let wrap e = { content = e ; type_expression = dummy_type ; location = Location.generated} in pp @@ E_closure { binder = Var.of_name "y" ; body = wrap (E_variable (Var.of_name "y")) } ; [%expect{| fun y -> (y) diff --git a/src/stages/5-mini_c/combinators.ml b/src/stages/5-mini_c/combinators.ml index 463eaefdc..ff421421c 100644 --- a/src/stages/5-mini_c/combinators.ml +++ b/src/stages/5-mini_c/combinators.ml @@ -8,18 +8,21 @@ module Expression = struct let get_content : t -> t' = fun e -> e.content let get_type : t -> type_expression = fun e -> e.type_expression - let make_t = fun tc -> { + let make_t ?(loc=Location.generated) = fun tc -> { type_content = tc; + location = loc; } - let make = fun e' t -> { + let make ?(loc=Location.generated) = fun e' t -> { content = e' ; type_expression = t ; + location = loc; } - let make_tpl = fun (e' , t) -> { + let make_tpl ?(loc=Location.generated) = fun (e' , t) -> { content = e' ; type_expression = t ; + location = loc; } let pair : t -> t -> t' = fun a b -> E_constant { cons_name = C_PAIR; arguments = [ a ; b ]} @@ -164,24 +167,24 @@ let get_operation (v:value) = match v with | _ -> simple_fail "not an operation" -let t_int () : type_expression = Expression.make_t @@ T_base TB_int -let t_unit () : type_expression = Expression.make_t @@ T_base TB_unit -let t_nat () : type_expression = Expression.make_t @@ T_base TB_nat +let t_int ?loc () : type_expression = Expression.make_t ?loc @@ T_base TB_int +let t_unit ?loc () : type_expression = Expression.make_t ?loc @@ T_base TB_unit +let t_nat ?loc () : type_expression = Expression.make_t ?loc @@ T_base TB_nat -let t_function x y : type_expression = Expression.make_t @@ T_function ( x , y ) -let t_pair x y : type_expression = Expression.make_t @@ T_pair ( x , y ) -let t_union x y : type_expression = Expression.make_t @@ T_or ( x , y ) +let t_function ?loc x y : type_expression = Expression.make_t ?loc @@ T_function ( x , y ) +let t_pair ?loc x y : type_expression = Expression.make_t ?loc @@ T_pair ( x , y ) +let t_union ?loc x y : type_expression = Expression.make_t ?loc @@ T_or ( x , y ) -let e_int expr : expression = Expression.make_tpl (expr, t_int ()) -let e_unit : expression = Expression.make_tpl (E_literal D_unit, t_unit ()) -let e_skip : expression = Expression.make_tpl (E_skip, t_unit ()) -let e_var_int name : expression = e_int (E_variable name) -let e_let_in v tv inline expr body : expression = Expression.(make_tpl ( +let e_int ?loc expr : expression = Expression.make_tpl ?loc (expr, t_int ()) +let e_unit ?loc () : expression = Expression.make_tpl ?loc (E_literal D_unit, t_unit ()) +let e_skip ?loc () : expression = Expression.make_tpl ?loc (E_skip, t_unit ()) +let e_var_int ?loc name : expression = e_int ?loc (E_variable name) +let e_let_in ?loc v tv inline expr body : expression = Expression.(make_tpl ?loc( E_let_in ((v , tv) , inline, expr , body) , get_type body )) -let ez_e_sequence a b : expression = Expression.(make_tpl (E_sequence (make_tpl (a , t_unit ()) , b) , get_type b)) +let ez_e_sequence ?loc a b : expression = Expression.(make_tpl (E_sequence (make_tpl ?loc (a , t_unit ()) , b) , get_type b)) let d_unit : value = D_unit diff --git a/src/stages/5-mini_c/combinators.mli b/src/stages/5-mini_c/combinators.mli index b17916a06..f198e8b8e 100644 --- a/src/stages/5-mini_c/combinators.mli +++ b/src/stages/5-mini_c/combinators.mli @@ -10,9 +10,9 @@ module Expression : sig (* val is_toplevel : t -> bool *) - val make_t : type_content -> type_expression - val make : t' -> type_expression -> t - val make_tpl : t' * type_expression -> t + val make_t : ?loc:Location.t -> type_content -> type_expression + val make : ?loc:Location.t -> t' -> type_expression -> t + val make_tpl : ?loc:Location.t -> t' * type_expression -> t val pair : t -> t -> t' end @@ -53,24 +53,24 @@ val get_t_contract : type_expression -> type_expression result val get_t_operation : type_expression -> type_expression result val get_operation : value -> Memory_proto_alpha.Protocol.Alpha_context.packed_internal_operation result -val t_int : unit -> type_expression -val t_unit : unit -> type_expression -val t_nat : unit -> type_expression -val t_function : type_expression -> type_expression -> type_expression -val t_pair : type_expression annotated -> type_expression annotated -> type_expression -val t_union : type_expression annotated -> type_expression annotated -> type_expression +val t_int : ?loc:Location.t -> unit -> type_expression +val t_unit : ?loc:Location.t -> unit -> type_expression +val t_nat : ?loc:Location.t -> unit -> type_expression +val t_function : ?loc:Location.t -> type_expression -> type_expression -> type_expression +val t_pair : ?loc:Location.t -> type_expression annotated -> type_expression annotated -> type_expression +val t_union : ?loc:Location.t -> type_expression annotated -> type_expression annotated -> type_expression (* val quote : string -> type_value -> type_value -> Expression.t -> anon_function val e_int : Expression.t' -> Expression.t *) -val e_unit : Expression.t -val e_skip : Expression.t -val e_var_int : expression_variable -> Expression.t -val e_let_in : expression_variable -> type_expression -> inline -> Expression.t -> Expression.t -> Expression.t +val e_unit : ?loc:Location.t -> unit -> Expression.t +val e_skip : ?loc:Location.t -> unit -> Expression.t +val e_var_int : ?loc:Location.t -> expression_variable -> Expression.t +val e_let_in : ?loc:Location.t -> expression_variable -> type_expression -> inline -> Expression.t -> Expression.t -> Expression.t -val ez_e_sequence : Expression.t' -> Expression.t -> expression +val ez_e_sequence : ?loc:Location.t -> Expression.t' -> Expression.t -> expression (* val ez_e_return : Expression.t -> Expression.t *) diff --git a/src/stages/5-mini_c/misc.ml b/src/stages/5-mini_c/misc.ml index 8f33e718f..eac909053 100644 --- a/src/stages/5-mini_c/misc.ml +++ b/src/stages/5-mini_c/misc.ml @@ -155,6 +155,7 @@ let aggregate_entry (lst : program) (form : form_t) : expression result = let e' = { content = E_closure l' ; type_expression = entry_expression.type_expression ; + location = entry_expression.location; } in ok e' ) diff --git a/src/stages/5-mini_c/types.ml b/src/stages/5-mini_c/types.ml index 9fa2c4e97..935b4389e 100644 --- a/src/stages/5-mini_c/types.ml +++ b/src/stages/5-mini_c/types.ml @@ -16,6 +16,7 @@ type type_content = and type_expression = { type_content : type_content; + location : Location.t; } and type_base = @@ -94,6 +95,7 @@ and expression_content = and expression = { content : expression_content ; type_expression : type_expression ; + location : Location.t; } and constant = { From a0f8bd941e488ae51fe006ca29c7edb34176bb72 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 19 May 2020 15:49:09 +0000 Subject: [PATCH 11/29] Interop docs --- gitlab-pages/docs/advanced/interop.md | 730 ++++++++++++++++++++++++++ gitlab-pages/website/sidebars.json | 5 +- src/test/md_file_tests.ml | 1 + 3 files changed, 734 insertions(+), 2 deletions(-) create mode 100644 gitlab-pages/docs/advanced/interop.md diff --git a/gitlab-pages/docs/advanced/interop.md b/gitlab-pages/docs/advanced/interop.md new file mode 100644 index 000000000..736efc8f8 --- /dev/null +++ b/gitlab-pages/docs/advanced/interop.md @@ -0,0 +1,730 @@ +--- +id: interop +title: Interop +--- + +import Syntax from '@theme/Syntax'; + +LIGO can work together with other smart contract languages on Tezos. However +data structures might have different representations in Michelson and not +correctly match the standard LIGO types. + +## Michelson types and annotations +Michelson types consist of `or`'s and `pair`'s, combined with field annotations. +Field annotations add contraints on a Michelson type, for example a pair of +`(pair (int %foo) (string %bar))` will only work with the exact equivalence or +the same type without the field annotations. + +To clarify: + +```michelson +(pair (int %foo) (string %bar)) +```` + +works with + +```michelson +(pair (int %foo) (string %bar)) +``` + +works with + +```michelson +(pair int string) +``` + +works not with + +```michelson +(pair (int %bar) (string %foo)) +``` + +works not with + +```michelson +(pair (string %bar) (int %foo)) +``` + +:::info +In the case of annotated entrypoints - the annotated `or` tree directly under +`parameter` in a contract - you should annotations, as otherwise it would +become unclear which entrypoint you are referring to. +::: + +## Entrypoints and annotations +It's possible for a contract to have multiple entrypoints, which translates in +LIGO to a `parameter` with a variant type as shown here: + + + +```pascaligo +type storage is int + +type parameter is + | Left of int + | Right of int + +function main (const p: parameter; const x: storage): (list(operation) * storage) is + ((nil: list(operation)), case p of + | Left(i) -> x - i + | Right(i) -> x + i + end) +``` + + + + +```cameligo +type storage = int + +type parameter = + | Left of int + | Right of int + +let main ((p, x): (parameter * storage)): (operation list * storage) = + (([]: operation list), (match p with + | Left i -> x - i + | Right i -> x + i + )) + +``` + + + + +```reasonligo +type storage = int + +type parameter = + | Left(int) + | Right(int) + +let main = ((p, x): (parameter, storage)): (list(operation), storage) => { + ([]: list(operation), (switch(p) { + | Left(i) => x - i + | Right(i) => x + i + })) +}; + +``` + + + +This contract can be called by another contract, like this one: + + + + +```pascaligo group=get_entrypoint_opt +type storage is int + +type parameter is int + +type x is Left of int + +function main (const p: parameter; const s: storage): (list(operation) * storage) is block { + const contract: contract(x) = + case (Tezos.get_entrypoint_opt("%left", ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx":address)): option(contract(x))) of + | Some (c) -> c + | None -> (failwith("not a correct contract") : contract(x)) + end; + + const result: (list(operation) * storage) = ((list [Tezos.transaction(Left(2), 2mutez, contract)]: list(operation)), s) +} with result +``` + + + + + + +```cameligo group=get_entrypoint_opt +type storage = int + +type parameter = int + +type x = Left of int + +let main (p, s: parameter * storage): operation list * storage = ( + let contract: x contract = + match ((Tezos.get_entrypoint_opt "%left" ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address)): x contract option) with + | Some c -> c + | None -> (failwith "contract does not match": x contract) + in + (([ + Tezos.transaction (Left 2) 2mutez contract; + ]: operation list), s) +) +``` + + + + + +```reasonligo group=get_entrypoint_opt +type storage = int; + +type parameter = int; + +type x = Left(int); + +let main = ((p, s): (parameter, storage)): (list(operation), storage) => { + let contract: contract(x) = + switch (Tezos.get_entrypoint_opt("%left", ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address)): option(contract(x))) { + | Some c => c + | None => (failwith ("contract does not match"): contract(x)) + }; + ([ + Tezos.transaction(Left(2), 2mutez, contract) + ]: list(operation), s); +}; +``` + + + +Notice how we directly use the `%left` entrypoint without mentioning the +`%right` entrypoint. This is done with the help of annotations. Without +annotations it wouldn't be clear what our `int` would be referring to. + +This currently only works for `or`'s or variant types in LIGO. + +## Interop with Michelson +To interop with existing Michelson code or for compatibility with certain +development tooling, LIGO has two special interop types: `michelson_or` and +`michelson_pair`. These types give the flexibility to model the exact Michelson +output, including field annotations. + +Take for example the following Michelson type that we want to interop with: + +```michelson +(or + (unit %z) + (or %other + (unit %y) + (pair %other + (string %x) + (pair %other + (int %w) + (nat %v))))) +``` + +To reproduce this type we can use the following LIGO code: + + + +```pascaligo +type w_and_v is michelson_pair(int, "w", nat, "v") +type x_and is michelson_pair(string, "x", w_and_v, "other") +type y_or is michelson_or(unit, "y", x_and, "other") +type z_or is michelson_or(unit, "z", y_or, "other") +``` + + + + +```cameligo +type w_and_v = (int, "w", nat, "v") michelson_pair +type x_and = (string, "x", w_and_v, "other") michelson_pair +type y_or = (unit, "y", x_and, "other") michelson_or +type z_or = (unit, "z", y_or, "other") michelson_or +``` + + + + +```reasonligo +type w_and_v = michelson_pair(int, "w", nat, "v") +type x_and = michelson_pair(string, "x", w_and_v, "other") +type y_or = michelson_or(unit, "y", x_and, "other") +type z_or = michelson_or(unit, "z", y_or, "other") +``` + + + +If you don't want to have an annotation, you need to provide an empty string. + +:::info +Alternatively, if annotations are not important you can also use plain tuples +for pair's instead. Plain tuples don't have any annotations. +::: + +To use variables of type `michelson_or` you have to use `M_left` and `M_right`. +`M_left` picks the left `or` case while `M_right` picks the right `or` case. +For `michelson_pair` you need to use tuples. + + + +```pascaligo +const z: z_or = (M_left (unit) : z_or); + +const y_1: y_or = (M_left (unit): y_or); +const y: z_or = (M_right (y_1) : z_or); + +const x_pair: x_and = ("foo", (2, 3n)); +const x_1: y_or = (M_right (x_pair): y_or); +const x: z_or = (M_right (y_1) : z_or); +``` + + + + +```cameligo +let z: z_or = (M_left (unit) : z_or) + +let y_1: y_or = (M_left (unit): y_or) +let y: z_or = (M_right (y_1) : z_or) + +let x_pair: x_and = ("foo", (2, 3n)) +let x_1: y_or = (M_right (x_pair): y_or) +let x: z_or = (M_right (y_1) : z_or) +``` + + + + +```reasonligo +let z: z_or = (M_left (unit) : z_or) + +let y_1: y_or = (M_left (unit): y_or) +let y: z_or = (M_right (y_1) : z_or) + +let x_pair: x_and = ("foo", (2, 3n)) +let x_1: y_or = (M_right (x_pair): y_or) +let x: z_or = (M_right (y_1) : z_or) +``` + + + +## Helper functions +Converting between different LIGO types and data structures can happen in two +ways. The first way is to use the provided layout conversion functions, and the +second way is to handle the layout conversion manually. + +:::info +In both cases it will increase the size of the smart contract and the +conversion will happen when running the smart contract. +::: + +### Converting left combed Michelson data structures +Here's an example of a left combed Michelson data structure using pairs: + +```michelson + (pair %other + (pair %other + (string %s) + (int %w) + ) + (nat %v) + ) +``` + +Which could respond with the following record type: + + + +```pascaligo +type l_record is record [ + s: string; + w: int; + v: nat +] +``` + + + + +```cameligo +type l_record = { + s: string; + w: int; + v: nat +} +``` + + + + +```reasonligo +type l_record = { + s: string, + w: int, + v: nat +} +``` + + + +If we want to convert from the Michelson type to our record type and vice +versa, we can use the following code: + + + +```pascaligo +type michelson is michelson_pair_left_comb(l_record) + +function of_michelson (const f: michelson) : l_record is + block { + const p: l_record = Layout.convert_from_left_comb(f) + } + with p + +function to_michelson (const f: l_record) : michelson is + block { + const p: michelson = Layout.convert_to_left_comb ((f: l_record)) + } + with p +``` + + + + +```cameligo +type michelson = l_record michelson_pair_left_comb + +let of_michelson (f: michelson) : l_record = + let p: l_record = Layout.convert_from_left_comb f in + p + +let to_michelson (f: l_record) : michelson = + let p = Layout.convert_to_left_comb (f: l_record) in + p +``` + + + + +```reasonligo +type michelson = michelson_pair_left_comb(l_record); + +let of_michelson = (f: michelson) : l_record => { + let p: l_record = Layout.convert_from_left_comb(f); + p +}; + +let to_michelson = (f: l_record) : michelson => { + let p = Layout.convert_to_left_comb(f: l_record); + p +} + +``` + + + +In the case of a left combed Michelson `or` data structure, that you want to +translate to a variant, you can use the `michelson_or_left_comb` type. + +For example: + + + +```pascaligo +type vari is +| Foo of int +| Bar of nat +| Other of bool + +type r is michelson_or_left_comb(vari) +``` + + + + +```cameligo +type vari = +| Foo of int +| Bar of nat +| Other of bool + +type r = vari michelson_or_left_comb +``` + + + + +```reasonligo +type vari = +| Foo(int) +| Bar(nat) +| Other(bool) + +type r = michelson_or_left_comb(vari) +``` + + + +And then use these types in `Layout.convert_from_left_comb` or +`Layout.convert_to_left_comb`, similar to the `pair`s example above, like this: + + + +```pascaligo +function of_michelson_or (const f: r) : vari is + block { + const p: vari = Layout.convert_from_left_comb(f) + } + with p + +function to_michelson_or (const f: vari) : r is + block { + const p: r = Layout.convert_to_left_comb((f: vari)) + } + with p +``` + + + + +```cameligo +let of_michelson_or (f: r) : vari = + let p: vari = Layout.convert_from_left_comb f in + p + +let to_michelson_or (f: vari) : r = + let p = Layout.convert_to_left_comb (f: vari) in + p +``` + + + + +```reasonligo +let of_michelson_or = (f: r) : vari => { + let p: vari = Layout.convert_from_left_comb(f); + p +}; + +let to_michelson_or = (f: vari) : r => { + let p = Layout.convert_to_left_comb(f: vari); + p +} + +``` + + + +### Converting right combed Michelson data structures + +In the case of right combed data structures, like: + +```michelson + (pair %other + (string %s) + (pair %other + (int %w) + (nat %v) + ) + ) +``` + +you can almost use the same code as that for the left combed data structures, +but with `michelson_or_right_comb`, `michelson_pair_right_comb`, +`Layout.convert_from_right_comb`, and `Layout.convert_to_left_comb` +respectively. + +### Manual data structure conversion +If you want to get your hands dirty, it's also possible to do manual data +structure conversion. + +The following code can be used as inspiration: + + + +```pascaligo group=helper_functions +type z_to_v is +| Z +| Y +| X +| W +| V + +type w_or_v is michelson_or(unit, "w", unit, "v") +type x_or is michelson_or(unit, "x", w_or_v, "other") +type y_or is michelson_or(unit, "y", x_or, "other") +type z_or is michelson_or(unit, "z", y_or, "other") + +type test is record [ + z: string; + y: int; + x: string; + w: bool; + v: int; +] + +function make_concrete_sum (const r: z_to_v) : z_or is block { + const z: z_or = (M_left (unit) : z_or); + + const y_1: y_or = (M_left (unit): y_or); + const y: z_or = (M_right (y_1) : z_or); + + const x_2: x_or = (M_left (unit): x_or); + const x_1: y_or = (M_right (x_2): y_or); + const x: z_or = (M_right (x_1) : z_or); + + const w_3: w_or_v = (M_left (unit): w_or_v); + const w_2: x_or = (M_right (w_3): x_or); + const w_1: y_or = (M_right (w_2): y_or); + const w: z_or = (M_right (w_1) : z_or); + + const v_3: w_or_v = (M_right (unit): w_or_v); + const v_2: x_or = (M_right (v_3): x_or); + const v_1: y_or = (M_right (v_2): y_or); + const v: z_or = (M_right (v_1) : z_or); +} + with (case r of + | Z -> z + | Y -> y + | X -> x + | W -> w + | V -> v + end) + + +function make_concrete_record (const r: test) : (string * int * string * bool * int) is + (r.z, r.y, r.x, r.w, r.v) + +function make_abstract_sum (const z_or: z_or) : z_to_v is + (case z_or of + | M_left (n) -> Z + | M_right (y_or) -> + (case y_or of + | M_left (n) -> Y + | M_right (x_or) -> + (case x_or of + | M_left (n) -> X + | M_right (w_or) -> + (case (w_or) of + | M_left (n) -> W + | M_right (n) -> V + end) + end) + end) + end) + +function make_abstract_record (const z: string; const y: int; const x: string; const w: bool; const v: int) : test is + record [ z = z; y = y; x = x; w = w; v = v ] + +``` + + + + + + +```cameligo group=helper_functions +type z_to_v = +| Z +| Y +| X +| W +| V + +type w_or_v = (unit, "w", unit, "v") michelson_or +type x_or = (unit, "x", w_or_v, "other") michelson_or +type y_or = (unit, "y", x_or, "other") michelson_or +type z_or = (unit, "z", y_or, "other") michelson_or + +type test = { + z: string; + y: int; + x: string; + w: bool; + v: int; +} + +let make_concrete_sum (r: z_to_v) : z_or = + match r with + | Z -> (M_left (unit) : z_or) + | Y -> (M_right (M_left (unit): y_or) : z_or ) + | X -> (M_right (M_right (M_left (unit): x_or): y_or) : z_or ) + | W -> (M_right (M_right (M_right (M_left (unit): w_or_v): x_or): y_or) : z_or ) + | V -> (M_right (M_right (M_right (M_right (unit): w_or_v): x_or): y_or) : z_or ) + +let make_concrete_record (r: test) : (string * int * string * bool * int) = + (r.z, r.y, r.x, r.w, r.v) + +let make_abstract_sum (z_or: z_or) : z_to_v = + match z_or with + | M_left n -> Z + | M_right y_or -> + (match y_or with + | M_left n -> Y + | M_right x_or -> ( + match x_or with + | M_left n -> X + | M_right w_or -> ( + match w_or with + | M_left n -> W + | M_right n -> V))) + + +let make_abstract_record (z: string) (y: int) (x: string) (w: bool) (v: int) : test = + { z = z; y = y; x = x; w = w; v = v } + +``` + + + + + +```reasonligo group=helper_functions +type z_to_v = +| Z +| Y +| X +| W +| V + +type w_or_v = michelson_or(unit, "w", unit, "v") +type x_or = michelson_or(unit, "x", w_or_v, "other") +type y_or = michelson_or(unit, "y", x_or, "other") +type z_or = michelson_or(unit, "z", y_or, "other") + +type test = { + z: string, + y: int, + x: string, + w: bool, + v: int +} + +let make_concrete_sum = (r: z_to_v) : z_or => + switch(r){ + | Z => (M_left (unit) : z_or) + | Y => (M_right (M_left (unit): y_or) : z_or ) + | X => (M_right (M_right (M_left (unit): x_or): y_or) : z_or ) + | W => (M_right (M_right (M_right (M_left (unit): w_or_v): x_or): y_or) : z_or ) + | V => (M_right (M_right (M_right (M_right (unit): w_or_v): x_or): y_or) : z_or ) + } + +let make_concrete_record = (r: test) : (string, int, string, bool, int) => + (r.z, r.y, r.x, r.w, r.v) + +let make_abstract_sum = (z_or: z_or) : z_to_v => + switch (z_or) { + | M_left n => Z + | M_right y_or => ( + switch (y_or) { + | M_left n => Y + | M_right x_or => ( + switch (x_or) { + | M_left n => X + | M_right w_or => ( + switch (w_or) { + | M_left n => W + | M_right n => V + }) + }) + }) + } + + +let make_abstract_record = (z: string, y: int, x: string, w: bool, v: int) : test => + { z : z, y, x, w, v } + +``` + + + +## Amendment +With the upcoming 007 amendment to Tezos this will change though, and also +`pair`'s can be ordered differently. \ No newline at end of file diff --git a/gitlab-pages/website/sidebars.json b/gitlab-pages/website/sidebars.json index 2d32e898b..7aef10a0e 100644 --- a/gitlab-pages/website/sidebars.json +++ b/gitlab-pages/website/sidebars.json @@ -19,8 +19,9 @@ "advanced/entrypoints-contracts", "advanced/include", "advanced/first-contract", - "advanced/michelson-and-ligo", - "advanced/inline" + "advanced/michelson-and-ligo", + "advanced/inline", + "advanced/interop" ], "Reference": [ "api/cli-commands", diff --git a/src/test/md_file_tests.ml b/src/test/md_file_tests.ml index 3ceb8c3a6..57ad2d8b2 100644 --- a/src/test/md_file_tests.ml +++ b/src/test/md_file_tests.ml @@ -123,6 +123,7 @@ let md_files = [ "/gitlab-pages/docs/advanced/entrypoints-contracts.md"; "/gitlab-pages/docs/advanced/timestamps-addresses.md"; "/gitlab-pages/docs/advanced/inline.md"; + "/gitlab-pages/docs/advanced/interop.md"; "/gitlab-pages/docs/api/cli-commands.md"; "/gitlab-pages/docs/api/cheat-sheet.md"; "/gitlab-pages/docs/reference/toplevel.md"; From 85dc95dc7bc02a31e07c5e8ead2c965853784ded Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Tue, 19 May 2020 18:53:20 +0200 Subject: [PATCH 12/29] solve to bug with location --- src/passes/2-concrete_to_imperative/cameligo.ml | 9 +++++---- .../4-imperative_to_sugar/imperative_to_sugar.ml | 14 +++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/passes/2-concrete_to_imperative/cameligo.ml b/src/passes/2-concrete_to_imperative/cameligo.ml index 34e34ed37..405b3fe74 100644 --- a/src/passes/2-concrete_to_imperative/cameligo.ml +++ b/src/passes/2-concrete_to_imperative/cameligo.ml @@ -218,7 +218,8 @@ let rec typed_pattern_to_typed_vars : Raw.pattern -> _ = fun pattern -> let (p,t) = pt.value.pattern,pt.value.type_expr in let%bind p = tuple_pattern_to_vars p in let%bind t = compile_type_expression t in - ok @@ (p,t) + let l = Location.lift pt.region in + ok @@ (p,t,l) | other -> (fail @@ wrong_pattern "parenthetical or type annotation" other) and unpar_pattern : Raw.pattern -> Raw.pattern = function @@ -452,7 +453,7 @@ let rec compile_expression : let f_args = nseq_to_list (binders) in let%bind lhs_type' = bind_map_option (fun x -> compile_type_expression (snd x)) lhs_type in let%bind ty = bind_map_list typed_pattern_to_typed_vars f_args in - let aux acc ty = Option.map (t_function (snd ty)) acc in + let aux acc (_,ty,loc) = Option.map (t_function ~loc ty) acc in ok @@ (List.fold_right' aux lhs_type' ty) | _ -> ok None ) @@ -928,7 +929,7 @@ and compile_declaration : Raw.declaration -> declaration Location.wrap list resu } in let f_args = nseq_to_list (param1,others) in let%bind ty = bind_map_list typed_pattern_to_typed_vars f_args in - let aux acc ty = Option.map (t_function (snd ty)) acc in + let aux acc (_,ty,loc) = Option.map (t_function ~loc ty) acc in ok (Raw.EFun {region; value=fun_},List.fold_right' aux lhs_type' ty) in let%bind rhs' = compile_expression let_rhs in @@ -938,7 +939,7 @@ and compile_declaration : Raw.declaration -> declaration Location.wrap list resu let f_args = nseq_to_list (binders) in let%bind lhs_type' = bind_map_option (fun x -> compile_type_expression (snd x)) lhs_type in let%bind ty = bind_map_list typed_pattern_to_typed_vars f_args in - let aux acc ty = Option.map (t_function (snd ty)) acc in + let aux acc (_,ty,loc) = Option.map (t_function ~loc ty) acc in ok @@ (List.fold_right' aux lhs_type' ty) | _ -> ok None ) diff --git a/src/passes/4-imperative_to_sugar/imperative_to_sugar.ml b/src/passes/4-imperative_to_sugar/imperative_to_sugar.ml index 9365932f4..224c2de10 100644 --- a/src/passes/4-imperative_to_sugar/imperative_to_sugar.ml +++ b/src/passes/4-imperative_to_sugar/imperative_to_sugar.ml @@ -253,7 +253,7 @@ and compile_expression' : I.expression -> (O.expression option -> O.expression) let%bind element = compile_expression element in return @@ O.e_constructor ~loc constructor element | I.E_matching m -> - let%bind m = compile_matching m in + let%bind m = compile_matching m loc in ok @@ m | I.E_record record -> let record = I.LMap.to_kv_list record in @@ -385,8 +385,8 @@ and compile_lambda : I.lambda -> O.lambda result = let%bind result = compile_expression result in ok @@ O.{binder;input_type;output_type;result} -and compile_matching : I.matching -> (O.expression option -> O.expression) result = - fun {matchee;cases} -> +and compile_matching : I.matching -> Location.t -> (O.expression option -> O.expression) result = + fun {matchee;cases} loc -> let return expr = ok @@ function | None -> expr | Some e -> O.e_sequence expr e @@ -412,7 +412,7 @@ and compile_matching : I.matching -> (O.expression option -> O.expression) resul in ok @@ restore_mutable_variable return_expr free_vars env else - return @@ O.e_matching matchee @@ O.Match_option {match_none=match_none'; match_some=(n,expr',tv)} + return @@ O.e_matching ~loc matchee @@ O.Match_option {match_none=match_none'; match_some=(n,expr',tv)} | I.Match_list {match_nil;match_cons} -> let%bind match_nil' = compile_expression match_nil in let (hd,tl,expr,tv) = match_cons in @@ -432,10 +432,10 @@ and compile_matching : I.matching -> (O.expression option -> O.expression) resul in ok @@ restore_mutable_variable return_expr free_vars env else - return @@ O.e_matching matchee @@ O.Match_list {match_nil=match_nil'; match_cons=(hd,tl,expr',tv)} + return @@ O.e_matching ~loc matchee @@ O.Match_list {match_nil=match_nil'; match_cons=(hd,tl,expr',tv)} | I.Match_tuple ((lst,expr), tv) -> let%bind expr = compile_expression expr in - return @@ O.e_matching matchee @@ O.Match_tuple ((lst,expr), tv) + return @@ O.e_matching ~loc matchee @@ O.Match_tuple ((lst,expr), tv) | I.Match_variant (lst,tv) -> let env = Var.fresh () in let aux fv ((c,n),expr) = @@ -448,7 +448,7 @@ and compile_matching : I.matching -> (O.expression option -> O.expression) resul let free_vars = List.sort_uniq Var.compare @@ List.concat fv in if (List.length free_vars == 0) then ( let cases = List.map (fun case -> let (a,_,b) = case in (a,b)) cases in - return @@ O.e_matching matchee @@ O.Match_variant (cases,tv) + return @@ O.e_matching ~loc matchee @@ O.Match_variant (cases,tv) ) else ( let cases = List.map (fun case -> let (a,b,_) = case in (a,b)) cases in let match_expr = O.e_matching matchee @@ O.Match_variant (cases,tv) in From 0199f3e448cc559b0beb59d116f92e2a9ee2faac Mon Sep 17 00:00:00 2001 From: galfour Date: Thu, 14 May 2020 14:27:28 +0200 Subject: [PATCH 13/29] produce I_LAMBDA instead of I_PUSH directly for functions --- src/passes/12-compiler/compiler_program.ml | 7 ++++--- src/passes/12-compiler/compiler_type.ml | 10 ++++++++-- src/passes/12-compiler/compiler_type.mli | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/passes/12-compiler/compiler_program.ml b/src/passes/12-compiler/compiler_program.ml index 1d3764a4c..c8459ed83 100644 --- a/src/passes/12-compiler/compiler_program.ml +++ b/src/passes/12-compiler/compiler_program.ml @@ -504,16 +504,17 @@ and translate_function_body ({body ; binder} : anon_function) lst input : michel and translate_function anon env input_ty output_ty : michelson result = let fvs = Mini_c.Free_variables.lambda [] anon in let small_env = Mini_c.Environment.select fvs env in - let%bind lambda_ty = Compiler_type.lambda_closure (small_env , input_ty , output_ty) in + let%bind (_lambda_ty , input_ty' , output_ty') = + Compiler_type.lambda_closure_with_ty (small_env , input_ty , output_ty) in let%bind lambda_body_code = translate_function_body anon small_env input_ty in match fvs with - | [] -> ok @@ seq [ i_push lambda_ty lambda_body_code ] + | [] -> ok @@ seq [ i_lambda input_ty' output_ty' lambda_body_code ] | _ :: _ -> let selector = List.map fst small_env in let%bind closure_pack_code = Compiler_environment.pack_closure env selector in ok @@ seq [ closure_pack_code ; - i_push lambda_ty lambda_body_code ; + i_lambda input_ty' output_ty' lambda_body_code ; i_swap ; i_apply ; ] diff --git a/src/passes/12-compiler/compiler_type.ml b/src/passes/12-compiler/compiler_type.ml index 31be45fcc..9329afab0 100644 --- a/src/passes/12-compiler/compiler_type.ml +++ b/src/passes/12-compiler/compiler_type.ml @@ -265,13 +265,19 @@ and environment = fun env -> @@ List.map snd env and lambda_closure = fun (c , arg , ret) -> + let%bind (lambda , _arg' , _ret') = + lambda_closure_with_ty (c , arg , ret) in + ok lambda + +and lambda_closure_with_ty = fun (c , arg , ret) -> let%bind arg = type_ arg in let%bind ret = type_ ret in match c with - | [] -> ok @@ O.t_lambda arg ret + | [] -> ok @@ (O.t_lambda arg ret , arg , ret) | _ :: _ -> let%bind capture = environment_closure c in - ok @@ O.t_lambda (O.t_pair capture arg) ret + let arg' = O.t_pair capture arg in + ok @@ (O.t_lambda arg' ret , arg' , ret) and environment_closure = function diff --git a/src/passes/12-compiler/compiler_type.mli b/src/passes/12-compiler/compiler_type.mli index eb2bd747a..1c6186c50 100644 --- a/src/passes/12-compiler/compiler_type.mli +++ b/src/passes/12-compiler/compiler_type.mli @@ -87,6 +87,8 @@ val environment_element : string * type_expression -> (int, O.prim) Tezos_michel val environment : ( 'a * type_expression ) list -> O.t list result val lambda_closure : environment * type_expression * type_expression -> (int, O.prim) Tezos_micheline.Micheline.node result +val lambda_closure_with_ty : environment * type_expression * type_expression -> + (O.michelson * O.michelson * O.michelson) result val environment_closure : environment -> (int , O.prim ) Tezos_micheline.Micheline.node result (* From 36cecfb019d91b11791646eecfde6e9a52ecd2be Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht <2654428-rinderkn@users.noreply.gitlab.com> Date: Wed, 20 May 2020 16:36:44 +0000 Subject: [PATCH 14/29] * Renamed AST.TStringLiteral into AST.TString * Fixed parsing of "begin let x = e1 in e2; e3 end" --- src/bin/expect_tests/contract_tests.ml | 54 +- src/passes/1-parser/cameligo/AST.ml | 4 +- src/passes/1-parser/cameligo/Parser.mly | 73 +- src/passes/1-parser/cameligo/ParserLog.ml | 6 +- .../cameligo/error.messages.checked-in | 2997 +++++++++++------ src/passes/1-parser/reasonligo/Parser.mly | 191 +- .../reasonligo/error.messages.checked-in | 1919 +++++------ .../2-concrete_to_imperative/cameligo.ml | 6 +- src/test/contracts/letin.mligo | 22 + src/test/contracts/letin.religo | 21 + src/test/integration_tests.ml | 37 +- 11 files changed, 3050 insertions(+), 2280 deletions(-) diff --git a/src/bin/expect_tests/contract_tests.ml b/src/bin/expect_tests/contract_tests.ml index bc2ec34eb..6de7be144 100644 --- a/src/bin/expect_tests/contract_tests.ml +++ b/src/bin/expect_tests/contract_tests.ml @@ -1692,4 +1692,56 @@ let%expect_test _ = * Visit our documentation: https://ligolang.org/docs/intro/introduction * Ask a question on our Discord: https://discord.gg/9rhYaEt * Open a gitlab issue: https://gitlab.com/ligolang/ligo/issues/new - * Check the changelog by running 'ligo changelog' |}] + * Check the changelog by running 'ligo changelog' |}]; + + run_ligo_good ["print-ast"; contract "letin.mligo"]; + [%expect {| + type storage = (int , + int) + const main : (int , + storage) -> ((TO_list(operation)) , + storage) = lambda (n:Some((int , + storage))) : None return let x = let x = 7 : int in (ADD(x , + n.0) , + ADD(n.1.0 , + n.1.1)) : (int , + int) in (list[] : (TO_list(operation)) , + x) + const f0 = lambda (a:Some(string)) : None return true(unit) + const f1 = lambda (a:Some(string)) : None return true(unit) + const f2 = lambda (a:Some(string)) : None return true(unit) + const letin_nesting = lambda (_:Some(unit)) : None return let s = "test" in let p0 = (f0)@(s) in { ASSERTION(p0); + let p1 = (f1)@(s) in { ASSERTION(p1); + let p2 = (f2)@(s) in { ASSERTION(p2); + s}}} + const letin_nesting2 = lambda (x:Some(int)) : None return let y = 2 in let z = 3 in ADD(ADD(x , + y) , + z) + |}]; + + run_ligo_good ["print-ast"; contract "letin.religo"]; + [%expect {| + type storage = (int , + int) + const main : (int , + storage) -> ((TO_list(operation)) , + storage) = lambda (n:Some((int , + storage))) : None return let x = let x = 7 : int in (ADD(x , + n.0) , + ADD(n.1.0 , + n.1.1)) : (int , + int) in (list[] : (TO_list(operation)) , + x) + const f0 = lambda (a:Some(string)) : None return true(unit) + const f1 = lambda (a:Some(string)) : None return true(unit) + const f2 = lambda (a:Some(string)) : None return true(unit) + const letin_nesting = lambda (_:Some(unit)) : None return let s = "test" in let p0 = (f0)@(s) in { ASSERTION(p0); + let p1 = (f1)@(s) in { ASSERTION(p1); + let p2 = (f2)@(s) in { ASSERTION(p2); + s}}} + const letin_nesting2 = lambda (x:Some(int)) : None return let y = 2 in let z = 3 in ADD(ADD(x , + y) , + z) + |}]; + + diff --git a/src/passes/1-parser/cameligo/AST.ml b/src/passes/1-parser/cameligo/AST.ml index 1282806fb..5ade8c346 100644 --- a/src/passes/1-parser/cameligo/AST.ml +++ b/src/passes/1-parser/cameligo/AST.ml @@ -166,7 +166,7 @@ and type_expr = | TFun of (type_expr * arrow * type_expr) reg | TPar of type_expr par reg | TVar of variable -| TStringLiteral of Lexer.lexeme reg +| TString of Lexer.lexeme reg and cartesian = (type_expr, times) nsepseq reg @@ -410,7 +410,7 @@ let type_expr_to_region = function | TApp {region; _} | TFun {region; _} | TPar {region; _} -| TStringLiteral {region; _} +| TString {region; _} | TVar {region; _} -> region let list_pattern_to_region = function diff --git a/src/passes/1-parser/cameligo/Parser.mly b/src/passes/1-parser/cameligo/Parser.mly index 7d7f32be5..24b747f93 100644 --- a/src/passes/1-parser/cameligo/Parser.mly +++ b/src/passes/1-parser/cameligo/Parser.mly @@ -147,9 +147,9 @@ cartesian: in TProd {region; value} } core_type: - type_name { TVar $1 } -| par(type_expr) { TPar $1 } -| "" { TStringLiteral $1 } + type_name { TVar $1 } +| par(type_expr) { TPar $1 } +| "" { TString $1 } | module_name "." type_name { let module_name = $1.value in let type_name = $3.value in @@ -457,15 +457,14 @@ case_clause(right_expr): let_expr(right_expr): "let" ioption("rec") let_binding seq(Attr) "in" right_expr { - let kwd_let = $1 - and kwd_rec = $2 - and binding = $3 - and attributes = $4 - and kwd_in = $5 - and body = $6 in - let stop = expr_to_region body in - let region = cover kwd_let stop - and value = {kwd_let; kwd_rec; binding; kwd_in; body; attributes} + let stop = expr_to_region $6 in + let region = cover $1 stop + and value = {kwd_let = $1; + kwd_rec = $2; + binding = $3; + attributes = $4; + kwd_in = $5; + body = $6} in ELetIn {region; value} } fun_expr(right_expr): @@ -476,8 +475,7 @@ fun_expr(right_expr): binders = $2; lhs_type = None; arrow = $3; - body = $4 - } + body = $4} in EFun {region; value} } disj_expr_level: @@ -653,7 +651,8 @@ update_record: field_path_assignment : nsepseq(field_name,".") "=" expr { - let region = cover (nsepseq_to_region (fun x -> x.region) $1) (expr_to_region $3) in + let start = nsepseq_to_region (fun x -> x.region) $1 in + let region = cover start (expr_to_region $3) in let value = {field_path = $1; assignment = $2; field_expr = $3} @@ -669,18 +668,52 @@ field_assignment: field_expr = $3} in {region; value} } +path : + "" { Name $1 } +| projection { Path $1 } + sequence: - "begin" sep_or_term_list(expr,";")? "end" { + "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 + Some ne_elements, terminator in let value = {compound; elements; terminator} in {region; value} } -path : - "" { Name $1 } -| projection { Path $1 } +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 } + +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 + 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 body = ESeq {region; value} in + let value = {kwd_let = $1; + kwd_rec = $2; + binding = $3; + attributes = $4; + kwd_in = $5; + body} + in ELetIn {region; value}, term } + +seq_expr: + disj_expr_level | if_then_else (seq_expr) { $1 } diff --git a/src/passes/1-parser/cameligo/ParserLog.ml b/src/passes/1-parser/cameligo/ParserLog.ml index f1de7c5a6..a3b159dae 100644 --- a/src/passes/1-parser/cameligo/ParserLog.ml +++ b/src/passes/1-parser/cameligo/ParserLog.ml @@ -162,7 +162,7 @@ and print_type_expr state = function | TPar par -> print_type_par state par | TVar var -> print_var state var | TFun t -> print_fun_type state t -| TStringLiteral s -> print_string state s +| TString s -> print_string state s and print_fun_type state {value; _} = let domain, arrow, range = value in @@ -1140,8 +1140,8 @@ and pp_type_expr state = function | TVar v -> pp_node state "TVar"; pp_ident (state#pad 1 0) v - | TStringLiteral s -> - pp_node state "String"; + | TString s -> + pp_node state "TString"; pp_string (state#pad 1 0) s and pp_type_tuple state {value; _} = diff --git a/src/passes/1-parser/cameligo/error.messages.checked-in b/src/passes/1-parser/cameligo/error.messages.checked-in index 270e55960..58869eaf3 100644 --- a/src/passes/1-parser/cameligo/error.messages.checked-in +++ b/src/passes/1-parser/cameligo/error.messages.checked-in @@ -1,40 +1,971 @@ -interactive_expr: Begin True RBRACKET +interactive_expr: Begin Fun WILD ARROW Bytes SEMI With ## -## Ends in an error in state: 218. +## Ends in an error in state: 483. ## -## sequence -> Begin option(sep_or_term_list(expr,SEMI)) . End [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] +## sequence -> Begin option(series) . End [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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(sep_or_term_list(expr,SEMI)) +## Begin option(series) +## + + + +interactive_expr: Begin Fun WILD ARROW With +## +## Ends in an error in state: 465. +## +## fun_expr(seq_expr) -> Fun nseq(irrefutable) ARROW . seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Fun nseq(irrefutable) ARROW +## + + + +interactive_expr: Begin Fun With +## +## Ends in an error in state: 463. +## +## fun_expr(seq_expr) -> Fun . nseq(irrefutable) ARROW seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Fun +## + + + +interactive_expr: Begin If True Then Fun WILD ARROW With +## +## Ends in an error in state: 452. +## +## fun_expr(closed_if) -> Fun nseq(irrefutable) ARROW . closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## Fun nseq(irrefutable) ARROW +## + + + +interactive_expr: Begin If True Then Fun With +## +## Ends in an error in state: 450. +## +## fun_expr(closed_if) -> Fun . nseq(irrefutable) ARROW closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## Fun +## + + + +interactive_expr: Begin If True Then If True Then True COMMA Bytes With +## +## Ends in an error in state: 455. +## +## if_then_else(closed_if) -> If expr Then closed_if . Else closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## If expr Then closed_if ## ## 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 243, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 221, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) -## In state 217, spurious reduction of production option(sep_or_term_list(expr,SEMI)) -> sep_or_term_list(expr,SEMI) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 342, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level +## In state 341, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) +## In state 218, spurious reduction of production tuple_expr -> tuple(disj_expr_level) +## In state 453, spurious reduction of production base_expr(closed_if) -> tuple_expr +## In state 353, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) +## In state 352, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) +## + + + +interactive_expr: Begin If True Then If True Then True Else With +## +## Ends in an error in state: 456. +## +## if_then_else(closed_if) -> If expr Then closed_if Else . closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## If expr Then closed_if Else +## + + + +interactive_expr: Begin If True Then If True Then With +## +## Ends in an error in state: 449. +## +## if_then_else(closed_if) -> If expr Then . closed_if Else closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## If expr Then +## + + + +interactive_expr: Begin If True Then If True With +## +## Ends in an error in state: 448. +## +## if_then_else(closed_if) -> If expr . Then closed_if Else closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## If expr +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## + + + +interactive_expr: Begin If True Then If With +## +## Ends in an error in state: 447. +## +## if_then_else(closed_if) -> If . expr Then closed_if Else closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## If +## + + + +interactive_expr: Begin If True Then Let Rec WILD EQ Bytes Attr Type +## +## Ends in an error in state: 445. +## +## let_expr(closed_if) -> Let Rec let_binding seq(Attr) . In closed_if [ Else ] +## +## 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 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin If True Then Let Rec WILD EQ Bytes In With +## +## Ends in an error in state: 446. +## +## let_expr(closed_if) -> Let Rec let_binding seq(Attr) In . closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## Let Rec let_binding seq(Attr) In +## + + + +interactive_expr: Begin If True Then Let Rec WILD EQ Bytes With +## +## Ends in an error in state: 444. +## +## let_expr(closed_if) -> Let Rec let_binding . seq(Attr) In closed_if [ Else ] +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin If True Then Let Rec With +## +## Ends in an error in state: 443. +## +## let_expr(closed_if) -> Let Rec . let_binding seq(Attr) In closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## Let Rec +## + + + +interactive_expr: Begin If True Then Let WILD EQ Bytes Attr Type +## +## Ends in an error in state: 458. +## +## let_expr(closed_if) -> Let let_binding seq(Attr) . In closed_if [ Else ] +## +## 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 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin If True Then Let WILD EQ Bytes In With +## +## Ends in an error in state: 459. +## +## let_expr(closed_if) -> Let let_binding seq(Attr) In . closed_if [ Else ] +## +## The known suffix of the stack is as follows: +## Let let_binding seq(Attr) In +## + + + +interactive_expr: Begin If True Then Let WILD EQ Bytes With +## +## Ends in an error in state: 457. +## +## let_expr(closed_if) -> Let let_binding . seq(Attr) In closed_if [ Else ] +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin If True Then Let With +## +## Ends in an error in state: 442. +## +## 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 ] +## +## The known suffix of the stack is as follows: +## Let +## + + + +interactive_expr: Begin If True Then Match True Type +## +## Ends in an error in state: 264. +## +## match_expr(base_if_then_else) -> Match expr . With option(VBAR) cases(base_if_then_else) [ Else ] +## +## The known suffix of the stack is as follows: +## Match 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## + + + +interactive_expr: Begin If True Then Match True With VBAR Begin +## +## Ends in an error in state: 266. +## +## match_expr(base_if_then_else) -> Match expr With option(VBAR) . cases(base_if_then_else) [ Else ] +## +## The known suffix of the stack is as follows: +## Match expr With option(VBAR) +## + + + +interactive_expr: Begin If True Then Match True With WILD ARROW Bytes With +## +## Ends in an error in state: 404. +## +## cases(base_cond) -> cases(base_cond) . VBAR case_clause(base_cond) [ VBAR ] +## cases(base_if_then_else) -> cases(base_cond) . VBAR case_clause(base_if_then_else) [ Else ] +## +## The known suffix of the stack is as follows: +## cases(base_cond) +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 390, spurious reduction of production base_expr(base_cond) -> disj_expr_level +## In state 354, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) +## In state 355, spurious reduction of production base_cond -> base_cond__open(base_cond) +## In state 401, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond +## In state 409, spurious reduction of production cases(base_cond) -> case_clause(base_cond) +## + + + +interactive_expr: Begin If True Then Match True With With +## +## Ends in an error in state: 265. +## +## match_expr(base_if_then_else) -> Match expr With . option(VBAR) cases(base_if_then_else) [ Else ] +## +## The known suffix of the stack is as follows: +## Match expr With +## + + + +interactive_expr: Begin If True Then Match With +## +## Ends in an error in state: 263. +## +## match_expr(base_if_then_else) -> Match . expr With option(VBAR) cases(base_if_then_else) [ Else ] +## +## The known suffix of the stack is as follows: +## Match +## + + + +interactive_expr: Begin If True Then True COMMA Bytes With +## +## Ends in an error in state: 460. +## +## if_then_else(seq_expr) -> If expr Then closed_if . Else seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## If expr Then closed_if +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 342, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level +## In state 341, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) +## In state 218, spurious reduction of production tuple_expr -> tuple(disj_expr_level) +## In state 453, spurious reduction of production base_expr(closed_if) -> tuple_expr +## In state 353, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) +## In state 352, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) +## + + + +interactive_expr: Begin If True Then True Else With +## +## Ends in an error in state: 461. +## +## if_then_else(seq_expr) -> If expr Then closed_if Else . seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## If expr Then closed_if Else +## + + + +interactive_expr: Begin If True Then True With +## +## Ends in an error in state: 454. +## +## 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 ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ Or Else COMMA BOOL_OR ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ Else ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## + + + +interactive_expr: Begin If True Then With +## +## Ends in an error in state: 441. +## +## if_then_else(seq_expr) -> If expr Then . closed_if Else seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## If expr Then +## + + + +interactive_expr: Begin If True With +## +## Ends in an error in state: 440. +## +## if_then_else(seq_expr) -> If expr . Then closed_if Else seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## If expr +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## + + + +interactive_expr: Begin If With +## +## Ends in an error in state: 439. +## +## if_then_else(seq_expr) -> If . expr Then closed_if Else seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## If +## + + + +interactive_expr: Begin Let Rec WILD EQ Bytes Attr Type +## +## Ends in an error in state: 437. +## +## last_expr -> 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 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin Let Rec WILD EQ Bytes In With +## +## Ends in an error in state: 438. +## +## last_expr -> 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 Let Rec WILD EQ Bytes With +## +## Ends in an error in state: 436. +## +## last_expr -> 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin Let Rec With +## +## Ends in an error in state: 435. +## +## last_expr -> Let Rec . let_binding seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let Rec +## + + + +interactive_expr: Begin Let WILD EQ Bytes Attr Type +## +## Ends in an error in state: 479. +## +## last_expr -> 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 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## + + + +interactive_expr: Begin Let WILD EQ Bytes In With +## +## Ends in an error in state: 480. +## +## last_expr -> 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 Let WILD EQ Bytes With +## +## Ends in an error in state: 478. +## +## last_expr -> 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## + + + +interactive_expr: Begin Let With +## +## Ends in an error in state: 434. +## +## last_expr -> Let . let_binding seq(Attr) In series [ End ] +## last_expr -> Let . Rec let_binding seq(Attr) In series [ End ] +## +## The known suffix of the stack is as follows: +## Let +## + + + +interactive_expr: Begin Match True Type +## +## Ends in an error in state: 240. +## +## match_expr(seq_expr) -> Match expr . With option(VBAR) cases(seq_expr) [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Match 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## + + + +interactive_expr: Begin Match True With VBAR Begin +## +## Ends in an error in state: 243. +## +## match_expr(seq_expr) -> Match expr With option(VBAR) . cases(seq_expr) [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Match expr With option(VBAR) +## + + + +interactive_expr: Begin Match True With WILD ARROW Bytes VBAR With +## +## Ends in an error in state: 431. +## +## 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 ] +## +## The known suffix of the stack is as follows: +## cases(base_cond) VBAR +## + + + +interactive_expr: Begin Match True With WILD ARROW If True Then True Else With +## +## Ends in an error in state: 424. +## +## 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 ] +## +## The known suffix of the stack is as follows: +## If expr Then closed_if Else +## + + + +interactive_expr: Begin Match True With WILD ARROW If True Then With +## +## Ends in an error in state: 422. +## +## if_then(base_cond) -> If expr Then . base_cond [ VBAR ] +## 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 ] +## +## The known suffix of the stack is as follows: +## If expr Then +## + + + +interactive_expr: Begin Match True With WILD ARROW If True With +## +## Ends in an error in state: 421. +## +## if_then(base_cond) -> If expr . Then base_cond [ VBAR ] +## 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 ] +## +## The known suffix of the stack is as follows: +## If expr +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## + + + +interactive_expr: Begin Match True With WILD ARROW If With +## +## Ends in an error in state: 420. +## +## if_then(base_cond) -> If . expr Then base_cond [ VBAR ] +## 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 ] +## +## The known suffix of the stack is as follows: +## If +## + + + +interactive_expr: Begin Match True With WILD ARROW True COMMA Bytes With +## +## Ends in an error in state: 430. +## +## 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 ] +## +## The known suffix of the stack is as follows: +## cases(base_cond) +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 342, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level +## In state 341, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) +## In state 218, spurious reduction of production tuple_expr -> tuple(disj_expr_level) +## In state 415, spurious reduction of production base_expr(base_cond) -> tuple_expr +## In state 354, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) +## In state 355, spurious reduction of production base_cond -> base_cond__open(base_cond) +## In state 401, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond +## In state 409, spurious reduction of production cases(base_cond) -> case_clause(base_cond) +## + + + +interactive_expr: Begin Match True With WILD ARROW True With +## +## Ends in an error in state: 427. +## +## 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 ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ VBAR SEMI Or End COMMA BOOL_OR ] +## seq_expr -> disj_expr_level . [ SEMI End ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ VBAR ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## + + + +interactive_expr: Begin Match True With WILD ARROW With +## +## Ends in an error in state: 254. +## +## case_clause(base_cond) -> pattern ARROW . base_cond [ VBAR ] +## case_clause(seq_expr) -> pattern ARROW . seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## pattern ARROW +## + + + +interactive_expr: Begin Match True With WILD CONS Bytes SEMI +## +## Ends in an error in state: 253. +## +## case_clause(base_cond) -> pattern . ARROW base_cond [ VBAR ] +## case_clause(seq_expr) -> pattern . ARROW seq_expr [ SEMI End ] +## +## The known suffix of the stack is as follows: +## pattern +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 96, spurious reduction of production tail -> sub_pattern +## In state 247, spurious reduction of production pattern -> sub_pattern CONS tail +## + + + +interactive_expr: Begin Match True With With +## +## Ends in an error in state: 241. +## +## match_expr(seq_expr) -> Match expr With . option(VBAR) cases(seq_expr) [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Match expr With +## + + + +interactive_expr: Begin Match With +## +## Ends in an error in state: 203. +## +## match_expr(seq_expr) -> Match . expr With option(VBAR) cases(seq_expr) [ SEMI End ] +## +## The known suffix of the stack is as follows: +## Match +## + + + +interactive_expr: Begin True SEMI With +## +## Ends in an error in state: 469. +## +## option(SEMI) -> SEMI . [ End ] +## series -> seq_expr SEMI . series [ End ] +## +## The known suffix of the stack is as follows: +## seq_expr SEMI +## + + + +interactive_expr: Begin True With +## +## Ends in an error in state: 462. +## +## 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 ] +## seq_expr -> disj_expr_level . [ SEMI End ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: Begin With ## -## Ends in an error in state: 201. +## Ends in an error in state: 202. ## -## sequence -> Begin . option(sep_or_term_list(expr,SEMI)) End [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] +## sequence -> Begin . option(series) End [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 @@ -44,7 +975,7 @@ interactive_expr: Begin With interactive_expr: C_None WILD ## -## Ends in an error in state: 222. +## Ends in an error in state: 219. ## ## add_expr_level -> mult_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] @@ -59,7 +990,7 @@ interactive_expr: C_None WILD interactive_expr: C_Some With ## -## Ends in an error in state: 202. +## Ends in an error in state: 204. ## ## constr_expr -> C_Some . core_expr [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -71,7 +1002,7 @@ interactive_expr: C_Some With interactive_expr: Constr DOT Ident DOT With ## -## Ends in an error in state: 196. +## Ends in an error in state: 197. ## ## projection -> Constr DOT Ident DOT . nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -83,7 +1014,7 @@ interactive_expr: Constr DOT Ident DOT With interactive_expr: Constr DOT Ident WILD ## -## Ends in an error in state: 195. +## Ends in an error in state: 196. ## ## module_fun -> Ident . [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -96,7 +1027,7 @@ interactive_expr: Constr DOT Ident WILD interactive_expr: Constr DOT With ## -## Ends in an error in state: 193. +## Ends in an error in state: 194. ## ## module_field -> Constr DOT . module_fun [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -109,7 +1040,7 @@ interactive_expr: Constr DOT With interactive_expr: Constr WILD ## -## Ends in an error in state: 192. +## Ends in an error in state: 193. ## ## constr_expr -> Constr . core_expr [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## constr_expr -> Constr . [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] @@ -124,9 +1055,9 @@ interactive_expr: Constr WILD interactive_expr: Fun WILD ARROW With ## -## Ends in an error in state: 190. +## Ends in an error in state: 191. ## -## fun_expr(expr) -> Fun nseq(irrefutable) ARROW . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(expr) -> Fun nseq(irrefutable) ARROW . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun nseq(irrefutable) ARROW @@ -136,7 +1067,7 @@ interactive_expr: Fun WILD ARROW With interactive_expr: Fun WILD RPAR ## -## Ends in an error in state: 308. +## Ends in an error in state: 357. ## ## nseq(irrefutable) -> irrefutable . seq(irrefutable) [ ARROW ] ## @@ -147,14 +1078,14 @@ interactive_expr: Fun 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 134, spurious reduction of production irrefutable -> sub_irrefutable +## In state 135, spurious reduction of production irrefutable -> sub_irrefutable ## interactive_expr: Fun WILD WILD RPAR ## -## Ends in an error in state: 310. +## Ends in an error in state: 359. ## ## seq(irrefutable) -> irrefutable . seq(irrefutable) [ ARROW ] ## @@ -165,16 +1096,16 @@ interactive_expr: Fun WILD 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 134, spurious reduction of production irrefutable -> sub_irrefutable +## In state 135, spurious reduction of production irrefutable -> sub_irrefutable ## interactive_expr: Fun With ## -## Ends in an error in state: 188. +## Ends in an error in state: 189. ## -## fun_expr(expr) -> Fun . nseq(irrefutable) ARROW expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(expr) -> Fun . nseq(irrefutable) ARROW expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun @@ -184,7 +1115,7 @@ interactive_expr: Fun With interactive_expr: Ident DOT Int DOT With ## -## Ends in an error in state: 185. +## Ends in an error in state: 186. ## ## nsepseq(selection,DOT) -> selection DOT . nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -196,7 +1127,7 @@ interactive_expr: Ident DOT Int DOT With interactive_expr: Ident DOT Int WILD ## -## Ends in an error in state: 184. +## Ends in an error in state: 185. ## ## nsepseq(selection,DOT) -> selection . [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## nsepseq(selection,DOT) -> selection . DOT nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -209,7 +1140,7 @@ interactive_expr: Ident DOT Int WILD interactive_expr: Ident DOT With ## -## Ends in an error in state: 181. +## Ends in an error in state: 182. ## ## projection -> Ident DOT . nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -221,7 +1152,7 @@ interactive_expr: Ident DOT With interactive_expr: Ident WILD ## -## Ends in an error in state: 180. +## Ends in an error in state: 181. ## ## core_expr -> Ident . [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -234,10 +1165,10 @@ interactive_expr: Ident WILD interactive_expr: If True Then Fun WILD ARROW With ## -## Ends in an error in state: 426. +## Ends in an error in state: 504. ## ## 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 End EOF COLON Attr ] +## fun_expr(expr) -> Fun nseq(irrefutable) ARROW . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun nseq(irrefutable) ARROW @@ -247,10 +1178,10 @@ interactive_expr: If True Then Fun WILD ARROW With interactive_expr: If True Then Fun With ## -## Ends in an error in state: 424. +## Ends in an error in state: 502. ## ## 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 End EOF COLON Attr ] +## fun_expr(expr) -> Fun . nseq(irrefutable) ARROW expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun @@ -260,10 +1191,10 @@ interactive_expr: If True Then Fun With interactive_expr: If True Then If True Then True Else With ## -## Ends in an error in state: 431. +## Ends in an error in state: 509. ## ## 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 End 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then closed_if Else @@ -273,11 +1204,11 @@ interactive_expr: If True Then If True Then True Else With interactive_expr: If True Then If True Then With ## -## Ends in an error in state: 423. +## Ends in an error in state: 501. ## -## if_then(expr) -> If expr Then . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] -## if_then_else(expr) -> If expr Then . closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then @@ -287,11 +1218,11 @@ interactive_expr: If True Then If True Then With interactive_expr: If True Then If True With ## -## Ends in an error in state: 422. +## Ends in an error in state: 500. ## -## if_then(expr) -> If expr . Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] -## if_then_else(expr) -> If expr . Then closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## If expr @@ -300,29 +1231,29 @@ interactive_expr: If True Then If True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: If True Then If With ## -## Ends in an error in state: 421. +## Ends in an error in state: 499. ## -## if_then(expr) -> If . expr Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] -## if_then_else(expr) -> If . expr Then closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## If @@ -332,10 +1263,10 @@ interactive_expr: If True Then If With interactive_expr: If True Then Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 419. +## Ends in an error in state: 497. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) @@ -344,18 +1275,18 @@ interactive_expr: If True Then Let Rec WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: If True Then Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 420. +## Ends in an error in state: 498. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) In @@ -365,10 +1296,10 @@ interactive_expr: If True Then Let Rec WILD EQ Bytes In With interactive_expr: If True Then Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 418. +## Ends in an error in state: 496. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding @@ -377,29 +1308,29 @@ interactive_expr: If True Then Let Rec WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: If True Then Let Rec With ## -## Ends in an error in state: 417. +## Ends in an error in state: 495. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let Rec . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec @@ -409,10 +1340,10 @@ interactive_expr: If True Then Let Rec With interactive_expr: If True Then Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 435. +## Ends in an error in state: 513. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) @@ -421,18 +1352,18 @@ interactive_expr: If True Then Let WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: If True Then Let WILD EQ Bytes In With ## -## Ends in an error in state: 436. +## Ends in an error in state: 514. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) In @@ -442,10 +1373,10 @@ interactive_expr: If True Then Let WILD EQ Bytes In With interactive_expr: If True Then Let WILD EQ Bytes With ## -## Ends in an error in state: 434. +## Ends in an error in state: 512. ## ## 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 End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding @@ -454,31 +1385,31 @@ interactive_expr: If True Then Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: If True Then Let With ## -## Ends in an error in state: 416. +## Ends in an error in state: 494. ## ## 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 ] -## let_expr(expr) -> Let . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## let_expr(expr) -> Let . Rec let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] +## let_expr(expr) -> Let . Rec let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let @@ -488,9 +1419,9 @@ interactive_expr: If True Then Let With interactive_expr: If True Then Match True Type ## -## Ends in an error in state: 315. +## Ends in an error in state: 490. ## -## match_expr(base_cond) -> Match expr . With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## match_expr(base_if_then_else) -> Match expr . With option(VBAR) cases(base_if_then_else) [ Else ] ## ## The known suffix of the stack is as follows: @@ -500,27 +1431,27 @@ interactive_expr: If True Then Match True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: If True Then Match True With VBAR Begin ## -## Ends in an error in state: 318. +## Ends in an error in state: 492. ## -## match_expr(base_cond) -> Match expr With option(VBAR) . cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## match_expr(base_if_then_else) -> Match expr With option(VBAR) . cases(base_if_then_else) [ Else ] ## ## The known suffix of the stack is as follows: @@ -531,9 +1462,9 @@ interactive_expr: If True Then Match True With VBAR Begin interactive_expr: If True Then Match True With WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 345. +## Ends in an error in state: 405. ## -## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## cases(base_if_then_else) -> cases(base_cond) VBAR . case_clause(base_if_then_else) [ Else ] ## ## The known suffix of the stack is as follows: @@ -544,9 +1475,9 @@ interactive_expr: If True Then Match True With WILD ARROW Bytes VBAR With interactive_expr: If True Then Match True With WILD ARROW Fun WILD ARROW With ## -## Ends in an error in state: 398. +## Ends in an error in state: 385. ## -## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## fun_expr(base_if_then_else) -> Fun nseq(irrefutable) ARROW . base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -557,9 +1488,9 @@ interactive_expr: If True Then Match True With WILD ARROW Fun WILD ARROW With interactive_expr: If True Then Match True With WILD ARROW Fun With ## -## Ends in an error in state: 396. +## Ends in an error in state: 383. ## -## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## fun_expr(base_if_then_else) -> Fun . nseq(irrefutable) ARROW base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -570,9 +1501,9 @@ interactive_expr: If True Then Match True With WILD ARROW Fun With interactive_expr: If True Then Match True With WILD ARROW If True Then True Else With ## -## Ends in an error in state: 395. +## Ends in an error in state: 382. ## -## if_then_else(base_cond) -> If expr Then closed_if Else . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## if_then_else(base_if_then_else) -> If expr Then closed_if Else . base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -583,10 +1514,10 @@ interactive_expr: If True Then Match True With WILD ARROW If True Then True Else interactive_expr: If True Then Match True With WILD ARROW If True Then With ## -## Ends in an error in state: 337. +## Ends in an error in state: 276. ## -## if_then(base_cond) -> If expr Then . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(base_if_then_else) -> If expr Then . closed_if Else base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -597,10 +1528,10 @@ interactive_expr: If True Then Match True With WILD ARROW If True Then With interactive_expr: If True Then Match True With WILD ARROW If True With ## -## Ends in an error in state: 336. +## Ends in an error in state: 275. ## -## if_then(base_cond) -> If expr . Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(base_if_then_else) -> If expr . Then closed_if Else base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -610,28 +1541,28 @@ interactive_expr: If True Then Match True With WILD ARROW If True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: If True Then Match True With WILD ARROW If With ## -## Ends in an error in state: 335. +## Ends in an error in state: 274. ## -## if_then(base_cond) -> If . expr Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(base_if_then_else) -> If . expr Then closed_if Else base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -642,9 +1573,9 @@ interactive_expr: If True Then Match True With WILD ARROW If With interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 333. +## Ends in an error in state: 272. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(base_if_then_else) -> Let Rec let_binding seq(Attr) . In base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -654,17 +1585,17 @@ interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 334. +## Ends in an error in state: 273. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(base_if_then_else) -> Let Rec let_binding seq(Attr) In . base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -675,9 +1606,9 @@ interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 332. +## Ends in an error in state: 271. ## -## let_expr(base_cond) -> Let Rec let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(base_if_then_else) -> Let Rec let_binding . seq(Attr) In base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -687,28 +1618,28 @@ interactive_expr: If True Then Match True With WILD ARROW Let Rec WILD EQ Bytes ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: If True Then Match True With WILD ARROW Let Rec With ## -## Ends in an error in state: 331. +## Ends in an error in state: 270. ## -## let_expr(base_cond) -> Let Rec . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(base_if_then_else) -> Let Rec . let_binding seq(Attr) In base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -719,9 +1650,9 @@ interactive_expr: If True Then Match True With WILD ARROW Let Rec With interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 410. +## Ends in an error in state: 397. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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_if_then_else) -> Let let_binding seq(Attr) . In base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -731,17 +1662,17 @@ interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes Attr ## 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes In With ## -## Ends in an error in state: 411. +## Ends in an error in state: 398. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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_if_then_else) -> Let let_binding seq(Attr) In . base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -752,9 +1683,9 @@ interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes In W interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes With ## -## Ends in an error in state: 409. +## Ends in an error in state: 396. ## -## let_expr(base_cond) -> Let let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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_if_then_else) -> Let let_binding . seq(Attr) In base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -764,29 +1695,29 @@ interactive_expr: If True Then Match True With WILD ARROW Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: If True Then Match True With WILD ARROW Let With ## -## Ends in an error in state: 330. +## Ends in an error in state: 269. ## -## let_expr(base_cond) -> Let . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## let_expr(base_if_then_else) -> Let . let_binding seq(Attr) In base_if_then_else [ Else ] ## let_expr(base_if_then_else) -> Let . Rec let_binding seq(Attr) In base_if_then_else [ Else ] ## @@ -796,11 +1727,41 @@ interactive_expr: If True Then Match True With WILD ARROW Let With +interactive_expr: If True Then Match True With WILD ARROW True End +## +## Ends in an error in state: 390. +## +## base_expr(base_cond) -> disj_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] +## base_expr(base_if_then_else) -> disj_expr_level . [ Else ] +## 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 Else EOF COMMA COLON BOOL_OR Attr ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## + + + interactive_expr: If True Then Match True With WILD ARROW With ## -## Ends in an error in state: 329. +## Ends in an error in state: 268. ## -## case_clause(base_cond) -> pattern ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## case_clause(base_cond) -> pattern ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## case_clause(base_if_then_else) -> pattern ARROW . base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -811,9 +1772,9 @@ interactive_expr: If True Then Match True With WILD ARROW With interactive_expr: If True Then Match True With WILD CONS Bytes SEMI ## -## Ends in an error in state: 328. +## Ends in an error in state: 267. ## -## case_clause(base_cond) -> pattern . ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## case_clause(base_cond) -> pattern . ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## case_clause(base_if_then_else) -> pattern . ARROW base_if_then_else [ Else ] ## ## The known suffix of the stack is as follows: @@ -823,17 +1784,17 @@ interactive_expr: If True Then Match True With WILD CONS Bytes SEMI ## 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 95, spurious reduction of production tail -> sub_pattern -## In state 322, spurious reduction of production pattern -> sub_pattern CONS tail +## In state 96, spurious reduction of production tail -> sub_pattern +## In state 247, spurious reduction of production pattern -> sub_pattern CONS tail ## interactive_expr: If True Then Match True With With ## -## Ends in an error in state: 316. +## Ends in an error in state: 491. ## -## match_expr(base_cond) -> Match expr With . option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## match_expr(base_if_then_else) -> Match expr With . option(VBAR) cases(base_if_then_else) [ Else ] ## ## The known suffix of the stack is as follows: @@ -844,9 +1805,9 @@ interactive_expr: If True Then Match True With With interactive_expr: If True Then Match With ## -## Ends in an error in state: 314. +## Ends in an error in state: 489. ## -## match_expr(base_cond) -> Match . expr With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## match_expr(base_if_then_else) -> Match . expr With option(VBAR) cases(base_if_then_else) [ Else ] ## ## The known suffix of the stack is as follows: @@ -857,10 +1818,10 @@ interactive_expr: If True Then Match With interactive_expr: If True Then True COMMA Bytes VBAR ## -## Ends in an error in state: 427. +## Ends in an error in state: 505. ## ## base_expr(closed_if) -> tuple_expr . [ Else ] -## base_expr(expr) -> tuple_expr . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## base_expr(expr) -> tuple_expr . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## tuple_expr @@ -869,27 +1830,27 @@ interactive_expr: If True Then True COMMA 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 295, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level -## In state 294, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) -## In state 216, spurious reduction of production tuple_expr -> tuple(disj_expr_level) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 342, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level +## In state 341, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) +## In state 218, spurious reduction of production tuple_expr -> tuple(disj_expr_level) ## interactive_expr: If True Then True Else With ## -## Ends in an error in state: 439. +## Ends in an error in state: 517. ## -## if_then_else(expr) -> If expr Then closed_if Else . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then closed_if Else @@ -899,13 +1860,13 @@ interactive_expr: If True Then True Else With interactive_expr: If True Then True VBAR ## -## Ends in an error in state: 428. +## Ends in an error in state: 506. ## ## base_expr(closed_if) -> disj_expr_level . [ Else ] -## base_expr(expr) -> disj_expr_level . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In End Else EOF COMMA COLON BOOL_OR Attr ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In End Else EOF COMMA COLON BOOL_OR Attr ] -## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End Else EOF COLON Attr ] +## base_expr(expr) -> disj_expr_level . [ With 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 Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level @@ -914,25 +1875,25 @@ interactive_expr: If True Then True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: If True Then With ## -## Ends in an error in state: 313. +## Ends in an error in state: 488. ## -## if_then(expr) -> If expr Then . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## if_then_else(expr) -> If expr Then . closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then @@ -942,10 +1903,10 @@ interactive_expr: If True Then With interactive_expr: If True With ## -## Ends in an error in state: 312. +## Ends in an error in state: 487. ## -## if_then(expr) -> If expr . Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## if_then_else(expr) -> If expr . Then closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If expr @@ -954,28 +1915,28 @@ interactive_expr: If True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: If With ## -## Ends in an error in state: 179. +## Ends in an error in state: 180. ## -## if_then(expr) -> If . expr Then expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## if_then_else(expr) -> If . expr Then closed_if Else expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If @@ -985,7 +1946,7 @@ interactive_expr: If With interactive_expr: LBRACE Constr DOT Ident With ## -## Ends in an error in state: 443. +## Ends in an error in state: 521. ## ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With ] ## @@ -997,7 +1958,7 @@ interactive_expr: LBRACE Constr DOT Ident With interactive_expr: LBRACE Constr DOT With ## -## Ends in an error in state: 442. +## Ends in an error in state: 520. ## ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With ] ## @@ -1009,7 +1970,7 @@ interactive_expr: LBRACE Constr DOT With interactive_expr: LBRACE Constr With ## -## Ends in an error in state: 441. +## Ends in an error in state: 519. ## ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With ] ## @@ -1021,7 +1982,7 @@ interactive_expr: LBRACE Constr With interactive_expr: LBRACE Ident DOT Ident VBAR ## -## Ends in an error in state: 447. +## Ends in an error in state: 525. ## ## update_record -> LBRACE path . With sep_or_term_list(field_path_assignment,SEMI) RBRACE [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -1032,16 +1993,16 @@ interactive_expr: LBRACE Ident DOT 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 184, spurious reduction of production nsepseq(selection,DOT) -> selection -## In state 187, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) -## In state 446, spurious reduction of production path -> projection +## In state 185, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 188, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 524, spurious reduction of production path -> projection ## interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 474. +## Ends in an error in state: 552. ## ## 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 ] @@ -1054,7 +2015,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: 473. +## Ends in an error in state: 551. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACE ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACE ] @@ -1067,26 +2028,26 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 440, spurious reduction of production field_assignment -> Ident EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 518, spurious reduction of production field_assignment -> Ident EQ expr ## interactive_expr: LBRACE Ident EQ Bytes SEMI Ident With ## -## Ends in an error in state: 470. +## Ends in an error in state: 548. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACE ] ## @@ -1098,7 +2059,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident With interactive_expr: LBRACE Ident EQ Bytes SEMI With ## -## Ends in an error in state: 469. +## Ends in an error in state: 547. ## ## 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 ] @@ -1111,7 +2072,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident EQ Bytes With ## -## Ends in an error in state: 468. +## Ends in an error in state: 546. ## ## nsepseq(field_assignment,SEMI) -> field_assignment . [ RBRACE ] ## nsepseq(field_assignment,SEMI) -> field_assignment . SEMI nsepseq(field_assignment,SEMI) [ RBRACE ] @@ -1124,26 +2085,26 @@ interactive_expr: LBRACE Ident EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 440, spurious reduction of production field_assignment -> Ident EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 518, spurious reduction of production field_assignment -> Ident EQ expr ## interactive_expr: LBRACE Ident EQ With ## -## Ends in an error in state: 177. +## Ends in an error in state: 178. ## ## field_assignment -> Ident EQ . expr [ SEMI RBRACE ] ## @@ -1155,7 +2116,7 @@ interactive_expr: LBRACE Ident EQ With interactive_expr: LBRACE Ident WILD ## -## Ends in an error in state: 176. +## Ends in an error in state: 177. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACE ] ## path -> Ident . [ With ] @@ -1169,7 +2130,7 @@ interactive_expr: LBRACE Ident WILD interactive_expr: LBRACE Ident With Ident DOT With ## -## Ends in an error in state: 450. +## Ends in an error in state: 528. ## ## nsepseq(field_name,DOT) -> Ident DOT . nsepseq(field_name,DOT) [ EQ ] ## @@ -1181,7 +2142,7 @@ interactive_expr: LBRACE Ident With Ident DOT With interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 464. +## Ends in an error in state: 542. ## ## 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 ] @@ -1194,7 +2155,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: 463. +## Ends in an error in state: 541. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACE ] @@ -1207,26 +2168,26 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI Ident EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 458, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 536, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) EQ expr ## interactive_expr: LBRACE Ident With Ident EQ Bytes SEMI With ## -## Ends in an error in state: 460. +## Ends in an error in state: 538. ## ## 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 ] @@ -1239,7 +2200,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: 459. +## Ends in an error in state: 537. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACE ] @@ -1252,26 +2213,26 @@ interactive_expr: LBRACE Ident With Ident EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 458, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 536, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) EQ expr ## interactive_expr: LBRACE Ident With Ident EQ With ## -## Ends in an error in state: 457. +## Ends in an error in state: 535. ## ## field_path_assignment -> nsepseq(field_name,DOT) EQ . expr [ SEMI RBRACE ] ## @@ -1283,7 +2244,7 @@ interactive_expr: LBRACE Ident With Ident EQ With interactive_expr: LBRACE Ident With Ident With ## -## Ends in an error in state: 449. +## Ends in an error in state: 527. ## ## nsepseq(field_name,DOT) -> Ident . [ EQ ] ## nsepseq(field_name,DOT) -> Ident . DOT nsepseq(field_name,DOT) [ EQ ] @@ -1296,7 +2257,7 @@ interactive_expr: LBRACE Ident With Ident With interactive_expr: LBRACE Ident With With ## -## Ends in an error in state: 448. +## Ends in an error in state: 526. ## ## update_record -> LBRACE path With . sep_or_term_list(field_path_assignment,SEMI) RBRACE [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -1308,7 +2269,7 @@ interactive_expr: LBRACE Ident With With interactive_expr: LBRACE With ## -## Ends in an error in state: 175. +## Ends in an error in state: 176. ## ## record_expr -> LBRACE . sep_or_term_list(field_assignment,SEMI) RBRACE [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## update_record -> LBRACE . path With sep_or_term_list(field_path_assignment,SEMI) RBRACE [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -1319,44 +2280,12 @@ interactive_expr: LBRACE With -interactive_expr: LBRACKET True End -## -## Ends in an error in state: 479. -## -## list__(expr) -> LBRACKET option(sep_or_term_list(expr,SEMI)) . RBRACKET [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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: -## LBRACKET option(sep_or_term_list(expr,SEMI)) -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 243, spurious reduction of production nsepseq(expr,SEMI) -> expr -## In state 221, spurious reduction of production sep_or_term_list(expr,SEMI) -> nsepseq(expr,SEMI) -## In state 217, spurious reduction of production option(sep_or_term_list(expr,SEMI)) -> sep_or_term_list(expr,SEMI) -## - - - interactive_expr: LBRACKET True SEMI True SEMI With ## -## Ends in an error in state: 248. +## Ends in an error in state: 567. ## -## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] -## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] +## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] +## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] ## ## The known suffix of the stack is as follows: ## expr SEMI @@ -1366,11 +2295,11 @@ interactive_expr: LBRACKET True SEMI True SEMI With interactive_expr: LBRACKET True SEMI True With ## -## Ends in an error in state: 247. +## Ends in an error in state: 566. ## -## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] -## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] -## seq(__anonymous_0(expr,SEMI)) -> expr . SEMI seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] +## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] +## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] +## seq(__anonymous_0(expr,SEMI)) -> expr . SEMI seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] ## ## The known suffix of the stack is as follows: ## expr @@ -1379,28 +2308,28 @@ interactive_expr: LBRACKET True SEMI True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: LBRACKET True SEMI With ## -## Ends in an error in state: 244. +## Ends in an error in state: 563. ## -## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET End ] -## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] +## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] +## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] ## ## The known suffix of the stack is as follows: ## expr SEMI @@ -1410,11 +2339,11 @@ interactive_expr: LBRACKET True SEMI With interactive_expr: LBRACKET True With ## -## Ends in an error in state: 243. +## Ends in an error in state: 562. ## -## nsepseq(expr,SEMI) -> expr . [ RBRACKET End ] -## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET End ] -## nseq(__anonymous_0(expr,SEMI)) -> expr . SEMI seq(__anonymous_0(expr,SEMI)) [ RBRACKET End ] +## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] +## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] +## nseq(__anonymous_0(expr,SEMI)) -> expr . SEMI seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] ## ## The known suffix of the stack is as follows: ## expr @@ -1423,25 +2352,25 @@ interactive_expr: LBRACKET True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: LBRACKET With ## -## Ends in an error in state: 167. +## Ends in an error in state: 168. ## ## list__(expr) -> LBRACKET . option(sep_or_term_list(expr,SEMI)) RBRACKET [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -1451,9 +2380,9 @@ interactive_expr: LBRACKET With -interactive_expr: LPAR True COLON Ident VBAR +interactive_expr: LPAR True COLON String VBAR ## -## Ends in an error in state: 510. +## Ends in an error in state: 580. ## ## par(__anonymous_1) -> LPAR expr COLON type_expr . RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -1464,16 +2393,16 @@ interactive_expr: LPAR True 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type +## 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 ## interactive_expr: LPAR True COLON With ## -## Ends in an error in state: 509. +## Ends in an error in state: 579. ## ## par(__anonymous_1) -> LPAR expr COLON . type_expr RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## @@ -1485,7 +2414,7 @@ interactive_expr: LPAR True COLON With interactive_expr: LPAR True With ## -## Ends in an error in state: 507. +## Ends in an error in state: 577. ## ## par(__anonymous_1) -> LPAR expr . COLON type_expr RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## par(expr) -> LPAR expr . RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -1497,25 +2426,25 @@ interactive_expr: LPAR True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: LPAR With ## -## Ends in an error in state: 164. +## Ends in an error in state: 165. ## ## par(__anonymous_1) -> LPAR . expr COLON type_expr RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## par(expr) -> LPAR . expr RPAR [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -1529,9 +2458,9 @@ interactive_expr: LPAR With interactive_expr: Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 173. +## Ends in an error in state: 174. ## -## let_expr(expr) -> Let Rec let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) @@ -1540,17 +2469,17 @@ interactive_expr: Let Rec WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 174. +## Ends in an error in state: 175. ## -## let_expr(expr) -> Let Rec let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) In @@ -1560,9 +2489,9 @@ interactive_expr: Let Rec WILD EQ Bytes In With interactive_expr: Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 170. +## Ends in an error in state: 171. ## -## let_expr(expr) -> Let Rec let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let Rec let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding @@ -1571,28 +2500,28 @@ interactive_expr: Let Rec WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Let Rec With ## -## Ends in an error in state: 169. +## Ends in an error in state: 170. ## -## let_expr(expr) -> Let Rec . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let Rec . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let Rec @@ -1602,9 +2531,9 @@ interactive_expr: Let Rec With interactive_expr: Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 477. +## Ends in an error in state: 555. ## -## let_expr(expr) -> Let let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding seq(Attr) . In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) @@ -1613,17 +2542,17 @@ interactive_expr: Let WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Let WILD EQ Bytes In With ## -## Ends in an error in state: 478. +## Ends in an error in state: 556. ## -## let_expr(expr) -> Let let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding seq(Attr) In . expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) In @@ -1633,9 +2562,9 @@ interactive_expr: Let WILD EQ Bytes In With interactive_expr: Let WILD EQ Bytes With ## -## Ends in an error in state: 476. +## Ends in an error in state: 554. ## -## let_expr(expr) -> Let let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let let_binding . seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let let_binding @@ -1644,29 +2573,29 @@ interactive_expr: Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Let With ## -## Ends in an error in state: 168. +## Ends in an error in state: 169. ## -## let_expr(expr) -> Let . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## let_expr(expr) -> Let . Rec let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## let_expr(expr) -> Let . let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] +## let_expr(expr) -> Let . Rec let_binding seq(Attr) In expr [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Let @@ -1676,7 +2605,7 @@ interactive_expr: Let With interactive_expr: MINUS With ## -## Ends in an error in state: 166. +## Ends in an error in state: 167. ## ## unary_expr_level -> MINUS . call_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -1688,9 +2617,9 @@ interactive_expr: MINUS With interactive_expr: Match True Type ## -## Ends in an error in state: 482. +## Ends in an error in state: 570. ## -## match_expr(base_cond) -> Match expr . With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Match expr @@ -1699,25 +2628,25 @@ interactive_expr: Match True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: Match True With LPAR Bytes RPAR With ## -## Ends in an error in state: 320. +## Ends in an error in state: 245. ## ## pattern -> sub_pattern . CONS tail [ ARROW ] ## tuple(sub_pattern) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ ARROW ] @@ -1730,9 +2659,9 @@ interactive_expr: Match True With LPAR Bytes RPAR With interactive_expr: Match True With VBAR Begin ## -## Ends in an error in state: 484. +## Ends in an error in state: 572. ## -## match_expr(base_cond) -> Match expr With option(VBAR) . cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Match expr With option(VBAR) @@ -1742,9 +2671,9 @@ interactive_expr: Match True With VBAR Begin interactive_expr: Match True With WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 506. +## Ends in an error in state: 576. ## -## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## cases(base_cond) -> cases(base_cond) VBAR . case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## cases(base_cond) VBAR @@ -1754,9 +2683,9 @@ interactive_expr: Match True With WILD ARROW Bytes VBAR With interactive_expr: Match True With WILD ARROW Fun WILD ARROW With ## -## Ends in an error in state: 499. +## Ends in an error in state: 414. ## -## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun nseq(irrefutable) ARROW @@ -1766,9 +2695,9 @@ interactive_expr: Match True With WILD ARROW Fun WILD ARROW With interactive_expr: Match True With WILD ARROW Fun With ## -## Ends in an error in state: 497. +## Ends in an error in state: 412. ## -## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## Fun @@ -1778,9 +2707,9 @@ interactive_expr: Match True With WILD ARROW Fun With interactive_expr: Match True With WILD ARROW If True Then Fun WILD ARROW With ## -## Ends in an error in state: 360. +## Ends in an error in state: 287. ## -## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun nseq(irrefutable) ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## fun_expr(closed_if) -> Fun nseq(irrefutable) ARROW . closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1791,9 +2720,9 @@ interactive_expr: Match True With WILD ARROW If True Then Fun WILD ARROW With interactive_expr: Match True With WILD ARROW If True Then Fun With ## -## Ends in an error in state: 358. +## Ends in an error in state: 285. ## -## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## fun_expr(base_cond) -> Fun . nseq(irrefutable) ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## fun_expr(closed_if) -> Fun . nseq(irrefutable) ARROW closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1804,9 +2733,9 @@ interactive_expr: Match True With WILD ARROW If True Then Fun With interactive_expr: Match True With WILD ARROW If True Then If True Then True Else With ## -## Ends in an error in state: 379. +## Ends in an error in state: 362. ## -## if_then_else(base_cond) -> If expr Then closed_if Else . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## if_then_else(closed_if) -> If expr Then closed_if Else . closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1817,10 +2746,10 @@ interactive_expr: Match True With WILD ARROW If True Then If True Then True Else interactive_expr: Match True With WILD ARROW If True Then If True Then With ## -## Ends in an error in state: 357. +## Ends in an error in state: 284. ## -## if_then(base_cond) -> If expr Then . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(closed_if) -> If expr Then . closed_if Else closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1831,10 +2760,10 @@ interactive_expr: Match True With WILD ARROW If True Then If True Then With interactive_expr: Match True With WILD ARROW If True Then If True With ## -## Ends in an error in state: 356. +## Ends in an error in state: 283. ## -## if_then(base_cond) -> If expr . Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(closed_if) -> If expr . Then closed_if Else closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1844,28 +2773,28 @@ interactive_expr: Match True With WILD ARROW If True Then If True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: Match True With WILD ARROW If True Then If With ## -## Ends in an error in state: 355. +## Ends in an error in state: 282. ## -## if_then(base_cond) -> If . expr Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## if_then_else(closed_if) -> If . expr Then closed_if Else closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1876,9 +2805,9 @@ interactive_expr: Match True With WILD ARROW If True Then If With interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 353. +## Ends in an error in state: 280. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) . In closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1888,17 +2817,17 @@ interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 354. +## Ends in an error in state: 281. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(closed_if) -> Let Rec let_binding seq(Attr) In . closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1909,9 +2838,9 @@ interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 352. +## Ends in an error in state: 279. ## -## let_expr(base_cond) -> Let Rec let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(closed_if) -> Let Rec let_binding . seq(Attr) In closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1921,28 +2850,28 @@ interactive_expr: Match True With WILD ARROW If True Then Let Rec WILD EQ Bytes ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Match True With WILD ARROW If True Then Let Rec With ## -## Ends in an error in state: 351. +## Ends in an error in state: 278. ## -## let_expr(base_cond) -> Let Rec . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## let_expr(closed_if) -> Let Rec . let_binding seq(Attr) In closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1953,9 +2882,9 @@ interactive_expr: Match True With WILD ARROW If True Then Let Rec With interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 390. +## Ends in an error in state: 377. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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(closed_if) -> Let let_binding seq(Attr) . In closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1965,17 +2894,17 @@ interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes Attr ## 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes In With ## -## Ends in an error in state: 391. +## Ends in an error in state: 378. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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(closed_if) -> Let let_binding seq(Attr) In . closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1986,9 +2915,9 @@ interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes In W interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes With ## -## Ends in an error in state: 389. +## Ends in an error in state: 376. ## -## let_expr(base_cond) -> Let let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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(closed_if) -> Let let_binding . seq(Attr) In closed_if [ Else ] ## ## The known suffix of the stack is as follows: @@ -1998,29 +2927,29 @@ interactive_expr: Match True With WILD ARROW If True Then Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Match True With WILD ARROW If True Then Let With ## -## Ends in an error in state: 350. +## Ends in an error in state: 277. ## -## let_expr(base_cond) -> Let . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## 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 ] ## @@ -2030,108 +2959,11 @@ interactive_expr: Match True With WILD ARROW If True Then Let With -interactive_expr: Match True With WILD ARROW If True Then Match True Type -## -## Ends in an error in state: 339. -## -## match_expr(base_if_then_else) -> Match expr . With option(VBAR) cases(base_if_then_else) [ Else ] -## -## The known suffix of the stack is as follows: -## Match 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## - - - -interactive_expr: Match True With WILD ARROW If True Then Match True With VBAR Begin -## -## Ends in an error in state: 341. -## -## match_expr(base_if_then_else) -> Match expr With option(VBAR) . cases(base_if_then_else) [ Else ] -## -## The known suffix of the stack is as follows: -## Match expr With option(VBAR) -## - - - -interactive_expr: Match True With WILD ARROW If True Then Match True With WILD ARROW Bytes With -## -## Ends in an error in state: 344. -## -## cases(base_cond) -> cases(base_cond) . VBAR case_clause(base_cond) [ VBAR ] -## cases(base_if_then_else) -> cases(base_cond) . VBAR case_clause(base_if_then_else) [ Else ] -## -## The known suffix of the stack is as follows: -## cases(base_cond) -## -## 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 403, spurious reduction of production base_expr(base_cond) -> disj_expr_level -## In state 375, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) -## In state 376, spurious reduction of production base_cond -> base_cond__open(base_cond) -## In state 414, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond -## In state 349, spurious reduction of production cases(base_cond) -> case_clause(base_cond) -## - - - -interactive_expr: Match True With WILD ARROW If True Then Match True With With -## -## Ends in an error in state: 340. -## -## match_expr(base_if_then_else) -> Match expr With . option(VBAR) cases(base_if_then_else) [ Else ] -## -## The known suffix of the stack is as follows: -## Match expr With -## - - - -interactive_expr: Match True With WILD ARROW If True Then Match With -## -## Ends in an error in state: 338. -## -## match_expr(base_if_then_else) -> Match . expr With option(VBAR) cases(base_if_then_else) [ Else ] -## -## The known suffix of the stack is as follows: -## Match -## - - - interactive_expr: Match True With WILD ARROW If True Then True Else With ## -## Ends in an error in state: 496. +## Ends in an error in state: 411. ## -## if_then_else(base_cond) -> If expr Then closed_if Else . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then closed_if Else @@ -2139,12 +2971,42 @@ interactive_expr: Match True With WILD ARROW If True Then True Else With +interactive_expr: Match True With WILD ARROW If True Then True End +## +## Ends in an error in state: 297. +## +## base_expr(base_cond) -> disj_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] +## 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 [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## + + + interactive_expr: Match True With WILD ARROW If True Then With ## -## Ends in an error in state: 494. +## Ends in an error in state: 262. ## -## if_then(base_cond) -> If expr Then . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If expr Then @@ -2154,10 +3016,10 @@ interactive_expr: Match True With WILD ARROW If True Then With interactive_expr: Match True With WILD ARROW If True With ## -## Ends in an error in state: 493. +## Ends in an error in state: 261. ## -## if_then(base_cond) -> If expr . Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If expr @@ -2166,28 +3028,28 @@ interactive_expr: Match True With WILD ARROW If True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: Match True With WILD ARROW If With ## -## Ends in an error in state: 492. +## Ends in an error in state: 260. ## -## if_then(base_cond) -> If . expr Then base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## If @@ -2197,9 +3059,9 @@ interactive_expr: Match True With WILD ARROW If With interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes Attr Type ## -## Ends in an error in state: 490. +## Ends in an error in state: 258. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) @@ -2208,17 +3070,17 @@ interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes In With ## -## Ends in an error in state: 491. +## Ends in an error in state: 259. ## -## let_expr(base_cond) -> Let Rec let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding seq(Attr) In @@ -2228,9 +3090,9 @@ interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes In With interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 489. +## Ends in an error in state: 257. ## -## let_expr(base_cond) -> Let Rec let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Let Rec let_binding @@ -2239,28 +3101,28 @@ interactive_expr: Match True With WILD ARROW Let Rec WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Match True With WILD ARROW Let Rec With ## -## Ends in an error in state: 488. +## Ends in an error in state: 256. ## -## let_expr(base_cond) -> Let Rec . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Let Rec @@ -2270,9 +3132,9 @@ interactive_expr: Match True With WILD ARROW Let Rec With interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 503. +## Ends in an error in state: 418. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) . In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) @@ -2281,17 +3143,17 @@ interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes Attr 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 171, spurious reduction of production seq(Attr) -> -## In state 172, spurious reduction of production seq(Attr) -> Attr seq(Attr) +## In state 172, spurious reduction of production seq(Attr) -> +## In state 173, spurious reduction of production seq(Attr) -> Attr seq(Attr) ## interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes In With ## -## Ends in an error in state: 504. +## Ends in an error in state: 419. ## -## let_expr(base_cond) -> Let let_binding seq(Attr) In . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## Let let_binding seq(Attr) In @@ -2301,9 +3163,9 @@ interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes In With interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes With ## -## Ends in an error in state: 502. +## Ends in an error in state: 417. ## -## let_expr(base_cond) -> Let let_binding . seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## Let let_binding @@ -2312,29 +3174,29 @@ interactive_expr: Match True With WILD ARROW Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## interactive_expr: Match True With WILD ARROW Let With ## -## Ends in an error in state: 487. +## Ends in an error in state: 255. ## -## let_expr(base_cond) -> Let . let_binding seq(Attr) In base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## Let @@ -2344,10 +3206,10 @@ interactive_expr: Match True With WILD ARROW Let With interactive_expr: Match True With WILD ARROW True COMMA Bytes Else ## -## Ends in an error in state: 505. +## Ends in an error in state: 575. ## -## cases(base_cond) -> cases(base_cond) . VBAR case_clause(base_cond) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## match_expr(base_cond) -> Match expr With option(VBAR) cases(base_cond) . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] ## ## The known suffix of the stack is as follows: ## Match expr With option(VBAR) cases(base_cond) @@ -2356,35 +3218,35 @@ interactive_expr: Match True With WILD ARROW True COMMA Bytes Else ## 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 295, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level -## In state 294, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) -## In state 216, spurious reduction of production tuple_expr -> tuple(disj_expr_level) -## In state 500, spurious reduction of production base_expr(base_cond) -> tuple_expr -## In state 375, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) -## In state 376, spurious reduction of production base_cond -> base_cond__open(base_cond) -## In state 414, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond -## In state 349, spurious reduction of production cases(base_cond) -> case_clause(base_cond) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 342, spurious reduction of production nsepseq(disj_expr_level,COMMA) -> disj_expr_level +## In state 341, spurious reduction of production tuple(disj_expr_level) -> disj_expr_level COMMA nsepseq(disj_expr_level,COMMA) +## In state 218, spurious reduction of production tuple_expr -> tuple(disj_expr_level) +## In state 415, spurious reduction of production base_expr(base_cond) -> tuple_expr +## In state 354, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) +## In state 355, spurious reduction of production base_cond -> base_cond__open(base_cond) +## In state 401, spurious reduction of production case_clause(base_cond) -> pattern ARROW base_cond +## In state 409, spurious reduction of production cases(base_cond) -> case_clause(base_cond) ## -interactive_expr: Match True With WILD ARROW True Else +interactive_expr: Match True With WILD ARROW True End ## -## Ends in an error in state: 501. +## Ends in an error in state: 416. ## -## base_expr(base_cond) -> disj_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 End EOF COMMA COLON BOOL_OR Attr ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In End EOF COMMA COLON BOOL_OR Attr ] -## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## 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 ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In EOF COMMA COLON BOOL_OR Attr ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level @@ -2393,24 +3255,24 @@ interactive_expr: Match True With WILD ARROW True Else ## 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: Match True With WILD ARROW With ## -## Ends in an error in state: 486. +## Ends in an error in state: 574. ## -## case_clause(base_cond) -> pattern ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## case_clause(base_cond) -> pattern ARROW . base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## pattern ARROW @@ -2420,7 +3282,7 @@ interactive_expr: Match True With WILD ARROW With interactive_expr: Match True With WILD COMMA WILD COMMA With ## -## Ends in an error in state: 325. +## Ends in an error in state: 250. ## ## nsepseq(sub_pattern,COMMA) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ ARROW ] ## @@ -2432,7 +3294,7 @@ interactive_expr: Match True With WILD COMMA WILD COMMA With interactive_expr: Match True With WILD COMMA WILD With ## -## Ends in an error in state: 324. +## Ends in an error in state: 249. ## ## nsepseq(sub_pattern,COMMA) -> sub_pattern . [ ARROW ] ## nsepseq(sub_pattern,COMMA) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ ARROW ] @@ -2445,7 +3307,7 @@ interactive_expr: Match True With WILD COMMA WILD With interactive_expr: Match True With WILD COMMA With ## -## Ends in an error in state: 323. +## Ends in an error in state: 248. ## ## tuple(sub_pattern) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ ARROW ] ## @@ -2457,9 +3319,9 @@ interactive_expr: Match True With WILD COMMA With interactive_expr: Match True With WILD CONS Bytes SEMI ## -## Ends in an error in state: 485. +## Ends in an error in state: 573. ## -## case_clause(base_cond) -> pattern . ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## case_clause(base_cond) -> pattern . ARROW base_cond [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## pattern @@ -2468,15 +3330,15 @@ interactive_expr: Match True With WILD CONS Bytes SEMI ## 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 95, spurious reduction of production tail -> sub_pattern -## In state 322, spurious reduction of production pattern -> sub_pattern CONS tail +## In state 96, spurious reduction of production tail -> sub_pattern +## In state 247, spurious reduction of production pattern -> sub_pattern CONS tail ## interactive_expr: Match True With WILD CONS With ## -## Ends in an error in state: 321. +## Ends in an error in state: 246. ## ## pattern -> sub_pattern CONS . tail [ ARROW ] ## @@ -2488,7 +3350,7 @@ interactive_expr: Match True With WILD CONS With interactive_expr: Match True With WILD With ## -## Ends in an error in state: 342. +## Ends in an error in state: 402. ## ## pattern -> core_pattern . [ ARROW ] ## sub_pattern -> core_pattern . [ CONS COMMA ] @@ -2501,9 +3363,9 @@ interactive_expr: Match True With WILD With interactive_expr: Match True With With ## -## Ends in an error in state: 483. +## Ends in an error in state: 571. ## -## match_expr(base_cond) -> Match expr With . option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Match expr With @@ -2513,9 +3375,9 @@ interactive_expr: Match True With With interactive_expr: Match With ## -## Ends in an error in state: 165. +## Ends in an error in state: 166. ## -## match_expr(base_cond) -> Match . expr With option(VBAR) cases(base_cond) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End 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 ] ## ## The known suffix of the stack is as follows: ## Match @@ -2525,7 +3387,7 @@ interactive_expr: Match With interactive_expr: Not With ## -## Ends in an error in state: 161. +## Ends in an error in state: 162. ## ## unary_expr_level -> Not . call_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2537,7 +3399,7 @@ interactive_expr: Not With interactive_expr: True BOOL_AND With ## -## Ends in an error in state: 270. +## Ends in an error in state: 317. ## ## bin_op(conj_expr_level,BOOL_AND,comp_expr_level) -> conj_expr_level BOOL_AND . comp_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In End Else EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2549,7 +3411,7 @@ interactive_expr: True BOOL_AND With interactive_expr: True BOOL_OR With ## -## Ends in an error in state: 301. +## Ends in an error in state: 348. ## ## 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 End Else EOF COMMA COLON BOOL_OR Attr ] ## @@ -2561,7 +3423,7 @@ interactive_expr: True BOOL_OR With interactive_expr: True CAT With ## -## Ends in an error in state: 253. +## Ends in an error in state: 300. ## ## bin_op(cons_expr_level,CAT,cat_expr_level) -> cons_expr_level CAT . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2573,9 +3435,9 @@ interactive_expr: True CAT With interactive_expr: True COMMA True COMMA With ## -## Ends in an error in state: 296. +## Ends in an error in state: 343. ## -## nsepseq(disj_expr_level,COMMA) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End Else EOF COLON Attr ] +## nsepseq(disj_expr_level,COMMA) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level COMMA @@ -2583,11 +3445,40 @@ interactive_expr: True COMMA True COMMA With +interactive_expr: True COMMA True End +## +## Ends in an error in state: 342. +## +## 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 Else EOF COMMA COLON BOOL_OR Attr ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In Else EOF COMMA COLON BOOL_OR Attr ] +## nsepseq(disj_expr_level,COMMA) -> disj_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] +## nsepseq(disj_expr_level,COMMA) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] +## +## The known suffix of the stack is as follows: +## disj_expr_level +## +## 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 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## + + + interactive_expr: True COMMA With ## -## Ends in an error in state: 293. +## Ends in an error in state: 340. ## -## tuple(disj_expr_level) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In End Else EOF COLON Attr ] +## tuple(disj_expr_level) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Let In Else EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level COMMA @@ -2597,7 +3488,7 @@ interactive_expr: True COMMA With interactive_expr: True CONS With ## -## Ends in an error in state: 267. +## Ends in an error in state: 314. ## ## bin_op(add_expr_level,CONS,cons_expr_level) -> add_expr_level CONS . cons_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2609,7 +3500,7 @@ interactive_expr: True CONS With interactive_expr: True Constr With ## -## Ends in an error in state: 199. +## Ends in an error in state: 200. ## ## module_field -> Constr . DOT module_fun [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 ] @@ -2622,7 +3513,7 @@ interactive_expr: True Constr With interactive_expr: True EQ With ## -## Ends in an error in state: 282. +## Ends in an error in state: 329. ## ## bin_op(comp_expr_level,EQ,cat_expr_level) -> comp_expr_level EQ . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2634,7 +3525,7 @@ interactive_expr: True EQ With interactive_expr: True GE With ## -## Ends in an error in state: 280. +## Ends in an error in state: 327. ## ## bin_op(comp_expr_level,GE,cat_expr_level) -> comp_expr_level GE . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2646,7 +3537,7 @@ interactive_expr: True GE With interactive_expr: True GT With ## -## Ends in an error in state: 278. +## Ends in an error in state: 325. ## ## bin_op(comp_expr_level,GT,cat_expr_level) -> comp_expr_level GT . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2658,7 +3549,7 @@ interactive_expr: True GT With interactive_expr: True LE With ## -## Ends in an error in state: 276. +## Ends in an error in state: 323. ## ## bin_op(comp_expr_level,LE,cat_expr_level) -> comp_expr_level LE . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2670,7 +3561,7 @@ interactive_expr: True LE With interactive_expr: True LT With ## -## Ends in an error in state: 274. +## Ends in an error in state: 321. ## ## bin_op(comp_expr_level,LT,cat_expr_level) -> comp_expr_level LT . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2682,7 +3573,7 @@ interactive_expr: True LT With interactive_expr: True MINUS C_None WILD ## -## Ends in an error in state: 266. +## Ends in an error in state: 313. ## ## bin_op(add_expr_level,MINUS,mult_expr_level) -> add_expr_level MINUS mult_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] @@ -2697,7 +3588,7 @@ interactive_expr: True MINUS C_None WILD interactive_expr: True MINUS With ## -## Ends in an error in state: 265. +## Ends in an error in state: 312. ## ## bin_op(add_expr_level,MINUS,mult_expr_level) -> add_expr_level MINUS . mult_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2709,7 +3600,7 @@ interactive_expr: True MINUS With interactive_expr: True Mod With ## -## Ends in an error in state: 236. +## Ends in an error in state: 233. ## ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level Mod . unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2721,7 +3612,7 @@ interactive_expr: True Mod With interactive_expr: True NE With ## -## Ends in an error in state: 272. +## Ends in an error in state: 319. ## ## bin_op(comp_expr_level,NE,cat_expr_level) -> comp_expr_level NE . cat_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or NE Let LT LE In GT GE End Else EQ EOF COMMA COLON BOOL_OR BOOL_AND Attr ] ## @@ -2733,7 +3624,7 @@ interactive_expr: True NE With interactive_expr: True Or With ## -## Ends in an error in state: 251. +## Ends in an error in state: 298. ## ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level Or . conj_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE Or Let In End Else EOF COMMA COLON BOOL_OR Attr ] ## @@ -2745,7 +3636,7 @@ interactive_expr: True Or With interactive_expr: True PLUS C_None WILD ## -## Ends in an error in state: 264. +## Ends in an error in state: 311. ## ## bin_op(add_expr_level,PLUS,mult_expr_level) -> add_expr_level PLUS mult_expr_level . [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] @@ -2760,7 +3651,7 @@ interactive_expr: True PLUS C_None WILD interactive_expr: True PLUS With ## -## Ends in an error in state: 263. +## Ends in an error in state: 310. ## ## bin_op(add_expr_level,PLUS,mult_expr_level) -> add_expr_level PLUS . mult_expr_level [ With VBAR Type Then SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2772,7 +3663,7 @@ interactive_expr: True PLUS With interactive_expr: True SLASH With ## -## Ends in an error in state: 234. +## Ends in an error in state: 231. ## ## bin_op(mult_expr_level,SLASH,unary_expr_level) -> mult_expr_level SLASH . unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2784,7 +3675,7 @@ interactive_expr: True SLASH With interactive_expr: True TIMES With ## -## Ends in an error in state: 223. +## Ends in an error in state: 220. ## ## bin_op(mult_expr_level,TIMES,unary_expr_level) -> mult_expr_level TIMES . unary_expr_level [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2796,7 +3687,7 @@ interactive_expr: True TIMES With interactive_expr: True True True WILD ## -## Ends in an error in state: 229. +## Ends in an error in state: 226. ## ## seq(core_expr) -> core_expr . seq(core_expr) [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2808,7 +3699,7 @@ interactive_expr: True True True WILD interactive_expr: True True WILD ## -## Ends in an error in state: 227. +## Ends in an error in state: 224. ## ## nseq(core_expr) -> core_expr . seq(core_expr) [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## @@ -2820,12 +3711,12 @@ interactive_expr: True True WILD interactive_expr: True VBAR ## -## Ends in an error in state: 250. +## Ends in an error in state: 366. ## -## base_expr(expr) -> disj_expr_level . [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] -## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In End EOF COMMA COLON BOOL_OR Attr ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In End EOF COMMA COLON BOOL_OR Attr ] -## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In End EOF COLON Attr ] +## base_expr(expr) -> disj_expr_level . [ With 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 Type Then SEMI RPAR RBRACKET RBRACE Or Let In EOF COMMA COLON BOOL_OR Attr ] +## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ With Type Then SEMI RPAR RBRACKET RBRACE Or Let In EOF COMMA COLON BOOL_OR Attr ] +## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ With Type Then SEMI RPAR RBRACKET RBRACE Let In EOF COLON Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level @@ -2834,22 +3725,22 @@ interactive_expr: True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: True WILD ## -## Ends in an error in state: 225. +## Ends in an error in state: 222. ## ## call_expr -> core_expr . nseq(core_expr) [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] ## call_expr_level -> core_expr . [ With VBAR Type Then TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE In GT GE End Else EQ EOF CONS COMMA COLON CAT BOOL_OR BOOL_AND Attr ] @@ -2862,7 +3753,7 @@ interactive_expr: True WILD interactive_expr: True With ## -## Ends in an error in state: 527. +## Ends in an error in state: 597. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -2873,25 +3764,25 @@ interactive_expr: True 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) ## interactive_expr: With ## -## Ends in an error in state: 525. +## Ends in an error in state: 595. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2901,9 +3792,9 @@ interactive_expr: With -contract: Let Ident WILD COLON Ident VBAR +contract: Let Ident WILD COLON String VBAR ## -## Ends in an error in state: 157. +## Ends in an error in state: 158. ## ## let_binding -> Ident nseq(sub_irrefutable) option(type_annotation) . EQ expr [ Type Let In EOF Attr ] ## @@ -2914,18 +3805,18 @@ contract: Let Ident WILD 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type -## In state 155, spurious reduction of production type_annotation -> COLON type_expr -## In state 156, spurious reduction of production option(type_annotation) -> type_annotation +## 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 156, spurious reduction of production type_annotation -> COLON type_expr +## In state 157, spurious reduction of production option(type_annotation) -> type_annotation ## contract: Let Ident WILD EQ With ## -## Ends in an error in state: 158. +## Ends in an error in state: 159. ## ## let_binding -> Ident nseq(sub_irrefutable) option(type_annotation) EQ . expr [ Type Let In EOF Attr ] ## @@ -2937,7 +3828,7 @@ contract: Let Ident WILD EQ With contract: Let Ident WILD WILD With ## -## Ends in an error in state: 150. +## Ends in an error in state: 151. ## ## seq(sub_irrefutable) -> sub_irrefutable . seq(sub_irrefutable) [ EQ COLON ] ## @@ -2949,7 +3840,7 @@ contract: Let Ident WILD WILD With contract: Let Ident WILD With ## -## Ends in an error in state: 149. +## Ends in an error in state: 150. ## ## nseq(sub_irrefutable) -> sub_irrefutable . seq(sub_irrefutable) [ EQ COLON ] ## @@ -2961,7 +3852,7 @@ contract: Let Ident WILD With contract: Let Ident With ## -## Ends in an error in state: 148. +## Ends in an error in state: 149. ## ## let_binding -> Ident . nseq(sub_irrefutable) option(type_annotation) EQ expr [ Type Let In EOF Attr ] ## sub_irrefutable -> Ident . [ EQ COMMA COLON ] @@ -2974,7 +3865,7 @@ contract: Let Ident With contract: Let LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 126. +## Ends in an error in state: 127. ## ## nsepseq(field_pattern,SEMI) -> field_pattern SEMI . nsepseq(field_pattern,SEMI) [ RBRACE ] ## seq(__anonymous_0(field_pattern,SEMI)) -> field_pattern SEMI . seq(__anonymous_0(field_pattern,SEMI)) [ RBRACE ] @@ -2987,7 +3878,7 @@ contract: Let LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With contract: Let LBRACE Ident EQ Bytes SEMI Ident EQ Bytes With ## -## Ends in an error in state: 125. +## Ends in an error in state: 126. ## ## nsepseq(field_pattern,SEMI) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,SEMI) -> field_pattern . SEMI nsepseq(field_pattern,SEMI) [ RBRACE ] @@ -3001,7 +3892,7 @@ contract: Let LBRACE Ident EQ Bytes SEMI Ident EQ Bytes With contract: Let LBRACE Ident EQ Bytes SEMI With ## -## Ends in an error in state: 122. +## Ends in an error in state: 123. ## ## nsepseq(field_pattern,SEMI) -> field_pattern SEMI . nsepseq(field_pattern,SEMI) [ RBRACE ] ## nseq(__anonymous_0(field_pattern,SEMI)) -> field_pattern SEMI . seq(__anonymous_0(field_pattern,SEMI)) [ RBRACE ] @@ -3014,7 +3905,7 @@ contract: Let LBRACE Ident EQ Bytes SEMI With contract: Let LBRACE Ident EQ Bytes With ## -## Ends in an error in state: 121. +## Ends in an error in state: 122. ## ## nsepseq(field_pattern,SEMI) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,SEMI) -> field_pattern . SEMI nsepseq(field_pattern,SEMI) [ RBRACE ] @@ -3028,7 +3919,7 @@ contract: Let LBRACE Ident EQ Bytes With contract: Let LBRACE Ident EQ With ## -## Ends in an error in state: 68. +## Ends in an error in state: 69. ## ## field_pattern -> Ident EQ . sub_pattern [ SEMI RBRACE ] ## @@ -3040,7 +3931,7 @@ contract: Let LBRACE Ident EQ With contract: Let LBRACE Ident With ## -## Ends in an error in state: 67. +## Ends in an error in state: 68. ## ## field_pattern -> Ident . EQ sub_pattern [ SEMI RBRACE ] ## @@ -3052,7 +3943,7 @@ contract: Let LBRACE Ident With contract: Let LBRACE With ## -## Ends in an error in state: 66. +## Ends in an error in state: 67. ## ## record_pattern -> LBRACE . sep_or_term_list(field_pattern,SEMI) RBRACE [ WILD SEMI RPAR RBRACKET RBRACE LPAR LBRACE Ident EQ Constr CONS COMMA COLON ARROW ] ## @@ -3064,7 +3955,7 @@ contract: Let LBRACE With contract: Let LPAR Constr C_Some With ## -## Ends in an error in state: 79. +## Ends in an error in state: 80. ## ## constr_pattern -> C_Some . sub_pattern [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] ## @@ -3076,7 +3967,7 @@ contract: Let LPAR Constr C_Some With contract: Let LPAR Constr Constr With ## -## Ends in an error in state: 78. +## Ends in an error in state: 79. ## ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] ## constr_pattern -> Constr . sub_pattern [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] @@ -3089,7 +3980,7 @@ contract: Let LPAR Constr Constr With contract: Let LPAR Constr LBRACKET WILD RPAR ## -## Ends in an error in state: 91. +## Ends in an error in state: 92. ## ## nsepseq(tail,SEMI) -> tail . [ RBRACKET ] ## nsepseq(tail,SEMI) -> tail . SEMI nsepseq(tail,SEMI) [ RBRACKET ] @@ -3102,14 +3993,14 @@ contract: Let LPAR Constr LBRACKET 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 95, spurious reduction of production tail -> sub_pattern +## In state 96, spurious reduction of production tail -> sub_pattern ## contract: Let LPAR Constr LBRACKET WILD SEMI WILD RPAR ## -## Ends in an error in state: 93. +## Ends in an error in state: 94. ## ## nsepseq(tail,SEMI) -> tail . [ RBRACKET ] ## nsepseq(tail,SEMI) -> tail . SEMI nsepseq(tail,SEMI) [ RBRACKET ] @@ -3122,14 +4013,14 @@ contract: Let LPAR Constr LBRACKET WILD SEMI 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 95, spurious reduction of production tail -> sub_pattern +## In state 96, spurious reduction of production tail -> sub_pattern ## contract: Let LPAR Constr LBRACKET WILD SEMI WILD SEMI With ## -## Ends in an error in state: 94. +## Ends in an error in state: 95. ## ## nsepseq(tail,SEMI) -> tail SEMI . nsepseq(tail,SEMI) [ RBRACKET ] ## seq(__anonymous_0(tail,SEMI)) -> tail SEMI . seq(__anonymous_0(tail,SEMI)) [ RBRACKET ] @@ -3142,7 +4033,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI WILD SEMI With contract: Let LPAR Constr LBRACKET WILD SEMI With ## -## Ends in an error in state: 92. +## Ends in an error in state: 93. ## ## nsepseq(tail,SEMI) -> tail SEMI . nsepseq(tail,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(tail,SEMI)) -> tail SEMI . seq(__anonymous_0(tail,SEMI)) [ RBRACKET ] @@ -3155,7 +4046,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI With contract: Let LPAR Constr LBRACKET With ## -## Ends in an error in state: 74. +## Ends in an error in state: 75. ## ## list__(tail) -> LBRACKET . option(sep_or_term_list(tail,SEMI)) RBRACKET [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] ## @@ -3167,7 +4058,7 @@ contract: Let LPAR Constr LBRACKET With contract: Let LPAR Constr LPAR WILD COMMA WILD COMMA With ## -## Ends in an error in state: 111. +## Ends in an error in state: 112. ## ## nsepseq(tail,COMMA) -> tail COMMA . nsepseq(tail,COMMA) [ RPAR ] ## @@ -3179,7 +4070,7 @@ contract: Let LPAR Constr LPAR WILD COMMA WILD COMMA With contract: Let LPAR Constr LPAR WILD COMMA WILD SEMI ## -## Ends in an error in state: 110. +## Ends in an error in state: 111. ## ## nsepseq(tail,COMMA) -> tail . [ RPAR ] ## nsepseq(tail,COMMA) -> tail . COMMA nsepseq(tail,COMMA) [ RPAR ] @@ -3191,14 +4082,14 @@ contract: Let LPAR Constr LPAR WILD COMMA WILD SEMI ## 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 95, spurious reduction of production tail -> sub_pattern +## In state 96, spurious reduction of production tail -> sub_pattern ## contract: Let LPAR Constr LPAR WILD COMMA With ## -## Ends in an error in state: 109. +## Ends in an error in state: 110. ## ## tuple(tail) -> tail COMMA . nsepseq(tail,COMMA) [ RPAR ] ## @@ -3210,7 +4101,7 @@ contract: Let LPAR Constr LPAR WILD COMMA With contract: Let LPAR Constr LPAR WILD CONS With ## -## Ends in an error in state: 96. +## Ends in an error in state: 97. ## ## tail -> sub_pattern CONS . tail [ SEMI RPAR RBRACKET COMMA ARROW ] ## @@ -3222,7 +4113,7 @@ contract: Let LPAR Constr LPAR WILD CONS With contract: Let LPAR Constr LPAR WILD SEMI ## -## Ends in an error in state: 107. +## Ends in an error in state: 108. ## ## par(tail) -> LPAR tail . RPAR [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] ## tuple(tail) -> tail . COMMA nsepseq(tail,COMMA) [ RPAR ] @@ -3234,14 +4125,14 @@ contract: Let LPAR Constr LPAR WILD SEMI ## 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 95, spurious reduction of production tail -> sub_pattern +## In state 96, spurious reduction of production tail -> sub_pattern ## contract: Let LPAR Constr LPAR WILD With ## -## Ends in an error in state: 95. +## Ends in an error in state: 96. ## ## tail -> sub_pattern . [ SEMI RPAR RBRACKET COMMA ARROW ] ## tail -> sub_pattern . CONS tail [ SEMI RPAR RBRACKET COMMA ARROW ] @@ -3254,7 +4145,7 @@ contract: Let LPAR Constr LPAR WILD With contract: Let LPAR Constr LPAR With ## -## Ends in an error in state: 73. +## Ends in an error in state: 74. ## ## par(ptuple) -> LPAR . ptuple RPAR [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] ## par(tail) -> LPAR . tail RPAR [ SEMI RPAR RBRACKET RBRACE CONS COMMA ARROW ] @@ -3268,7 +4159,7 @@ contract: Let LPAR Constr LPAR With contract: Let LPAR Constr WILD With ## -## Ends in an error in state: 146. +## Ends in an error in state: 147. ## ## par(closed_irrefutable) -> LPAR closed_irrefutable . RPAR [ WILD RPAR LPAR LBRACE Ident EQ Constr COMMA COLON ARROW ] ## @@ -3280,7 +4171,7 @@ contract: Let LPAR Constr WILD With contract: Let LPAR Constr With ## -## Ends in an error in state: 129. +## Ends in an error in state: 130. ## ## closed_irrefutable -> Constr . sub_pattern [ RPAR ] ## sub_irrefutable -> Constr . [ RPAR COMMA COLON ] @@ -3293,7 +4184,7 @@ contract: Let LPAR Constr With contract: Let LPAR WILD COLON With ## -## Ends in an error in state: 144. +## Ends in an error in state: 145. ## ## typed_pattern -> irrefutable COLON . type_expr [ RPAR ] ## @@ -3305,7 +4196,7 @@ contract: Let LPAR WILD COLON With contract: Let LPAR WILD WILD ## -## Ends in an error in state: 143. +## Ends in an error in state: 144. ## ## closed_irrefutable -> irrefutable . [ RPAR ] ## typed_pattern -> irrefutable . COLON type_expr [ RPAR ] @@ -3317,14 +4208,14 @@ contract: Let LPAR WILD WILD ## 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 134, spurious reduction of production irrefutable -> sub_irrefutable +## In state 135, spurious reduction of production irrefutable -> sub_irrefutable ## contract: Let LPAR With ## -## Ends in an error in state: 64. +## Ends in an error in state: 65. ## ## par(closed_irrefutable) -> LPAR . closed_irrefutable RPAR [ WILD RPAR LPAR LBRACE Ident EQ Constr COMMA COLON ARROW ] ## unit -> LPAR . RPAR [ WILD RPAR LPAR LBRACE Ident EQ Constr COMMA COLON ARROW ] @@ -3337,7 +4228,7 @@ contract: Let LPAR With contract: Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 514. +## Ends in an error in state: 584. ## ## let_declaration -> Let Rec let_binding . seq(Attr) [ Type Let EOF ] ## @@ -3348,26 +4239,26 @@ contract: Let Rec WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## contract: Let Rec With ## -## Ends in an error in state: 63. +## Ends in an error in state: 64. ## ## let_declaration -> Let Rec . let_binding seq(Attr) [ Type Let EOF ] ## @@ -3379,7 +4270,7 @@ contract: Let Rec With contract: Let WILD COLON Ident VBAR ## -## Ends in an error in state: 386. +## Ends in an error in state: 373. ## ## let_binding -> irrefutable option(type_annotation) . EQ expr [ Type Let In EOF Attr ] ## @@ -3390,18 +4281,18 @@ contract: Let WILD 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type -## In state 155, spurious reduction of production type_annotation -> COLON type_expr -## In state 156, spurious reduction of production option(type_annotation) -> type_annotation +## 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 156, spurious reduction of production type_annotation -> COLON type_expr +## In state 157, spurious reduction of production option(type_annotation) -> type_annotation ## contract: Let WILD COLON With ## -## Ends in an error in state: 154. +## Ends in an error in state: 155. ## ## type_annotation -> COLON . type_expr [ EQ ] ## @@ -3413,7 +4304,7 @@ contract: Let WILD COLON With contract: Let WILD COMMA WILD COMMA With ## -## Ends in an error in state: 138. +## Ends in an error in state: 139. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] ## @@ -3425,7 +4316,7 @@ contract: Let WILD COMMA WILD COMMA With contract: Let WILD COMMA WILD With ## -## Ends in an error in state: 137. +## Ends in an error in state: 138. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] @@ -3438,7 +4329,7 @@ contract: Let WILD COMMA WILD With contract: Let WILD COMMA With ## -## Ends in an error in state: 135. +## Ends in an error in state: 136. ## ## tuple(sub_irrefutable) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] ## @@ -3450,7 +4341,7 @@ contract: Let WILD COMMA With contract: Let WILD EQ Bytes Attr With ## -## Ends in an error in state: 171. +## Ends in an error in state: 172. ## ## seq(Attr) -> Attr . seq(Attr) [ Type Let In EOF ] ## @@ -3462,7 +4353,7 @@ contract: Let WILD EQ Bytes Attr With contract: Let WILD EQ Bytes With ## -## Ends in an error in state: 516. +## Ends in an error in state: 586. ## ## let_declaration -> Let let_binding . seq(Attr) [ Type Let EOF ] ## @@ -3473,26 +4364,26 @@ contract: Let WILD EQ Bytes 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 225, spurious reduction of production call_expr_level -> core_expr -## In state 232, spurious reduction of production unary_expr_level -> call_expr_level -## In state 214, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 222, spurious reduction of production add_expr_level -> mult_expr_level -## In state 262, spurious reduction of production cons_expr_level -> add_expr_level -## In state 252, spurious reduction of production cat_expr_level -> cons_expr_level -## In state 284, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 291, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 298, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 250, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 304, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 305, spurious reduction of production expr -> base_cond__open(expr) -## In state 388, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr +## In state 222, spurious reduction of production call_expr_level -> core_expr +## In state 229, spurious reduction of production unary_expr_level -> call_expr_level +## In state 216, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 219, spurious reduction of production add_expr_level -> mult_expr_level +## In state 309, spurious reduction of production cons_expr_level -> add_expr_level +## In state 299, spurious reduction of production cat_expr_level -> cons_expr_level +## In state 331, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 338, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 345, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 366, spurious reduction of production base_expr(expr) -> disj_expr_level +## In state 368, spurious reduction of production base_cond__open(expr) -> base_expr(expr) +## In state 369, spurious reduction of production expr -> base_cond__open(expr) +## In state 375, spurious reduction of production let_binding -> irrefutable option(type_annotation) EQ expr ## contract: Let WILD EQ With ## -## Ends in an error in state: 387. +## Ends in an error in state: 374. ## ## let_binding -> irrefutable option(type_annotation) EQ . expr [ Type Let In EOF Attr ] ## @@ -3504,7 +4395,7 @@ contract: Let WILD EQ With contract: Let WILD WILD ## -## Ends in an error in state: 385. +## Ends in an error in state: 372. ## ## let_binding -> irrefutable . option(type_annotation) EQ expr [ Type Let In EOF Attr ] ## @@ -3515,14 +4406,14 @@ contract: Let WILD WILD ## 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 134, spurious reduction of production irrefutable -> sub_irrefutable +## In state 135, spurious reduction of production irrefutable -> sub_irrefutable ## contract: Let WILD With ## -## Ends in an error in state: 134. +## Ends in an error in state: 135. ## ## irrefutable -> sub_irrefutable . [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] ## tuple(sub_irrefutable) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ WILD RPAR LPAR LBRACE Ident EQ Constr COLON ARROW ] @@ -3535,7 +4426,7 @@ contract: Let WILD With contract: Let With ## -## Ends in an error in state: 61. +## Ends in an error in state: 62. ## ## let_declaration -> Let . let_binding seq(Attr) [ Type Let EOF ] ## let_declaration -> Let . Rec let_binding seq(Attr) [ Type Let EOF ] @@ -3548,7 +4439,7 @@ contract: Let With contract: Type Ident EQ Constr DOT With ## -## Ends in an error in state: 13. +## Ends in an error in state: 14. ## ## core_type -> Constr DOT . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] ## @@ -3572,7 +4463,7 @@ contract: Type Ident EQ Constr Of With contract: Type Ident EQ Constr VBAR With ## -## Ends in an error in state: 16. +## Ends in an error in state: 17. ## ## nsepseq(variant,VBAR) -> variant VBAR . nsepseq(variant,VBAR) [ Type SEMI RPAR RBRACE Let EQ EOF COMMA ] ## @@ -3584,7 +4475,7 @@ contract: Type Ident EQ Constr VBAR With contract: Type Ident EQ Constr With ## -## Ends in an error in state: 12. +## Ends in an error in state: 13. ## ## core_type -> Constr . DOT Ident [ Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] ## variant -> Constr . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ] @@ -3596,71 +4487,9 @@ contract: Type Ident EQ Constr With -contract: Type Ident EQ Ident ARROW With -## -## Ends in an error in state: 36. -## -## fun_type -> cartesian ARROW . fun_type [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ] -## -## The known suffix of the stack is as follows: -## cartesian ARROW -## - - - -contract: Type Ident EQ Ident TIMES Constr With -## -## Ends in an error in state: 29. -## -## core_type -> Constr . DOT Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] -## -## The known suffix of the stack is as follows: -## Constr -## - - - -contract: Type Ident EQ Ident TIMES Ident TIMES With -## -## Ends in an error in state: 32. -## -## nsepseq(core_type,TIMES) -> core_type TIMES . nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## -## The known suffix of the stack is as follows: -## core_type TIMES -## - - - -contract: Type Ident EQ Ident TIMES Ident With -## -## Ends in an error in state: 31. -## -## core_type -> core_type . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] -## nsepseq(core_type,TIMES) -> core_type . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## nsepseq(core_type,TIMES) -> core_type . TIMES nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## -## The known suffix of the stack is as follows: -## core_type -## - - - -contract: Type Ident EQ Ident TIMES With -## -## Ends in an error in state: 28. -## -## cartesian -> core_type TIMES . nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## -## The known suffix of the stack is as follows: -## core_type TIMES -## - - - contract: Type Ident EQ Ident VBAR ## -## Ends in an error in state: 522. +## Ends in an error in state: 592. ## ## declarations -> declaration . [ EOF ] ## declarations -> declaration . declarations [ EOF ] @@ -3672,32 +4501,18 @@ contract: Type Ident EQ 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type -## In state 60, spurious reduction of production type_decl -> Type Ident EQ type_expr -## In state 518, spurious reduction of production declaration -> type_decl -## - - - -contract: Type Ident EQ Ident With -## -## Ends in an error in state: 27. -## -## cartesian -> core_type . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## cartesian -> core_type . TIMES nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] -## core_type -> core_type . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] -## -## The known suffix of the stack is as follows: -## core_type +## 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 61, spurious reduction of production type_decl -> Type Ident EQ type_expr +## In state 588, spurious reduction of production declaration -> type_decl ## contract: Type Ident EQ LBRACE Ident COLON Constr SEMI Ident COLON Constr SEMI With ## -## Ends in an error in state: 47. +## Ends in an error in state: 48. ## ## nsepseq(field_decl,SEMI) -> field_decl SEMI . nsepseq(field_decl,SEMI) [ RBRACE ] ## seq(__anonymous_0(field_decl,SEMI)) -> field_decl SEMI . seq(__anonymous_0(field_decl,SEMI)) [ RBRACE ] @@ -3710,7 +4525,7 @@ contract: Type Ident EQ LBRACE Ident COLON Constr SEMI Ident COLON Constr SEMI W contract: Type Ident EQ LBRACE Ident COLON Constr SEMI Ident COLON Ident VBAR ## -## Ends in an error in state: 46. +## Ends in an error in state: 47. ## ## nsepseq(field_decl,SEMI) -> field_decl . [ RBRACE ] ## nsepseq(field_decl,SEMI) -> field_decl . SEMI nsepseq(field_decl,SEMI) [ RBRACE ] @@ -3723,17 +4538,17 @@ contract: Type Ident EQ LBRACE Ident COLON Constr SEMI 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type -## In state 20, spurious reduction of production field_decl -> Ident COLON type_expr +## 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 21, spurious reduction of production field_decl -> Ident COLON type_expr ## contract: Type Ident EQ LBRACE Ident COLON Constr SEMI With ## -## Ends in an error in state: 43. +## Ends in an error in state: 44. ## ## nsepseq(field_decl,SEMI) -> field_decl SEMI . nsepseq(field_decl,SEMI) [ RBRACE ] ## nseq(__anonymous_0(field_decl,SEMI)) -> field_decl SEMI . seq(__anonymous_0(field_decl,SEMI)) [ RBRACE ] @@ -3746,7 +4561,7 @@ contract: Type Ident EQ LBRACE Ident COLON Constr SEMI With contract: Type Ident EQ LBRACE Ident COLON Ident VBAR ## -## Ends in an error in state: 42. +## Ends in an error in state: 43. ## ## nsepseq(field_decl,SEMI) -> field_decl . [ RBRACE ] ## nsepseq(field_decl,SEMI) -> field_decl . SEMI nsepseq(field_decl,SEMI) [ RBRACE ] @@ -3759,17 +4574,17 @@ contract: Type Ident EQ LBRACE 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type -## In state 20, spurious reduction of production field_decl -> Ident COLON type_expr +## 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 21, spurious reduction of production field_decl -> Ident COLON type_expr ## contract: Type Ident EQ LBRACE Ident COLON With ## -## Ends in an error in state: 10. +## Ends in an error in state: 11. ## ## field_decl -> Ident COLON . type_expr [ SEMI RBRACE ] ## @@ -3781,7 +4596,7 @@ contract: Type Ident EQ LBRACE Ident COLON With contract: Type Ident EQ LBRACE Ident With ## -## Ends in an error in state: 9. +## Ends in an error in state: 10. ## ## field_decl -> Ident . COLON type_expr [ SEMI RBRACE ] ## @@ -3793,7 +4608,7 @@ contract: Type Ident EQ LBRACE Ident With contract: Type Ident EQ LBRACE With ## -## Ends in an error in state: 8. +## Ends in an error in state: 9. ## ## record_type -> LBRACE . sep_or_term_list(field_decl,SEMI) RBRACE [ Type SEMI RPAR RBRACE Let EQ EOF COMMA ] ## @@ -3803,9 +4618,9 @@ contract: Type Ident EQ LBRACE With -contract: Type Ident EQ LPAR Ident COMMA Constr RPAR With +contract: Type Ident EQ LPAR String COMMA Constr RPAR With ## -## Ends in an error in state: 18. +## Ends in an error in state: 19. ## ## core_type -> type_tuple . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] ## @@ -3815,9 +4630,9 @@ contract: Type Ident EQ LPAR Ident COMMA Constr RPAR With -contract: Type Ident EQ LPAR Ident COMMA Ident COMMA With +contract: Type Ident EQ LPAR String COMMA String COMMA With ## -## Ends in an error in state: 53. +## Ends in an error in state: 54. ## ## nsepseq(type_expr,COMMA) -> type_expr COMMA . nsepseq(type_expr,COMMA) [ RPAR ] ## @@ -3827,9 +4642,9 @@ contract: Type Ident EQ LPAR Ident COMMA Ident COMMA With -contract: Type Ident EQ LPAR Ident COMMA Ident VBAR +contract: Type Ident EQ LPAR String COMMA String VBAR ## -## Ends in an error in state: 52. +## Ends in an error in state: 53. ## ## nsepseq(type_expr,COMMA) -> type_expr . [ RPAR ] ## nsepseq(type_expr,COMMA) -> type_expr . COMMA nsepseq(type_expr,COMMA) [ RPAR ] @@ -3841,16 +4656,16 @@ contract: Type Ident EQ LPAR Ident COMMA 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type +## 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 ## -contract: Type Ident EQ LPAR Ident COMMA With +contract: Type Ident EQ LPAR String COMMA With ## -## Ends in an error in state: 51. +## Ends in an error in state: 52. ## ## tuple(type_expr) -> type_expr COMMA . nsepseq(type_expr,COMMA) [ RPAR ] ## @@ -3860,9 +4675,9 @@ contract: Type Ident EQ LPAR Ident COMMA With -contract: Type Ident EQ LPAR Ident VBAR +contract: Type Ident EQ LPAR String VBAR ## -## Ends in an error in state: 49. +## Ends in an error in state: 50. ## ## par(type_expr) -> LPAR type_expr . RPAR [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] ## tuple(type_expr) -> type_expr . COMMA nsepseq(type_expr,COMMA) [ RPAR ] @@ -3874,16 +4689,16 @@ contract: Type Ident EQ LPAR 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 27, spurious reduction of production cartesian -> core_type -## In state 35, spurious reduction of production fun_type -> cartesian -## In state 26, spurious reduction of production type_expr -> fun_type +## 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 ## contract: Type Ident EQ LPAR With ## -## Ends in an error in state: 7. +## Ends in an error in state: 8. ## ## par(tuple(type_expr)) -> LPAR . tuple(type_expr) RPAR [ Ident ] ## par(type_expr) -> LPAR . type_expr RPAR [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] @@ -3894,6 +4709,82 @@ contract: Type Ident EQ LPAR With +contract: Type Ident EQ String ARROW With +## +## Ends in an error in state: 37. +## +## fun_type -> cartesian ARROW . fun_type [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ] +## +## The known suffix of the stack is as follows: +## cartesian ARROW +## + + + +contract: Type Ident EQ String TIMES Constr With +## +## Ends in an error in state: 30. +## +## core_type -> Constr . DOT Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] +## +## The known suffix of the stack is as follows: +## Constr +## + + + +contract: Type Ident EQ String TIMES String TIMES With +## +## Ends in an error in state: 33. +## +## nsepseq(core_type,TIMES) -> core_type TIMES . nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## +## The known suffix of the stack is as follows: +## core_type TIMES +## + + + +contract: Type Ident EQ String TIMES String With +## +## Ends in an error in state: 32. +## +## core_type -> core_type . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] +## nsepseq(core_type,TIMES) -> core_type . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## nsepseq(core_type,TIMES) -> core_type . TIMES nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## +## The known suffix of the stack is as follows: +## core_type +## + + + +contract: Type Ident EQ String TIMES With +## +## Ends in an error in state: 29. +## +## cartesian -> core_type TIMES . nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## +## The known suffix of the stack is as follows: +## core_type TIMES +## + + + +contract: Type Ident EQ String With +## +## Ends in an error in state: 28. +## +## cartesian -> core_type . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## cartesian -> core_type . TIMES nsepseq(core_type,TIMES) [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA ARROW ] +## core_type -> core_type . Ident [ VBAR Type TIMES SEMI RPAR RBRACE Let Ident EQ EOF COMMA ARROW ] +## +## The known suffix of the stack is as follows: +## core_type +## + + + contract: Type Ident EQ VBAR Constr With ## ## Ends in an error in state: 5. diff --git a/src/passes/1-parser/reasonligo/Parser.mly b/src/passes/1-parser/reasonligo/Parser.mly index 2d2ffcc2f..b4114040d 100644 --- a/src/passes/1-parser/reasonligo/Parser.mly +++ b/src/passes/1-parser/reasonligo/Parser.mly @@ -8,20 +8,6 @@ open Region module AST = Parser_cameligo.AST open! AST -type 'a sequence_elements = { - s_elts : ('a, semi) Utils.nsepseq; - s_terminator : semi option -} - -type 'a record_elements = { - r_elts : (field_assign reg, semi) Utils.nsepseq; - r_terminator : semi option -} - -type 'a sequence_or_record = - PaSequence of 'a sequence_elements -| PaRecord of 'a record_elements - let (<@) f g x = f (g x) (* @@ -58,7 +44,7 @@ let wild_error e = %type contract %type interactive_expr -(* Solves a shift/reduce problem that happens with record and +(* Solves a shift/reduce problem that happens with records and sequences. To elaborate: [sequence_or_record_in] can be reduced to [expr -> Ident], but also to [field_assignment -> Ident]. @@ -205,9 +191,9 @@ type_args: | fun_type { $1, [] } core_type: - type_name { TVar $1 } -| "" { TStringLiteral $1 } -| par(fun_type) { TPar $1 } + type_name { TVar $1 } +| "" { TString $1 } +| par(fun_type) { TPar $1 } | module_name "." type_name { let module_name = $1.value in let type_name = $3.value in @@ -264,8 +250,11 @@ let_declaration: let kwd_rec = $3 in let binding = $4 in let value = kwd_let, kwd_rec, binding, attributes in - let stop = expr_to_region binding.let_rhs in - let region = cover $2 stop + let start = match $1 with + [] -> $2 + | l -> last (fun x -> x.region) l + and stop = expr_to_region binding.let_rhs in + let region = cover start stop in {region; value} } let_binding: @@ -420,15 +409,12 @@ interactive_expr: expr_with_let_expr EOF { $1 } expr: - base_cond__open(expr) | switch_expr(base_cond) { $1 } - -base_cond__open(x): - base_expr(x) | conditional(expr_with_let_expr) { - wild_error $1; - $1 } + base_cond | switch_expr(base_cond) { $1 } base_cond: - base_cond__open(base_cond) { $1 } + base_expr | conditional(expr_with_let_expr) { + wild_error $1; + $1 } type_expr_simple_args: par(nsepseq(type_expr_simple, ",")) { $1 } @@ -452,8 +438,8 @@ type_expr_simple: type_annotation_simple: ":" type_expr_simple { $1,$2 } -fun_expr: - disj_expr_level "=>" expr { +fun_expr(right_expr): + disj_expr_level "=>" right_expr { let arrow, body = $2, $3 and kwd_fun = ghost in let start = expr_to_region $1 @@ -574,8 +560,8 @@ fun_expr: } in EFun {region; value=f} } -base_expr(right_expr): - disj_expr_level | fun_expr { $1 } +base_expr: + disj_expr_level | fun_expr(expr) { $1 } conditional(right_expr): if_then_else(right_expr) | if_then(right_expr) { $1 } @@ -609,7 +595,7 @@ if_then_else(right_expr): in ECond {region; value} } base_if_then_else__open(x): - base_expr(x) | if_then_else(x) { $1 } + base_expr | if_then_else(x) { $1 } base_if_then_else: base_if_then_else__open(base_if_then_else) { $1 } @@ -840,9 +826,10 @@ list_or_spread: core_expr: common_expr -| list_or_spread -| sequence_or_record { $1 } -| par(expr) { EPar $1 } +| list_or_spread { $1 } +| sequence { ESeq $1 } +| record { ERecord $1 } +| par(expr) { EPar $1 } module_field: module_name "." module_fun { @@ -901,67 +888,106 @@ update_record: let region = cover $1 $6 in let ne_elements, terminator = $5 in let value = { - lbrace = $1; - record = $3; + lbrace = $1; + record = $3; kwd_with = $4; - updates = { value = {compound = Braces($1,$6); + updates = {value = {compound = Braces($1,$6); ne_elements; terminator}; region = cover $4 $6}; - rbrace = $6} + rbrace = $6} in {region; value} } expr_with_let_expr: - expr { $1 } + expr | let_expr(expr_with_let_expr) { $1 } +exprs: + expr_with_let_expr ";"? { + (($1, []), $2) + } +| expr_with_let_expr ";" exprs { + let rec fix_let_in a b c = + match a with + | ELetIn {value = {body; _} as v; _} -> ( + let end_ = (nsepseq_to_region expr_to_region (fst c)) in + let sequence_region = + cover (expr_to_region body) end_ + in + let val_ = + match body with + | ELetIn _ -> fst (fix_let_in body b c) + | e -> Utils.nsepseq_cons e b (fst c) + in + let sequence = ESeq { + value = { + compound = BeginEnd(Region.ghost, Region.ghost); + elements = Some val_; + terminator = (snd c) + }; + region = sequence_region + } + in + let region = + cover (expr_to_region a) end_ + in + let let_in = + ELetIn { + value = { + v with + body = sequence + }; + region + } + in + ((let_in, []), snd c) + ) + | e -> Utils.nsepseq_cons e b (fst c), None + in + fix_let_in $1 $2 $3 +} + more_field_assignments: "," sep_or_term_list(field_assignment_punning,",") { - let elts, _region = $2 in - $1, elts + let elts, _region = $2 + in $1, elts } + +sequence: + "{" exprs "}" { + let elts, _region = $2 in + let compound = Braces ($1, $3) in + let value = {compound; + elements = Some elts; + terminator = None} in + let region = cover $1 $3 in + {region; value} } +record: + "{" field_assignment more_field_assignments? "}" { + let compound = Braces ($1,$4) in + let region = cover $1 $4 in -sequence_or_record_in: - sep_or_term_list(expr_with_let_expr,";") { - let elts, _region = $1 in - PaSequence {s_elts = elts; s_terminator=None} - } -| field_assignment more_field_assignments? { - match $2 with + match $3 with | Some (comma, elts) -> - let r_elts = Utils.nsepseq_cons $1 comma elts in - PaRecord {r_elts; r_terminator = None} + let ne_elements = Utils.nsepseq_cons $2 comma elts in + { value = {compound; ne_elements; terminator = None}; region } | None -> - PaRecord {r_elts = ($1, []); r_terminator = None} + let ne_elements = ($2,[]) in + { value = {compound; ne_elements; terminator = None}; region } + } +| "{" field_name more_field_assignments "}" { + let value = { + field_name = $2; + assignment = ghost; + field_expr = EVar $2 } in + let field_name = {$2 with value} in + let comma, elts = $3 in + let ne_elements = Utils.nsepseq_cons field_name comma elts in + let compound = Braces ($1,$4) in + let region = cover $1 $4 in + { value = {compound; ne_elements; terminator = None}; region } } -| field_name more_field_assignments { - let value = { - field_name = $1; - assignment = ghost; - field_expr = EVar $1 } - in - let field_name = {$1 with value} in - let (comma, elts) = $2 in - let r_elts = Utils.nsepseq_cons field_name comma elts in - PaRecord {r_elts; r_terminator = None} -} - -sequence_or_record: - "{" sequence_or_record_in "}" { - let compound = Braces ($1,$3) in - let region = cover $1 $3 in - match $2 with - PaSequence s -> - let value = {compound; - elements = Some s.s_elts; - terminator = s.s_terminator} - in ESeq {region; value} - | PaRecord r -> - let value = {compound; - ne_elements = r.r_elts; - terminator = r.r_terminator} - in ERecord {region; value}} field_assignment_punning: (* This can only happen with multiple fields - @@ -971,12 +997,9 @@ field_assignment_punning: field_name = $1; assignment = ghost; field_expr = EVar $1 } - in - {$1 with value} + in {$1 with value} } -| field_assignment { - $1 -} +| field_assignment { $1 } field_assignment: field_name ":" expr { diff --git a/src/passes/1-parser/reasonligo/error.messages.checked-in b/src/passes/1-parser/reasonligo/error.messages.checked-in index c5aec0a5c..3d73d28de 100644 --- a/src/passes/1-parser/reasonligo/error.messages.checked-in +++ b/src/passes/1-parser/reasonligo/error.messages.checked-in @@ -1,6 +1,6 @@ interactive_expr: C_None WILD ## -## Ends in an error in state: 173. +## Ends in an error in state: 174. ## ## call_expr_level -> call_expr_level_in . option(type_annotation_simple) [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -12,7 +12,7 @@ interactive_expr: C_None WILD interactive_expr: C_Some VBAR ## -## Ends in an error in state: 125. +## Ends in an error in state: 126. ## ## constr_expr -> C_Some . core_expr [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -24,7 +24,7 @@ interactive_expr: C_Some VBAR interactive_expr: Constr DOT Ident WILD ## -## Ends in an error in state: 111. +## Ends in an error in state: 112. ## ## module_fun -> Ident . [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## projection -> Constr DOT Ident . selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -37,7 +37,7 @@ interactive_expr: Constr DOT Ident WILD interactive_expr: Constr DOT WILD ## -## Ends in an error in state: 109. +## Ends in an error in state: 110. ## ## module_field -> Constr DOT . module_fun [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## projection -> Constr DOT . Ident selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -50,7 +50,7 @@ interactive_expr: Constr DOT WILD interactive_expr: Constr Switch ## -## Ends in an error in state: 108. +## Ends in an error in state: 109. ## ## constr_expr -> Constr . core_expr [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## constr_expr -> Constr . [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -65,7 +65,7 @@ interactive_expr: Constr Switch interactive_expr: Ident DOT Ident WILD ## -## Ends in an error in state: 103. +## Ends in an error in state: 104. ## ## selection -> DOT Ident . selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## selection -> DOT Ident . [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -78,7 +78,7 @@ interactive_expr: Ident DOT Ident WILD interactive_expr: Ident DOT WILD ## -## Ends in an error in state: 102. +## Ends in an error in state: 103. ## ## selection -> DOT . Ident selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## selection -> DOT . Ident [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -91,7 +91,7 @@ interactive_expr: Ident DOT WILD interactive_expr: Ident LBRACKET Int RBRACKET WILD ## -## Ends in an error in state: 101. +## Ends in an error in state: 102. ## ## selection -> LBRACKET Int RBRACKET . selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## selection -> LBRACKET Int RBRACKET . [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -104,7 +104,7 @@ interactive_expr: Ident LBRACKET Int RBRACKET WILD interactive_expr: Ident LBRACKET Int WILD ## -## Ends in an error in state: 100. +## Ends in an error in state: 101. ## ## selection -> LBRACKET Int . RBRACKET selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## selection -> LBRACKET Int . RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -117,7 +117,7 @@ interactive_expr: Ident LBRACKET Int WILD interactive_expr: Ident LBRACKET WILD ## -## Ends in an error in state: 99. +## Ends in an error in state: 100. ## ## selection -> LBRACKET . Int RBRACKET selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## selection -> LBRACKET . Int RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -130,7 +130,7 @@ interactive_expr: Ident LBRACKET WILD interactive_expr: Ident WILD ## -## Ends in an error in state: 98. +## Ends in an error in state: 99. ## ## common_expr -> Ident . [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## projection -> Ident . selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -143,7 +143,7 @@ interactive_expr: Ident WILD interactive_expr: If LBRACE VBAR ## -## Ends in an error in state: 227. +## Ends in an error in state: 228. ## ## parenthesized_expr -> LBRACE . expr RBRACE [ LBRACE ] ## @@ -155,7 +155,7 @@ interactive_expr: If LBRACE VBAR interactive_expr: If LBRACE WILD VBAR ## -## Ends in an error in state: 228. +## Ends in an error in state: 229. ## ## parenthesized_expr -> LBRACE expr . RBRACE [ LBRACE ] ## @@ -166,26 +166,26 @@ interactive_expr: If LBRACE WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: If LPAR VBAR ## -## Ends in an error in state: 97. +## Ends in an error in state: 98. ## ## parenthesized_expr -> LPAR . expr RPAR [ LBRACE ] ## @@ -197,7 +197,7 @@ interactive_expr: If LPAR VBAR interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE VBAR ## -## Ends in an error in state: 350. +## Ends in an error in state: 351. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE . closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -207,43 +207,9 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE VBAR -interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD ARROW Bytes VBAR -## -## Ends in an error in state: 408. -## -## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] -## -## The known suffix of the stack is as follows: -## If parenthesized_expr LBRACE closed_if -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 406, spurious reduction of production base_expr(closed_if) -> fun_expr -## In state 417, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) -## In state 416, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) -## - - - interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE VBAR ## -## Ends in an error in state: 412. +## Ends in an error in state: 411. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE . closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -253,10 +219,22 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE -interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD ARROW Bytes VBAR +interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD SEMI PLUS ## ## Ends in an error in state: 413. ## +## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) . RBRACE [ SEMI RBRACE ] +## +## The known suffix of the stack is as follows: +## If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) +## + + + +interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD VBAR +## +## Ends in an error in state: 412. +## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if . option(SEMI) RBRACE [ SEMI RBRACE ] ## ## The known suffix of the stack is as follows: @@ -266,42 +244,26 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE ## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 406, spurious reduction of production base_expr(closed_if) -> fun_expr -## In state 417, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) -## In state 416, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) -## - - - -interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD SEMI PLUS -## -## Ends in an error in state: 414. -## -## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) . RBRACE [ SEMI RBRACE ] -## -## The known suffix of the stack is as follows: -## If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 416, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 415, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) ## interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE Else WILD ## -## Ends in an error in state: 411. +## Ends in an error in state: 410. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else . LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -313,7 +275,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE WILD ## -## Ends in an error in state: 410. +## Ends in an error in state: 409. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE . Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -325,7 +287,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD RBRACE interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 409. +## Ends in an error in state: 408. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if option(SEMI) . RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -335,9 +297,39 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD SEMI P +interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR LBRACE WILD VBAR +## +## Ends in an error in state: 407. +## +## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] +## +## The known suffix of the stack is as follows: +## If parenthesized_expr LBRACE closed_if +## +## 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 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 416, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 415, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) +## + + + interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR WILD ## -## Ends in an error in state: 349. +## Ends in an error in state: 350. ## ## if_then_else(closed_if) -> If parenthesized_expr . LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -349,7 +341,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR WILD interactive_expr: If LPAR WILD RPAR LBRACE If WILD ## -## Ends in an error in state: 348. +## Ends in an error in state: 349. ## ## if_then_else(closed_if) -> If . parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -361,7 +353,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE If WILD interactive_expr: If LPAR WILD RPAR LBRACE Switch VBAR ## -## Ends in an error in state: 232. +## Ends in an error in state: 233. ## ## switch_expr(base_if_then_else) -> Switch . switch_expr_ LBRACE cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -373,7 +365,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch VBAR interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR VBAR ## -## Ends in an error in state: 275. +## Ends in an error in state: 276. ## ## case_clause(base_if_then_else) -> VBAR . pattern ARROW base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -385,7 +377,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR VBAR interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW Bytes SEMI WILD ## -## Ends in an error in state: 437. +## Ends in an error in state: 434. ## ## nseq(case_clause(base_if_then_else)) -> case_clause(base_if_then_else) . seq(case_clause(base_if_then_else)) [ RBRACE ] ## @@ -397,7 +389,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW By interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW Bytes VBAR Bytes ARROW Bytes SEMI WILD ## -## Ends in an error in state: 439. +## Ends in an error in state: 436. ## ## seq(case_clause(base_if_then_else)) -> case_clause(base_if_then_else) . seq(case_clause(base_if_then_else)) [ RBRACE ] ## @@ -409,7 +401,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW By interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE VBAR ## -## Ends in an error in state: 347. +## Ends in an error in state: 348. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE . closed_if option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -419,43 +411,9 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If -interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD ARROW Bytes VBAR -## -## Ends in an error in state: 418. -## -## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] -## -## The known suffix of the stack is as follows: -## If parenthesized_expr LBRACE closed_if -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 406, spurious reduction of production base_expr(closed_if) -> fun_expr -## In state 417, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) -## In state 416, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) -## - - - interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE VBAR ## -## Ends in an error in state: 422. +## Ends in an error in state: 421. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE . base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -467,7 +425,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 428. +## Ends in an error in state: 425. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) . RBRACE [ VBAR SEMI RBRACE ] ## @@ -479,7 +437,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD RBRACE Else LBRACE WILD VBAR ## -## Ends in an error in state: 427. +## Ends in an error in state: 424. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE base_if_then_else . option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -490,26 +448,26 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If ## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 425, spurious reduction of production base_expr(base_if_then_else) -> disj_expr_level -## In state 430, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr(base_if_then_else) -## In state 426, spurious reduction of production base_if_then_else -> base_if_then_else__open(base_if_then_else) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 427, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr +## In state 423, spurious reduction of production base_if_then_else -> base_if_then_else__open(base_if_then_else) ## interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD RBRACE Else WILD ## -## Ends in an error in state: 421. +## Ends in an error in state: 420. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else . LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -521,7 +479,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD RBRACE WILD ## -## Ends in an error in state: 420. +## Ends in an error in state: 419. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE . Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -533,7 +491,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 419. +## Ends in an error in state: 418. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if option(SEMI) . RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -543,9 +501,39 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If +interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR LBRACE WILD VBAR +## +## Ends in an error in state: 417. +## +## if_then_else(base_if_then_else) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] +## +## The known suffix of the stack is as follows: +## If parenthesized_expr LBRACE closed_if +## +## 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 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 416, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 415, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) +## + + + interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If LPAR Bytes RPAR WILD ## -## Ends in an error in state: 346. +## Ends in an error in state: 347. ## ## if_then_else(base_if_then_else) -> If parenthesized_expr . LBRACE closed_if option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -557,7 +545,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If WILD ## -## Ends in an error in state: 345. +## Ends in an error in state: 346. ## ## if_then_else(base_if_then_else) -> If . parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE base_if_then_else option(SEMI) RBRACE [ VBAR SEMI RBRACE ] ## @@ -569,7 +557,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW If interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW VBAR ## -## Ends in an error in state: 344. +## Ends in an error in state: 345. ## ## case_clause(base_if_then_else) -> VBAR pattern ARROW . base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -579,9 +567,9 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW VB -interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW WILD ARROW Bytes Type +interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW WILD Type ## -## Ends in an error in state: 431. +## Ends in an error in state: 428. ## ## case_clause(base_if_then_else) -> VBAR pattern ARROW base_if_then_else . option(SEMI) [ VBAR RBRACE ] ## @@ -592,60 +580,26 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW WI ## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 424, spurious reduction of production base_expr(base_if_then_else) -> fun_expr -## In state 430, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr(base_if_then_else) -## In state 426, spurious reduction of production base_if_then_else -> base_if_then_else__open(base_if_then_else) -## - - - -interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD ARROW WILD Type -## -## Ends in an error in state: 425. -## -## base_expr(base_if_then_else) -> disj_expr_level . [ VBAR SEMI RBRACE ] -## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ VBAR SEMI RBRACE Or BOOL_OR ARROW ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ VBAR SEMI RBRACE Or BOOL_OR ARROW ] -## fun_expr -> disj_expr_level . ARROW expr [ VBAR SEMI RBRACE ] -## -## The known suffix of the stack is as follows: -## disj_expr_level -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 427, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr +## In state 423, spurious reduction of production base_if_then_else -> base_if_then_else__open(base_if_then_else) ## interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD COMMA Bytes RPAR ## -## Ends in an error in state: 343. +## Ends in an error in state: 344. ## ## case_clause(base_if_then_else) -> VBAR pattern . ARROW base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -656,16 +610,16 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE VBAR WILD COMMA By ## 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 329, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern -## In state 332, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) -## In state 341, spurious reduction of production pattern -> tuple(sub_pattern) +## In state 330, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern +## In state 333, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) +## In state 342, spurious reduction of production pattern -> tuple(sub_pattern) ## interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE WILD ## -## Ends in an error in state: 274. +## Ends in an error in state: 275. ## ## switch_expr(base_if_then_else) -> Switch switch_expr_ LBRACE . cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -677,7 +631,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE WILD interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD WILD ## -## Ends in an error in state: 273. +## Ends in an error in state: 274. ## ## switch_expr(base_if_then_else) -> Switch switch_expr_ . LBRACE cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -689,7 +643,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD WILD interactive_expr: If LPAR WILD RPAR LBRACE VBAR ## -## Ends in an error in state: 231. +## Ends in an error in state: 232. ## ## if_then(expr_with_let_expr) -> If parenthesized_expr LBRACE . closed_if option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE . closed_if option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] @@ -700,44 +654,9 @@ interactive_expr: If LPAR WILD RPAR LBRACE VBAR -interactive_expr: If LPAR WILD RPAR LBRACE WILD ARROW Bytes VBAR -## -## Ends in an error in state: 445. -## -## if_then(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] -## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] -## -## The known suffix of the stack is as follows: -## If parenthesized_expr LBRACE closed_if -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 406, spurious reduction of production base_expr(closed_if) -> fun_expr -## In state 417, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr(closed_if) -## In state 416, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) -## - - - interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE VBAR ## -## Ends in an error in state: 449. +## Ends in an error in state: 446. ## ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE . expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -749,7 +668,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE VBAR interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 451. +## Ends in an error in state: 448. ## ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) . RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -761,7 +680,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE WILD SEMI PLU interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE WILD VBAR ## -## Ends in an error in state: 450. +## Ends in an error in state: 447. ## ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE expr_with_let_expr . option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -772,27 +691,27 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 400, spurious reduction of production expr_with_let_expr -> expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 401, spurious reduction of production expr_with_let_expr -> expr ## interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else WILD ## -## Ends in an error in state: 448. +## Ends in an error in state: 445. ## ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else . LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -804,7 +723,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else WILD interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE WILD ## -## Ends in an error in state: 447. +## Ends in an error in state: 444. ## ## if_then(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE . [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) RBRACE . Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] @@ -817,7 +736,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE WILD interactive_expr: If LPAR WILD RPAR LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 446. +## Ends in an error in state: 443. ## ## if_then(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) . RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if option(SEMI) . RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] @@ -830,37 +749,38 @@ interactive_expr: If LPAR WILD RPAR LBRACE WILD SEMI PLUS interactive_expr: If LPAR WILD RPAR LBRACE WILD VBAR ## -## Ends in an error in state: 407. +## Ends in an error in state: 442. ## -## base_expr(closed_if) -> disj_expr_level . [ SEMI RBRACE ] -## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ SEMI RBRACE Or BOOL_OR ARROW ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ SEMI RBRACE Or BOOL_OR ARROW ] -## fun_expr -> disj_expr_level . ARROW expr [ SEMI RBRACE ] +## if_then(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] +## if_then_else(expr_with_let_expr) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## ## The known suffix of the stack is as follows: -## disj_expr_level +## If parenthesized_expr LBRACE closed_if ## ## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 416, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 415, spurious reduction of production closed_if -> base_if_then_else__open(closed_if) ## interactive_expr: If LPAR WILD RPAR WILD ## -## Ends in an error in state: 230. +## Ends in an error in state: 231. ## ## if_then(expr_with_let_expr) -> If parenthesized_expr . LBRACE closed_if option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## if_then_else(expr_with_let_expr) -> If parenthesized_expr . LBRACE closed_if option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] @@ -873,7 +793,7 @@ interactive_expr: If LPAR WILD RPAR WILD interactive_expr: If LPAR WILD VBAR ## -## Ends in an error in state: 225. +## Ends in an error in state: 226. ## ## parenthesized_expr -> LPAR expr . RPAR [ LBRACE ] ## @@ -884,26 +804,26 @@ interactive_expr: If LPAR WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: If WILD ## -## Ends in an error in state: 96. +## Ends in an error in state: 97. ## ## if_then(expr_with_let_expr) -> If . parenthesized_expr LBRACE closed_if option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## if_then_else(expr_with_let_expr) -> If . parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE expr_with_let_expr option(SEMI) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] @@ -916,7 +836,7 @@ interactive_expr: If WILD interactive_expr: LBRACE ELLIPSIS Constr DOT Ident WILD ## -## Ends in an error in state: 251. +## Ends in an error in state: 252. ## ## projection -> Constr DOT Ident . selection [ COMMA ] ## @@ -928,7 +848,7 @@ interactive_expr: LBRACE ELLIPSIS Constr DOT Ident WILD interactive_expr: LBRACE ELLIPSIS Constr DOT WILD ## -## Ends in an error in state: 250. +## Ends in an error in state: 251. ## ## projection -> Constr DOT . Ident selection [ COMMA ] ## @@ -940,7 +860,7 @@ interactive_expr: LBRACE ELLIPSIS Constr DOT WILD interactive_expr: LBRACE ELLIPSIS Constr WILD ## -## Ends in an error in state: 249. +## Ends in an error in state: 250. ## ## projection -> Constr . DOT Ident selection [ COMMA ] ## @@ -952,7 +872,7 @@ interactive_expr: LBRACE ELLIPSIS Constr WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 266. +## Ends in an error in state: 267. ## ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . COMMA nsepseq(field_path_assignment,COMMA) [ RBRACE ] @@ -965,27 +885,27 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 265, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) COLON expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 266, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) COLON expr ## interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON VBAR ## -## Ends in an error in state: 264. +## Ends in an error in state: 265. ## ## field_path_assignment -> nsepseq(field_name,DOT) COLON . expr [ RBRACE COMMA ] ## @@ -997,7 +917,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON VBAR interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 270. +## Ends in an error in state: 271. ## ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . COMMA nsepseq(field_path_assignment,COMMA) [ RBRACE ] @@ -1010,27 +930,27 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COLON 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 265, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) COLON expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 266, spurious reduction of production field_path_assignment -> nsepseq(field_name,DOT) COLON expr ## interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 271. +## Ends in an error in state: 272. ## ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment COMMA . nsepseq(field_path_assignment,COMMA) [ RBRACE ] ## seq(__anonymous_0(field_path_assignment,COMMA)) -> field_path_assignment COMMA . seq(__anonymous_0(field_path_assignment,COMMA)) [ RBRACE ] @@ -1043,7 +963,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COMMA WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 267. +## Ends in an error in state: 268. ## ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment COMMA . nsepseq(field_path_assignment,COMMA) [ RBRACE ] ## nseq(__anonymous_0(field_path_assignment,COMMA)) -> field_path_assignment COMMA . seq(__anonymous_0(field_path_assignment,COMMA)) [ RBRACE ] @@ -1056,7 +976,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT Ident WILD ## -## Ends in an error in state: 257. +## Ends in an error in state: 258. ## ## nsepseq(field_name,DOT) -> Ident . [ COLON ] ## nsepseq(field_name,DOT) -> Ident . DOT nsepseq(field_name,DOT) [ COLON ] @@ -1069,7 +989,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT Ident WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT WILD ## -## Ends in an error in state: 256. +## Ends in an error in state: 257. ## ## nsepseq(field_name,DOT) -> Ident DOT . nsepseq(field_name,DOT) [ COLON ] ## @@ -1081,7 +1001,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident WILD ## -## Ends in an error in state: 255. +## Ends in an error in state: 256. ## ## field_path_assignment -> Ident . [ RBRACE COMMA ] ## nsepseq(field_name,DOT) -> Ident . [ COLON ] @@ -1095,7 +1015,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident WILD interactive_expr: LBRACE ELLIPSIS Ident COMMA WILD ## -## Ends in an error in state: 254. +## Ends in an error in state: 255. ## ## update_record -> LBRACE ELLIPSIS path COMMA . sep_or_term_list(field_path_assignment,COMMA) RBRACE [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1107,7 +1027,7 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA WILD interactive_expr: LBRACE ELLIPSIS Ident DOT Ident VBAR ## -## Ends in an error in state: 253. +## Ends in an error in state: 254. ## ## update_record -> LBRACE ELLIPSIS path . COMMA sep_or_term_list(field_path_assignment,COMMA) RBRACE [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1118,16 +1038,16 @@ interactive_expr: LBRACE ELLIPSIS Ident DOT 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 103, spurious reduction of production selection -> DOT Ident -## In state 106, spurious reduction of production projection -> Ident selection -## In state 252, spurious reduction of production path -> projection +## In state 104, spurious reduction of production selection -> DOT Ident +## In state 107, spurious reduction of production projection -> Ident selection +## In state 253, spurious reduction of production path -> projection ## interactive_expr: LBRACE ELLIPSIS Ident WILD ## -## Ends in an error in state: 248. +## Ends in an error in state: 249. ## ## path -> Ident . [ COMMA ] ## projection -> Ident . selection [ COMMA ] @@ -1140,7 +1060,7 @@ interactive_expr: LBRACE ELLIPSIS Ident WILD interactive_expr: LBRACE ELLIPSIS WILD ## -## Ends in an error in state: 247. +## Ends in an error in state: 248. ## ## update_record -> LBRACE ELLIPSIS . path COMMA sep_or_term_list(field_path_assignment,COMMA) RBRACE [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1150,9 +1070,52 @@ interactive_expr: LBRACE ELLIPSIS WILD -interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COLON Bytes VBAR +interactive_expr: LBRACE Ident COLON Bytes VBAR ## -## Ends in an error in state: 477. +## Ends in an error in state: 482. +## +## sequence_or_record_in -> field_assignment . option(more_field_assignments) [ RBRACE ] +## +## The known suffix of the stack is as follows: +## field_assignment +## +## 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 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 464, spurious reduction of production field_assignment -> Ident COLON expr +## + + + +interactive_expr: LBRACE Ident COLON VBAR +## +## Ends in an error in state: 463. +## +## field_assignment -> Ident COLON . expr [ RBRACE COMMA ] +## +## The known suffix of the stack is as follows: +## Ident COLON +## + + + +interactive_expr: LBRACE Ident COMMA Ident COLON Bytes VBAR +## +## Ends in an error in state: 468. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . [ RBRACE ] ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . COMMA nsepseq(field_assignment_punning,COMMA) [ RBRACE ] @@ -1165,28 +1128,28 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COLON 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 465, spurious reduction of production field_assignment -> Ident COLON expr -## In state 484, spurious reduction of production field_assignment_punning -> field_assignment +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 464, spurious reduction of production field_assignment -> Ident COLON expr +## In state 475, spurious reduction of production field_assignment_punning -> field_assignment ## -interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA Ident COLON Bytes VBAR +interactive_expr: LBRACE Ident COMMA Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 481. +## Ends in an error in state: 472. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . [ RBRACE ] ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . COMMA nsepseq(field_assignment_punning,COMMA) [ RBRACE ] @@ -1199,28 +1162,28 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA Ident COLON Bytes V ## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 465, spurious reduction of production field_assignment -> Ident COLON expr -## In state 484, spurious reduction of production field_assignment_punning -> field_assignment +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 464, spurious reduction of production field_assignment -> Ident COLON expr +## In state 475, spurious reduction of production field_assignment_punning -> field_assignment ## -interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA Ident COMMA WILD +interactive_expr: LBRACE Ident COMMA Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 482. +## Ends in an error in state: 473. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning COMMA . nsepseq(field_assignment_punning,COMMA) [ RBRACE ] ## seq(__anonymous_0(field_assignment_punning,COMMA)) -> field_assignment_punning COMMA . seq(__anonymous_0(field_assignment_punning,COMMA)) [ RBRACE ] @@ -1231,9 +1194,9 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA Ident COMMA WILD -interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA WILD +interactive_expr: LBRACE Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 478. +## Ends in an error in state: 469. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning COMMA . nsepseq(field_assignment_punning,COMMA) [ RBRACE ] ## nseq(__anonymous_0(field_assignment_punning,COMMA)) -> field_assignment_punning COMMA . seq(__anonymous_0(field_assignment_punning,COMMA)) [ RBRACE ] @@ -1244,9 +1207,9 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA Ident COMMA WILD -interactive_expr: LBRACE Ident COLON Bytes COMMA Ident WILD +interactive_expr: LBRACE Ident COMMA Ident WILD ## -## Ends in an error in state: 473. +## Ends in an error in state: 462. ## ## field_assignment -> Ident . COLON expr [ RBRACE COMMA ] ## field_assignment_punning -> Ident . [ RBRACE COMMA ] @@ -1257,9 +1220,9 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA Ident WILD -interactive_expr: LBRACE Ident COLON Bytes COMMA WILD +interactive_expr: LBRACE Ident COMMA WILD ## -## Ends in an error in state: 472. +## Ends in an error in state: 461. ## ## more_field_assignments -> COMMA . sep_or_term_list(field_assignment_punning,COMMA) [ RBRACE ] ## @@ -1269,56 +1232,14 @@ interactive_expr: LBRACE Ident COLON Bytes COMMA WILD -interactive_expr: LBRACE Ident COLON Bytes VBAR -## -## Ends in an error in state: 471. -## -## sequence_or_record_in -> field_assignment . option(more_field_assignments) [ RBRACE ] -## -## The known suffix of the stack is as follows: -## field_assignment -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 465, spurious reduction of production field_assignment -> Ident COLON expr -## - - - -interactive_expr: LBRACE Ident COLON VBAR -## -## Ends in an error in state: 464. -## -## field_assignment -> Ident COLON . expr [ RBRACE COMMA ] -## -## The known suffix of the stack is as follows: -## Ident COLON -## - - - interactive_expr: LBRACE Ident WILD ## -## Ends in an error in state: 463. +## Ends in an error in state: 460. ## ## common_expr -> Ident . [ TIMES SLASH SEMI RBRACE PLUS Or NE Mod MINUS LT LPAR LE GT GE EQEQ COLON CAT BOOL_OR BOOL_AND ARROW ] ## field_assignment -> Ident . COLON expr [ RBRACE COMMA ] ## projection -> Ident . selection [ TIMES SLASH SEMI RBRACE PLUS Or NE Mod MINUS LT LPAR LE GT GE EQEQ COLON CAT BOOL_OR BOOL_AND ARROW ] +## sequence_or_record_in -> Ident . more_field_assignments [ RBRACE ] ## ## The known suffix of the stack is as follows: ## Ident @@ -1328,7 +1249,7 @@ interactive_expr: LBRACE Ident WILD interactive_expr: LBRACE VBAR ## -## Ends in an error in state: 93. +## Ends in an error in state: 94. ## ## sequence_or_record -> LBRACE . sequence_or_record_in RBRACE [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## update_record -> LBRACE . ELLIPSIS path COMMA sep_or_term_list(field_path_assignment,COMMA) RBRACE [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -1339,22 +1260,9 @@ interactive_expr: LBRACE VBAR -interactive_expr: LBRACE WILD SEMI VBAR -## -## Ends in an error in state: 488. -## -## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr SEMI . nsepseq(expr_with_let_expr,SEMI) [ RBRACE ] -## nseq(__anonymous_0(expr_with_let_expr,SEMI)) -> expr_with_let_expr SEMI . seq(__anonymous_0(expr_with_let_expr,SEMI)) [ RBRACE ] -## -## The known suffix of the stack is as follows: -## expr_with_let_expr SEMI -## - - - interactive_expr: LBRACE WILD SEMI WILD SEMI VBAR ## -## Ends in an error in state: 492. +## Ends in an error in state: 490. ## ## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr SEMI . nsepseq(expr_with_let_expr,SEMI) [ RBRACE ] ## seq(__anonymous_0(expr_with_let_expr,SEMI)) -> expr_with_let_expr SEMI . seq(__anonymous_0(expr_with_let_expr,SEMI)) [ RBRACE ] @@ -1367,7 +1275,7 @@ interactive_expr: LBRACE WILD SEMI WILD SEMI VBAR interactive_expr: LBRACE WILD SEMI WILD VBAR ## -## Ends in an error in state: 491. +## Ends in an error in state: 489. ## ## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr . [ RBRACE ] ## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr . SEMI nsepseq(expr_with_let_expr,SEMI) [ RBRACE ] @@ -1380,60 +1288,27 @@ interactive_expr: LBRACE WILD SEMI WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 400, spurious reduction of production expr_with_let_expr -> expr -## - - - -interactive_expr: LBRACE WILD VBAR -## -## Ends in an error in state: 487. -## -## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr . [ RBRACE ] -## nsepseq(expr_with_let_expr,SEMI) -> expr_with_let_expr . SEMI nsepseq(expr_with_let_expr,SEMI) [ RBRACE ] -## nseq(__anonymous_0(expr_with_let_expr,SEMI)) -> expr_with_let_expr . SEMI seq(__anonymous_0(expr_with_let_expr,SEMI)) [ RBRACE ] -## -## The known suffix of the stack is as follows: -## expr_with_let_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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 400, spurious reduction of production expr_with_let_expr -> expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 401, spurious reduction of production expr_with_let_expr -> expr ## interactive_expr: LBRACKET VBAR ## -## Ends in an error in state: 91. +## Ends in an error in state: 92. ## ## list_or_spread -> LBRACKET . expr COMMA sep_or_term_list(expr,COMMA) RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## list_or_spread -> LBRACKET . expr COMMA ELLIPSIS expr RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -1447,7 +1322,7 @@ interactive_expr: LBRACKET VBAR interactive_expr: LBRACKET WILD COMMA ELLIPSIS VBAR ## -## Ends in an error in state: 499. +## Ends in an error in state: 497. ## ## list_or_spread -> LBRACKET expr COMMA ELLIPSIS . expr RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1459,7 +1334,7 @@ interactive_expr: LBRACKET WILD COMMA ELLIPSIS VBAR interactive_expr: LBRACKET WILD COMMA ELLIPSIS WILD VBAR ## -## Ends in an error in state: 500. +## Ends in an error in state: 498. ## ## list_or_spread -> LBRACKET expr COMMA ELLIPSIS expr . RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1470,26 +1345,26 @@ interactive_expr: LBRACKET WILD COMMA ELLIPSIS WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD COMMA VBAR ## -## Ends in an error in state: 498. +## Ends in an error in state: 496. ## ## list_or_spread -> LBRACKET expr COMMA . sep_or_term_list(expr,COMMA) RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## list_or_spread -> LBRACKET expr COMMA . ELLIPSIS expr RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -1502,7 +1377,7 @@ interactive_expr: LBRACKET WILD COMMA VBAR interactive_expr: LBRACKET WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 507. +## Ends in an error in state: 505. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RBRACKET ] ## nseq(__anonymous_0(expr,COMMA)) -> expr COMMA . seq(__anonymous_0(expr,COMMA)) [ RBRACKET ] @@ -1515,7 +1390,7 @@ interactive_expr: LBRACKET WILD COMMA WILD COMMA VBAR interactive_expr: LBRACKET WILD COMMA WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 510. +## Ends in an error in state: 508. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RBRACKET ] ## seq(__anonymous_0(expr,COMMA)) -> expr COMMA . seq(__anonymous_0(expr,COMMA)) [ RBRACKET ] @@ -1528,7 +1403,7 @@ interactive_expr: LBRACKET WILD COMMA WILD COMMA WILD COMMA VBAR interactive_expr: LBRACKET WILD COMMA WILD COMMA WILD VBAR ## -## Ends in an error in state: 509. +## Ends in an error in state: 507. ## ## nsepseq(expr,COMMA) -> expr . [ RBRACKET ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RBRACKET ] @@ -1541,26 +1416,26 @@ interactive_expr: LBRACKET WILD COMMA WILD COMMA WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD COMMA WILD VBAR ## -## Ends in an error in state: 506. +## Ends in an error in state: 504. ## ## nsepseq(expr,COMMA) -> expr . [ RBRACKET ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RBRACKET ] @@ -1573,26 +1448,26 @@ interactive_expr: LBRACKET WILD COMMA WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD VBAR ## -## Ends in an error in state: 497. +## Ends in an error in state: 495. ## ## list_or_spread -> LBRACKET expr . COMMA sep_or_term_list(expr,COMMA) RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## list_or_spread -> LBRACKET expr . COMMA ELLIPSIS expr RBRACKET [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -1605,26 +1480,26 @@ interactive_expr: LBRACKET WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: LPAR VBAR ## -## Ends in an error in state: 94. +## Ends in an error in state: 95. ## ## par(expr) -> LPAR . expr RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## par(tuple(disj_expr_level)) -> LPAR . tuple(disj_expr_level) RPAR [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA COLON BOOL_OR Attr ARROW ] @@ -1638,12 +1513,12 @@ interactive_expr: LPAR VBAR interactive_expr: LPAR WILD COMMA Bytes RPAR COLON Ident TIMES ## -## Ends in an error in state: 165. +## Ends in an error in state: 166. ## -## base_expr(expr) -> disj_expr_level . [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] +## base_expr -> disj_expr_level . [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR Attr ARROW ] ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR Attr ARROW ] -## fun_expr -> disj_expr_level . ARROW expr [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] +## fun_expr(expr) -> disj_expr_level . ARROW expr [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level @@ -1652,18 +1527,18 @@ interactive_expr: LPAR WILD COMMA Bytes RPAR COLON Ident TIMES ## 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 133, spurious reduction of production option(type_expr_simple_args) -> -## In state 142, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) -## In state 149, spurious reduction of production type_annotation_simple -> COLON type_expr_simple -## In state 150, spurious reduction of production option(type_annotation_simple) -> type_annotation_simple -## In state 151, spurious reduction of production disj_expr_level -> par(tuple(disj_expr_level)) option(type_annotation_simple) +## In state 134, spurious reduction of production option(type_expr_simple_args) -> +## In state 143, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) +## In state 150, spurious reduction of production type_annotation_simple -> COLON type_expr_simple +## In state 151, spurious reduction of production option(type_annotation_simple) -> type_annotation_simple +## In state 152, spurious reduction of production disj_expr_level -> par(tuple(disj_expr_level)) option(type_annotation_simple) ## interactive_expr: LPAR WILD COMMA Bytes RPAR WILD ## -## Ends in an error in state: 130. +## Ends in an error in state: 131. ## ## disj_expr_level -> par(tuple(disj_expr_level)) . option(type_annotation_simple) [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR Attr ARROW ] ## @@ -1675,7 +1550,7 @@ interactive_expr: LPAR WILD COMMA Bytes RPAR WILD interactive_expr: LPAR WILD COMMA VBAR ## -## Ends in an error in state: 458. +## Ends in an error in state: 455. ## ## tuple(disj_expr_level) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ RPAR ] ## @@ -1687,7 +1562,7 @@ interactive_expr: LPAR WILD COMMA VBAR interactive_expr: LPAR WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 461. +## Ends in an error in state: 458. ## ## nsepseq(disj_expr_level,COMMA) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ RPAR ] ## @@ -1699,7 +1574,7 @@ interactive_expr: LPAR WILD COMMA WILD COMMA VBAR interactive_expr: LPAR WILD COMMA WILD VBAR ## -## Ends in an error in state: 460. +## Ends in an error in state: 457. ## ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ RPAR Or COMMA BOOL_OR ] ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ RPAR Or COMMA BOOL_OR ] @@ -1713,28 +1588,28 @@ interactive_expr: LPAR WILD COMMA WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: LPAR WILD VBAR ## -## Ends in an error in state: 457. +## Ends in an error in state: 454. ## -## base_expr(expr) -> disj_expr_level . [ RPAR ] +## base_expr -> disj_expr_level . [ RPAR ] ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ RPAR Or COMMA BOOL_OR ARROW ] ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ RPAR Or COMMA BOOL_OR ARROW ] -## fun_expr -> disj_expr_level . ARROW expr [ RPAR ] +## fun_expr(expr) -> disj_expr_level . ARROW expr [ RPAR ] ## tuple(disj_expr_level) -> disj_expr_level . COMMA nsepseq(disj_expr_level,COMMA) [ RPAR ] ## ## The known suffix of the stack is as follows: @@ -1744,23 +1619,23 @@ interactive_expr: LPAR WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: Let Rec VBAR ## -## Ends in an error in state: 354. +## Ends in an error in state: 355. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let Rec . let_binding SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1772,7 +1647,7 @@ interactive_expr: Let Rec VBAR interactive_expr: Let Rec WILD EQ Bytes SEMI VBAR ## -## Ends in an error in state: 397. +## Ends in an error in state: 398. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let Rec let_binding SEMI . expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1784,7 +1659,7 @@ interactive_expr: Let Rec WILD EQ Bytes SEMI VBAR interactive_expr: Let Rec WILD EQ Bytes VBAR ## -## Ends in an error in state: 396. +## Ends in an error in state: 397. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let Rec let_binding . SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1795,27 +1670,27 @@ interactive_expr: Let Rec WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 532, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 525, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr ## interactive_expr: Let VBAR ## -## Ends in an error in state: 353. +## Ends in an error in state: 354. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let . let_binding SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## let_expr(expr_with_let_expr) -> seq(Attr) Let . Rec let_binding SEMI expr_with_let_expr [ SEMI RBRACE EOF ] @@ -1828,7 +1703,7 @@ interactive_expr: Let VBAR interactive_expr: Let WILD EQ Bytes SEMI VBAR ## -## Ends in an error in state: 402. +## Ends in an error in state: 403. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let let_binding SEMI . expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1840,7 +1715,7 @@ interactive_expr: Let WILD EQ Bytes SEMI VBAR interactive_expr: Let WILD EQ Bytes VBAR ## -## Ends in an error in state: 401. +## Ends in an error in state: 402. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let let_binding . SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1851,27 +1726,27 @@ interactive_expr: Let WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 532, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 525, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr ## interactive_expr: MINUS VBAR ## -## Ends in an error in state: 92. +## Ends in an error in state: 93. ## ## unary_expr_level -> MINUS . call_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1883,7 +1758,7 @@ interactive_expr: MINUS VBAR interactive_expr: NOT VBAR ## -## Ends in an error in state: 90. +## Ends in an error in state: 91. ## ## unary_expr_level -> NOT . call_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -1895,7 +1770,7 @@ interactive_expr: NOT VBAR interactive_expr: Switch Constr WILD ## -## Ends in an error in state: 114. +## Ends in an error in state: 115. ## ## module_field -> Constr . DOT module_fun [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## projection -> Constr . DOT Ident selection [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -1908,7 +1783,7 @@ interactive_expr: Switch Constr WILD interactive_expr: Switch LBRACE WILD ## -## Ends in an error in state: 246. +## Ends in an error in state: 247. ## ## update_record -> LBRACE . ELLIPSIS path COMMA sep_or_term_list(field_path_assignment,COMMA) RBRACE [ LBRACE ] ## @@ -1920,7 +1795,7 @@ interactive_expr: Switch LBRACE WILD interactive_expr: Switch LBRACKET VBAR ## -## Ends in an error in state: 233. +## Ends in an error in state: 234. ## ## list__(expr) -> LBRACKET . option(sep_or_term_list(expr,SEMI)) RBRACKET [ LBRACE ] ## @@ -1932,7 +1807,7 @@ interactive_expr: Switch LBRACKET VBAR interactive_expr: Switch LBRACKET WILD SEMI VBAR ## -## Ends in an error in state: 240. +## Ends in an error in state: 241. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -1945,7 +1820,7 @@ interactive_expr: Switch LBRACKET WILD SEMI VBAR interactive_expr: Switch LBRACKET WILD SEMI WILD SEMI VBAR ## -## Ends in an error in state: 244. +## Ends in an error in state: 245. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -1958,7 +1833,7 @@ interactive_expr: Switch LBRACKET WILD SEMI WILD SEMI VBAR interactive_expr: Switch LBRACKET WILD SEMI WILD VBAR ## -## Ends in an error in state: 243. +## Ends in an error in state: 244. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -1971,26 +1846,26 @@ interactive_expr: Switch LBRACKET WILD SEMI WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: Switch LBRACKET WILD VBAR ## -## Ends in an error in state: 239. +## Ends in an error in state: 240. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -2003,26 +1878,26 @@ interactive_expr: Switch LBRACKET WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: Switch LPAR VBAR ## -## Ends in an error in state: 88. +## Ends in an error in state: 89. ## ## par(expr) -> LPAR . expr RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## unit -> LPAR . RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2035,7 +1910,7 @@ interactive_expr: Switch LPAR VBAR interactive_expr: Switch LPAR WILD VBAR ## -## Ends in an error in state: 455. +## Ends in an error in state: 452. ## ## par(expr) -> LPAR expr . RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LPAR LE LBRACE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2046,26 +1921,26 @@ interactive_expr: Switch LPAR WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## interactive_expr: Switch VBAR ## -## Ends in an error in state: 84. +## Ends in an error in state: 85. ## ## switch_expr(base_cond) -> Switch . switch_expr_ LBRACE cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2077,7 +1952,7 @@ interactive_expr: Switch VBAR interactive_expr: Switch WILD LBRACE VBAR LBRACKET VBAR ## -## Ends in an error in state: 335. +## Ends in an error in state: 336. ## ## list__(sub_pattern) -> LBRACKET . option(sep_or_term_list(sub_pattern,SEMI)) RBRACKET [ COMMA ARROW ] ## pattern -> LBRACKET . sub_pattern COMMA ELLIPSIS sub_pattern RBRACKET [ ARROW ] @@ -2090,7 +1965,7 @@ interactive_expr: Switch WILD LBRACE VBAR LBRACKET VBAR interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA ELLIPSIS VBAR ## -## Ends in an error in state: 338. +## Ends in an error in state: 339. ## ## pattern -> LBRACKET sub_pattern COMMA ELLIPSIS . sub_pattern RBRACKET [ ARROW ] ## @@ -2102,7 +1977,7 @@ interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA ELLIPSIS VBAR interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA ELLIPSIS WILD WILD ## -## Ends in an error in state: 339. +## Ends in an error in state: 340. ## ## pattern -> LBRACKET sub_pattern COMMA ELLIPSIS sub_pattern . RBRACKET [ ARROW ] ## @@ -2114,7 +1989,7 @@ interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA ELLIPSIS WILD WILD interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA WILD ## -## Ends in an error in state: 337. +## Ends in an error in state: 338. ## ## pattern -> LBRACKET sub_pattern COMMA . ELLIPSIS sub_pattern RBRACKET [ ARROW ] ## @@ -2126,7 +2001,7 @@ interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD COMMA WILD interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD WILD ## -## Ends in an error in state: 336. +## Ends in an error in state: 337. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -2141,7 +2016,7 @@ interactive_expr: Switch WILD LBRACE VBAR LBRACKET WILD WILD interactive_expr: Switch WILD LBRACE VBAR LPAR Bytes RPAR WILD ## -## Ends in an error in state: 342. +## Ends in an error in state: 343. ## ## tuple(sub_pattern) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ ARROW ] ## @@ -2153,7 +2028,7 @@ interactive_expr: Switch WILD LBRACE VBAR LPAR Bytes RPAR WILD interactive_expr: Switch WILD LBRACE VBAR VBAR ## -## Ends in an error in state: 515. +## Ends in an error in state: 513. ## ## case_clause(base_cond) -> VBAR . pattern ARROW base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2165,7 +2040,7 @@ interactive_expr: Switch WILD LBRACE VBAR VBAR interactive_expr: Switch WILD LBRACE VBAR WILD ARROW Bytes SEMI WILD ## -## Ends in an error in state: 528. +## Ends in an error in state: 521. ## ## nseq(case_clause(base_cond)) -> case_clause(base_cond) . seq(case_clause(base_cond)) [ RBRACE ] ## @@ -2177,7 +2052,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW Bytes SEMI WILD interactive_expr: Switch WILD LBRACE VBAR WILD ARROW Bytes VBAR Bytes ARROW Bytes SEMI WILD ## -## Ends in an error in state: 530. +## Ends in an error in state: 523. ## ## seq(case_clause(base_cond)) -> case_clause(base_cond) . seq(case_clause(base_cond)) [ RBRACE ] ## @@ -2189,7 +2064,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW Bytes VBAR Bytes ARROW Byte interactive_expr: Switch WILD LBRACE VBAR WILD ARROW VBAR ## -## Ends in an error in state: 517. +## Ends in an error in state: 515. ## ## case_clause(base_cond) -> VBAR pattern ARROW . base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2199,9 +2074,9 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW VBAR -interactive_expr: Switch WILD LBRACE VBAR WILD ARROW WILD ARROW Bytes Type +interactive_expr: Switch WILD LBRACE VBAR WILD ARROW WILD Type ## -## Ends in an error in state: 523. +## Ends in an error in state: 516. ## ## case_clause(base_cond) -> VBAR pattern ARROW base_cond . option(SEMI) [ VBAR RBRACE ] ## @@ -2212,60 +2087,25 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 216, spurious reduction of production fun_expr -> disj_expr_level ARROW expr -## In state 518, spurious reduction of production base_expr(base_cond) -> fun_expr -## In state 521, spurious reduction of production base_cond__open(base_cond) -> base_expr(base_cond) -## In state 522, spurious reduction of production base_cond -> base_cond__open(base_cond) -## - - - -interactive_expr: Switch WILD LBRACE VBAR WILD ARROW WILD Type -## -## Ends in an error in state: 519. -## -## base_expr(base_cond) -> disj_expr_level . [ VBAR SEMI RBRACE ] -## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level . BOOL_OR conj_expr_level [ VBAR SEMI RBRACE Or BOOL_OR ARROW ] -## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level . Or conj_expr_level [ VBAR SEMI RBRACE Or BOOL_OR ARROW ] -## fun_expr -> disj_expr_level . ARROW expr [ VBAR SEMI RBRACE ] -## -## The known suffix of the stack is as follows: -## disj_expr_level -## -## 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr ## interactive_expr: Switch WILD LBRACE VBAR WILD COMMA Bytes RPAR ## -## Ends in an error in state: 516. +## Ends in an error in state: 514. ## ## case_clause(base_cond) -> VBAR pattern . ARROW base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2276,16 +2116,16 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA Bytes 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 329, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern -## In state 332, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) -## In state 341, spurious reduction of production pattern -> tuple(sub_pattern) +## In state 330, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern +## In state 333, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) +## In state 342, spurious reduction of production pattern -> tuple(sub_pattern) ## interactive_expr: Switch WILD LBRACE VBAR WILD COMMA VBAR ## -## Ends in an error in state: 328. +## Ends in an error in state: 329. ## ## tuple(sub_pattern) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] ## @@ -2297,7 +2137,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA VBAR interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 330. +## Ends in an error in state: 331. ## ## nsepseq(sub_pattern,COMMA) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] ## @@ -2309,7 +2149,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD COMMA VBAR interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD WILD ## -## Ends in an error in state: 329. +## Ends in an error in state: 330. ## ## nsepseq(sub_pattern,COMMA) -> sub_pattern . [ RPAR ARROW ] ## nsepseq(sub_pattern,COMMA) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] @@ -2322,7 +2162,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD WILD interactive_expr: Switch WILD LBRACE VBAR WILD WILD ## -## Ends in an error in state: 433. +## Ends in an error in state: 430. ## ## pattern -> core_pattern . [ ARROW ] ## sub_pattern -> core_pattern . [ COMMA ] @@ -2335,7 +2175,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD WILD interactive_expr: Switch WILD LBRACE WILD ## -## Ends in an error in state: 514. +## Ends in an error in state: 512. ## ## switch_expr(base_cond) -> Switch switch_expr_ LBRACE . cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2347,7 +2187,7 @@ interactive_expr: Switch WILD LBRACE WILD interactive_expr: Switch WILD WILD ## -## Ends in an error in state: 513. +## Ends in an error in state: 511. ## ## switch_expr(base_cond) -> Switch switch_expr_ . LBRACE cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2359,7 +2199,7 @@ interactive_expr: Switch WILD WILD interactive_expr: VBAR ## -## Ends in an error in state: 543. +## Ends in an error in state: 536. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2371,9 +2211,9 @@ interactive_expr: VBAR interactive_expr: WILD ARROW VBAR ## -## Ends in an error in state: 215. +## Ends in an error in state: 216. ## -## fun_expr -> disj_expr_level ARROW . expr [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] +## fun_expr(expr) -> disj_expr_level ARROW . expr [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## ## The known suffix of the stack is as follows: ## disj_expr_level ARROW @@ -2383,7 +2223,7 @@ interactive_expr: WILD ARROW VBAR interactive_expr: WILD BOOL_AND VBAR ## -## Ends in an error in state: 169. +## Ends in an error in state: 170. ## ## bin_op(conj_expr_level,BOOL_AND,comp_expr_level) -> conj_expr_level BOOL_AND . comp_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2395,7 +2235,7 @@ interactive_expr: WILD BOOL_AND VBAR interactive_expr: WILD BOOL_OR VBAR ## -## Ends in an error in state: 213. +## Ends in an error in state: 214. ## ## bin_op(disj_expr_level,BOOL_OR,conj_expr_level) -> disj_expr_level BOOL_OR . conj_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR Attr ARROW ] ## @@ -2407,7 +2247,7 @@ interactive_expr: WILD BOOL_OR VBAR interactive_expr: WILD CAT VBAR ## -## Ends in an error in state: 192. +## Ends in an error in state: 193. ## ## bin_op(add_expr_level,CAT,cat_expr_level) -> add_expr_level CAT . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2419,7 +2259,7 @@ interactive_expr: WILD CAT VBAR interactive_expr: WILD COLON Ident LPAR Ident VBAR ## -## Ends in an error in state: 135. +## Ends in an error in state: 136. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . [ RPAR ] ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . COMMA nsepseq(type_expr_simple,COMMA) [ RPAR ] @@ -2431,15 +2271,15 @@ interactive_expr: WILD COLON Ident LPAR 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 133, spurious reduction of production option(type_expr_simple_args) -> -## In state 142, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) +## In state 134, spurious reduction of production option(type_expr_simple_args) -> +## In state 143, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) ## interactive_expr: WILD COLON Ident LPAR WILD ## -## Ends in an error in state: 134. +## Ends in an error in state: 135. ## ## par(nsepseq(type_expr_simple,COMMA)) -> LPAR . nsepseq(type_expr_simple,COMMA) RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2451,7 +2291,7 @@ interactive_expr: WILD COLON Ident LPAR WILD interactive_expr: WILD COLON Ident WILD ## -## Ends in an error in state: 133. +## Ends in an error in state: 134. ## ## type_expr_simple -> Ident . option(type_expr_simple_args) [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2463,7 +2303,7 @@ interactive_expr: WILD COLON Ident WILD interactive_expr: WILD COLON LPAR Ident ARROW Ident VBAR ## -## Ends in an error in state: 145. +## Ends in an error in state: 146. ## ## type_expr_simple -> LPAR type_expr_simple ARROW type_expr_simple . RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2474,15 +2314,15 @@ interactive_expr: WILD COLON LPAR Ident ARROW 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 133, spurious reduction of production option(type_expr_simple_args) -> -## In state 142, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) +## In state 134, spurious reduction of production option(type_expr_simple_args) -> +## In state 143, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) ## interactive_expr: WILD COLON LPAR Ident ARROW WILD ## -## Ends in an error in state: 144. +## Ends in an error in state: 145. ## ## type_expr_simple -> LPAR type_expr_simple ARROW . type_expr_simple RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2494,7 +2334,7 @@ interactive_expr: WILD COLON LPAR Ident ARROW WILD interactive_expr: WILD COLON LPAR Ident COMMA WILD ## -## Ends in an error in state: 136. +## Ends in an error in state: 137. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple COMMA . nsepseq(type_expr_simple,COMMA) [ RPAR ] ## @@ -2506,7 +2346,7 @@ interactive_expr: WILD COLON LPAR Ident COMMA WILD interactive_expr: WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 152. +## Ends in an error in state: 153. ## ## add_expr_level -> mult_expr_level . [ VBAR Type SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2521,7 +2361,7 @@ interactive_expr: WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD COLON LPAR Ident VBAR ## -## Ends in an error in state: 143. +## Ends in an error in state: 144. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . [ RPAR ] ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . COMMA nsepseq(type_expr_simple,COMMA) [ RPAR ] @@ -2534,15 +2374,15 @@ interactive_expr: WILD COLON LPAR 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 133, spurious reduction of production option(type_expr_simple_args) -> -## In state 142, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) +## In state 134, spurious reduction of production option(type_expr_simple_args) -> +## In state 143, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) ## interactive_expr: WILD COLON LPAR WILD ## -## Ends in an error in state: 132. +## Ends in an error in state: 133. ## ## type_expr_simple -> LPAR . nsepseq(type_expr_simple,COMMA) RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## type_expr_simple -> LPAR . type_expr_simple ARROW type_expr_simple RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2555,7 +2395,7 @@ interactive_expr: WILD COLON LPAR WILD interactive_expr: WILD COLON WILD ## -## Ends in an error in state: 131. +## Ends in an error in state: 132. ## ## type_annotation_simple -> COLON . type_expr_simple [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2567,7 +2407,7 @@ interactive_expr: WILD COLON WILD interactive_expr: WILD EQEQ VBAR ## -## Ends in an error in state: 202. +## Ends in an error in state: 203. ## ## bin_op(comp_expr_level,EQEQ,cat_expr_level) -> comp_expr_level EQEQ . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2579,7 +2419,7 @@ interactive_expr: WILD EQEQ VBAR interactive_expr: WILD GE VBAR ## -## Ends in an error in state: 200. +## Ends in an error in state: 201. ## ## bin_op(comp_expr_level,GE,cat_expr_level) -> comp_expr_level GE . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2591,7 +2431,7 @@ interactive_expr: WILD GE VBAR interactive_expr: WILD GT VBAR ## -## Ends in an error in state: 198. +## Ends in an error in state: 199. ## ## bin_op(comp_expr_level,GT,cat_expr_level) -> comp_expr_level GT . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2603,7 +2443,7 @@ interactive_expr: WILD GT VBAR interactive_expr: WILD LE VBAR ## -## Ends in an error in state: 196. +## Ends in an error in state: 197. ## ## bin_op(comp_expr_level,LE,cat_expr_level) -> comp_expr_level LE . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2615,7 +2455,7 @@ interactive_expr: WILD LE VBAR interactive_expr: WILD LPAR VBAR ## -## Ends in an error in state: 156. +## Ends in an error in state: 157. ## ## call_expr -> core_expr LPAR . nsepseq(expr,COMMA) RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## unit -> LPAR . RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2628,7 +2468,7 @@ interactive_expr: WILD LPAR VBAR interactive_expr: WILD LPAR WILD COMMA VBAR ## -## Ends in an error in state: 163. +## Ends in an error in state: 164. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -2640,7 +2480,7 @@ interactive_expr: WILD LPAR WILD COMMA VBAR interactive_expr: WILD LPAR WILD VBAR ## -## Ends in an error in state: 162. +## Ends in an error in state: 163. ## ## nsepseq(expr,COMMA) -> expr . [ RPAR ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -2652,26 +2492,26 @@ interactive_expr: WILD LPAR WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond ## Missing `)`. interactive_expr: WILD LT VBAR ## -## Ends in an error in state: 194. +## Ends in an error in state: 195. ## ## bin_op(comp_expr_level,LT,cat_expr_level) -> comp_expr_level LT . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2683,7 +2523,7 @@ interactive_expr: WILD LT VBAR interactive_expr: WILD MINUS VBAR ## -## Ends in an error in state: 190. +## Ends in an error in state: 191. ## ## bin_op(add_expr_level,MINUS,mult_expr_level) -> add_expr_level MINUS . mult_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2695,7 +2535,7 @@ interactive_expr: WILD MINUS VBAR interactive_expr: WILD MINUS WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 191. +## Ends in an error in state: 192. ## ## bin_op(add_expr_level,MINUS,mult_expr_level) -> add_expr_level MINUS mult_expr_level . [ VBAR Type SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2710,7 +2550,7 @@ interactive_expr: WILD MINUS WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD Mod VBAR ## -## Ends in an error in state: 188. +## Ends in an error in state: 189. ## ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level Mod . unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2722,7 +2562,7 @@ interactive_expr: WILD Mod VBAR interactive_expr: WILD NE VBAR ## -## Ends in an error in state: 171. +## Ends in an error in state: 172. ## ## bin_op(comp_expr_level,NE,cat_expr_level) -> comp_expr_level NE . cat_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or NE Let LT LE GT GE EQEQ EOF COMMA BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2734,7 +2574,7 @@ interactive_expr: WILD NE VBAR interactive_expr: WILD Or VBAR ## -## Ends in an error in state: 166. +## Ends in an error in state: 167. ## ## bin_op(disj_expr_level,Or,conj_expr_level) -> disj_expr_level Or . conj_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE Or Let EOF COMMA BOOL_OR Attr ARROW ] ## @@ -2746,7 +2586,7 @@ interactive_expr: WILD Or VBAR interactive_expr: WILD PLUS VBAR ## -## Ends in an error in state: 184. +## Ends in an error in state: 185. ## ## bin_op(add_expr_level,PLUS,mult_expr_level) -> add_expr_level PLUS . mult_expr_level [ VBAR Type SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2758,7 +2598,7 @@ interactive_expr: WILD PLUS VBAR interactive_expr: WILD PLUS WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 185. +## Ends in an error in state: 186. ## ## bin_op(add_expr_level,PLUS,mult_expr_level) -> add_expr_level PLUS mult_expr_level . [ VBAR Type SEMI RPAR RBRACKET RBRACE PLUS Or NE MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## bin_op(mult_expr_level,Mod,unary_expr_level) -> mult_expr_level . Mod unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2773,7 +2613,7 @@ interactive_expr: WILD PLUS WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD SLASH VBAR ## -## Ends in an error in state: 186. +## Ends in an error in state: 187. ## ## bin_op(mult_expr_level,SLASH,unary_expr_level) -> mult_expr_level SLASH . unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2785,7 +2625,7 @@ interactive_expr: WILD SLASH VBAR interactive_expr: WILD TIMES VBAR ## -## Ends in an error in state: 153. +## Ends in an error in state: 154. ## ## bin_op(mult_expr_level,TIMES,unary_expr_level) -> mult_expr_level TIMES . unary_expr_level [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA CAT BOOL_OR BOOL_AND Attr ARROW ] ## @@ -2797,7 +2637,7 @@ interactive_expr: WILD TIMES VBAR interactive_expr: WILD VBAR ## -## Ends in an error in state: 545. +## Ends in an error in state: 538. ## ## interactive_expr -> expr_with_let_expr . EOF [ # ] ## @@ -2808,27 +2648,27 @@ interactive_expr: WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 400, spurious reduction of production expr_with_let_expr -> expr +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 401, spurious reduction of production expr_with_let_expr -> expr ## interactive_expr: WILD WILD ## -## Ends in an error in state: 155. +## Ends in an error in state: 156. ## ## call_expr -> core_expr . LPAR nsepseq(expr,COMMA) RPAR [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] ## call_expr -> core_expr . unit [ VBAR Type TIMES SLASH SEMI RPAR RBRACKET RBRACE PLUS Or NE Mod MINUS Let LT LE GT GE EQEQ EOF COMMA COLON CAT BOOL_OR BOOL_AND Attr ARROW ] @@ -2842,7 +2682,7 @@ interactive_expr: WILD WILD contract: Attr WILD ## -## Ends in an error in state: 69. +## Ends in an error in state: 70. ## ## seq(Attr) -> Attr . seq(Attr) [ Let ] ## @@ -2852,32 +2692,21 @@ contract: Attr WILD -contract: Let Ident COLON Constr Type +contract: Let Ident COLON String WILD ## -## Ends in an error in state: 376. +## Ends in an error in state: 377. ## ## let_binding -> Ident option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## Ident option(type_annotation) ## -## 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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let Ident EQ VBAR ## -## Ends in an error in state: 377. +## Ends in an error in state: 378. ## ## let_binding -> Ident option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -2885,16 +2714,16 @@ contract: Let Ident EQ VBAR ## Ident option(type_annotation) EQ ## -This is an incorrect let binding. +This is an incorrect let binding. - -Examples of correct let bindings: +Examples of correct let bindings: let a: int = 4; let (a: int, b: int) = (1, 2); let func = (a: int, b: int) => a + b; contract: Let Ident WILD ## -## Ends in an error in state: 375. +## Ends in an error in state: 376. ## ## let_binding -> Ident . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> Ident . [ COMMA ] @@ -2907,7 +2736,7 @@ contract: Let Ident WILD contract: Let LBRACE Ident EQ Bytes COMMA Ident EQ Bytes COMMA WILD ## -## Ends in an error in state: 311. +## Ends in an error in state: 312. ## ## nsepseq(field_pattern,COMMA) -> field_pattern COMMA . nsepseq(field_pattern,COMMA) [ RBRACE ] ## seq(__anonymous_0(field_pattern,COMMA)) -> field_pattern COMMA . seq(__anonymous_0(field_pattern,COMMA)) [ RBRACE ] @@ -2920,7 +2749,7 @@ contract: Let LBRACE Ident EQ Bytes COMMA Ident EQ Bytes COMMA WILD contract: Let LBRACE Ident EQ Bytes COMMA Ident EQ Bytes WILD ## -## Ends in an error in state: 310. +## Ends in an error in state: 311. ## ## nsepseq(field_pattern,COMMA) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,COMMA) -> field_pattern . COMMA nsepseq(field_pattern,COMMA) [ RBRACE ] @@ -2934,7 +2763,7 @@ contract: Let LBRACE Ident EQ Bytes COMMA Ident EQ Bytes WILD contract: Let LBRACE Ident EQ Bytes COMMA WILD ## -## Ends in an error in state: 307. +## Ends in an error in state: 308. ## ## nsepseq(field_pattern,COMMA) -> field_pattern COMMA . nsepseq(field_pattern,COMMA) [ RBRACE ] ## nseq(__anonymous_0(field_pattern,COMMA)) -> field_pattern COMMA . seq(__anonymous_0(field_pattern,COMMA)) [ RBRACE ] @@ -2945,32 +2774,21 @@ contract: Let LBRACE Ident EQ Bytes COMMA WILD -contract: Let LBRACE Ident EQ Bytes RBRACE COLON Constr Type +contract: Let LBRACE Ident EQ Bytes RBRACE COLON String WILD ## -## Ends in an error in state: 389. +## Ends in an error in state: 390. ## ## let_binding -> record_pattern option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## record_pattern option(type_annotation) ## -## 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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let LBRACE Ident EQ Bytes RBRACE EQ VBAR ## -## Ends in an error in state: 390. +## Ends in an error in state: 391. ## ## let_binding -> record_pattern option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -2982,7 +2800,7 @@ contract: Let LBRACE Ident EQ Bytes RBRACE EQ VBAR contract: Let LBRACE Ident EQ Bytes RBRACE WILD ## -## Ends in an error in state: 388. +## Ends in an error in state: 389. ## ## let_binding -> record_pattern . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> record_pattern . [ COMMA ] @@ -2995,7 +2813,7 @@ contract: Let LBRACE Ident EQ Bytes RBRACE WILD contract: Let LBRACE Ident EQ Bytes WILD ## -## Ends in an error in state: 306. +## Ends in an error in state: 307. ## ## nsepseq(field_pattern,COMMA) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,COMMA) -> field_pattern . COMMA nsepseq(field_pattern,COMMA) [ RBRACE ] @@ -3009,7 +2827,7 @@ contract: Let LBRACE Ident EQ Bytes WILD contract: Let LBRACE Ident EQ VBAR ## -## Ends in an error in state: 284. +## Ends in an error in state: 285. ## ## field_pattern -> Ident EQ . sub_pattern [ RBRACE COMMA ] ## @@ -3021,7 +2839,7 @@ contract: Let LBRACE Ident EQ VBAR contract: Let LBRACE Ident WILD ## -## Ends in an error in state: 283. +## Ends in an error in state: 284. ## ## field_pattern -> Ident . EQ sub_pattern [ RBRACE COMMA ] ## @@ -3033,7 +2851,7 @@ contract: Let LBRACE Ident WILD contract: Let LBRACE WILD ## -## Ends in an error in state: 282. +## Ends in an error in state: 283. ## ## record_pattern -> LBRACE . sep_or_term_list(field_pattern,COMMA) RBRACE [ SEMI RPAR RBRACKET RBRACE EQ COMMA COLON ARROW ] ## @@ -3045,7 +2863,7 @@ contract: Let LBRACE WILD contract: Let LPAR C_Some VBAR ## -## Ends in an error in state: 289. +## Ends in an error in state: 290. ## ## constr_pattern -> C_Some . sub_pattern [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -3057,7 +2875,7 @@ contract: Let LPAR C_Some VBAR contract: Let LPAR Constr LBRACKET VBAR ## -## Ends in an error in state: 281. +## Ends in an error in state: 282. ## ## list__(sub_pattern) -> LBRACKET . option(sep_or_term_list(sub_pattern,SEMI)) RBRACKET [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -3069,7 +2887,7 @@ contract: Let LPAR Constr LBRACKET VBAR contract: Let LPAR Constr LBRACKET WILD SEMI VBAR ## -## Ends in an error in state: 314. +## Ends in an error in state: 315. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern SEMI . nsepseq(sub_pattern,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(sub_pattern,SEMI)) -> sub_pattern SEMI . seq(__anonymous_0(sub_pattern,SEMI)) [ RBRACKET ] @@ -3082,7 +2900,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI VBAR contract: Let LPAR Constr LBRACKET WILD SEMI WILD SEMI VBAR ## -## Ends in an error in state: 316. +## Ends in an error in state: 317. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern SEMI . nsepseq(sub_pattern,SEMI) [ RBRACKET ] ## seq(__anonymous_0(sub_pattern,SEMI)) -> sub_pattern SEMI . seq(__anonymous_0(sub_pattern,SEMI)) [ RBRACKET ] @@ -3095,7 +2913,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI WILD SEMI VBAR contract: Let LPAR Constr LBRACKET WILD SEMI WILD WILD ## -## Ends in an error in state: 315. +## Ends in an error in state: 316. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -3109,7 +2927,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI WILD WILD contract: Let LPAR Constr LBRACKET WILD WILD ## -## Ends in an error in state: 313. +## Ends in an error in state: 314. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -3123,7 +2941,7 @@ contract: Let LPAR Constr LBRACKET WILD WILD contract: Let LPAR Constr LPAR VBAR ## -## Ends in an error in state: 280. +## Ends in an error in state: 281. ## ## par(ptuple) -> LPAR . ptuple RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## par(sub_pattern) -> LPAR . sub_pattern RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] @@ -3137,7 +2955,7 @@ contract: Let LPAR Constr LPAR VBAR contract: Let LPAR Constr LPAR WILD COMMA Bytes ARROW ## -## Ends in an error in state: 333. +## Ends in an error in state: 334. ## ## par(ptuple) -> LPAR ptuple . RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -3148,16 +2966,16 @@ contract: Let LPAR Constr LPAR WILD COMMA 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 329, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern -## In state 332, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) -## In state 325, spurious reduction of production ptuple -> tuple(sub_pattern) +## In state 330, spurious reduction of production nsepseq(sub_pattern,COMMA) -> sub_pattern +## In state 333, spurious reduction of production tuple(sub_pattern) -> sub_pattern COMMA nsepseq(sub_pattern,COMMA) +## In state 326, spurious reduction of production ptuple -> tuple(sub_pattern) ## contract: Let LPAR Constr LPAR WILD WILD ## -## Ends in an error in state: 326. +## Ends in an error in state: 327. ## ## par(sub_pattern) -> LPAR sub_pattern . RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## tuple(sub_pattern) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ RPAR ] @@ -3170,7 +2988,7 @@ contract: Let LPAR Constr LPAR WILD WILD contract: Let LPAR Constr SEMI ## -## Ends in an error in state: 373. +## Ends in an error in state: 374. ## ## par(closed_irrefutable) -> LPAR closed_irrefutable . RPAR [ RPAR EQ COMMA COLON ] ## @@ -3181,15 +2999,15 @@ contract: Let LPAR Constr SEMI ## 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 288, spurious reduction of production constr_pattern -> Constr -## In state 372, spurious reduction of production closed_irrefutable -> constr_pattern +## In state 289, spurious reduction of production constr_pattern -> Constr +## In state 373, spurious reduction of production closed_irrefutable -> constr_pattern ## contract: Let LPAR Constr VBAR ## -## Ends in an error in state: 288. +## Ends in an error in state: 289. ## ## constr_pattern -> Constr . sub_pattern [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] @@ -3200,32 +3018,21 @@ contract: Let LPAR Constr VBAR -contract: Let LPAR RPAR COLON Constr Type +contract: Let LPAR RPAR COLON String WILD ## -## Ends in an error in state: 380. +## Ends in an error in state: 381. ## ## let_binding -> unit option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## unit option(type_annotation) ## -## 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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let LPAR RPAR EQ VBAR ## -## Ends in an error in state: 381. +## Ends in an error in state: 382. ## ## let_binding -> unit option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3237,7 +3044,7 @@ contract: Let LPAR RPAR EQ VBAR contract: Let LPAR RPAR WILD ## -## Ends in an error in state: 379. +## Ends in an error in state: 380. ## ## let_binding -> unit . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> unit . [ COMMA ] @@ -3250,7 +3057,7 @@ contract: Let LPAR RPAR WILD contract: Let LPAR VBAR ## -## Ends in an error in state: 355. +## Ends in an error in state: 356. ## ## par(closed_irrefutable) -> LPAR . closed_irrefutable RPAR [ RPAR EQ COMMA COLON ] ## unit -> LPAR . RPAR [ RPAR EQ COMMA COLON ] @@ -3263,7 +3070,7 @@ contract: Let LPAR VBAR contract: Let LPAR WILD COLON WILD ## -## Ends in an error in state: 370. +## Ends in an error in state: 371. ## ## typed_pattern -> irrefutable COLON . type_expr [ RPAR ] ## @@ -3275,7 +3082,7 @@ contract: Let LPAR WILD COLON WILD contract: Let LPAR WILD COMMA Ident EQ ## -## Ends in an error in state: 369. +## Ends in an error in state: 370. ## ## closed_irrefutable -> irrefutable . [ RPAR ] ## typed_pattern -> irrefutable . COLON type_expr [ RPAR ] @@ -3287,39 +3094,28 @@ contract: Let LPAR WILD COMMA Ident EQ ## 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 363, spurious reduction of production nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable -## In state 368, spurious reduction of production tuple(sub_irrefutable) -> sub_irrefutable COMMA nsepseq(sub_irrefutable,COMMA) -## In state 360, spurious reduction of production irrefutable -> tuple(sub_irrefutable) +## In state 364, spurious reduction of production nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable +## In state 369, spurious reduction of production tuple(sub_irrefutable) -> sub_irrefutable COMMA nsepseq(sub_irrefutable,COMMA) +## In state 361, spurious reduction of production irrefutable -> tuple(sub_irrefutable) ## -contract: Let LPAR WILD RPAR COLON Constr Type +contract: Let LPAR WILD RPAR COLON String WILD ## -## Ends in an error in state: 393. +## Ends in an error in state: 394. ## ## let_binding -> par(closed_irrefutable) option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## par(closed_irrefutable) option(type_annotation) ## -## 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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let LPAR WILD RPAR EQ VBAR ## -## Ends in an error in state: 394. +## Ends in an error in state: 395. ## ## let_binding -> par(closed_irrefutable) option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3331,7 +3127,7 @@ contract: Let LPAR WILD RPAR EQ VBAR contract: Let LPAR WILD RPAR WILD ## -## Ends in an error in state: 392. +## Ends in an error in state: 393. ## ## let_binding -> par(closed_irrefutable) . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> par(closed_irrefutable) . [ COMMA ] @@ -3344,7 +3140,7 @@ contract: Let LPAR WILD RPAR WILD contract: Let LPAR WILD WILD ## -## Ends in an error in state: 361. +## Ends in an error in state: 362. ## ## irrefutable -> sub_irrefutable . [ RPAR COLON ] ## tuple(sub_irrefutable) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ RPAR COLON ] @@ -3357,7 +3153,7 @@ contract: Let LPAR WILD WILD contract: Let Rec VBAR ## -## Ends in an error in state: 533. +## Ends in an error in state: 526. ## ## let_declaration -> seq(Attr) Let Rec . let_binding [ Type SEMI Let EOF Attr ] ## @@ -3369,7 +3165,7 @@ contract: Let Rec VBAR contract: Let VBAR ## -## Ends in an error in state: 75. +## Ends in an error in state: 76. ## ## let_declaration -> seq(Attr) Let . let_binding [ Type SEMI Let EOF Attr ] ## let_declaration -> seq(Attr) Let . Rec let_binding [ Type SEMI Let EOF Attr ] @@ -3380,31 +3176,21 @@ contract: Let VBAR -contract: Let WILD COLON Ident Type +contract: Let WILD COLON String WILD ## -## Ends in an error in state: 80. +## Ends in an error in state: 81. ## ## let_binding -> WILD option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## WILD option(type_annotation) ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## In state 68, spurious reduction of production type_expr -> fun_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let WILD COLON WILD ## -## Ends in an error in state: 77. +## Ends in an error in state: 78. ## ## type_annotation -> COLON . type_expr [ EQ ] ## @@ -3414,32 +3200,21 @@ contract: Let WILD COLON WILD -contract: Let WILD COMMA Ident COLON Constr Type +contract: Let WILD COMMA Ident COLON String WILD ## -## Ends in an error in state: 384. +## Ends in an error in state: 385. ## ## let_binding -> tuple(sub_irrefutable) option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## ## The known suffix of the stack is as follows: ## tuple(sub_irrefutable) option(type_annotation) ## -## 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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 78, spurious reduction of production type_annotation -> COLON type_expr -## In state 79, spurious reduction of production option(type_annotation) -> type_annotation -## contract: Let WILD COMMA Ident EQ VBAR ## -## Ends in an error in state: 385. +## Ends in an error in state: 386. ## ## let_binding -> tuple(sub_irrefutable) option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3451,7 +3226,7 @@ contract: Let WILD COMMA Ident EQ VBAR contract: Let WILD COMMA Ident RPAR ## -## Ends in an error in state: 383. +## Ends in an error in state: 384. ## ## let_binding -> tuple(sub_irrefutable) . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## @@ -3462,15 +3237,15 @@ contract: Let WILD COMMA Ident 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 363, spurious reduction of production nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable -## In state 368, spurious reduction of production tuple(sub_irrefutable) -> sub_irrefutable COMMA nsepseq(sub_irrefutable,COMMA) +## In state 364, spurious reduction of production nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable +## In state 369, spurious reduction of production tuple(sub_irrefutable) -> sub_irrefutable COMMA nsepseq(sub_irrefutable,COMMA) ## contract: Let WILD COMMA VBAR ## -## Ends in an error in state: 362. +## Ends in an error in state: 363. ## ## tuple(sub_irrefutable) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] ## @@ -3482,7 +3257,7 @@ contract: Let WILD COMMA VBAR contract: Let WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 364. +## Ends in an error in state: 365. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] ## @@ -3494,7 +3269,7 @@ contract: Let WILD COMMA WILD COMMA VBAR contract: Let WILD COMMA WILD WILD ## -## Ends in an error in state: 363. +## Ends in an error in state: 364. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . [ RPAR EQ COLON ] ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] @@ -3507,7 +3282,7 @@ contract: Let WILD COMMA WILD WILD contract: Let WILD EQ Bytes VBAR ## -## Ends in an error in state: 536. +## Ends in an error in state: 529. ## ## declaration -> let_declaration . option(SEMI) [ Type Let EOF Attr ] ## @@ -3518,28 +3293,28 @@ contract: Let WILD 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 155, spurious reduction of production call_expr_level_in -> core_expr -## In state 173, spurious reduction of production option(type_annotation_simple) -> -## In state 174, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) -## In state 175, spurious reduction of production unary_expr_level -> call_expr_level -## In state 128, spurious reduction of production mult_expr_level -> unary_expr_level -## In state 152, spurious reduction of production add_expr_level -> mult_expr_level -## In state 183, spurious reduction of production cat_expr_level -> add_expr_level -## In state 204, spurious reduction of production comp_expr_level -> cat_expr_level -## In state 211, spurious reduction of production conj_expr_level -> comp_expr_level -## In state 218, spurious reduction of production disj_expr_level -> conj_expr_level -## In state 165, spurious reduction of production base_expr(expr) -> disj_expr_level -## In state 222, spurious reduction of production base_cond__open(expr) -> base_expr(expr) -## In state 223, spurious reduction of production expr -> base_cond__open(expr) -## In state 532, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr -## In state 535, spurious reduction of production let_declaration -> seq(Attr) Let let_binding +## In state 156, spurious reduction of production call_expr_level_in -> core_expr +## In state 174, spurious reduction of production option(type_annotation_simple) -> +## In state 175, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 176, spurious reduction of production unary_expr_level -> call_expr_level +## In state 129, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 153, spurious reduction of production add_expr_level -> mult_expr_level +## In state 184, spurious reduction of production cat_expr_level -> add_expr_level +## In state 205, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 212, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 219, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 166, spurious reduction of production base_expr -> disj_expr_level +## In state 223, spurious reduction of production base_cond -> base_expr +## In state 224, spurious reduction of production expr -> base_cond +## In state 525, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr +## In state 528, spurious reduction of production let_declaration -> seq(Attr) Let let_binding ## contract: Let WILD EQ VBAR ## -## Ends in an error in state: 81. +## Ends in an error in state: 82. ## ## let_binding -> WILD option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3551,7 +3326,7 @@ contract: Let WILD EQ VBAR contract: Let WILD WILD ## -## Ends in an error in state: 76. +## Ends in an error in state: 77. ## ## let_binding -> WILD . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> WILD . [ COMMA ] @@ -3564,7 +3339,7 @@ contract: Let WILD WILD contract: Type Ident EQ Constr DOT WILD ## -## Ends in an error in state: 11. +## Ends in an error in state: 12. ## ## core_type -> Constr DOT . Ident [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## @@ -3576,7 +3351,7 @@ contract: Type Ident EQ Constr DOT WILD contract: Type Ident EQ Constr LPAR Ident RPAR WILD ## -## Ends in an error in state: 37. +## Ends in an error in state: 38. ## ## nsepseq(variant,VBAR) -> variant . [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## nsepseq(variant,VBAR) -> variant . VBAR nsepseq(variant,VBAR) [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] @@ -3587,22 +3362,15 @@ contract: Type Ident EQ Constr LPAR Ident RPAR WILD -contract: Type Ident EQ Constr LPAR Ident Type +contract: Type Ident EQ Constr LPAR String WILD ## -## Ends in an error in state: 35. +## Ends in an error in state: 36. ## ## variant -> Constr LPAR fun_type . RPAR [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## ## The known suffix of the stack is as follows: ## Constr LPAR fun_type ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## @@ -3618,31 +3386,9 @@ contract: Type Ident EQ Constr LPAR WILD -contract: Type Ident EQ Constr RPAR -## -## Ends in an error in state: 71. -## -## declaration -> type_decl . option(SEMI) [ Type Let EOF Attr ] -## -## The known suffix of the stack is as follows: -## type_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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 66, spurious reduction of production type_expr -> sum_type -## In state 65, spurious reduction of production type_decl -> Type Ident EQ type_expr -## - - - contract: Type Ident EQ Constr SEMI WILD ## -## Ends in an error in state: 540. +## Ends in an error in state: 533. ## ## declarations -> declaration . [ EOF ] ## declarations -> declaration . declarations [ EOF ] @@ -3655,7 +3401,7 @@ contract: Type Ident EQ Constr SEMI WILD contract: Type Ident EQ Constr VBAR WILD ## -## Ends in an error in state: 38. +## Ends in an error in state: 39. ## ## nsepseq(variant,VBAR) -> variant VBAR . nsepseq(variant,VBAR) [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## @@ -3667,7 +3413,7 @@ contract: Type Ident EQ Constr VBAR WILD contract: Type Ident EQ Constr WILD ## -## Ends in an error in state: 48. +## Ends in an error in state: 49. ## ## core_type -> Constr . DOT Ident [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## variant -> Constr . [ VBAR Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] @@ -3681,7 +3427,7 @@ contract: Type Ident EQ Constr WILD contract: Type Ident EQ Ident ARROW WILD ## -## Ends in an error in state: 24. +## Ends in an error in state: 25. ## ## fun_type -> Ident ARROW . fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## @@ -3691,9 +3437,9 @@ contract: Type Ident EQ Ident ARROW WILD -contract: Type Ident EQ Ident LPAR Ident Type +contract: Type Ident EQ Ident LPAR String WILD ## -## Ends in an error in state: 17. +## Ends in an error in state: 18. ## ## tuple(fun_type) -> fun_type . COMMA nsepseq(fun_type,COMMA) [ RPAR ] ## type_args -> fun_type . [ RPAR ] @@ -3701,19 +3447,12 @@ contract: Type Ident EQ Ident LPAR Ident Type ## The known suffix of the stack is as follows: ## fun_type ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## contract: Type Ident EQ Ident LPAR WILD ## -## Ends in an error in state: 9. +## Ends in an error in state: 10. ## ## par(type_args) -> LPAR . type_args RPAR [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## @@ -3725,7 +3464,7 @@ contract: Type Ident EQ Ident LPAR WILD contract: Type Ident EQ Ident WILD ## -## Ends in an error in state: 8. +## Ends in an error in state: 9. ## ## core_type -> Ident . [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## core_type -> Ident . par(type_args) [ Type SEMI RPAR Let EQ EOF COMMA Attr ] @@ -3737,33 +3476,9 @@ contract: Type Ident EQ Ident WILD -contract: Type Ident EQ LBRACE Ident COLON Constr Type -## -## Ends in an error in state: 58. -## -## nsepseq(field_decl,COMMA) -> field_decl . [ RBRACE ] -## nsepseq(field_decl,COMMA) -> field_decl . COMMA nsepseq(field_decl,COMMA) [ RBRACE ] -## nseq(__anonymous_0(field_decl,COMMA)) -> field_decl . COMMA seq(__anonymous_0(field_decl,COMMA)) [ RBRACE ] -## -## The known suffix of the stack is as follows: -## field_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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 50, spurious reduction of production type_expr_field -> sum_type -## In state 49, spurious reduction of production field_decl -> Ident COLON type_expr_field -## - - - contract: Type Ident EQ LBRACE Ident COLON Ident WILD ## -## Ends in an error in state: 47. +## Ends in an error in state: 48. ## ## core_type -> Ident . [ RBRACE COMMA ] ## core_type -> Ident . par(type_args) [ RBRACE COMMA ] @@ -3774,28 +3489,21 @@ contract: Type Ident EQ LBRACE Ident COLON Ident WILD -contract: Type Ident EQ LBRACE Ident COLON LPAR Ident Type +contract: Type Ident EQ LBRACE Ident COLON LPAR String WILD ## -## Ends in an error in state: 45. +## Ends in an error in state: 46. ## ## par(fun_type) -> LPAR fun_type . RPAR [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: ## LPAR fun_type ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## contract: Type Ident EQ LBRACE Ident COLON LPAR WILD ## -## Ends in an error in state: 44. +## Ends in an error in state: 45. ## ## par(fun_type) -> LPAR . fun_type RPAR [ RBRACE COMMA ] ## @@ -3805,9 +3513,23 @@ contract: Type Ident EQ LBRACE Ident COLON LPAR WILD +contract: Type Ident EQ LBRACE Ident COLON String WILD +## +## Ends in an error in state: 59. +## +## nsepseq(field_decl,COMMA) -> field_decl . [ RBRACE ] +## nsepseq(field_decl,COMMA) -> field_decl . COMMA nsepseq(field_decl,COMMA) [ RBRACE ] +## nseq(__anonymous_0(field_decl,COMMA)) -> field_decl . COMMA seq(__anonymous_0(field_decl,COMMA)) [ RBRACE ] +## +## The known suffix of the stack is as follows: +## field_decl +## + + + contract: Type Ident EQ LBRACE Ident COLON WILD ## -## Ends in an error in state: 43. +## Ends in an error in state: 44. ## ## field_decl -> Ident COLON . type_expr_field [ RBRACE COMMA ] ## @@ -3817,9 +3539,9 @@ contract: Type Ident EQ LBRACE Ident COLON WILD -contract: Type Ident EQ LBRACE Ident COMMA Ident COLON Constr Type +contract: Type Ident EQ LBRACE Ident COMMA Ident COLON String WILD ## -## Ends in an error in state: 62. +## Ends in an error in state: 63. ## ## nsepseq(field_decl,COMMA) -> field_decl . [ RBRACE ] ## nsepseq(field_decl,COMMA) -> field_decl . COMMA nsepseq(field_decl,COMMA) [ RBRACE ] @@ -3828,22 +3550,12 @@ contract: Type Ident EQ LBRACE Ident COMMA Ident COLON Constr Type ## The known suffix of the stack is as follows: ## field_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 48, spurious reduction of production variant -> Constr -## In state 37, spurious reduction of production nsepseq(variant,VBAR) -> variant -## In state 52, spurious reduction of production sum_type -> nsepseq(variant,VBAR) -## In state 50, spurious reduction of production type_expr_field -> sum_type -## In state 49, spurious reduction of production field_decl -> Ident COLON type_expr_field -## contract: Type Ident EQ LBRACE Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 63. +## Ends in an error in state: 64. ## ## nsepseq(field_decl,COMMA) -> field_decl COMMA . nsepseq(field_decl,COMMA) [ RBRACE ] ## seq(__anonymous_0(field_decl,COMMA)) -> field_decl COMMA . seq(__anonymous_0(field_decl,COMMA)) [ RBRACE ] @@ -3856,7 +3568,7 @@ contract: Type Ident EQ LBRACE Ident COMMA Ident COMMA WILD contract: Type Ident EQ LBRACE Ident COMMA WILD ## -## Ends in an error in state: 59. +## Ends in an error in state: 60. ## ## nsepseq(field_decl,COMMA) -> field_decl COMMA . nsepseq(field_decl,COMMA) [ RBRACE ] ## nseq(__anonymous_0(field_decl,COMMA)) -> field_decl COMMA . seq(__anonymous_0(field_decl,COMMA)) [ RBRACE ] @@ -3869,7 +3581,7 @@ contract: Type Ident EQ LBRACE Ident COMMA WILD contract: Type Ident EQ LBRACE Ident WILD ## -## Ends in an error in state: 42. +## Ends in an error in state: 43. ## ## field_decl -> Ident . [ RBRACE COMMA ] ## field_decl -> Ident . COLON type_expr_field [ RBRACE COMMA ] @@ -3882,7 +3594,7 @@ contract: Type Ident EQ LBRACE Ident WILD contract: Type Ident EQ LBRACE WILD ## -## Ends in an error in state: 41. +## Ends in an error in state: 42. ## ## record_type -> LBRACE . sep_or_term_list(field_decl,COMMA) RBRACE [ Type SEMI RPAR RBRACE Let EQ EOF COMMA Attr ] ## @@ -3894,7 +3606,7 @@ contract: Type Ident EQ LBRACE WILD contract: Type Ident EQ LPAR Constr WILD ## -## Ends in an error in state: 10. +## Ends in an error in state: 11. ## ## core_type -> Constr . DOT Ident [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## @@ -3904,21 +3616,9 @@ contract: Type Ident EQ LPAR Constr WILD -contract: Type Ident EQ LPAR Ident COMMA Ident COMMA WILD +contract: Type Ident EQ LPAR String COMMA Ident RPAR ARROW WILD ## -## Ends in an error in state: 21. -## -## nsepseq(fun_type,COMMA) -> fun_type COMMA . nsepseq(fun_type,COMMA) [ RPAR ] -## -## The known suffix of the stack is as follows: -## fun_type COMMA -## - - - -contract: Type Ident EQ LPAR Ident COMMA Ident RPAR ARROW WILD -## -## Ends in an error in state: 29. +## Ends in an error in state: 30. ## ## fun_type -> LPAR tuple(fun_type) RPAR ARROW . fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## @@ -3928,9 +3628,9 @@ contract: Type Ident EQ LPAR Ident COMMA Ident RPAR ARROW WILD -contract: Type Ident EQ LPAR Ident COMMA Ident RPAR WILD +contract: Type Ident EQ LPAR String COMMA Ident RPAR WILD ## -## Ends in an error in state: 28. +## Ends in an error in state: 29. ## ## fun_type -> LPAR tuple(fun_type) RPAR . ARROW fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## fun_type -> LPAR tuple(fun_type) RPAR . [ Type SEMI RPAR Let EQ EOF COMMA Attr ] @@ -3941,9 +3641,21 @@ contract: Type Ident EQ LPAR Ident COMMA Ident RPAR WILD -contract: Type Ident EQ LPAR Ident COMMA Ident Type +contract: Type Ident EQ LPAR String COMMA String COMMA WILD ## -## Ends in an error in state: 20. +## Ends in an error in state: 22. +## +## nsepseq(fun_type,COMMA) -> fun_type COMMA . nsepseq(fun_type,COMMA) [ RPAR ] +## +## The known suffix of the stack is as follows: +## fun_type COMMA +## + + + +contract: Type Ident EQ LPAR String COMMA String WILD +## +## Ends in an error in state: 21. ## ## nsepseq(fun_type,COMMA) -> fun_type . [ RPAR ] ## nsepseq(fun_type,COMMA) -> fun_type . COMMA nsepseq(fun_type,COMMA) [ RPAR ] @@ -3951,19 +3663,12 @@ contract: Type Ident EQ LPAR Ident COMMA Ident Type ## The known suffix of the stack is as follows: ## fun_type ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## -contract: Type Ident EQ LPAR Ident COMMA WILD +contract: Type Ident EQ LPAR String COMMA WILD ## -## Ends in an error in state: 18. +## Ends in an error in state: 19. ## ## tuple(fun_type) -> fun_type COMMA . nsepseq(fun_type,COMMA) [ RPAR ] ## @@ -3973,9 +3678,9 @@ contract: Type Ident EQ LPAR Ident COMMA WILD -contract: Type Ident EQ LPAR Ident RPAR ARROW WILD +contract: Type Ident EQ LPAR String RPAR ARROW WILD ## -## Ends in an error in state: 33. +## Ends in an error in state: 34. ## ## fun_type -> LPAR fun_type RPAR ARROW . fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## @@ -3985,9 +3690,9 @@ contract: Type Ident EQ LPAR Ident RPAR ARROW WILD -contract: Type Ident EQ LPAR Ident RPAR WILD +contract: Type Ident EQ LPAR String RPAR WILD ## -## Ends in an error in state: 32. +## Ends in an error in state: 33. ## ## fun_type -> LPAR fun_type RPAR . ARROW fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## par(fun_type) -> LPAR fun_type RPAR . [ Type SEMI RPAR Let EQ EOF COMMA Attr ] @@ -3998,9 +3703,9 @@ contract: Type Ident EQ LPAR Ident RPAR WILD -contract: Type Ident EQ LPAR Ident Type +contract: Type Ident EQ LPAR String WILD ## -## Ends in an error in state: 31. +## Ends in an error in state: 32. ## ## fun_type -> LPAR fun_type . RPAR ARROW fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## par(fun_type) -> LPAR fun_type . RPAR [ Type SEMI RPAR Let EQ EOF COMMA Attr ] @@ -4009,19 +3714,12 @@ contract: Type Ident EQ LPAR Ident Type ## The known suffix of the stack is as follows: ## LPAR fun_type ## -## 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 8, spurious reduction of production core_type -> Ident -## In state 23, spurious reduction of production fun_type -> core_type -## contract: Type Ident EQ LPAR WILD ## -## Ends in an error in state: 7. +## Ends in an error in state: 8. ## ## fun_type -> LPAR . fun_type RPAR ARROW fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] ## fun_type -> LPAR . tuple(fun_type) RPAR ARROW fun_type [ Type SEMI RPAR Let EQ EOF COMMA Attr ] @@ -4034,6 +3732,18 @@ contract: Type Ident EQ LPAR WILD +contract: Type Ident EQ String WILD +## +## Ends in an error in state: 72. +## +## declaration -> type_decl . option(SEMI) [ Type Let EOF Attr ] +## +## The known suffix of the stack is as follows: +## type_decl +## + + + contract: Type Ident EQ VBAR Constr WILD ## ## Ends in an error in state: 5. @@ -4106,4 +3816,3 @@ contract: WILD ## - diff --git a/src/passes/2-concrete_to_imperative/cameligo.ml b/src/passes/2-concrete_to_imperative/cameligo.ml index 405b3fe74..1e8c85f55 100644 --- a/src/passes/2-concrete_to_imperative/cameligo.ml +++ b/src/passes/2-concrete_to_imperative/cameligo.ml @@ -169,7 +169,7 @@ open Operators.Concrete_to_imperative.Cameligo let r_split = Location.r_split let get_t_string_singleton_opt = function - | Raw.TStringLiteral s -> Some s.value + | Raw.TString s -> Some s.value | _ -> None let rec pattern_to_var : Raw.pattern -> _ = fun p -> @@ -250,7 +250,7 @@ and compile_type_expression : Raw.type_expr -> type_expression result = fun te - let (x,loc) = r_split x in let (name, tuple) = x in ( match name.value with - | "michelson_or" -> + | "michelson_or" -> let lst = npseq_to_list tuple.value.inside in (match lst with | [a ; b ; c ; d ] -> ( @@ -321,7 +321,7 @@ and compile_type_expression : Raw.type_expr -> type_expression result = fun te - @@ 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 - | TStringLiteral _s -> simple_fail "we don't support singleton string type" + | TString _s -> simple_fail "we don't support singleton string type" and compile_list_type_expression (lst:Raw.type_expr list) : type_expression result = match lst with diff --git a/src/test/contracts/letin.mligo b/src/test/contracts/letin.mligo index 8ee8912c7..5573b6154 100644 --- a/src/test/contracts/letin.mligo +++ b/src/test/contracts/letin.mligo @@ -5,3 +5,25 @@ let main (n : int * storage) : operation list * storage = let x : int = 7 in x + n.0, n.1.0 + n.1.1 in ([] : operation list), x + + +let f0 (a: string) = true +let f1 (a: string) = true +let f2 (a: string) = true + +let letin_nesting (_: unit) = + begin + let s = "test" in + let p0 = f0 s in + assert p0; + let p1 = f1 s in + assert p1; + let p2 = f2 s in + assert p2; + s + end + +let letin_nesting2 (x: int) = + let y = 2 in + let z = 3 in + x + y + z \ No newline at end of file diff --git a/src/test/contracts/letin.religo b/src/test/contracts/letin.religo index 8956133e3..c7e4b82af 100644 --- a/src/test/contracts/letin.religo +++ b/src/test/contracts/letin.religo @@ -7,3 +7,24 @@ let main = (n : (int, storage)) : (list (operation), storage) => { }; ([]: list (operation), x); }; + +let f0 = (a: string) => true +let f1 = (a: string) => true +let f2 = (a: string) => true + +let letin_nesting = (_: unit) => { + let s = "test"; + let p0 = f0(s); + assert(p0); + let p1 = f1(s); + assert(p1); + let p2 = f2(s); + assert(p2); + s +} + +let letin_nesting2 = (x: int) => { + let y = 2; + let z = 3; + x + y + z +} \ No newline at end of file diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index cf4120cea..bbe645b47 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -1595,18 +1595,37 @@ let counter_religo () : unit result = let let_in_mligo () : unit result = let%bind program = mtype_file "./contracts/letin.mligo" in - let make_input n = e_pair (e_int n) (e_pair (e_int 3) (e_int 5)) in - let make_expected n = - e_pair (e_typed_list [] (t_operation ())) (e_pair (e_int (7+n)) (e_int (3+5))) - in expect_eq_n program "main" make_input make_expected + let%bind () = + let make_input n = e_pair (e_int n) (e_pair (e_int 3) (e_int 5)) in + let make_expected n = + e_pair (e_typed_list [] (t_operation ())) (e_pair (e_int (7+n)) (e_int (3+5))) + in + expect_eq_n program "main" make_input make_expected + in + let%bind () = + expect_eq program "letin_nesting" (e_unit ()) (e_string "test") + in + let%bind () = + expect_eq program "letin_nesting2" (e_int 4) (e_int 9) + in + ok () let let_in_religo () : unit result = let%bind program = retype_file "./contracts/letin.religo" in - let make_input n = e_pair (e_int n) (e_pair (e_int 3) (e_int 5)) in - let make_expected n = - e_pair (e_typed_list [] (t_operation ())) (e_pair (e_int (7+n)) (e_int (3+5))) - in expect_eq_n program "main" make_input make_expected - + let%bind () = + let make_input n = e_pair (e_int n) (e_pair (e_int 3) (e_int 5)) in + let make_expected n = + e_pair (e_typed_list [] (t_operation ())) (e_pair (e_int (7+n)) (e_int (3+5))) + in + expect_eq_n program "main" make_input make_expected + in + let%bind () = + expect_eq program "letin_nesting" (e_unit ()) (e_string "test") + in + let%bind () = + expect_eq program "letin_nesting2" (e_int 4) (e_int 9) + in + ok () let match_variant () : unit result = let%bind program = mtype_file "./contracts/match.mligo" in From e8a69cb498edc9425cdcd770baed976ae4c0c4a4 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Mon, 18 May 2020 14:09:40 +0300 Subject: [PATCH 15/29] Switch to nix pipelines - Remove old pipelines - Run nix pipelines on a private runner --- .gitlab-ci.yml | 399 ++++++++----------------------------------------- 1 file changed, 60 insertions(+), 339 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 565c2cdf1..cc87b822f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,105 +1,19 @@ # TODO: remove this as submodules aren't used anymore. variables: GIT_SUBMODULE_STRATEGY: recursive - build_binary_script: "./scripts/distribution/generic/build.sh" - package_binary_script: "./scripts/distribution/generic/package.sh" LIGO_REGISTRY_IMAGE_BASE_NAME: "${CI_PROJECT_PATH}/${CI_PROJECT_NAME}" WEBIDE_IMAGE_NAME: "registry.gitlab.com/${CI_PROJECT_PATH}/ligo_webide" stages: - - test - - build_and_package_binaries - - build_docker - - build_and_deploy - - ide-unit-test - - ide-build - - ide-e2e-test - - ide-deploy - - nix - - nix-push + - build + - push - versioning -# TODO provide sensible CI for master -dont-merge-to-master: - stage: test - script: - - "false" - only: - - master - -.build_binary: &build_binary - stage: test # To run in sequence and save CPU usage, use stage: build_and_package_binaries - script: - - export COMMIT_DATE="$(git show --no-patch --format=%ci)" - - $build_binary_script "$target_os_family" "$target_os" "$target_os_version" - - $package_binary_script "$target_os_family" "$target_os" "$target_os_version" - artifacts: - paths: - - dist/package/**/* - -.website_build: &website_build - stage: build_and_deploy - image: node:12 - dependencies: - - build-and-package-debian-9 - - build-and-package-debian-10 - - build-and-package-ubuntu-18-04 - - build-and-package-ubuntu-19-10 - before_script: - - export COMMIT_DATE="$(git show --no-patch --format=%ci)" - - export TERM=dumb - - scripts/install_native_dependencies.sh - - scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ? - - export PATH="/usr/local/bin${PATH:+:}${PATH:-}" - - eval $(opam config env) - - scripts/setup_switch.sh - - eval $(opam config env) - - scripts/setup_repos.sh - - # install deps for internal documentation - - scripts/install_vendors_deps.sh - - opam install -y odoc - - scripts/build_ligo_local.sh - - # build with odoc - - dune build @doc - - # copy .deb packages into website - - find dist -name \*.deb -exec sh -c 'cp {} gitlab-pages/website/static/deb/ligo_$(basename $(dirname {})).deb' \; - - # yarn - - cd gitlab-pages/website - - yarn install - script: - - yarn build - # move internal odoc documentation to the website folder - - mv ../../_build/default/_doc/_html/ build/odoc - after_script: - - cp -r gitlab-pages/website/build public - - cp -r gitlab-pages/website/sitemap.xml public/sitemap.xml - artifacts: - paths: - - public - -.docker: &docker +.docker-image: &docker-image image: docker:19.03.5 services: - docker:19.03.5-dind -.before_script: &before_script - before_script: - # Install dependencies - # rsync is needed by opam to sync a package installed from a local directory with the copy in ~/.opam - - export COMMIT_DATE="$(git show --no-patch --format=%ci)" - - export TERM=dumb - - scripts/install_native_dependencies.sh - - scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ? - - export PATH="/usr/local/bin${PATH:+:}${PATH:-}" - - eval $(opam config env) - - scripts/setup_switch.sh - - eval $(opam config env) - - scripts/setup_repos.sh - version_scheduled_job: stage: versioning script: @@ -107,222 +21,16 @@ version_scheduled_job: only: - schedules -local-dune-job: - <<: *before_script - stage: test - script: - - scripts/install_vendors_deps.sh - - scripts/build_ligo_local.sh - - dune runtest - - make coverage - artifacts: - paths: - - _coverage_all - only: - - merge_requests - - dev - - tags - - triggers - - /^.*-run-dev$/ - -# Run a docker build without publishing to the registry -build-current-docker-image: - stage: build_docker - dependencies: - - build-and-package-debian-10 - <<: *docker - script: - - export COMMIT_DATE="$(git show --no-patch --format=%ci)" - - sh scripts/build_docker_image.sh next - - sh scripts/test_cli.sh - only: - - merge_requests - -# When a MR/PR is merged to dev -# take the previous build and publish it to Docker Hub -build-and-publish-latest-docker-image: - stage: build_and_deploy - <<: *docker - dependencies: - - build-and-package-debian-10 - script: - - sh scripts/build_docker_image.sh $(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next; else echo next-attempt; fi) - - sh scripts/test_cli.sh - - echo ${LIGO_REGISTRY_PASSWORD} | docker login -u ${LIGO_REGISTRY_USER} --password-stdin - - docker push ${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:$(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next; else echo next-attempt; fi) - rules: - # Only deploy docker when from the dev branch AND on the canonical ligolang/ligo repository - - if: '$CI_COMMIT_REF_NAME =~ /^(dev|.*-run-dev)$/ && $CI_PROJECT_PATH == "ligolang/ligo"' - when: always - -# It'd be a good idea to generate those jobs dynamically, -# based on desired targets -build-and-package-debian-9: - <<: *docker - # To run in sequence and save CPU usage, use stage: build_and_package_binaries - stage: test - variables: - target_os_family: "debian" - target_os: "debian" - target_os_version: "9" - <<: *build_binary - only: - - dev - - tags - - /^.*-run-dev$/ - -build-and-package-debian-10: - <<: *docker - # To run in sequence and save CPU usage, use stage: build_and_package_binaries - stage: test - variables: - target_os_family: "debian" - target_os: "debian" - target_os_version: "10" - <<: *build_binary - # this one is merge_requests and dev, because the debian 10 binary - # is used for build-current-docker-image and for - # build-and-publish-latest-docker-image - only: - - merge_requests - - dev - - tags - - /^.*-run-dev$/ - -build-and-package-ubuntu-18-04: - <<: *docker - # To run in sequence and save CPU usage, use stage: build_and_package_binaries - stage: test - variables: - target_os_family: "debian" - target_os: "ubuntu" - target_os_version: "18.04" - <<: *build_binary - only: - - dev - - tags - - /^.*-run-dev$/ - -build-and-package-ubuntu-19-10: - <<: *docker - # To run in sequence and save CPU usage, use stage: build_and_package_binaries - stage: test - variables: - target_os_family: "debian" - target_os: "ubuntu" - target_os_version: "19.10" - <<: *build_binary - only: - - dev - - tags - - /^.*-run-dev$/ - -# Pages are deployed from dev, be careful not to override 'next' -# in case something gets merged into 'dev' while releasing. -pages: - <<: *website_build - rules: - - if: '$CI_COMMIT_REF_NAME == "dev" && $CI_PROJECT_PATH == "ligolang/ligo"' - when: always - -pages-attempt: - <<: *website_build - rules: - - if: '$CI_COMMIT_REF_NAME =~ /^.*-run-dev$/ && $CI_PROJECT_PATH == "ligolang/ligo"' - when: always - -# WEBIDE jobs - -run-webide-unit-tests: - stage: ide-unit-test - dependencies: - - build-and-package-debian-10 - image: node:12-buster - script: - - mv $(realpath dist/package/debian-10/*.deb) ligo_deb10.deb - - apt-get update && apt-get -y install libev-dev perl pkg-config libgmp-dev libhidapi-dev m4 libcap-dev bubblewrap rsync - - dpkg -i ligo_deb10.deb - - cd tools/webide/packages/server - - npm ci - - export LIGO_CMD=/bin/ligo && npm run test - rules: - - if: '$TAG_JOB != "true"' - changes: - - tools/webide/** - when: always - -build-publish-ide-image: - stage: build_and_deploy - <<: *docker - script: - - ls -F - - find dist/ - - find dist/package/ -name '*ligo_*deb' - - mv $(realpath dist/package/debian-10/*.deb) tools/webide/ligo_deb10.deb - - cp -r src/test/examples tools/webide/packages/client/examples - - cd tools/webide - - echo "${CI_BUILD_TOKEN}" | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com - - > - docker build - -t "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" - --build-arg GIT_TAG="${CI_COMMIT_SHA}" - --build-arg GIT_COMMIT="${CI_COMMIT_SHORT_SHA}" - --build-arg EXAMPLES_DIR_SRC=packages/client/examples - . - - docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" - rules: - - if: '$TAG_JOB != "true"' - changes: - - tools/webide/** - when: always - if: '$CI_COMMIT_REF_NAME == "dev"' - when: always - -run-webide-e2e-tests: - stage: ide-e2e-test - <<: *docker - image: tmaier/docker-compose - script: - - cd tools/webide/packages/e2e - - export WEBIDE_IMAGE="${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" - - docker-compose run e2e - rules: - - if: '$TAG_JOB != "true"' - changes: - - tools/webide/** - when: always - if: '$CI_COMMIT_REF_NAME == "dev"' - when: always - -deploy-handoff: - # Handoff deployment duties to private repo - stage: ide-deploy - variables: - IDE_DOCKER_IMAGE: "registry.gitlab.com/${CI_PROJECT_PATH}/ligo_webide" - LIGO_COMMIT_REF_NAME: "${CI_COMMIT_SHORT_SHA}" - trigger: ligolang/ligo-webide-deploy - rules: - - if: '$CI_COMMIT_REF_NAME == "dev"' - when: always - - -##### The following jobs will replace the ones above! ##### -# TODO: add jobs for deploying the website, build a docker image and deploy it - .prepare_nix: &prepare_nix - image: nixos/nix:latest + tags: + - nix before_script: - - nix-env -f channel:nixos-unstable -iA gnutar gitMinimal cachix - - export COMMIT_DATE="$(git show --no-patch --format=%ci)" - - echo "sandbox = true" > /etc/nix/nix.conf - # A temporary caching solution - - cachix use balsoft - # TODO Don't upload everything, use a post-build-hook to only upload what can't be substituted - - cachix push -w balsoft & + - find "$CI_PROJECT_DIR" -path "$CI_PROJECT_DIR/.git" -prune -o "(" -type d -a -not -perm -u=w ")" -exec chmod --verbose u+w {} ";" + - nix-env -f channel:nixos-unstable -iA gnutar gitMinimal # The binary produced is useless by itself -binary-nix: - stage: nix +binary: + stage: build <<: *prepare_nix only: - merge_requests @@ -331,8 +39,8 @@ binary-nix: script: - nix-build nix -A ligo-bin -doc-nix: - stage: nix +doc: + stage: build <<: *prepare_nix only: - merge_requests @@ -340,13 +48,13 @@ doc-nix: - /^.*-run-dev$/ script: - nix-build nix -A ligo-doc - - cp -Lr result/share/doc result-doc + - cp -Lr --no-preserve=mode,ownership,timestamps result/share/doc . artifacts: paths: - - result-doc + - doc -test-nix: - stage: nix +test: + stage: build <<: *prepare_nix only: - merge_requests @@ -354,14 +62,14 @@ test-nix: - /^.*-run-dev$/ script: - nix-build nix -A ligo-coverage - - cp -Lr result/share/coverage result-coverage + - cp -Lr --no-preserve=mode,ownership,timestamps result/share/coverage . artifacts: paths: - - result-coverage + - coverage # FIXME For some reason, e2e tests can't build on CI. -.webide-e2e-nix: - stage: nix +.webide-e2e: + stage: build <<: *prepare_nix rules: - changes: @@ -372,8 +80,8 @@ test-nix: script: - nix-build nix -A ligo-editor.e2e -docker-nix: - stage: nix +docker: + stage: build only: - merge_requests - dev @@ -386,13 +94,13 @@ docker-nix: paths: - ligo.tar.gz -docker-push-nix: - stage: nix-push - <<: *docker +docker-push: + stage: push + <<: *docker-image dependencies: - - docker-nix + - docker needs: - - docker-nix + - docker rules: # Only deploy docker when from the dev branch AND on the canonical ligolang/ligo repository - if: '$CI_COMMIT_REF_NAME =~ /^(dev|.*-run-dev)$/ && $CI_PROJECT_PATH == "ligolang/ligo"' @@ -400,12 +108,12 @@ docker-push-nix: script: - echo ${LIGO_REGISTRY_PASSWORD} | docker login -u ${LIGO_REGISTRY_USER} --password-stdin - docker load -i=./ligo.tar.gz - - export LIGO_REGISTRY_FULL_NAME=${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:$(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next-nix; else echo next-attempt-nix; fi) + - export LIGO_REGISTRY_FULL_NAME=${LIGO_REGISTRY_IMAGE_BUILD:-ligolang/ligo}:$(if test "$CI_COMMIT_REF_NAME" = "dev"; then echo next; else echo next-attempt; fi) - docker tag ligo "${LIGO_REGISTRY_FULL_NAME}" - docker push "${LIGO_REGISTRY_FULL_NAME}" -webide-docker-nix: - stage: nix +webide-docker: + stage: build only: - merge_requests - dev @@ -419,13 +127,13 @@ webide-docker-nix: - webide.tar.gz -webide-push-nix: - stage: nix-push - <<: *docker +webide-push: + stage: push + <<: *docker-image dependencies: - - webide-docker-nix + - webide-docker needs: - - webide-docker-nix + - webide-docker rules: # Only deploy docker when from the dev branch AND on the canonical ligolang/ligo repository - if: '$CI_COMMIT_REF_NAME =~ /^(dev|.*-run-dev)$/ && $CI_PROJECT_PATH == "ligolang/ligo"' @@ -433,33 +141,46 @@ webide-push-nix: script: - echo "${CI_BUILD_TOKEN}" | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com - docker load -i=./webide.tar.gz - - docker tag ligo-editor "${WEBIDE_IMAGE_NAME}:nix${CI_COMMIT_SHORT_SHA}" - - docker push "${WEBIDE_IMAGE_NAME}:nix${CI_COMMIT_SHORT_SHA}" + - docker tag ligo-editor "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" + - docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" -static-binary-nix: - stage: nix +static-binary: + stage: build <<: *prepare_nix only: + - merge_requests - dev - /^.*-run-dev$/ script: - nix-build nix -A ligo-static # Check that the binary is truly static and has 0 dependencies - test $(nix-store -q --references ./result | wc -l) -eq 0 - - cp -Lr result/bin result-static + - cp -L result/bin/ligo ligo + - chmod +rwx ligo artifacts: paths: - - result-static + - ligo -website-nix: - stage: nix +.website: &website + stage: build <<: *prepare_nix - only: - - dev - - /^.*-run-dev$/ script: - nix-build nix -A ligo-website - - cp -Lr result/ result-website + - cp -Lr --no-preserve=mode,ownership,timestamps result/ public artifacts: paths: - - result-website + - public + +pages: + stage: build + <<: *website + rules: + - if: '$CI_COMMIT_REF_NAME == "dev" && $CI_PROJECT_PATH == "ligolang/ligo"' + when: always + +pages-attempt: + stage: build + <<: *website + only: + - merge_requests + - /^.*-run-dev$/ From f970a9a536fe1bd7be97b8bd85c319207b7d566e Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 20 May 2020 15:33:44 +0300 Subject: [PATCH 16/29] Use extends instead of anchors in gitlab-ci.yml --- .gitlab-ci.yml | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc87b822f..eee6f2105 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,8 @@ stages: - push - versioning -.docker-image: &docker-image +.docker-image: + stage: push image: docker:19.03.5 services: - docker:19.03.5-dind @@ -21,7 +22,8 @@ version_scheduled_job: only: - schedules -.prepare_nix: &prepare_nix +.nix: + stage: build tags: - nix before_script: @@ -30,8 +32,7 @@ version_scheduled_job: # The binary produced is useless by itself binary: - stage: build - <<: *prepare_nix + extends: .nix only: - merge_requests - dev @@ -40,8 +41,7 @@ binary: - nix-build nix -A ligo-bin doc: - stage: build - <<: *prepare_nix + extends: .nix only: - merge_requests - dev @@ -54,8 +54,7 @@ doc: - doc test: - stage: build - <<: *prepare_nix + extends: .nix only: - merge_requests - dev @@ -69,8 +68,7 @@ test: # FIXME For some reason, e2e tests can't build on CI. .webide-e2e: - stage: build - <<: *prepare_nix + extends: .nix rules: - changes: - tools/webide/** @@ -81,12 +79,11 @@ test: - nix-build nix -A ligo-editor.e2e docker: - stage: build + extends: .nix only: - merge_requests - dev - /^.*-run-dev$/ - <<: *prepare_nix script: - nix-build nix -A ligo-docker - cp -L result ligo.tar.gz @@ -95,8 +92,7 @@ docker: - ligo.tar.gz docker-push: - stage: push - <<: *docker-image + extends: .docker-image dependencies: - docker needs: @@ -113,12 +109,11 @@ docker-push: - docker push "${LIGO_REGISTRY_FULL_NAME}" webide-docker: - stage: build + extends: .nix only: - merge_requests - dev - /^.*-run-dev$/ - <<: *prepare_nix script: - nix-build nix -A ligo-editor-docker - cp -L result webide.tar.gz @@ -128,8 +123,7 @@ webide-docker: webide-push: - stage: push - <<: *docker-image + extends: .docker-image dependencies: - webide-docker needs: @@ -145,8 +139,7 @@ webide-push: - docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" static-binary: - stage: build - <<: *prepare_nix + extends: .nix only: - merge_requests - dev @@ -161,9 +154,8 @@ static-binary: paths: - ligo -.website: &website - stage: build - <<: *prepare_nix +.website: + extends: .nix script: - nix-build nix -A ligo-website - cp -Lr --no-preserve=mode,ownership,timestamps result/ public @@ -172,15 +164,13 @@ static-binary: - public pages: - stage: build - <<: *website + extends: .website rules: - if: '$CI_COMMIT_REF_NAME == "dev" && $CI_PROJECT_PATH == "ligolang/ligo"' when: always pages-attempt: - stage: build - <<: *website + extends: .website only: - merge_requests - /^.*-run-dev$/ From 85c7429f0c01e1e9ed51895be5ebe1171d80647c Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 20 May 2020 17:07:39 +0300 Subject: [PATCH 17/29] Add documentation for nix expressions --- nix/README.md | 28 ++++++++++++++++++++++++++++ nix/docker.nix | 1 + nix/ligo-editor.nix | 6 ++++++ nix/nodejs-overlay.nix | 1 + nix/ocaml-overlay.nix | 14 ++++++++++++++ nix/packageDeb.nix | 1 + nix/pkgs.nix | 7 ++++++- nix/static-overlay.nix | 3 +++ nix/static.patch | 1 + 9 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 nix/README.md diff --git a/nix/README.md b/nix/README.md new file mode 100644 index 000000000..83d5dc40b --- /dev/null +++ b/nix/README.md @@ -0,0 +1,28 @@ +# Nix expressions for building LIGO + +Nix is a declarative package manager. Get it here: https://nixos.org/nix + +These expressions are used on CI to reproducibly build the LIGO compiler, as well as WebIDE and https://ligolang.org . + +If you wish to build it yourself with `nix build -f. $thing`, where `$thing` is + +- `ligo`: executables, libraries, documentation, coverage reports +- `ligo-bin`: a dynamically linked binary (Linux, Mac) +- `ligo-static`: a statically linked binary (Linux only) +- `ligo-doc`: documentation generated by odoc +- `ligo-editor`: WebIDE, it can be started with `result/bin/ligo-editor` +- `ligo-website`: the website, website root is `result` +- `ligo-docker`: a docker image with LIGO binaries +- `ligo-editor-docker`: a docker image with webide +- `ligo-deb`: debian package with static binaries + +## Quick maintenance guide + +- `opam-repository` and `tezos-opam-repository` are pinned. To update them when required, run `niv update` (you can get niv with `nix shell nixpkgs#niv`) +- `ocaml` version is pinned in `ocaml-overlay.nix`. If you want to update it, go there and change the version. +- If something fails, `nix repl pkgs.nix` can be very useful to investigate it. + +## Known caveats + +- This is not a nix flake. This will never be a flake if we want to keep this low-maintenance, because of the way `opam` sources are defined. Sometimes, the checksum is omitted there, so we have to use `fetchTarball` without the checksum, which won't work in restricted mode (which is required for flakes). The only solution would be to generate nix expressions for opam-repository separately, but it means a manual step in the process (and it's also impossible to make this work as a flake). +- For the same reason as above, evaluation can take a while because we need to download all the sources every `tarball-ttl` seconds. This can be mitigated by setting `tarball-ttl` to a high value. diff --git a/nix/docker.nix b/nix/docker.nix index acda1c971..99f262282 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -1,5 +1,6 @@ { dockerTools, writeShellScriptBin, runCommand, mcpp, bash, coreutils, ligo, name ? "ligo" }: let + # LIGO requires /tmp for compilation, which is missing in the default image tmp = runCommand "tmp" {} "mkdir -p $out/tmp"; in dockerTools.buildLayeredImage { diff --git a/nix/ligo-editor.nix b/nix/ligo-editor.nix index 9a1a88920..809881904 100644 --- a/nix/ligo-editor.nix +++ b/nix/ligo-editor.nix @@ -2,10 +2,12 @@ , writeShellScriptBin, makeFontsConf, buildEnv, rsync, sources , chromium ? null }: let + # Use a common yarn.lock for everything yarnLock = ../tools/webide/yarn.lock; installPhase = "mkdir $out; cp -Lr node_modules $out/node_modules"; + # node_modules of the server server = mkYarnPackage { name = "webide-server"; src = ../tools/webide/packages/server; @@ -19,6 +21,8 @@ let distPhase = "true"; inherit yarnLock installPhase; }; + + # node_modules of the client client = mkYarnPackage rec { name = "webide-client"; src = ../tools/webide/packages/client; @@ -42,6 +46,7 @@ let */ }; + # Perform the e2e tests; output is empty on purpose e2e = mkYarnPackage rec { name = "webide-e2e"; src = ../tools/webide/packages/e2e; @@ -61,6 +66,7 @@ let inherit yarnLock; }; + # Run the WebIDE server with all the needed env variables ligo-editor = writeShellScriptBin "ligo-editor" '' set -e LIGO_CMD=${ligo-bin}/bin/ligo \ diff --git a/nix/nodejs-overlay.nix b/nix/nodejs-overlay.nix index 7a5badf30..ab625530e 100644 --- a/nix/nodejs-overlay.nix +++ b/nix/nodejs-overlay.nix @@ -1,4 +1,5 @@ self: super: { + # Note: this overlay doesn't apply to nix-npm-buildpackage nodejs = super.nodejs-12_x; nodePackages = super.nodePackages_12_x; nodejs-slim = super.nodejs-slim-12_x; diff --git a/nix/ocaml-overlay.nix b/nix/ocaml-overlay.nix index d811becad..b44cfdcef 100644 --- a/nix/ocaml-overlay.nix +++ b/nix/ocaml-overlay.nix @@ -1,3 +1,5 @@ +# An overlay that adds ligo to ocamlPackages + { sources ? import ./sources.nix , CI_COMMIT_SHA ? builtins.getEnv "CI_COMMIT_SHA" , COMMIT_DATE ? builtins.getEnv "COMMIT_DATE" }: @@ -6,6 +8,7 @@ let opam-nix = import sources.opam-nix (import sources.nixpkgs { }); inherit (import sources."gitignore.nix" { inherit (self) lib; }) gitignoreSource; + # Remove list of directories or files from source (to stop unneeded rebuilds) filterOut = xs: self.lib.cleanSourceWith { filter = p: type: !(builtins.elem (builtins.baseNameOf p) xs); @@ -14,6 +17,7 @@ let in { ocamlPackages = self.ocaml-ng.ocamlPackages_4_07.overrideScope' (builtins.foldl' self.lib.composeExtensions (_: _: { }) [ + # Both opam-repository and tezos-opam-repository are updated manually with `niv update` (opam-nix.traverseOPAMRepo' sources.opam-repository) (opam-nix.traverseOPAMRepo sources.tezos-opam-repository) (opam-nix.callOPAMPackage (filterOut [ @@ -26,19 +30,23 @@ in { "gitlab-pages" ])) (oself: osuper: { + # Strange naming in nixpkgs ocamlfind = oself.findlib; lablgtk = null; lwt = oself.lwt4; + # Native dependencies conf-gmp = self.gmp; conf-libev = self.libev; conf-hidapi = self.hidapi; conf-pkg-config = self.pkg-config; + # Strange problems bigstring = osuper.bigstring.overrideAttrs (_: { doCheck = false; }); xmldiff = osuper.xmldiff.overrideAttrs (_: { src = sources.xmldiff; }); getopt = osuper.getopt.overrideAttrs (_: { configurePhase = "true"; }); + # Force certain versions ipaddr = osuper.ipaddr.versions."4.0.0"; conduit = osuper.conduit.versions."2.1.0"; conduit-lwt-unix = osuper.conduit-lwt-unix.versions."2.0.2"; @@ -64,6 +72,7 @@ in { propagatedBuildInputs = buildInputs; }); + # A combination of executables, libraries, documentation and test coverage ligo = self.buildEnv { name = "ligo"; paths = with oself; [ @@ -74,6 +83,7 @@ in { ]; }; + # LIGO executable and public libraries ligo-out = osuper.ligo.overrideAttrs (oa: { name = "ligo-out"; inherit CI_COMMIT_SHA COMMIT_DATE; @@ -82,6 +92,8 @@ in { nativeBuildInputs = oa.nativeBuildInputs ++ [ self.buildPackages.rakudo ]; }); + + # LIGO test suite; output empty on purpose ligo-tests = osuper.ligo.overrideAttrs (oa: { name = "ligo-tests"; src = filterOut [ @@ -98,6 +110,7 @@ in { ++ [ self.buildPackages.rakudo ]; installPhase = "mkdir $out"; }); + # LIGO odoc documentation ligo-doc = osuper.ligo.overrideAttrs (oa: { name = "ligo-doc"; buildInputs = oa.buildInputs @@ -109,6 +122,7 @@ in { installPhase = "mkdir $out; cp -r _build/default/_doc/_html/ $out/doc"; }); + # LIGO test coverage reports ligo-coverage = oself.ligo-tests.overrideAttrs (oa: { name = "ligo-coverage"; nativeBuildInputs = oa.nativeBuildInputs diff --git a/nix/packageDeb.nix b/nix/packageDeb.nix index bb5f0a57b..d7366e797 100644 --- a/nix/packageDeb.nix +++ b/nix/packageDeb.nix @@ -1,3 +1,4 @@ +# Create a debian package from static executable { stdenv, lib, writeTextFile, ligo-static, dpkg }: let project = "ligo"; diff --git a/nix/pkgs.nix b/nix/pkgs.nix index d832dde56..23c2abe5a 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -1,20 +1,25 @@ +# nixpkgs extended with all the overlays for LIGO { sources ? import ./sources.nix }: let ocaml-overlay = import ./ocaml-overlay.nix { inherit sources; }; static-overlay = import ./static-overlay.nix pkgs; mac-overlay = import ./mac-overlay.nix; nodejs-overlay = import ./nodejs-overlay.nix; + nix-npm-buildpackage = pkgs.callPackage sources.nix-npm-buildpackage { }; + pkgs = import sources.nixpkgs { overlays = [ ocaml-overlay nodejs-overlay ] + # This is done here to prevent the need for bootstrap nixpkgs ++ (if builtins.currentSystem == "x86_64-darwin" then [ mac-overlay ] else [ ]); }; + + # Takes $pkg/ligo and creates a new package with $pkg/bin/ligo separateBinary = pkg: pkgs.runCommandNoCC "${pkg.name}-bin" { } "mkdir -p $out/bin; cp -Lr ${pkg}/ligo $out/bin"; - nix-npm-buildpackage = pkgs.callPackage sources.nix-npm-buildpackage { }; in pkgs.extend (self: super: { inherit (self.ocamlPackages) ligo ligo-out ligo-tests ligo-doc ligo-coverage; ligo-bin = separateBinary self.ligo-out.bin; diff --git a/nix/static-overlay.nix b/nix/static-overlay.nix index 5add8718f..e16aa8646 100644 --- a/nix/static-overlay.nix +++ b/nix/static-overlay.nix @@ -1,3 +1,6 @@ +# An overlay that adds flags needed to build LIGO statically; +# Supposed to be applied to pkgsMusl +# Takes `native` as a package set that doesn't cause mass rebuilds (so that we don't have to build perl with musl) native: self: super: let dds = x: x.overrideAttrs (o: { dontDisableStatic = true; }); in { diff --git a/nix/static.patch b/nix/static.patch index f4ce39a39..efe5c43b8 100644 --- a/nix/static.patch +++ b/nix/static.patch @@ -1,5 +1,6 @@ diff --git a/src/bin/dune b/src/bin/dune index 162963b4b..29dfa5191 100644 +With this patch, a static executable is produced --- a/src/bin/dune +++ b/src/bin/dune @@ -34,5 +34,6 @@ From 5c2b9646ece63e2b19b8d48a303799493d286685 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 20 May 2020 18:04:51 +0300 Subject: [PATCH 18/29] Update nix-npm-buildpackage --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index ec94d353f..d0d6aaf54 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "serokell", "repo": "nix-npm-buildpackage", - "rev": "0450c7d88dc3d0a26461b05cfa36f45d551f4d63", - "sha256": "1w0k4jxw141win67rk66nvg323j5i3s4m1w3icf1g1f0p2zyf531", + "rev": "f2107f638f7df7450a5b7b77b96aaf9752b838d9", + "sha256": "02w8jxmmhxsq7fgzml75b8w8i9mdqxnaajia99jajg6rdiam8zfp", "type": "tarball", - "url": "https://github.com/serokell/nix-npm-buildpackage/archive/0450c7d88dc3d0a26461b05cfa36f45d551f4d63.tar.gz", + "url": "https://github.com/serokell/nix-npm-buildpackage/archive/f2107f638f7df7450a5b7b77b96aaf9752b838d9.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { From 16bcee1aaddf658ab545e9081e7c4d5d3ae0f182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Wed, 20 May 2020 17:27:22 +0000 Subject: [PATCH 19/29] Fixes from MR review - Fix quoting issues in nix/README.md - Clarify about nix flakes --- nix/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/README.md b/nix/README.md index 83d5dc40b..1072b90b6 100644 --- a/nix/README.md +++ b/nix/README.md @@ -18,11 +18,11 @@ If you wish to build it yourself with `nix build -f. $thing`, where `$thing` is ## Quick maintenance guide -- `opam-repository` and `tezos-opam-repository` are pinned. To update them when required, run `niv update` (you can get niv with `nix shell nixpkgs#niv`) +- `opam-repository` and `tezos-opam-repository` are pinned. To update them when required, run `niv update` (you can get niv with `nix shell 'nixpkgs#niv'`) - `ocaml` version is pinned in `ocaml-overlay.nix`. If you want to update it, go there and change the version. - If something fails, `nix repl pkgs.nix` can be very useful to investigate it. ## Known caveats -- This is not a nix flake. This will never be a flake if we want to keep this low-maintenance, because of the way `opam` sources are defined. Sometimes, the checksum is omitted there, so we have to use `fetchTarball` without the checksum, which won't work in restricted mode (which is required for flakes). The only solution would be to generate nix expressions for opam-repository separately, but it means a manual step in the process (and it's also impossible to make this work as a flake). +- This is not a [nix flake](https://gist.github.com/edolstra/40da6e3a4d4ee8fd019395365e0772e7). This will never be a flake if we want to keep this low-maintenance, because of the way `opam` sources are defined. Sometimes, the checksum is omitted there, so we have to use `fetchTarball` without the checksum, which won't work in restricted mode (which is required for flakes). The only solution would be to generate nix expressions for opam-repository separately, but it means a manual step in the process (and it's also impossible to make this work as a flake). - For the same reason as above, evaluation can take a while because we need to download all the sources every `tarball-ttl` seconds. This can be mitigated by setting `tarball-ttl` to a high value. From 340622350dac1dd766c4cee24875f1838fe178f2 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 20 May 2020 21:59:45 +0300 Subject: [PATCH 20/29] Clarify the nix docs by pointing out the location of build results --- nix/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/README.md b/nix/README.md index 1072b90b6..e0c44dcb6 100644 --- a/nix/README.md +++ b/nix/README.md @@ -4,7 +4,7 @@ Nix is a declarative package manager. Get it here: https://nixos.org/nix These expressions are used on CI to reproducibly build the LIGO compiler, as well as WebIDE and https://ligolang.org . -If you wish to build it yourself with `nix build -f. $thing`, where `$thing` is +If you wish to build it yourself, do `nix build -f. $thing`, where `$thing` is - `ligo`: executables, libraries, documentation, coverage reports - `ligo-bin`: a dynamically linked binary (Linux, Mac) @@ -16,6 +16,8 @@ If you wish to build it yourself with `nix build -f. $thing`, where `$thing` is - `ligo-editor-docker`: a docker image with webide - `ligo-deb`: debian package with static binaries +The output of `nix build` can be found in `result` directory. + ## Quick maintenance guide - `opam-repository` and `tezos-opam-repository` are pinned. To update them when required, run `niv update` (you can get niv with `nix shell 'nixpkgs#niv'`) From b6aa71d6acc1160748bdc8472a7d70c296cbc177 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 20 May 2020 22:00:10 +0300 Subject: [PATCH 21/29] Remove /tmp from docker container --- nix/docker.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nix/docker.nix b/nix/docker.nix index 99f262282..5820717b3 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -1,11 +1,7 @@ { dockerTools, writeShellScriptBin, runCommand, mcpp, bash, coreutils, ligo, name ? "ligo" }: -let - # LIGO requires /tmp for compilation, which is missing in the default image - tmp = runCommand "tmp" {} "mkdir -p $out/tmp"; -in dockerTools.buildLayeredImage { inherit name; tag = "latest"; - contents = [ ligo tmp bash ]; + contents = [ ligo bash ]; config.Entrypoint = name; } From 91f31f2914a6bb754720a26d6f03f46389da515d Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 21 May 2020 18:56:44 +0300 Subject: [PATCH 22/29] Update install documentation to reflect packaging updates --- gitlab-pages/docs/intro/installation.md | 29 +++++++++++++++++-------- nix/ligo-website.nix | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gitlab-pages/docs/intro/installation.md b/gitlab-pages/docs/intro/installation.md index 87abfdfe5..111c1c50a 100644 --- a/gitlab-pages/docs/intro/installation.md +++ b/gitlab-pages/docs/intro/installation.md @@ -40,20 +40,31 @@ curl https://gitlab.com/ligolang/ligo/raw/master/scripts/installer.sh | bash -s ligo --help ``` +## Static Linux binary + +We have built ligo executable statically. It should run on most modern Linux distributions. + +To use it, get it [here](/bin/linux/ligo), make it executable, you're done! + +```zsh +wget https://ligolang.org/bin/linux/ligo +chmod +x ./ligo +``` + +Optionally, you can put it somewhere in your `PATH` for easy access: + +```zsh +sudo cp ./ligo /usr/local/bin +``` ## Debian Linux package installation -We have produced .deb packages for a few Debian Linux versions. They will install a global `ligo` executable. -First download one of the packages below, and then install using: +We have produced .deb package with the static executable of ligo. +First download [the package](/deb/ligo.deb), and then install using: +```zsh +sudo apt install ./ligo.deb ``` -sudo apt install ./.deb -``` - -- [Ubuntu 18.04](/deb/ligo_ubuntu-18.04.deb) -- [Ubuntu 19.10](/deb/ligo_ubuntu-19.10.deb) -- [Debian 9](/deb/ligo_debian-9.deb) -- [Debian 10](/deb/ligo_debian-10.deb) ## Release schedule diff --git a/nix/ligo-website.nix b/nix/ligo-website.nix index 5e95e7b8c..336434e33 100644 --- a/nix/ligo-website.nix +++ b/nix/ligo-website.nix @@ -9,7 +9,7 @@ buildNpmPackage { ''; installPhase = '' cp -Lr build $out - cp -r ${ligo-deb}/* $out/deb + cp -r ${ligo-deb}/*.deb $out/deb/ligo.deb mkdir -p $out/bin/linux cp -r ${ligo-static}/bin/ligo $out/bin/linux/ligo cp -r ${ligo-doc}/share/doc $out/odoc From b522e50ce280c81fa9ef52f40128b494cca5a4e7 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 21 May 2020 19:03:15 +0300 Subject: [PATCH 23/29] Fix webide deploy handoff --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eee6f2105..b7260799f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ variables: stages: - build - push + - ide-deploy - versioning .docker-image: @@ -121,7 +122,6 @@ webide-docker: paths: - webide.tar.gz - webide-push: extends: .docker-image dependencies: @@ -138,6 +138,17 @@ webide-push: - docker tag ligo-editor "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" - docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" +deploy-handoff: + # Handoff deployment duties to private repo + stage: ide-deploy + variables: + IDE_DOCKER_IMAGE: "registry.gitlab.com/${CI_PROJECT_PATH}/ligo_webide" + LIGO_COMMIT_REF_NAME: "${CI_COMMIT_SHORT_SHA}" + trigger: ligolang/ligo-webide-deploy + rules: + - if: '$CI_COMMIT_REF_NAME == "dev"' + when: always + static-binary: extends: .nix only: From a14bf15e77581df71cc5ac53e2cfcdeac03883ab Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 21 May 2020 19:13:11 +0300 Subject: [PATCH 24/29] Run webide e2e tests --- .gitlab-ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7260799f..be16f2a95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,15 +67,8 @@ test: paths: - coverage -# FIXME For some reason, e2e tests can't build on CI. -.webide-e2e: +webide-e2e: extends: .nix - rules: - - changes: - - tools/webide/** - when: always - - if: '$CI_COMMIT_REF_NAME =~ /^(dev|.*-run-dev)$/ && $CI_PROJECT_PATH == "ligolang/ligo"' - when: always script: - nix-build nix -A ligo-editor.e2e From 3d78114b251e0ce43ebf3ab32bcf2ffbdbbae05d Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 21 May 2020 19:14:41 +0300 Subject: [PATCH 25/29] Pass COMMIT_DATE to the build --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be16f2a95..94693fcc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ version_scheduled_job: before_script: - find "$CI_PROJECT_DIR" -path "$CI_PROJECT_DIR/.git" -prune -o "(" -type d -a -not -perm -u=w ")" -exec chmod --verbose u+w {} ";" - nix-env -f channel:nixos-unstable -iA gnutar gitMinimal + - export COMMIT_DATE="$(git show --no-patch --format=%ci)" # The binary produced is useless by itself binary: From b5d1cd6b5bb33036f1cbdce118186eacfb42cf8b Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 21 May 2020 19:31:48 +0300 Subject: [PATCH 26/29] Run webide e2e tests on merge requests --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94693fcc0..8681301a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,6 +70,10 @@ test: webide-e2e: extends: .nix + only: + - merge_requests + - dev + - /^.*-run-dev$/ script: - nix-build nix -A ligo-editor.e2e From ecebfb37ccfff75d95e1cfc7a8f0d7c15cc9c0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Fri, 22 May 2020 18:33:18 +0000 Subject: [PATCH 27/29] Update installation.md (grammar) --- gitlab-pages/docs/intro/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab-pages/docs/intro/installation.md b/gitlab-pages/docs/intro/installation.md index 111c1c50a..702f23934 100644 --- a/gitlab-pages/docs/intro/installation.md +++ b/gitlab-pages/docs/intro/installation.md @@ -42,7 +42,7 @@ ligo --help ## Static Linux binary -We have built ligo executable statically. It should run on most modern Linux distributions. +The ligo executable is statically linked. It should run on most modern Linux distributions. To use it, get it [here](/bin/linux/ligo), make it executable, you're done! @@ -59,7 +59,7 @@ sudo cp ./ligo /usr/local/bin ## Debian Linux package installation -We have produced .deb package with the static executable of ligo. +There is also a .deb package containing the static `ligo` executable. First download [the package](/deb/ligo.deb), and then install using: ```zsh From 5ef842298dd855cf46371ba922073e90ce538465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Fri, 22 May 2020 18:34:14 +0000 Subject: [PATCH 28/29] Update installation.md (changed my mind about the wording) --- gitlab-pages/docs/intro/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab-pages/docs/intro/installation.md b/gitlab-pages/docs/intro/installation.md index 702f23934..f53d1f862 100644 --- a/gitlab-pages/docs/intro/installation.md +++ b/gitlab-pages/docs/intro/installation.md @@ -59,7 +59,7 @@ sudo cp ./ligo /usr/local/bin ## Debian Linux package installation -There is also a .deb package containing the static `ligo` executable. +A .deb package containing the static `ligo` executable is also available. First download [the package](/deb/ligo.deb), and then install using: ```zsh From a3e330da12b7251f64a5902333214c7b24e89b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Fri, 22 May 2020 18:36:00 +0000 Subject: [PATCH 29/29] Update installation.md (punctuation) --- gitlab-pages/docs/intro/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab-pages/docs/intro/installation.md b/gitlab-pages/docs/intro/installation.md index f53d1f862..cfe77e84a 100644 --- a/gitlab-pages/docs/intro/installation.md +++ b/gitlab-pages/docs/intro/installation.md @@ -42,7 +42,7 @@ ligo --help ## Static Linux binary -The ligo executable is statically linked. It should run on most modern Linux distributions. +The `ligo` executable is statically linked. It should run on most modern Linux distributions. To use it, get it [here](/bin/linux/ligo), make it executable, you're done! @@ -59,7 +59,7 @@ sudo cp ./ligo /usr/local/bin ## Debian Linux package installation -A .deb package containing the static `ligo` executable is also available. +A `.deb` package containing the static `ligo` executable is also available. First download [the package](/deb/ligo.deb), and then install using: ```zsh