diff --git a/src/bin/cli.ml b/src/bin/cli.ml index 0dc4df7cb..8c3720042 100644 --- a/src/bin/cli.ml +++ b/src/bin/cli.ml @@ -159,10 +159,22 @@ let preprocess = let doc = "Subcommand: Preprocess the source file.\nWarning: Intended for development of LIGO and can break at any time." in (Term.ret term, Term.info ~doc cmdname) +let pretty_print = + let f source_file syntax display_format = ( + toplevel ~display_format @@ + let%bind pp = + Compile.Of_source.pretty_print source_file (Syntax_name syntax) in + ok @@ Buffer.contents pp + ) in + let term = Term.(const f $ source_file 0 $ syntax $ display_format) in + let cmdname = "pretty-print" in + let doc = "Subcommand: Pretty-print the source file." + in (Term.ret term, Term.info ~doc cmdname) + let print_cst = let f source_file syntax display_format = ( toplevel ~display_format @@ - let%bind pp = Compile.Of_source.pretty_print source_file (Syntax_name syntax) in + let%bind pp = Compile.Of_source.pretty_print_cst source_file (Syntax_name syntax) in ok @@ Format.asprintf "%s \n" (Buffer.contents pp) ) in @@ -489,5 +501,6 @@ let run ?argv () = print_ast_typed ; print_mini_c ; list_declarations ; - preprocess + preprocess; + pretty_print ] diff --git a/src/bin/expect_tests/help_tests.ml b/src/bin/expect_tests/help_tests.ml index d30f67155..4c00c7969 100644 --- a/src/bin/expect_tests/help_tests.ml +++ b/src/bin/expect_tests/help_tests.ml @@ -57,6 +57,9 @@ let%expect_test _ = Subcommand: Preprocess the source file. Warning: Intended for development of LIGO and can break at any time. + pretty-print + Subcommand: Pretty-print the source file. + print-ast Subcommand: Print the AST. Warning: Intended for development of LIGO and can break at any time. @@ -148,6 +151,9 @@ let%expect_test _ = Subcommand: Preprocess the source file. Warning: Intended for development of LIGO and can break at any time. + pretty-print + Subcommand: Pretty-print the source file. + print-ast Subcommand: Print the AST. Warning: Intended for development of LIGO and can break at any time. diff --git a/src/bin/expect_tests/literals.ml b/src/bin/expect_tests/literals.ml index c4c4b03a9..aebe463e3 100644 --- a/src/bin/expect_tests/literals.ml +++ b/src/bin/expect_tests/literals.ml @@ -7,7 +7,7 @@ let%expect_test _ = let%expect_test _ = run_ligo_bad ["interpret" ; "(\"thisisnotasignature\":signature)" ; "--syntax=pascaligo"] ; [%expect {| - ligo: in file "", line 0, characters 1-32. Badly formatted literal: Signature thisisnotasignature {"location":"in file \"\", line 0, characters 1-32"} + ligo: in file "", line 0, characters 0-33. Badly formatted literal: Signature thisisnotasignature {"location":"in file \"\", line 0, characters 0-33"} If you're not sure how to fix this error, you can @@ -25,7 +25,7 @@ let%expect_test _ = let%expect_test _ = run_ligo_bad ["interpret" ; "(\"thisisnotapublickey\":key)" ; "--syntax=pascaligo"] ; [%expect {| - ligo: in file "", line 0, characters 1-26. Badly formatted literal: key thisisnotapublickey {"location":"in file \"\", line 0, characters 1-26"} + ligo: in file "", line 0, characters 0-27. Badly formatted literal: key thisisnotapublickey {"location":"in file \"\", line 0, characters 0-27"} If you're not sure how to fix this error, you can diff --git a/src/main/compile/helpers.ml b/src/main/compile/helpers.ml index b6809a20a..8d89c369f 100644 --- a/src/main/compile/helpers.ml +++ b/src/main/compile/helpers.ml @@ -129,7 +129,7 @@ let parsify_string syntax source = let%bind applied = Self_ast_imperative.all_program parsified in ok applied -let pretty_print_pascaligo source = +let pretty_print_pascaligo_cst source = let%bind ast = Parser.Pascaligo.parse_file source in let buffer = Buffer.create 59 in let state = @@ -137,10 +137,10 @@ let pretty_print_pascaligo source = ~offsets:true ~mode:`Byte ~buffer in - Parser_pascaligo.ParserLog.pp_ast state ast; + Parser_pascaligo.ParserLog.pp_cst state ast; ok buffer -let pretty_print_cameligo source = +let pretty_print_cameligo_cst source = let%bind ast = Parser.Cameligo.parse_file source in let buffer = Buffer.create 59 in let state = (* TODO: Should flow from the CLI *) @@ -148,10 +148,10 @@ let pretty_print_cameligo source = ~offsets:true ~mode:`Point ~buffer in - Parser_cameligo.ParserLog.pp_ast state ast; + Parser_cameligo.ParserLog.pp_cst state ast; ok buffer -let pretty_print_reasonligo source = +let pretty_print_reasonligo_cst source = let%bind ast = Parser.Reasonligo.parse_file source in let buffer = Buffer.create 59 in let state = (* TODO: Should flow from the CLI *) @@ -159,16 +159,16 @@ let pretty_print_reasonligo source = ~offsets:true ~mode:`Point ~buffer in - Parser_cameligo.ParserLog.pp_ast state ast; + Parser_cameligo.ParserLog.pp_cst state ast; ok buffer -let pretty_print syntax source = +let pretty_print_cst syntax source = let%bind v_syntax = syntax_to_variant syntax (Some source) in match v_syntax with - PascaLIGO -> pretty_print_pascaligo source - | CameLIGO -> pretty_print_cameligo source - | ReasonLIGO -> pretty_print_reasonligo source + PascaLIGO -> pretty_print_pascaligo_cst source + | CameLIGO -> pretty_print_cameligo_cst source + | ReasonLIGO -> pretty_print_reasonligo_cst source let preprocess_pascaligo = Parser.Pascaligo.preprocess @@ -183,3 +183,44 @@ let preprocess syntax source = PascaLIGO -> preprocess_pascaligo source | CameLIGO -> preprocess_cameligo source | ReasonLIGO -> preprocess_reasonligo source + +let pretty_print_pascaligo source = + let%bind ast = Parser.Pascaligo.parse_file source in + let doc = Parser_pascaligo.Pretty.print ast in + let buffer = Buffer.create 131 in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + let () = PPrint.ToBuffer.pretty 1.0 width buffer doc + in Trace.ok buffer + +let pretty_print_cameligo source = + let%bind ast = Parser.Cameligo.parse_file source in + let doc = Parser_cameligo.Pretty.print ast in + let buffer = Buffer.create 131 in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + let () = PPrint.ToBuffer.pretty 1.0 width buffer doc + in Trace.ok buffer + +let pretty_print_reasonligo source = + let%bind ast = Parser.Reasonligo.parse_file source in + let doc = Parser_reasonligo.Pretty.print ast in + let buffer = Buffer.create 131 in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + let () = PPrint.ToBuffer.pretty 1.0 width buffer doc + in Trace.ok buffer + +let pretty_print syntax source = + let%bind v_syntax = + syntax_to_variant syntax (Some source) in + match v_syntax with + PascaLIGO -> pretty_print_pascaligo source + | CameLIGO -> pretty_print_cameligo source + | ReasonLIGO -> pretty_print_reasonligo source diff --git a/src/main/compile/of_source.ml b/src/main/compile/of_source.ml index 75cb9f32c..f0611d4ba 100644 --- a/src/main/compile/of_source.ml +++ b/src/main/compile/of_source.ml @@ -19,8 +19,11 @@ let compile_contract_input : string -> string -> v_syntax -> Ast_imperative.expr let%bind (storage,parameter) = bind_map_pair (compile_expression syntax) (storage,parameter) in ok @@ Ast_imperative.e_pair storage parameter -let pretty_print source_filename syntax = - Helpers.pretty_print syntax source_filename +let pretty_print_cst source_filename syntax = + Helpers.pretty_print_cst syntax source_filename let preprocess source_filename syntax = Helpers.preprocess syntax source_filename + +let pretty_print source_filename syntax = + Helpers.pretty_print syntax source_filename diff --git a/src/passes/01-parser/cameligo.ml b/src/passes/01-parser/cameligo.ml index 79093af97..7ef89b360 100644 --- a/src/passes/01-parser/cameligo.ml +++ b/src/passes/01-parser/cameligo.ml @@ -5,6 +5,7 @@ module Scoping = Parser_cameligo.Scoping module Region = Simple_utils.Region module ParErr = Parser_cameligo.ParErr module SSet = Set.Make (String) +module Pretty = Parser_cameligo.Pretty (* Mock IOs TODO: Fill them with CLI options *) @@ -19,7 +20,8 @@ module SubIO = ext : string; (* ".mligo" *) mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -34,6 +36,7 @@ module SubIO = method mode = `Point method cmd = EvalOpt.Quiet method mono = false + method pretty = false end let make = @@ -46,6 +49,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#mono end module Parser = @@ -146,3 +150,18 @@ let parse_expression source = apply (fun () -> Unit.expr_in_string source) (* Preprocessing a contract in a file *) let preprocess source = apply (fun () -> Unit.preprocess source) + +(* Pretty-print a file (after parsing it). *) + +let pretty_print source = + match parse_file source with + Stdlib.Error _ as e -> e + | Ok ast -> + let doc = Pretty.print (fst ast) in + let buffer = Buffer.create 131 in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + let () = PPrint.ToBuffer.pretty 1.0 width buffer doc + in Trace.ok buffer diff --git a/src/passes/01-parser/cameligo.mli b/src/passes/01-parser/cameligo.mli index c4f66a596..4181e6a58 100644 --- a/src/passes/01-parser/cameligo.mli +++ b/src/passes/01-parser/cameligo.mli @@ -19,3 +19,6 @@ val parse_expression : string -> AST.expr Trace.result (** Preprocess a given CameLIGO file and preprocess it. *) val preprocess : string -> Buffer.t Trace.result + +(** Pretty-print a given CameLIGO file (after parsing it). *) +val pretty_print : string -> Buffer.t Trace.result diff --git a/src/passes/01-parser/cameligo/.links b/src/passes/01-parser/cameligo/.links index fc8466c8e..8dcc06146 100644 --- a/src/passes/01-parser/cameligo/.links +++ b/src/passes/01-parser/cameligo/.links @@ -19,5 +19,3 @@ $HOME/git/OCaml-build/Makefile ../shared/LexerUnit.ml ../shared/ParserUnit.mli ../shared/ParserUnit.ml - -$HOME/git/ligo/_build/default/src/passes/1-parser/cameligo/ParErr.ml \ No newline at end of file diff --git a/src/passes/01-parser/cameligo/AST.ml b/src/passes/01-parser/cameligo/AST.ml index b258f3416..db425d540 100644 --- a/src/passes/01-parser/cameligo/AST.ml +++ b/src/passes/01-parser/cameligo/AST.ml @@ -137,11 +137,14 @@ and ast = t and attributes = attribute list and declaration = - Let of (kwd_let * kwd_rec option * let_binding * attributes) reg + Let of let_decl | TypeDecl of type_decl reg (* Non-recursive values *) +and let_decl = + (kwd_let * kwd_rec option * let_binding * attributes) reg + and let_binding = { binders : pattern nseq; lhs_type : (colon * type_expr) option; @@ -225,7 +228,7 @@ and field_pattern = { and expr = ECase of expr case reg | ECond of cond_expr reg -| EAnnot of (expr * colon * type_expr) par reg +| EAnnot of annot_expr par reg | ELogic of logic_expr | EArith of arith_expr | EString of string_expr @@ -244,6 +247,8 @@ and expr = | EFun of fun_expr reg | ESeq of expr injection reg +and annot_expr = expr * colon * type_expr + and 'a injection = { compound : compound; elements : ('a, semi) sepseq; @@ -336,18 +341,19 @@ and field_assign = { } and update = { - lbrace : lbrace; - record : path; + lbrace : lbrace; + record : path; kwd_with : kwd_with; - updates : field_path_assign reg ne_injection reg; - rbrace : rbrace; + updates : field_path_assignment reg ne_injection reg; + rbrace : rbrace } -and field_path_assign = { - field_path : (selection, dot) nsepseq; +and field_path_assignment = { + field_path : path; assignment : equal; field_expr : expr } + and path = Name of variable | Path of projection reg diff --git a/src/passes/01-parser/cameligo/LexToken.mll b/src/passes/01-parser/cameligo/LexToken.mll index 509e5fae2..7d54d440b 100644 --- a/src/passes/01-parser/cameligo/LexToken.mll +++ b/src/passes/01-parser/cameligo/LexToken.mll @@ -431,21 +431,20 @@ type nat_err = | Non_canonical_zero_nat let mk_nat lexeme region = - match (String.index_opt lexeme 'n') with + match String.index_opt lexeme 'n' with None -> Error Invalid_natural | Some _ -> let z = - Str.(global_replace (regexp "_") "" lexeme) |> - Str.(global_replace (regexp "n") "") |> - Z.of_string in + Str.(global_replace (regexp "_") "" lexeme) |> + Str.(global_replace (regexp "n") "") |> + Z.of_string in if Z.equal z Z.zero && lexeme <> "0n" then Error Non_canonical_zero_nat else Ok (Nat Region.{region; value = lexeme,z}) let mk_mutez lexeme region = - let z = - Str.(global_replace (regexp "_") "" lexeme) |> - Str.(global_replace (regexp "mutez") "") |> - Z.of_string in + let z = Str.(global_replace (regexp "_") "" lexeme) |> + Str.(global_replace (regexp "mutez") "") |> + Z.of_string in if Z.equal z Z.zero && lexeme <> "0mutez" then Error Non_canonical_zero else Ok (Mutez Region.{region; value = lexeme, z}) diff --git a/src/passes/01-parser/cameligo/Parser.mly b/src/passes/01-parser/cameligo/Parser.mly index ad8de1545..cf4c0494b 100644 --- a/src/passes/01-parser/cameligo/Parser.mly +++ b/src/passes/01-parser/cameligo/Parser.mly @@ -86,7 +86,7 @@ nsepseq(item,sep): (* Non-empty comma-separated values (at least two values) *) tuple(item): - item "," nsepseq(item,",") { let h,t = $3 in $1,($2,h)::t } + item "," nsepseq(item,",") { let h,t = $3 in $1, ($2,h)::t } (* Possibly empty semicolon-separated values between brackets *) @@ -236,10 +236,7 @@ type_annotation: irrefutable: sub_irrefutable { $1 } | tuple(sub_irrefutable) { - let hd, tl = $1 in - let start = pattern_to_region hd in - let stop = last fst tl in - let region = cover start stop + let region = nsepseq_to_region pattern_to_region $1 in PTuple {region; value=$1} } sub_irrefutable: @@ -276,9 +273,7 @@ pattern: PList (PCons {region; value=$1,$2,$3}) } | tuple(sub_pattern) { - let start = pattern_to_region (fst $1) in - let stop = last fst (snd $1) in - let region = cover start stop + let region = nsepseq_to_region pattern_to_region $1 in PTuple {region; value=$1} } sub_pattern: @@ -333,10 +328,7 @@ constr_pattern: ptuple: tuple(tail) { - let hd, tl = $1 in - let start = pattern_to_region hd in - let stop = last fst tl in - let region = cover start stop + let region = nsepseq_to_region pattern_to_region $1 in PTuple {region; value=$1} } unit: @@ -372,9 +364,7 @@ base_expr(right_expr): tuple_expr: tuple(disj_expr_level) { - let start = expr_to_region (fst $1) in - let stop = last fst (snd $1) in - let region = cover start stop + let region = nsepseq_to_region expr_to_region $1 in ETuple {region; value=$1} } conditional(right_expr): @@ -534,8 +524,7 @@ mult_expr_level: | unary_expr_level { $1 } unary_expr_level: - call_expr_level { $1 } -| "-" call_expr_level { + "-" call_expr_level { let start = $1 in let stop = expr_to_region $2 in let region = cover start stop @@ -547,7 +536,9 @@ unary_expr_level: let stop = expr_to_region $2 in let region = cover start stop and value = {op=$1; arg=$2} in - ELogic (BoolExpr (Not ({region; value}))) } + ELogic (BoolExpr (Not ({region; value}))) + } +| call_expr_level { $1 } call_expr_level: call_expr | constr_expr | core_expr { $1 } @@ -593,7 +584,10 @@ core_expr: | record_expr { ERecord $1 } | update_record { EUpdate $1 } | par(expr) { EPar $1 } -| par(expr ":" type_expr {$1,$2,$3}) { EAnnot $1 } +| par(annot_expr) { EAnnot $1 } + +annot_expr: + expr ":" type_expr { $1,$2,$3 } module_field: module_name "." module_fun { @@ -602,7 +596,7 @@ module_field: module_fun: field_name { $1 } -| "or" { {value="or"; region=$1} } +| "or" { {value="or"; region=$1} } projection: struct_name "." nsepseq(selection,".") { @@ -642,7 +636,7 @@ update_record: lbrace = $1; record = $2; kwd_with = $3; - updates = {value = {compound = Braces($1,$5); + updates = {value = {compound = Braces (ghost, ghost); ne_elements; terminator}; region = cover $3 $5}; @@ -650,20 +644,15 @@ update_record: in {region; value} } field_path_assignment : - nsepseq(selection,".") "=" expr { - let start = nsepseq_to_region selection_to_region $1 in - let region = cover start (expr_to_region $3) in - let value = {field_path = $1; - assignment = $2; - field_expr = $3} - in {region; value}} + path "=" expr { + let region = cover (path_to_region $1) (expr_to_region $3) + and value = {field_path=$1; assignment=$2; field_expr=$3} + in {region; value} } field_assignment: field_name "=" expr { - let start = $1.region in - let stop = expr_to_region $3 in - let region = cover start stop in - let value = {field_name = $1; + let region = cover $1.region (expr_to_region $3) + and value = {field_name = $1; assignment = $2; field_expr = $3} in {region; value} } diff --git a/src/passes/01-parser/cameligo/ParserLog.ml b/src/passes/01-parser/cameligo/ParserLog.ml index cfed19b49..49d9b2562 100644 --- a/src/passes/01-parser/cameligo/ParserLog.ml +++ b/src/passes/01-parser/cameligo/ParserLog.ml @@ -136,11 +136,10 @@ let rec print_tokens state {decl;eof} = print_token state eof "EOF" and print_attributes state attributes = - List.iter ( - fun ({value = attribute; region}) -> - let attribute_formatted = sprintf "[@@%s]" attribute in - print_token state region attribute_formatted - ) attributes + let apply {value = attribute; region} = + let attribute_formatted = sprintf "[@@%s]" attribute in + print_token state region attribute_formatted + in List.iter apply attributes and print_statement state = function Let {value=kwd_let, kwd_rec, let_binding, attributes; _} -> @@ -527,7 +526,7 @@ and print_field_assign state {value; _} = and print_field_path_assign state {value; _} = let {field_path; assignment; field_expr} = value in - print_nsepseq state "." print_selection field_path; + print_path state field_path; print_token state assignment "="; print_expr state field_expr @@ -616,12 +615,20 @@ let pp_node state name = let node = sprintf "%s%s\n" state#pad_path name in Buffer.add_string state#buffer node -let pp_string state = pp_ident state +let pp_string state {value=name; region} = + let reg = compact state region in + let node = sprintf "%s%S (%s)\n" state#pad_path name reg + in Buffer.add_string state#buffer node + +let pp_verbatim state {value=name; region} = + let reg = compact state region in + let node = sprintf "%s{|%s|} (%s)\n" state#pad_path name reg + in Buffer.add_string state#buffer node let pp_loc_node state name region = pp_ident state {value=name; region} -let rec pp_ast state {decl; _} = +let rec pp_cst state {decl; _} = let apply len rank = pp_declaration (state#pad len rank) in let decls = Utils.nseq_to_list decl in @@ -704,7 +711,7 @@ and pp_pattern state = function pp_string (state#pad 1 0) s | PVerbatim v -> pp_node state "PVerbatim"; - pp_string (state#pad 1 0) v + pp_verbatim (state#pad 1 0) v | PUnit {region; _} -> pp_loc_node state "PUnit" region | PFalse region -> @@ -938,7 +945,7 @@ and pp_projection state proj = List.iteri (apply len) selections and pp_update state update = - pp_path state update.record; + pp_path (state#pad 2 0) update.record; pp_ne_injection pp_field_path_assign state update.updates.value and pp_path state = function @@ -963,10 +970,10 @@ and pp_field_assign state {value; _} = pp_expr (state#pad 2 1) value.field_expr and pp_field_path_assign state {value; _} = - pp_node state ""; - let path = Utils.nsepseq_to_list value.field_path in - List.iter (pp_selection (state#pad 2 0)) path; - pp_expr (state#pad 2 1) value.field_expr + let {field_path; field_expr; _} = value in + pp_node state ""; + pp_path (state#pad 2 0) field_path; + pp_expr (state#pad 2 1) field_expr and pp_constr_expr state = function ENone region -> @@ -987,11 +994,11 @@ and pp_constr_app_expr state (constr, expr_opt) = and pp_list_expr state = function ECons {value; region} -> - pp_loc_node state "Cons" region; + pp_loc_node state "ECons" region; pp_expr (state#pad 2 0) value.arg1; pp_expr (state#pad 2 1) value.arg2 | EListComp {value; region} -> - pp_loc_node state "List" region; + pp_loc_node state "EListComp" region; if value.elements = None then pp_node (state#pad 1 0) "" else pp_injection pp_expr state value @@ -1134,13 +1141,13 @@ and pp_type_expr state = function pp_type_expr (state#pad len rank) in let domain, _, range = value in List.iteri (apply 2) [domain; range] - | TPar {value={inside;_}; region} -> +| TPar {value={inside;_}; region} -> pp_loc_node state "TPar" region; pp_type_expr (state#pad 1 0) inside - | TVar v -> +| TVar v -> pp_node state "TVar"; pp_ident (state#pad 1 0) v - | TString s -> +| TString s -> pp_node state "TString"; pp_string (state#pad 1 0) s diff --git a/src/passes/01-parser/cameligo/ParserLog.mli b/src/passes/01-parser/cameligo/ParserLog.mli index d16252478..800ea4443 100644 --- a/src/passes/01-parser/cameligo/ParserLog.mli +++ b/src/passes/01-parser/cameligo/ParserLog.mli @@ -27,5 +27,5 @@ val expr_to_string : (** {1 Pretty-printing of AST nodes} *) -val pp_ast : state -> AST.t -> unit +val pp_cst : state -> AST.t -> unit val pp_expr : state -> AST.expr -> unit diff --git a/src/passes/01-parser/cameligo/ParserMain.ml b/src/passes/01-parser/cameligo/ParserMain.ml index a3d13f3cc..0ccb71a01 100644 --- a/src/passes/01-parser/cameligo/ParserMain.ml +++ b/src/passes/01-parser/cameligo/ParserMain.ml @@ -22,7 +22,8 @@ module SubIO = ext : string; mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -36,6 +37,7 @@ module SubIO = method mode = IO.options#mode method cmd = IO.options#cmd method mono = IO.options#mono + method pretty = IO.options#pretty end let make = @@ -48,6 +50,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#pretty end module Parser = @@ -67,14 +70,28 @@ module ParserLog = module Lexer = Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(ParErr)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) let wrap = function - Stdlib.Ok _ -> flush_all () + Stdlib.Ok ast -> + if IO.options#pretty then + begin + let doc = Pretty.print ast in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + PPrint.ToChannel.pretty 1.0 width stdout doc; + print_newline () + end; + flush_all () | Error msg -> - (flush_all (); Printf.eprintf "\027[31m%s\027[0m%!" msg.Region.value) + begin + flush_all (); + Printf.eprintf "\027[31m%s\027[0m%!" msg.Region.value + end let () = match IO.options#input with diff --git a/src/passes/01-parser/cameligo/Pretty.ml b/src/passes/01-parser/cameligo/Pretty.ml new file mode 100644 index 000000000..780d05e29 --- /dev/null +++ b/src/passes/01-parser/cameligo/Pretty.ml @@ -0,0 +1,442 @@ +[@@@warning "-42"] + +open AST +module Region = Simple_utils.Region +open! Region +open! PPrint + +let pp_par printer {value; _} = + string "(" ^^ nest 1 (printer value.inside ^^ string ")") + +let rec print ast = + let app decl = group (pp_declaration decl) in + let decl = Utils.nseq_to_list ast.decl in + separate_map (hardline ^^ hardline) app decl + +and pp_declaration = function + Let decl -> pp_let_decl decl +| TypeDecl decl -> pp_type_decl decl + +and pp_let_decl {value; _} = + let _, rec_opt, binding, attr = value in + let let_str = + match rec_opt with + None -> "let " + | Some _ -> "let rec " in + let binding = pp_let_binding binding + and attr = pp_attributes attr + in string let_str ^^ binding ^^ attr + +and pp_attributes = function + [] -> empty +| attr -> + let make s = string "[@@" ^^ string s.value ^^ string "]" in + group (nest 2 (break 1 ^^ separate_map (break 0) make attr)) + +and pp_ident {value; _} = string value + +and pp_string s = string "\"" ^^ pp_ident s ^^ string "\"" + +and pp_verbatim s = string "{|" ^^ pp_ident s ^^ string "|}" + +and pp_let_binding (binding : let_binding) = + let {binders; lhs_type; let_rhs; _} = binding in + let head, tail = binders in + let patterns = + group (nest 2 (separate_map (break 1) pp_pattern (head::tail))) in + let lhs = + patterns ^^ + match lhs_type with + None -> empty + | Some (_,e) -> group (break 1 ^^ string ": " ^^ pp_type_expr e) + in prefix 2 1 (lhs ^^ string " =") (pp_expr let_rhs) + +and pp_pattern = function + PConstr p -> pp_pconstr p +| PUnit _ -> string "()" +| PFalse _ -> string "false" +| PTrue _ -> string "true" +| PVar v -> pp_ident v +| PInt i -> pp_int i +| PNat n -> pp_nat n +| PBytes b -> pp_bytes b +| PString s -> pp_string s +| PVerbatim s -> pp_verbatim s +| PWild _ -> string "_" +| PList l -> pp_plist l +| PTuple t -> pp_ptuple t +| PPar p -> pp_ppar p +| PRecord r -> pp_precord r +| PTyped t -> pp_ptyped t + +and pp_pconstr = function + PNone _ -> string "None" +| PSomeApp p -> pp_patt_some p +| PConstrApp a -> pp_pconstr_app a + +and pp_pconstr_app {value; _} = + match value with + constr, None -> pp_ident constr + | constr, Some pat -> + prefix 4 1 (pp_ident constr) (pp_pattern pat) + +and pp_patt_some {value; _} = + prefix 4 1 (string "Some") (pp_pattern (snd value)) + +and pp_int {value; _} = + string (Z.to_string (snd value)) + +and pp_nat {value; _} = + string (Z.to_string (snd value) ^ "n") + +and pp_bytes {value; _} = + string ("0x" ^ Hex.show (snd value)) + +and pp_ppar p = pp_par pp_pattern p + +and pp_plist = function + PListComp cmp -> pp_list_comp cmp +| PCons cons -> pp_pcons cons + +and pp_list_comp e = group (pp_injection pp_pattern e) + +and pp_pcons {value; _} = + let patt1, _, patt2 = value in + prefix 2 1 (pp_pattern patt1 ^^ string " ::") (pp_pattern patt2) + +and pp_ptuple {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [p] -> group (break 1 ^^ pp_pattern p) + | p::items -> + group (break 1 ^^ pp_pattern p ^^ string ",") ^^ app items + in if tail = [] + then pp_pattern head + else pp_pattern head ^^ string "," ^^ app (List.map snd tail) + +and pp_precord fields = pp_ne_injection pp_field_pattern fields + +and pp_field_pattern {value; _} = + let {field_name; pattern; _} = value in + prefix 2 1 (pp_ident field_name ^^ string " =") (pp_pattern pattern) + +and pp_ptyped {value; _} = + let {pattern; type_expr; _} = value in + group (pp_pattern pattern ^^ string " :" ^/^ pp_type_expr type_expr) + +and pp_type_decl decl = + let {name; type_expr; _} = decl.value in + let padding = match type_expr with TSum _ -> 0 | _ -> 2 in + string "type " ^^ string name.value ^^ string " =" + ^^ group (nest padding (break 1 ^^ pp_type_expr type_expr)) + +and pp_expr = function + ECase e -> pp_case_expr e +| ECond e -> group (pp_cond_expr e) +| EAnnot e -> pp_annot_expr e +| ELogic e -> group (pp_logic_expr e) +| EArith e -> group (pp_arith_expr e) +| EString e -> pp_string_expr e +| EList e -> group (pp_list_expr e) +| EConstr e -> pp_constr_expr e +| ERecord e -> pp_record_expr e +| EProj e -> pp_projection e +| EUpdate e -> pp_update e +| EVar v -> pp_ident v +| ECall e -> pp_call_expr e +| EBytes e -> pp_bytes e +| EUnit _ -> string "()" +| ETuple e -> pp_tuple_expr e +| EPar e -> pp_par_expr e +| ELetIn e -> pp_let_in e +| EFun e -> pp_fun e +| ESeq e -> pp_seq e + +and pp_case_expr {value; _} = + let {expr; cases; _} = value in + group (string "match " ^^ nest 6 (pp_expr expr) ^/^ string "with") + ^^ hardline ^^ pp_cases cases + +and pp_cases {value; _} = + let head, tail = value in + let head = pp_clause head in + let head = if tail = [] then head else blank 2 ^^ head in + let rest = List.map snd tail in + let app clause = break 1 ^^ string "| " ^^ pp_clause clause + in head ^^ concat_map app rest + +and pp_clause {value; _} = + let {pattern; rhs; _} = value in + pp_pattern pattern ^^ prefix 4 1 (string " ->") (pp_expr rhs) + +and pp_cond_expr {value; _} = + let {test; ifso; kwd_else; ifnot; _} = value in + let test = string "if " ^^ group (nest 3 (pp_expr test)) + and ifso = string "then" ^^ group (nest 2 (break 1 ^^ pp_expr ifso)) + and ifnot = string "else" ^^ group (nest 2 (break 1 ^^ pp_expr ifnot)) + in if kwd_else#is_ghost + then test ^/^ ifso + else test ^/^ ifso ^/^ ifnot + +and pp_annot_expr {value; _} = + let expr, _, type_expr = value.inside in + group (string "(" ^^ nest 1 (pp_expr expr ^/^ string ": " + ^^ pp_type_expr type_expr ^^ string ")")) + +and pp_logic_expr = function + BoolExpr e -> pp_bool_expr e +| CompExpr e -> pp_comp_expr e + +and pp_bool_expr = function + Or e -> pp_bin_op "||" e +| And e -> pp_bin_op "&&" e +| Not e -> pp_un_op "not" e +| True _ -> string "true" +| False _ -> string "false" + +and pp_bin_op op {value; _} = + let {arg1; arg2; _} = value + and length = String.length op + 1 in + pp_expr arg1 ^/^ string (op ^ " ") ^^ nest length (pp_expr arg2) + +and pp_un_op op {value; _} = + string (op ^ " ") ^^ pp_expr value.arg + +and pp_comp_expr = function + Lt e -> pp_bin_op "<" e +| Leq e -> pp_bin_op "<=" e +| Gt e -> pp_bin_op ">" e +| Geq e -> pp_bin_op ">=" e +| Equal e -> pp_bin_op "=" e +| Neq e -> pp_bin_op "<>" e + +and pp_arith_expr = function + Add e -> pp_bin_op "+" e +| Sub e -> pp_bin_op "-" e +| Mult e -> pp_bin_op "*" e +| Div e -> pp_bin_op "/" e +| Mod e -> pp_bin_op "mod" e +| Neg e -> string "-" ^^ pp_expr e.value.arg +| Int e -> pp_int e +| Nat e -> pp_nat e +| Mutez e -> pp_mutez e + +and pp_mutez {value; _} = + Z.to_string (snd value) ^ "mutez" |> string + +and pp_string_expr = function + Cat e -> pp_bin_op "^" e +| String e -> pp_string e +| Verbatim e -> pp_verbatim e + +and pp_list_expr = function + ECons e -> pp_bin_op "::" e +| EListComp e -> group (pp_injection pp_expr e) + +and pp_injection : + 'a.('a -> document) -> 'a injection reg -> document = + fun printer {value; _} -> + let {compound; elements; _} = value in + let sep = string ";" ^^ break 1 in + let elements = Utils.sepseq_to_list elements in + let elements = separate_map sep printer elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening ^^ nest 1 elements ^^ string closing + +and pp_compound = function + BeginEnd (start, _) -> + if start#is_ghost then None else Some ("begin","end") +| Braces (start, _) -> + if start#is_ghost then None else Some ("{","}") +| Brackets (start, _) -> + if start#is_ghost then None else Some ("[","]") + +and pp_constr_expr = function + ENone _ -> string "None" +| ESomeApp a -> pp_some a +| EConstrApp a -> pp_constr_app a + +and pp_some {value=_, e; _} = + prefix 4 1 (string "Some") (pp_expr e) + +and pp_constr_app {value; _} = + let constr, arg = value in + let constr = string constr.value in + match arg with + None -> constr + | Some e -> prefix 2 1 constr (pp_expr e) + +and pp_record_expr ne_inj = group (pp_ne_injection pp_field_assign ne_inj) + +and pp_field_assign {value; _} = + let {field_name; field_expr; _} = value in + prefix 2 1 (pp_ident field_name ^^ string " =") (pp_expr field_expr) + +and pp_ne_injection : + 'a.('a -> document) -> 'a ne_injection reg -> document = + fun printer {value; _} -> + let {compound; ne_elements; _} = value in + let elements = pp_nsepseq ";" printer ne_elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening ^^ nest 1 elements ^^ string closing + +and pp_nsepseq : + 'a.string -> ('a -> document) -> ('a, t) Utils.nsepseq -> document = + fun sep printer elements -> + let elems = Utils.nsepseq_to_list elements + and sep = string sep ^^ break 1 + in separate_map sep printer elems + +and pp_nseq : 'a.('a -> document) -> 'a Utils.nseq -> document = + fun printer (head, tail) -> separate_map (break 1) printer (head::tail) + +and pp_projection {value; _} = + let {struct_name; field_path; _} = value in + let fields = Utils.nsepseq_to_list field_path + and sep = string "." ^^ break 0 in + let fields = separate_map sep pp_selection fields in + group (pp_ident struct_name ^^ string "." ^^ break 0 ^^ fields) + +and pp_selection = function + FieldName v -> string v.value +| Component cmp -> cmp.value |> snd |> Z.to_string |> string + +and pp_update {value; _} = + let {record; updates; _} = value in + let updates = group (pp_ne_injection pp_field_path_assign updates) + and record = pp_path record in + string "{" ^^ record ^^ string " with" + ^^ nest 2 (break 1 ^^ updates ^^ string "}") + +and pp_field_path_assign {value; _} = + let {field_path; field_expr; _} = value in + let path = pp_path field_path in + prefix 2 1 (path ^^ string " =") (pp_expr field_expr) + +and pp_path = function + Name v -> pp_ident v +| Path p -> pp_projection p + +and pp_call_expr {value; _} = + let lambda, arguments = value in + let arguments = pp_nseq pp_expr arguments in + group (pp_expr lambda ^^ nest 2 (break 1 ^^ arguments)) + +and pp_tuple_expr {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_expr e) + | e::items -> + group (break 1 ^^ pp_expr e ^^ string ",") ^^ app items + in if tail = [] + then pp_expr head + else pp_expr head ^^ string "," ^^ app (List.map snd tail) + +and pp_par_expr e = pp_par pp_expr e + +and pp_let_in {value; _} = + let {binding; kwd_rec; body; attributes; _} = value in + let let_str = + match kwd_rec with + None -> "let " + | Some _ -> "let rec " in + let binding = pp_let_binding binding + and attr = pp_attributes attributes + in string let_str ^^ binding ^^ attr + ^^ hardline ^^ group (string "in " ^^ nest 3 (pp_expr body)) + +and pp_fun {value; _} = + let {binders; lhs_type; body; _} = value in + let binders = pp_nseq pp_pattern binders + and annot = + match lhs_type with + None -> empty + | Some (_,e) -> + group (break 1 ^^ string ": " ^^ nest 2 (break 1 ^^ pp_type_expr e)) + in group (string "fun " ^^ nest 4 binders ^^ annot + ^^ string " ->" ^^ nest 2 (break 1 ^^ pp_expr body)) + +and pp_seq {value; _} = + let {compound; elements; _} = value in + let sep = string ";" ^^ hardline in + let elements = Utils.sepseq_to_list elements in + let elements = separate_map sep pp_expr elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening + ^^ nest 2 (hardline ^^ elements) ^^ hardline + ^^ string closing + +and pp_type_expr = function + TProd t -> pp_cartesian t +| TSum t -> pp_variants t +| TRecord t -> pp_fields t +| TApp t -> pp_type_app t +| TFun t -> pp_fun_type t +| TPar t -> pp_type_par t +| TVar t -> pp_ident t +| TString s -> pp_string s + +and pp_cartesian {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string " *") ^^ app items + in pp_type_expr head ^^ string " *" ^^ app (List.map snd tail) + +and pp_variants {value; _} = + let head, tail = value in + let head = pp_variant head in + let head = if tail = [] then head else ifflat head (blank 2 ^^ head) in + let rest = List.map snd tail in + let app variant = break 1 ^^ string "| " ^^ pp_variant variant + in head ^^ concat_map app rest + +and pp_variant {value; _} = + let {constr; arg} = value in + match arg with + None -> pp_ident constr + | Some (_, e) -> + prefix 4 1 (pp_ident constr ^^ string " of") (pp_type_expr e) + +and pp_fields fields = group (pp_ne_injection pp_field_decl fields) + +and pp_field_decl {value; _} = + let {field_name; field_type; _} = value in + let name = pp_ident field_name in + let t_expr = pp_type_expr field_type + in prefix 2 1 (name ^^ string " :") t_expr + +and pp_type_app {value = ctor, tuple; _} = + pp_type_tuple tuple ^^ group (nest 2 (break 1 ^^ pp_type_constr ctor)) + +and pp_type_tuple {value; _} = + let head, tail = value.inside in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string ",") ^^ app items in + if tail = [] + then pp_type_expr head + else + let components = + pp_type_expr head ^^ string "," ^^ app (List.map snd tail) + in string "(" ^^ nest 1 (components ^^ string ")") + +and pp_type_constr ctor = string ctor.value + +and pp_fun_type {value; _} = + let lhs, _, rhs = value in + group (pp_type_expr lhs ^^ string " ->" ^/^ pp_type_expr rhs) + +and pp_type_par t = pp_par pp_type_expr t diff --git a/src/passes/01-parser/cameligo/Tests/pp.mligo b/src/passes/01-parser/cameligo/Tests/pp.mligo index d84c270aa..e68de8216 100644 --- a/src/passes/01-parser/cameligo/Tests/pp.mligo +++ b/src/passes/01-parser/cameligo/Tests/pp.mligo @@ -1,29 +1,54 @@ -type q = {a: int; b: {c: string}} -type r = int list -type s = (int, address) map -type t = int -type u = {a: int; b: t * char} -type v = int * (string * address) -type w = timestamp * nat -> (string, address) map -type x = A | B of t * int | C of int -> (string -> int) +let patch_ (m : foobar) : foobar = Map.literal [(0, 5); (1, 6); (2, 7)] -let x = 4 -let y : t = (if true then -3 + f x x else 0) - 1 -let f (x: int) y = (x : int) +let (greet_num : int), (greeting : string), one_more_component = + different_types of_many_things + ffffff 124312 + +type storage = int * int + +let main (n : int * storage) + : operation list * storage = + let x : int * int = + let x : int = 7 + in x + n.0.asdasdasd.4, n.1.0 + n.1.1.1111111.aaaa.ddddddd.eeeeeee + in ([] : operation list), x + +let y : t = + if true then ffffffffff (-30000 * 10000 - 100000 + f x x y y y y - ((x / 4000) * -5), 103+5) else (10000 + 100000) / 10000000000 +type return = operation list * (storage * fsdgsdgf * sdfsdfsdf * ssdf) +let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = + ttttttttttttt <= (aaaaaaaaaaaaaaaaaaaaaaaa - bbbbbbbbbbbbbbbbbbbb) +let x = tttt * ((fffffffff /55555555) - 3455 * 5135664) - 134 * (-4) +type x = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | B +let or_true (b : bool) : bool = bbbbbbbbbbbbb || true && cccccccccccccccccc +type x = A | B of t * int | CCC of int -> (string -> int) -> (string, address, timestamp, int) map +let c = CCCCCCCCCCCC (aaaaa, BBBBBBBBB aaaaaaaaaaaa) +let e = Some (a, B b) +type w = timestamp * nat -> (string, address) map -> t +type v = int * (a_long_type_name * (another_long_one * address * and_so_on) * more_of_a_very_long_type) + +type r = int list +type t = int +type s = (int,address,a_long_type_name, more_of_a_very_long_type * foo_bar_baz) t +type q = {a: int; b: {c: string}; c: timestamp * (address, string) big_map -> longer_type_name} +type u = {a: int; b: t * char; c: int * (a_long_type_name * (another_long_one * address * and_so_on) * more_of_a_very_long_type)} +let f xxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzz ttttt : type_annotation_which_is_very_verbose = this_too_short_a_variable +let g : type_annotation_which_is_very_verbose = fun x y z t -> this_too_short_a_variable [@@inline] +let yyyyyyyyyyy : a_very_long_and_specific_type_of_string = "foo and bar" +let rec x (_, (yyyyyyyyyyyyyyyy: tttttttttttttttttttttttt), very_long_variable_to_trigger_a_break) = 4 +let y {xxxxxxxxx=(_,yyyyyyyy,more_components,another_one); zzzzzzz=34444444; ttttttt=3n} = xxxxxx let z : (t) = y -let w = - match f 3 with - None -> [] - | Some (1::[2;3]) -> [4;5]::[] +let f (xxxxxxxxxxx: tttttttttttttt) y = (xxxxxxxxxxxx : tttttttttttttttttt) let n : nat = 0n let a = A let b = B a -let c = C (a, B (a)) let d = None -let e = Some (a, B b) -let z = z.1.2 -let v = "hello" ^ "world" ^ "!" -let w = Map.literal [(1,"1"); (2,"2")] - -let r = { field = 0} -let r = { r with field = 42} +let z = let v = "hello" ^ "world" ^ "!" in v +let r = { field = 0; another = 11111111111111111; and_another_one = "dddddd"} +let r = { r with field = 42; another = 11111111111111111; and_another_one = "dddddddddddddddddddddd"} +let w = Map.literal [(11111111111111,"11111111111111"); (22222222222,"22222222222222222"); (1234567890,"1234567890")] +let z = z.1.a.0.4.c.6.7.8.9.cccccccccccc.ccccccccccccccccc.ddddddddddddddddd.0.1.2 +let y : t = (if true then -30000000000000 + f x x y y y y else 10000000000000000000) - 1 +let w = + match f 3 with + None -> [] + | Some (1::[2;3;4;5;6]) -> [4;5]::[] diff --git a/src/passes/01-parser/cameligo/dune b/src/passes/01-parser/cameligo/dune index 02b8f3663..ff5896de8 100644 --- a/src/passes/01-parser/cameligo/dune +++ b/src/passes/01-parser/cameligo/dune @@ -15,8 +15,10 @@ (name parser_cameligo) (public_name ligo.parser.cameligo) (modules - Scoping AST cameligo Parser ParserLog LexToken ParErr) + Scoping AST cameligo Parser ParserLog LexToken ParErr Pretty) (libraries + pprint + terminal_size menhirLib parser_shared str @@ -26,8 +28,8 @@ (pps bisect_ppx --conditional)) (flags (:standard -open Parser_shared -open Simple_utils))) -;; Build of the unlexer (for covering the -;; error states of the LR automaton) +;; Build of the unlexer (for covering the error states of the LR +;; automaton) (executable (name Unlexer) diff --git a/src/passes/01-parser/cameligo/error.messages.checked-in b/src/passes/01-parser/cameligo/error.messages.checked-in index f50349c12..14c31bc5f 100644 --- a/src/passes/01-parser/cameligo/error.messages.checked-in +++ b/src/passes/01-parser/cameligo/error.messages.checked-in @@ -1948,7 +1948,7 @@ interactive_expr: LBRACE Constr DOT Ident With ## ## Ends in an error in state: 523. ## -## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With ] +## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With EQ ] ## ## The known suffix of the stack is as follows: ## Constr DOT Ident @@ -1960,7 +1960,7 @@ interactive_expr: LBRACE Constr DOT With ## ## Ends in an error in state: 522. ## -## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With ] +## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With EQ ] ## ## The known suffix of the stack is as follows: ## Constr DOT @@ -1972,7 +1972,7 @@ interactive_expr: LBRACE Constr With ## ## Ends in an error in state: 521. ## -## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With ] +## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With EQ ] ## ## The known suffix of the stack is as follows: ## Constr @@ -2002,7 +2002,7 @@ interactive_expr: LBRACE Ident DOT Ident Verbatim interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 551. +## 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 ] @@ -2015,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: 550. +## 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 ] @@ -2047,7 +2047,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI Ident EQ Bytes With interactive_expr: LBRACE Ident EQ Bytes SEMI Ident With ## -## Ends in an error in state: 547. +## Ends in an error in state: 548. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACE ] ## @@ -2059,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: 546. +## 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 ] @@ -2072,7 +2072,7 @@ interactive_expr: LBRACE Ident EQ Bytes SEMI With interactive_expr: LBRACE Ident EQ Bytes With ## -## Ends in an error in state: 545. +## 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 ] @@ -2128,9 +2128,9 @@ interactive_expr: LBRACE Ident WILD -interactive_expr: LBRACE Ident With Int EQ Bytes SEMI Int EQ Bytes SEMI With +interactive_expr: LBRACE Ident With Ident DOT Ident EQ Bytes SEMI Ident DOT Ident EQ Bytes SEMI With ## -## Ends in an error in state: 541. +## 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 ] @@ -2141,9 +2141,9 @@ interactive_expr: LBRACE Ident With Int EQ Bytes SEMI Int EQ Bytes SEMI With -interactive_expr: LBRACE Ident With Int EQ Bytes SEMI Int EQ Bytes With +interactive_expr: LBRACE Ident With Ident DOT Ident EQ Bytes SEMI Ident DOT Ident EQ Bytes With ## -## Ends in an error in state: 540. +## 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 ] @@ -2168,14 +2168,14 @@ interactive_expr: LBRACE Ident With Int EQ Bytes SEMI Int EQ Bytes With ## In state 368, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 370, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 371, spurious reduction of production expr -> base_cond__open(expr) -## In state 534, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr +## In state 534, spurious reduction of production field_path_assignment -> path EQ expr ## -interactive_expr: LBRACE Ident With Int EQ Bytes SEMI With +interactive_expr: LBRACE Ident With Ident DOT Ident EQ Bytes SEMI With ## -## Ends in an error in state: 537. +## 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 ] @@ -2186,9 +2186,9 @@ interactive_expr: LBRACE Ident With Int EQ Bytes SEMI With -interactive_expr: LBRACE Ident With Int EQ Bytes With +interactive_expr: LBRACE Ident With Ident DOT Ident EQ Bytes With ## -## Ends in an error in state: 536. +## 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 ] @@ -2213,37 +2213,52 @@ interactive_expr: LBRACE Ident With Int EQ Bytes With ## In state 368, spurious reduction of production base_expr(expr) -> disj_expr_level ## In state 370, spurious reduction of production base_cond__open(expr) -> base_expr(expr) ## In state 371, spurious reduction of production expr -> base_cond__open(expr) -## In state 534, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr +## In state 534, spurious reduction of production field_path_assignment -> path EQ expr ## -interactive_expr: LBRACE Ident With Int EQ With +interactive_expr: LBRACE Ident With Ident DOT Ident EQ With ## ## Ends in an error in state: 533. ## -## field_path_assignment -> nsepseq(selection,DOT) EQ . expr [ SEMI RBRACE ] +## field_path_assignment -> path EQ . expr [ SEMI RBRACE ] ## ## The known suffix of the stack is as follows: -## nsepseq(selection,DOT) EQ +## path EQ ## -interactive_expr: LBRACE Ident With Int With +interactive_expr: LBRACE Ident With Ident DOT Ident With ## ## Ends in an error in state: 532. ## -## field_path_assignment -> nsepseq(selection,DOT) . EQ expr [ SEMI RBRACE ] +## field_path_assignment -> path . EQ expr [ SEMI RBRACE ] ## ## The known suffix of the stack is as follows: -## nsepseq(selection,DOT) +## path ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 187, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 190, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 526, spurious reduction of production path -> projection +## + + + +interactive_expr: LBRACE Ident With Ident With +## +## Ends in an error in state: 529. +## +## path -> Ident . [ EQ ] +## projection -> Ident . DOT nsepseq(selection,DOT) [ EQ ] +## +## The known suffix of the stack is as follows: +## Ident ## @@ -2275,7 +2290,7 @@ interactive_expr: LBRACE With interactive_expr: LBRACKET Verbatim SEMI Verbatim SEMI With ## -## Ends in an error in state: 566. +## Ends in an error in state: 567. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -2288,7 +2303,7 @@ interactive_expr: LBRACKET Verbatim SEMI Verbatim SEMI With interactive_expr: LBRACKET Verbatim SEMI Verbatim With ## -## Ends in an error in state: 565. +## Ends in an error in state: 566. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -2319,7 +2334,7 @@ interactive_expr: LBRACKET Verbatim SEMI Verbatim With interactive_expr: LBRACKET Verbatim SEMI With ## -## Ends in an error in state: 562. +## Ends in an error in state: 563. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -2332,7 +2347,7 @@ interactive_expr: LBRACKET Verbatim SEMI With interactive_expr: LBRACKET Verbatim With ## -## Ends in an error in state: 561. +## Ends in an error in state: 562. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -2373,14 +2388,14 @@ interactive_expr: LBRACKET With -interactive_expr: LPAR Verbatim COLON String VBAR +interactive_expr: LPAR Verbatim COLON Ident VBAR ## -## Ends in an error in state: 579. +## Ends in an error in state: 581. ## -## par(__anonymous_1) -> LPAR expr COLON type_expr . RPAR [ With Verbatim 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(annot_expr) -> LPAR annot_expr . RPAR [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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: -## LPAR expr COLON type_expr +## LPAR annot_expr ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an @@ -2389,27 +2404,28 @@ interactive_expr: LPAR Verbatim COLON String VBAR ## In state 28, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 27, spurious reduction of production type_expr -> fun_type +## In state 580, spurious reduction of production annot_expr -> expr COLON type_expr ## interactive_expr: LPAR Verbatim COLON With ## -## Ends in an error in state: 578. +## Ends in an error in state: 579. ## -## par(__anonymous_1) -> LPAR expr COLON . type_expr RPAR [ With Verbatim 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 ] +## annot_expr -> expr COLON . type_expr [ RPAR ] ## ## The known suffix of the stack is as follows: -## LPAR expr COLON +## expr COLON ## interactive_expr: LPAR Verbatim With ## -## Ends in an error in state: 576. +## Ends in an error in state: 577. ## -## par(__anonymous_1) -> LPAR expr . COLON type_expr RPAR [ With Verbatim 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 ] +## annot_expr -> expr . COLON type_expr [ RPAR ] ## par(expr) -> LPAR expr . RPAR [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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: @@ -2439,7 +2455,7 @@ interactive_expr: LPAR With ## ## Ends in an error in state: 167. ## -## par(__anonymous_1) -> LPAR . expr COLON type_expr RPAR [ With Verbatim 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(annot_expr) -> LPAR . annot_expr RPAR [ With Verbatim VBAR Type True Then TIMES String SLASH SEMI RPAR RBRACKET RBRACE PLUS Or Nat NE Mutez Mod MINUS Let 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 Verbatim 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 ] ## unit -> LPAR . RPAR [ With Verbatim 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 ] ## @@ -2524,7 +2540,7 @@ interactive_expr: Let Rec With interactive_expr: Let WILD EQ Bytes Attr Type ## -## Ends in an error in state: 554. +## 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 EOF COLON Attr ] ## @@ -2543,7 +2559,7 @@ interactive_expr: Let WILD EQ Bytes Attr Type interactive_expr: Let WILD EQ Bytes In With ## -## Ends in an error in state: 555. +## 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 EOF COLON Attr ] ## @@ -2555,7 +2571,7 @@ interactive_expr: Let WILD EQ Bytes In With interactive_expr: Let WILD EQ Bytes With ## -## Ends in an error in state: 553. +## 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 EOF COLON Attr ] ## @@ -2610,7 +2626,7 @@ interactive_expr: MINUS With interactive_expr: Match Verbatim Type ## -## Ends in an error in state: 569. +## 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 EOF COLON Attr ] ## @@ -2652,7 +2668,7 @@ interactive_expr: Match Verbatim With LPAR Bytes RPAR With interactive_expr: Match Verbatim With VBAR Begin ## -## Ends in an error in state: 571. +## 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 EOF COLON Attr ] ## @@ -2664,7 +2680,7 @@ interactive_expr: Match Verbatim With VBAR Begin interactive_expr: Match Verbatim With WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 575. +## 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 EOF COLON Attr ] ## @@ -3199,7 +3215,7 @@ interactive_expr: Match Verbatim With WILD ARROW Let With interactive_expr: Match Verbatim With WILD ARROW Verbatim COMMA Bytes Else ## -## Ends in an error in state: 574. +## 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 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 ] @@ -3263,7 +3279,7 @@ interactive_expr: Match Verbatim With WILD ARROW Verbatim End interactive_expr: Match Verbatim With WILD ARROW With ## -## Ends in an error in state: 573. +## 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 EOF COLON Attr ] ## @@ -3312,7 +3328,7 @@ interactive_expr: Match Verbatim With WILD COMMA With interactive_expr: Match Verbatim With WILD CONS Bytes SEMI ## -## Ends in an error in state: 572. +## 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 EOF COLON Attr ] ## @@ -3356,7 +3372,7 @@ interactive_expr: Match Verbatim With WILD With interactive_expr: Match Verbatim With With ## -## Ends in an error in state: 570. +## 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 EOF COLON Attr ] ## @@ -3746,7 +3762,7 @@ interactive_expr: Verbatim WILD interactive_expr: Verbatim With ## -## Ends in an error in state: 596. +## Ends in an error in state: 598. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -3775,7 +3791,7 @@ interactive_expr: Verbatim With interactive_expr: With ## -## Ends in an error in state: 594. +## Ends in an error in state: 596. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -4221,7 +4237,7 @@ contract: Let LPAR With contract: Let Rec WILD EQ Bytes With ## -## Ends in an error in state: 583. +## Ends in an error in state: 585. ## ## let_declaration -> Let Rec let_binding . seq(Attr) [ Type Let EOF ] ## @@ -4346,7 +4362,7 @@ contract: Let WILD EQ Bytes Attr With contract: Let WILD EQ Bytes With ## -## Ends in an error in state: 585. +## Ends in an error in state: 587. ## ## let_declaration -> Let let_binding . seq(Attr) [ Type Let EOF ] ## @@ -4482,7 +4498,7 @@ contract: Type Ident EQ Constr With contract: Type Ident EQ Ident VBAR ## -## Ends in an error in state: 591. +## Ends in an error in state: 593. ## ## declarations -> declaration . [ EOF ] ## declarations -> declaration . declarations [ EOF ] @@ -4498,7 +4514,7 @@ contract: Type Ident EQ Ident VBAR ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 27, spurious reduction of production type_expr -> fun_type ## In state 61, spurious reduction of production type_decl -> Type Ident EQ type_expr -## In state 587, spurious reduction of production declaration -> type_decl +## In state 589, spurious reduction of production declaration -> type_decl ## diff --git a/src/passes/01-parser/pascaligo.ml b/src/passes/01-parser/pascaligo.ml index 02b8f462e..b2c6ab9f4 100644 --- a/src/passes/01-parser/pascaligo.ml +++ b/src/passes/01-parser/pascaligo.ml @@ -19,7 +19,8 @@ module SubIO = ext : string; (* ".ligo" *) mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -34,6 +35,7 @@ module SubIO = method mode = `Point method cmd = EvalOpt.Quiet method mono = false + method pretty = false end let make = @@ -46,6 +48,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#pretty end module Parser = diff --git a/src/passes/01-parser/pascaligo/.links b/src/passes/01-parser/pascaligo/.links index 45c9a4602..aca47d8ff 100644 --- a/src/passes/01-parser/pascaligo/.links +++ b/src/passes/01-parser/pascaligo/.links @@ -21,5 +21,3 @@ $HOME/git/OCaml-build/Makefile ../shared/ParserUnit.mli ../shared/ParserUnit.ml ../shared/LexerLib.ml - -$HOME/git/ligo/_build/default/src/passes/1-parser/pascaligo/ParErr.ml diff --git a/src/passes/01-parser/pascaligo/AST.ml b/src/passes/01-parser/pascaligo/AST.ml index 0c9eb4c89..ad5e8be7e 100644 --- a/src/passes/01-parser/pascaligo/AST.ml +++ b/src/passes/01-parser/pascaligo/AST.ml @@ -106,14 +106,15 @@ type eof = Region.t (* Literals *) -type variable = string reg -type fun_name = string reg -type type_name = string reg -type field_name = string reg -type map_name = string reg -type set_name = string reg -type constr = string reg -type attribute = string reg +type variable = string reg +type fun_name = string reg +type type_name = string reg +type type_constr = string reg +type field_name = string reg +type map_name = string reg +type set_name = string reg +type constr = string reg +type attribute = string reg (* Parentheses *) @@ -181,11 +182,11 @@ and type_expr = TProd of cartesian | TSum of (variant reg, vbar) nsepseq reg | TRecord of field_decl reg ne_injection reg -| TApp of (type_name * type_tuple) reg +| TApp of (type_constr * type_tuple) reg | 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 @@ -205,7 +206,6 @@ and type_tuple = (type_expr, comma) nsepseq par reg (* Function and procedure declarations *) and fun_expr = { - kwd_recursive: kwd_recursive option; kwd_function : kwd_function; param : parameters; colon : colon; @@ -215,17 +215,17 @@ and fun_expr = { } and fun_decl = { - kwd_recursive: kwd_recursive option; - kwd_function : kwd_function; - fun_name : variable; - param : parameters; - colon : colon; - ret_type : type_expr; - kwd_is : kwd_is; - block_with : (block reg * kwd_with) option; - return : expr; - terminator : semi option; - attributes : attr_decl option + kwd_recursive : kwd_recursive option; + kwd_function : kwd_function; + fun_name : variable; + param : parameters; + colon : colon; + ret_type : type_expr; + kwd_is : kwd_is; + block_with : (block reg * kwd_with) option; + return : expr; + terminator : semi option; + attributes : attr_decl option } and parameters = (param_decl, semi) nsepseq par reg @@ -249,19 +249,14 @@ and param_var = { } and block = { - opening : block_opening; + enclosing : block_enclosing; statements : statements; - terminator : semi option; - closing : block_closing + terminator : semi option } -and block_opening = - Block of kwd_block * lbrace -| Begin of kwd_begin - -and block_closing = - Block of rbrace -| End of kwd_end +and block_enclosing = + Block of kwd_block * lbrace * rbrace +| BeginEnd of kwd_begin * kwd_end and statements = (statement, semi) nsepseq @@ -378,10 +373,10 @@ and set_membership = { and 'a case = { kwd_case : kwd_case; expr : expr; - opening : opening; + kwd_of : kwd_of; + enclosing : enclosing; lead_vbar : vbar option; - cases : ('a case_clause reg, vbar) nsepseq reg; - closing : closing + cases : ('a case_clause reg, vbar) nsepseq reg } and 'a case_clause = { @@ -417,13 +412,12 @@ and for_loop = | ForCollect of for_collect reg and for_int = { - kwd_for : kwd_for; - assign : var_assign reg; - kwd_to : kwd_to; - bound : expr; - kwd_step : kwd_step option; - step : expr option; - block : block reg + kwd_for : kwd_for; + assign : var_assign reg; + kwd_to : kwd_to; + bound : expr; + step : (kwd_step * expr) option; + block : block reg } and var_assign = { @@ -452,7 +446,7 @@ and collection = and expr = ECase of expr case reg | ECond of cond_expr reg -| EAnnot of annot_expr reg +| EAnnot of annot_expr par reg | ELogic of logic_expr | EArith of arith_expr | EString of string_expr @@ -471,34 +465,12 @@ and expr = | EPar of expr par reg | EFun of fun_expr reg -and annot_expr = (expr * type_expr) +and annot_expr = expr * colon * type_expr and set_expr = SetInj of expr injection reg | SetMem of set_membership reg -and 'a injection = { - opening : opening; - elements : ('a, semi) sepseq; - terminator : semi option; - closing : closing -} - -and 'a ne_injection = { - opening : opening; - ne_elements : ('a, semi) nsepseq; - terminator : semi option; - closing : closing -} - -and opening = - Kwd of keyword -| KwdBracket of keyword * lbracket - -and closing = - End of kwd_end -| RBracket of rbracket - and map_expr = MapLookUp of map_lookup reg | MapInj of binding reg injection reg @@ -520,7 +492,7 @@ and logic_expr = and bool_expr = Or of kwd_or bin_op reg | And of kwd_and bin_op reg -| Not of kwd_not un_op reg +| Not of kwd_not un_op reg | False of c_False | True of c_True @@ -544,15 +516,15 @@ and comp_expr = | Neq of neq bin_op reg and arith_expr = - Add of plus bin_op reg -| Sub of minus bin_op reg -| Mult of times bin_op reg -| Div of slash bin_op reg -| Mod of kwd_mod bin_op reg -| Neg of minus un_op reg -| Int of (Lexer.lexeme * Z.t) reg -| Nat of (Lexer.lexeme * Z.t) reg -| Mutez of (Lexer.lexeme * Z.t) reg + Add of plus bin_op reg +| Sub of minus bin_op reg +| Mult of times bin_op reg +| Div of slash bin_op reg +| Mod of kwd_mod bin_op reg +| Neg of minus un_op reg +| Int of (Lexer.lexeme * Z.t) reg +| Nat of (Lexer.lexeme * Z.t) reg +| Mutez of (Lexer.lexeme * Z.t) reg and string_expr = Cat of cat bin_op reg @@ -569,13 +541,13 @@ and constr_expr = | NoneExpr of c_None | ConstrApp of (constr * arguments option) reg -and field_assign = { +and field_assignment = { field_name : field_name; - equal : equal; + assignment : equal; field_expr : expr } -and record = field_assign reg ne_injection +and record = field_assignment reg ne_injection and projection = { struct_name : variable; @@ -584,14 +556,14 @@ and projection = { } and update = { - record : path; + record : path; kwd_with : kwd_with; - updates : field_path_assign reg ne_injection reg + updates : field_path_assignment reg ne_injection reg } -and field_path_assign = { - field_path : (selection, dot) nsepseq; - equal : equal; +and field_path_assignment = { + field_path : path; + assignment : equal; field_expr : expr } @@ -605,6 +577,38 @@ and fun_call = (expr * arguments) reg and arguments = tuple_expr +(* Injections *) + +and 'a injection = { + kind : injection_kwd; + enclosing : enclosing; + elements : ('a, semi) sepseq; + terminator : semi option +} + +and injection_kwd = + InjSet of keyword +| InjMap of keyword +| InjBigMap of keyword +| InjList of keyword + +and enclosing = + Brackets of lbracket * rbracket +| End of kwd_end + +and 'a ne_injection = { + kind : ne_injection_kwd; + enclosing : enclosing; + ne_elements : ('a, semi) nsepseq; + terminator : semi option +} + +and ne_injection_kwd = + NEInjAttr of keyword +| NEInjSet of keyword +| NEInjMap of keyword +| NEInjRecord of keyword + (* Patterns *) and pattern = @@ -635,7 +639,7 @@ and list_pattern = | PCons of (pattern, cons) nsepseq reg -(* Projecting regions *) +(* PROJECTING REGIONS *) let rec last to_region = function [] -> Region.ghost @@ -660,7 +664,7 @@ let type_expr_to_region = function | TApp {region; _} | TFun {region; _} | TPar {region; _} -| TStringLiteral {region; _} +| TString {region; _} | TVar {region; _} -> region let rec expr_to_region = function diff --git a/src/passes/01-parser/pascaligo/Parser.mly b/src/passes/01-parser/pascaligo/Parser.mly index a7359ac9e..8052be9fc 100644 --- a/src/passes/01-parser/pascaligo/Parser.mly +++ b/src/passes/01-parser/pascaligo/Parser.mly @@ -122,7 +122,8 @@ attr_decl: open_attr_decl ";"? { $1 } open_attr_decl: - ne_injection("attributes","") { $1 } + ne_injection("attributes","") { + $1 (fun region -> NEInjAttr region) } (* Type declarations *) @@ -160,9 +161,9 @@ cartesian: in TProd {region; value} } core_type: - type_name { TVar $1 } -| "" { TStringLiteral $1 } -| par(type_expr) { TPar $1 } + type_name { TVar $1 } +| "" { TString $1 } +| par(type_expr) { TPar $1 } | type_name type_tuple { let region = cover $1.region $2.region in TApp {region; value = $1,$2} @@ -214,19 +215,19 @@ record_type: let () = Utils.nsepseq_to_list ne_elements |> Scoping.check_fields in let region = cover $1 $3 - and value = {opening = Kwd $1; + and value = {kind = NEInjRecord $1; + enclosing = End $3; ne_elements; - terminator; - closing = End $3} + terminator} in TRecord {region; value} } | "record" "[" sep_or_term_list(field_decl,";") "]" { let ne_elements, terminator = $3 in let region = cover $1 $4 - and value = {opening = KwdBracket ($1,$2); + and value = {kind = NEInjRecord $1; + enclosing = Brackets ($2,$4); ne_elements; - terminator; - closing = RBracket $4} + terminator} in TRecord {region; value} } field_decl: @@ -238,16 +239,15 @@ field_decl: fun_expr: - | ioption ("recursive") "function" parameters ":" type_expr "is" expr { - let stop = expr_to_region $7 in - let region = cover $2 stop - and value = {kwd_recursive= $1; - kwd_function = $2; - param = $3; - colon = $4; - ret_type = $5; - kwd_is = $6; - return = $7} + "function" parameters ":" type_expr "is" expr { + let stop = expr_to_region $6 in + let region = cover $1 stop + and value = {kwd_function = $1; + param = $2; + colon = $3; + ret_type = $4; + kwd_is = $5; + return = $6} in {region; value} } (* Function declarations *) @@ -271,7 +271,8 @@ open_fun_decl: attributes = None} in {region; value} } -| ioption ("recursive") "function" fun_name parameters ":" type_expr "is" expr { +| ioption ("recursive") "function" fun_name parameters ":" type_expr "is" + expr { Scoping.check_reserved_name $3; let stop = expr_to_region $8 in let region = cover $2 stop @@ -326,19 +327,17 @@ block: "begin" sep_or_term_list(statement,";") "end" { let statements, terminator = $2 in let region = cover $1 $3 - and value = {opening = Begin $1; + and value = {enclosing = BeginEnd ($1,$3); statements; - terminator; - closing = End $3} + terminator} in {region; value} } | "block" "{" sep_or_term_list(statement,";") "}" { let statements, terminator = $3 in let region = cover $1 $4 - and value = {opening = Block ($1,$2); + and value = {enclosing = Block ($1,$2,$4); statements; - terminator; - closing = Block $4} + terminator} in {region; value} } statement: @@ -404,124 +403,122 @@ instruction: set_remove: "remove" expr "from" "set" path { let region = cover $1 (path_to_region $5) in - let value = { - kwd_remove = $1; - element = $2; - kwd_from = $3; - kwd_set = $4; - set = $5} + let value = {kwd_remove = $1; + element = $2; + kwd_from = $3; + kwd_set = $4; + set = $5} in {region; value} } map_remove: "remove" expr "from" "map" path { let region = cover $1 (path_to_region $5) in - let value = { - kwd_remove = $1; - key = $2; - kwd_from = $3; - kwd_map = $4; - map = $5} + let value = {kwd_remove = $1; + key = $2; + kwd_from = $3; + kwd_map = $4; + map = $5} in {region; value} } set_patch: "patch" path "with" ne_injection("set",expr) { - let region = cover $1 $4.region in - let value = { - kwd_patch = $1; - path = $2; - kwd_with = $3; - set_inj = $4} + let set_inj = $4 (fun region -> NEInjSet region) in + let region = cover $1 set_inj.region in + let value = {kwd_patch = $1; + path = $2; + kwd_with = $3; + set_inj} in {region; value} } map_patch: "patch" path "with" ne_injection("map",binding) { - let region = cover $1 $4.region in - let value = { - kwd_patch = $1; - path = $2; - kwd_with = $3; - map_inj = $4} + let map_inj = $4 (fun region -> NEInjMap region) in + let region = cover $1 map_inj.region in + let value = {kwd_patch = $1; + path = $2; + kwd_with = $3; + map_inj} in {region; value} } injection(Kind,element): Kind sep_or_term_list(element,";") "end" { - let elements, terminator = $2 in - let region = cover $1 $3 - and value = { - opening = Kwd $1; - elements = Some elements; - terminator; - closing = End $3} - in {region; value} + fun mk_kwd -> + let elements, terminator = $2 in + let region = cover $1 $3 + and value = { + kind = mk_kwd $1; + enclosing = End $3; + elements = Some elements; + terminator} + in {region; value} } | Kind "end" { - let region = cover $1 $2 - and value = { - opening = Kwd $1; - elements = None; - terminator = None; - closing = End $2} - in {region; value} + fun mk_kwd -> + let region = cover $1 $2 + and value = {kind = mk_kwd $1; + enclosing = End $2; + elements = None; + terminator = None} + in {region; value} } | Kind "[" sep_or_term_list(element,";") "]" { - let elements, terminator = $3 in - let region = cover $1 $4 - and value = { - opening = KwdBracket ($1,$2); - elements = Some elements; - terminator; - closing = RBracket $4} - in {region; value} + fun mk_kwd -> + let elements, terminator = $3 in + let region = cover $1 $4 + and value = {kind = mk_kwd $1; + enclosing = Brackets ($2,$4); + elements = Some elements; + terminator} + in {region; value} } | Kind "[" "]" { - let region = cover $1 $3 - and value = { - opening = KwdBracket ($1,$2); - elements = None; - terminator = None; - closing = RBracket $3} - in {region; value} } + fun mk_kwd -> + let region = cover $1 $3 + and value = {kind = mk_kwd $1; + enclosing = Brackets ($2,$3); + elements = None; + terminator = None} + in {region; value} } ne_injection(Kind,element): Kind sep_or_term_list(element,";") "end" { - let ne_elements, terminator = $2 in - let region = cover $1 $3 - and value = { - opening = Kwd $1; - ne_elements; - terminator; - closing = End $3} - in {region; value} + fun mk_kwd -> + let ne_elements, terminator = $2 in + let region = cover $1 $3 + and value = {kind = mk_kwd $1; + enclosing = End $3; + ne_elements; + terminator} + in {region; value} } | Kind "[" sep_or_term_list(element,";") "]" { - let ne_elements, terminator = $3 in - let region = cover $1 $4 - and value = { - opening = KwdBracket ($1,$2); - ne_elements; - terminator; - closing = RBracket $4} - in {region; value} } + fun mk_kwd -> + let ne_elements, terminator = $3 in + let region = cover $1 $4 + and value = {kind = mk_kwd $1; + enclosing = Brackets ($2,$4); + ne_elements; + terminator} + in {region; value} } binding: expr "->" expr { let start = expr_to_region $1 and stop = expr_to_region $3 in let region = cover start stop - and value = { - source = $1; - arrow = $2; - image = $3} + and value = {source = $1; + arrow = $2; + image = $3} in {region; value} } record_patch: "patch" path "with" ne_injection("record",field_assignment) { - let region = cover $1 $4.region in - let value = { - kwd_patch = $1; - path = $2; - kwd_with = $3; - record_inj = $4} + let record_inj = $4 (fun region -> NEInjRecord region) in + let region = cover $1 record_inj.region in + let value = {kwd_patch = $1; + path = $2; + kwd_with = $3; + record_inj} in {region; value} } proc_call: @@ -547,12 +544,9 @@ if_clause: clause_block: block { LongBlock $1 } | "{" sep_or_term_list(statement,";") "}" { - let statements, terminator = $2 in let region = cover $1 $3 in - let value = {lbrace = $1; - inside = statements, terminator; - rbrace = $3} in - ShortBlock {value; region} } + let value = {lbrace=$1; inside=$2; rbrace=$3} + in ShortBlock {value; region} } case_instr: case(if_clause) { $1 if_clause_to_region } @@ -563,10 +557,10 @@ case(rhs): let region = cover $1 $6 in let value = {kwd_case = $1; expr = $2; - opening = Kwd $3; + kwd_of = $3; + enclosing = End $6; lead_vbar = $4; - cases = $5 rhs_to_region; - closing = End $6} + cases = $5 rhs_to_region} in {region; value} } | "case" expr "of" "[" "|"? cases(rhs) "]" { @@ -574,10 +568,10 @@ case(rhs): let region = cover $1 $7 in let value = {kwd_case = $1; expr = $2; - opening = KwdBracket ($3,$4); + kwd_of = $3; + enclosing = Brackets ($4,$7); lead_vbar = $5; - cases = $6 rhs_to_region; - closing = RBracket $7} + cases = $6 rhs_to_region} in {region; value} } cases(rhs): @@ -628,7 +622,6 @@ for_loop: assign = $2; kwd_to = $3; bound = $4; - kwd_step = None; step = None; block = $5} in For (ForInt {region; value}) @@ -639,8 +632,7 @@ for_loop: assign = $2; kwd_to = $3; bound = $4; - kwd_step = Some $5; - step = Some $6; + step = Some ($5, $6); block = $7} in For (ForInt {region; value}) } @@ -854,7 +846,7 @@ core_expr: | "False" { ELogic (BoolExpr (False $1)) } | "True" { ELogic (BoolExpr (True $1)) } | "Unit" { EUnit $1 } -| annot_expr { EAnnot $1 } +| par(annot_expr) { EAnnot $1 } | tuple_expr { ETuple $1 } | list_expr { EList $1 } | "None" { EConstr (NoneExpr $1) } @@ -896,20 +888,20 @@ fun_call_or_par_or_projection: | fun_call { ECall $1 } annot_expr: - "(" disj_expr ":" type_expr ")" { - let start = expr_to_region $2 - and stop = type_expr_to_region $4 in - let region = cover start stop - and value = $2, $4 - in {region; value} } + disj_expr ":" type_expr { $1,$2,$3 } set_expr: - injection("set",expr) { SetInj $1 } + injection("set",expr) { SetInj ($1 (fun region -> InjSet region)) } map_expr: - map_lookup { MapLookUp $1 } -| injection("map",binding) { MapInj $1 } -| injection("big_map",binding) { BigMapInj $1 } + map_lookup { + MapLookUp $1 + } +| injection("map",binding) { + MapInj ($1 (fun region -> InjMap region)) + } +| injection("big_map",binding) { + BigMapInj ($1 (fun region -> InjBigMap region)) } map_lookup: path brackets(expr) { @@ -957,41 +949,40 @@ record_expr: "record" sep_or_term_list(field_assignment,";") "end" { let ne_elements, terminator = $2 in let region = cover $1 $3 - and value : field_assign AST.reg ne_injection = { - opening = Kwd $1; + and value : field_assignment AST.reg ne_injection = { + kind = NEInjRecord $1; + enclosing = End $3; ne_elements; - terminator; - closing = End $3} + terminator} in {region; value} } | "record" "[" sep_or_term_list(field_assignment,";") "]" { - let ne_elements, terminator = $3 in - let region = cover $1 $4 - and value : field_assign AST.reg ne_injection = { - opening = KwdBracket ($1,$2); - ne_elements; - terminator; - closing = RBracket $4} - in {region; value} } + let ne_elements, terminator = $3 in + let region = cover $1 $4 + and value : field_assignment AST.reg ne_injection = { + kind = NEInjRecord $1; + enclosing = Brackets ($2,$4); + ne_elements; + terminator} + in {region; value} } update_record: - path "with" ne_injection("record",field_path_assignment){ - let region = cover (path_to_region $1) $3.region in - let value = {record=$1; kwd_with=$2; updates=$3} + path "with" ne_injection("record",field_path_assignment) { + let updates = $3 (fun region -> NEInjRecord region) in + let region = cover (path_to_region $1) updates.region in + let value = {record=$1; kwd_with=$2; updates} in {region; value} } field_assignment: field_name "=" expr { let region = cover $1.region (expr_to_region $3) - and value = {field_name=$1; equal=$2; field_expr=$3} + and value = {field_name=$1; assignment=$2; field_expr=$3} in {region; value} } field_path_assignment: - nsepseq(selection,".") "=" expr { - let start = nsepseq_to_region selection_to_region $1 - and stop = expr_to_region $3 in - let region = cover start stop - and value = {field_path=$1; equal=$2; field_expr=$3} + path "=" expr { + let region = cover (path_to_region $1) (expr_to_region $3) + and value = {field_path=$1; assignment=$2; field_expr=$3} in {region; value} } fun_call: @@ -1010,8 +1001,8 @@ arguments: par(nsepseq(expr,",")) { $1 } list_expr: - injection("list",expr) { EListComp $1 } -| "nil" { ENil $1 } + injection("list",expr) { EListComp ($1 (fun region -> InjList region)) } +| "nil" { ENil $1 } (* Patterns *) @@ -1034,9 +1025,10 @@ core_pattern: | constr_pattern { PConstr $1 } list_pattern: - injection("list",core_pattern) { PListComp $1 } -| "nil" { PNil $1 } + "nil" { PNil $1 } | par(cons_pattern) { PParCons $1 } +| injection("list",core_pattern) { + PListComp ($1 (fun region -> InjList region)) } cons_pattern: core_pattern "#" pattern { $1,$2,$3 } diff --git a/src/passes/01-parser/pascaligo/ParserLog.ml b/src/passes/01-parser/pascaligo/ParserLog.ml index ba3914de4..3ae039e8e 100644 --- a/src/passes/01-parser/pascaligo/ParserLog.ml +++ b/src/passes/01-parser/pascaligo/ParserLog.ml @@ -27,11 +27,11 @@ let mk_state ~offsets ~mode ~buffer = val pad_node = "" method pad_node = pad_node - (** The method [pad] updates the current padding, which is - comprised of two components: the padding to reach the new node - (space before reaching a subtree, then a vertical bar for it) - and the padding for the new node itself (Is it the last child - of its parent?). + (* The method [pad] updates the current padding, which is + comprised of two components: the padding to reach the new node + (space before reaching a subtree, then a vertical bar for it) + and the padding for the new node itself (Is it the last child + of its parent?). *) method pad arity rank = {< pad_path = @@ -44,7 +44,7 @@ let mk_state ~offsets ~mode ~buffer = let compact state (region: Region.t) = region#compact ~offsets:state#offsets state#mode -(** {1 Printing the tokens with their source regions} *) +(* Printing the tokens with their source regions *) let print_nsepseq : state -> string -> (state -> 'a -> unit) -> @@ -117,7 +117,7 @@ let rec print_tokens state ast = print_token state eof "EOF" and print_attr_decl state = - print_ne_injection state "attributes" print_string + print_ne_injection state print_string and print_decl state = function TypeDecl decl -> print_type_decl state decl @@ -153,7 +153,7 @@ and print_type_expr state = function | TFun type_fun -> print_type_fun state type_fun | TPar par_type -> print_par_type state par_type | TVar type_var -> print_var state type_var -| TStringLiteral s -> print_string state s +| TString str -> print_string state str and print_cartesian state {value; _} = print_nsepseq state "*" print_type_expr value @@ -170,8 +170,8 @@ and print_variant state ({value; _}: variant reg) = and print_sum_type state {value; _} = print_nsepseq state "|" print_variant value -and print_record_type state record_type = - print_ne_injection state "record" print_field_decl record_type +and print_record_type state = + print_ne_injection state print_field_decl and print_type_app state {value; _} = let type_name, type_tuple = value in @@ -180,9 +180,9 @@ and print_type_app state {value; _} = and print_type_fun state {value; _} = let type_expr_a, arrow, type_expr_b = value in - print_type_expr state type_expr_a; - print_token state arrow "->"; - print_type_expr state type_expr_b + print_type_expr state type_expr_a; + print_token state arrow "->"; + print_type_expr state type_expr_b and print_par_type state {value; _} = let {lpar; inside; rpar} = value in @@ -206,12 +206,12 @@ and print_fun_decl state {value; _} = let {kwd_function; fun_name; param; colon; ret_type; kwd_is; block_with; return; terminator; _} = value in - print_token state kwd_function "function"; - print_var state fun_name; - print_parameters state param; - print_token state colon ":"; - print_type_expr state ret_type; - print_token state kwd_is "is"; + print_token state kwd_function "function"; + print_var state fun_name; + print_parameters state param; + print_token state colon ":"; + print_type_expr state ret_type; + print_token state kwd_is "is"; (match block_with with None -> () | Some (block, kwd_with) -> @@ -221,15 +221,14 @@ and print_fun_decl state {value; _} = print_terminator state terminator; and print_fun_expr state {value; _} = - let {kwd_recursive; kwd_function; param; colon; + let {kwd_function; param; colon; ret_type; kwd_is; return} : fun_expr = value in - print_token_opt state kwd_recursive "recursive"; - print_token state kwd_function "function"; - print_parameters state param; - print_token state colon ":"; - print_type_expr state ret_type; - print_token state kwd_is "is"; - print_expr state return + print_token state kwd_function "function"; + print_parameters state param; + print_token state colon ":"; + print_type_expr state ret_type; + print_token state kwd_is "is"; + print_expr state return and print_parameters state {value; _} = let {lpar; inside; rpar} = value in @@ -256,22 +255,19 @@ and print_param_var state {value; _} = print_type_expr state param_type and print_block state block = - let {opening; statements; terminator; closing} = block.value in - print_block_opening state opening; - print_statements state statements; - print_terminator state terminator; - print_block_closing state closing - -and print_block_opening state = function - Block (kwd_block, lbrace) -> - print_token state kwd_block "block"; - print_token state lbrace "{" -| Begin kwd_begin -> - print_token state kwd_begin "begin" - -and print_block_closing state = function - Block rbrace -> print_token state rbrace "}" -| End kwd_end -> print_token state kwd_end "end" + let {enclosing; statements; terminator} = block.value in + match enclosing with + Block (kwd_block, lbrace, rbrace) -> + print_token state kwd_block "block"; + print_token state lbrace "{"; + print_statements state statements; + print_terminator state terminator; + print_token state rbrace "}" + | BeginEnd (kwd_begin, kwd_end) -> + print_token state kwd_begin "begin"; + print_statements state statements; + print_terminator state terminator; + print_token state kwd_end "end" and print_data_decl state = function LocalConst decl -> print_const_decl state decl @@ -344,14 +340,20 @@ and print_clause_block state = function print_token state rbrace "}" and print_case_instr state (node : if_clause case) = - let {kwd_case; expr; opening; - lead_vbar; cases; closing} = node in + let {kwd_case; expr; kwd_of; enclosing; lead_vbar; cases} = node in print_token state kwd_case "case"; print_expr state expr; - print_opening state "of" opening; - print_token_opt state lead_vbar "|"; - print_cases_instr state cases; - print_closing state closing + print_token state kwd_of "of"; + match enclosing with + Brackets (lbracket, rbracket) -> + print_token state lbracket "["; + print_token_opt state lead_vbar "|"; + print_cases_instr state cases; + print_token state rbracket "]" + | End kwd_end -> + print_token_opt state lead_vbar "|"; + print_cases_instr state cases; + print_token state kwd_end "end" and print_token_opt state = function None -> fun _ -> () @@ -393,19 +395,16 @@ and print_for_loop state = function | ForCollect for_collect -> print_for_collect state for_collect and print_for_int state ({value; _} : for_int reg) = - let {kwd_for; assign; kwd_to; bound; kwd_step; step; block} = value in + let {kwd_for; assign; kwd_to; bound; step; block} = value in print_token state kwd_for "for"; print_var_assign state assign; print_token state kwd_to "to"; print_expr state bound; - match kwd_step with - | None -> (); - | Some kwd_step -> - print_token state kwd_step "step"; - match step with - | None -> (); - | Some step -> - print_expr state step; + (match step with + None -> (); + | Some (kwd_step, expr) -> + print_token state kwd_step "step"; + print_expr state expr); print_block state block and print_var_assign state {value; _} = @@ -461,19 +460,27 @@ and print_expr state = function | EPar e -> print_par_expr state e | EFun e -> print_fun_expr state e -and print_annot_expr state (expr , type_expr) = +and print_annot_expr state node = + let {inside; _} : annot_expr par = node in + let expr, _, type_expr = inside in print_expr state expr; print_type_expr state type_expr and print_case_expr state (node : expr case) = - let {kwd_case; expr; opening; - lead_vbar; cases; closing} = node in + let {kwd_case; expr; kwd_of; enclosing; lead_vbar; cases} = node in print_token state kwd_case "case"; print_expr state expr; - print_opening state "of" opening; - print_token_opt state lead_vbar "|"; - print_cases_expr state cases; - print_closing state closing + print_token state kwd_of "of"; + match enclosing with + Brackets (lbracket, rbracket) -> + print_token state lbracket "["; + print_token_opt state lead_vbar "|"; + print_cases_expr state cases; + print_token state rbracket "]" + | End kwd_end -> + print_token_opt state lead_vbar "|"; + print_cases_expr state cases; + print_token state kwd_end "end" and print_cases_expr state {value; _} = print_nsepseq state "|" print_case_clause_expr value @@ -486,11 +493,11 @@ and print_case_clause_expr state {value; _} = and print_map_expr state = function MapLookUp {value; _} -> print_map_lookup state value -| MapInj inj -> print_injection state "map" print_binding inj -| BigMapInj inj -> print_injection state "big_map" print_binding inj +| MapInj inj -> print_injection state print_binding inj +| BigMapInj inj -> print_injection state print_binding inj and print_set_expr state = function - SetInj inj -> print_injection state "set" print_expr inj + SetInj inj -> print_injection state print_expr inj | SetMem mem -> print_set_membership state mem and print_set_membership state {value; _} = @@ -600,7 +607,7 @@ and print_list_expr state = function print_expr state arg1; print_token state op "#"; print_expr state arg2 -| EListComp e -> print_injection state "list" print_expr e +| EListComp e -> print_injection state print_expr e | ENil e -> print_nil state e and print_constr_expr state = function @@ -608,27 +615,26 @@ and print_constr_expr state = function | NoneExpr e -> print_none_expr state e | ConstrApp e -> print_constr_app state e -and print_record_expr state e = - print_ne_injection state "record" print_field_assign e +and print_record_expr state = + print_ne_injection state print_field_assignment -and print_field_assign state {value; _} = - let {field_name; equal; field_expr} = value in +and print_field_assignment state {value; _} = + let {field_name; assignment; field_expr} = value in print_var state field_name; - print_token state equal "="; + print_token state assignment "="; print_expr state field_expr -and print_field_path_assign state {value; _} = - let {field_path; equal; field_expr} = value in - print_nsepseq state "field_path" print_selection field_path; - print_token state equal "="; +and print_field_path_assignment state {value; _} = + let {field_path; assignment; field_expr} = value in + print_path state field_path; + print_token state assignment "="; print_expr state field_expr and print_update_expr state {value; _} = let {record; kwd_with; updates} = value in print_path state record; print_token state kwd_with "with"; - print_ne_injection state "updates field" print_field_path_assign updates - + print_ne_injection state print_field_path_assignment updates and print_projection state {value; _} = let {struct_name; selector; field_path} = value in @@ -648,21 +654,21 @@ and print_record_patch state node = print_token state kwd_patch "patch"; print_path state path; print_token state kwd_with "with"; - print_ne_injection state "record" print_field_assign record_inj + print_ne_injection state print_field_assignment record_inj and print_set_patch state node = let {kwd_patch; path; kwd_with; set_inj} = node in print_token state kwd_patch "patch"; print_path state path; print_token state kwd_with "with"; - print_ne_injection state "set" print_expr set_inj + print_ne_injection state print_expr set_inj and print_map_patch state node = let {kwd_patch; path; kwd_with; map_inj} = node in print_token state kwd_patch "patch"; print_path state path; print_token state kwd_with "with"; - print_ne_injection state "map" print_binding map_inj + print_ne_injection state print_binding map_inj and print_map_remove state node = let {kwd_remove; key; kwd_from; kwd_map; map} = node in @@ -681,35 +687,48 @@ and print_set_remove state node = print_path state set and print_injection : - 'a.state -> string -> (state -> 'a -> unit) -> - 'a injection reg -> unit = - fun state kwd print {value; _} -> - let {opening; elements; terminator; closing} = value in - print_opening state kwd opening; - print_sepseq state ";" print elements; - print_terminator state terminator; - print_closing state closing + 'a.state -> (state -> 'a -> unit) -> 'a injection reg -> unit = + fun state print {value; _} -> + let {kind; enclosing; elements; terminator} = value in + print_injection_kwd state kind; + match enclosing with + Brackets (lbracket, rbracket) -> + print_token state lbracket "["; + print_sepseq state ";" print elements; + print_terminator state terminator; + print_token state rbracket "]" + | End kwd_end -> + print_sepseq state ";" print elements; + print_terminator state terminator; + print_token state kwd_end "end" + +and print_injection_kwd state = function + InjSet kwd_set -> print_token state kwd_set "set" +| InjMap kwd_map -> print_token state kwd_map "map" +| InjBigMap kwd_big_map -> print_token state kwd_big_map "big_map" +| InjList kwd_list -> print_token state kwd_list "list" and print_ne_injection : - 'a.state -> string -> (state -> 'a -> unit) -> - 'a ne_injection reg -> unit = - fun state kwd print {value; _} -> - let {opening; ne_elements; terminator; closing} = value in - print_opening state kwd opening; - print_nsepseq state ";" print ne_elements; - print_terminator state terminator; - print_closing state closing + 'a.state -> (state -> 'a -> unit) -> 'a ne_injection reg -> unit = + fun state print {value; _} -> + let {kind; enclosing; ne_elements; terminator} = value in + print_ne_injection_kwd state kind; + match enclosing with + Brackets (lbracket, rbracket) -> + print_token state lbracket "["; + print_nsepseq state ";" print ne_elements; + print_terminator state terminator; + print_token state rbracket "]" + | End kwd_end -> + print_nsepseq state ";" print ne_elements; + print_terminator state terminator; + print_token state kwd_end "end" -and print_opening state lexeme = function - Kwd kwd -> - print_token state kwd lexeme -| KwdBracket (kwd, lbracket) -> - print_token state kwd lexeme; - print_token state lbracket "[" - -and print_closing state = function - RBracket rbracket -> print_token state rbracket "]" -| End kwd_end -> print_token state kwd_end "end" +and print_ne_injection_kwd state = function + NEInjAttr kwd_attributes -> print_token state kwd_attributes "attributes" +| NEInjSet kwd_set -> print_token state kwd_set "set" +| NEInjMap kwd_map -> print_token state kwd_map "map" +| NEInjRecord kwd_record -> print_token state kwd_record "record" and print_binding state {value; _} = let {source; arrow; image} = value in @@ -787,7 +806,7 @@ and print_patterns state {value; _} = and print_list_pattern state = function PListComp comp -> - print_injection state "list" print_pattern comp + print_injection state print_pattern comp | PNil kwd_nil -> print_token state kwd_nil "nil" | PParCons cons -> @@ -831,7 +850,7 @@ let pattern_to_string ~offsets ~mode = let instruction_to_string ~offsets ~mode = to_string ~offsets ~mode print_instruction -(** {1 Pretty-printing the AST} *) +(* Pretty-printing the AST *) let pp_ident state {value=name; region} = let reg = compact state region in @@ -842,12 +861,20 @@ let pp_node state name = let node = sprintf "%s%s\n" state#pad_path name in Buffer.add_string state#buffer node -let pp_string state = pp_ident state +let pp_string state {value=name; region} = + let reg = compact state region in + let node = sprintf "%s%S (%s)\n" state#pad_path name reg + in Buffer.add_string state#buffer node + +let pp_verbatim state {value=name; region} = + let reg = compact state region in + let node = sprintf "%s{|%s|} (%s)\n" state#pad_path name reg + in Buffer.add_string state#buffer node let pp_loc_node state name region = pp_ident state {value=name; region} -let rec pp_ast state {decl; _} = +let rec pp_cst state {decl; _} = let apply len rank = pp_declaration (state#pad len rank) in let decls = Utils.nseq_to_list decl in @@ -943,9 +970,9 @@ and pp_type_expr state = function field_decl.value in let fields = Utils.nsepseq_to_list value.ne_elements in List.iteri (List.length fields |> apply) fields -| TStringLiteral s -> - pp_node state "String"; - pp_string (state#pad 1 0) s +| TString s -> + pp_node state "TString"; + pp_string (state#pad 1 0) s and pp_cartesian state {value; _} = let apply len rank = @@ -1244,8 +1271,8 @@ and pp_projection state proj = List.iteri (apply len) selections and pp_update state update = - pp_path state update.record; - pp_ne_injection pp_field_path_assign state update.updates.value + pp_path (state#pad 2 0) update.record; + pp_ne_injection pp_field_path_assignment state update.updates.value and pp_selection state = function FieldName name -> @@ -1285,17 +1312,27 @@ and pp_for_loop state = function pp_for_collect state value and pp_for_int state for_int = + let {assign; bound; step; block; _} = for_int in + let arity = + match step with None -> 3 | Some _ -> 4 in let () = - let state = state#pad 3 0 in + let state = state#pad arity 0 in pp_node state ""; - pp_var_assign state for_int.assign.value in + pp_var_assign state assign.value in let () = - let state = state#pad 3 1 in + let state = state#pad arity 1 in pp_node state ""; - pp_expr (state#pad 1 0) for_int.bound in + pp_expr (state#pad 1 0) bound in let () = - let state = state#pad 3 2 in - let statements = for_int.block.value.statements in + match step with + None -> () + | Some (_, expr) -> + let state = state#pad arity 2 in + pp_node state ""; + pp_expr (state#pad 1 0) expr in + let () = + let state = state#pad arity (arity-1) in + let statements = block.value.statements in pp_node state ""; pp_statements state statements in () @@ -1318,10 +1355,10 @@ and pp_for_collect state collect = pp_collection (state#pad 2 0) collect.collection; pp_expr (state#pad 1 0) collect.expr in let () = - let state = state#pad 3 2 in - let statements = collect.block.value.statements in - pp_node state ""; - pp_statements state statements + let state = state#pad 3 2 in + let statements = collect.block.value.statements in + pp_node state ""; + pp_statements state statements in () and pp_collection state = function @@ -1343,18 +1380,18 @@ and pp_fun_call state (expr, args) = and pp_record_patch state patch = pp_path (state#pad 2 0) patch.path; - pp_ne_injection pp_field_assign state patch.record_inj.value + pp_ne_injection pp_field_assignment state patch.record_inj.value -and pp_field_assign state {value; _} = +and pp_field_assignment state {value; _} = pp_node state ""; pp_ident (state#pad 2 0) value.field_name; pp_expr (state#pad 2 1) value.field_expr -and pp_field_path_assign state {value; _} = - pp_node state ""; - let path = Utils.nsepseq_to_list value.field_path in - List.iter (pp_selection (state#pad 2 0)) path; - pp_expr (state#pad 2 1) value.field_expr +and pp_field_path_assignment state {value; _} = + let {field_path; field_expr; _} = value in + pp_node state ""; + pp_path (state#pad 2 0) field_path; + pp_expr (state#pad 2 1) field_expr and pp_map_patch state patch = pp_path (state#pad 2 0) patch.path; @@ -1403,7 +1440,7 @@ and pp_expr state = function pp_cond_expr state value | EAnnot {value; region} -> pp_loc_node state "EAnnot" region; - pp_annotated state value + pp_annotated state value.inside | ELogic e_logic -> pp_node state "ELogic"; pp_e_logic (state#pad 1 0) e_logic @@ -1424,7 +1461,7 @@ and pp_expr state = function pp_constr_expr (state#pad 1 0) e_constr | ERecord {value; region} -> pp_loc_node state "ERecord" region; - pp_ne_injection pp_field_assign state value + pp_ne_injection pp_field_assignment state value | EProj {value; region} -> pp_loc_node state "EProj" region; pp_projection state value @@ -1576,9 +1613,9 @@ and pp_string_expr state = function pp_string (state#pad 1 0) s | Verbatim v -> pp_node state "Verbatim"; - pp_string (state#pad 1 0) v + pp_verbatim (state#pad 1 0) v -and pp_annotated state (expr, t_expr) = +and pp_annotated state (expr, _, t_expr) = pp_expr (state#pad 2 0) expr; pp_type_expr (state#pad 2 1) t_expr diff --git a/src/passes/01-parser/pascaligo/ParserLog.mli b/src/passes/01-parser/pascaligo/ParserLog.mli index 955c1590b..7ae739571 100644 --- a/src/passes/01-parser/pascaligo/ParserLog.mli +++ b/src/passes/01-parser/pascaligo/ParserLog.mli @@ -33,5 +33,5 @@ val instruction_to_string : (** {1 Pretty-printing of AST nodes} *) -val pp_ast : state -> AST.t -> unit +val pp_cst : state -> AST.t -> unit val pp_expr : state -> AST.expr -> unit diff --git a/src/passes/01-parser/pascaligo/ParserMain.ml b/src/passes/01-parser/pascaligo/ParserMain.ml index beb0b4885..6158dc5da 100644 --- a/src/passes/01-parser/pascaligo/ParserMain.ml +++ b/src/passes/01-parser/pascaligo/ParserMain.ml @@ -22,7 +22,8 @@ module SubIO = ext : string; mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -36,6 +37,7 @@ module SubIO = method mode = IO.options#mode method cmd = IO.options#cmd method mono = IO.options#mono + method pretty = IO.options#pretty end let make = @@ -48,6 +50,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#pretty end module Parser = @@ -67,14 +70,28 @@ module ParserLog = module Lexer = Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(ParErr)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) let wrap = function - Stdlib.Ok _ -> flush_all () + Stdlib.Ok ast -> + if IO.options#pretty then + begin + let doc = Pretty.print ast in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + PPrint.ToChannel.pretty 1.0 width stdout doc; + print_newline () + end; + flush_all () | Error msg -> - (flush_all (); Printf.eprintf "\027[31m%s\027[0m%!" msg.Region.value) + begin + flush_all (); + Printf.eprintf "\027[31m%s\027[0m%!" msg.Region.value + end let () = match IO.options#input with diff --git a/src/passes/01-parser/pascaligo/Pretty.ml b/src/passes/01-parser/pascaligo/Pretty.ml new file mode 100644 index 000000000..4c52d071a --- /dev/null +++ b/src/passes/01-parser/pascaligo/Pretty.ml @@ -0,0 +1,632 @@ +[@@@warning "-42"] +[@@@warning "-27"] +[@@@warning "-26"] + +open AST +module Region = Simple_utils.Region +open! Region +open! PPrint + +let pp_par : ('a -> document) -> 'a par reg -> document = + fun printer {value; _} -> + string "(" ^^ nest 1 (printer value.inside ^^ string ")") + +let pp_brackets : ('a -> document) -> 'a brackets reg -> document = + fun printer {value; _} -> + string "[" ^^ nest 1 (printer value.inside ^^ string "]") + +let pp_braces : ('a -> document) -> 'a braces reg -> document = + fun printer {value; _} -> + string "{" ^^ nest 1 (printer value.inside ^^ string "}") + +let rec print ast = + let app decl = group (pp_declaration decl) in + let decl = Utils.nseq_to_list ast.decl in + separate_map (hardline ^^ hardline) app decl + +and pp_declaration = function + TypeDecl d -> pp_type_decl d +| ConstDecl d -> pp_const_decl d +| FunDecl d -> pp_fun_decl d +| AttrDecl d -> pp_attr_decl d + +and pp_attr_decl decl = pp_ne_injection pp_string decl + +and pp_const_decl {value; _} = + let {name; const_type; init; attributes; _} = value in + let start = string ("const " ^ name.value) in + let t_expr = pp_type_expr const_type in + let attr = match attributes with + None -> empty + | Some a -> hardline ^^ pp_attr_decl a in + group (start ^/^ nest 2 (string ": " ^^ t_expr)) + ^^ group (break 1 ^^ nest 2 (string "= " ^^ pp_expr init)) + ^^ attr + +(* Type declarations *) + +and pp_type_decl decl = + let {name; type_expr; _} = decl.value in + string "type " ^^ string name.value ^^ string " is" + ^^ group (nest 2 (break 1 ^^ pp_type_expr type_expr)) + +and pp_type_expr = function + TProd t -> pp_cartesian t +| TSum t -> pp_variants t +| TRecord t -> pp_fields t +| TApp t -> pp_type_app t +| TFun t -> pp_fun_type t +| TPar t -> pp_type_par t +| TVar t -> pp_ident t +| TString s -> pp_string s + +and pp_cartesian {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string " *") ^^ app items + in pp_type_expr head ^^ string " *" ^^ app (List.map snd tail) + +and pp_variants {value; _} = + let head, tail = value in + let head = pp_variant head in + let head = if tail = [] then head + else ifflat head (string " " ^^ head) in + let rest = List.map snd tail in + let app variant = break 1 ^^ string "| " ^^ pp_variant variant + in head ^^ concat_map app rest + +and pp_variant {value; _} = + let {constr; arg} = value in + match arg with + None -> pp_ident constr + | Some (_, e) -> + prefix 4 1 (pp_ident constr ^^ string " of") (pp_type_expr e) + +and pp_fields fields = pp_ne_injection pp_field_decl fields + +and pp_field_decl {value; _} = + let {field_name; field_type; _} = value in + let name = pp_ident field_name in + let t_expr = pp_type_expr field_type + in prefix 2 1 (name ^^ string " :") t_expr + +and pp_fun_type {value; _} = + let lhs, _, rhs = value in + group (pp_type_expr lhs ^^ string " ->" ^/^ pp_type_expr rhs) + +and pp_type_par t = pp_par pp_type_expr t + +and pp_type_app {value = ctor, tuple; _} = + prefix 2 1 (pp_type_constr ctor) (pp_type_tuple tuple) + +and pp_type_constr ctor = string ctor.value + +and pp_type_tuple {value; _} = + let head, tail = value.inside in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string ",") ^^ app items in + let components = + if tail = [] + then pp_type_expr head + else pp_type_expr head ^^ string "," ^^ app (List.map snd tail) + in string "(" ^^ nest 1 (components ^^ string ")") + +(* Function and procedure declarations *) + +and pp_fun_expr {value; _} = + let {param; ret_type; return; _} : fun_expr = value in + let start = string "function" in + let parameters = pp_par pp_parameters param in + let return_t = pp_type_expr ret_type in + let expr = pp_expr return in + group (start ^^ nest 2 (break 1 ^^ parameters)) + ^^ group (break 1 ^^ nest 2 (string ": " ^^ return_t)) + ^^ string " is" ^^ group (nest 4 (break 1 ^^ expr)) + +and pp_fun_decl {value; _} = + let {kwd_recursive; fun_name; param; + ret_type; block_with; return; attributes; _} = value in + let start = + match kwd_recursive with + None -> string "function" + | Some _ -> string "recursive" ^/^ string "function" in + let start = start ^^ group (break 1 ^^ nest 2 (pp_ident fun_name)) in + let parameters = pp_par pp_parameters param in + let return_t = pp_type_expr ret_type in + let expr = pp_expr return in + let body = + match block_with with + None -> group (nest 2 (break 1 ^^ expr)) + | Some (b,_) -> hardline ^^ pp_block b ^^ string " with" + ^^ group (nest 4 (break 1 ^^ expr)) + and attr = + match attributes with + None -> empty + | Some a -> hardline ^^ pp_attr_decl a in + prefix 2 1 start parameters + ^^ group (nest 2 (break 1 ^^ string ": " ^^ nest 2 return_t ^^ string " is")) + ^^ body ^^ attr + +and pp_parameters p = pp_nsepseq ";" pp_param_decl p + +and pp_param_decl = function + ParamConst c -> pp_param_const c +| ParamVar v -> pp_param_var v + +and pp_param_const {value; _} = + let {var; param_type; _} : param_const = value in + let name = string ("const " ^ var.value) in + let t_expr = pp_type_expr param_type + in prefix 2 1 (name ^^ string " :") t_expr + +and pp_param_var {value; _} = + let {var; param_type; _} : param_var = value in + let name = string ("var " ^ var.value) in + let t_expr = pp_type_expr param_type + in prefix 2 1 (name ^^ string " :") t_expr + +and pp_block {value; _} = + string "block {" + ^^ nest 2 (hardline ^^ pp_statements value.statements) + ^^ hardline ^^ string "}" + +and pp_statements s = pp_nsepseq ";" pp_statement s + +and pp_statement = function + Instr s -> pp_instruction s +| Data s -> pp_data_decl s +| Attr s -> pp_attr_decl s + +and pp_data_decl = function + LocalConst d -> pp_const_decl d +| LocalVar d -> pp_var_decl d +| LocalFun d -> pp_fun_decl d + +and pp_var_decl {value; _} = + let {name; var_type; init; _} = value in + let start = string ("var " ^ name.value) in + let t_expr = pp_type_expr var_type in + group (start ^/^ nest 2 (string ": " ^^ t_expr)) + ^^ group (break 1 ^^ nest 2 (string ":= " ^^ pp_expr init)) + +and pp_instruction = function + Cond i -> group (pp_conditional i) +| CaseInstr i -> pp_case pp_if_clause i +| Assign i -> pp_assignment i +| Loop i -> pp_loop i +| ProcCall i -> pp_fun_call i +| Skip _ -> string "skip" +| RecordPatch i -> pp_record_patch i +| MapPatch i -> pp_map_patch i +| SetPatch i -> pp_set_patch i +| MapRemove i -> pp_map_remove i +| SetRemove i -> pp_set_remove i + +and pp_set_remove {value; _} = + let {element; set; _} : set_remove = value in + string "remove" ^^ group (nest 2 (break 1 ^^ pp_expr element)) + ^^ group (break 1 ^^ prefix 2 1 (string "from set") (pp_path set)) + +and pp_map_remove {value; _} = + let {key; map; _} = value in + string "remove" ^^ group (nest 2 (break 1 ^^ pp_expr key)) + ^^ group (break 1 ^^ prefix 2 1 (string "from map") (pp_path map)) + +and pp_set_patch {value; _} = + let {path; set_inj; _} = value in + let inj = pp_ne_injection pp_expr set_inj in + string "patch" + ^^ group (nest 2 (break 1 ^^ pp_path path) ^/^ string "with") + ^^ group (nest 2 (break 1 ^^ inj)) + +and pp_map_patch {value; _} = + let {path; map_inj; _} = value in + let inj = pp_ne_injection pp_binding map_inj in + string "patch" + ^^ group (nest 2 (break 1 ^^ pp_path path) ^/^ string "with") + ^^ group (nest 2 (break 1 ^^ inj)) + +and pp_binding {value; _} = + let {source; image; _} = value in + pp_expr source + ^^ string " ->" ^^ group (nest 2 (break 1 ^^ pp_expr image)) + +and pp_record_patch {value; _} = + let {path; record_inj; _} = value in + let inj = pp_record record_inj in + string "patch" + ^^ group (nest 2 (break 1 ^^ pp_path path) ^/^ string "with") + ^^ group (nest 2 (break 1 ^^ inj)) + +and pp_cond_expr {value; _} = + let {test; ifso; ifnot; _} : cond_expr = value in + let test = string "if " ^^ group (nest 3 (pp_expr test)) + and ifso = string "then" ^^ group (nest 2 (break 1 ^^ pp_expr ifso)) + and ifnot = string "else" ^^ group (nest 2 (break 1 ^^ pp_expr ifnot)) + in test ^/^ ifso ^/^ ifnot + +and pp_conditional {value; _} = + let {test; ifso; ifnot; _} : conditional = value in + let test = string "if " ^^ group (nest 3 (pp_expr test)) + and ifso = match ifso with + ClauseInstr _ | ClauseBlock LongBlock _ -> + string "then" + ^^ group (nest 2 (break 1 ^^ pp_if_clause ifso)) + | ClauseBlock ShortBlock _ -> + string "then {" + ^^ group (nest 2 (hardline ^^ pp_if_clause ifso)) + ^^ hardline ^^ string "}" + and ifnot = match ifnot with + ClauseInstr _ | ClauseBlock LongBlock _ -> + string "else" + ^^ group (nest 2 (break 1 ^^ pp_if_clause ifnot)) + | ClauseBlock ShortBlock _ -> + string "else {" + ^^ group (nest 2 (hardline ^^ pp_if_clause ifnot)) + ^^ hardline ^^ string "}" + in test ^/^ ifso ^/^ ifnot + +and pp_if_clause = function + ClauseInstr i -> pp_instruction i +| ClauseBlock b -> pp_clause_block b + +and pp_clause_block = function + LongBlock b -> pp_block b +| ShortBlock b -> Utils.(pp_statements <@ fst) b.value.inside + +and pp_set_membership {value; _} = + let {set; element; _} : set_membership = value in + group (pp_expr set ^/^ string "contains" ^/^ pp_expr element) + +and pp_case : 'a.('a -> document) -> 'a case Region.reg -> document = + fun printer {value; _} -> + let {expr; cases; _} = value in + group (string "case " ^^ nest 5 (pp_expr expr) ^/^ string "of [") + ^^ hardline ^^ pp_cases printer cases + ^^ hardline ^^ string "]" + +and pp_cases : + 'a.('a -> document) -> + ('a case_clause reg, vbar) Utils.nsepseq Region.reg -> + document = + fun printer {value; _} -> + let head, tail = value in + let head = pp_case_clause printer head in + let head = blank 2 ^^ head in + let rest = List.map snd tail in + let app clause = break 1 ^^ string "| " ^^ pp_case_clause printer clause + in head ^^ concat_map app rest + +and pp_case_clause : + 'a.('a -> document) -> 'a case_clause Region.reg -> document = + fun printer {value; _} -> + let {pattern; rhs; _} = value in + pp_pattern pattern ^^ prefix 4 1 (string " ->") (printer rhs) + +and pp_assignment {value; _} = + let {lhs; rhs; _} = value in + prefix 2 1 (pp_lhs lhs ^^ string " :=") (pp_expr rhs) + +and pp_lhs : lhs -> document = function + Path p -> pp_path p +| MapPath p -> pp_map_lookup p + +and pp_loop = function + While l -> pp_while_loop l +| For f -> pp_for_loop f + +and pp_while_loop {value; _} = + let {cond; block; _} = value in + prefix 2 1 (string "while") (pp_expr cond) ^^ hardline ^^ pp_block block + +and pp_for_loop = function + ForInt l -> pp_for_int l +| ForCollect l -> pp_for_collect l + +and pp_for_int {value; _} = + let {assign; bound; step; block; _} = value in + let step = + match step with + None -> empty + | Some (_, e) -> prefix 2 1 (string " step") (pp_expr e) in + prefix 2 1 (string "for") (pp_var_assign assign) + ^^ prefix 2 1 (string " to") (pp_expr bound) + ^^ step ^^ hardline ^^ pp_block block + +and pp_var_assign {value; _} = + let {name; expr; _} = value in + prefix 2 1 (pp_ident name ^^ string " :=") (pp_expr expr) + +and pp_for_collect {value; _} = + let {var; bind_to; collection; expr; block; _} = value in + let binding = + match bind_to with + None -> pp_ident var + | Some (_, dest) -> pp_ident var ^^ string " -> " ^^ pp_ident dest in + prefix 2 1 (string "for") binding + ^^ prefix 2 1 (string " in") (pp_collection collection ^/^ pp_expr expr) + ^^ hardline ^^ pp_block block + +and pp_collection = function + Map _ -> string "map" +| Set _ -> string "set" +| List _ -> string "list" + +(* Expressions *) + +and pp_expr = function + ECase e -> pp_case pp_expr e +| ECond e -> group (pp_cond_expr e) +| EAnnot e -> pp_annot_expr e +| ELogic e -> group (pp_logic_expr e) +| EArith e -> group (pp_arith_expr e) +| EString e -> pp_string_expr e +| EList e -> group (pp_list_expr e) +| ESet e -> pp_set_expr e +| EConstr e -> pp_constr_expr e +| ERecord e -> pp_record e +| EProj e -> pp_projection e +| EUpdate e -> pp_update e +| EMap e -> pp_map_expr e +| EVar e -> pp_ident e +| ECall e -> pp_fun_call e +| EBytes e -> pp_bytes e +| EUnit _ -> string "Unit" +| ETuple e -> pp_tuple_expr e +| EPar e -> pp_par pp_expr e +| EFun e -> pp_fun_expr e + +and pp_annot_expr {value; _} = + let expr, _, type_expr = value.inside in + group (string "(" ^^ nest 1 (pp_expr expr ^/^ string ": " + ^^ pp_type_expr type_expr ^^ string ")")) + +and pp_set_expr = function + SetInj inj -> pp_injection pp_expr inj +| SetMem mem -> pp_set_membership mem + +and pp_map_expr = function + MapLookUp fetch -> pp_map_lookup fetch +| MapInj inj -> pp_injection pp_binding inj +| BigMapInj inj -> pp_injection pp_binding inj + +and pp_map_lookup {value; _} = + prefix 2 1 (pp_path value.path) (pp_brackets pp_expr value.index) + +and pp_path = function + Name v -> pp_ident v +| Path p -> pp_projection p + +and pp_logic_expr = function + BoolExpr e -> pp_bool_expr e +| CompExpr e -> pp_comp_expr e + +and pp_bool_expr = function + Or e -> pp_bin_op "or" e +| And e -> pp_bin_op "and" e +| Not e -> pp_un_op "not" e +| True _ -> string "True" +| False _ -> string "False" + +and pp_bin_op op {value; _} = + let {arg1; arg2; _} = value + and length = String.length op + 1 in + pp_expr arg1 ^/^ string (op ^ " ") ^^ nest length (pp_expr arg2) + +and pp_un_op op {value; _} = + string (op ^ " ") ^^ pp_expr value.arg + +and pp_comp_expr = function + Lt e -> pp_bin_op "<" e +| Leq e -> pp_bin_op "<=" e +| Gt e -> pp_bin_op ">" e +| Geq e -> pp_bin_op ">=" e +| Equal e -> pp_bin_op "=" e +| Neq e -> pp_bin_op "=/=" e + +and pp_arith_expr = function + Add e -> pp_bin_op "+" e +| Sub e -> pp_bin_op "-" e +| Mult e -> pp_bin_op "*" e +| Div e -> pp_bin_op "/" e +| Mod e -> pp_bin_op "mod" e +| Neg e -> string "-" ^^ pp_expr e.value.arg +| Int e -> pp_int e +| Nat e -> pp_nat e +| Mutez e -> pp_mutez e + +and pp_mutez {value; _} = + Z.to_string (snd value) ^ "mutez" |> string + +and pp_string_expr = function + Cat e -> pp_bin_op "^" e +| String e -> pp_string e +| Verbatim e -> pp_verbatim e + +and pp_ident {value; _} = string value + +and pp_string s = string "\"" ^^ pp_ident s ^^ string "\"" + +and pp_verbatim s = string "{|" ^^ pp_ident s ^^ string "|}" + +and pp_list_expr = function + ECons e -> pp_bin_op "#" e +| EListComp e -> pp_injection pp_expr e +| ENil _ -> string "nil" + +and pp_constr_expr = function + SomeApp a -> pp_some_app a +| NoneExpr _ -> string "None" +| ConstrApp a -> pp_constr_app a + +and pp_some_app {value; _} = + prefix 4 1 (string "Some") (pp_arguments (snd value)) + +and pp_constr_app {value; _} = + let constr, args = value in + let constr = string constr.value in + match args with + None -> constr + | Some tuple -> prefix 2 1 constr (pp_tuple_expr tuple) + + +and pp_field_assign {value; _} = + let {field_name; field_expr; _} = value in + prefix 2 1 (pp_ident field_name ^^ string " =") (pp_expr field_expr) + +and pp_record ne_inj = group (pp_ne_injection pp_field_assign ne_inj) + +and pp_projection {value; _} = + let {struct_name; field_path; _} = value in + let fields = Utils.nsepseq_to_list field_path + and sep = string "." ^^ break 0 in + let fields = separate_map sep pp_selection fields in + group (pp_ident struct_name ^^ string "." ^^ break 0 ^^ fields) + +and pp_update {value; _} = + let {record; updates; _} = value in + let updates = group (pp_ne_injection pp_field_path_assign updates) + and record = pp_path record in + record ^^ string " with" ^^ nest 2 (break 1 ^^ updates) + +and pp_field_path_assign {value; _} = + let {field_path; field_expr; _} = value in + let path = pp_path field_path in + prefix 2 1 (path ^^ string " =") (pp_expr field_expr) + +and pp_selection = function + FieldName v -> string v.value +| Component cmp -> cmp.value |> snd |> Z.to_string |> string + +and pp_tuple_expr {value; _} = + let head, tail = value.inside in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_expr e) + | e::items -> + group (break 1 ^^ pp_expr e ^^ string ",") ^^ app items in + let components = + if tail = [] + then pp_expr head + else pp_expr head ^^ string "," ^^ app (List.map snd tail) + in string "(" ^^ nest 1 (components ^^ string ")") + +and pp_fun_call {value; _} = + let lambda, arguments = value in + let arguments = pp_tuple_expr arguments in + group (pp_expr lambda ^^ nest 2 (break 1 ^^ arguments)) + +and pp_arguments v = pp_tuple_expr v + +(* Injections *) + +and pp_injection : + 'a.('a -> document) -> 'a injection reg -> document = + fun printer {value; _} -> + let {kind; elements; _} = value in + let sep = string ";" ^^ break 1 in + let elements = Utils.sepseq_to_list elements in + let elements = separate_map sep printer elements in + let kwd = pp_injection_kwd kind in + group (string (kwd ^ " [") + ^^ nest 2 (break 0 ^^ elements) ^^ break 0 ^^ string "]") + +and pp_injection_kwd = function + InjSet _ -> "set" +| InjMap _ -> "map" +| InjBigMap _ -> "big_map" +| InjList _ -> "list" + +and pp_ne_injection : + 'a.('a -> document) -> 'a ne_injection reg -> document = + fun printer {value; _} -> + let {kind; ne_elements; _} = value in + let elements = pp_nsepseq ";" printer ne_elements in + let kwd = pp_ne_injection_kwd kind in + group (string (kwd ^ " [") + ^^ group (nest 2 (break 0 ^^ elements )) + ^^ break 0 ^^ string "]") + +and pp_ne_injection_kwd = function + NEInjAttr _ -> "attributes" +| NEInjSet _ -> "set" +| NEInjMap _ -> "map" +| NEInjRecord _ -> "record" + +and pp_nsepseq : + 'a.string -> ('a -> document) -> ('a, t) Utils.nsepseq -> document = + fun sep printer elements -> + let elems = Utils.nsepseq_to_list elements + and sep = string sep ^^ break 1 + in separate_map sep printer elems + +(* Patterns *) + +and pp_pattern = function + PConstr p -> pp_constr_pattern p +| PVar v -> pp_ident v +| PWild _ -> string "_" +| PInt i -> pp_int i +| PNat n -> pp_nat n +| PBytes b -> pp_bytes b +| PString s -> pp_string s +| PList l -> pp_list_pattern l +| PTuple t -> pp_tuple_pattern t + +and pp_int {value; _} = + string (Z.to_string (snd value)) + +and pp_nat {value; _} = + string (Z.to_string (snd value) ^ "n") + +and pp_bytes {value; _} = + string ("0x" ^ Hex.show (snd value)) + +and pp_constr_pattern = function + PUnit _ -> string "Unit" +| PFalse _ -> string "False" +| PTrue _ -> string "True" +| PNone _ -> string "None" +| PSomeApp a -> pp_psome a +| PConstrApp a -> pp_pconstr_app a + +and pp_psome {value=_, p; _} = + prefix 4 1 (string "Some") (pp_par pp_pattern p) + +and pp_pconstr_app {value; _} = + match value with + constr, None -> pp_ident constr + | constr, Some ptuple -> + prefix 4 1 (pp_ident constr) (pp_tuple_pattern ptuple) + +and pp_tuple_pattern {value; _} = + let head, tail = value.inside in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_pattern e) + | e::items -> + group (break 1 ^^ pp_pattern e ^^ string ",") ^^ app items in + let components = + if tail = [] + then pp_pattern head + else pp_pattern head ^^ string "," ^^ app (List.map snd tail) + in string "(" ^^ nest 1 (components ^^ string ")") + +and pp_list_pattern = function + PListComp cmp -> pp_list_comp cmp +| PNil _ -> string "nil" +| PParCons p -> pp_ppar_cons p +| PCons p -> nest 4 (pp_nsepseq " #" pp_pattern p.value) + +and pp_list_comp e = pp_injection pp_pattern e + +and pp_ppar_cons {value; _} = + let patt1, _, patt2 = value.inside in + let comp = prefix 2 1 (pp_pattern patt1 ^^ string " ::") (pp_pattern patt2) + in string "(" ^^ nest 1 (comp ^^ string ")") diff --git a/src/passes/01-parser/pascaligo/Tests/pp.ligo b/src/passes/01-parser/pascaligo/Tests/pp.ligo index 2cd411592..2dd2563df 100644 --- a/src/passes/01-parser/pascaligo/Tests/pp.ligo +++ b/src/passes/01-parser/pascaligo/Tests/pp.ligo @@ -1,19 +1,23 @@ +function incr_map (const l : list (int)) : list (int) is + List.map (function (const i : int) : int is i + 1, l) + type t is timestamp * nat -> map (string, address) type u is A | B of t * int | C of int -> (string -> int) -type v is record a : t; b : record c : string end end +type v is record aaaaaa : ttttttt; bbbbbb : record ccccccccc : string end end function back (var store : store) : list (operation) * store is begin - var operations : list (operation) := list []; - const a : nat = 0n; - x0 := record foo = "1"; bar = 4n end; - x1 := nil; - x2 := list end; + var operations : list (operation) := list []; + const operations : list (operation) = list []; + const a : nat = 0n; + x0 := record foo = "1"; bar = 4n end; + x1 := nil; + x2 := list end; x3 := 3#4# list [5; 6]; case foo of 10n -> skip end; - if s contains x then skip else skip; +if saaa.0.1.2.a.b.b.x contains xxxxxxxxxxxxxxx[123] then skip else skip; s := set [3_000mutez; -2; 1n]; a := A; b := B (a); @@ -21,12 +25,12 @@ function back (var store : store) : list (operation) * store is d := None; e := Some (a, B (b)); z := z.1.2; - x := map [1 -> "1"; 2 -> "2"]; +x := if true then map [1 -> "1"; 2 -> "2"; 3 -> "3"; 4 -> "4"; 5 -> "5555555555555555"] else Unit; y := a.b.c[3]; a := "hello " ^ "world" ^ "!"; - r := record a = 0 end; - r := r with record a = 42 end; - patch store.backers with set [(1); f(2*3)]; + r := record aaaaaaaaaaaa = 100000000; bbbbbbb = ffffff (2, aa, x, y) + 1 end; + r := r with record aaaaaaaaaaa = 444442; bbbbbbbbb = 43 + f (z) / 234 end; + patch store.backers.8.aa.33333.5 with set [(1); f(2*3); 123124234/2345]; remove (1,2,3) from set foo.bar; remove 3 from map foo.bar; patch store.backers with map [sender -> amount]; @@ -39,7 +43,7 @@ function back (var store : store) : list (operation) * store is begin acc := 2 - (if toggle then f(x) else Unit); end; - for i := 1n to 10n + for i := 1n to 10n step 2n begin acc := acc + i; end; @@ -52,27 +56,32 @@ function back (var store : store) : list (operation) * store is | B (x, C (y,z)) -> skip | False#True#Unit#0xAA#"hi"#4#nil -> skip ] - end with (operations, store) + end with (operations, store, (more_stuff, and_here_too)) -function claim (var store : store) : list (operation) * store is + function claim (var store : store; const bar : t; const baz : u; var z : operations * store * (more_stuff * and_here_too)) : list (operation) * store * timestamp * nat -> map (string, address) is begin - var operations : list (operation) := nil; + const operations : list (operation * map (address, map (longname, domain))) = nilllllllllll; +var operations : list (operation * map (address, map (longname, domain))) := nilllllllllll; + attributes ["foo"; "inline"]; if now <= store.deadline then failwith ("Too soon.") else case store.backers[sender] of None -> failwith ("Not a backer.") + | Some (0) -> skip | Some (quantity) -> if balance >= store.goal or store.funded then failwith ("Goal reached: no refund.") else begin - operations.0.foo := list [transaction (unit, sender, quantity)]; - remove sender from map store.backers + operations.0.foo := list [transaction (unit, sender, quantity); transaction (foo, bar, bazzzzzzzzzzzzzzz)]; + remove sender.0099999.fffff [fiar (abaxxasfdf)] from map store.backers.foooooo.barrrrr.01.bazzzzzzz end end - end with (operations, store) + end with long_function_name (operations, store, (more_stuff, (and_here_too, well_in_here_too), hello)) + +attributes ["inline"; "foo"] function withdraw (var store : store) : list (operation) * store is begin diff --git a/src/passes/01-parser/pascaligo/dune b/src/passes/01-parser/pascaligo/dune index ca4865ae9..5b2f099ca 100644 --- a/src/passes/01-parser/pascaligo/dune +++ b/src/passes/01-parser/pascaligo/dune @@ -15,8 +15,10 @@ (name parser_pascaligo) (public_name ligo.parser.pascaligo) (modules - Scoping AST pascaligo Parser ParserLog LexToken ParErr) + Scoping AST pascaligo Parser ParserLog LexToken ParErr Pretty) (libraries + pprint + terminal_size menhirLib parser_shared hex diff --git a/src/passes/01-parser/pascaligo/error.messages.checked-in b/src/passes/01-parser/pascaligo/error.messages.checked-in index 9cb0d4994..3cad43084 100644 --- a/src/passes/01-parser/pascaligo/error.messages.checked-in +++ b/src/passes/01-parser/pascaligo/error.messages.checked-in @@ -1,6 +1,6 @@ interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End ## -## Ends in an error in state: 153. +## Ends in an error in state: 147. ## ## injection(BigMap,binding) -> BigMap LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -12,25 +12,25 @@ interactive_expr: BigMap LBRACKET Verbatim ARROW Bytes End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: BigMap LBRACKET With ## -## Ends in an error in state: 146. +## Ends in an error in state: 140. ## ## injection(BigMap,binding) -> BigMap LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(BigMap,binding) -> BigMap LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -43,7 +43,7 @@ interactive_expr: BigMap LBRACKET With interactive_expr: BigMap Verbatim ARROW Bytes RBRACKET ## -## Ends in an error in state: 256. +## Ends in an error in state: 257. ## ## injection(BigMap,binding) -> BigMap sep_or_term_list(binding,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -55,25 +55,25 @@ interactive_expr: BigMap Verbatim ARROW Bytes RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: BigMap With ## -## Ends in an error in state: 145. +## Ends in an error in state: 139. ## ## injection(BigMap,binding) -> BigMap . sep_or_term_list(binding,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(BigMap,binding) -> BigMap . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -88,7 +88,7 @@ interactive_expr: BigMap With interactive_expr: C_Some With ## -## Ends in an error in state: 141. +## Ends in an error in state: 135. ## ## core_expr -> C_Some . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -100,7 +100,7 @@ interactive_expr: C_Some With interactive_expr: Case Verbatim Of C_Some LPAR WILD With ## -## Ends in an error in state: 284. +## Ends in an error in state: 285. ## ## par(core_pattern) -> LPAR core_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -112,7 +112,7 @@ interactive_expr: Case Verbatim Of C_Some LPAR WILD With interactive_expr: Case Verbatim Of C_Some LPAR With ## -## Ends in an error in state: 276. +## Ends in an error in state: 277. ## ## par(core_pattern) -> LPAR . core_pattern RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -124,7 +124,7 @@ interactive_expr: Case Verbatim Of C_Some LPAR With interactive_expr: Case Verbatim Of C_Some With ## -## Ends in an error in state: 275. +## Ends in an error in state: 276. ## ## constr_pattern -> C_Some . par(core_pattern) [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -136,7 +136,7 @@ interactive_expr: Case Verbatim Of C_Some With interactive_expr: Case Verbatim Of Constr LPAR WILD With ## -## Ends in an error in state: 290. +## Ends in an error in state: 291. ## ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . COMMA nsepseq(core_pattern,COMMA) [ RPAR ] @@ -149,7 +149,7 @@ interactive_expr: Case Verbatim Of Constr LPAR WILD With interactive_expr: Case Verbatim Of Constr LPAR With ## -## Ends in an error in state: 274. +## Ends in an error in state: 275. ## ## par(nsepseq(core_pattern,COMMA)) -> LPAR . nsepseq(core_pattern,COMMA) RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -161,7 +161,7 @@ interactive_expr: Case Verbatim Of Constr LPAR With interactive_expr: Case Verbatim Of Constr With ## -## Ends in an error in state: 273. +## Ends in an error in state: 274. ## ## constr_pattern -> Constr . tuple_pattern [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -174,7 +174,7 @@ interactive_expr: Case Verbatim Of Constr With interactive_expr: Case Verbatim Of LBRACKET VBAR Block ## -## Ends in an error in state: 261. +## Ends in an error in state: 262. ## ## case(expr) -> Case expr Of LBRACKET option(VBAR) . cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -186,7 +186,7 @@ interactive_expr: Case Verbatim Of LBRACKET VBAR Block interactive_expr: Case Verbatim Of LBRACKET WILD ARROW Bytes End ## -## Ends in an error in state: 325. +## Ends in an error in state: 326. ## ## case(expr) -> Case expr Of LBRACKET option(VBAR) cases(expr) . RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -198,25 +198,25 @@ interactive_expr: Case Verbatim Of LBRACKET WILD ARROW Bytes End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 323, spurious reduction of production case_clause(expr) -> pattern ARROW expr -## In state 327, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) -## In state 324, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) +## In state 324, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 328, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 325, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) ## interactive_expr: Case Verbatim Of LBRACKET With ## -## Ends in an error in state: 260. +## Ends in an error in state: 261. ## ## case(expr) -> Case expr Of LBRACKET . option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -228,7 +228,7 @@ interactive_expr: Case Verbatim Of LBRACKET With interactive_expr: Case Verbatim Of LPAR WILD COMMA With ## -## Ends in an error in state: 291. +## Ends in an error in state: 292. ## ## nsepseq(core_pattern,COMMA) -> core_pattern COMMA . nsepseq(core_pattern,COMMA) [ RPAR ] ## @@ -240,7 +240,7 @@ interactive_expr: Case Verbatim Of LPAR WILD COMMA With interactive_expr: Case Verbatim Of LPAR WILD CONS Bytes ARROW ## -## Ends in an error in state: 303. +## Ends in an error in state: 304. ## ## par(cons_pattern) -> LPAR cons_pattern . RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -251,15 +251,15 @@ interactive_expr: Case Verbatim Of LPAR WILD CONS Bytes ARROW ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 297, spurious reduction of production pattern -> core_pattern -## In state 296, spurious reduction of production cons_pattern -> core_pattern CONS pattern +## In state 298, spurious reduction of production pattern -> core_pattern +## In state 297, spurious reduction of production cons_pattern -> core_pattern CONS pattern ## interactive_expr: Case Verbatim Of LPAR WILD CONS With ## -## Ends in an error in state: 295. +## Ends in an error in state: 296. ## ## cons_pattern -> core_pattern CONS . pattern [ RPAR ] ## @@ -271,7 +271,7 @@ interactive_expr: Case Verbatim Of LPAR WILD CONS With interactive_expr: Case Verbatim Of LPAR WILD With ## -## Ends in an error in state: 294. +## Ends in an error in state: 295. ## ## cons_pattern -> core_pattern . CONS pattern [ RPAR ] ## nsepseq(core_pattern,COMMA) -> core_pattern . [ RPAR ] @@ -285,7 +285,7 @@ interactive_expr: Case Verbatim Of LPAR WILD With interactive_expr: Case Verbatim Of LPAR With ## -## Ends in an error in state: 269. +## Ends in an error in state: 270. ## ## par(cons_pattern) -> LPAR . cons_pattern RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## par(nsepseq(core_pattern,COMMA)) -> LPAR . nsepseq(core_pattern,COMMA) RPAR [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -298,7 +298,7 @@ interactive_expr: Case Verbatim Of LPAR With interactive_expr: Case Verbatim Of List LBRACKET WILD End ## -## Ends in an error in state: 307. +## Ends in an error in state: 308. ## ## injection(List,core_pattern) -> List LBRACKET sep_or_term_list(core_pattern,SEMI) . RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -309,15 +309,15 @@ interactive_expr: Case Verbatim Of List LBRACKET WILD End ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 311, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern -## In state 310, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) +## In state 312, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 311, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) ## interactive_expr: Case Verbatim Of List LBRACKET With ## -## Ends in an error in state: 305. +## Ends in an error in state: 306. ## ## injection(List,core_pattern) -> List LBRACKET . sep_or_term_list(core_pattern,SEMI) RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## injection(List,core_pattern) -> List LBRACKET . RBRACKET [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -330,7 +330,7 @@ interactive_expr: Case Verbatim Of List LBRACKET With interactive_expr: Case Verbatim Of List WILD RBRACKET ## -## Ends in an error in state: 319. +## Ends in an error in state: 320. ## ## injection(List,core_pattern) -> List sep_or_term_list(core_pattern,SEMI) . End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## @@ -341,15 +341,15 @@ interactive_expr: Case Verbatim Of List WILD RBRACKET ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 311, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern -## In state 310, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) +## In state 312, spurious reduction of production nsepseq(core_pattern,SEMI) -> core_pattern +## In state 311, spurious reduction of production sep_or_term_list(core_pattern,SEMI) -> nsepseq(core_pattern,SEMI) ## interactive_expr: Case Verbatim Of List WILD SEMI WILD SEMI With ## -## Ends in an error in state: 316. +## Ends in an error in state: 317. ## ## nsepseq(core_pattern,SEMI) -> core_pattern SEMI . nsepseq(core_pattern,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(core_pattern,SEMI)) -> core_pattern SEMI . seq(__anonymous_0(core_pattern,SEMI)) [ RBRACKET End ] @@ -362,7 +362,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI WILD SEMI With interactive_expr: Case Verbatim Of List WILD SEMI WILD With ## -## Ends in an error in state: 315. +## Ends in an error in state: 316. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -376,7 +376,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI WILD With interactive_expr: Case Verbatim Of List WILD SEMI With ## -## Ends in an error in state: 312. +## Ends in an error in state: 313. ## ## nsepseq(core_pattern,SEMI) -> core_pattern SEMI . nsepseq(core_pattern,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(core_pattern,SEMI)) -> core_pattern SEMI . seq(__anonymous_0(core_pattern,SEMI)) [ RBRACKET End ] @@ -389,7 +389,7 @@ interactive_expr: Case Verbatim Of List WILD SEMI With interactive_expr: Case Verbatim Of List WILD With ## -## Ends in an error in state: 311. +## Ends in an error in state: 312. ## ## nsepseq(core_pattern,SEMI) -> core_pattern . [ RBRACKET End ] ## nsepseq(core_pattern,SEMI) -> core_pattern . SEMI nsepseq(core_pattern,SEMI) [ RBRACKET End ] @@ -403,7 +403,7 @@ interactive_expr: Case Verbatim Of List WILD With interactive_expr: Case Verbatim Of List With ## -## Ends in an error in state: 268. +## Ends in an error in state: 269. ## ## injection(List,core_pattern) -> List . sep_or_term_list(core_pattern,SEMI) End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] ## injection(List,core_pattern) -> List . End [ SEMI RPAR RBRACKET End CONS COMMA ARROW ] @@ -418,7 +418,7 @@ interactive_expr: Case Verbatim Of List With interactive_expr: Case Verbatim Of VBAR Block ## -## Ends in an error in state: 330. +## Ends in an error in state: 331. ## ## case(expr) -> Case expr Of option(VBAR) . cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -430,7 +430,7 @@ interactive_expr: Case Verbatim Of VBAR Block interactive_expr: Case Verbatim Of WILD ARROW Bytes RBRACKET ## -## Ends in an error in state: 331. +## Ends in an error in state: 332. ## ## case(expr) -> Case expr Of option(VBAR) cases(expr) . End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -442,25 +442,25 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 323, spurious reduction of production case_clause(expr) -> pattern ARROW expr -## In state 327, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) -## In state 324, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) +## In state 324, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 328, spurious reduction of production nsepseq(case_clause(expr),VBAR) -> case_clause(expr) +## In state 325, spurious reduction of production cases(expr) -> nsepseq(case_clause(expr),VBAR) ## interactive_expr: Case Verbatim Of WILD ARROW Bytes Type ## -## Ends in an error in state: 327. +## Ends in an error in state: 328. ## ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) . [ RBRACKET End ] ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) . VBAR nsepseq(case_clause(expr),VBAR) [ RBRACKET End ] @@ -473,23 +473,23 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes Type ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 323, spurious reduction of production case_clause(expr) -> pattern ARROW expr +## In state 324, spurious reduction of production case_clause(expr) -> pattern ARROW expr ## interactive_expr: Case Verbatim Of WILD ARROW Bytes VBAR With ## -## Ends in an error in state: 328. +## Ends in an error in state: 329. ## ## nsepseq(case_clause(expr),VBAR) -> case_clause(expr) VBAR . nsepseq(case_clause(expr),VBAR) [ RBRACKET End ] ## @@ -501,7 +501,7 @@ interactive_expr: Case Verbatim Of WILD ARROW Bytes VBAR With interactive_expr: Case Verbatim Of WILD ARROW With ## -## Ends in an error in state: 322. +## Ends in an error in state: 323. ## ## case_clause(expr) -> pattern ARROW . expr [ VBAR RBRACKET End ] ## @@ -513,7 +513,7 @@ interactive_expr: Case Verbatim Of WILD ARROW With interactive_expr: Case Verbatim Of WILD CONS WILD CONS With ## -## Ends in an error in state: 301. +## Ends in an error in state: 302. ## ## nsepseq(core_pattern,CONS) -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -525,7 +525,7 @@ interactive_expr: Case Verbatim Of WILD CONS WILD CONS With interactive_expr: Case Verbatim Of WILD CONS WILD With ## -## Ends in an error in state: 300. +## Ends in an error in state: 301. ## ## nsepseq(core_pattern,CONS) -> core_pattern . [ RPAR ARROW ] ## nsepseq(core_pattern,CONS) -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -538,7 +538,7 @@ interactive_expr: Case Verbatim Of WILD CONS WILD With interactive_expr: Case Verbatim Of WILD CONS With ## -## Ends in an error in state: 298. +## Ends in an error in state: 299. ## ## pattern -> core_pattern CONS . nsepseq(core_pattern,CONS) [ RPAR ARROW ] ## @@ -550,7 +550,7 @@ interactive_expr: Case Verbatim Of WILD CONS With interactive_expr: Case Verbatim Of WILD RPAR ## -## Ends in an error in state: 321. +## Ends in an error in state: 322. ## ## case_clause(expr) -> pattern . ARROW expr [ VBAR RBRACKET End ] ## @@ -561,14 +561,14 @@ interactive_expr: Case Verbatim Of WILD RPAR ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 297, spurious reduction of production pattern -> core_pattern +## In state 298, spurious reduction of production pattern -> core_pattern ## interactive_expr: Case Verbatim Of WILD With ## -## Ends in an error in state: 297. +## Ends in an error in state: 298. ## ## pattern -> core_pattern . [ RPAR ARROW ] ## pattern -> core_pattern . CONS nsepseq(core_pattern,CONS) [ RPAR ARROW ] @@ -581,7 +581,7 @@ interactive_expr: Case Verbatim Of WILD With interactive_expr: Case Verbatim Of With ## -## Ends in an error in state: 259. +## Ends in an error in state: 260. ## ## case(expr) -> Case expr Of . option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case expr Of . LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -594,7 +594,7 @@ interactive_expr: Case Verbatim Of With interactive_expr: Case Verbatim VBAR ## -## Ends in an error in state: 258. +## Ends in an error in state: 259. ## ## case(expr) -> Case expr . Of option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case expr . Of LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -607,13 +607,13 @@ interactive_expr: Case Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -622,7 +622,7 @@ interactive_expr: Case Verbatim VBAR interactive_expr: Case With ## -## Ends in an error in state: 140. +## Ends in an error in state: 134. ## ## case(expr) -> Case . expr Of option(VBAR) cases(expr) End [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## case(expr) -> Case . expr Of LBRACKET option(VBAR) cases(expr) RBRACKET [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] @@ -635,7 +635,7 @@ interactive_expr: Case With interactive_expr: Constr DOT And With ## -## Ends in an error in state: 174. +## Ends in an error in state: 175. ## ## core_expr -> module_field . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## fun_call -> module_field . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -648,7 +648,7 @@ interactive_expr: Constr DOT And With interactive_expr: Constr DOT Ident DOT With ## -## Ends in an error in state: 129. +## Ends in an error in state: 123. ## ## projection -> Constr DOT Ident DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -660,7 +660,7 @@ interactive_expr: Constr DOT Ident DOT With interactive_expr: Constr DOT Ident With ## -## Ends in an error in state: 128. +## Ends in an error in state: 122. ## ## module_fun -> Ident . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -673,7 +673,7 @@ interactive_expr: Constr DOT Ident With interactive_expr: Constr DOT With ## -## Ends in an error in state: 124. +## Ends in an error in state: 118. ## ## module_field -> Constr DOT . module_fun [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -686,7 +686,7 @@ interactive_expr: Constr DOT With interactive_expr: Constr With ## -## Ends in an error in state: 123. +## Ends in an error in state: 117. ## ## core_expr -> Constr . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## core_expr -> Constr . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -701,7 +701,7 @@ interactive_expr: Constr With interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String Is With ## -## Ends in an error in state: 121. +## Ends in an error in state: 115. ## ## fun_expr -> Function parameters COLON type_expr Is . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -713,7 +713,7 @@ interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String Is Wit interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String VBAR ## -## Ends in an error in state: 120. +## Ends in an error in state: 114. ## ## fun_expr -> Function parameters COLON type_expr . Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -733,7 +733,7 @@ interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON String VBAR interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON With ## -## Ends in an error in state: 119. +## Ends in an error in state: 113. ## ## fun_expr -> Function parameters COLON . type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -745,7 +745,7 @@ interactive_expr: Function LPAR Const Ident COLON Ident RPAR COLON With interactive_expr: Function LPAR Const Ident COLON Ident RPAR With ## -## Ends in an error in state: 118. +## Ends in an error in state: 112. ## ## fun_expr -> Function parameters . COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -876,7 +876,7 @@ interactive_expr: Function LPAR With interactive_expr: Function With ## -## Ends in an error in state: 117. +## Ends in an error in state: 111. ## ## fun_expr -> Function . parameters COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -888,7 +888,7 @@ interactive_expr: Function With interactive_expr: Ident DOT Ident ASS ## -## Ends in an error in state: 156. +## Ends in an error in state: 150. ## ## fun_call_or_par_or_projection -> projection . option(arguments) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## path -> projection . [ With LBRACKET ] @@ -900,15 +900,15 @@ interactive_expr: Ident DOT Ident ASS ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 132, spurious reduction of production nsepseq(selection,DOT) -> selection -## In state 341, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 126, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 159, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) ## interactive_expr: Ident DOT Int DOT With ## -## Ends in an error in state: 133. +## Ends in an error in state: 127. ## ## nsepseq(selection,DOT) -> selection DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -920,7 +920,7 @@ interactive_expr: Ident DOT Int DOT With interactive_expr: Ident DOT Int While ## -## Ends in an error in state: 132. +## Ends in an error in state: 126. ## ## nsepseq(selection,DOT) -> selection . [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## nsepseq(selection,DOT) -> selection . DOT nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] @@ -933,7 +933,7 @@ interactive_expr: Ident DOT Int While interactive_expr: Ident DOT With ## -## Ends in an error in state: 340. +## Ends in an error in state: 158. ## ## projection -> Ident DOT . nsepseq(selection,DOT) [ With VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE LBRACKET GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -945,7 +945,7 @@ interactive_expr: Ident DOT With interactive_expr: Ident LBRACKET Verbatim VBAR ## -## Ends in an error in state: 240. +## Ends in an error in state: 241. ## ## brackets(expr) -> LBRACKET expr . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -957,13 +957,13 @@ interactive_expr: Ident LBRACKET Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -972,7 +972,7 @@ interactive_expr: Ident LBRACKET Verbatim VBAR interactive_expr: Ident LBRACKET With ## -## Ends in an error in state: 239. +## Ends in an error in state: 240. ## ## brackets(expr) -> LBRACKET . expr RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ASS ARROW ] ## @@ -984,7 +984,7 @@ interactive_expr: Ident LBRACKET With interactive_expr: Ident LPAR Verbatim COMMA With ## -## Ends in an error in state: 338. +## Ends in an error in state: 339. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -996,7 +996,7 @@ interactive_expr: Ident LPAR Verbatim COMMA With interactive_expr: Ident LPAR Verbatim VBAR ## -## Ends in an error in state: 337. +## Ends in an error in state: 338. ## ## nsepseq(expr,COMMA) -> expr . [ RPAR ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -1009,13 +1009,13 @@ interactive_expr: Ident LPAR Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -1024,7 +1024,7 @@ interactive_expr: Ident LPAR Verbatim VBAR interactive_expr: Ident LPAR With ## -## Ends in an error in state: 116. +## Ends in an error in state: 110. ## ## par(nsepseq(expr,COMMA)) -> LPAR . nsepseq(expr,COMMA) RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1036,7 +1036,7 @@ interactive_expr: Ident LPAR With interactive_expr: Ident While ## -## Ends in an error in state: 115. +## Ends in an error in state: 109. ## ## core_expr -> Ident . [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## fun_call -> Ident . arguments [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1049,9 +1049,45 @@ interactive_expr: Ident While -interactive_expr: Ident With Record Int EQ Bytes RBRACKET +interactive_expr: Ident With Record Constr DOT Ident With ## -## Ends in an error in state: 236. +## Ends in an error in state: 162. +## +## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr DOT Ident +## + + + +interactive_expr: Ident With Record Constr DOT With +## +## Ends in an error in state: 161. +## +## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr DOT +## + + + +interactive_expr: Ident With Record Constr With +## +## Ends in an error in state: 160. +## +## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Constr +## + + + +interactive_expr: Ident With Record Ident EQ Bytes RBRACKET +## +## Ends in an error in state: 237. ## ## ne_injection(Record,field_path_assignment) -> Record sep_or_term_list(field_path_assignment,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1063,25 +1099,25 @@ interactive_expr: Ident With Record Int EQ Bytes RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 192, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr -## In state 229, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment -## In state 228, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) +## In state 192, spurious reduction of production field_path_assignment -> path EQ expr +## In state 230, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 229, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) ## -interactive_expr: Ident With Record Int EQ Bytes SEMI Int EQ Bytes SEMI With +interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes SEMI With ## -## Ends in an error in state: 234. +## Ends in an error in state: 235. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACKET End ] @@ -1092,9 +1128,9 @@ interactive_expr: Ident With Record Int EQ Bytes SEMI Int EQ Bytes SEMI With -interactive_expr: Ident With Record Int EQ Bytes SEMI Int EQ Bytes VBAR +interactive_expr: Ident With Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## -## Ends in an error in state: 233. +## Ends in an error in state: 234. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACKET End ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] @@ -1108,23 +1144,23 @@ interactive_expr: Ident With Record Int EQ Bytes SEMI Int EQ Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 192, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr +## In state 192, spurious reduction of production field_path_assignment -> path EQ expr ## -interactive_expr: Ident With Record Int EQ Bytes SEMI With +interactive_expr: Ident With Record Ident EQ Bytes SEMI With ## -## Ends in an error in state: 230. +## Ends in an error in state: 231. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment SEMI . nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(field_path_assignment,SEMI)) -> field_path_assignment SEMI . seq(__anonymous_0(field_path_assignment,SEMI)) [ RBRACKET End ] @@ -1135,9 +1171,9 @@ interactive_expr: Ident With Record Int EQ Bytes SEMI With -interactive_expr: Ident With Record Int EQ Bytes VBAR +interactive_expr: Ident With Record Ident EQ Bytes VBAR ## -## Ends in an error in state: 229. +## Ends in an error in state: 230. ## ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . [ RBRACKET End ] ## nsepseq(field_path_assignment,SEMI) -> field_path_assignment . SEMI nsepseq(field_path_assignment,SEMI) [ RBRACKET End ] @@ -1151,51 +1187,64 @@ interactive_expr: Ident With Record Int EQ Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 192, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr +## In state 192, spurious reduction of production field_path_assignment -> path EQ expr ## -interactive_expr: Ident With Record Int EQ With +interactive_expr: Ident With Record Ident EQ With ## ## Ends in an error in state: 167. ## -## field_path_assignment -> nsepseq(selection,DOT) EQ . expr [ SEMI RBRACKET End ] +## field_path_assignment -> path EQ . expr [ SEMI RBRACKET End ] ## ## The known suffix of the stack is as follows: -## nsepseq(selection,DOT) EQ +## path EQ ## -interactive_expr: Ident With Record Int With +interactive_expr: Ident With Record Ident While +## +## Ends in an error in state: 157. +## +## path -> Ident . [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else EQ ] +## +## The known suffix of the stack is as follows: +## Ident +## + + + +interactive_expr: Ident With Record Ident With ## ## Ends in an error in state: 166. ## -## field_path_assignment -> nsepseq(selection,DOT) . EQ expr [ SEMI RBRACKET End ] +## field_path_assignment -> path . EQ expr [ SEMI RBRACKET End ] ## ## The known suffix of the stack is as follows: -## nsepseq(selection,DOT) +## path ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 132, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 157, spurious reduction of production path -> Ident ## -interactive_expr: Ident With Record LBRACKET Int EQ Bytes End +interactive_expr: Ident With Record LBRACKET Ident EQ Bytes End ## ## Ends in an error in state: 163. ## @@ -1209,25 +1258,25 @@ interactive_expr: Ident With Record LBRACKET Int EQ Bytes End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 192, spurious reduction of production field_path_assignment -> nsepseq(selection,DOT) EQ expr -## In state 229, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment -## In state 228, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) +## In state 192, spurious reduction of production field_path_assignment -> path EQ expr +## In state 230, spurious reduction of production nsepseq(field_path_assignment,SEMI) -> field_path_assignment +## In state 229, spurious reduction of production sep_or_term_list(field_path_assignment,SEMI) -> nsepseq(field_path_assignment,SEMI) ## interactive_expr: Ident With Record LBRACKET With ## -## Ends in an error in state: 162. +## Ends in an error in state: 156. ## ## ne_injection(Record,field_path_assignment) -> Record LBRACKET . sep_or_term_list(field_path_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1239,7 +1288,7 @@ interactive_expr: Ident With Record LBRACKET With interactive_expr: Ident With Record With ## -## Ends in an error in state: 161. +## Ends in an error in state: 155. ## ## ne_injection(Record,field_path_assignment) -> Record . sep_or_term_list(field_path_assignment,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## ne_injection(Record,field_path_assignment) -> Record . LBRACKET sep_or_term_list(field_path_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1252,7 +1301,7 @@ interactive_expr: Ident With Record With interactive_expr: Ident With With ## -## Ends in an error in state: 160. +## Ends in an error in state: 154. ## ## update_record -> path With . ne_injection(Record,field_path_assignment) [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1264,7 +1313,7 @@ interactive_expr: Ident With With interactive_expr: If Verbatim Then Verbatim Else With ## -## Ends in an error in state: 347. +## Ends in an error in state: 346. ## ## cond_expr -> If expr Then expr option(SEMI) Else . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1276,7 +1325,7 @@ interactive_expr: If Verbatim Then Verbatim Else With interactive_expr: If Verbatim Then Verbatim SEMI EQ ## -## Ends in an error in state: 346. +## Ends in an error in state: 345. ## ## cond_expr -> If expr Then expr option(SEMI) . Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1288,7 +1337,7 @@ interactive_expr: If Verbatim Then Verbatim SEMI EQ interactive_expr: If Verbatim Then Verbatim VBAR ## -## Ends in an error in state: 345. +## Ends in an error in state: 344. ## ## cond_expr -> If expr Then expr . option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1300,13 +1349,13 @@ interactive_expr: If Verbatim Then Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -1315,7 +1364,7 @@ interactive_expr: If Verbatim Then Verbatim VBAR interactive_expr: If Verbatim Then With ## -## Ends in an error in state: 344. +## Ends in an error in state: 343. ## ## cond_expr -> If expr Then . expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1327,7 +1376,7 @@ interactive_expr: If Verbatim Then With interactive_expr: If Verbatim VBAR ## -## Ends in an error in state: 343. +## Ends in an error in state: 342. ## ## cond_expr -> If expr . Then expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1339,13 +1388,13 @@ interactive_expr: If Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -1354,7 +1403,7 @@ interactive_expr: If Verbatim VBAR interactive_expr: If With ## -## Ends in an error in state: 114. +## Ends in an error in state: 108. ## ## cond_expr -> If . expr Then expr option(SEMI) Else expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] ## @@ -1378,7 +1427,7 @@ interactive_expr: LPAR Bytes RPAR With interactive_expr: LPAR If Verbatim Then Bytes Else Bytes VBAR ## -## Ends in an error in state: 351. +## Ends in an error in state: 350. ## ## par(expr) -> LPAR expr . RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## tuple_comp -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -1391,56 +1440,58 @@ interactive_expr: LPAR If Verbatim Then Bytes Else Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 348, spurious reduction of production cond_expr -> If expr Then expr option(SEMI) Else expr +## In state 347, spurious reduction of production cond_expr -> If expr Then expr option(SEMI) Else expr ## In state 226, spurious reduction of production expr -> cond_expr ## -interactive_expr: LPAR Verbatim COLON String VBAR +interactive_expr: LPAR Verbatim COLON Ident VBAR ## ## Ends in an error in state: 357. ## -## annot_expr -> LPAR disj_expr COLON type_expr . RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] +## par(annot_expr) -> LPAR annot_expr . RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## ## The known suffix of the stack is as follows: -## LPAR disj_expr COLON type_expr +## LPAR annot_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 16, spurious reduction of production core_type -> Ident ## In state 30, spurious reduction of production cartesian -> core_type ## In state 36, spurious reduction of production fun_type -> cartesian ## In state 44, spurious reduction of production type_expr -> fun_type +## In state 356, spurious reduction of production annot_expr -> disj_expr COLON type_expr ## interactive_expr: LPAR Verbatim COLON With ## -## Ends in an error in state: 356. +## Ends in an error in state: 355. ## -## annot_expr -> LPAR disj_expr COLON . type_expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] +## annot_expr -> disj_expr COLON . type_expr [ RPAR ] ## ## The known suffix of the stack is as follows: -## LPAR disj_expr COLON +## disj_expr COLON ## interactive_expr: LPAR Verbatim COMMA With ## -## Ends in an error in state: 353. +## Ends in an error in state: 352. ## ## tuple_comp -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -1452,27 +1503,27 @@ interactive_expr: LPAR Verbatim COMMA With interactive_expr: LPAR Verbatim VBAR ## -## Ends in an error in state: 355. +## Ends in an error in state: 354. ## -## annot_expr -> LPAR disj_expr . COLON type_expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] +## annot_expr -> disj_expr . COLON type_expr [ RPAR ] ## disj_expr -> disj_expr . Or conj_expr [ RPAR Or COMMA COLON ] ## expr -> disj_expr . [ RPAR COMMA ] ## ## The known suffix of the stack is as follows: -## LPAR disj_expr +## disj_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 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## @@ -1480,9 +1531,9 @@ interactive_expr: LPAR Verbatim VBAR interactive_expr: LPAR With ## -## Ends in an error in state: 112. +## Ends in an error in state: 106. ## -## annot_expr -> LPAR . disj_expr COLON type_expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] +## par(annot_expr) -> LPAR . annot_expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## par(expr) -> LPAR . expr RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LPAR LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## par(tuple_comp) -> LPAR . tuple_comp RPAR [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1506,13 +1557,13 @@ interactive_expr: List LBRACKET Verbatim End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -1548,13 +1599,13 @@ interactive_expr: List Verbatim RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -1565,7 +1616,7 @@ interactive_expr: List Verbatim RBRACKET interactive_expr: List With ## -## Ends in an error in state: 111. +## Ends in an error in state: 105. ## ## injection(List,expr) -> List . sep_or_term_list(expr,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(List,expr) -> List . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1580,7 +1631,7 @@ interactive_expr: List With interactive_expr: MINUS With ## -## Ends in an error in state: 110. +## Ends in an error in state: 104. ## ## unary_expr -> MINUS . core_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1604,18 +1655,18 @@ interactive_expr: Map LBRACKET Verbatim ARROW Bytes End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## @@ -1647,25 +1698,25 @@ interactive_expr: Map Verbatim ARROW Bytes RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes SEMI With ## -## Ends in an error in state: 253. +## Ends in an error in state: 254. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1678,7 +1729,7 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes SEMI With interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes VBAR ## -## Ends in an error in state: 252. +## Ends in an error in state: 253. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1692,23 +1743,23 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI Verbatim ARROW Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr +## In state 248, spurious reduction of production binding -> expr ARROW expr ## interactive_expr: Map Verbatim ARROW Bytes SEMI With ## -## Ends in an error in state: 249. +## Ends in an error in state: 250. ## ## nsepseq(binding,SEMI) -> binding SEMI . nsepseq(binding,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(binding,SEMI)) -> binding SEMI . seq(__anonymous_0(binding,SEMI)) [ RBRACKET End ] @@ -1721,7 +1772,7 @@ interactive_expr: Map Verbatim ARROW Bytes SEMI With interactive_expr: Map Verbatim ARROW Bytes VBAR ## -## Ends in an error in state: 248. +## Ends in an error in state: 249. ## ## nsepseq(binding,SEMI) -> binding . [ RBRACKET End ] ## nsepseq(binding,SEMI) -> binding . SEMI nsepseq(binding,SEMI) [ RBRACKET End ] @@ -1735,23 +1786,23 @@ interactive_expr: Map Verbatim ARROW Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr +## In state 248, spurious reduction of production binding -> expr ARROW expr ## interactive_expr: Map Verbatim ARROW With ## -## Ends in an error in state: 246. +## Ends in an error in state: 247. ## ## binding -> expr ARROW . expr [ SEMI RBRACKET End ] ## @@ -1763,7 +1814,7 @@ interactive_expr: Map Verbatim ARROW With interactive_expr: Map Verbatim VBAR ## -## Ends in an error in state: 245. +## Ends in an error in state: 246. ## ## binding -> expr . ARROW expr [ SEMI RBRACKET End ] ## @@ -1775,13 +1826,13 @@ interactive_expr: Map Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -1790,7 +1841,7 @@ interactive_expr: Map Verbatim VBAR interactive_expr: Map With ## -## Ends in an error in state: 109. +## Ends in an error in state: 103. ## ## injection(Map,binding) -> Map . sep_or_term_list(binding,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Map,binding) -> Map . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1805,7 +1856,7 @@ interactive_expr: Map With interactive_expr: Not Bytes With ## -## Ends in an error in state: 171. +## Ends in an error in state: 172. ## ## add_expr -> mult_expr . [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## mult_expr -> mult_expr . TIMES unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -1820,7 +1871,7 @@ interactive_expr: Not Bytes With interactive_expr: Not With ## -## Ends in an error in state: 105. +## Ends in an error in state: 99. ## ## unary_expr -> Not . core_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -1844,13 +1895,13 @@ interactive_expr: Record Ident EQ Bytes RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -1889,13 +1940,13 @@ interactive_expr: Record Ident EQ Bytes SEMI Ident EQ Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -1932,13 +1983,13 @@ interactive_expr: Record Ident EQ Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -1948,7 +1999,7 @@ interactive_expr: Record Ident EQ Bytes VBAR interactive_expr: Record Ident EQ With ## -## Ends in an error in state: 104. +## Ends in an error in state: 98. ## ## field_assignment -> Ident EQ . expr [ SEMI RBRACKET End ] ## @@ -1960,7 +2011,7 @@ interactive_expr: Record Ident EQ With interactive_expr: Record Ident With ## -## Ends in an error in state: 103. +## Ends in an error in state: 97. ## ## field_assignment -> Ident . EQ expr [ SEMI RBRACKET End ] ## @@ -1984,13 +2035,13 @@ interactive_expr: Record LBRACKET Ident EQ Bytes End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -2002,7 +2053,7 @@ interactive_expr: Record LBRACKET Ident EQ Bytes End interactive_expr: Record LBRACKET With ## -## Ends in an error in state: 102. +## Ends in an error in state: 96. ## ## record_expr -> Record LBRACKET . sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2014,7 +2065,7 @@ interactive_expr: Record LBRACKET With interactive_expr: Record With ## -## Ends in an error in state: 101. +## Ends in an error in state: 95. ## ## record_expr -> Record . sep_or_term_list(field_assignment,SEMI) End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## record_expr -> Record . LBRACKET sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2025,89 +2076,9 @@ interactive_expr: Record With -interactive_expr: Recursive Function LPAR Const Ident COLON Ident RPAR COLON String Is With -## -## Ends in an error in state: 100. -## -## fun_expr -> Recursive Function parameters COLON type_expr Is . expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive Function parameters COLON type_expr Is -## - - - -interactive_expr: Recursive Function LPAR Const Ident COLON Ident RPAR COLON String VBAR -## -## Ends in an error in state: 99. -## -## fun_expr -> Recursive Function parameters COLON type_expr . Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive Function parameters COLON type_expr -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 30, spurious reduction of production cartesian -> core_type -## In state 36, spurious reduction of production fun_type -> cartesian -## In state 44, spurious reduction of production type_expr -> fun_type -## - - - -interactive_expr: Recursive Function LPAR Const Ident COLON Ident RPAR COLON With -## -## Ends in an error in state: 98. -## -## fun_expr -> Recursive Function parameters COLON . type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive Function parameters COLON -## - - - -interactive_expr: Recursive Function LPAR Const Ident COLON Ident RPAR With -## -## Ends in an error in state: 97. -## -## fun_expr -> Recursive Function parameters . COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive Function parameters -## - - - -interactive_expr: Recursive Function With -## -## Ends in an error in state: 96. -## -## fun_expr -> Recursive Function . parameters COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive Function -## - - - -interactive_expr: Recursive With -## -## Ends in an error in state: 95. -## -## fun_expr -> Recursive . Function parameters COLON type_expr Is expr [ VBAR Type To Then Step SEMI Recursive RPAR RBRACKET RBRACE Of Function From End Else EOF Const COMMA Block Begin Attributes ARROW ] -## -## The known suffix of the stack is as follows: -## Recursive -## - - - interactive_expr: Set LBRACKET Verbatim End ## -## Ends in an error in state: 401. +## Ends in an error in state: 400. ## ## injection(Set,expr) -> Set LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2119,13 +2090,13 @@ interactive_expr: Set LBRACKET Verbatim End ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -2136,7 +2107,7 @@ interactive_expr: Set LBRACKET Verbatim End interactive_expr: Set LBRACKET With ## -## Ends in an error in state: 399. +## Ends in an error in state: 398. ## ## injection(Set,expr) -> Set LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## injection(Set,expr) -> Set LBRACKET . RBRACKET [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] @@ -2149,7 +2120,7 @@ interactive_expr: Set LBRACKET With interactive_expr: Set Verbatim RBRACKET ## -## Ends in an error in state: 404. +## Ends in an error in state: 403. ## ## injection(Set,expr) -> Set sep_or_term_list(expr,SEMI) . End [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Contains Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2161,13 +2132,13 @@ interactive_expr: Set Verbatim RBRACKET ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -2205,13 +2176,13 @@ interactive_expr: Set Verbatim SEMI Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -2247,13 +2218,13 @@ interactive_expr: Set Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -2314,13 +2285,13 @@ interactive_expr: Verbatim COLON ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## @@ -2514,7 +2485,7 @@ interactive_expr: Verbatim SLASH With interactive_expr: Verbatim TIMES With ## -## Ends in an error in state: 172. +## Ends in an error in state: 173. ## ## mult_expr -> mult_expr TIMES . unary_expr [ VBAR Type To Then TIMES Step SLASH SEMI Recursive RPAR RBRACKET RBRACE PLUS Or Of NE Mod MINUS LT LE GT GE Function From End Else EQ EOF Const CONS COMMA COLON CAT Block Begin Attributes And ARROW ] ## @@ -2526,7 +2497,7 @@ interactive_expr: Verbatim TIMES With interactive_expr: Verbatim VBAR ## -## Ends in an error in state: 606. +## Ends in an error in state: 600. ## ## interactive_expr -> expr . EOF [ # ] ## @@ -2538,13 +2509,13 @@ interactive_expr: Verbatim VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -2566,7 +2537,7 @@ interactive_expr: Verbatim With interactive_expr: With ## -## Ends in an error in state: 604. +## Ends in an error in state: 598. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2578,7 +2549,7 @@ interactive_expr: With contract: Attributes LBRACKET String End ## -## Ends in an error in state: 550. +## Ends in an error in state: 544. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET sep_or_term_list(String,SEMI) . RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2589,15 +2560,15 @@ contract: Attributes LBRACKET String End ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 542, spurious reduction of production nsepseq(String,SEMI) -> String -## In state 553, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) +## In state 536, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 547, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) ## contract: Attributes LBRACKET With ## -## Ends in an error in state: 549. +## Ends in an error in state: 543. ## ## ne_injection(Attributes,String) -> Attributes LBRACKET . sep_or_term_list(String,SEMI) RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2609,7 +2580,7 @@ contract: Attributes LBRACKET With contract: Attributes String End Attributes String End SEMI With ## -## Ends in an error in state: 599. +## Ends in an error in state: 593. ## ## seq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2621,7 +2592,7 @@ contract: Attributes String End Attributes String End SEMI With contract: Attributes String End SEMI With ## -## Ends in an error in state: 597. +## Ends in an error in state: 591. ## ## nseq(declaration) -> declaration . seq(declaration) [ EOF ] ## @@ -2633,7 +2604,7 @@ contract: Attributes String End SEMI With contract: Attributes String End With ## -## Ends in an error in state: 592. +## Ends in an error in state: 586. ## ## attr_decl -> open_attr_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2645,7 +2616,7 @@ contract: Attributes String End With contract: Attributes String RBRACKET ## -## Ends in an error in state: 554. +## Ends in an error in state: 548. ## ## ne_injection(Attributes,String) -> Attributes sep_or_term_list(String,SEMI) . End [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2656,15 +2627,15 @@ contract: Attributes String RBRACKET ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 542, spurious reduction of production nsepseq(String,SEMI) -> String -## In state 553, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) +## In state 536, spurious reduction of production nsepseq(String,SEMI) -> String +## In state 547, spurious reduction of production sep_or_term_list(String,SEMI) -> nsepseq(String,SEMI) ## contract: Attributes String SEMI String SEMI With ## -## Ends in an error in state: 545. +## Ends in an error in state: 539. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## seq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2677,7 +2648,7 @@ contract: Attributes String SEMI String SEMI With contract: Attributes String SEMI String With ## -## Ends in an error in state: 544. +## Ends in an error in state: 538. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2691,7 +2662,7 @@ contract: Attributes String SEMI String With contract: Attributes String SEMI With ## -## Ends in an error in state: 543. +## Ends in an error in state: 537. ## ## nsepseq(String,SEMI) -> String SEMI . nsepseq(String,SEMI) [ RBRACKET End ] ## nseq(__anonymous_0(String,SEMI)) -> String SEMI . seq(__anonymous_0(String,SEMI)) [ RBRACKET End ] @@ -2704,7 +2675,7 @@ contract: Attributes String SEMI With contract: Attributes String With ## -## Ends in an error in state: 542. +## Ends in an error in state: 536. ## ## nsepseq(String,SEMI) -> String . [ RBRACKET End ] ## nsepseq(String,SEMI) -> String . SEMI nsepseq(String,SEMI) [ RBRACKET End ] @@ -2718,7 +2689,7 @@ contract: Attributes String With contract: Attributes With ## -## Ends in an error in state: 541. +## Ends in an error in state: 535. ## ## ne_injection(Attributes,String) -> Attributes . sep_or_term_list(String,SEMI) End [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## ne_injection(Attributes,String) -> Attributes . LBRACKET sep_or_term_list(String,SEMI) RBRACKET [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -2731,7 +2702,7 @@ contract: Attributes With contract: Const Ident COLON Ident EQ Bytes VBAR ## -## Ends in an error in state: 590. +## Ends in an error in state: 584. ## ## const_decl -> open_const_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2743,24 +2714,24 @@ contract: Const Ident COLON Ident EQ Bytes VBAR ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 498, spurious reduction of production unqualified_decl(EQ) -> Ident COLON type_expr EQ expr -## In state 499, spurious reduction of production open_const_decl -> Const unqualified_decl(EQ) +## In state 492, spurious reduction of production unqualified_decl(EQ) -> Ident COLON type_expr EQ expr +## In state 493, spurious reduction of production open_const_decl -> Const unqualified_decl(EQ) ## contract: Const Ident COLON String EQ With ## -## Ends in an error in state: 497. +## Ends in an error in state: 491. ## ## unqualified_decl(EQ) -> Ident COLON type_expr EQ . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2772,7 +2743,7 @@ contract: Const Ident COLON String EQ With contract: Const Ident COLON String VBAR ## -## Ends in an error in state: 496. +## Ends in an error in state: 490. ## ## unqualified_decl(EQ) -> Ident COLON type_expr . EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2792,7 +2763,7 @@ contract: Const Ident COLON String VBAR contract: Const Ident COLON With ## -## Ends in an error in state: 495. +## Ends in an error in state: 489. ## ## unqualified_decl(EQ) -> Ident COLON . type_expr EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2804,7 +2775,7 @@ contract: Const Ident COLON With contract: Const Ident With ## -## Ends in an error in state: 494. +## Ends in an error in state: 488. ## ## unqualified_decl(EQ) -> Ident . COLON type_expr EQ expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2816,7 +2787,7 @@ contract: Const Ident With contract: Const With ## -## Ends in an error in state: 493. +## Ends in an error in state: 487. ## ## open_const_decl -> Const . unqualified_decl(EQ) [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -2828,7 +2799,7 @@ contract: Const With contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON Ident Is Bytes VBAR ## -## Ends in an error in state: 588. +## Ends in an error in state: 582. ## ## fun_decl -> open_fun_decl . option(SEMI) [ Type Recursive Function EOF Const Attributes ] ## @@ -2840,23 +2811,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON Ident Is Bytes ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 466, spurious reduction of production open_fun_decl -> Function Ident parameters COLON type_expr Is expr +## In state 460, spurious reduction of production open_fun_decl -> Function Ident parameters COLON type_expr Is expr ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET VBAR Block ## -## Ends in an error in state: 504. +## Ends in an error in state: 498. ## ## case(if_clause) -> Case expr Of LBRACKET option(VBAR) . cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2868,7 +2839,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET WILD ARROW Skip End ## -## Ends in an error in state: 533. +## Ends in an error in state: 527. ## ## case(if_clause) -> Case expr Of LBRACKET option(VBAR) cases(if_clause) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2879,15 +2850,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 535, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) -## In state 532, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) +## In state 529, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 526, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of LBRACKET With ## -## Ends in an error in state: 503. +## Ends in an error in state: 497. ## ## case(if_clause) -> Case expr Of LBRACKET . option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2899,7 +2870,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of VBAR Block ## -## Ends in an error in state: 538. +## Ends in an error in state: 532. ## ## case(if_clause) -> Case expr Of option(VBAR) . cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2911,7 +2882,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip RBRACKET ## -## Ends in an error in state: 539. +## Ends in an error in state: 533. ## ## case(if_clause) -> Case expr Of option(VBAR) cases(if_clause) . End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -2922,15 +2893,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 535, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) -## In state 532, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) +## In state 529, spurious reduction of production nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) +## In state 526, spurious reduction of production cases(if_clause) -> nsepseq(case_clause(if_clause),VBAR) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip VBAR With ## -## Ends in an error in state: 536. +## Ends in an error in state: 530. ## ## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) VBAR . nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] ## @@ -2942,7 +2913,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW Skip With ## -## Ends in an error in state: 535. +## Ends in an error in state: 529. ## ## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . [ RBRACKET End ] ## nsepseq(case_clause(if_clause),VBAR) -> case_clause(if_clause) . VBAR nsepseq(case_clause(if_clause),VBAR) [ RBRACKET End ] @@ -2955,7 +2926,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD ARROW With ## -## Ends in an error in state: 506. +## Ends in an error in state: 500. ## ## case_clause(if_clause) -> pattern ARROW . if_clause [ VBAR RBRACKET End ] ## @@ -2967,7 +2938,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of WILD RPAR ## -## Ends in an error in state: 505. +## Ends in an error in state: 499. ## ## case_clause(if_clause) -> pattern . ARROW if_clause [ VBAR RBRACKET End ] ## @@ -2978,14 +2949,14 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 297, spurious reduction of production pattern -> core_pattern +## In state 298, spurious reduction of production pattern -> core_pattern ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim Of With ## -## Ends in an error in state: 502. +## Ends in an error in state: 496. ## ## case(if_clause) -> Case expr Of . option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## case(if_clause) -> Case expr Of . LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -2998,7 +2969,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case Verbatim VBAR ## -## Ends in an error in state: 501. +## Ends in an error in state: 495. ## ## case(if_clause) -> Case expr . Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## case(if_clause) -> Case expr . Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3011,13 +2982,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3026,7 +2997,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Case With ## -## Ends in an error in state: 500. +## Ends in an error in state: 494. ## ## case(if_clause) -> Case . expr Of option(VBAR) cases(if_clause) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## case(if_clause) -> Case . expr Of LBRACKET option(VBAR) cases(if_clause) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3039,7 +3010,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr DOT And With ## -## Ends in an error in state: 513. +## Ends in an error in state: 507. ## ## fun_call -> module_field . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3051,7 +3022,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Constr With ## -## Ends in an error in state: 492. +## Ends in an error in state: 486. ## ## module_field -> Constr . DOT module_fun [ LPAR ] ## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ LBRACKET ASS ] @@ -3064,7 +3035,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW Ident With ## -## Ends in an error in state: 476. +## Ends in an error in state: 470. ## ## for_loop -> For Ident option(arrow_clause) . In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3076,7 +3047,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ARROW With ## -## Ends in an error in state: 474. +## Ends in an error in state: 468. ## ## arrow_clause -> ARROW . Ident [ In ] ## @@ -3088,7 +3059,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim Step Verbatim VBAR ## -## Ends in an error in state: 489. +## Ends in an error in state: 483. ## ## for_loop -> For var_assign To expr Step expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3100,13 +3071,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3115,7 +3086,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim Step With ## -## Ends in an error in state: 488. +## Ends in an error in state: 482. ## ## for_loop -> For var_assign To expr Step . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3127,7 +3098,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To Verbatim VBAR ## -## Ends in an error in state: 487. +## Ends in an error in state: 481. ## ## for_loop -> For var_assign To expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## for_loop -> For var_assign To expr . Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3140,13 +3111,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3155,7 +3126,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes To With ## -## Ends in an error in state: 486. +## Ends in an error in state: 480. ## ## for_loop -> For var_assign To . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## for_loop -> For var_assign To . expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3168,7 +3139,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS Bytes VBAR ## -## Ends in an error in state: 485. +## Ends in an error in state: 479. ## ## for_loop -> For var_assign . To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## for_loop -> For var_assign . To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3181,23 +3152,23 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 473, spurious reduction of production var_assign -> Ident ASS expr +## In state 467, spurious reduction of production var_assign -> Ident ASS expr ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident ASS With ## -## Ends in an error in state: 472. +## Ends in an error in state: 466. ## ## var_assign -> Ident ASS . expr [ To ] ## @@ -3209,7 +3180,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In Set Verbatim VBAR ## -## Ends in an error in state: 482. +## Ends in an error in state: 476. ## ## for_loop -> For Ident option(arrow_clause) In collection expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3221,13 +3192,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3236,7 +3207,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In Set With ## -## Ends in an error in state: 481. +## Ends in an error in state: 475. ## ## for_loop -> For Ident option(arrow_clause) In collection . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3248,7 +3219,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident In With ## -## Ends in an error in state: 477. +## Ends in an error in state: 471. ## ## for_loop -> For Ident option(arrow_clause) In . collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3260,7 +3231,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For Ident With ## -## Ends in an error in state: 471. +## Ends in an error in state: 465. ## ## for_loop -> For Ident . option(arrow_clause) In collection expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## var_assign -> Ident . ASS expr [ To ] @@ -3273,7 +3244,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin For With ## -## Ends in an error in state: 470. +## Ends in an error in state: 464. ## ## for_loop -> For . var_assign To expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## for_loop -> For . var_assign To expr Step expr block [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3287,7 +3258,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident ASS With ## -## Ends in an error in state: 519. +## Ends in an error in state: 513. ## ## assignment -> lhs ASS . rhs [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3299,7 +3270,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident DOT Ident With ## -## Ends in an error in state: 512. +## Ends in an error in state: 506. ## ## lhs -> path . [ ASS ] ## map_lookup -> path . brackets(expr) [ ASS ] @@ -3311,16 +3282,16 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 132, spurious reduction of production nsepseq(selection,DOT) -> selection -## In state 341, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) -## In state 427, spurious reduction of production path -> projection +## In state 126, spurious reduction of production nsepseq(selection,DOT) -> selection +## In state 159, spurious reduction of production projection -> Ident DOT nsepseq(selection,DOT) +## In state 165, spurious reduction of production path -> projection ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident LBRACKET Bytes RBRACKET With ## -## Ends in an error in state: 518. +## Ends in an error in state: 512. ## ## assignment -> lhs . ASS rhs [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3332,7 +3303,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Ident With ## -## Ends in an error in state: 459. +## Ends in an error in state: 453. ## ## fun_call -> Ident . arguments [ VBAR SEMI RBRACKET RBRACE End Else ] ## path -> Ident . [ LBRACKET ASS ] @@ -3346,7 +3317,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then LBRACE Skip End ## -## Ends in an error in state: 570. +## Ends in an error in state: 564. ## ## clause_block -> LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3357,15 +3328,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 556, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 573, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## In state 550, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 567, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then LBRACE With ## -## Ends in an error in state: 458. +## Ends in an error in state: 452. ## ## clause_block -> LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3377,7 +3348,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip Else With ## -## Ends in an error in state: 576. +## Ends in an error in state: 570. ## ## conditional -> If expr Then if_clause option(SEMI) Else . if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3389,7 +3360,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip SEMI EQ ## -## Ends in an error in state: 575. +## Ends in an error in state: 569. ## ## conditional -> If expr Then if_clause option(SEMI) . Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3401,7 +3372,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then Skip With ## -## Ends in an error in state: 574. +## Ends in an error in state: 568. ## ## conditional -> If expr Then if_clause . option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3413,7 +3384,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim Then With ## -## Ends in an error in state: 457. +## Ends in an error in state: 451. ## ## conditional -> If expr Then . if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3425,7 +3396,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If Verbatim VBAR ## -## Ends in an error in state: 456. +## Ends in an error in state: 450. ## ## conditional -> If expr . Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3437,13 +3408,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3452,7 +3423,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin If With ## -## Ends in an error in state: 455. +## Ends in an error in state: 449. ## ## conditional -> If . expr Then if_clause option(SEMI) Else if_clause [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3462,45 +3433,9 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Constr DOT Ident With -## -## Ends in an error in state: 426. -## -## projection -> Constr DOT Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Constr DOT Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Constr DOT With -## -## Ends in an error in state: 425. -## -## projection -> Constr DOT . Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Constr DOT -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Constr With -## -## Ends in an error in state: 424. -## -## projection -> Constr . DOT Ident DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Constr -## - - - contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident VBAR ## -## Ends in an error in state: 432. +## Ends in an error in state: 426. ## ## map_patch -> Patch path . With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] ## record_patch -> Patch path . With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3513,27 +3448,14 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 423, spurious reduction of production path -> Ident -## - - - -contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident While -## -## Ends in an error in state: 423. -## -## path -> Ident . [ With VBAR SEMI RBRACKET RBRACE End Else ] -## projection -> Ident . DOT nsepseq(selection,DOT) [ With VBAR SEMI RBRACKET RBRACE End Else ] -## -## The known suffix of the stack is as follows: -## Ident +## In state 157, spurious reduction of production path -> Ident ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map LBRACKET Verbatim ARROW Bytes End ## -## Ends in an error in state: 448. +## Ends in an error in state: 442. ## ## ne_injection(Map,binding) -> Map LBRACKET sep_or_term_list(binding,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3545,25 +3467,25 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map LBRACKET With ## -## Ends in an error in state: 447. +## Ends in an error in state: 441. ## ## ne_injection(Map,binding) -> Map LBRACKET . sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3575,7 +3497,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map Verbatim ARROW Bytes RBRACKET ## -## Ends in an error in state: 450. +## Ends in an error in state: 444. ## ## ne_injection(Map,binding) -> Map sep_or_term_list(binding,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3587,25 +3509,25 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr -## In state 247, spurious reduction of production binding -> expr ARROW expr -## In state 248, spurious reduction of production nsepseq(binding,SEMI) -> binding -## In state 244, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) +## In state 248, spurious reduction of production binding -> expr ARROW expr +## In state 249, spurious reduction of production nsepseq(binding,SEMI) -> binding +## In state 245, spurious reduction of production sep_or_term_list(binding,SEMI) -> nsepseq(binding,SEMI) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Map With ## -## Ends in an error in state: 446. +## Ends in an error in state: 440. ## ## ne_injection(Map,binding) -> Map . sep_or_term_list(binding,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## ne_injection(Map,binding) -> Map . LBRACKET sep_or_term_list(binding,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3618,7 +3540,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record Ident EQ Bytes RBRACKET ## -## Ends in an error in state: 444. +## Ends in an error in state: 438. ## ## ne_injection(Record,field_assignment) -> Record sep_or_term_list(field_assignment,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3630,13 +3552,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -3648,7 +3570,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record LBRACKET Ident EQ Bytes End ## -## Ends in an error in state: 442. +## Ends in an error in state: 436. ## ## ne_injection(Record,field_assignment) -> Record LBRACKET sep_or_term_list(field_assignment,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3660,13 +3582,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 384, spurious reduction of production field_assignment -> Ident EQ expr @@ -3678,7 +3600,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record LBRACKET With ## -## Ends in an error in state: 441. +## Ends in an error in state: 435. ## ## ne_injection(Record,field_assignment) -> Record LBRACKET . sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3690,7 +3612,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Record With ## -## Ends in an error in state: 440. +## Ends in an error in state: 434. ## ## ne_injection(Record,field_assignment) -> Record . sep_or_term_list(field_assignment,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## ne_injection(Record,field_assignment) -> Record . LBRACKET sep_or_term_list(field_assignment,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3703,7 +3625,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set LBRACKET Verbatim End ## -## Ends in an error in state: 436. +## Ends in an error in state: 430. ## ## ne_injection(Set,expr) -> Set LBRACKET sep_or_term_list(expr,SEMI) . RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3715,13 +3637,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -3732,7 +3654,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set LBRACKET With ## -## Ends in an error in state: 435. +## Ends in an error in state: 429. ## ## ne_injection(Set,expr) -> Set LBRACKET . sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3744,7 +3666,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set Verbatim RBRACKET ## -## Ends in an error in state: 438. +## Ends in an error in state: 432. ## ## ne_injection(Set,expr) -> Set sep_or_term_list(expr,SEMI) . End [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3756,13 +3678,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## In state 365, spurious reduction of production nsepseq(expr,SEMI) -> expr @@ -3773,7 +3695,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With Set With ## -## Ends in an error in state: 434. +## Ends in an error in state: 428. ## ## ne_injection(Set,expr) -> Set . sep_or_term_list(expr,SEMI) End [ VBAR SEMI RBRACKET RBRACE End Else ] ## ne_injection(Set,expr) -> Set . LBRACKET sep_or_term_list(expr,SEMI) RBRACKET [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3786,7 +3708,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch Ident With With ## -## Ends in an error in state: 433. +## Ends in an error in state: 427. ## ## map_patch -> Patch path With . ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] ## record_patch -> Patch path With . ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3800,7 +3722,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Patch With ## -## Ends in an error in state: 431. +## Ends in an error in state: 425. ## ## map_patch -> Patch . path With ne_injection(Map,binding) [ VBAR SEMI RBRACKET RBRACE End Else ] ## record_patch -> Patch . path With ne_injection(Record,field_assignment) [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3814,7 +3736,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Map With ## -## Ends in an error in state: 429. +## Ends in an error in state: 423. ## ## map_remove -> Remove expr From Map . path [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3826,7 +3748,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From Set With ## -## Ends in an error in state: 422. +## Ends in an error in state: 421. ## ## set_remove -> Remove expr From Set . path [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3838,7 +3760,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim From With ## -## Ends in an error in state: 421. +## Ends in an error in state: 420. ## ## map_remove -> Remove expr From . Map path [ VBAR SEMI RBRACKET RBRACE End Else ] ## set_remove -> Remove expr From . Set path [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3851,7 +3773,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove Verbatim VBAR ## -## Ends in an error in state: 420. +## Ends in an error in state: 419. ## ## map_remove -> Remove expr . From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] ## set_remove -> Remove expr . From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3864,13 +3786,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -3879,7 +3801,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Remove With ## -## Ends in an error in state: 419. +## Ends in an error in state: 418. ## ## map_remove -> Remove . expr From Map path [ VBAR SEMI RBRACKET RBRACE End Else ] ## set_remove -> Remove . expr From Set path [ VBAR SEMI RBRACKET RBRACE End Else ] @@ -3892,7 +3814,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End While ## -## Ends in an error in state: 467. +## Ends in an error in state: 461. ## ## open_fun_decl -> Function Ident parameters COLON type_expr Is block . With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -3904,7 +3826,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End With With ## -## Ends in an error in state: 468. +## Ends in an error in state: 462. ## ## open_fun_decl -> Function Ident parameters COLON type_expr Is block With . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -3916,7 +3838,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip RBRACE ## -## Ends in an error in state: 578. +## Ends in an error in state: 572. ## ## block -> Begin sep_or_term_list(statement,SEMI) . End [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -3927,15 +3849,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 556, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 573, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## In state 550, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 567, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI Skip SEMI With ## -## Ends in an error in state: 559. +## Ends in an error in state: 553. ## ## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] ## seq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] @@ -3948,7 +3870,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI Skip With ## -## Ends in an error in state: 558. +## Ends in an error in state: 552. ## ## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] ## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] @@ -3962,7 +3884,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip SEMI With ## -## Ends in an error in state: 557. +## Ends in an error in state: 551. ## ## nsepseq(statement,SEMI) -> statement SEMI . nsepseq(statement,SEMI) [ RBRACE End ] ## nseq(__anonymous_0(statement,SEMI)) -> statement SEMI . seq(__anonymous_0(statement,SEMI)) [ RBRACE End ] @@ -3975,7 +3897,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip With ## -## Ends in an error in state: 556. +## Ends in an error in state: 550. ## ## nsepseq(statement,SEMI) -> statement . [ RBRACE End ] ## nsepseq(statement,SEMI) -> statement . SEMI nsepseq(statement,SEMI) [ RBRACE End ] @@ -3989,7 +3911,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String ASS With ## -## Ends in an error in state: 415. +## Ends in an error in state: 414. ## ## unqualified_decl(ASS) -> Ident COLON type_expr ASS . expr [ SEMI RBRACE End ] ## @@ -4001,7 +3923,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON String VBAR ## -## Ends in an error in state: 414. +## Ends in an error in state: 413. ## ## unqualified_decl(ASS) -> Ident COLON type_expr . ASS expr [ SEMI RBRACE End ] ## @@ -4021,7 +3943,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident COLON With ## -## Ends in an error in state: 413. +## Ends in an error in state: 412. ## ## unqualified_decl(ASS) -> Ident COLON . type_expr ASS expr [ SEMI RBRACE End ] ## @@ -4033,7 +3955,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var Ident With ## -## Ends in an error in state: 412. +## Ends in an error in state: 411. ## ## unqualified_decl(ASS) -> Ident . COLON type_expr ASS expr [ SEMI RBRACE End ] ## @@ -4045,7 +3967,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Var With ## -## Ends in an error in state: 411. +## Ends in an error in state: 410. ## ## open_var_decl -> Var . unqualified_decl(ASS) [ SEMI RBRACE End ] ## @@ -4057,7 +3979,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While Verbatim VBAR ## -## Ends in an error in state: 409. +## Ends in an error in state: 408. ## ## while_loop -> While expr . block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4069,13 +3991,13 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 195, spurious reduction of production unary_expr -> core_expr -## In state 149, spurious reduction of production mult_expr -> unary_expr -## In state 171, spurious reduction of production add_expr -> mult_expr +## In state 143, spurious reduction of production mult_expr -> unary_expr +## In state 172, spurious reduction of production add_expr -> mult_expr ## In state 201, spurious reduction of production cons_expr -> add_expr ## In state 198, spurious reduction of production cat_expr -> cons_expr ## In state 221, spurious reduction of production comp_expr -> cat_expr ## In state 208, spurious reduction of production set_membership -> comp_expr -## In state 151, spurious reduction of production conj_expr -> set_membership +## In state 145, spurious reduction of production conj_expr -> set_membership ## In state 225, spurious reduction of production disj_expr -> conj_expr ## In state 193, spurious reduction of production expr -> disj_expr ## @@ -4084,7 +4006,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin While With ## -## Ends in an error in state: 408. +## Ends in an error in state: 407. ## ## while_loop -> While . expr block [ VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4096,7 +4018,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin With ## -## Ends in an error in state: 410. +## Ends in an error in state: 409. ## ## block -> Begin . sep_or_term_list(statement,SEMI) End [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4108,7 +4030,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block LBRACE Skip End ## -## Ends in an error in state: 581. +## Ends in an error in state: 575. ## ## block -> Block LBRACE sep_or_term_list(statement,SEMI) . RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4119,15 +4041,15 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 556, spurious reduction of production nsepseq(statement,SEMI) -> statement -## In state 573, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) +## In state 550, spurious reduction of production nsepseq(statement,SEMI) -> statement +## In state 567, spurious reduction of production sep_or_term_list(statement,SEMI) -> nsepseq(statement,SEMI) ## contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block LBRACE With ## -## Ends in an error in state: 407. +## Ends in an error in state: 406. ## ## block -> Block LBRACE . sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4139,7 +4061,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block With ## -## Ends in an error in state: 406. +## Ends in an error in state: 405. ## ## block -> Block . LBRACE sep_or_term_list(statement,SEMI) RBRACE [ With VBAR SEMI RBRACKET RBRACE End Else ] ## @@ -4151,7 +4073,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Block contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With ## -## Ends in an error in state: 465. +## Ends in an error in state: 459. ## ## open_fun_decl -> Function Ident parameters COLON type_expr Is . block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function Ident parameters COLON type_expr Is . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4164,7 +4086,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is With contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String VBAR ## -## Ends in an error in state: 464. +## Ends in an error in state: 458. ## ## open_fun_decl -> Function Ident parameters COLON type_expr . Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function Ident parameters COLON type_expr . Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4185,7 +4107,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON String VBAR contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON With ## -## Ends in an error in state: 463. +## Ends in an error in state: 457. ## ## open_fun_decl -> Function Ident parameters COLON . type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function Ident parameters COLON . type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4198,7 +4120,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR COLON With contract: Function Ident LPAR Const Ident COLON Ident RPAR With ## -## Ends in an error in state: 462. +## Ends in an error in state: 456. ## ## open_fun_decl -> Function Ident parameters . COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function Ident parameters . COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4211,7 +4133,7 @@ contract: Function Ident LPAR Const Ident COLON Ident RPAR With contract: Function Ident With ## -## Ends in an error in state: 461. +## Ends in an error in state: 455. ## ## open_fun_decl -> Function Ident . parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function Ident . parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4224,7 +4146,7 @@ contract: Function Ident With contract: Function With ## -## Ends in an error in state: 460. +## Ends in an error in state: 454. ## ## open_fun_decl -> Function . Ident parameters COLON type_expr Is block With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## open_fun_decl -> Function . Ident parameters COLON type_expr Is expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] @@ -4237,7 +4159,7 @@ contract: Function With contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End While ## -## Ends in an error in state: 584. +## Ends in an error in state: 578. ## ## open_fun_decl -> Recursive Function Ident parameters COLON type_expr Is block . With expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## @@ -4249,7 +4171,7 @@ contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON Strin contract: Recursive Function Ident LPAR Const Ident COLON Ident RPAR COLON String Is Begin Skip End With With ## -## Ends in an error in state: 585. +## Ends in an error in state: 579. ## ## open_fun_decl -> Recursive Function Ident parameters COLON type_expr Is block With . expr [ Type SEMI Recursive RBRACE Function End EOF Const Attributes ] ## diff --git a/src/passes/01-parser/reasonligo.ml b/src/passes/01-parser/reasonligo.ml index 1af70c927..dea9eb5a8 100644 --- a/src/passes/01-parser/reasonligo.ml +++ b/src/passes/01-parser/reasonligo.ml @@ -8,6 +8,7 @@ module Region = Simple_utils.Region module ParErr = Parser_reasonligo.ParErr module SyntaxError = Parser_reasonligo.SyntaxError module SSet = Set.Make (String) +module Pretty = Parser_reasonligo.Pretty (* Mock IOs TODO: Fill them with CLI options *) @@ -22,7 +23,8 @@ module SubIO = ext : string; (* ".religo" *) mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -37,6 +39,7 @@ module SubIO = method mode = `Point method cmd = EvalOpt.Quiet method mono = false + method pretty = false end let make = @@ -49,6 +52,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#pretty end module Parser = @@ -178,3 +182,18 @@ let parse_expression source = apply (fun () -> Unit.expr_in_string source) (* Preprocessing a contract in a file *) let preprocess source = apply (fun () -> Unit.preprocess source) + +(* Pretty-print a file (after parsing it). *) + +let pretty_print source = + match parse_file source with + Stdlib.Error _ as e -> e + | Ok ast -> + let doc = Pretty.print (fst ast) in + let buffer = Buffer.create 131 in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + let () = PPrint.ToBuffer.pretty 1.0 width buffer doc + in Trace.ok buffer diff --git a/src/passes/01-parser/reasonligo.mli b/src/passes/01-parser/reasonligo.mli index 890618a95..e51ebdb12 100644 --- a/src/passes/01-parser/reasonligo.mli +++ b/src/passes/01-parser/reasonligo.mli @@ -19,3 +19,6 @@ val parse_expression : string -> AST.expr Trace.result (** Preprocess a given ReasonLIGO file and preprocess it. *) val preprocess : string -> Buffer.t Trace.result + +(** Pretty-print a given CameLIGO file (after parsing it). *) +val pretty_print : string -> Buffer.t Trace.result diff --git a/src/passes/01-parser/reasonligo/.links b/src/passes/01-parser/reasonligo/.links index 214b46e6c..e85766c2b 100644 --- a/src/passes/01-parser/reasonligo/.links +++ b/src/passes/01-parser/reasonligo/.links @@ -27,5 +27,3 @@ Stubs/Parser_cameligo.ml ../cameligo/ParserLog.ml ../cameligo/Scoping.mli ../cameligo/Scoping.ml - -$HOME/git/ligo/_build/default/src/passes/1-parser/reasonligo/ParErr.ml diff --git a/src/passes/01-parser/reasonligo/Parser.mly b/src/passes/01-parser/reasonligo/Parser.mly index 998279770..6f85f729a 100644 --- a/src/passes/01-parser/reasonligo/Parser.mly +++ b/src/passes/01-parser/reasonligo/Parser.mly @@ -125,7 +125,7 @@ nsepseq(item,sep): (* Non-empty comma-separated values (at least two values) *) tuple(item): - item "," nsepseq(item,",") { let h,t = $3 in $1,($2,h)::t } + item "," nsepseq(item,",") { let h,t = $3 in $1, ($2,h)::t } (* Possibly empty semicolon-separated values between brackets *) @@ -279,15 +279,12 @@ let_binding: | par(closed_irrefutable) type_annotation? "=" expr { wild_error $4; Scoping.check_pattern $1.value.inside; - {binders = PPar $1, []; lhs_type=$2; eq=$3; let_rhs=$4} + {binders = $1.value.inside, []; lhs_type=$2; eq=$3; let_rhs=$4} } | tuple(sub_irrefutable) type_annotation? "=" expr { wild_error $4; Utils.nsepseq_iter Scoping.check_pattern $1; - let hd, tl = $1 in - let start = pattern_to_region hd in - let stop = last fst tl in - let region = cover start stop in + let region = nsepseq_to_region pattern_to_region $1 in let binders = PTuple {value=$1; region}, [] in {binders; lhs_type=$2; eq=$3; let_rhs=$4} } @@ -433,7 +430,18 @@ type_expr_simple: TProd {region = cover $1 $3; value=$2} } | "(" type_expr_simple "=>" type_expr_simple ")" { - TFun {region = cover $1 $5; value=$2,$3,$4} } + TPar { + value = { + lpar = $1; + rpar = $5; + inside = TFun { + region = cover (type_expr_to_region $2) (type_expr_to_region $4); + value=$2,$3,$4 + } + }; + region = cover $1 $5; + } +} type_annotation_simple: ":" type_expr_simple { $1,$2 } @@ -456,8 +464,15 @@ fun_expr(right_expr): ) | EAnnot {region; value = {inside = EVar v, colon, typ; _}} -> Scoping.check_reserved_name v; - let value = {pattern = PVar v; colon; type_expr = typ} - in PTyped {region; value} + let value = {pattern = PVar v; colon; type_expr = typ} in + PPar { + value = { + lpar = Region.ghost; + rpar = Region.ghost; + inside = PTyped {region; value} + }; + region + } | EPar p -> let value = {p.value with inside = arg_to_pattern p.value.inside} @@ -497,7 +512,13 @@ fun_expr(right_expr): (arg_to_pattern fun_arg, []) | EPar {value = {inside = EFun { value = { - binders = PTyped { value = { pattern; colon; type_expr }; region = fun_region }, []; + binders = PPar { + value = { + inside = PTyped { value = { pattern; colon; type_expr }; region = fun_region }; + _ + }; + _ + }, []; arrow; body; _ @@ -531,7 +552,7 @@ fun_expr(right_expr): }; region; }, [] - | EPar {value = {inside = fun_arg; _ }; _} -> + | EPar {value = {inside = fun_arg; _ }; _} -> arg_to_pattern fun_arg, [] | EAnnot _ as e -> arg_to_pattern e, [] @@ -656,7 +677,7 @@ disj_expr_level: disj_expr | conj_expr_level { $1 } | par(tuple(disj_expr_level)) type_annotation_simple? { - let region = $1.region in + let region = nsepseq_to_region expr_to_region $1.value.inside in let tuple = ETuple {value=$1.value.inside; region} in let region = match $2 with @@ -891,9 +912,9 @@ update_record: lbrace = $1; record = $3; kwd_with = $4; - updates = {value = {compound = Braces($1,$6); - ne_elements; - terminator}; + updates = {value = {compound = Braces (ghost, ghost); + ne_elements; + terminator}; region = cover $4 $6}; rbrace = $6} in {region; value} } @@ -902,48 +923,47 @@ expr_with_let_expr: expr | let_expr(expr_with_let_expr) { $1 } -exprs: - expr_with_let_expr ";"? { - (($1, []), $2) +exprs: + expr_with_let_expr ";"? { + (($1, []), $2) } | expr_with_let_expr ";" exprs { let rec fix_let_in a b c = - match a with + match a with | ELetIn {value = {body; _} as v; _} -> ( let end_ = (nsepseq_to_region expr_to_region (fst c)) in - let sequence_region = + let sequence_region = cover (expr_to_region body) end_ in - let val_ = - match body with + 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) - }; + compound = BeginEnd (ghost, ghost); + elements = Some val_; + terminator = snd c}; region = sequence_region } - in - let region = + in + let region = cover (expr_to_region a) end_ in - let let_in = - ELetIn { + let let_in = + ELetIn { value = { v with body = sequence - }; - region + }; + region } in - ((let_in, []), snd c) + ((let_in, []), snd c) ) | e -> Utils.nsepseq_cons e b (fst c), None - in + in fix_let_in $1 $2 $3 } @@ -952,25 +972,24 @@ more_field_assignments: let elts, _region = $2 in $1, elts } -sequence: +sequence: "{" exprs "}" { - let elts, _region = $2 in + 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} - } + let value = {compound; + elements = Some elts; + terminator = None} in + let region = cover $1 $3 + in {region; value} } -record: +record: "{" field_assignment more_field_assignments? "}" { let compound = Braces ($1,$4) in let region = cover $1 $4 in match $3 with | Some (comma, elts) -> - let ne_elements = Utils.nsepseq_cons $2 comma elts in + let ne_elements = Utils.nsepseq_cons $2 comma elts in { value = {compound; ne_elements; terminator = None}; region } | None -> let ne_elements = ($2,[]) in @@ -986,55 +1005,29 @@ record: 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 } - } + {value = {compound; ne_elements; terminator = None}; region} } field_assignment_punning: (* This can only happen with multiple fields - one item punning does NOT work in ReasonML *) field_name { - let value = { - field_name = $1; - assignment = ghost; - field_expr = EVar $1 } + let value = {field_name = $1; + assignment = ghost; + field_expr = EVar $1} in {$1 with value} } | field_assignment { $1 } field_assignment: field_name ":" expr { - let start = $1.region in - let stop = expr_to_region $3 in - let region = cover start stop in - let value = { - field_name = $1; - assignment = $2; - field_expr = $3} + let region = cover $1.region (expr_to_region $3) + and value = {field_name = $1; + assignment = $2; + field_expr = $3} in {region; value} } -real_selection: - field_name { FieldName $1 } -| "" { Component $1 } - field_path_assignment: - real_selection { - let region = selection_to_region $1 - and value = { - field_path = ($1,[]); - assignment = ghost; - field_expr = match $1 with - FieldName var -> EVar var - | Component {value;region} -> - let value = Z.to_string (snd value) in - EVar {value;region} } - in {region; value} - } -| nsepseq(real_selection,".") ":" expr { - let start = nsepseq_to_region selection_to_region $1 - and stop = expr_to_region $3 in - let region = cover start stop - and value = { - field_path = $1; - assignment = $2; - field_expr = $3} + path ":" expr { + let region = cover (path_to_region $1) (expr_to_region $3) + and value = {field_path=$1; assignment=$2; field_expr=$3} in {region; value} } diff --git a/src/passes/01-parser/reasonligo/ParserMain.ml b/src/passes/01-parser/reasonligo/ParserMain.ml index 1c173bee0..3dd94d37e 100644 --- a/src/passes/01-parser/reasonligo/ParserMain.ml +++ b/src/passes/01-parser/reasonligo/ParserMain.ml @@ -22,7 +22,8 @@ module SubIO = ext : string; mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > let options : options = @@ -36,6 +37,7 @@ module SubIO = method mode = IO.options#mode method cmd = IO.options#cmd method mono = IO.options#mono + method pretty = IO.options#pretty end let make = @@ -48,6 +50,7 @@ module SubIO = ~mode:options#mode ~cmd:options#cmd ~mono:options#mono + ~pretty:options#pretty end module Parser = @@ -67,12 +70,23 @@ module ParserLog = module Lexer = Lexer.Make (LexToken) module Unit = - ParserUnit.Make (Lexer)(AST)(Parser)(ParErr)(ParserLog)(SubIO) + ParserUnit.Make (Lexer)(AST)(Parser)(Parser_msg)(ParserLog)(SubIO) (* Main *) let wrap = function - Stdlib.Ok _ -> flush_all () + Stdlib.Ok ast -> + if IO.options#pretty then + begin + let doc = Pretty.print ast in + let width = + match Terminal_size.get_columns () with + None -> 60 + | Some c -> c in + PPrint.ToChannel.pretty 1.0 width stdout doc; + print_newline () + end; + flush_all () | Error msg -> (flush_all (); Printf.eprintf "\027[31m%s\027[0m%!" msg.Region.value) diff --git a/src/passes/01-parser/reasonligo/Pretty.ml b/src/passes/01-parser/reasonligo/Pretty.ml new file mode 100644 index 000000000..d0d4cbf80 --- /dev/null +++ b/src/passes/01-parser/reasonligo/Pretty.ml @@ -0,0 +1,471 @@ +[@@@warning "-42"] + +open AST +module Region = Simple_utils.Region +open! Region +open! PPrint + +let rec print ast = + let app decl = group (pp_declaration decl) in + separate_map (hardline ^^ hardline) app (Utils.nseq_to_list ast.decl) + +and pp_declaration = function + Let decl -> pp_let_decl decl +| TypeDecl decl -> pp_type_decl decl + +and pp_let_decl = function +| {value = (_,rec_opt, binding, attr); _} -> + let let_str = + match rec_opt with + None -> "let " + | Some _ -> "let rec " in + let bindings = pp_let_binding let_str binding + and attr = pp_attributes attr + in group (attr ^^ bindings ^^ string ";") + +and pp_attributes = function + [] -> empty +| attr -> + let make s = string "[@" ^^ string s.value ^^ string "]" in + group (break 0 ^^ separate_map (break 0) make attr) ^^ hardline + +and pp_ident {value; _} = string value + +and pp_string s = string "\"" ^^ pp_ident s ^^ string "\"" + +and pp_verbatim s = string "{|" ^^ pp_ident s ^^ string "|}" + +and pp_let_binding let_ (binding : let_binding) = + let {binders; lhs_type; let_rhs; _} = binding in + let patterns = Utils.nseq_to_list binders in + let patterns = group (separate_map (break 0) pp_pattern patterns) in + let lhs = + string let_ ^^ + match lhs_type with + None -> patterns ^^ string " = " + | Some (_,e) -> + patterns ^^ group (break 0 ^^ string ": " ^^ pp_type_expr e ^^ string " = ") + in + let rhs = pp_expr let_rhs in + match let_rhs with + | EFun _ + | ESeq _ + | ERecord _ -> lhs ^^ rhs + | _ -> prefix 2 0 lhs rhs + +and pp_pattern = function + PConstr p -> pp_pconstr p +| PUnit _ -> string "()" +| PFalse _ -> string "false" +| PTrue _ -> string "true" +| PVar v -> pp_ident v +| PInt i -> pp_int i +| PNat n -> pp_nat n +| PBytes b -> pp_bytes b +| PString s -> pp_string s +| PVerbatim s -> pp_verbatim s +| PWild _ -> string "_" +| PList l -> pp_plist l +| PTuple t -> pp_ptuple t +| PPar p -> pp_ppar p +| PRecord r -> pp_precord r +| PTyped t -> pp_ptyped t + +and pp_pconstr = function + PNone _ -> string "None" +| PSomeApp p -> pp_patt_some p +| PConstrApp a -> pp_patt_c_app a + +and pp_patt_c_app {value; _} = + match value with + constr, None -> pp_ident constr + | constr, Some (PVar _ as pat) -> + prefix 2 1 (pp_ident constr) (pp_pattern pat) + | constr, Some (_ as pat)-> + prefix 2 0 (pp_ident constr) (pp_pattern pat) + +and pp_patt_some {value; _} = + prefix 2 0 (string "Some") (pp_pattern (snd value)) + +and pp_int {value; _} = + string (Z.to_string (snd value)) + +and pp_nat {value; _} = + string (Z.to_string (snd value) ^ "n") + +and pp_bytes {value; _} = + string ("0x" ^ Hex.show (snd value)) + +and pp_ppar {value; _} = + if value.lpar = Region.ghost then + nest 1 (pp_pattern value.inside) + else + string "(" ^^ nest 1 (pp_pattern value.inside) ^^ string ")" + +and pp_plist = function + PListComp cmp -> pp_list_comp cmp +| PCons cons -> pp_cons cons + +and pp_list_comp e = group (pp_injection pp_pattern e) + +and pp_cons {value; _} = + let patt1, _, patt2 = value in + string "[" ^^ (pp_pattern patt1 ^^ string ", ") ^^ group ( break 0 ^^ string "..." ^^ pp_pattern patt2) ^^ string "]" + +and pp_ptuple {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [p] -> group (break 1 ^^ pp_pattern p) + | p::items -> + group (break 1 ^^ pp_pattern p ^^ string ",") ^^ app items + in if tail = [] + then string "(" ^^ nest 1 (pp_pattern head) ^^ string ")" + else string "(" ^^ nest 1 (pp_pattern head ^^ string "," ^^ app (List.map snd tail)) ^^ string ")" + +and pp_precord fields = pp_ne_injection pp_field_pattern fields + +and pp_field_pattern {value; _} = + let {field_name; pattern; _} = value in + prefix 2 1 (pp_ident field_name ^^ string " =") (pp_pattern pattern) + +and pp_ptyped {value; _} = + let {pattern; type_expr; _} = value in + group (pp_pattern pattern ^^ string ": " ^^ pp_type_expr type_expr) + +and pp_type_decl decl = + let {name; type_expr; _} = decl.value in + string "type " ^^ string name.value ^^ string " = " + ^^ group (pp_type_expr type_expr) ^^ string ";" + +and pp_expr = function + ECase e -> pp_case_expr e +| ECond e -> group (pp_cond_expr e) +| EAnnot e -> pp_annot_expr e +| ELogic e -> pp_logic_expr e +| EArith e -> group (pp_arith_expr e) +| EString e -> pp_string_expr e +| EList e -> group (pp_list_expr e) +| EConstr e -> pp_constr_expr e +| ERecord e -> pp_record_expr e +| EProj e -> pp_projection e +| EUpdate e -> pp_update e +| EVar v -> pp_ident v +| ECall e -> pp_call_expr e +| EBytes e -> pp_bytes e +| EUnit _ -> string "()" +| ETuple e -> pp_tuple_expr e +| EPar e -> pp_par_expr e +| ELetIn e -> pp_let_in e +| EFun e -> pp_fun e +| ESeq e -> pp_seq e + +and pp_case_expr {value; _} = + let {expr; cases; _} = value in + group (string "switch" ^^ string "(" ^^ nest 1 (pp_expr expr) + ^^ string ") " ^^ string "{" + ^^ pp_cases cases ^^ hardline ^^ string "}") + +and pp_cases {value; _} = + let head, tail = value in + let rest = List.map snd tail in + let app clause = break 1 ^^ string "| " ^^ pp_clause clause + in concat_map app (head :: rest) + +and pp_clause {value; _} = + let {pattern; rhs; _} = value in + prefix 4 1 (pp_pattern pattern ^^ string " =>") (pp_expr rhs) + +and pp_cond_expr {value; _} = + let {test; ifso; kwd_else; ifnot; _} = value in + let if_then = + string "if" ^^ string " (" ^^ pp_expr test ^^ string ")" ^^ string " {" ^^ break 0 + ^^ group (nest 2 (break 2 ^^ pp_expr ifso)) ^^ hardline ^^ string "}" in + if kwd_else#is_ghost then + if_then + else + if_then + ^^ string " else" ^^ string " {" ^^ break 0 ^^ group (nest 2 (break 2 ^^ pp_expr ifnot)) ^^ hardline ^^ string "}" + +and pp_annot_expr {value; _} = + let expr, _, type_expr = value.inside in + group (nest 1 (pp_expr expr ^/^ string ": " + ^^ pp_type_expr type_expr)) + +and pp_logic_expr = function + BoolExpr e -> pp_bool_expr e +| CompExpr e -> pp_comp_expr e + +and pp_bool_expr = function + Or e -> pp_bin_op "||" e +| And e -> pp_bin_op "&&" e +| Not e -> pp_un_op "!" e +| True _ -> string "true" +| False _ -> string "false" + +and pp_bin_op op {value; _} = + let {arg1; arg2; _} = value + and length = String.length op + 1 in + pp_expr arg1 ^^ string " " ^^ string (op ^ " ") ^^ nest length (pp_expr arg2) + +and pp_un_op op {value; _} = + string (op ^ " ") ^^ pp_expr value.arg + +and pp_comp_expr = function + Lt e -> pp_bin_op "<" e +| Leq e -> pp_bin_op "<=" e +| Gt e -> pp_bin_op ">" e +| Geq e -> pp_bin_op ">=" e +| Equal e -> pp_bin_op "==" e +| Neq e -> pp_bin_op "!=" e + +and pp_arith_expr = function + Add e -> pp_bin_op "+" e +| Sub e -> pp_bin_op "-" e +| Mult e -> pp_bin_op "*" e +| Div e -> pp_bin_op "/" e +| Mod e -> pp_bin_op "mod" e +| Neg e -> string "-" ^^ pp_expr e.value.arg +| Int e -> pp_int e +| Nat e -> pp_nat e +| Mutez e -> pp_mutez e + +and pp_mutez {value; _} = + Z.to_string (snd value) ^ "mutez" |> string + +and pp_string_expr = function + Cat e -> pp_bin_op "++" e +| String e -> pp_string e +| Verbatim e -> pp_verbatim e + +and pp_list_expr = function +| ECons {value = {arg1; arg2; _}; _ } -> + string "[" ^^ pp_expr arg1 ^^ string "," ^^ break 1 ^^ string "..." ^^ pp_expr arg2 ^^ string "]" +| EListComp e -> group (pp_injection pp_expr e) + +and pp_injection : + 'a.('a -> document) -> 'a injection reg -> document = + fun printer {value; _} -> + let {compound; elements; _} = value in + let sep = (string ",") ^^ break 1 in + let elements = Utils.sepseq_to_list elements in + let elements = separate_map sep printer elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening ^^ nest 1 elements ^^ string closing + +and pp_compound = function + BeginEnd (start, _) -> + if start#is_ghost then None else Some ("begin","end") +| Braces (start, _) -> + if start#is_ghost then None else Some ("{","}") +| Brackets (start, _) -> + if start#is_ghost then None else Some ("[","]") + +and pp_constr_expr = function + ENone _ -> string "None" +| ESomeApp a -> pp_some a +| EConstrApp a -> pp_constr_app a + +and pp_some {value=_, e; _} = + prefix 4 1 (string "Some") (pp_expr e) + +and pp_constr_app {value; _} = + let constr, arg = value in + let constr = string constr.value in + match arg with + None -> constr + | Some e -> prefix 2 1 constr (pp_expr e) + +and pp_record_expr ne_inj = pp_ne_injection pp_field_assign ne_inj + +and pp_field_assign {value; _} = + let {field_name; field_expr; _} = value in + prefix 2 1 (pp_ident field_name ^^ string ":") (pp_expr field_expr) + +and pp_ne_injection : + 'a.('a -> document) -> 'a ne_injection reg -> document = + fun printer {value; _} -> + let {compound; ne_elements; _} = value in + let elements = pp_nsepseq "," printer ne_elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening ^^ nest 2 (break 0 ^^ elements) ^^ break 1 ^^ string closing + +and pp_nsepseq : + 'a.string -> ('a -> document) -> ('a, t) Utils.nsepseq -> document = + fun sep printer elements -> + let elems = Utils.nsepseq_to_list elements + and sep = string sep ^^ break 1 + in separate_map sep printer elems + +and pp_projection {value; _} = + let {struct_name; field_path; _} = value in + let subpath = Utils.nsepseq_to_list field_path in + let subpath = concat_map pp_selection subpath in + group (pp_ident struct_name ^^ subpath) + +and pp_selection = function + FieldName v -> string "." ^^ break 0 ^^ string v.value +| Component cmp -> + string "[" ^^ (cmp.value |> snd |> Z.to_string |> string) ^^ string "]" + +and pp_update {value; _} = + let {record; updates; _} = value in + let updates = group (pp_ne_injection pp_field_path_assign updates) + and record = pp_path record in + string "{..." ^^ record ^^ string "," + ^^ nest 2 (break 1 ^^ updates ^^ string "}") + +and pp_field_path_assign {value; _} = + let {field_path; field_expr; _} = value in + let path = pp_path field_path in + prefix 2 1 (path ^^ string ":") (pp_expr field_expr) + +and pp_path = function + Name v -> pp_ident v +| Path p -> pp_projection p + +and pp_call_expr {value; _} = + let lambda, arguments = value in + let arguments = Utils.nseq_to_list arguments in + let arguments = string "(" ^^ group (separate_map (string "," ^^ break 0 ^^ string " ") pp_expr arguments) ^^ string ")" in + group (break 0 ^^ pp_expr lambda ^^ nest 2 arguments) + +and pp_tuple_expr {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_expr e) + | e::items -> + group (break 1 ^^ pp_expr e ^^ string ",") ^^ app items + in if tail = [] + then string "(" ^^ nest 1 (pp_expr head) ^^ string ")" + else string "(" ^^ nest 1 (pp_expr head ^^ string "," ^^ app (List.map snd tail)) ^^ string ")" + +and pp_par_expr {value; _} = + string "(" ^^ nest 1 (pp_expr value.inside ^^ string ")") + +and pp_let_in {value; _} = + let {binding; kwd_rec; body; attributes; _} = value in + let let_str = + match kwd_rec with + None -> "let " + | Some _ -> "let rec " in + let bindings = pp_let_binding let_str binding + and attr = pp_attributes attributes + in attr ^^ bindings + ^^ string ";" ^^ hardline ^^ pp_expr body + +and pp_fun {value; _} = + let {binders; lhs_type; body; _} = value in + let patterns = Utils.nseq_to_list binders in + let binders = group (separate_map (string "," ^^ break 0 ^^ string " ") pp_pattern patterns) + and annot = + match lhs_type with + None -> empty + | Some (_,e) -> + group (break 0 ^^ string ": " ^^ nest 2 (pp_type_expr e)) + in + match body with + | ESeq _ -> string "(" ^^ nest 1 binders ^^ string ")" ^^ annot ^^ string " => " ^^ pp_expr body + | _ -> (prefix 2 0 (string "(" ^^ nest 1 binders ^^ string ")" ^^ annot + ^^ string " => ") (pp_expr body)) + +and pp_seq {value; _} = + let {compound; elements; _} = value in + let sep = string ";" ^^ hardline in + let elements = Utils.sepseq_to_list elements in + let elements = separate_map sep pp_expr elements in + match pp_compound compound with + None -> elements + | Some (opening, closing) -> + string opening + ^^ nest 2 (hardline ^^ elements) ^^ hardline + ^^ string closing + +and pp_type_expr = function + TProd t -> pp_cartesian t +| TSum t -> break 0 ^^ pp_variants t +| TRecord t -> pp_fields t +| TApp t -> pp_type_app t +| TFun t -> pp_fun_type t +| TPar t -> pp_type_par t +| TVar t -> pp_ident t +| TString s -> pp_string s + +and pp_cartesian {value; _} = + let head, tail = value in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string ",") ^^ app items + in + string "(" ^^ nest 1 (pp_type_expr head ^^ (if tail <> [] then string "," else empty) ^^ app (List.map snd tail)) ^^ string ")" + +and pp_variants {value; _} = + let head, tail = value in + let head = pp_variant head in + let head = if tail = [] then head + else ifflat head (string " " ^^ head) in + let rest = List.map snd tail in + let app variant = break 1 ^^ string "| " ^^ pp_variant variant + in head ^^ concat_map app rest + +and pp_variant {value; _} = + let {constr; arg} = value in + match arg with + None -> pp_ident constr + | Some (_, e) -> + prefix 2 0 (pp_ident constr) (string "(" ^^ pp_type_expr e ^^ string ")") + +and pp_fields fields = group (pp_ne_injection pp_field_decl fields) + +and pp_field_decl {value; _} = + let {field_name; field_type; _} = value in + let name = pp_ident field_name in + match field_type with + | TVar v when v = field_name -> + name + | _ -> + let t_expr = pp_type_expr field_type + in prefix 2 1 (name ^^ string ":") t_expr + +and pp_type_app {value; _} = + let ctor, tuple = value in + prefix 2 0 (pp_type_constr ctor) (string "(" ^^ nest 1 (pp_type_tuple tuple) ^^ string ")") + +and pp_type_tuple {value; _} = + let head, tail = value.inside in + let rec app = function + [] -> empty + | [e] -> group (break 1 ^^ pp_type_expr e) + | e::items -> + group (break 1 ^^ pp_type_expr e ^^ string ",") ^^ app items in + if tail = [] + then pp_type_expr head + else + let components = + pp_type_expr head ^^ string "," ^^ app (List.map snd tail) + in components + +and pp_type_constr ctor = string ctor.value + +and pp_fun_args {value; _} = + let lhs, _, rhs = value in + match rhs with + | TFun tf -> group (pp_type_expr lhs ^^ string ", " ^^ pp_fun_args tf) + | _ -> group (pp_type_expr lhs ^^ string ")" ^^ string " =>" ^/^ pp_type_expr rhs) + +and pp_fun_type {value; _} = + let lhs, _, rhs = value in + match lhs, rhs with + | _, TFun tf -> string "(" ^^ pp_type_expr lhs ^^ string ", " ^^ pp_fun_args tf + | TVar _ , _ -> group (pp_type_expr lhs ^^ string " =>" ^/^ pp_type_expr rhs) + | _ -> group (string "(" ^^ nest 1 (pp_type_expr lhs) ^^ string ")" ^^ string " =>" ^/^ pp_type_expr rhs) + +and pp_type_par {value; _} = + string "(" ^^ nest 1 (pp_type_expr value.inside ^^ string ")") diff --git a/src/passes/01-parser/reasonligo/dune b/src/passes/01-parser/reasonligo/dune index b8f57b665..f41445b7d 100644 --- a/src/passes/01-parser/reasonligo/dune +++ b/src/passes/01-parser/reasonligo/dune @@ -15,7 +15,7 @@ (name parser_reasonligo) (public_name ligo.parser.reasonligo) (modules - SyntaxError reasonligo LexToken ParErr Parser) + SyntaxError reasonligo LexToken ParErr Parser Pretty) (libraries menhirLib parser_shared diff --git a/src/passes/01-parser/reasonligo/error.messages.checked-in b/src/passes/01-parser/reasonligo/error.messages.checked-in index f161e5a67..1afe0b7f7 100644 --- a/src/passes/01-parser/reasonligo/error.messages.checked-in +++ b/src/passes/01-parser/reasonligo/error.messages.checked-in @@ -1,6 +1,6 @@ interactive_expr: C_None WILD ## -## Ends in an error in state: 174. +## Ends in an error in state: 176. ## ## 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: 126. +## Ends in an error in state: 128. ## ## 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: 112. +## Ends in an error in state: 113. ## ## 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: 110. +## Ends in an error in state: 111. ## ## 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: 109. +## Ends in an error in state: 110. ## ## 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: 104. +## Ends in an error in state: 105. ## ## 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: 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 ] @@ -91,7 +91,7 @@ interactive_expr: Ident DOT WILD interactive_expr: Ident LBRACKET Int RBRACKET WILD ## -## Ends in an error in state: 102. +## Ends in an error in state: 103. ## ## 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: 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 ] @@ -117,7 +117,7 @@ interactive_expr: Ident LBRACKET Int WILD interactive_expr: Ident LBRACKET 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 ] @@ -130,7 +130,7 @@ interactive_expr: Ident LBRACKET WILD interactive_expr: Ident WILD ## -## Ends in an error in state: 99. +## Ends in an error in state: 100. ## ## 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: 228. +## Ends in an error in state: 230. ## ## 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: 229. +## Ends in an error in state: 231. ## ## 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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: If LPAR VBAR ## -## Ends in an error in state: 98. +## Ends in an error in state: 99. ## ## 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: 351. +## 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 ] ## @@ -209,7 +209,7 @@ 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 RBRACE Else LBRACE VBAR ## -## 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 ] ## @@ -221,7 +221,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 Else LBRACE WILD SEMI PLUS ## -## Ends in an error in state: 413. +## 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 ] ## @@ -233,7 +233,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 Else LBRACE WILD 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 ] ## @@ -244,26 +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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 415, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 414, 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: 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 ] ## @@ -275,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: 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 ] ## @@ -287,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: 408. +## 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 ] ## @@ -299,7 +299,7 @@ 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. +## Ends in an error in state: 406. ## ## if_then_else(closed_if) -> If parenthesized_expr LBRACE closed_if . option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -310,26 +310,26 @@ interactive_expr: If LPAR WILD RPAR LBRACE If LPAR Bytes RPAR 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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 415, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 414, 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: 350. +## 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 ] ## @@ -341,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: 349. +## Ends in an error in state: 348. ## ## if_then_else(closed_if) -> If . parenthesized_expr LBRACE closed_if option(SEMI) RBRACE Else LBRACE closed_if option(SEMI) RBRACE [ SEMI RBRACE ] ## @@ -353,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: 233. +## Ends in an error in state: 235. ## ## switch_expr(base_if_then_else) -> Switch . switch_expr_ LBRACE cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -365,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: 276. +## Ends in an error in state: 274. ## ## case_clause(base_if_then_else) -> VBAR . pattern ARROW base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -377,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: 434. +## Ends in an error in state: 433. ## ## nseq(case_clause(base_if_then_else)) -> case_clause(base_if_then_else) . seq(case_clause(base_if_then_else)) [ RBRACE ] ## @@ -389,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: 436. +## Ends in an error in state: 435. ## ## seq(case_clause(base_if_then_else)) -> case_clause(base_if_then_else) . seq(case_clause(base_if_then_else)) [ RBRACE ] ## @@ -401,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: 348. +## 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 ] ## @@ -413,7 +413,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 VBAR ## -## 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 ] ## @@ -425,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: 425. +## 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 ] ## @@ -437,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: 424. +## Ends in an error in state: 423. ## ## 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 ] ## @@ -448,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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 426, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr +## In state 422, 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: 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 ] ## @@ -479,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: 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 ] ## @@ -491,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: 418. +## 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 ] ## @@ -503,7 +503,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 VBAR ## -## Ends in an error in state: 417. +## Ends in an error in state: 416. ## ## 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 ] ## @@ -514,26 +514,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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 415, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 414, 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: 347. +## 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 ] ## @@ -545,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: 346. +## Ends in an error in state: 345. ## ## 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 +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: 345. +## Ends in an error in state: 344. ## ## case_clause(base_if_then_else) -> VBAR pattern ARROW . base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -569,7 +569,7 @@ 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 Type ## -## Ends in an error in state: 428. +## Ends in an error in state: 427. ## ## case_clause(base_if_then_else) -> VBAR pattern ARROW base_if_then_else . option(SEMI) [ VBAR RBRACE ] ## @@ -580,26 +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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 426, spurious reduction of production base_if_then_else__open(base_if_then_else) -> base_expr +## In state 422, 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: 344. +## Ends in an error in state: 343. ## ## case_clause(base_if_then_else) -> VBAR pattern . ARROW base_if_then_else option(SEMI) [ VBAR RBRACE ] ## @@ -610,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 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) +## 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) ## interactive_expr: If LPAR WILD RPAR LBRACE Switch WILD LBRACE WILD ## -## Ends in an error in state: 275. +## Ends in an error in state: 273. ## ## switch_expr(base_if_then_else) -> Switch switch_expr_ LBRACE . cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -631,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: 274. +## Ends in an error in state: 272. ## ## switch_expr(base_if_then_else) -> Switch switch_expr_ . LBRACE cases(base_if_then_else) RBRACE [ SEMI RBRACE ] ## @@ -643,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: 232. +## Ends in an error in state: 234. ## ## 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 ] @@ -656,7 +656,7 @@ interactive_expr: If LPAR WILD RPAR LBRACE VBAR interactive_expr: If LPAR WILD RPAR LBRACE WILD RBRACE Else LBRACE VBAR ## -## Ends in an error in state: 446. +## 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 ] ## @@ -668,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: 448. +## 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 ] ## @@ -680,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: 447. +## 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 ] ## @@ -691,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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 400, 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: 445. +## Ends in an error in state: 444. ## ## 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 ] ## @@ -723,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: 444. +## 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 ] @@ -736,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: 443. +## Ends in an error in state: 442. ## ## 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 ] @@ -749,7 +749,7 @@ 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: 442. +## Ends in an error in state: 441. ## ## 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 ] @@ -761,26 +761,26 @@ interactive_expr: If LPAR WILD RPAR 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 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) +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 415, spurious reduction of production base_if_then_else__open(closed_if) -> base_expr +## In state 414, 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: 231. +## Ends in an error in state: 233. ## ## 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 ] @@ -793,7 +793,7 @@ interactive_expr: If LPAR WILD RPAR WILD interactive_expr: If LPAR WILD VBAR ## -## Ends in an error in state: 226. +## Ends in an error in state: 228. ## ## parenthesized_expr -> LPAR expr . RPAR [ LBRACE ] ## @@ -804,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: If WILD ## -## Ends in an error in state: 97. +## Ends in an error in state: 98. ## ## 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 ] @@ -836,9 +836,9 @@ interactive_expr: If WILD interactive_expr: LBRACE ELLIPSIS Constr DOT Ident WILD ## -## Ends in an error in state: 252. +## Ends in an error in state: 254. ## -## projection -> Constr DOT Ident . selection [ COMMA ] +## projection -> Constr DOT Ident . selection [ COMMA COLON ] ## ## The known suffix of the stack is as follows: ## Constr DOT Ident @@ -848,9 +848,9 @@ interactive_expr: LBRACE ELLIPSIS Constr DOT Ident WILD interactive_expr: LBRACE ELLIPSIS Constr DOT WILD ## -## Ends in an error in state: 251. +## Ends in an error in state: 253. ## -## projection -> Constr DOT . Ident selection [ COMMA ] +## projection -> Constr DOT . Ident selection [ COMMA COLON ] ## ## The known suffix of the stack is as follows: ## Constr DOT @@ -860,9 +860,9 @@ interactive_expr: LBRACE ELLIPSIS Constr DOT WILD interactive_expr: LBRACE ELLIPSIS Constr WILD ## -## Ends in an error in state: 250. +## Ends in an error in state: 252. ## -## projection -> Constr . DOT Ident selection [ COMMA ] +## projection -> Constr . DOT Ident selection [ COMMA COLON ] ## ## The known suffix of the stack is as follows: ## Constr @@ -870,54 +870,40 @@ interactive_expr: LBRACE ELLIPSIS Constr WILD -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes VBAR +interactive_expr: LBRACE ELLIPSIS Ident COLON ## -## Ends in an error in state: 267. +## Ends in an error in state: 256. ## -## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . [ RBRACE ] -## 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 ] +## 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 ] ## ## The known suffix of the stack is as follows: -## field_path_assignment +## LBRACE ELLIPSIS path ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 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 +## In state 251, spurious reduction of production path -> Ident ## -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON VBAR +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes COMMA Ident COLON Bytes COMMA WILD ## -## Ends in an error in state: 265. +## Ends in an error in state: 270. ## -## field_path_assignment -> nsepseq(field_name,DOT) COLON . expr [ RBRACE COMMA ] +## 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 ] ## ## The known suffix of the stack is as follows: -## nsepseq(field_name,DOT) COLON +## field_path_assignment COMMA ## -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COLON Bytes VBAR +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 271. +## Ends in an error in state: 269. ## ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . [ RBRACE ] ## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . COMMA nsepseq(field_path_assignment,COMMA) [ RBRACE ] @@ -930,40 +916,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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 262, spurious reduction of production field_path_assignment -> path COLON expr ## -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA Ident COMMA WILD +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes COMMA WILD ## -## 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 ] -## -## The known suffix of the stack is as follows: -## field_path_assignment COMMA -## - - - -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA WILD -## -## Ends in an error in state: 268. +## Ends in an error in state: 266. ## ## 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 ] @@ -974,48 +947,72 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA WILD -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT Ident WILD +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 258. +## Ends in an error in state: 265. ## -## nsepseq(field_name,DOT) -> Ident . [ COLON ] -## nsepseq(field_name,DOT) -> Ident . DOT nsepseq(field_name,DOT) [ COLON ] +## nsepseq(field_path_assignment,COMMA) -> field_path_assignment . [ RBRACE ] +## 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 ] ## ## The known suffix of the stack is as follows: -## Ident +## field_path_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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 262, spurious reduction of production field_path_assignment -> path COLON expr ## -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident DOT WILD +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COLON VBAR ## -## Ends in an error in state: 257. +## Ends in an error in state: 261. ## -## nsepseq(field_name,DOT) -> Ident DOT . nsepseq(field_name,DOT) [ COLON ] +## field_path_assignment -> path COLON . expr [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## Ident DOT +## path COLON ## -interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident WILD +interactive_expr: LBRACE ELLIPSIS Ident COMMA Ident COMMA ## -## Ends in an error in state: 256. +## Ends in an error in state: 260. ## -## field_path_assignment -> Ident . [ RBRACE COMMA ] -## nsepseq(field_name,DOT) -> Ident . [ COLON ] -## nsepseq(field_name,DOT) -> Ident . DOT nsepseq(field_name,DOT) [ COLON ] +## field_path_assignment -> path . COLON expr [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## Ident +## path +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 251, spurious reduction of production path -> Ident ## interactive_expr: LBRACE ELLIPSIS Ident COMMA WILD ## -## Ends in an error in state: 255. +## Ends in an error in state: 257. ## ## 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 ] ## @@ -1025,32 +1022,12 @@ interactive_expr: LBRACE ELLIPSIS Ident COMMA WILD -interactive_expr: LBRACE ELLIPSIS Ident DOT Ident VBAR -## -## 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 ] -## -## The known suffix of the stack is as follows: -## LBRACE ELLIPSIS path -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 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: 249. +## Ends in an error in state: 251. ## -## path -> Ident . [ COMMA ] -## projection -> Ident . selection [ COMMA ] +## path -> Ident . [ COMMA COLON ] +## projection -> Ident . selection [ COMMA COLON ] ## ## The known suffix of the stack is as follows: ## Ident @@ -1060,7 +1037,7 @@ interactive_expr: LBRACE ELLIPSIS Ident WILD interactive_expr: LBRACE ELLIPSIS WILD ## -## Ends in an error in state: 248. +## Ends in an error in state: 250. ## ## 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 ] ## @@ -1072,38 +1049,38 @@ interactive_expr: LBRACE ELLIPSIS WILD interactive_expr: LBRACE Ident COLON Bytes VBAR ## -## Ends in an error in state: 482. +## Ends in an error in state: 477. ## -## sequence_or_record_in -> field_assignment . option(more_field_assignments) [ RBRACE ] +## record -> LBRACE field_assignment . option(more_field_assignments) 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 ] ## ## The known suffix of the stack is as follows: -## field_assignment +## LBRACE 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 463, spurious reduction of production field_assignment -> Ident COLON expr ## interactive_expr: LBRACE Ident COLON VBAR ## -## Ends in an error in state: 463. +## Ends in an error in state: 462. ## ## field_assignment -> Ident COLON . expr [ RBRACE COMMA ] ## @@ -1115,7 +1092,7 @@ interactive_expr: LBRACE Ident COLON VBAR interactive_expr: LBRACE Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 468. +## Ends in an error in state: 467. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . [ RBRACE ] ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . COMMA nsepseq(field_assignment_punning,COMMA) [ RBRACE ] @@ -1128,28 +1105,28 @@ interactive_expr: LBRACE 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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 463, spurious reduction of production field_assignment -> Ident COLON expr +## In state 474, spurious reduction of production field_assignment_punning -> field_assignment ## interactive_expr: LBRACE Ident COMMA Ident COMMA Ident COLON Bytes VBAR ## -## Ends in an error in state: 472. +## Ends in an error in state: 471. ## ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . [ RBRACE ] ## nsepseq(field_assignment_punning,COMMA) -> field_assignment_punning . COMMA nsepseq(field_assignment_punning,COMMA) [ RBRACE ] @@ -1162,28 +1139,28 @@ interactive_expr: LBRACE 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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 463, spurious reduction of production field_assignment -> Ident COLON expr +## In state 474, spurious reduction of production field_assignment_punning -> field_assignment ## interactive_expr: LBRACE Ident COMMA Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 473. +## Ends in an error in state: 472. ## ## 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 ] @@ -1196,7 +1173,7 @@ interactive_expr: LBRACE Ident COMMA Ident COMMA Ident COMMA WILD interactive_expr: LBRACE Ident COMMA Ident COMMA WILD ## -## Ends in an error in state: 469. +## Ends in an error in state: 468. ## ## 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 ] @@ -1209,7 +1186,7 @@ interactive_expr: LBRACE Ident COMMA Ident COMMA WILD interactive_expr: LBRACE Ident COMMA Ident WILD ## -## Ends in an error in state: 462. +## Ends in an error in state: 461. ## ## field_assignment -> Ident . COLON expr [ RBRACE COMMA ] ## field_assignment_punning -> Ident . [ RBRACE COMMA ] @@ -1222,7 +1199,7 @@ interactive_expr: LBRACE Ident COMMA Ident WILD interactive_expr: LBRACE Ident COMMA WILD ## -## Ends in an error in state: 461. +## Ends in an error in state: 460. ## ## more_field_assignments -> COMMA . sep_or_term_list(field_assignment_punning,COMMA) [ RBRACE ] ## @@ -1234,24 +1211,26 @@ interactive_expr: LBRACE Ident COMMA WILD interactive_expr: LBRACE Ident WILD ## -## Ends in an error in state: 460. +## Ends in an error in state: 459. ## ## 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 ] +## record -> LBRACE Ident . more_field_assignments 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 ] ## ## The known suffix of the stack is as follows: -## Ident +## LBRACE Ident ## interactive_expr: LBRACE VBAR ## -## Ends in an error in state: 94. +## Ends in an error in state: 95. ## -## 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 ] +## record -> LBRACE . field_assignment option(more_field_assignments) 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 ] +## record -> LBRACE . Ident more_field_assignments 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 ] +## sequence -> LBRACE . exprs 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 ] ## ## The known suffix of the stack is as follows: @@ -1260,12 +1239,12 @@ interactive_expr: LBRACE VBAR -interactive_expr: LBRACE WILD SEMI WILD SEMI VBAR +interactive_expr: LBRACE WILD SEMI VBAR ## -## Ends in an error in state: 490. +## Ends in an error in state: 484. ## -## 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 ] +## exprs -> expr_with_let_expr SEMI . exprs [ RBRACE ] +## option(SEMI) -> SEMI . [ RBRACE ] ## ## The known suffix of the stack is as follows: ## expr_with_let_expr SEMI @@ -1273,13 +1252,12 @@ interactive_expr: LBRACE WILD SEMI WILD SEMI VBAR -interactive_expr: LBRACE WILD SEMI WILD VBAR +interactive_expr: LBRACE WILD VBAR ## -## Ends in an error in state: 489. +## Ends in an error in state: 483. ## -## 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 ] -## seq(__anonymous_0(expr_with_let_expr,SEMI)) -> expr_with_let_expr . SEMI seq(__anonymous_0(expr_with_let_expr,SEMI)) [ RBRACE ] +## exprs -> expr_with_let_expr . option(SEMI) [ RBRACE ] +## exprs -> expr_with_let_expr . SEMI exprs [ RBRACE ] ## ## The known suffix of the stack is as follows: ## expr_with_let_expr @@ -1288,27 +1266,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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 400, spurious reduction of production expr_with_let_expr -> expr ## interactive_expr: LBRACKET VBAR ## -## Ends in an error in state: 92. +## Ends in an error in state: 93. ## ## 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 ] @@ -1322,7 +1300,7 @@ interactive_expr: LBRACKET VBAR interactive_expr: LBRACKET WILD COMMA ELLIPSIS VBAR ## -## Ends in an error in state: 497. +## Ends in an error in state: 492. ## ## 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 ] ## @@ -1334,7 +1312,7 @@ interactive_expr: LBRACKET WILD COMMA ELLIPSIS VBAR interactive_expr: LBRACKET WILD COMMA ELLIPSIS WILD VBAR ## -## Ends in an error in state: 498. +## Ends in an error in state: 493. ## ## 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 ] ## @@ -1345,26 +1323,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD COMMA VBAR ## -## Ends in an error in state: 496. +## Ends in an error in state: 491. ## ## 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 ] @@ -1377,7 +1355,7 @@ interactive_expr: LBRACKET WILD COMMA VBAR interactive_expr: LBRACKET WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 505. +## Ends in an error in state: 500. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RBRACKET ] ## nseq(__anonymous_0(expr,COMMA)) -> expr COMMA . seq(__anonymous_0(expr,COMMA)) [ RBRACKET ] @@ -1390,7 +1368,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: 508. +## Ends in an error in state: 503. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RBRACKET ] ## seq(__anonymous_0(expr,COMMA)) -> expr COMMA . seq(__anonymous_0(expr,COMMA)) [ RBRACKET ] @@ -1403,7 +1381,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: 507. +## Ends in an error in state: 502. ## ## nsepseq(expr,COMMA) -> expr . [ RBRACKET ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RBRACKET ] @@ -1416,26 +1394,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD COMMA WILD VBAR ## -## Ends in an error in state: 504. +## Ends in an error in state: 499. ## ## nsepseq(expr,COMMA) -> expr . [ RBRACKET ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RBRACKET ] @@ -1448,26 +1426,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: LBRACKET WILD VBAR ## -## Ends in an error in state: 495. +## Ends in an error in state: 490. ## ## 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 ] @@ -1480,26 +1458,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: LPAR VBAR ## -## Ends in an error in state: 95. +## Ends in an error in state: 96. ## ## 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 ] @@ -1513,7 +1491,7 @@ interactive_expr: LPAR VBAR interactive_expr: LPAR WILD COMMA Bytes RPAR COLON Ident TIMES ## -## Ends in an error in state: 166. +## Ends in an error in state: 168. ## ## 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 ] @@ -1527,18 +1505,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 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) +## In state 136, spurious reduction of production option(type_expr_simple_args) -> +## In state 145, spurious reduction of production type_expr_simple -> Ident option(type_expr_simple_args) +## In state 152, spurious reduction of production type_annotation_simple -> COLON type_expr_simple +## In state 153, spurious reduction of production option(type_annotation_simple) -> type_annotation_simple +## In state 154, 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: 131. +## Ends in an error in state: 133. ## ## 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 ] ## @@ -1550,7 +1528,7 @@ interactive_expr: LPAR WILD COMMA Bytes RPAR WILD interactive_expr: LPAR WILD COMMA VBAR ## -## Ends in an error in state: 455. +## Ends in an error in state: 454. ## ## tuple(disj_expr_level) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ RPAR ] ## @@ -1562,7 +1540,7 @@ interactive_expr: LPAR WILD COMMA VBAR interactive_expr: LPAR WILD COMMA WILD COMMA VBAR ## -## Ends in an error in state: 458. +## Ends in an error in state: 457. ## ## nsepseq(disj_expr_level,COMMA) -> disj_expr_level COMMA . nsepseq(disj_expr_level,COMMA) [ RPAR ] ## @@ -1574,7 +1552,7 @@ interactive_expr: LPAR WILD COMMA WILD COMMA VBAR interactive_expr: LPAR WILD COMMA WILD VBAR ## -## Ends in an error in state: 457. +## Ends in an error in state: 456. ## ## 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 ] @@ -1588,23 +1566,23 @@ 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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level ## interactive_expr: LPAR WILD VBAR ## -## Ends in an error in state: 454. +## Ends in an error in state: 453. ## ## 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 ] @@ -1619,23 +1597,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level ## -interactive_expr: Let Rec VBAR +interactive_expr: Let Rec Verbatim ## -## Ends in an error in state: 355. +## Ends in an error in state: 354. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let Rec . let_binding SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1647,7 +1625,7 @@ interactive_expr: Let Rec VBAR interactive_expr: Let Rec WILD EQ Bytes SEMI VBAR ## -## Ends in an error in state: 398. +## 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 ] ## @@ -1659,7 +1637,7 @@ interactive_expr: Let Rec WILD EQ Bytes SEMI VBAR interactive_expr: Let Rec WILD EQ Bytes VBAR ## -## Ends in an error in state: 397. +## Ends in an error in state: 396. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let Rec let_binding . SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1670,27 +1648,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 520, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr ## -interactive_expr: Let VBAR +interactive_expr: Let Verbatim ## -## Ends in an error in state: 354. +## Ends in an error in state: 353. ## ## 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 ] @@ -1703,7 +1681,7 @@ interactive_expr: Let VBAR interactive_expr: Let WILD EQ Bytes SEMI VBAR ## -## Ends in an error in state: 403. +## 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 ] ## @@ -1715,7 +1693,7 @@ interactive_expr: Let WILD EQ Bytes SEMI VBAR interactive_expr: Let WILD EQ Bytes VBAR ## -## Ends in an error in state: 402. +## Ends in an error in state: 401. ## ## let_expr(expr_with_let_expr) -> seq(Attr) Let let_binding . SEMI expr_with_let_expr [ SEMI RBRACE EOF ] ## @@ -1726,27 +1704,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 520, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr ## interactive_expr: MINUS VBAR ## -## Ends in an error in state: 93. +## Ends in an error in state: 94. ## ## 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 ] ## @@ -1758,7 +1736,7 @@ interactive_expr: MINUS VBAR interactive_expr: NOT VBAR ## -## Ends in an error in state: 91. +## Ends in an error in state: 92. ## ## 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 ] ## @@ -1770,7 +1748,7 @@ interactive_expr: NOT VBAR interactive_expr: Switch Constr WILD ## -## Ends in an error in state: 115. +## Ends in an error in state: 116. ## ## 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 ] @@ -1783,7 +1761,7 @@ interactive_expr: Switch Constr WILD interactive_expr: Switch LBRACE WILD ## -## Ends in an error in state: 247. +## Ends in an error in state: 249. ## ## update_record -> LBRACE . ELLIPSIS path COMMA sep_or_term_list(field_path_assignment,COMMA) RBRACE [ LBRACE ] ## @@ -1795,7 +1773,7 @@ interactive_expr: Switch LBRACE WILD interactive_expr: Switch LBRACKET VBAR ## -## Ends in an error in state: 234. +## Ends in an error in state: 236. ## ## list__(expr) -> LBRACKET . option(sep_or_term_list(expr,SEMI)) RBRACKET [ LBRACE ] ## @@ -1807,7 +1785,7 @@ interactive_expr: Switch LBRACKET VBAR interactive_expr: Switch LBRACKET WILD SEMI VBAR ## -## Ends in an error in state: 241. +## Ends in an error in state: 243. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## nseq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -1820,7 +1798,7 @@ interactive_expr: Switch LBRACKET WILD SEMI VBAR interactive_expr: Switch LBRACKET WILD SEMI WILD SEMI VBAR ## -## Ends in an error in state: 245. +## Ends in an error in state: 247. ## ## nsepseq(expr,SEMI) -> expr SEMI . nsepseq(expr,SEMI) [ RBRACKET ] ## seq(__anonymous_0(expr,SEMI)) -> expr SEMI . seq(__anonymous_0(expr,SEMI)) [ RBRACKET ] @@ -1833,7 +1811,7 @@ interactive_expr: Switch LBRACKET WILD SEMI WILD SEMI VBAR interactive_expr: Switch LBRACKET WILD SEMI WILD VBAR ## -## Ends in an error in state: 244. +## Ends in an error in state: 246. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -1846,26 +1824,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: Switch LBRACKET WILD VBAR ## -## Ends in an error in state: 240. +## Ends in an error in state: 242. ## ## nsepseq(expr,SEMI) -> expr . [ RBRACKET ] ## nsepseq(expr,SEMI) -> expr . SEMI nsepseq(expr,SEMI) [ RBRACKET ] @@ -1878,26 +1856,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: Switch LPAR VBAR ## -## Ends in an error in state: 89. +## Ends in an error in state: 90. ## ## 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 ] @@ -1910,7 +1888,7 @@ interactive_expr: Switch LPAR VBAR interactive_expr: Switch LPAR WILD VBAR ## -## Ends in an error in state: 452. +## Ends in an error in state: 451. ## ## 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 ] ## @@ -1921,26 +1899,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## interactive_expr: Switch VBAR ## -## Ends in an error in state: 85. +## Ends in an error in state: 86. ## ## switch_expr(base_cond) -> Switch . switch_expr_ LBRACE cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -1952,7 +1930,7 @@ interactive_expr: Switch VBAR interactive_expr: Switch WILD LBRACE VBAR LBRACKET VBAR ## -## Ends in an error in state: 336. +## Ends in an error in state: 335. ## ## 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 ] @@ -1965,7 +1943,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: 339. +## Ends in an error in state: 338. ## ## pattern -> LBRACKET sub_pattern COMMA ELLIPSIS . sub_pattern RBRACKET [ ARROW ] ## @@ -1977,7 +1955,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: 340. +## Ends in an error in state: 339. ## ## pattern -> LBRACKET sub_pattern COMMA ELLIPSIS sub_pattern . RBRACKET [ ARROW ] ## @@ -1989,7 +1967,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: 338. +## Ends in an error in state: 337. ## ## pattern -> LBRACKET sub_pattern COMMA . ELLIPSIS sub_pattern RBRACKET [ ARROW ] ## @@ -2001,7 +1979,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: 337. +## Ends in an error in state: 336. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -2016,7 +1994,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: 343. +## Ends in an error in state: 342. ## ## tuple(sub_pattern) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ ARROW ] ## @@ -2028,7 +2006,7 @@ interactive_expr: Switch WILD LBRACE VBAR LPAR Bytes RPAR WILD interactive_expr: Switch WILD LBRACE VBAR VBAR ## -## Ends in an error in state: 513. +## Ends in an error in state: 508. ## ## case_clause(base_cond) -> VBAR . pattern ARROW base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2040,7 +2018,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: 521. +## Ends in an error in state: 516. ## ## nseq(case_clause(base_cond)) -> case_clause(base_cond) . seq(case_clause(base_cond)) [ RBRACE ] ## @@ -2052,7 +2030,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: 523. +## Ends in an error in state: 518. ## ## seq(case_clause(base_cond)) -> case_clause(base_cond) . seq(case_clause(base_cond)) [ RBRACE ] ## @@ -2064,7 +2042,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: 515. +## Ends in an error in state: 510. ## ## case_clause(base_cond) -> VBAR pattern ARROW . base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2076,7 +2054,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW VBAR interactive_expr: Switch WILD LBRACE VBAR WILD ARROW WILD Type ## -## Ends in an error in state: 516. +## Ends in an error in state: 511. ## ## case_clause(base_cond) -> VBAR pattern ARROW base_cond . option(SEMI) [ VBAR RBRACE ] ## @@ -2087,25 +2065,25 @@ interactive_expr: Switch WILD LBRACE VBAR WILD ARROW WILD 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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr ## interactive_expr: Switch WILD LBRACE VBAR WILD COMMA Bytes RPAR ## -## Ends in an error in state: 514. +## Ends in an error in state: 509. ## ## case_clause(base_cond) -> VBAR pattern . ARROW base_cond option(SEMI) [ VBAR RBRACE ] ## @@ -2116,16 +2094,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 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) +## 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) ## interactive_expr: Switch WILD LBRACE VBAR WILD COMMA VBAR ## -## Ends in an error in state: 329. +## Ends in an error in state: 328. ## ## tuple(sub_pattern) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] ## @@ -2135,10 +2113,22 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA VBAR -interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD WILD +interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD COMMA VBAR ## ## Ends in an error in state: 330. ## +## nsepseq(sub_pattern,COMMA) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] +## +## The known suffix of the stack is as follows: +## sub_pattern COMMA +## + + + +interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD WILD +## +## Ends in an error in state: 329. +## ## nsepseq(sub_pattern,COMMA) -> sub_pattern . [ RPAR ARROW ] ## nsepseq(sub_pattern,COMMA) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] ## @@ -2148,21 +2138,9 @@ interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD WILD -interactive_expr: Switch WILD LBRACE VBAR WILD COMMA WILD COMMA VBAR -## -## Ends in an error in state: 336. -## -## nsepseq(sub_pattern,COMMA) -> sub_pattern COMMA . nsepseq(sub_pattern,COMMA) [ RPAR ARROW ] -## -## The known suffix of the stack is as follows: -## sub_pattern COMMA -## - - - interactive_expr: Switch WILD LBRACE VBAR WILD WILD ## -## Ends in an error in state: 430. +## Ends in an error in state: 429. ## ## pattern -> core_pattern . [ ARROW ] ## sub_pattern -> core_pattern . [ COMMA ] @@ -2175,7 +2153,7 @@ interactive_expr: Switch WILD LBRACE VBAR WILD WILD interactive_expr: Switch WILD LBRACE WILD ## -## Ends in an error in state: 512. +## Ends in an error in state: 507. ## ## switch_expr(base_cond) -> Switch switch_expr_ LBRACE . cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2187,7 +2165,7 @@ interactive_expr: Switch WILD LBRACE WILD interactive_expr: Switch WILD WILD ## -## Ends in an error in state: 511. +## Ends in an error in state: 506. ## ## switch_expr(base_cond) -> Switch switch_expr_ . LBRACE cases(base_cond) RBRACE [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2199,7 +2177,7 @@ interactive_expr: Switch WILD WILD interactive_expr: VBAR ## -## Ends in an error in state: 536. +## Ends in an error in state: 531. ## ## interactive_expr' -> . interactive_expr [ # ] ## @@ -2211,7 +2189,7 @@ interactive_expr: VBAR interactive_expr: WILD ARROW VBAR ## -## Ends in an error in state: 216. +## Ends in an error in state: 218. ## ## fun_expr(expr) -> disj_expr_level ARROW . expr [ VBAR Type SEMI RPAR RBRACKET RBRACE Let EOF COMMA Attr ] ## @@ -2223,7 +2201,7 @@ interactive_expr: WILD ARROW VBAR interactive_expr: WILD BOOL_AND VBAR ## -## Ends in an error in state: 170. +## Ends in an error in state: 172. ## ## 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 ] ## @@ -2235,7 +2213,7 @@ interactive_expr: WILD BOOL_AND VBAR interactive_expr: WILD BOOL_OR VBAR ## -## Ends in an error in state: 214. +## Ends in an error in state: 216. ## ## 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 ] ## @@ -2247,7 +2225,7 @@ interactive_expr: WILD BOOL_OR VBAR interactive_expr: WILD CAT VBAR ## -## Ends in an error in state: 193. +## Ends in an error in state: 195. ## ## 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 ] ## @@ -2259,7 +2237,7 @@ interactive_expr: WILD CAT VBAR interactive_expr: WILD COLON Ident LPAR Ident VBAR ## -## Ends in an error in state: 136. +## Ends in an error in state: 138. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . [ RPAR ] ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . COMMA nsepseq(type_expr_simple,COMMA) [ RPAR ] @@ -2271,15 +2249,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 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 136, spurious reduction of production option(type_expr_simple_args) -> +## In state 145, 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: 135. +## Ends in an error in state: 137. ## ## 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 ] ## @@ -2291,7 +2269,7 @@ interactive_expr: WILD COLON Ident LPAR WILD interactive_expr: WILD COLON Ident WILD ## -## Ends in an error in state: 134. +## Ends in an error in state: 136. ## ## 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 ] ## @@ -2303,7 +2281,7 @@ interactive_expr: WILD COLON Ident WILD interactive_expr: WILD COLON LPAR Ident ARROW Ident VBAR ## -## Ends in an error in state: 146. +## Ends in an error in state: 148. ## ## 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 ] ## @@ -2314,15 +2292,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 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 136, spurious reduction of production option(type_expr_simple_args) -> +## In state 145, 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: 145. +## Ends in an error in state: 147. ## ## 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 ] ## @@ -2334,7 +2312,7 @@ interactive_expr: WILD COLON LPAR Ident ARROW WILD interactive_expr: WILD COLON LPAR Ident COMMA WILD ## -## Ends in an error in state: 137. +## Ends in an error in state: 139. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple COMMA . nsepseq(type_expr_simple,COMMA) [ RPAR ] ## @@ -2346,7 +2324,7 @@ interactive_expr: WILD COLON LPAR Ident COMMA WILD interactive_expr: WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 153. +## Ends in an error in state: 155. ## ## 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 ] @@ -2361,7 +2339,7 @@ interactive_expr: WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD COLON LPAR Ident VBAR ## -## Ends in an error in state: 144. +## Ends in an error in state: 146. ## ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . [ RPAR ] ## nsepseq(type_expr_simple,COMMA) -> type_expr_simple . COMMA nsepseq(type_expr_simple,COMMA) [ RPAR ] @@ -2374,15 +2352,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 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 136, spurious reduction of production option(type_expr_simple_args) -> +## In state 145, 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: 133. +## Ends in an error in state: 135. ## ## 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 ] @@ -2395,7 +2373,7 @@ interactive_expr: WILD COLON LPAR WILD interactive_expr: WILD COLON WILD ## -## Ends in an error in state: 132. +## Ends in an error in state: 134. ## ## 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 ] ## @@ -2407,7 +2385,7 @@ interactive_expr: WILD COLON WILD interactive_expr: WILD EQEQ VBAR ## -## Ends in an error in state: 203. +## Ends in an error in state: 205. ## ## 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 ] ## @@ -2419,7 +2397,7 @@ interactive_expr: WILD EQEQ VBAR interactive_expr: WILD GE VBAR ## -## Ends in an error in state: 201. +## Ends in an error in state: 203. ## ## 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 ] ## @@ -2431,7 +2409,7 @@ interactive_expr: WILD GE VBAR interactive_expr: WILD GT VBAR ## -## Ends in an error in state: 199. +## Ends in an error in state: 201. ## ## 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 ] ## @@ -2443,7 +2421,7 @@ interactive_expr: WILD GT VBAR interactive_expr: WILD LE VBAR ## -## Ends in an error in state: 197. +## Ends in an error in state: 199. ## ## 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 ] ## @@ -2455,7 +2433,7 @@ interactive_expr: WILD LE VBAR interactive_expr: WILD LPAR VBAR ## -## Ends in an error in state: 157. +## Ends in an error in state: 159. ## ## 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 ] @@ -2468,7 +2446,7 @@ interactive_expr: WILD LPAR VBAR interactive_expr: WILD LPAR WILD COMMA VBAR ## -## Ends in an error in state: 164. +## Ends in an error in state: 166. ## ## nsepseq(expr,COMMA) -> expr COMMA . nsepseq(expr,COMMA) [ RPAR ] ## @@ -2480,7 +2458,7 @@ interactive_expr: WILD LPAR WILD COMMA VBAR interactive_expr: WILD LPAR WILD VBAR ## -## Ends in an error in state: 163. +## Ends in an error in state: 165. ## ## nsepseq(expr,COMMA) -> expr . [ RPAR ] ## nsepseq(expr,COMMA) -> expr . COMMA nsepseq(expr,COMMA) [ RPAR ] @@ -2492,26 +2470,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 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 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond ## Missing `)`. interactive_expr: WILD LT VBAR ## -## Ends in an error in state: 195. +## Ends in an error in state: 197. ## ## 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 ] ## @@ -2523,7 +2501,7 @@ interactive_expr: WILD LT VBAR interactive_expr: WILD MINUS VBAR ## -## Ends in an error in state: 191. +## Ends in an error in state: 193. ## ## 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 ] ## @@ -2535,7 +2513,7 @@ interactive_expr: WILD MINUS VBAR interactive_expr: WILD MINUS WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 192. +## Ends in an error in state: 194. ## ## 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 ] @@ -2550,7 +2528,7 @@ interactive_expr: WILD MINUS WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD Mod VBAR ## -## Ends in an error in state: 189. +## Ends in an error in state: 191. ## ## 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 ] ## @@ -2562,7 +2540,7 @@ interactive_expr: WILD Mod VBAR interactive_expr: WILD NE VBAR ## -## Ends in an error in state: 172. +## Ends in an error in state: 174. ## ## 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 ] ## @@ -2574,7 +2552,7 @@ interactive_expr: WILD NE VBAR interactive_expr: WILD Or VBAR ## -## Ends in an error in state: 167. +## Ends in an error in state: 169. ## ## 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 ] ## @@ -2586,7 +2564,7 @@ interactive_expr: WILD Or VBAR interactive_expr: WILD PLUS VBAR ## -## Ends in an error in state: 185. +## Ends in an error in state: 187. ## ## 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 ] ## @@ -2598,7 +2576,7 @@ interactive_expr: WILD PLUS VBAR interactive_expr: WILD PLUS WILD COLON LPAR Ident RPAR WILD ## -## Ends in an error in state: 186. +## Ends in an error in state: 188. ## ## 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 ] @@ -2613,7 +2591,7 @@ interactive_expr: WILD PLUS WILD COLON LPAR Ident RPAR WILD interactive_expr: WILD SLASH VBAR ## -## Ends in an error in state: 187. +## Ends in an error in state: 189. ## ## 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 ] ## @@ -2625,7 +2603,7 @@ interactive_expr: WILD SLASH VBAR interactive_expr: WILD TIMES VBAR ## -## Ends in an error in state: 154. +## Ends in an error in state: 156. ## ## 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 ] ## @@ -2637,7 +2615,7 @@ interactive_expr: WILD TIMES VBAR interactive_expr: WILD VBAR ## -## Ends in an error in state: 538. +## Ends in an error in state: 533. ## ## interactive_expr -> expr_with_let_expr . EOF [ # ] ## @@ -2648,27 +2626,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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 400, spurious reduction of production expr_with_let_expr -> expr ## interactive_expr: WILD WILD ## -## Ends in an error in state: 156. +## Ends in an error in state: 158. ## ## 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 ] @@ -2694,7 +2672,7 @@ contract: Attr WILD contract: Let Ident COLON String WILD ## -## Ends in an error in state: 377. +## Ends in an error in state: 376. ## ## let_binding -> Ident option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## @@ -2706,7 +2684,7 @@ contract: Let Ident COLON String WILD contract: Let Ident EQ VBAR ## -## Ends in an error in state: 378. +## Ends in an error in state: 377. ## ## let_binding -> Ident option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -2723,7 +2701,7 @@ let func = (a: int, b: int) => a + b; contract: Let Ident WILD ## -## Ends in an error in state: 376. +## Ends in an error in state: 375. ## ## let_binding -> Ident . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> Ident . [ COMMA ] @@ -2736,7 +2714,7 @@ contract: Let Ident WILD contract: Let LBRACE Ident EQ Bytes COMMA Ident EQ Bytes COMMA WILD ## -## Ends in an error in state: 312. +## Ends in an error in state: 311. ## ## 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 ] @@ -2749,7 +2727,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: 311. +## Ends in an error in state: 310. ## ## nsepseq(field_pattern,COMMA) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,COMMA) -> field_pattern . COMMA nsepseq(field_pattern,COMMA) [ RBRACE ] @@ -2763,7 +2741,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: 308. +## Ends in an error in state: 307. ## ## 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 ] @@ -2776,7 +2754,7 @@ contract: Let LBRACE Ident EQ Bytes COMMA WILD contract: Let LBRACE Ident EQ Bytes RBRACE COLON String WILD ## -## Ends in an error in state: 390. +## Ends in an error in state: 389. ## ## let_binding -> record_pattern option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## @@ -2788,7 +2766,7 @@ contract: Let LBRACE Ident EQ Bytes RBRACE COLON String WILD contract: Let LBRACE Ident EQ Bytes RBRACE EQ VBAR ## -## Ends in an error in state: 391. +## Ends in an error in state: 390. ## ## let_binding -> record_pattern option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -2800,7 +2778,7 @@ contract: Let LBRACE Ident EQ Bytes RBRACE EQ VBAR contract: Let LBRACE Ident EQ Bytes RBRACE WILD ## -## Ends in an error in state: 389. +## Ends in an error in state: 388. ## ## let_binding -> record_pattern . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> record_pattern . [ COMMA ] @@ -2813,7 +2791,7 @@ contract: Let LBRACE Ident EQ Bytes RBRACE WILD contract: Let LBRACE Ident EQ Bytes WILD ## -## Ends in an error in state: 307. +## Ends in an error in state: 306. ## ## nsepseq(field_pattern,COMMA) -> field_pattern . [ RBRACE ] ## nsepseq(field_pattern,COMMA) -> field_pattern . COMMA nsepseq(field_pattern,COMMA) [ RBRACE ] @@ -2827,7 +2805,7 @@ contract: Let LBRACE Ident EQ Bytes WILD contract: Let LBRACE Ident EQ VBAR ## -## Ends in an error in state: 285. +## Ends in an error in state: 284. ## ## field_pattern -> Ident EQ . sub_pattern [ RBRACE COMMA ] ## @@ -2839,7 +2817,7 @@ contract: Let LBRACE Ident EQ VBAR contract: Let LBRACE Ident WILD ## -## Ends in an error in state: 284. +## Ends in an error in state: 283. ## ## field_pattern -> Ident . EQ sub_pattern [ RBRACE COMMA ] ## @@ -2851,7 +2829,7 @@ contract: Let LBRACE Ident WILD contract: Let LBRACE WILD ## -## Ends in an error in state: 283. +## Ends in an error in state: 282. ## ## record_pattern -> LBRACE . sep_or_term_list(field_pattern,COMMA) RBRACE [ SEMI RPAR RBRACKET RBRACE EQ COMMA COLON ARROW ] ## @@ -2863,7 +2841,7 @@ contract: Let LBRACE WILD contract: Let LPAR C_Some VBAR ## -## Ends in an error in state: 290. +## Ends in an error in state: 289. ## ## constr_pattern -> C_Some . sub_pattern [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -2875,7 +2853,7 @@ contract: Let LPAR C_Some VBAR contract: Let LPAR Constr LBRACKET VBAR ## -## Ends in an error in state: 282. +## Ends in an error in state: 281. ## ## list__(sub_pattern) -> LBRACKET . option(sep_or_term_list(sub_pattern,SEMI)) RBRACKET [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -2887,7 +2865,7 @@ contract: Let LPAR Constr LBRACKET VBAR contract: Let LPAR Constr LBRACKET WILD SEMI VBAR ## -## Ends in an error in state: 315. +## Ends in an error in state: 314. ## ## 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 ] @@ -2900,7 +2878,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: 317. +## Ends in an error in state: 316. ## ## 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 ] @@ -2913,7 +2891,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: 316. +## Ends in an error in state: 315. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -2927,7 +2905,7 @@ contract: Let LPAR Constr LBRACKET WILD SEMI WILD WILD contract: Let LPAR Constr LBRACKET WILD WILD ## -## Ends in an error in state: 314. +## Ends in an error in state: 313. ## ## nsepseq(sub_pattern,SEMI) -> sub_pattern . [ RBRACKET ] ## nsepseq(sub_pattern,SEMI) -> sub_pattern . SEMI nsepseq(sub_pattern,SEMI) [ RBRACKET ] @@ -2941,7 +2919,7 @@ contract: Let LPAR Constr LBRACKET WILD WILD contract: Let LPAR Constr LPAR VBAR ## -## Ends in an error in state: 281. +## Ends in an error in state: 280. ## ## par(ptuple) -> LPAR . ptuple RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## par(sub_pattern) -> LPAR . sub_pattern RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] @@ -2955,7 +2933,7 @@ contract: Let LPAR Constr LPAR VBAR contract: Let LPAR Constr LPAR WILD COMMA Bytes ARROW ## -## Ends in an error in state: 334. +## Ends in an error in state: 333. ## ## par(ptuple) -> LPAR ptuple . RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## @@ -2966,16 +2944,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 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) +## 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) ## contract: Let LPAR Constr LPAR WILD WILD ## -## Ends in an error in state: 327. +## Ends in an error in state: 326. ## ## par(sub_pattern) -> LPAR sub_pattern . RPAR [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## tuple(sub_pattern) -> sub_pattern . COMMA nsepseq(sub_pattern,COMMA) [ RPAR ] @@ -2988,7 +2966,7 @@ contract: Let LPAR Constr LPAR WILD WILD contract: Let LPAR Constr SEMI ## -## Ends in an error in state: 374. +## Ends in an error in state: 373. ## ## par(closed_irrefutable) -> LPAR closed_irrefutable . RPAR [ RPAR EQ COMMA COLON ] ## @@ -2999,15 +2977,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 289, spurious reduction of production constr_pattern -> Constr -## In state 373, spurious reduction of production closed_irrefutable -> constr_pattern +## In state 288, spurious reduction of production constr_pattern -> Constr +## In state 372, spurious reduction of production closed_irrefutable -> constr_pattern ## contract: Let LPAR Constr VBAR ## -## Ends in an error in state: 289. +## Ends in an error in state: 288. ## ## constr_pattern -> Constr . sub_pattern [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] ## constr_pattern -> Constr . [ SEMI RPAR RBRACKET RBRACE COMMA ARROW ] @@ -3020,7 +2998,7 @@ contract: Let LPAR Constr VBAR contract: Let LPAR RPAR COLON String WILD ## -## Ends in an error in state: 381. +## Ends in an error in state: 380. ## ## let_binding -> unit option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## @@ -3032,7 +3010,7 @@ contract: Let LPAR RPAR COLON String WILD contract: Let LPAR RPAR EQ VBAR ## -## Ends in an error in state: 382. +## Ends in an error in state: 381. ## ## let_binding -> unit option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3044,7 +3022,7 @@ contract: Let LPAR RPAR EQ VBAR contract: Let LPAR RPAR WILD ## -## Ends in an error in state: 380. +## Ends in an error in state: 379. ## ## let_binding -> unit . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> unit . [ COMMA ] @@ -3055,9 +3033,9 @@ contract: Let LPAR RPAR WILD -contract: Let LPAR VBAR +contract: Let LPAR Verbatim ## -## Ends in an error in state: 356. +## Ends in an error in state: 355. ## ## par(closed_irrefutable) -> LPAR . closed_irrefutable RPAR [ RPAR EQ COMMA COLON ] ## unit -> LPAR . RPAR [ RPAR EQ COMMA COLON ] @@ -3070,7 +3048,7 @@ contract: Let LPAR VBAR contract: Let LPAR WILD COLON WILD ## -## Ends in an error in state: 371. +## Ends in an error in state: 370. ## ## typed_pattern -> irrefutable COLON . type_expr [ RPAR ] ## @@ -3082,7 +3060,7 @@ contract: Let LPAR WILD COLON WILD contract: Let LPAR WILD COMMA Ident EQ ## -## Ends in an error in state: 370. +## Ends in an error in state: 369. ## ## closed_irrefutable -> irrefutable . [ RPAR ] ## typed_pattern -> irrefutable . COLON type_expr [ RPAR ] @@ -3094,16 +3072,16 @@ 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 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) +## 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) ## contract: Let LPAR WILD RPAR COLON String WILD ## -## Ends in an error in state: 394. +## Ends in an error in state: 393. ## ## let_binding -> par(closed_irrefutable) option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## @@ -3115,7 +3093,7 @@ contract: Let LPAR WILD RPAR COLON String WILD contract: Let LPAR WILD RPAR EQ VBAR ## -## Ends in an error in state: 395. +## Ends in an error in state: 394. ## ## let_binding -> par(closed_irrefutable) option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3127,7 +3105,7 @@ contract: Let LPAR WILD RPAR EQ VBAR contract: Let LPAR WILD RPAR WILD ## -## Ends in an error in state: 393. +## Ends in an error in state: 392. ## ## let_binding -> par(closed_irrefutable) . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## sub_irrefutable -> par(closed_irrefutable) . [ COMMA ] @@ -3140,7 +3118,7 @@ contract: Let LPAR WILD RPAR WILD contract: Let LPAR WILD WILD ## -## Ends in an error in state: 362. +## Ends in an error in state: 361. ## ## irrefutable -> sub_irrefutable . [ RPAR COLON ] ## tuple(sub_irrefutable) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ RPAR COLON ] @@ -3151,9 +3129,9 @@ contract: Let LPAR WILD WILD -contract: Let Rec VBAR +contract: Let Rec Verbatim ## -## Ends in an error in state: 526. +## Ends in an error in state: 521. ## ## let_declaration -> seq(Attr) Let Rec . let_binding [ Type SEMI Let EOF Attr ] ## @@ -3163,7 +3141,7 @@ contract: Let Rec VBAR -contract: Let VBAR +contract: Let Verbatim ## ## Ends in an error in state: 76. ## @@ -3202,7 +3180,7 @@ contract: Let WILD COLON WILD contract: Let WILD COMMA Ident COLON String WILD ## -## Ends in an error in state: 385. +## Ends in an error in state: 384. ## ## let_binding -> tuple(sub_irrefutable) option(type_annotation) . EQ expr [ Type SEMI Let EOF Attr ] ## @@ -3214,7 +3192,7 @@ contract: Let WILD COMMA Ident COLON String WILD contract: Let WILD COMMA Ident EQ VBAR ## -## Ends in an error in state: 386. +## Ends in an error in state: 385. ## ## let_binding -> tuple(sub_irrefutable) option(type_annotation) EQ . expr [ Type SEMI Let EOF Attr ] ## @@ -3226,7 +3204,7 @@ contract: Let WILD COMMA Ident EQ VBAR contract: Let WILD COMMA Ident RPAR ## -## Ends in an error in state: 384. +## Ends in an error in state: 383. ## ## let_binding -> tuple(sub_irrefutable) . option(type_annotation) EQ expr [ Type SEMI Let EOF Attr ] ## @@ -3237,15 +3215,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 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 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) ## -contract: Let WILD COMMA VBAR +contract: Let WILD COMMA Verbatim ## -## Ends in an error in state: 363. +## Ends in an error in state: 362. ## ## tuple(sub_irrefutable) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] ## @@ -3255,9 +3233,9 @@ contract: Let WILD COMMA VBAR -contract: Let WILD COMMA WILD COMMA VBAR +contract: Let WILD COMMA WILD COMMA Verbatim ## -## Ends in an error in state: 365. +## Ends in an error in state: 364. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable COMMA . nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] ## @@ -3269,7 +3247,7 @@ contract: Let WILD COMMA WILD COMMA VBAR contract: Let WILD COMMA WILD WILD ## -## Ends in an error in state: 364. +## Ends in an error in state: 363. ## ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . [ RPAR EQ COLON ] ## nsepseq(sub_irrefutable,COMMA) -> sub_irrefutable . COMMA nsepseq(sub_irrefutable,COMMA) [ RPAR EQ COLON ] @@ -3282,7 +3260,7 @@ contract: Let WILD COMMA WILD WILD contract: Let WILD EQ Bytes VBAR ## -## Ends in an error in state: 529. +## Ends in an error in state: 524. ## ## declaration -> let_declaration . option(SEMI) [ Type Let EOF Attr ] ## @@ -3293,21 +3271,21 @@ 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 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 +## In state 158, spurious reduction of production call_expr_level_in -> core_expr +## In state 176, spurious reduction of production option(type_annotation_simple) -> +## In state 177, spurious reduction of production call_expr_level -> call_expr_level_in option(type_annotation_simple) +## In state 178, spurious reduction of production unary_expr_level -> call_expr_level +## In state 131, spurious reduction of production mult_expr_level -> unary_expr_level +## In state 155, spurious reduction of production add_expr_level -> mult_expr_level +## In state 186, spurious reduction of production cat_expr_level -> add_expr_level +## In state 207, spurious reduction of production comp_expr_level -> cat_expr_level +## In state 214, spurious reduction of production conj_expr_level -> comp_expr_level +## In state 221, spurious reduction of production disj_expr_level -> conj_expr_level +## In state 168, spurious reduction of production base_expr -> disj_expr_level +## In state 225, spurious reduction of production base_cond -> base_expr +## In state 226, spurious reduction of production expr -> base_cond +## In state 520, spurious reduction of production let_binding -> WILD option(type_annotation) EQ expr +## In state 523, spurious reduction of production let_declaration -> seq(Attr) Let let_binding ## @@ -3388,7 +3366,7 @@ contract: Type Ident EQ Constr LPAR WILD contract: Type Ident EQ Constr SEMI WILD ## -## Ends in an error in state: 533. +## Ends in an error in state: 528. ## ## declarations -> declaration . [ EOF ] ## declarations -> declaration . declarations [ EOF ] @@ -3816,3 +3794,4 @@ contract: WILD ## + diff --git a/src/passes/01-parser/shared/EvalOpt.ml b/src/passes/01-parser/shared/EvalOpt.ml index 8cb22608d..314b04bb9 100644 --- a/src/passes/01-parser/shared/EvalOpt.ml +++ b/src/passes/01-parser/shared/EvalOpt.ml @@ -29,11 +29,12 @@ type options = < mode : [`Byte | `Point]; cmd : command; mono : bool; - expr : bool + expr : bool; + pretty : bool > let make ~input ~libs ~verbose ~offsets ?block - ?line ~ext ~mode ~cmd ~mono ~expr : options = + ?line ~ext ~mode ~cmd ~mono ~expr ~pretty : options = object method input = input method libs = libs @@ -46,6 +47,7 @@ let make ~input ~libs ~verbose ~offsets ?block method cmd = cmd method mono = mono method expr = expr + method pretty = pretty end (* Auxiliary functions *) @@ -77,6 +79,7 @@ let help extension () = print " --bytes Bytes for source locations"; print " --mono Use Menhir monolithic API"; print " --expr Parse an expression"; + print " --pretty Pretty-print the input"; print " --verbose= cli, preproc, ast-tokens, ast (colon-separated)"; print " --version Commit hash on stdout"; print " -h, --help This help"; @@ -100,6 +103,7 @@ and libs = ref [] and verb_str = ref "" and mono = ref false and expr = ref false +and pretty = ref false let split_at_colon = Str.(split (regexp ":")) @@ -121,6 +125,7 @@ let specs extension = noshort, "bytes", set bytes true, None; noshort, "mono", set mono true, None; noshort, "expr", set expr true, None; + noshort, "pretty", set pretty true, None; noshort, "verbose", None, Some add_verbose; 'h', "help", Some (help extension), None; noshort, "version", Some version, None @@ -156,6 +161,7 @@ let print_opt () = printf "bytes = %b\n" !bytes; printf "mono = %b\n" !mono; printf "expr = %b\n" !expr; + printf "pretty = %b\n" !pretty; printf "verbose = %s\n" !verb_str; printf "input = %s\n" (string_of quote !input); printf "libs = %s\n" (string_of_path !libs) @@ -185,6 +191,7 @@ let check ?block ?line ~ext = and mono = !mono and expr = !expr and verbose = !verbose + and pretty = !pretty and libs = !libs in let () = @@ -199,6 +206,7 @@ let check ?block ?line ~ext = printf "mode = %s\n" (if mode = `Byte then "`Byte" else "`Point"); printf "mono = %b\n" mono; printf "expr = %b\n" expr; + printf "pretty = %b\n" pretty; printf "verbose = %s\n" !verb_str; printf "input = %s\n" (string_of quote input); printf "libs = %s\n" (string_of_path libs) @@ -214,7 +222,7 @@ let check ?block ?line ~ext = | _ -> abort "Choose one of -q, -c, -u, -t." in make ~input ~libs ~verbose ~offsets ~mode - ~cmd ~mono ~expr ?block ?line ~ext + ~cmd ~mono ~expr ?block ?line ~ext ~pretty (* Parsing the command-line options *) diff --git a/src/passes/01-parser/shared/EvalOpt.mli b/src/passes/01-parser/shared/EvalOpt.mli index 2e7e7f3cd..098726fba 100644 --- a/src/passes/01-parser/shared/EvalOpt.mli +++ b/src/passes/01-parser/shared/EvalOpt.mli @@ -47,7 +47,10 @@ type command = Quiet | Copy | Units | Tokens {li If the field [expr] is [true], then the parser for expressions is used, otherwise a full-fledged contract is expected.} -} *) + + {li If the field [pretty] is [true], then the source is + pretty-printed on the standard out.} + } *) module SSet : Set.S with type elt = string and type t = Set.Make(String).t @@ -67,7 +70,8 @@ type options = < mode : [`Byte | `Point]; cmd : command; mono : bool; - expr : bool + expr : bool; + pretty : bool > val make : @@ -82,6 +86,7 @@ val make : cmd:command -> mono:bool -> expr:bool -> + pretty:bool -> options (** Parsing the command-line options on stdin. *) diff --git a/src/passes/01-parser/shared/ParserUnit.ml b/src/passes/01-parser/shared/ParserUnit.ml index dfaa888c7..8c15c1db2 100644 --- a/src/passes/01-parser/shared/ParserUnit.ml +++ b/src/passes/01-parser/shared/ParserUnit.ml @@ -15,7 +15,8 @@ module type SubIO = ext : string; mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > val options : options @@ -31,7 +32,7 @@ module type Printer = val mk_state : offsets:bool -> mode:[`Point|`Byte] -> buffer:Buffer.t -> state - val pp_ast : state -> ast -> unit + val pp_cst : state -> ast -> unit val pp_expr : state -> expr -> unit val print_tokens : state -> ast -> unit val print_expr : state -> expr -> unit @@ -145,7 +146,7 @@ module Make (Lexer: Lexer.S) if SSet.mem "ast" SubIO.options#verbose then begin Buffer.clear output; - ParserLog.pp_ast state ast; + ParserLog.pp_cst state ast; Buffer.output_buffer stdout output end in flush_all (); close (); Ok ast diff --git a/src/passes/01-parser/shared/ParserUnit.mli b/src/passes/01-parser/shared/ParserUnit.mli index a9456ab8c..fe3b90dc1 100644 --- a/src/passes/01-parser/shared/ParserUnit.mli +++ b/src/passes/01-parser/shared/ParserUnit.mli @@ -17,7 +17,8 @@ module type SubIO = ext : string; mode : [`Byte | `Point]; cmd : EvalOpt.command; - mono : bool + mono : bool; + pretty : bool > val options : options @@ -35,7 +36,7 @@ module type Printer = val mk_state : offsets:bool -> mode:[`Point|`Byte] -> buffer:Buffer.t -> state - val pp_ast : state -> ast -> unit + val pp_cst : state -> ast -> unit val pp_expr : state -> expr -> unit val print_tokens : state -> ast -> unit val print_expr : state -> expr -> unit diff --git a/src/passes/01-parser/shared/Utils.mli b/src/passes/01-parser/shared/Utils.mli index db3a03c49..3ef10fe7f 100644 --- a/src/passes/01-parser/shared/Utils.mli +++ b/src/passes/01-parser/shared/Utils.mli @@ -31,9 +31,9 @@ val sepseq_cons : 'a -> 'sep -> ('a,'sep) sepseq -> ('a,'sep) nsepseq (* Reversing *) -val nseq_rev: 'a nseq -> 'a nseq -val nsepseq_rev: ('a,'sep) nsepseq -> ('a,'sep) nsepseq -val sepseq_rev: ('a,'sep) sepseq -> ('a,'sep) sepseq +val nseq_rev : 'a nseq -> 'a nseq +val nsepseq_rev : ('a,'sep) nsepseq -> ('a,'sep) nsepseq +val sepseq_rev : ('a,'sep) sepseq -> ('a,'sep) sepseq (* Rightwards iterators *) @@ -55,7 +55,7 @@ val sepseq_foldr : ('a -> 'b -> 'b) -> ('a,'c) sepseq -> 'b -> 'b val nseq_map : ('a -> 'b) -> 'a nseq -> 'b nseq val nsepseq_map : ('a -> 'b) -> ('a,'c) nsepseq -> ('b,'c) nsepseq -val sepseq_map : ('a -> 'b) -> ('a,'c) sepseq -> ('b,'c) sepseq +val sepseq_map : ('a -> 'b) -> ('a,'c) sepseq -> ('b,'c) sepseq (* Conversions to lists *) diff --git a/src/passes/02-concrete_to_imperative/cameligo.ml b/src/passes/02-concrete_to_imperative/cameligo.ml index 79e0c5acc..73fae2fda 100644 --- a/src/passes/02-concrete_to_imperative/cameligo.ml +++ b/src/passes/02-concrete_to_imperative/cameligo.ml @@ -352,38 +352,32 @@ let rec compile_expression : let compile_selection : Raw.selection -> access = fun s -> match s with | FieldName property -> Access_record property.value - | Component index -> (Access_tuple (snd index.value)) - in - let compile_path : Raw.path -> string * access list = fun p -> - match p with - | Raw.Name v -> (v.value , []) - | Raw.Path p -> ( - let p' = p.value in - let var = p'.struct_name.value in - let path = p'.field_path in - let path' = List.map compile_selection @@ npseq_to_list path in - (var , path') - ) - in - let compile_update = fun (u:Raw.update Region.reg) -> - let (u, loc) = r_split u in - let (name, path) = compile_path u.record in - let record = match path with - | [] -> e_variable (Var.of_name name) - | _ -> e_accessor (e_variable (Var.of_name name)) path in - let updates = u.updates.value.ne_elements in - let%bind updates' = - let aux (f:Raw.field_path_assign Raw.reg) = - let (f,_) = r_split f in - let%bind expr = compile_expression f.field_expr in - ok ( List.map compile_selection (npseq_to_list f.field_path), expr) - in - bind_map_list aux @@ npseq_to_list updates - in - let aux ur (path, expr) = ok @@ e_update ~loc ur path expr in - bind_fold_list aux record updates' - in - trace (abstracting_expr t) @@ + | Component index -> (Access_tuple (snd index.value)) in + + let compile_path : Raw.path -> string * access list = function + Raw.Name v -> v.value, [] + | Raw.Path {value; _} -> + let Raw.{struct_name; field_path; _} = value in + let var = struct_name.value in + let path = List.map compile_selection @@ npseq_to_list field_path + in var, path in + +let compile_update (u: Raw.update Region.reg) = + let u, loc = r_split u in + let name, path = compile_path u.record in + let var = e_variable (Var.of_name name) in + let record = if path = [] then var else e_accessor var path in + let updates = u.updates.value.ne_elements in + let%bind updates' = + let aux (f: Raw.field_path_assignment Raw.reg) = + let f, _ = r_split f in + let%bind expr = compile_expression f.field_expr + in ok (compile_path f.field_path, expr) + in bind_map_list aux @@ npseq_to_list updates in + let aux ur ((var, path), expr) = + ok @@ e_update ~loc ur (Access_record var :: path) expr + in bind_fold_list aux record updates' +in trace (abstracting_expr t) @@ match t with Raw.ELetIn e -> let Raw.{kwd_rec; binding; body; attributes; _} = e.value in diff --git a/src/passes/02-concrete_to_imperative/pascaligo.ml b/src/passes/02-concrete_to_imperative/pascaligo.ml index e8021dd3c..942b5fd04 100644 --- a/src/passes/02-concrete_to_imperative/pascaligo.ml +++ b/src/passes/02-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 s.value + | Raw.TString s -> Some s.value | _ -> None @@ -176,7 +176,7 @@ let rec compile_type_expression (t:Raw.type_expr) : type_expression result = 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 ] -> ( @@ -252,7 +252,7 @@ let rec compile_type_expression (t:Raw.type_expr) : type_expression result = @@ 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 @@ -282,20 +282,21 @@ let rec compile_expression (t:Raw.expr) : expr result = let return x = ok x in match t with | EAnnot a -> ( - let ((expr , type_expr) , loc) = r_split a in + let par, loc = r_split a in + let expr, _, type_expr = par.inside in let%bind expr' = compile_expression expr in let%bind type_expr' = compile_type_expression type_expr in return @@ e_annotation ~loc expr' type_expr' ) | EVar c -> ( - let (c' , loc) = r_split c in + let (c', loc) = r_split c in match constants c' with | None -> return @@ e_variable ~loc (Var.of_name c.value) | Some s -> return @@ e_constant ~loc s [] ) | ECall x -> ( - let ((f, args) , loc) = r_split x in - let (args , args_loc) = r_split args in + let ((f, args), loc) = r_split x in + let (args, args_loc) = r_split args in let args' = npseq_to_list args.inside in match f with | EVar name -> ( @@ -327,7 +328,8 @@ let rec compile_expression (t:Raw.expr) : expr result = | ERecord r -> let%bind fields = bind_list @@ List.map (fun ((k : _ Raw.reg), v) -> let%bind v = compile_expression v in ok (k.value, v)) - @@ List.map (fun (x:Raw.field_assign Raw.reg) -> (x.value.field_name, x.value.field_expr)) + @@ List.map (fun (x:Raw.field_assignment Raw.reg) -> + (x.value.field_name, x.value.field_expr)) @@ npseq_to_list r.value.ne_elements in let aux prev (k, v) = SMap.add k v prev in return @@ e_record (List.fold_left aux SMap.empty fields) @@ -457,37 +459,28 @@ let rec compile_expression (t:Raw.expr) : expr result = let (f , loc) = r_split f in let%bind (_ty_opt, f') = compile_fun_expression ~loc f in return @@ f' - - -and compile_update = fun (u:Raw.update Region.reg) -> - let (u, loc) = r_split u in - let (name, path) = compile_path u.record in - let record = match path with - | [] -> e_variable (Var.of_name name) - | _ -> e_accessor (e_variable (Var.of_name name)) path in - let updates = u.updates.value.ne_elements in +and compile_update (u: Raw.update Region.reg) = + let u, loc = r_split u in + let name, path = compile_path u.record in + let var = e_variable (Var.of_name name) in + let record = if path = [] then var else e_accessor var path in + let updates = u.updates.value.ne_elements in let%bind updates' = - let aux (f:Raw.field_path_assign Raw.reg) = - let (f,_) = r_split f in - let%bind expr = compile_expression f.field_expr in - ok ( List.map compile_selection (npseq_to_list f.field_path), expr) - in - bind_map_list aux @@ npseq_to_list updates - in - let aux ur (path, expr) = ok @@ e_update ~loc ur path expr in - bind_fold_list aux record updates' + let aux (f: Raw.field_path_assignment Raw.reg) = + let f, _ = r_split f in + let%bind expr = compile_expression f.field_expr + in ok (compile_path f.field_path, expr) + in bind_map_list aux @@ npseq_to_list updates in + let aux ur ((var, path), expr) = + ok @@ e_update ~loc ur (Access_record var :: path) expr + in bind_fold_list aux record updates' and compile_logic_expression (t:Raw.logic_expr) : expression result = - let return x = ok x in match t with - | BoolExpr (False reg) -> ( - let loc = Location.lift reg in - return @@ e_bool ~loc false - ) - | BoolExpr (True reg) -> ( - let loc = Location.lift reg in - return @@ e_bool ~loc true - ) + | BoolExpr (False reg) -> + ok @@ e_bool ~loc:(Location.lift reg) false + | BoolExpr (True reg) -> + ok @@ e_bool ~loc:(Location.lift reg) true | BoolExpr (Or b) -> compile_binop "OR" b | BoolExpr (And b) -> @@ -640,11 +633,11 @@ and compile_fun_decl : let binder = Var.of_name binder in let fun_name = Var.of_name fun_name.value in let fun_type = t_function input_type output_type in - let expression : expression = + let expression : expression = e_lambda ~loc binder (Some input_type)(Some output_type) result in let%bind expression = match kwd_recursive with None -> ok @@ expression | - Some _ -> ok @@ e_recursive ~loc fun_name fun_type + Some _ -> ok @@ e_recursive ~loc fun_name fun_type @@ {binder;input_type=Some input_type; output_type= Some output_type; result} in ok ((fun_name, Some fun_type), expression) @@ -675,11 +668,11 @@ and compile_fun_decl : bind_fold_right_list aux result body in let fun_name = Var.of_name fun_name.value in let fun_type = t_function input_type output_type in - let expression : expression = + let expression : expression = e_lambda ~loc binder (Some input_type)(Some output_type) result in let%bind expression = match kwd_recursive with None -> ok @@ expression | - Some _ -> ok @@ e_recursive ~loc fun_name fun_type + Some _ -> ok @@ e_recursive ~loc fun_name fun_type @@ {binder;input_type=Some input_type; output_type= Some output_type; result} in ok ((fun_name, Some fun_type), expression) @@ -690,7 +683,7 @@ and compile_fun_expression : loc:_ -> Raw.fun_expr -> (type_expression option * expression) result = fun ~loc x -> let open! Raw in - let {kwd_recursive;param;ret_type;return} : fun_expr = x in + let {param; ret_type; return; _} : fun_expr = x in let statements = [] in (match param.value.inside with a, [] -> ( @@ -706,10 +699,8 @@ and compile_fun_expression : bind_fold_right_list aux result body in let binder = Var.of_name binder in let fun_type = t_function input_type output_type in - let expression = match kwd_recursive with - | None -> e_lambda ~loc binder (Some input_type)(Some output_type) result - | Some _ -> e_recursive ~loc binder fun_type - @@ {binder;input_type=Some input_type; output_type= Some output_type; result} + let expression = + e_lambda ~loc binder (Some input_type)(Some output_type) result in ok (Some fun_type , expression) ) @@ -737,10 +728,8 @@ and compile_fun_expression : let aux prec cur = cur (Some prec) in bind_fold_right_list aux result body in let fun_type = t_function input_type output_type in - let expression = match kwd_recursive with - | None -> e_lambda ~loc binder (Some input_type)(Some output_type) result - | Some _ -> e_recursive ~loc binder fun_type - @@ {binder;input_type=Some input_type; output_type= Some output_type; result} + let expression = + e_lambda ~loc binder (Some input_type)(Some output_type) result in ok (Some fun_type , expression) ) @@ -814,7 +803,7 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res let%bind bound = compile_expression fi.bound in let%bind step = match fi.step with | None -> ok @@ e_int_z Z.one - | Some step -> compile_expression step in + | Some (_, step) -> compile_expression step in let%bind body = compile_block fi.block.value in let%bind body = body @@ None in return_statement @@ e_for ~loc binder start bound step body @@ -852,7 +841,7 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res compile_block value | ShortBlock {value; _} -> compile_statements @@ fst value.inside in - + let%bind match_true = match_true None in let%bind match_false = match_false None in return_statement @@ e_cond ~loc expr match_true match_false @@ -861,25 +850,25 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res let (a , loc) = r_split a in let%bind value_expr = compile_expression a.rhs in match a.lhs with - | Path path -> ( - let (name , path') = compile_path path in + | Path path -> + let name , path' = compile_path path in let name = Var.of_name name in return_statement @@ e_assign ~loc name path' value_expr - ) - | MapPath v -> ( + | MapPath v -> let v' = v.value in let%bind (varname,map,path) = match v'.path with - | Name name -> ok (name.value , e_variable (Var.of_name name.value), []) + | Name name -> + ok (name.value , + e_variable (Var.of_name name.value), []) | Path p -> - let (name,p') = compile_path v'.path in - let%bind accessor = compile_projection p in - ok @@ (name , accessor , p') - in - let%bind key_expr = compile_expression v'.index.value.inside in + let name, p' = compile_path v'.path in + let%bind accessor = compile_projection p in + ok @@ (name, accessor, p') in + let%bind key_expr = + compile_expression v'.index.value.inside in let expr' = e_map_add key_expr value_expr map in let varname = Var.of_name varname in return_statement @@ e_assign ~loc varname path expr' - ) ) | CaseInstr c -> ( let (c , loc) = r_split c in @@ -895,7 +884,7 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res LongBlock {value; _} -> compile_block value | ShortBlock {value; _} -> - compile_statements @@ fst value.inside in + compile_statements @@ fst value.inside in let%bind case_clause = case_clause None in ok (x.value.pattern, case_clause) in bind_list @@ -904,27 +893,28 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res let%bind m = compile_cases cases in return_statement @@ e_matching ~loc expr m ) - | RecordPatch r -> ( + | RecordPatch r -> let reg = r.region in - let (r,loc) = r_split r in - let aux (fa :Raw.field_assign Raw.reg) : Raw.field_path_assign Raw.reg= - {value = {field_path = (FieldName fa.value.field_name, []); equal=fa.value.equal; field_expr = fa.value.field_expr}; - region = fa.region} - in - let update : Raw.field_path_assign Raw.reg Raw.ne_injection Raw.reg = { - value = Raw.map_ne_injection aux r.record_inj.value; - region=r.record_inj.region - } in - let u : Raw.update = {record=r.path;kwd_with=r.kwd_with; updates=update} in + let r, loc = r_split r in + let aux (fa: Raw.field_assignment Raw.reg) : Raw.field_path_assignment Raw.reg = + {value = {field_path = Name fa.value.field_name; + assignment = fa.value.assignment; + field_expr = fa.value.field_expr}; + region = fa.region} in + let update : Raw.field_path_assignment Raw.reg Raw.ne_injection Raw.reg = { + value = Raw.map_ne_injection aux r.record_inj.value; + region = r.record_inj.region} in + let u : Raw.update = { + record = r.path; + kwd_with = r.kwd_with; + updates = update} in let%bind expr = compile_update {value=u;region=reg} in - let (name , access_path) = compile_path r.path in + let name, access_path = compile_path r.path in let name = Var.of_name name in return_statement @@ e_assign ~loc name access_path expr - - ) - | MapPatch patch -> ( - let (map_p, loc) = r_split patch in - let (name, access_path) = compile_path map_p.path in + | MapPatch patch -> + let map_p, loc = r_split patch in + let name, access_path = compile_path map_p.path in let%bind inj = bind_list @@ List.map (fun (x:Raw.binding Region.reg) -> let x = x.value in @@ -934,20 +924,18 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res in ok @@ (key', value') ) @@ npseq_to_list map_p.map_inj.value.ne_elements in - match inj with + (match inj with | [] -> return_statement @@ e_skip ~loc () | _ :: _ -> let assigns = List.fold_right (fun (key, value) map -> (e_map_add key value map)) inj (e_accessor ~loc (e_variable (Var.of_name name)) access_path) - in - let name = Var.of_name name in - return_statement @@ e_assign ~loc name access_path assigns - ) + and name = Var.of_name name in + return_statement @@ e_assign ~loc name access_path assigns) | SetPatch patch -> ( - let (setp, loc) = r_split patch in - let (name , access_path) = compile_path setp.path in + let setp, loc = r_split patch in + let name, access_path = compile_path setp.path in let%bind inj = bind_list @@ List.map compile_expression @@ @@ -961,13 +949,13 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res let name = Var.of_name name in return_statement @@ e_assign ~loc name access_path assigns ) - | MapRemove r -> ( + | MapRemove r -> let (v , loc) = r_split r in let key = v.key in let%bind (name,map,path) = match v.map with | Name v -> ok (v.value , e_variable (Var.of_name v.value) , []) | Path p -> - let (name,p') = compile_path v.map in + let name, p' = compile_path v.map in let%bind accessor = compile_projection p in ok @@ (name , accessor , p') in @@ -975,37 +963,32 @@ and compile_single_instruction : Raw.instruction -> (_ -> expression result) res let expr = e_constant ~loc C_MAP_REMOVE [key' ; map] in let name = Var.of_name name in return_statement @@ e_assign ~loc name path expr - ) - | SetRemove r -> ( - let (set_rm, loc) = r_split r in - let%bind (name, set, path) = match set_rm.set with - | Name v -> ok (v.value, e_variable (Var.of_name v.value), []) + | SetRemove r -> + let set_rm, loc = r_split r in + let%bind (name, set, path) = + match set_rm.set with + | Name v -> + ok (v.value, e_variable (Var.of_name v.value), []) | Path path -> - let(name, p') = compile_path set_rm.set in - let%bind accessor = compile_projection path in - ok @@ (name, accessor, p') - in + let name, p' = compile_path set_rm.set in + let%bind accessor = compile_projection path in + ok @@ (name, accessor, p') in let%bind removed' = compile_expression set_rm.element in let expr = e_constant ~loc C_SET_REMOVE [removed' ; set] in let name = Var.of_name name in return_statement @@ e_assign ~loc name path expr - ) -and compile_path : Raw.path -> string * access list = fun p -> - match p with - | Raw.Name v -> (v.value , []) - | Raw.Path p -> ( - let p' = p.value in - let var = p'.struct_name.value in - let path = p'.field_path in - let path' = List.map compile_selection @@ npseq_to_list path in - (var , path') - ) +and compile_path : Raw.path -> string * access list = function + Raw.Name v -> v.value, [] +| Raw.Path {value; _} -> + let Raw.{struct_name; field_path; _} = value in + let var = struct_name.value in + let path = List.map compile_selection @@ npseq_to_list field_path + in var, path -and compile_selection : Raw.selection -> access = fun s -> - match s with - | FieldName property -> Access_record property.value - | Component index -> (Access_tuple (snd index.value)) +and compile_selection : Raw.selection -> access = function + FieldName property -> Access_record property.value +| Component index -> Access_tuple (snd index.value) and compile_cases : (Raw.pattern * expression) list -> matching_expr result = fun t -> let open Raw in diff --git a/src/test/contracts/dune b/src/test/contracts/dune new file mode 100644 index 000000000..0f59f8b84 --- /dev/null +++ b/src/test/contracts/dune @@ -0,0 +1,1515 @@ +;; pretty print contracts to an output file +;; reasonligo +(rule (targets address.religo_output) (action (with-stdout-to address.religo_output (run ligo "pretty-print" "address.religo"))) (deps address.religo)) +(rule (targets amount.religo_output) (action (with-stdout-to amount.religo_output (run ligo "pretty-print" "amount.religo"))) (deps amount.religo)) +(rule (targets arithmetic.religo_output) (action (with-stdout-to arithmetic.religo_output (run ligo "pretty-print" "arithmetic.religo"))) (deps arithmetic.religo)) +(rule (targets bad_address_format.religo_output) (action (with-stdout-to bad_address_format.religo_output (run ligo "pretty-print" "bad_address_format.religo"))) (deps bad_address_format.religo)) +(rule (targets balance_constant.religo_output) (action (with-stdout-to balance_constant.religo_output (run ligo "pretty-print" "balance_constant.religo"))) (deps balance_constant.religo)) +(rule (targets bitwise_arithmetic.religo_output) (action (with-stdout-to bitwise_arithmetic.religo_output (run ligo "pretty-print" "bitwise_arithmetic.religo"))) (deps bitwise_arithmetic.religo)) +(rule (targets boolean_operators.religo_output) (action (with-stdout-to boolean_operators.religo_output (run ligo "pretty-print" "boolean_operators.religo"))) (deps boolean_operators.religo)) +(rule (targets bytes_arithmetic.religo_output) (action (with-stdout-to bytes_arithmetic.religo_output (run ligo "pretty-print" "bytes_arithmetic.religo"))) (deps bytes_arithmetic.religo)) +(rule (targets bytes_unpack.religo_output) (action (with-stdout-to bytes_unpack.religo_output (run ligo "pretty-print" "bytes_unpack.religo"))) (deps bytes_unpack.religo)) +(rule (targets check_signature.religo_output) (action (with-stdout-to check_signature.religo_output (run ligo "pretty-print" "check_signature.religo"))) (deps check_signature.religo)) +(rule (targets closure.religo_output) (action (with-stdout-to closure.religo_output (run ligo "pretty-print" "closure.religo"))) (deps closure.religo)) +(rule (targets condition-shadowing.religo_output) (action (with-stdout-to condition-shadowing.religo_output (run ligo "pretty-print" "condition-shadowing.religo"))) (deps condition-shadowing.religo)) +(rule (targets condition.religo_output) (action (with-stdout-to condition.religo_output (run ligo "pretty-print" "condition.religo"))) (deps condition.religo)) +(rule (targets counter.religo_output) (action (with-stdout-to counter.religo_output (run ligo "pretty-print" "counter.religo"))) (deps counter.religo)) +(rule (targets crypto.religo_output) (action (with-stdout-to crypto.religo_output (run ligo "pretty-print" "crypto.religo"))) (deps crypto.religo)) +(rule (targets empty_case.religo_output) (action (with-stdout-to empty_case.religo_output (run ligo "pretty-print" "empty_case.religo"))) (deps empty_case.religo)) +(rule (targets eq_bool.religo_output) (action (with-stdout-to eq_bool.religo_output (run ligo "pretty-print" "eq_bool.religo"))) (deps eq_bool.religo)) +(rule (targets failwith.religo_output) (action (with-stdout-to failwith.religo_output (run ligo "pretty-print" "failwith.religo"))) (deps failwith.religo)) +(rule (targets function-shared.religo_output) (action (with-stdout-to function-shared.religo_output (run ligo "pretty-print" "function-shared.religo"))) (deps function-shared.religo)) +(rule (targets high-order.religo_output) (action (with-stdout-to high-order.religo_output (run ligo "pretty-print" "high-order.religo"))) (deps high-order.religo)) +(rule (targets implicit_account.religo_output) (action (with-stdout-to implicit_account.religo_output (run ligo "pretty-print" "implicit_account.religo"))) (deps implicit_account.religo)) +(rule (targets included.religo_output) (action (with-stdout-to included.religo_output (run ligo "pretty-print" "included.religo"))) (deps included.religo)) +(rule (targets includer.religo_output) (action (with-stdout-to includer.religo_output (run ligo "pretty-print" "includer.religo"))) (deps includer.religo)) +(rule (targets key_hash.religo_output) (action (with-stdout-to key_hash.religo_output (run ligo "pretty-print" "key_hash.religo"))) (deps key_hash.religo)) +(rule (targets lambda.religo_output) (action (with-stdout-to lambda.religo_output (run ligo "pretty-print" "lambda.religo"))) (deps lambda.religo)) +(rule (targets lambda2.religo_output) (action (with-stdout-to lambda2.religo_output (run ligo "pretty-print" "lambda2.religo"))) (deps lambda2.religo)) +(rule (targets let_multiple.religo_output) (action (with-stdout-to let_multiple.religo_output (run ligo "pretty-print" "let_multiple.religo"))) (deps let_multiple.religo)) +(rule (targets letin.religo_output) (action (with-stdout-to letin.religo_output (run ligo "pretty-print" "letin.religo"))) (deps letin.religo)) +(rule (targets list.religo_output) (action (with-stdout-to list.religo_output (run ligo "pretty-print" "list.religo"))) (deps list.religo)) +(rule (targets loop.religo_output) (action (with-stdout-to loop.religo_output (run ligo "pretty-print" "loop.religo"))) (deps loop.religo)) +(rule (targets map.religo_output) (action (with-stdout-to map.religo_output (run ligo "pretty-print" "map.religo"))) (deps map.religo)) +(rule (targets match_bis.religo_output) (action (with-stdout-to match_bis.religo_output (run ligo "pretty-print" "match_bis.religo"))) (deps match_bis.religo)) +(rule (targets match.religo_output) (action (with-stdout-to match.religo_output (run ligo "pretty-print" "match.religo"))) (deps match.religo)) +(rule (targets michelson_pair_tree.religo_output) (action (with-stdout-to michelson_pair_tree.religo_output (run ligo "pretty-print" "michelson_pair_tree.religo"))) (deps michelson_pair_tree.religo)) +(rule (targets multiple-parameters.religo_output) (action (with-stdout-to multiple-parameters.religo_output (run ligo "pretty-print" "multiple-parameters.religo"))) (deps multiple-parameters.religo)) +(rule (targets multisig.religo_output) (action (with-stdout-to multisig.religo_output (run ligo "pretty-print" "multisig.religo"))) (deps multisig.religo)) +(rule (targets no_semicolon.religo_output) (action (with-stdout-to no_semicolon.religo_output (run ligo "pretty-print" "no_semicolon.religo"))) (deps no_semicolon.religo)) +(rule (targets pledge.religo_output) (action (with-stdout-to pledge.religo_output (run ligo "pretty-print" "pledge.religo"))) (deps pledge.religo)) +(rule (targets record.religo_output) (action (with-stdout-to record.religo_output (run ligo "pretty-print" "record.religo"))) (deps record.religo)) +(rule (targets recursion.religo_output) (action (with-stdout-to recursion.religo_output (run ligo "pretty-print" "recursion.religo"))) (deps recursion.religo)) +(rule (targets self_address.religo_output) (action (with-stdout-to self_address.religo_output (run ligo "pretty-print" "self_address.religo"))) (deps self_address.religo)) +(rule (targets set_arithmetic.religo_output) (action (with-stdout-to set_arithmetic.religo_output (run ligo "pretty-print" "set_arithmetic.religo"))) (deps set_arithmetic.religo)) +(rule (targets set_delegate.religo_output) (action (with-stdout-to set_delegate.religo_output (run ligo "pretty-print" "set_delegate.religo"))) (deps set_delegate.religo)) +(rule (targets single_record_item.religo_output) (action (with-stdout-to single_record_item.religo_output (run ligo "pretty-print" "single_record_item.religo"))) (deps single_record_item.religo)) +(rule (targets string_arithmetic.religo_output) (action (with-stdout-to string_arithmetic.religo_output (run ligo "pretty-print" "string_arithmetic.religo"))) (deps string_arithmetic.religo)) +(rule (targets super-counter.religo_output) (action (with-stdout-to super-counter.religo_output (run ligo "pretty-print" "super-counter.religo"))) (deps super-counter.religo)) +(rule (targets tuple_list.religo_output) (action (with-stdout-to tuple_list.religo_output (run ligo "pretty-print" "tuple_list.religo"))) (deps tuple_list.religo)) +(rule (targets tuple_param_destruct.religo_output) (action (with-stdout-to tuple_param_destruct.religo_output (run ligo "pretty-print" "tuple_param_destruct.religo"))) (deps tuple_param_destruct.religo)) +(rule (targets tuple_type.religo_output) (action (with-stdout-to tuple_type.religo_output (run ligo "pretty-print" "tuple_type.religo"))) (deps tuple_type.religo)) +(rule (targets tuple.religo_output) (action (with-stdout-to tuple.religo_output (run ligo "pretty-print" "tuple.religo"))) (deps tuple.religo)) +(rule (targets tuples_no_annotation.religo_output) (action (with-stdout-to tuples_no_annotation.religo_output (run ligo "pretty-print" "tuples_no_annotation.religo"))) (deps tuples_no_annotation.religo)) +(rule (targets tuples_sequences_functions.religo_output) (action (with-stdout-to tuples_sequences_functions.religo_output (run ligo "pretty-print" "tuples_sequences_functions.religo"))) (deps tuples_sequences_functions.religo)) +(rule (targets variant.religo_output) (action (with-stdout-to variant.religo_output (run ligo "pretty-print" "variant.religo"))) (deps variant.religo)) +(rule (targets website2.religo_output) (action (with-stdout-to website2.religo_output (run ligo "pretty-print" "website2.religo"))) (deps website2.religo)) + +;; cameligo +(rule (targets assert.mligo_output) (action (with-stdout-to assert.mligo_output (run ligo pretty-print assert.mligo))) (deps assert.mligo)) +(rule (targets address.mligo_output) (action (with-stdout-to address.mligo_output (run ligo pretty-print address.mligo))) (deps address.mligo)) +(rule (targets amount_lambda.mligo_output) (action (with-stdout-to amount_lambda.mligo_output (run ligo pretty-print amount_lambda.mligo))) (deps amount_lambda.mligo)) +(rule (targets amount.mligo_output) (action (with-stdout-to amount.mligo_output (run ligo pretty-print amount.mligo))) (deps amount.mligo)) +(rule (targets arithmetic.mligo_output) (action (with-stdout-to arithmetic.mligo_output (run ligo pretty-print arithmetic.mligo))) (deps arithmetic.mligo)) +(rule (targets attributes.mligo_output) (action (with-stdout-to attributes.mligo_output (run ligo pretty-print attributes.mligo))) (deps attributes.mligo)) +(rule (targets balance_constant.mligo_output) (action (with-stdout-to balance_constant.mligo_output (run ligo pretty-print balance_constant.mligo))) (deps balance_constant.mligo)) +(rule (targets basic.mligo_output) (action (with-stdout-to basic.mligo_output (run ligo pretty-print basic.mligo))) (deps basic.mligo)) +(rule (targets big_map.mligo_output) (action (with-stdout-to big_map.mligo_output (run ligo pretty-print big_map.mligo))) (deps big_map.mligo)) +(rule (targets bitwise_arithmetic.mligo_output) (action (with-stdout-to bitwise_arithmetic.mligo_output (run ligo pretty-print bitwise_arithmetic.mligo))) (deps bitwise_arithmetic.mligo)) +(rule (targets boolean_operators.mligo_output) (action (with-stdout-to boolean_operators.mligo_output (run ligo pretty-print boolean_operators.mligo))) (deps boolean_operators.mligo)) +(rule (targets bytes_arithmetic.mligo_output) (action (with-stdout-to bytes_arithmetic.mligo_output (run ligo pretty-print bytes_arithmetic.mligo))) (deps bytes_arithmetic.mligo)) +(rule (targets bytes_unpack.mligo_output) (action (with-stdout-to bytes_unpack.mligo_output (run ligo pretty-print bytes_unpack.mligo))) (deps bytes_unpack.mligo)) +(rule (targets check_signature.mligo_output) (action (with-stdout-to check_signature.mligo_output (run ligo pretty-print check_signature.mligo))) (deps check_signature.mligo)) +(rule (targets closure.mligo_output) (action (with-stdout-to closure.mligo_output (run ligo pretty-print closure.mligo))) (deps closure.mligo)) +(rule (targets comparable.mligo_output) (action (with-stdout-to comparable.mligo_output (run ligo pretty-print comparable.mligo))) (deps comparable.mligo)) +(rule (targets condition-annot.mligo_output) (action (with-stdout-to condition-annot.mligo_output (run ligo pretty-print condition-annot.mligo))) (deps condition-annot.mligo)) +(rule (targets condition-shadowing.mligo_output) (action (with-stdout-to condition-shadowing.mligo_output (run ligo pretty-print condition-shadowing.mligo))) (deps condition-shadowing.mligo)) +(rule (targets condition.mligo_output) (action (with-stdout-to condition.mligo_output (run ligo pretty-print condition.mligo))) (deps condition.mligo)) +(rule (targets counter.mligo_output) (action (with-stdout-to counter.mligo_output (run ligo pretty-print counter.mligo))) (deps counter.mligo)) +(rule (targets create_contract.mligo_output) (action (with-stdout-to create_contract.mligo_output (run ligo pretty-print create_contract.mligo))) (deps create_contract.mligo)) +(rule (targets crypto.mligo_output) (action (with-stdout-to crypto.mligo_output (run ligo pretty-print crypto.mligo))) (deps crypto.mligo)) +(rule (targets curry.mligo_output) (action (with-stdout-to curry.mligo_output (run ligo pretty-print curry.mligo))) (deps curry.mligo)) +(rule (targets double_michelson_or.mligo_output) (action (with-stdout-to double_michelson_or.mligo_output (run ligo pretty-print double_michelson_or.mligo))) (deps double_michelson_or.mligo)) +(rule (targets empty_case.mligo_output) (action (with-stdout-to empty_case.mligo_output (run ligo pretty-print empty_case.mligo))) (deps empty_case.mligo)) +(rule (targets eq_bool.mligo_output) (action (with-stdout-to eq_bool.mligo_output (run ligo pretty-print eq_bool.mligo))) (deps eq_bool.mligo)) +(rule (targets FA1.2.mligo_output) (action (with-stdout-to FA1.2.mligo_output (run ligo pretty-print FA1.2.mligo))) (deps FA1.2.mligo)) +(rule (targets failwith.mligo_output) (action (with-stdout-to failwith.mligo_output (run ligo pretty-print failwith.mligo))) (deps failwith.mligo)) +(rule (targets fibo.mligo_output) (action (with-stdout-to fibo.mligo_output (run ligo pretty-print fibo.mligo))) (deps fibo.mligo)) +(rule (targets fibo2.mligo_output) (action (with-stdout-to fibo2.mligo_output (run ligo pretty-print fibo2.mligo))) (deps fibo2.mligo)) +(rule (targets fibo3.mligo_output) (action (with-stdout-to fibo3.mligo_output (run ligo pretty-print fibo3.mligo))) (deps fibo3.mligo)) +(rule (targets fibo4.mligo_output) (action (with-stdout-to fibo4.mligo_output (run ligo pretty-print fibo4.mligo))) (deps fibo4.mligo)) +(rule (targets function-shared.mligo_output) (action (with-stdout-to function-shared.mligo_output (run ligo pretty-print function-shared.mligo))) (deps function-shared.mligo)) +(rule (targets guess_string.mligo_output) (action (with-stdout-to guess_string.mligo_output (run ligo pretty-print guess_string.mligo))) (deps guess_string.mligo)) + +;; pascaligo +(rule (targets address.ligo_output) (action (with-stdout-to address.ligo_output (run ligo pretty-print address.ligo))) (deps address.ligo)) +(rule (targets amount.ligo_output) (action (with-stdout-to amount.ligo_output (run ligo pretty-print amount.ligo))) (deps amount.ligo)) +(rule (targets annotation.ligo_output) (action (with-stdout-to annotation.ligo_output (run ligo pretty-print annotation.ligo))) (deps annotation.ligo)) +(rule (targets application.ligo_output) (action (with-stdout-to application.ligo_output (run ligo pretty-print application.ligo))) (deps application.ligo)) +(rule (targets arithmetic.ligo_output) (action (with-stdout-to arithmetic.ligo_output (run ligo pretty-print arithmetic.ligo))) (deps arithmetic.ligo)) +(rule (targets assign.ligo_output) (action (with-stdout-to assign.ligo_output (run ligo pretty-print assign.ligo))) (deps assign.ligo)) +(rule (targets attributes.ligo_output) (action (with-stdout-to attributes.ligo_output (run ligo pretty-print attributes.ligo))) (deps attributes.ligo)) +(rule (targets bad_timestamp.ligo_output) (action (with-stdout-to bad_timestamp.ligo_output (run ligo pretty-print bad_timestamp.ligo))) (deps bad_timestamp.ligo)) +(rule (targets bad_type_operator.ligo_output) (action (with-stdout-to bad_type_operator.ligo_output (run ligo pretty-print bad_type_operator.ligo))) (deps bad_type_operator.ligo)) +(rule (targets balance_constant.ligo_output) (action (with-stdout-to balance_constant.ligo_output (run ligo pretty-print balance_constant.ligo))) (deps balance_constant.ligo)) +(rule (targets big_map.ligo_output) (action (with-stdout-to big_map.ligo_output (run ligo pretty-print big_map.ligo))) (deps big_map.ligo)) +(rule (targets bitwise_arithmetic.ligo_output) (action (with-stdout-to bitwise_arithmetic.ligo_output (run ligo pretty-print bitwise_arithmetic.ligo))) (deps bitwise_arithmetic.ligo)) +(rule (targets blockless.ligo_output) (action (with-stdout-to blockless.ligo_output (run ligo pretty-print blockless.ligo))) (deps blockless.ligo)) +(rule (targets boolean_operators.ligo_output) (action (with-stdout-to boolean_operators.ligo_output (run ligo pretty-print boolean_operators.ligo))) (deps boolean_operators.ligo)) +(rule (targets bytes_arithmetic.ligo_output) (action (with-stdout-to bytes_arithmetic.ligo_output (run ligo pretty-print bytes_arithmetic.ligo))) (deps bytes_arithmetic.ligo)) +(rule (targets bytes_unpack.ligo_output) (action (with-stdout-to bytes_unpack.ligo_output (run ligo pretty-print bytes_unpack.ligo))) (deps bytes_unpack.ligo)) +(rule (targets chain_id.ligo_output) (action (with-stdout-to chain_id.ligo_output (run ligo pretty-print chain_id.ligo))) (deps chain_id.ligo)) +(rule (targets check_signature.ligo_output) (action (with-stdout-to check_signature.ligo_output (run ligo pretty-print check_signature.ligo))) (deps check_signature.ligo)) +(rule (targets closure-1.ligo_output) (action (with-stdout-to closure-1.ligo_output (run ligo pretty-print closure-1.ligo))) (deps closure-1.ligo)) +(rule (targets closure-2.ligo_output) (action (with-stdout-to closure-2.ligo_output (run ligo pretty-print closure-2.ligo))) (deps closure-2.ligo)) +(rule (targets closure-3.ligo_output) (action (with-stdout-to closure-3.ligo_output (run ligo pretty-print closure-3.ligo))) (deps closure-3.ligo)) +(rule (targets closure.ligo_output) (action (with-stdout-to closure.ligo_output (run ligo pretty-print closure.ligo))) (deps closure.ligo)) +(rule (targets coase.ligo_output) (action (with-stdout-to coase.ligo_output (run ligo pretty-print coase.ligo))) (deps coase.ligo)) +(rule (targets condition-simple.ligo_output) (action (with-stdout-to condition-simple.ligo_output (run ligo pretty-print condition-simple.ligo))) (deps condition-simple.ligo)) +(rule (targets condition.ligo_output) (action (with-stdout-to condition.ligo_output (run ligo pretty-print condition.ligo))) (deps condition.ligo)) +(rule (targets counter.ligo_output) (action (with-stdout-to counter.ligo_output (run ligo pretty-print counter.ligo))) (deps counter.ligo)) +(rule (targets crypto.ligo_output) (action (with-stdout-to crypto.ligo_output (run ligo pretty-print crypto.ligo))) (deps crypto.ligo)) +(rule (targets declaration-local.ligo_output) (action (with-stdout-to declaration-local.ligo_output (run ligo pretty-print declaration-local.ligo))) (deps declaration-local.ligo)) +(rule (targets declarations.ligo_output) (action (with-stdout-to declarations.ligo_output (run ligo pretty-print declarations.ligo))) (deps declarations.ligo)) +(rule (targets deep_access.ligo_output) (action (with-stdout-to deep_access.ligo_output (run ligo pretty-print deep_access.ligo))) (deps deep_access.ligo)) +(rule (targets dispatch-counter.ligo_output) (action (with-stdout-to dispatch-counter.ligo_output (run ligo pretty-print dispatch-counter.ligo))) (deps dispatch-counter.ligo)) +(rule (targets double_main.ligo_output) (action (with-stdout-to double_main.ligo_output (run ligo pretty-print double_main.ligo))) (deps double_main.ligo)) +(rule (targets double_michelson_or.ligo_output) (action (with-stdout-to double_michelson_or.ligo_output (run ligo pretty-print double_michelson_or.ligo))) (deps double_michelson_or.ligo)) +(rule (targets empty_case.ligo_output) (action (with-stdout-to empty_case.ligo_output (run ligo pretty-print empty_case.ligo))) (deps empty_case.ligo)) +(rule (targets entrypoints.ligo_output) (action (with-stdout-to entrypoints.ligo_output (run ligo pretty-print entrypoints.ligo))) (deps entrypoints.ligo)) +(rule (targets eq_bool.ligo_output) (action (with-stdout-to eq_bool.ligo_output (run ligo pretty-print eq_bool.ligo))) (deps eq_bool.ligo)) +(rule (targets evaluation_tests.ligo_output) (action (with-stdout-to evaluation_tests.ligo_output (run ligo pretty-print evaluation_tests.ligo))) (deps evaluation_tests.ligo)) +(rule (targets FA1.2.ligo_output) (action (with-stdout-to FA1.2.ligo_output (run ligo pretty-print FA1.2.ligo))) (deps FA1.2.ligo)) +(rule (targets failwith.ligo_output) (action (with-stdout-to failwith.ligo_output (run ligo pretty-print failwith.ligo))) (deps failwith.ligo)) +(rule (targets for_fail.ligo_output) (action (with-stdout-to for_fail.ligo_output (run ligo pretty-print for_fail.ligo))) (deps for_fail.ligo)) +(rule (targets function-anon.ligo_output) (action (with-stdout-to function-anon.ligo_output (run ligo pretty-print function-anon.ligo))) (deps function-anon.ligo)) +(rule (targets function-complex.ligo_output) (action (with-stdout-to function-complex.ligo_output (run ligo pretty-print function-complex.ligo))) (deps function-complex.ligo)) +(rule (targets function-shared.ligo_output) (action (with-stdout-to function-shared.ligo_output (run ligo pretty-print function-shared.ligo))) (deps function-shared.ligo)) +(rule (targets function.ligo_output) (action (with-stdout-to function.ligo_output (run ligo pretty-print function.ligo))) (deps function.ligo)) +(rule (targets get_contract.ligo_output) (action (with-stdout-to get_contract.ligo_output (run ligo pretty-print get_contract.ligo))) (deps get_contract.ligo)) +(rule (targets high-order.ligo_output) (action (with-stdout-to high-order.ligo_output (run ligo pretty-print high-order.ligo))) (deps high-order.ligo)) +(rule (targets id.ligo_output) (action (with-stdout-to id.ligo_output (run ligo pretty-print id.ligo))) (deps id.ligo)) +(rule (targets implicit_account.ligo_output) (action (with-stdout-to implicit_account.ligo_output (run ligo pretty-print implicit_account.ligo))) (deps implicit_account.ligo)) +(rule (targets included.ligo_output) (action (with-stdout-to included.ligo_output (run ligo pretty-print included.ligo))) (deps included.ligo)) +(rule (targets includer.ligo_output) (action (with-stdout-to includer.ligo_output (run ligo pretty-print includer.ligo))) (deps includer.ligo)) +(rule (targets isnat.ligo_output) (action (with-stdout-to isnat.ligo_output (run ligo pretty-print isnat.ligo))) (deps isnat.ligo)) +(rule (targets key_hash_comparable.ligo_output) (action (with-stdout-to key_hash_comparable.ligo_output (run ligo pretty-print key_hash_comparable.ligo))) (deps key_hash_comparable.ligo)) +(rule (targets key_hash.ligo_output) (action (with-stdout-to key_hash.ligo_output (run ligo pretty-print key_hash.ligo))) (deps key_hash.ligo)) +(rule (targets lambda.ligo_output) (action (with-stdout-to lambda.ligo_output (run ligo pretty-print lambda.ligo))) (deps lambda.ligo)) +(rule (targets list.ligo_output) (action (with-stdout-to list.ligo_output (run ligo pretty-print list.ligo))) (deps list.ligo)) +(rule (targets loop_bugs.ligo_output) (action (with-stdout-to loop_bugs.ligo_output (run ligo pretty-print loop_bugs.ligo))) (deps loop_bugs.ligo)) +(rule (targets loop.ligo_output) (action (with-stdout-to loop.ligo_output (run ligo pretty-print loop.ligo))) (deps loop.ligo)) +(rule (targets map.ligo_output) (action (with-stdout-to map.ligo_output (run ligo pretty-print map.ligo))) (deps map.ligo)) +(rule (targets match.ligo_output) (action (with-stdout-to match.ligo_output (run ligo pretty-print match.ligo))) (deps match.ligo)) +(rule (targets michelson_or_tree_intermediary.ligo_output) (action (with-stdout-to michelson_or_tree_intermediary.ligo_output (run ligo pretty-print michelson_or_tree_intermediary.ligo))) (deps michelson_or_tree_intermediary.ligo)) +(rule (targets michelson_or_tree.ligo_output) (action (with-stdout-to michelson_or_tree.ligo_output (run ligo pretty-print michelson_or_tree.ligo))) (deps michelson_or_tree.ligo)) +(rule (targets michelson_pair_tree_intermediary.ligo_output) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_output (run ligo pretty-print michelson_pair_tree_intermediary.ligo))) (deps michelson_pair_tree_intermediary.ligo)) +(rule (targets michelson_pair_tree.ligo_output) (action (with-stdout-to michelson_pair_tree.ligo_output (run ligo pretty-print michelson_pair_tree.ligo))) (deps michelson_pair_tree.ligo)) +(rule (targets multiple-parameters.ligo_output) (action (with-stdout-to multiple-parameters.ligo_output (run ligo pretty-print multiple-parameters.ligo))) (deps multiple-parameters.ligo)) +(rule (targets multisig-v2.ligo_output) (action (with-stdout-to multisig-v2.ligo_output (run ligo pretty-print multisig-v2.ligo))) (deps multisig-v2.ligo)) +(rule (targets multisig.ligo_output) (action (with-stdout-to multisig.ligo_output (run ligo pretty-print multisig.ligo))) (deps multisig.ligo)) +(rule (targets option.ligo_output) (action (with-stdout-to option.ligo_output (run ligo pretty-print option.ligo))) (deps option.ligo)) +(rule (targets quote-declaration.ligo_output) (action (with-stdout-to quote-declaration.ligo_output (run ligo pretty-print quote-declaration.ligo))) (deps quote-declaration.ligo)) +(rule (targets quote-declarations.ligo_output) (action (with-stdout-to quote-declarations.ligo_output (run ligo pretty-print quote-declarations.ligo))) (deps quote-declarations.ligo)) +(rule (targets record.ligo_output) (action (with-stdout-to record.ligo_output (run ligo pretty-print record.ligo))) (deps record.ligo)) +(rule (targets recursion.ligo_output) (action (with-stdout-to recursion.ligo_output (run ligo pretty-print recursion.ligo))) (deps recursion.ligo)) +(rule (targets redeclaration.ligo_output) (action (with-stdout-to redeclaration.ligo_output (run ligo pretty-print redeclaration.ligo))) (deps redeclaration.ligo)) +(rule (targets replaceable_id.ligo_output) (action (with-stdout-to replaceable_id.ligo_output (run ligo pretty-print replaceable_id.ligo))) (deps replaceable_id.ligo)) +(rule (targets self_address.ligo_output) (action (with-stdout-to self_address.ligo_output (run ligo pretty-print self_address.ligo))) (deps self_address.ligo)) +(rule (targets self_type_annotation.ligo_output) (action (with-stdout-to self_type_annotation.ligo_output (run ligo pretty-print self_type_annotation.ligo))) (deps self_type_annotation.ligo)) +(rule (targets self_with_entrypoint.ligo_output) (action (with-stdout-to self_with_entrypoint.ligo_output (run ligo pretty-print self_with_entrypoint.ligo))) (deps self_with_entrypoint.ligo)) +(rule (targets self_without_entrypoint.ligo_output) (action (with-stdout-to self_without_entrypoint.ligo_output (run ligo pretty-print self_without_entrypoint.ligo))) (deps self_without_entrypoint.ligo)) +(rule (targets set_arithmetic-1.ligo_output) (action (with-stdout-to set_arithmetic-1.ligo_output (run ligo pretty-print set_arithmetic-1.ligo))) (deps set_arithmetic-1.ligo)) +(rule (targets set_arithmetic.ligo_output) (action (with-stdout-to set_arithmetic.ligo_output (run ligo pretty-print set_arithmetic.ligo))) (deps set_arithmetic.ligo)) +(rule (targets set_delegate.ligo_output) (action (with-stdout-to set_delegate.ligo_output (run ligo pretty-print set_delegate.ligo))) (deps set_delegate.ligo)) +(rule (targets shadow.ligo_output) (action (with-stdout-to shadow.ligo_output (run ligo pretty-print shadow.ligo))) (deps shadow.ligo)) +(rule (targets simple_access.ligo_output) (action (with-stdout-to simple_access.ligo_output (run ligo pretty-print simple_access.ligo))) (deps simple_access.ligo)) +(rule (targets string_arithmetic.ligo_output) (action (with-stdout-to string_arithmetic.ligo_output (run ligo pretty-print string_arithmetic.ligo))) (deps string_arithmetic.ligo)) +(rule (targets string.ligo_output) (action (with-stdout-to string.ligo_output (run ligo pretty-print string.ligo))) (deps string.ligo)) +(rule (targets super-counter.ligo_output) (action (with-stdout-to super-counter.ligo_output (run ligo pretty-print super-counter.ligo))) (deps super-counter.ligo)) +(rule (targets tez.ligo_output) (action (with-stdout-to tez.ligo_output (run ligo pretty-print tez.ligo))) (deps tez.ligo)) +(rule (targets time-lock.ligo_output) (action (with-stdout-to time-lock.ligo_output (run ligo pretty-print time-lock.ligo))) (deps time-lock.ligo)) +(rule (targets timestamp.ligo_output) (action (with-stdout-to timestamp.ligo_output (run ligo pretty-print timestamp.ligo))) (deps timestamp.ligo)) +(rule (targets toto.ligo_output) (action (with-stdout-to toto.ligo_output (run ligo pretty-print toto.ligo))) (deps toto.ligo)) +(rule (targets tuple.ligo_output) (action (with-stdout-to tuple.ligo_output (run ligo pretty-print tuple.ligo))) (deps tuple.ligo)) +(rule (targets type-alias.ligo_output) (action (with-stdout-to type-alias.ligo_output (run ligo pretty-print type-alias.ligo))) (deps type-alias.ligo)) +(rule (targets unit.ligo_output) (action (with-stdout-to unit.ligo_output (run ligo pretty-print unit.ligo))) (deps unit.ligo)) +(rule (targets variant-matching.ligo_output) (action (with-stdout-to variant-matching.ligo_output (run ligo pretty-print variant-matching.ligo))) (deps variant-matching.ligo)) +(rule (targets variant.ligo_output) (action (with-stdout-to variant.ligo_output (run ligo pretty-print variant.ligo))) (deps variant.ligo)) +(rule (targets website1.ligo_output) (action (with-stdout-to website1.ligo_output (run ligo pretty-print website1.ligo))) (deps website1.ligo)) +(rule (targets website2.ligo_output) (action (with-stdout-to website2.ligo_output (run ligo pretty-print website2.ligo))) (deps website2.ligo)) + +;; compare the output with the expected result +;; reasonligo +(alias (name runtest) (action (diff expected/address.religo.expected address.religo_output))) +(alias (name runtest) (action (diff expected/amount.religo.expected amount.religo_output))) +(alias (name runtest) (action (diff expected/arithmetic.religo.expected arithmetic.religo_output))) +(alias (name runtest) (action (diff expected/bad_address_format.religo.expected bad_address_format.religo_output))) +(alias (name runtest) (action (diff expected/balance_constant.religo.expected balance_constant.religo_output))) +(alias (name runtest) (action (diff expected/bitwise_arithmetic.religo.expected bitwise_arithmetic.religo_output))) +(alias (name runtest) (action (diff expected/boolean_operators.religo.expected boolean_operators.religo_output))) +(alias (name runtest) (action (diff expected/bytes_arithmetic.religo.expected bytes_arithmetic.religo_output))) +(alias (name runtest) (action (diff expected/bytes_unpack.religo.expected bytes_unpack.religo_output))) +(alias (name runtest) (action (diff expected/check_signature.religo.expected check_signature.religo_output))) +(alias (name runtest) (action (diff expected/closure.religo.expected closure.religo_output))) +(alias (name runtest) (action (diff expected/condition-shadowing.religo.expected condition-shadowing.religo_output))) +(alias (name runtest) (action (diff expected/condition.religo.expected condition.religo_output))) +(alias (name runtest) (action (diff expected/counter.religo.expected counter.religo_output))) +(alias (name runtest) (action (diff expected/crypto.religo.expected crypto.religo_output))) +(alias (name runtest) (action (diff expected/empty_case.religo.expected empty_case.religo_output))) +(alias (name runtest) (action (diff expected/eq_bool.religo.expected eq_bool.religo_output))) +(alias (name runtest) (action (diff expected/failwith.religo.expected failwith.religo_output))) +(alias (name runtest) (action (diff expected/function-shared.religo.expected function-shared.religo_output))) +(alias (name runtest) (action (diff expected/high-order.religo.expected high-order.religo_output))) +(alias (name runtest) (action (diff expected/implicit_account.religo.expected implicit_account.religo_output))) +(alias (name runtest) (action (diff expected/included.religo.expected included.religo_output))) +(alias (name runtest) (action (diff expected/includer.religo.expected includer.religo_output))) +(alias (name runtest) (action (diff expected/key_hash.religo.expected key_hash.religo_output))) +(alias (name runtest) (action (diff expected/lambda.religo.expected lambda.religo_output))) +(alias (name runtest) (action (diff expected/lambda2.religo.expected lambda2.religo_output))) +(alias (name runtest) (action (diff expected/let_multiple.religo.expected let_multiple.religo_output))) +(alias (name runtest) (action (diff expected/letin.religo.expected letin.religo_output))) +(alias (name runtest) (action (diff expected/list.religo.expected list.religo_output))) +(alias (name runtest) (action (diff expected/loop.religo.expected loop.religo_output))) +(alias (name runtest) (action (diff expected/map.religo.expected map.religo_output))) +(alias (name runtest) (action (diff expected/match_bis.religo.expected match_bis.religo_output))) +(alias (name runtest) (action (diff expected/match.religo.expected match.religo_output))) +(alias (name runtest) (action (diff expected/michelson_pair_tree.religo.expected michelson_pair_tree.religo_output))) +(alias (name runtest) (action (diff expected/multiple-parameters.religo.expected multiple-parameters.religo_output))) +(alias (name runtest) (action (diff expected/multisig.religo.expected multisig.religo_output))) +(alias (name runtest) (action (diff expected/no_semicolon.religo.expected no_semicolon.religo_output))) +(alias (name runtest) (action (diff expected/pledge.religo.expected pledge.religo_output))) +(alias (name runtest) (action (diff expected/record.religo.expected record.religo_output))) +(alias (name runtest) (action (diff expected/recursion.religo.expected recursion.religo_output))) +(alias (name runtest) (action (diff expected/self_address.religo.expected self_address.religo_output))) +(alias (name runtest) (action (diff expected/set_arithmetic.religo.expected set_arithmetic.religo_output))) +(alias (name runtest) (action (diff expected/set_delegate.religo.expected set_delegate.religo_output))) +(alias (name runtest) (action (diff expected/single_record_item.religo.expected single_record_item.religo_output))) +(alias (name runtest) (action (diff expected/string_arithmetic.religo.expected string_arithmetic.religo_output))) +(alias (name runtest) (action (diff expected/super-counter.religo.expected super-counter.religo_output))) +(alias (name runtest) (action (diff expected/tuple_list.religo.expected tuple_list.religo_output))) +(alias (name runtest) (action (diff expected/tuple_param_destruct.religo.expected tuple_param_destruct.religo_output))) +(alias (name runtest) (action (diff expected/tuple_type.religo.expected tuple_type.religo_output))) +(alias (name runtest) (action (diff expected/tuple.religo.expected tuple.religo_output))) +(alias (name runtest) (action (diff expected/tuples_no_annotation.religo.expected tuples_no_annotation.religo_output))) +(alias (name runtest) (action (diff expected/tuples_sequences_functions.religo.expected tuples_sequences_functions.religo_output))) +(alias (name runtest) (action (diff expected/variant.religo.expected variant.religo_output))) +(alias (name runtest) (action (diff expected/website2.religo.expected website2.religo_output))) + +;; cameligo +(alias (name runtest) (action (diff expected/assert.mligo.expected assert.mligo_output))) +(alias (name runtest) (action (diff expected/address.mligo.expected address.mligo_output))) +(alias (name runtest) (action (diff expected/amount_lambda.mligo.expected amount_lambda.mligo_output))) +(alias (name runtest) (action (diff expected/amount.mligo.expected amount.mligo_output))) +(alias (name runtest) (action (diff expected/arithmetic.mligo.expected arithmetic.mligo_output))) +(alias (name runtest) (action (diff expected/attributes.mligo.expected attributes.mligo_output))) +(alias (name runtest) (action (diff expected/balance_constant.mligo.expected balance_constant.mligo_output))) +(alias (name runtest) (action (diff expected/basic.mligo.expected basic.mligo_output))) +(alias (name runtest) (action (diff expected/big_map.mligo.expected big_map.mligo_output))) +(alias (name runtest) (action (diff expected/bitwise_arithmetic.mligo.expected bitwise_arithmetic.mligo_output))) +(alias (name runtest) (action (diff expected/boolean_operators.mligo.expected boolean_operators.mligo_output))) +(alias (name runtest) (action (diff expected/bytes_arithmetic.mligo.expected bytes_arithmetic.mligo_output))) +(alias (name runtest) (action (diff expected/bytes_unpack.mligo.expected bytes_unpack.mligo_output))) +(alias (name runtest) (action (diff expected/check_signature.mligo.expected check_signature.mligo_output))) +(alias (name runtest) (action (diff expected/closure.mligo.expected closure.mligo_output))) +(alias (name runtest) (action (diff expected/comparable.mligo.expected comparable.mligo_output))) +(alias (name runtest) (action (diff expected/condition-annot.mligo.expected condition-annot.mligo_output))) +(alias (name runtest) (action (diff expected/condition-shadowing.mligo.expected condition-shadowing.mligo_output))) +(alias (name runtest) (action (diff expected/condition.mligo.expected condition.mligo_output))) +(alias (name runtest) (action (diff expected/counter.mligo.expected counter.mligo_output))) +(alias (name runtest) (action (diff expected/create_contract.mligo.expected create_contract.mligo_output))) +(alias (name runtest) (action (diff expected/crypto.mligo.expected crypto.mligo_output))) +(alias (name runtest) (action (diff expected/curry.mligo.expected curry.mligo_output))) +(alias (name runtest) (action (diff expected/double_michelson_or.mligo.expected double_michelson_or.mligo_output))) +(alias (name runtest) (action (diff expected/empty_case.mligo.expected empty_case.mligo_output))) +(alias (name runtest) (action (diff expected/eq_bool.mligo.expected eq_bool.mligo_output))) +(alias (name runtest) (action (diff expected/FA1.2.mligo.expected FA1.2.mligo_output))) +(alias (name runtest) (action (diff expected/failwith.mligo.expected failwith.mligo_output))) +(alias (name runtest) (action (diff expected/fibo.mligo.expected fibo.mligo_output))) +(alias (name runtest) (action (diff expected/fibo2.mligo.expected fibo2.mligo_output))) +(alias (name runtest) (action (diff expected/fibo3.mligo.expected fibo3.mligo_output))) +(alias (name runtest) (action (diff expected/fibo4.mligo.expected fibo4.mligo_output))) +(alias (name runtest) (action (diff expected/function-shared.mligo.expected function-shared.mligo_output))) +(alias (name runtest) (action (diff expected/guess_string.mligo.expected guess_string.mligo_output))) + +;; pascaligo +(alias (name runtest) (action (diff expected/address.ligo.expected address.ligo_output))) +(alias (name runtest) (action (diff expected/amount.ligo.expected amount.ligo_output))) +(alias (name runtest) (action (diff expected/annotation.ligo.expected annotation.ligo_output))) +(alias (name runtest) (action (diff expected/application.ligo.expected application.ligo_output))) +(alias (name runtest) (action (diff expected/arithmetic.ligo.expected arithmetic.ligo_output))) +(alias (name runtest) (action (diff expected/assign.ligo.expected assign.ligo_output))) +(alias (name runtest) (action (diff expected/attributes.ligo.expected attributes.ligo_output))) +(alias (name runtest) (action (diff expected/bad_timestamp.ligo.expected bad_timestamp.ligo_output))) +(alias (name runtest) (action (diff expected/bad_type_operator.ligo.expected bad_type_operator.ligo_output))) +(alias (name runtest) (action (diff expected/balance_constant.ligo.expected balance_constant.ligo_output))) +(alias (name runtest) (action (diff expected/big_map.ligo.expected big_map.ligo_output))) +(alias (name runtest) (action (diff expected/bitwise_arithmetic.ligo.expected bitwise_arithmetic.ligo_output))) +(alias (name runtest) (action (diff expected/blockless.ligo.expected blockless.ligo_output))) +(alias (name runtest) (action (diff expected/boolean_operators.ligo.expected boolean_operators.ligo_output))) +(alias (name runtest) (action (diff expected/bytes_arithmetic.ligo.expected bytes_arithmetic.ligo_output))) +(alias (name runtest) (action (diff expected/bytes_unpack.ligo.expected bytes_unpack.ligo_output))) +(alias (name runtest) (action (diff expected/chain_id.ligo.expected chain_id.ligo_output))) +(alias (name runtest) (action (diff expected/check_signature.ligo.expected check_signature.ligo_output))) +(alias (name runtest) (action (diff expected/closure-1.ligo.expected closure-1.ligo_output))) +(alias (name runtest) (action (diff expected/closure-2.ligo.expected closure-2.ligo_output))) +(alias (name runtest) (action (diff expected/closure-3.ligo.expected closure-3.ligo_output))) +(alias (name runtest) (action (diff expected/closure.ligo.expected closure.ligo_output))) +(alias (name runtest) (action (diff expected/coase.ligo.expected coase.ligo_output))) +(alias (name runtest) (action (diff expected/condition-simple.ligo.expected condition-simple.ligo_output))) +(alias (name runtest) (action (diff expected/condition.ligo.expected condition.ligo_output))) +(alias (name runtest) (action (diff expected/counter.ligo.expected counter.ligo_output))) +(alias (name runtest) (action (diff expected/crypto.ligo.expected crypto.ligo_output))) +(alias (name runtest) (action (diff expected/declaration-local.ligo.expected declaration-local.ligo_output))) +(alias (name runtest) (action (diff expected/declarations.ligo.expected declarations.ligo_output))) +(alias (name runtest) (action (diff expected/deep_access.ligo.expected deep_access.ligo_output))) +(alias (name runtest) (action (diff expected/dispatch-counter.ligo.expected dispatch-counter.ligo_output))) +(alias (name runtest) (action (diff expected/double_main.ligo.expected double_main.ligo_output))) +(alias (name runtest) (action (diff expected/double_michelson_or.ligo.expected double_michelson_or.ligo_output))) +(alias (name runtest) (action (diff expected/empty_case.ligo.expected empty_case.ligo_output))) +(alias (name runtest) (action (diff expected/entrypoints.ligo.expected entrypoints.ligo_output))) +(alias (name runtest) (action (diff expected/eq_bool.ligo.expected eq_bool.ligo_output))) +(alias (name runtest) (action (diff expected/evaluation_tests.ligo.expected evaluation_tests.ligo_output))) +(alias (name runtest) (action (diff expected/FA1.2.ligo.expected FA1.2.ligo_output))) +(alias (name runtest) (action (diff expected/failwith.ligo.expected failwith.ligo_output))) +(alias (name runtest) (action (diff expected/for_fail.ligo.expected for_fail.ligo_output))) +(alias (name runtest) (action (diff expected/function-anon.ligo.expected function-anon.ligo_output))) +(alias (name runtest) (action (diff expected/function-complex.ligo.expected function-complex.ligo_output))) +(alias (name runtest) (action (diff expected/function-shared.ligo.expected function-shared.ligo_output))) +(alias (name runtest) (action (diff expected/function.ligo.expected function.ligo_output))) +(alias (name runtest) (action (diff expected/get_contract.ligo.expected get_contract.ligo_output))) +(alias (name runtest) (action (diff expected/high-order.ligo.expected high-order.ligo_output))) +(alias (name runtest) (action (diff expected/id.ligo.expected id.ligo_output))) +(alias (name runtest) (action (diff expected/implicit_account.ligo.expected implicit_account.ligo_output))) +(alias (name runtest) (action (diff expected/included.ligo.expected included.ligo_output))) +(alias (name runtest) (action (diff expected/includer.ligo.expected includer.ligo_output))) +(alias (name runtest) (action (diff expected/isnat.ligo.expected isnat.ligo_output))) +(alias (name runtest) (action (diff expected/key_hash_comparable.ligo.expected key_hash_comparable.ligo_output))) +(alias (name runtest) (action (diff expected/key_hash.ligo.expected key_hash.ligo_output))) +(alias (name runtest) (action (diff expected/lambda.ligo.expected lambda.ligo_output))) +(alias (name runtest) (action (diff expected/list.ligo.expected list.ligo_output))) +(alias (name runtest) (action (diff expected/loop_bugs.ligo.expected loop_bugs.ligo_output))) +(alias (name runtest) (action (diff expected/loop.ligo.expected loop.ligo_output))) +(alias (name runtest) (action (diff expected/map.ligo.expected map.ligo_output))) +(alias (name runtest) (action (diff expected/match.ligo.expected match.ligo_output))) +(alias (name runtest) (action (diff expected/michelson_or_tree_intermediary.ligo.expected michelson_or_tree_intermediary.ligo_output))) +(alias (name runtest) (action (diff expected/michelson_or_tree.ligo.expected michelson_or_tree.ligo_output))) +(alias (name runtest) (action (diff expected/michelson_pair_tree_intermediary.ligo.expected michelson_pair_tree_intermediary.ligo_output))) +(alias (name runtest) (action (diff expected/michelson_pair_tree.ligo.expected michelson_pair_tree.ligo_output))) +(alias (name runtest) (action (diff expected/multiple-parameters.ligo.expected multiple-parameters.ligo_output))) +(alias (name runtest) (action (diff expected/multisig-v2.ligo.expected multisig-v2.ligo_output))) +(alias (name runtest) (action (diff expected/multisig.ligo.expected multisig.ligo_output))) +(alias (name runtest) (action (diff expected/option.ligo.expected option.ligo_output))) +(alias (name runtest) (action (diff expected/quote-declaration.ligo.expected quote-declaration.ligo_output))) +(alias (name runtest) (action (diff expected/quote-declarations.ligo.expected quote-declarations.ligo_output))) +(alias (name runtest) (action (diff expected/record.ligo.expected record.ligo_output))) +(alias (name runtest) (action (diff expected/recursion.ligo.expected recursion.ligo_output))) +(alias (name runtest) (action (diff expected/redeclaration.ligo.expected redeclaration.ligo_output))) +(alias (name runtest) (action (diff expected/replaceable_id.ligo.expected replaceable_id.ligo_output))) +(alias (name runtest) (action (diff expected/self_address.ligo.expected self_address.ligo_output))) +(alias (name runtest) (action (diff expected/self_type_annotation.ligo.expected self_type_annotation.ligo_output))) +(alias (name runtest) (action (diff expected/self_with_entrypoint.ligo.expected self_with_entrypoint.ligo_output))) +(alias (name runtest) (action (diff expected/self_without_entrypoint.ligo.expected self_without_entrypoint.ligo_output))) +(alias (name runtest) (action (diff expected/set_arithmetic-1.ligo.expected set_arithmetic-1.ligo_output))) +(alias (name runtest) (action (diff expected/set_arithmetic.ligo.expected set_arithmetic.ligo_output))) +(alias (name runtest) (action (diff expected/set_delegate.ligo.expected set_delegate.ligo_output))) +(alias (name runtest) (action (diff expected/shadow.ligo.expected shadow.ligo_output))) +(alias (name runtest) (action (diff expected/simple_access.ligo.expected simple_access.ligo_output))) +(alias (name runtest) (action (diff expected/string_arithmetic.ligo.expected string_arithmetic.ligo_output))) +(alias (name runtest) (action (diff expected/string.ligo.expected string.ligo_output))) +(alias (name runtest) (action (diff expected/super-counter.ligo.expected super-counter.ligo_output))) +(alias (name runtest) (action (diff expected/tez.ligo.expected tez.ligo_output))) +(alias (name runtest) (action (diff expected/time-lock.ligo.expected time-lock.ligo_output))) +(alias (name runtest) (action (diff expected/timestamp.ligo.expected timestamp.ligo_output))) +(alias (name runtest) (action (diff expected/toto.ligo.expected toto.ligo_output))) +(alias (name runtest) (action (diff expected/tuple.ligo.expected tuple.ligo_output))) +(alias (name runtest) (action (diff expected/type-alias.ligo.expected type-alias.ligo_output))) +(alias (name runtest) (action (diff expected/unit.ligo.expected unit.ligo_output))) +(alias (name runtest) (action (diff expected/variant-matching.ligo.expected variant-matching.ligo_output))) +(alias (name runtest) (action (diff expected/variant.ligo.expected variant.ligo_output))) +(alias (name runtest) (action (diff expected/website1.ligo.expected website1.ligo_output))) +(alias (name runtest) (action (diff expected/website2.ligo.expected website2.ligo_output))) + + +;; try to parse the generated contracts +;; reasonligo +(alias (name runtest) (action (ignore-stdout (run ligo print-cst address.religo_output -s reasonligo))) (deps address.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst amount.religo_output -s reasonligo))) (deps amount.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst arithmetic.religo_output -s reasonligo))) (deps arithmetic.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bad_address_format.religo_output -s reasonligo))) (deps bad_address_format.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst balance_constant.religo_output -s reasonligo))) (deps balance_constant.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bitwise_arithmetic.religo_output -s reasonligo))) (deps bitwise_arithmetic.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst boolean_operators.religo_output -s reasonligo))) (deps boolean_operators.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_arithmetic.religo_output -s reasonligo))) (deps bytes_arithmetic.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_unpack.religo_output -s reasonligo))) (deps bytes_unpack.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst check_signature.religo_output -s reasonligo))) (deps check_signature.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure.religo_output -s reasonligo))) (deps closure.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition-shadowing.religo_output -s reasonligo))) (deps condition-shadowing.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition.religo_output -s reasonligo))) (deps condition.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst counter.religo_output -s reasonligo))) (deps counter.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst crypto.religo_output -s reasonligo))) (deps crypto.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst empty_case.religo_output -s reasonligo))) (deps empty_case.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst eq_bool.religo_output -s reasonligo))) (deps eq_bool.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst failwith.religo_output -s reasonligo))) (deps failwith.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-shared.religo_output -s reasonligo))) (deps function-shared.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst high-order.religo_output -s reasonligo))) (deps high-order.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst implicit_account.religo_output -s reasonligo))) (deps implicit_account.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst included.religo_output -s reasonligo))) (deps included.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst includer.religo_output -s reasonligo))) (deps includer.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst key_hash.religo_output -s reasonligo))) (deps key_hash.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst lambda.religo_output -s reasonligo))) (deps lambda.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst lambda2.religo_output -s reasonligo))) (deps lambda2.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst let_multiple.religo_output -s reasonligo))) (deps let_multiple.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst letin.religo_output -s reasonligo))) (deps letin.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst list.religo_output -s reasonligo))) (deps list.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst loop.religo_output -s reasonligo))) (deps loop.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst map.religo_output -s reasonligo))) (deps map.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst match_bis.religo_output -s reasonligo))) (deps match_bis.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst match.religo_output -s reasonligo))) (deps match.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_pair_tree.religo_output -s reasonligo))) (deps michelson_pair_tree.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst multiple-parameters.religo_output -s reasonligo))) (deps multiple-parameters.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst multisig.religo_output -s reasonligo))) (deps multisig.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst no_semicolon.religo_output -s reasonligo))) (deps no_semicolon.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst pledge.religo_output -s reasonligo))) (deps pledge.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst record.religo_output -s reasonligo))) (deps record.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst recursion.religo_output -s reasonligo))) (deps recursion.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_address.religo_output -s reasonligo))) (deps self_address.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_arithmetic.religo_output -s reasonligo))) (deps set_arithmetic.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_delegate.religo_output -s reasonligo))) (deps set_delegate.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst single_record_item.religo_output -s reasonligo))) (deps single_record_item.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst string_arithmetic.religo_output -s reasonligo))) (deps string_arithmetic.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst super-counter.religo_output -s reasonligo))) (deps super-counter.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple_list.religo_output -s reasonligo))) (deps tuple_list.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple_param_destruct.religo_output -s reasonligo))) (deps tuple_param_destruct.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple_type.religo_output -s reasonligo))) (deps tuple_type.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple.religo_output -s reasonligo))) (deps tuple.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuples_no_annotation.religo_output -s reasonligo))) (deps tuples_no_annotation.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuples_sequences_functions.religo_output -s reasonligo))) (deps tuples_sequences_functions.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst variant.religo_output -s reasonligo))) (deps variant.religo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst website2.religo_output -s reasonligo))) (deps website2.religo_output)) + +;; cameligo +(alias (name runtest) (action (ignore-stdout (run ligo print-cst assert.mligo_output -s cameligo))) (deps assert.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst address.mligo_output -s cameligo))) (deps address.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst amount_lambda.mligo_output -s cameligo))) (deps amount_lambda.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst amount.mligo_output -s cameligo))) (deps amount.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst arithmetic.mligo_output -s cameligo))) (deps arithmetic.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst attributes.mligo_output -s cameligo))) (deps attributes.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst balance_constant.mligo_output -s cameligo))) (deps balance_constant.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst basic.mligo_output -s cameligo))) (deps basic.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst big_map.mligo_output -s cameligo))) (deps big_map.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bitwise_arithmetic.mligo_output -s cameligo))) (deps bitwise_arithmetic.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst boolean_operators.mligo_output -s cameligo))) (deps boolean_operators.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_arithmetic.mligo_output -s cameligo))) (deps bytes_arithmetic.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_unpack.mligo_output -s cameligo))) (deps bytes_unpack.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst check_signature.mligo_output -s cameligo))) (deps check_signature.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure.mligo_output -s cameligo))) (deps closure.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst comparable.mligo_output -s cameligo))) (deps comparable.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition-annot.mligo_output -s cameligo))) (deps condition-annot.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition-shadowing.mligo_output -s cameligo))) (deps condition-shadowing.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition.mligo_output -s cameligo))) (deps condition.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst counter.mligo_output -s cameligo))) (deps counter.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst create_contract.mligo_output -s cameligo))) (deps create_contract.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst crypto.mligo_output -s cameligo))) (deps crypto.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst curry.mligo_output -s cameligo))) (deps curry.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst double_michelson_or.mligo_output -s cameligo))) (deps double_michelson_or.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst empty_case.mligo_output -s cameligo))) (deps empty_case.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst eq_bool.mligo_output -s cameligo))) (deps eq_bool.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst FA1.2.mligo_output -s cameligo))) (deps FA1.2.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst failwith.mligo_output -s cameligo))) (deps failwith.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst fibo.mligo_output -s cameligo))) (deps fibo.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst fibo2.mligo_output -s cameligo))) (deps fibo2.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst fibo3.mligo_output -s cameligo))) (deps fibo3.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst fibo4.mligo_output -s cameligo))) (deps fibo4.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output)) + +;; pascaligo +(alias (name runtest) (action (ignore-stdout (run ligo print-cst address.ligo_output -s pascaligo))) (deps address.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst amount.ligo_output -s pascaligo))) (deps amount.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst application.ligo_output -s pascaligo))) (deps application.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst assign.ligo_output -s pascaligo))) (deps assign.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bad_timestamp.ligo_output -s pascaligo))) (deps bad_timestamp.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure.ligo_output -s pascaligo))) (deps closure.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst coase.ligo_output -s pascaligo))) (deps coase.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition.ligo_output -s pascaligo))) (deps condition.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst counter.ligo_output -s pascaligo))) (deps counter.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst function.ligo_output -s pascaligo))) (deps function.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst id.ligo_output -s pascaligo))) (deps id.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst included.ligo_output -s pascaligo))) (deps included.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst includer.ligo_output -s pascaligo))) (deps includer.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst list.ligo_output -s pascaligo))) (deps list.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst loop.ligo_output -s pascaligo))) (deps loop.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst map.ligo_output -s pascaligo))) (deps map.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst match.ligo_output -s pascaligo))) (deps match.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst option.ligo_output -s pascaligo))) (deps option.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst record.ligo_output -s pascaligo))) (deps record.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst string.ligo_output -s pascaligo))) (deps string.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tez.ligo_output -s pascaligo))) (deps tez.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst toto.ligo_output -s pascaligo))) (deps toto.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst unit.ligo_output -s pascaligo))) (deps unit.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst variant.ligo_output -s pascaligo))) (deps variant.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst website1.ligo_output -s pascaligo))) (deps website1.ligo_output)) +(alias (name runtest) (action (ignore-stdout (run ligo print-cst website2.ligo_output -s pascaligo))) (deps website2.ligo_output)) + + +;; pretty print with the former pretty printed contracts as input +;; reasonligo +(rule (targets address.religo_output2) (action (with-stdout-to address.religo_output2 (run ligo pretty-print address.religo_output -s reasonligo))) (deps address.religo_output)) +(rule (targets amount.religo_output2) (action (with-stdout-to amount.religo_output2 (run ligo pretty-print amount.religo_output -s reasonligo))) (deps amount.religo_output)) +(rule (targets arithmetic.religo_output2) (action (with-stdout-to arithmetic.religo_output2 (run ligo pretty-print arithmetic.religo_output -s reasonligo))) (deps arithmetic.religo_output)) +(rule (targets bad_address_format.religo_output2) (action (with-stdout-to bad_address_format.religo_output2 (run ligo pretty-print bad_address_format.religo_output -s reasonligo))) (deps bad_address_format.religo_output)) +(rule (targets balance_constant.religo_output2) (action (with-stdout-to balance_constant.religo_output2 (run ligo pretty-print balance_constant.religo_output -s reasonligo))) (deps balance_constant.religo_output)) +(rule (targets bitwise_arithmetic.religo_output2) (action (with-stdout-to bitwise_arithmetic.religo_output2 (run ligo pretty-print bitwise_arithmetic.religo_output -s reasonligo))) (deps bitwise_arithmetic.religo_output)) +(rule (targets boolean_operators.religo_output2) (action (with-stdout-to boolean_operators.religo_output2 (run ligo pretty-print boolean_operators.religo_output -s reasonligo))) (deps boolean_operators.religo_output)) +(rule (targets bytes_arithmetic.religo_output2) (action (with-stdout-to bytes_arithmetic.religo_output2 (run ligo pretty-print bytes_arithmetic.religo_output -s reasonligo))) (deps bytes_arithmetic.religo_output)) +(rule (targets bytes_unpack.religo_output2) (action (with-stdout-to bytes_unpack.religo_output2 (run ligo pretty-print bytes_unpack.religo_output -s reasonligo))) (deps bytes_unpack.religo_output)) +(rule (targets check_signature.religo_output2) (action (with-stdout-to check_signature.religo_output2 (run ligo pretty-print check_signature.religo_output -s reasonligo))) (deps check_signature.religo_output)) +(rule (targets closure.religo_output2) (action (with-stdout-to closure.religo_output2 (run ligo pretty-print closure.religo_output -s reasonligo))) (deps closure.religo_output)) +(rule (targets condition-shadowing.religo_output2) (action (with-stdout-to condition-shadowing.religo_output2 (run ligo pretty-print condition-shadowing.religo_output -s reasonligo))) (deps condition-shadowing.religo_output)) +(rule (targets condition.religo_output2) (action (with-stdout-to condition.religo_output2 (run ligo pretty-print condition.religo_output -s reasonligo))) (deps condition.religo_output)) +(rule (targets counter.religo_output2) (action (with-stdout-to counter.religo_output2 (run ligo pretty-print counter.religo_output -s reasonligo))) (deps counter.religo_output)) +(rule (targets crypto.religo_output2) (action (with-stdout-to crypto.religo_output2 (run ligo pretty-print crypto.religo_output -s reasonligo))) (deps crypto.religo_output)) +(rule (targets empty_case.religo_output2) (action (with-stdout-to empty_case.religo_output2 (run ligo pretty-print empty_case.religo_output -s reasonligo))) (deps empty_case.religo_output)) +(rule (targets eq_bool.religo_output2) (action (with-stdout-to eq_bool.religo_output2 (run ligo pretty-print eq_bool.religo_output -s reasonligo))) (deps eq_bool.religo_output)) +(rule (targets failwith.religo_output2) (action (with-stdout-to failwith.religo_output2 (run ligo pretty-print failwith.religo_output -s reasonligo))) (deps failwith.religo_output)) +(rule (targets function-shared.religo_output2) (action (with-stdout-to function-shared.religo_output2 (run ligo pretty-print function-shared.religo_output -s reasonligo))) (deps function-shared.religo_output)) +(rule (targets high-order.religo_output2) (action (with-stdout-to high-order.religo_output2 (run ligo pretty-print high-order.religo_output -s reasonligo))) (deps high-order.religo_output)) +(rule (targets implicit_account.religo_output2) (action (with-stdout-to implicit_account.religo_output2 (run ligo pretty-print implicit_account.religo_output -s reasonligo))) (deps implicit_account.religo_output)) +(rule (targets included.religo_output2) (action (with-stdout-to included.religo_output2 (run ligo pretty-print included.religo_output -s reasonligo))) (deps included.religo_output)) +(rule (targets includer.religo_output2) (action (with-stdout-to includer.religo_output2 (run ligo pretty-print includer.religo_output -s reasonligo))) (deps includer.religo_output)) +(rule (targets key_hash.religo_output2) (action (with-stdout-to key_hash.religo_output2 (run ligo pretty-print key_hash.religo_output -s reasonligo))) (deps key_hash.religo_output)) +(rule (targets lambda.religo_output2) (action (with-stdout-to lambda.religo_output2 (run ligo pretty-print lambda.religo_output -s reasonligo))) (deps lambda.religo_output)) +(rule (targets lambda2.religo_output2) (action (with-stdout-to lambda2.religo_output2 (run ligo pretty-print lambda2.religo_output -s reasonligo))) (deps lambda2.religo_output)) +(rule (targets let_multiple.religo_output2) (action (with-stdout-to let_multiple.religo_output2 (run ligo pretty-print let_multiple.religo_output -s reasonligo))) (deps let_multiple.religo_output)) +(rule (targets letin.religo_output2) (action (with-stdout-to letin.religo_output2 (run ligo pretty-print letin.religo_output -s reasonligo))) (deps letin.religo_output)) +(rule (targets list.religo_output2) (action (with-stdout-to list.religo_output2 (run ligo pretty-print list.religo_output -s reasonligo))) (deps list.religo_output)) +(rule (targets loop.religo_output2) (action (with-stdout-to loop.religo_output2 (run ligo pretty-print loop.religo_output -s reasonligo))) (deps loop.religo_output)) +(rule (targets map.religo_output2) (action (with-stdout-to map.religo_output2 (run ligo pretty-print map.religo_output -s reasonligo))) (deps map.religo_output)) +(rule (targets match_bis.religo_output2) (action (with-stdout-to match_bis.religo_output2 (run ligo pretty-print match_bis.religo_output -s reasonligo))) (deps match_bis.religo_output)) +(rule (targets match.religo_output2) (action (with-stdout-to match.religo_output2 (run ligo pretty-print match.religo_output -s reasonligo))) (deps match.religo_output)) +(rule (targets michelson_pair_tree.religo_output2) (action (with-stdout-to michelson_pair_tree.religo_output2 (run ligo pretty-print michelson_pair_tree.religo_output -s reasonligo))) (deps michelson_pair_tree.religo_output)) +(rule (targets multiple-parameters.religo_output2) (action (with-stdout-to multiple-parameters.religo_output2 (run ligo pretty-print multiple-parameters.religo_output -s reasonligo))) (deps multiple-parameters.religo_output)) +(rule (targets multisig.religo_output2) (action (with-stdout-to multisig.religo_output2 (run ligo pretty-print multisig.religo_output -s reasonligo))) (deps multisig.religo_output)) +(rule (targets no_semicolon.religo_output2) (action (with-stdout-to no_semicolon.religo_output2 (run ligo pretty-print no_semicolon.religo_output -s reasonligo))) (deps no_semicolon.religo_output)) +(rule (targets pledge.religo_output2) (action (with-stdout-to pledge.religo_output2 (run ligo pretty-print pledge.religo_output -s reasonligo))) (deps pledge.religo_output)) +(rule (targets record.religo_output2) (action (with-stdout-to record.religo_output2 (run ligo pretty-print record.religo_output -s reasonligo))) (deps record.religo_output)) +(rule (targets recursion.religo_output2) (action (with-stdout-to recursion.religo_output2 (run ligo pretty-print recursion.religo_output -s reasonligo))) (deps recursion.religo_output)) +(rule (targets self_address.religo_output2) (action (with-stdout-to self_address.religo_output2 (run ligo pretty-print self_address.religo_output -s reasonligo))) (deps self_address.religo_output)) +(rule (targets set_arithmetic.religo_output2) (action (with-stdout-to set_arithmetic.religo_output2 (run ligo pretty-print set_arithmetic.religo_output -s reasonligo))) (deps set_arithmetic.religo_output)) +(rule (targets set_delegate.religo_output2) (action (with-stdout-to set_delegate.religo_output2 (run ligo pretty-print set_delegate.religo_output -s reasonligo))) (deps set_delegate.religo_output)) +(rule (targets single_record_item.religo_output2) (action (with-stdout-to single_record_item.religo_output2 (run ligo pretty-print single_record_item.religo_output -s reasonligo))) (deps single_record_item.religo_output)) +(rule (targets string_arithmetic.religo_output2) (action (with-stdout-to string_arithmetic.religo_output2 (run ligo pretty-print string_arithmetic.religo_output -s reasonligo))) (deps string_arithmetic.religo_output)) +(rule (targets super-counter.religo_output2) (action (with-stdout-to super-counter.religo_output2 (run ligo pretty-print super-counter.religo_output -s reasonligo))) (deps super-counter.religo_output)) +(rule (targets tuple_list.religo_output2) (action (with-stdout-to tuple_list.religo_output2 (run ligo pretty-print tuple_list.religo_output -s reasonligo))) (deps tuple_list.religo_output)) +(rule (targets tuple_param_destruct.religo_output2) (action (with-stdout-to tuple_param_destruct.religo_output2 (run ligo pretty-print tuple_param_destruct.religo_output -s reasonligo))) (deps tuple_param_destruct.religo_output)) +(rule (targets tuple_type.religo_output2) (action (with-stdout-to tuple_type.religo_output2 (run ligo pretty-print tuple_type.religo_output -s reasonligo))) (deps tuple_type.religo_output)) +(rule (targets tuple.religo_output2) (action (with-stdout-to tuple.religo_output2 (run ligo pretty-print tuple.religo_output -s reasonligo))) (deps tuple.religo_output)) +(rule (targets tuples_no_annotation.religo_output2) (action (with-stdout-to tuples_no_annotation.religo_output2 (run ligo pretty-print tuples_no_annotation.religo_output -s reasonligo))) (deps tuples_no_annotation.religo_output)) +(rule (targets tuples_sequences_functions.religo_output2) (action (with-stdout-to tuples_sequences_functions.religo_output2 (run ligo pretty-print tuples_sequences_functions.religo_output -s reasonligo))) (deps tuples_sequences_functions.religo_output)) +(rule (targets variant.religo_output2) (action (with-stdout-to variant.religo_output2 (run ligo pretty-print variant.religo_output -s reasonligo))) (deps variant.religo_output)) +(rule (targets website2.religo_output2) (action (with-stdout-to website2.religo_output2 (run ligo pretty-print website2.religo_output -s reasonligo))) (deps website2.religo_output)) + +;; cameligo +(rule (targets assert.mligo_output2) (action (with-stdout-to assert.mligo_output2 (run ligo pretty-print assert.mligo_output -s cameligo))) (deps assert.mligo_output)) +(rule (targets address.mligo_output2) (action (with-stdout-to address.mligo_output2 (run ligo pretty-print address.mligo_output -s cameligo))) (deps address.mligo_output)) +(rule (targets amount_lambda.mligo_output2) (action (with-stdout-to amount_lambda.mligo_output2 (run ligo pretty-print amount_lambda.mligo_output -s cameligo))) (deps amount_lambda.mligo_output)) +(rule (targets amount.mligo_output2) (action (with-stdout-to amount.mligo_output2 (run ligo pretty-print amount.mligo_output -s cameligo))) (deps amount.mligo_output)) +(rule (targets arithmetic.mligo_output2) (action (with-stdout-to arithmetic.mligo_output2 (run ligo pretty-print arithmetic.mligo_output -s cameligo))) (deps arithmetic.mligo_output)) +(rule (targets attributes.mligo_output2) (action (with-stdout-to attributes.mligo_output2 (run ligo pretty-print attributes.mligo_output -s cameligo))) (deps attributes.mligo_output)) +(rule (targets balance_constant.mligo_output2) (action (with-stdout-to balance_constant.mligo_output2 (run ligo pretty-print balance_constant.mligo_output -s cameligo))) (deps balance_constant.mligo_output)) +(rule (targets basic.mligo_output2) (action (with-stdout-to basic.mligo_output2 (run ligo pretty-print basic.mligo_output -s cameligo))) (deps basic.mligo_output)) +(rule (targets big_map.mligo_output2) (action (with-stdout-to big_map.mligo_output2 (run ligo pretty-print big_map.mligo_output -s cameligo))) (deps big_map.mligo_output)) +(rule (targets bitwise_arithmetic.mligo_output2) (action (with-stdout-to bitwise_arithmetic.mligo_output2 (run ligo pretty-print bitwise_arithmetic.mligo_output -s cameligo))) (deps bitwise_arithmetic.mligo_output)) +(rule (targets boolean_operators.mligo_output2) (action (with-stdout-to boolean_operators.mligo_output2 (run ligo pretty-print boolean_operators.mligo_output -s cameligo))) (deps boolean_operators.mligo_output)) +(rule (targets bytes_arithmetic.mligo_output2) (action (with-stdout-to bytes_arithmetic.mligo_output2 (run ligo pretty-print bytes_arithmetic.mligo_output -s cameligo))) (deps bytes_arithmetic.mligo_output)) +(rule (targets bytes_unpack.mligo_output2) (action (with-stdout-to bytes_unpack.mligo_output2 (run ligo pretty-print bytes_unpack.mligo_output -s cameligo))) (deps bytes_unpack.mligo_output)) +(rule (targets check_signature.mligo_output2) (action (with-stdout-to check_signature.mligo_output2 (run ligo pretty-print check_signature.mligo_output -s cameligo))) (deps check_signature.mligo_output)) +(rule (targets closure.mligo_output2) (action (with-stdout-to closure.mligo_output2 (run ligo pretty-print closure.mligo_output -s cameligo))) (deps closure.mligo_output)) +(rule (targets comparable.mligo_output2) (action (with-stdout-to comparable.mligo_output2 (run ligo pretty-print comparable.mligo_output -s cameligo))) (deps comparable.mligo_output)) +(rule (targets condition-annot.mligo_output2) (action (with-stdout-to condition-annot.mligo_output2 (run ligo pretty-print condition-annot.mligo_output -s cameligo))) (deps condition-annot.mligo_output)) +(rule (targets condition-shadowing.mligo_output2) (action (with-stdout-to condition-shadowing.mligo_output2 (run ligo pretty-print condition-shadowing.mligo_output -s cameligo))) (deps condition-shadowing.mligo_output)) +(rule (targets condition.mligo_output2) (action (with-stdout-to condition.mligo_output2 (run ligo pretty-print condition.mligo_output -s cameligo))) (deps condition.mligo_output)) +(rule (targets counter.mligo_output2) (action (with-stdout-to counter.mligo_output2 (run ligo pretty-print counter.mligo_output -s cameligo))) (deps counter.mligo_output)) +(rule (targets create_contract.mligo_output2) (action (with-stdout-to create_contract.mligo_output2 (run ligo pretty-print create_contract.mligo_output -s cameligo))) (deps create_contract.mligo_output)) +(rule (targets crypto.mligo_output2) (action (with-stdout-to crypto.mligo_output2 (run ligo pretty-print crypto.mligo_output -s cameligo))) (deps crypto.mligo_output)) +(rule (targets curry.mligo_output2) (action (with-stdout-to curry.mligo_output2 (run ligo pretty-print curry.mligo_output -s cameligo))) (deps curry.mligo_output)) +(rule (targets double_michelson_or.mligo_output2) (action (with-stdout-to double_michelson_or.mligo_output2 (run ligo pretty-print double_michelson_or.mligo_output -s cameligo))) (deps double_michelson_or.mligo_output)) +(rule (targets empty_case.mligo_output2) (action (with-stdout-to empty_case.mligo_output2 (run ligo pretty-print empty_case.mligo_output -s cameligo))) (deps empty_case.mligo_output)) +(rule (targets eq_bool.mligo_output2) (action (with-stdout-to eq_bool.mligo_output2 (run ligo pretty-print eq_bool.mligo_output -s cameligo))) (deps eq_bool.mligo_output)) +(rule (targets FA1.2.mligo_output2) (action (with-stdout-to FA1.2.mligo_output2 (run ligo pretty-print FA1.2.mligo_output -s cameligo))) (deps FA1.2.mligo_output)) +(rule (targets failwith.mligo_output2) (action (with-stdout-to failwith.mligo_output2 (run ligo pretty-print failwith.mligo_output -s cameligo))) (deps failwith.mligo_output)) +(rule (targets fibo.mligo_output2) (action (with-stdout-to fibo.mligo_output2 (run ligo pretty-print fibo.mligo_output -s cameligo))) (deps fibo.mligo_output)) +(rule (targets fibo2.mligo_output2) (action (with-stdout-to fibo2.mligo_output2 (run ligo pretty-print fibo2.mligo_output -s cameligo))) (deps fibo2.mligo_output)) +(rule (targets fibo3.mligo_output2) (action (with-stdout-to fibo3.mligo_output2 (run ligo pretty-print fibo3.mligo_output -s cameligo))) (deps fibo3.mligo_output)) +(rule (targets fibo4.mligo_output2) (action (with-stdout-to fibo4.mligo_output2 (run ligo pretty-print fibo4.mligo_output -s cameligo))) (deps fibo4.mligo_output)) +(rule (targets function-shared.mligo_output2) (action (with-stdout-to function-shared.mligo_output2 (run ligo pretty-print function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output)) +(rule (targets guess_string.mligo_output2) (action (with-stdout-to guess_string.mligo_output2 (run ligo pretty-print guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output)) + +;; pascaligo +(rule (targets address.ligo_output2) (action (with-stdout-to address.ligo_output2 (run ligo pretty-print address.ligo_output -s pascaligo))) (deps address.ligo_output)) +(rule (targets amount.ligo_output2) (action (with-stdout-to amount.ligo_output2 (run ligo pretty-print amount.ligo_output -s pascaligo))) (deps amount.ligo_output)) +(rule (targets annotation.ligo_output2) (action (with-stdout-to annotation.ligo_output2 (run ligo pretty-print annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output)) +(rule (targets application.ligo_output2) (action (with-stdout-to application.ligo_output2 (run ligo pretty-print application.ligo_output -s pascaligo))) (deps application.ligo_output)) +(rule (targets arithmetic.ligo_output2) (action (with-stdout-to arithmetic.ligo_output2 (run ligo pretty-print arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output)) +(rule (targets assign.ligo_output2) (action (with-stdout-to assign.ligo_output2 (run ligo pretty-print assign.ligo_output -s pascaligo))) (deps assign.ligo_output)) +(rule (targets attributes.ligo_output2) (action (with-stdout-to attributes.ligo_output2 (run ligo pretty-print attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output)) +(rule (targets bad_timestamp.ligo_output2) (action (with-stdout-to bad_timestamp.ligo_output2 (run ligo pretty-print bad_timestamp.ligo_output -s pascaligo))) (deps bad_timestamp.ligo_output)) +(rule (targets bad_type_operator.ligo_output2) (action (with-stdout-to bad_type_operator.ligo_output2 (run ligo pretty-print bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output)) +(rule (targets balance_constant.ligo_output2) (action (with-stdout-to balance_constant.ligo_output2 (run ligo pretty-print balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output)) +(rule (targets big_map.ligo_output2) (action (with-stdout-to big_map.ligo_output2 (run ligo pretty-print big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output)) +(rule (targets bitwise_arithmetic.ligo_output2) (action (with-stdout-to bitwise_arithmetic.ligo_output2 (run ligo pretty-print bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output)) +(rule (targets blockless.ligo_output2) (action (with-stdout-to blockless.ligo_output2 (run ligo pretty-print blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output)) +(rule (targets boolean_operators.ligo_output2) (action (with-stdout-to boolean_operators.ligo_output2 (run ligo pretty-print boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output)) +(rule (targets bytes_arithmetic.ligo_output2) (action (with-stdout-to bytes_arithmetic.ligo_output2 (run ligo pretty-print bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output)) +(rule (targets bytes_unpack.ligo_output2) (action (with-stdout-to bytes_unpack.ligo_output2 (run ligo pretty-print bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output)) +(rule (targets chain_id.ligo_output2) (action (with-stdout-to chain_id.ligo_output2 (run ligo pretty-print chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output)) +(rule (targets check_signature.ligo_output2) (action (with-stdout-to check_signature.ligo_output2 (run ligo pretty-print check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output)) +(rule (targets closure-1.ligo_output2) (action (with-stdout-to closure-1.ligo_output2 (run ligo pretty-print closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output)) +(rule (targets closure-2.ligo_output2) (action (with-stdout-to closure-2.ligo_output2 (run ligo pretty-print closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output)) +(rule (targets closure-3.ligo_output2) (action (with-stdout-to closure-3.ligo_output2 (run ligo pretty-print closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output)) +(rule (targets closure.ligo_output2) (action (with-stdout-to closure.ligo_output2 (run ligo pretty-print closure.ligo_output -s pascaligo))) (deps closure.ligo_output)) +(rule (targets coase.ligo_output2) (action (with-stdout-to coase.ligo_output2 (run ligo pretty-print coase.ligo_output -s pascaligo))) (deps coase.ligo_output)) +(rule (targets condition-simple.ligo_output2) (action (with-stdout-to condition-simple.ligo_output2 (run ligo pretty-print condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output)) +(rule (targets condition.ligo_output2) (action (with-stdout-to condition.ligo_output2 (run ligo pretty-print condition.ligo_output -s pascaligo))) (deps condition.ligo_output)) +(rule (targets counter.ligo_output2) (action (with-stdout-to counter.ligo_output2 (run ligo pretty-print counter.ligo_output -s pascaligo))) (deps counter.ligo_output)) +(rule (targets crypto.ligo_output2) (action (with-stdout-to crypto.ligo_output2 (run ligo pretty-print crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output)) +(rule (targets declaration-local.ligo_output2) (action (with-stdout-to declaration-local.ligo_output2 (run ligo pretty-print declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output)) +(rule (targets declarations.ligo_output2) (action (with-stdout-to declarations.ligo_output2 (run ligo pretty-print declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output)) +(rule (targets deep_access.ligo_output2) (action (with-stdout-to deep_access.ligo_output2 (run ligo pretty-print deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output)) +(rule (targets dispatch-counter.ligo_output2) (action (with-stdout-to dispatch-counter.ligo_output2 (run ligo pretty-print dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output)) +(rule (targets double_main.ligo_output2) (action (with-stdout-to double_main.ligo_output2 (run ligo pretty-print double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output)) +(rule (targets double_michelson_or.ligo_output2) (action (with-stdout-to double_michelson_or.ligo_output2 (run ligo pretty-print double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output)) +(rule (targets empty_case.ligo_output2) (action (with-stdout-to empty_case.ligo_output2 (run ligo pretty-print empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output)) +(rule (targets entrypoints.ligo_output2) (action (with-stdout-to entrypoints.ligo_output2 (run ligo pretty-print entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output)) +(rule (targets eq_bool.ligo_output2) (action (with-stdout-to eq_bool.ligo_output2 (run ligo pretty-print eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output)) +(rule (targets evaluation_tests.ligo_output2) (action (with-stdout-to evaluation_tests.ligo_output2 (run ligo pretty-print evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output)) +(rule (targets FA1.2.ligo_output2) (action (with-stdout-to FA1.2.ligo_output2 (run ligo pretty-print FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output)) +(rule (targets failwith.ligo_output2) (action (with-stdout-to failwith.ligo_output2 (run ligo pretty-print failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output)) +(rule (targets for_fail.ligo_output2) (action (with-stdout-to for_fail.ligo_output2 (run ligo pretty-print for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output)) +(rule (targets function-anon.ligo_output2) (action (with-stdout-to function-anon.ligo_output2 (run ligo pretty-print function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output)) +(rule (targets function-complex.ligo_output2) (action (with-stdout-to function-complex.ligo_output2 (run ligo pretty-print function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output)) +(rule (targets function-shared.ligo_output2) (action (with-stdout-to function-shared.ligo_output2 (run ligo pretty-print function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output)) +(rule (targets function.ligo_output2) (action (with-stdout-to function.ligo_output2 (run ligo pretty-print function.ligo_output -s pascaligo))) (deps function.ligo_output)) +(rule (targets get_contract.ligo_output2) (action (with-stdout-to get_contract.ligo_output2 (run ligo pretty-print get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output)) +(rule (targets high-order.ligo_output2) (action (with-stdout-to high-order.ligo_output2 (run ligo pretty-print high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output)) +(rule (targets id.ligo_output2) (action (with-stdout-to id.ligo_output2 (run ligo pretty-print id.ligo_output -s pascaligo))) (deps id.ligo_output)) +(rule (targets implicit_account.ligo_output2) (action (with-stdout-to implicit_account.ligo_output2 (run ligo pretty-print implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output)) +(rule (targets included.ligo_output2) (action (with-stdout-to included.ligo_output2 (run ligo pretty-print included.ligo_output -s pascaligo))) (deps included.ligo_output)) +(rule (targets includer.ligo_output2) (action (with-stdout-to includer.ligo_output2 (run ligo pretty-print includer.ligo_output -s pascaligo))) (deps includer.ligo_output)) +(rule (targets isnat.ligo_output2) (action (with-stdout-to isnat.ligo_output2 (run ligo pretty-print isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output)) +(rule (targets key_hash_comparable.ligo_output2) (action (with-stdout-to key_hash_comparable.ligo_output2 (run ligo pretty-print key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output)) +(rule (targets key_hash.ligo_output2) (action (with-stdout-to key_hash.ligo_output2 (run ligo pretty-print key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output)) +(rule (targets lambda.ligo_output2) (action (with-stdout-to lambda.ligo_output2 (run ligo pretty-print lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output)) +(rule (targets list.ligo_output2) (action (with-stdout-to list.ligo_output2 (run ligo pretty-print list.ligo_output -s pascaligo))) (deps list.ligo_output)) +(rule (targets loop_bugs.ligo_output2) (action (with-stdout-to loop_bugs.ligo_output2 (run ligo pretty-print loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output)) +(rule (targets loop.ligo_output2) (action (with-stdout-to loop.ligo_output2 (run ligo pretty-print loop.ligo_output -s pascaligo))) (deps loop.ligo_output)) +(rule (targets map.ligo_output2) (action (with-stdout-to map.ligo_output2 (run ligo pretty-print map.ligo_output -s pascaligo))) (deps map.ligo_output)) +(rule (targets match.ligo_output2) (action (with-stdout-to match.ligo_output2 (run ligo pretty-print match.ligo_output -s pascaligo))) (deps match.ligo_output)) +(rule (targets michelson_or_tree_intermediary.ligo_output2) (action (with-stdout-to michelson_or_tree_intermediary.ligo_output2 (run ligo pretty-print michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output)) +(rule (targets michelson_or_tree.ligo_output2) (action (with-stdout-to michelson_or_tree.ligo_output2 (run ligo pretty-print michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output)) +(rule (targets michelson_pair_tree_intermediary.ligo_output2) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_output2 (run ligo pretty-print michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output)) +(rule (targets michelson_pair_tree.ligo_output2) (action (with-stdout-to michelson_pair_tree.ligo_output2 (run ligo pretty-print michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output)) +(rule (targets multiple-parameters.ligo_output2) (action (with-stdout-to multiple-parameters.ligo_output2 (run ligo pretty-print multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output)) +(rule (targets multisig-v2.ligo_output2) (action (with-stdout-to multisig-v2.ligo_output2 (run ligo pretty-print multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output)) +(rule (targets multisig.ligo_output2) (action (with-stdout-to multisig.ligo_output2 (run ligo pretty-print multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output)) +(rule (targets option.ligo_output2) (action (with-stdout-to option.ligo_output2 (run ligo pretty-print option.ligo_output -s pascaligo))) (deps option.ligo_output)) +(rule (targets quote-declaration.ligo_output2) (action (with-stdout-to quote-declaration.ligo_output2 (run ligo pretty-print quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output)) +(rule (targets quote-declarations.ligo_output2) (action (with-stdout-to quote-declarations.ligo_output2 (run ligo pretty-print quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output)) +(rule (targets record.ligo_output2) (action (with-stdout-to record.ligo_output2 (run ligo pretty-print record.ligo_output -s pascaligo))) (deps record.ligo_output)) +(rule (targets recursion.ligo_output2) (action (with-stdout-to recursion.ligo_output2 (run ligo pretty-print recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output)) +(rule (targets redeclaration.ligo_output2) (action (with-stdout-to redeclaration.ligo_output2 (run ligo pretty-print redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output)) +(rule (targets replaceable_id.ligo_output2) (action (with-stdout-to replaceable_id.ligo_output2 (run ligo pretty-print replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output)) +(rule (targets self_address.ligo_output2) (action (with-stdout-to self_address.ligo_output2 (run ligo pretty-print self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output)) +(rule (targets self_type_annotation.ligo_output2) (action (with-stdout-to self_type_annotation.ligo_output2 (run ligo pretty-print self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output)) +(rule (targets self_with_entrypoint.ligo_output2) (action (with-stdout-to self_with_entrypoint.ligo_output2 (run ligo pretty-print self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output)) +(rule (targets self_without_entrypoint.ligo_output2) (action (with-stdout-to self_without_entrypoint.ligo_output2 (run ligo pretty-print self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output)) +(rule (targets set_arithmetic-1.ligo_output2) (action (with-stdout-to set_arithmetic-1.ligo_output2 (run ligo pretty-print set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output)) +(rule (targets set_arithmetic.ligo_output2) (action (with-stdout-to set_arithmetic.ligo_output2 (run ligo pretty-print set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output)) +(rule (targets set_delegate.ligo_output2) (action (with-stdout-to set_delegate.ligo_output2 (run ligo pretty-print set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output)) +(rule (targets shadow.ligo_output2) (action (with-stdout-to shadow.ligo_output2 (run ligo pretty-print shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output)) +(rule (targets simple_access.ligo_output2) (action (with-stdout-to simple_access.ligo_output2 (run ligo pretty-print simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output)) +(rule (targets string_arithmetic.ligo_output2) (action (with-stdout-to string_arithmetic.ligo_output2 (run ligo pretty-print string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output)) +(rule (targets string.ligo_output2) (action (with-stdout-to string.ligo_output2 (run ligo pretty-print string.ligo_output -s pascaligo))) (deps string.ligo_output)) +(rule (targets super-counter.ligo_output2) (action (with-stdout-to super-counter.ligo_output2 (run ligo pretty-print super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output)) +(rule (targets tez.ligo_output2) (action (with-stdout-to tez.ligo_output2 (run ligo pretty-print tez.ligo_output -s pascaligo))) (deps tez.ligo_output)) +(rule (targets time-lock.ligo_output2) (action (with-stdout-to time-lock.ligo_output2 (run ligo pretty-print time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output)) +(rule (targets timestamp.ligo_output2) (action (with-stdout-to timestamp.ligo_output2 (run ligo pretty-print timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output)) +(rule (targets toto.ligo_output2) (action (with-stdout-to toto.ligo_output2 (run ligo pretty-print toto.ligo_output -s pascaligo))) (deps toto.ligo_output)) +(rule (targets tuple.ligo_output2) (action (with-stdout-to tuple.ligo_output2 (run ligo pretty-print tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output)) +(rule (targets type-alias.ligo_output2) (action (with-stdout-to type-alias.ligo_output2 (run ligo pretty-print type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output)) +(rule (targets unit.ligo_output2) (action (with-stdout-to unit.ligo_output2 (run ligo pretty-print unit.ligo_output -s pascaligo))) (deps unit.ligo_output)) +(rule (targets variant-matching.ligo_output2) (action (with-stdout-to variant-matching.ligo_output2 (run ligo pretty-print variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output)) +(rule (targets variant.ligo_output2) (action (with-stdout-to variant.ligo_output2 (run ligo pretty-print variant.ligo_output -s pascaligo))) (deps variant.ligo_output)) +(rule (targets website1.ligo_output2) (action (with-stdout-to website1.ligo_output2 (run ligo pretty-print website1.ligo_output -s pascaligo))) (deps website1.ligo_output)) +(rule (targets website2.ligo_output2) (action (with-stdout-to website2.ligo_output2 (run ligo pretty-print website2.ligo_output -s pascaligo))) (deps website2.ligo_output)) + +;; diff the pretty printed contract with the pretty printed pretty printed contract +;; reasonligo +(alias (name runtest) (action (diff address.religo_output address.religo_output2)) (deps address.religo_output address.religo_output2)) +(alias (name runtest) (action (diff amount.religo_output amount.religo_output2)) (deps amount.religo_output amount.religo_output2)) +(alias (name runtest) (action (diff arithmetic.religo_output arithmetic.religo_output2)) (deps arithmetic.religo_output arithmetic.religo_output2)) +(alias (name runtest) (action (diff bad_address_format.religo_output bad_address_format.religo_output2)) (deps bad_address_format.religo_output bad_address_format.religo_output2)) +(alias (name runtest) (action (diff balance_constant.religo_output balance_constant.religo_output2)) (deps balance_constant.religo_output balance_constant.religo_output2)) +(alias (name runtest) (action (diff bitwise_arithmetic.religo_output bitwise_arithmetic.religo_output2)) (deps bitwise_arithmetic.religo_output bitwise_arithmetic.religo_output2)) +(alias (name runtest) (action (diff boolean_operators.religo_output boolean_operators.religo_output2)) (deps boolean_operators.religo_output boolean_operators.religo_output2)) +(alias (name runtest) (action (diff bytes_arithmetic.religo_output bytes_arithmetic.religo_output2)) (deps bytes_arithmetic.religo_output bytes_arithmetic.religo_output2)) +(alias (name runtest) (action (diff bytes_unpack.religo_output bytes_unpack.religo_output2)) (deps bytes_unpack.religo_output bytes_unpack.religo_output2)) +(alias (name runtest) (action (diff check_signature.religo_output check_signature.religo_output2)) (deps check_signature.religo_output check_signature.religo_output2)) +(alias (name runtest) (action (diff closure.religo_output closure.religo_output2)) (deps closure.religo_output closure.religo_output2)) +(alias (name runtest) (action (diff condition-shadowing.religo_output condition-shadowing.religo_output2)) (deps condition-shadowing.religo_output condition-shadowing.religo_output2)) +(alias (name runtest) (action (diff condition.religo_output condition.religo_output2)) (deps condition.religo_output condition.religo_output2)) +(alias (name runtest) (action (diff counter.religo_output counter.religo_output2)) (deps counter.religo_output counter.religo_output2)) +(alias (name runtest) (action (diff crypto.religo_output crypto.religo_output2)) (deps crypto.religo_output crypto.religo_output2)) +(alias (name runtest) (action (diff empty_case.religo_output empty_case.religo_output2)) (deps empty_case.religo_output empty_case.religo_output2)) +(alias (name runtest) (action (diff eq_bool.religo_output eq_bool.religo_output2)) (deps eq_bool.religo_output eq_bool.religo_output2)) +(alias (name runtest) (action (diff failwith.religo_output failwith.religo_output2)) (deps failwith.religo_output failwith.religo_output2)) +(alias (name runtest) (action (diff function-shared.religo_output function-shared.religo_output2)) (deps function-shared.religo_output function-shared.religo_output2)) +(alias (name runtest) (action (diff high-order.religo_output high-order.religo_output2)) (deps high-order.religo_output high-order.religo_output2)) +(alias (name runtest) (action (diff implicit_account.religo_output implicit_account.religo_output2)) (deps implicit_account.religo_output implicit_account.religo_output2)) +(alias (name runtest) (action (diff included.religo_output included.religo_output2)) (deps included.religo_output included.religo_output2)) +(alias (name runtest) (action (diff includer.religo_output includer.religo_output2)) (deps includer.religo_output includer.religo_output2)) +(alias (name runtest) (action (diff key_hash.religo_output key_hash.religo_output2)) (deps key_hash.religo_output key_hash.religo_output2)) +(alias (name runtest) (action (diff lambda.religo_output lambda.religo_output2)) (deps lambda.religo_output lambda.religo_output2)) +(alias (name runtest) (action (diff lambda2.religo_output lambda2.religo_output2)) (deps lambda2.religo_output lambda2.religo_output2)) +(alias (name runtest) (action (diff let_multiple.religo_output let_multiple.religo_output2)) (deps let_multiple.religo_output let_multiple.religo_output2)) +(alias (name runtest) (action (diff letin.religo_output letin.religo_output2)) (deps letin.religo_output letin.religo_output2)) +(alias (name runtest) (action (diff list.religo_output list.religo_output2)) (deps list.religo_output list.religo_output2)) +(alias (name runtest) (action (diff loop.religo_output loop.religo_output2)) (deps loop.religo_output loop.religo_output2)) +(alias (name runtest) (action (diff map.religo_output map.religo_output2)) (deps map.religo_output map.religo_output2)) +(alias (name runtest) (action (diff match_bis.religo_output match_bis.religo_output2)) (deps match_bis.religo_output match_bis.religo_output2)) +(alias (name runtest) (action (diff match.religo_output match.religo_output2)) (deps match.religo_output match.religo_output2)) +(alias (name runtest) (action (diff michelson_pair_tree.religo_output michelson_pair_tree.religo_output2)) (deps michelson_pair_tree.religo_output michelson_pair_tree.religo_output2)) +(alias (name runtest) (action (diff multiple-parameters.religo_output multiple-parameters.religo_output2)) (deps multiple-parameters.religo_output multiple-parameters.religo_output2)) +(alias (name runtest) (action (diff multisig.religo_output multisig.religo_output2)) (deps multisig.religo_output multisig.religo_output2)) +(alias (name runtest) (action (diff no_semicolon.religo_output no_semicolon.religo_output2)) (deps no_semicolon.religo_output no_semicolon.religo_output2)) +(alias (name runtest) (action (diff pledge.religo_output pledge.religo_output2)) (deps pledge.religo_output pledge.religo_output2)) +(alias (name runtest) (action (diff record.religo_output record.religo_output2)) (deps record.religo_output record.religo_output2)) +(alias (name runtest) (action (diff recursion.religo_output recursion.religo_output2)) (deps recursion.religo_output recursion.religo_output2)) +(alias (name runtest) (action (diff self_address.religo_output self_address.religo_output2)) (deps self_address.religo_output self_address.religo_output2)) +(alias (name runtest) (action (diff set_arithmetic.religo_output set_arithmetic.religo_output2)) (deps set_arithmetic.religo_output set_arithmetic.religo_output2)) +(alias (name runtest) (action (diff set_delegate.religo_output set_delegate.religo_output2)) (deps set_delegate.religo_output set_delegate.religo_output2)) +(alias (name runtest) (action (diff single_record_item.religo_output single_record_item.religo_output2)) (deps single_record_item.religo_output single_record_item.religo_output2)) +(alias (name runtest) (action (diff string_arithmetic.religo_output string_arithmetic.religo_output2)) (deps string_arithmetic.religo_output string_arithmetic.religo_output2)) +(alias (name runtest) (action (diff super-counter.religo_output super-counter.religo_output2)) (deps super-counter.religo_output super-counter.religo_output2)) +(alias (name runtest) (action (diff tuple_list.religo_output tuple_list.religo_output2)) (deps tuple_list.religo_output tuple_list.religo_output2)) +(alias (name runtest) (action (diff tuple_param_destruct.religo_output tuple_param_destruct.religo_output2)) (deps tuple_param_destruct.religo_output tuple_param_destruct.religo_output2)) +(alias (name runtest) (action (diff tuple_type.religo_output tuple_type.religo_output2)) (deps tuple_type.religo_output tuple_type.religo_output2)) +(alias (name runtest) (action (diff tuple.religo_output tuple.religo_output2)) (deps tuple.religo_output tuple.religo_output2)) +(alias (name runtest) (action (diff tuples_no_annotation.religo_output tuples_no_annotation.religo_output2)) (deps tuples_no_annotation.religo_output tuples_no_annotation.religo_output2)) +(alias (name runtest) (action (diff tuples_sequences_functions.religo_output tuples_sequences_functions.religo_output2)) (deps tuples_sequences_functions.religo_output tuples_sequences_functions.religo_output2)) +(alias (name runtest) (action (diff variant.religo_output variant.religo_output2)) (deps variant.religo_output variant.religo_output2)) +(alias (name runtest) (action (diff website2.religo_output website2.religo_output2)) (deps website2.religo_output website2.religo_output2)) + +;; cameligo +(alias (name runtest) (action (diff assert.mligo_output assert.mligo_output2)) (deps assert.mligo_output assert.mligo_output2)) +(alias (name runtest) (action (diff address.mligo_output address.mligo_output2)) (deps address.mligo_output address.mligo_output2)) +(alias (name runtest) (action (diff amount_lambda.mligo_output amount_lambda.mligo_output2)) (deps amount_lambda.mligo_output amount_lambda.mligo_output2)) +(alias (name runtest) (action (diff amount.mligo_output amount.mligo_output2)) (deps amount.mligo_output amount.mligo_output2)) +(alias (name runtest) (action (diff arithmetic.mligo_output arithmetic.mligo_output2)) (deps arithmetic.mligo_output arithmetic.mligo_output2)) +(alias (name runtest) (action (diff attributes.mligo_output attributes.mligo_output2)) (deps attributes.mligo_output attributes.mligo_output2)) +(alias (name runtest) (action (diff balance_constant.mligo_output balance_constant.mligo_output2)) (deps balance_constant.mligo_output balance_constant.mligo_output2)) +(alias (name runtest) (action (diff basic.mligo_output basic.mligo_output2)) (deps basic.mligo_output basic.mligo_output2)) +(alias (name runtest) (action (diff big_map.mligo_output big_map.mligo_output2)) (deps big_map.mligo_output big_map.mligo_output2)) +(alias (name runtest) (action (diff bitwise_arithmetic.mligo_output bitwise_arithmetic.mligo_output2)) (deps bitwise_arithmetic.mligo_output bitwise_arithmetic.mligo_output2)) +(alias (name runtest) (action (diff boolean_operators.mligo_output boolean_operators.mligo_output2)) (deps boolean_operators.mligo_output boolean_operators.mligo_output2)) +(alias (name runtest) (action (diff bytes_arithmetic.mligo_output bytes_arithmetic.mligo_output2)) (deps bytes_arithmetic.mligo_output bytes_arithmetic.mligo_output2)) +(alias (name runtest) (action (diff bytes_unpack.mligo_output bytes_unpack.mligo_output2)) (deps bytes_unpack.mligo_output bytes_unpack.mligo_output2)) +(alias (name runtest) (action (diff check_signature.mligo_output check_signature.mligo_output2)) (deps check_signature.mligo_output check_signature.mligo_output2)) +(alias (name runtest) (action (diff closure.mligo_output closure.mligo_output2)) (deps closure.mligo_output closure.mligo_output2)) +(alias (name runtest) (action (diff comparable.mligo_output comparable.mligo_output2)) (deps comparable.mligo_output comparable.mligo_output2)) +(alias (name runtest) (action (diff condition-annot.mligo_output condition-annot.mligo_output2)) (deps condition-annot.mligo_output condition-annot.mligo_output2)) +(alias (name runtest) (action (diff condition-shadowing.mligo_output condition-shadowing.mligo_output2)) (deps condition-shadowing.mligo_output condition-shadowing.mligo_output2)) +(alias (name runtest) (action (diff condition.mligo_output condition.mligo_output2)) (deps condition.mligo_output condition.mligo_output2)) +(alias (name runtest) (action (diff counter.mligo_output counter.mligo_output2)) (deps counter.mligo_output counter.mligo_output2)) +(alias (name runtest) (action (diff create_contract.mligo_output create_contract.mligo_output2)) (deps create_contract.mligo_output create_contract.mligo_output2)) +(alias (name runtest) (action (diff crypto.mligo_output crypto.mligo_output2)) (deps crypto.mligo_output crypto.mligo_output2)) +(alias (name runtest) (action (diff curry.mligo_output curry.mligo_output2)) (deps curry.mligo_output curry.mligo_output2)) +(alias (name runtest) (action (diff double_michelson_or.mligo_output double_michelson_or.mligo_output2)) (deps double_michelson_or.mligo_output double_michelson_or.mligo_output2)) +(alias (name runtest) (action (diff empty_case.mligo_output empty_case.mligo_output2)) (deps empty_case.mligo_output empty_case.mligo_output2)) +(alias (name runtest) (action (diff eq_bool.mligo_output eq_bool.mligo_output2)) (deps eq_bool.mligo_output eq_bool.mligo_output2)) +(alias (name runtest) (action (diff FA1.2.mligo_output FA1.2.mligo_output2)) (deps FA1.2.mligo_output FA1.2.mligo_output2)) +(alias (name runtest) (action (diff failwith.mligo_output failwith.mligo_output2)) (deps failwith.mligo_output failwith.mligo_output2)) +(alias (name runtest) (action (diff fibo.mligo_output fibo.mligo_output2)) (deps fibo.mligo_output fibo.mligo_output2)) +(alias (name runtest) (action (diff fibo2.mligo_output fibo2.mligo_output2)) (deps fibo2.mligo_output fibo2.mligo_output2)) +(alias (name runtest) (action (diff fibo3.mligo_output fibo3.mligo_output2)) (deps fibo3.mligo_output fibo3.mligo_output2)) +(alias (name runtest) (action (diff fibo4.mligo_output fibo4.mligo_output2)) (deps fibo4.mligo_output fibo4.mligo_output2)) +(alias (name runtest) (action (diff function-shared.mligo_output function-shared.mligo_output2)) (deps function-shared.mligo_output function-shared.mligo_output2)) +(alias (name runtest) (action (diff guess_string.mligo_output guess_string.mligo_output2)) (deps guess_string.mligo_output guess_string.mligo_output2)) + +;; pascaligo +(alias (name runtest) (action (diff address.ligo_output address.ligo_output2)) (deps address.ligo_output address.ligo_output2)) +(alias (name runtest) (action (diff amount.ligo_output amount.ligo_output2)) (deps amount.ligo_output amount.ligo_output2)) +(alias (name runtest) (action (diff annotation.ligo_output annotation.ligo_output2)) (deps annotation.ligo_output annotation.ligo_output2)) +(alias (name runtest) (action (diff application.ligo_output application.ligo_output2)) (deps application.ligo_output application.ligo_output2)) +(alias (name runtest) (action (diff arithmetic.ligo_output arithmetic.ligo_output2)) (deps arithmetic.ligo_output arithmetic.ligo_output2)) +(alias (name runtest) (action (diff assign.ligo_output assign.ligo_output2)) (deps assign.ligo_output assign.ligo_output2)) +(alias (name runtest) (action (diff attributes.ligo_output attributes.ligo_output2)) (deps attributes.ligo_output attributes.ligo_output2)) +(alias (name runtest) (action (diff bad_timestamp.ligo_output bad_timestamp.ligo_output2)) (deps bad_timestamp.ligo_output bad_timestamp.ligo_output2)) +(alias (name runtest) (action (diff bad_type_operator.ligo_output bad_type_operator.ligo_output2)) (deps bad_type_operator.ligo_output bad_type_operator.ligo_output2)) +(alias (name runtest) (action (diff balance_constant.ligo_output balance_constant.ligo_output2)) (deps balance_constant.ligo_output balance_constant.ligo_output2)) +(alias (name runtest) (action (diff big_map.ligo_output big_map.ligo_output2)) (deps big_map.ligo_output big_map.ligo_output2)) +(alias (name runtest) (action (diff bitwise_arithmetic.ligo_output bitwise_arithmetic.ligo_output2)) (deps bitwise_arithmetic.ligo_output bitwise_arithmetic.ligo_output2)) +(alias (name runtest) (action (diff blockless.ligo_output blockless.ligo_output2)) (deps blockless.ligo_output blockless.ligo_output2)) +(alias (name runtest) (action (diff boolean_operators.ligo_output boolean_operators.ligo_output2)) (deps boolean_operators.ligo_output boolean_operators.ligo_output2)) +(alias (name runtest) (action (diff bytes_arithmetic.ligo_output bytes_arithmetic.ligo_output2)) (deps bytes_arithmetic.ligo_output bytes_arithmetic.ligo_output2)) +(alias (name runtest) (action (diff bytes_unpack.ligo_output bytes_unpack.ligo_output2)) (deps bytes_unpack.ligo_output bytes_unpack.ligo_output2)) +(alias (name runtest) (action (diff chain_id.ligo_output chain_id.ligo_output2)) (deps chain_id.ligo_output chain_id.ligo_output2)) +(alias (name runtest) (action (diff check_signature.ligo_output check_signature.ligo_output2)) (deps check_signature.ligo_output check_signature.ligo_output2)) +(alias (name runtest) (action (diff closure-1.ligo_output closure-1.ligo_output2)) (deps closure-1.ligo_output closure-1.ligo_output2)) +(alias (name runtest) (action (diff closure-2.ligo_output closure-2.ligo_output2)) (deps closure-2.ligo_output closure-2.ligo_output2)) +(alias (name runtest) (action (diff closure-3.ligo_output closure-3.ligo_output2)) (deps closure-3.ligo_output closure-3.ligo_output2)) +(alias (name runtest) (action (diff closure.ligo_output closure.ligo_output2)) (deps closure.ligo_output closure.ligo_output2)) +(alias (name runtest) (action (diff coase.ligo_output coase.ligo_output2)) (deps coase.ligo_output coase.ligo_output2)) +(alias (name runtest) (action (diff condition-simple.ligo_output condition-simple.ligo_output2)) (deps condition-simple.ligo_output condition-simple.ligo_output2)) +(alias (name runtest) (action (diff condition.ligo_output condition.ligo_output2)) (deps condition.ligo_output condition.ligo_output2)) +(alias (name runtest) (action (diff counter.ligo_output counter.ligo_output2)) (deps counter.ligo_output counter.ligo_output2)) +(alias (name runtest) (action (diff crypto.ligo_output crypto.ligo_output2)) (deps crypto.ligo_output crypto.ligo_output2)) +(alias (name runtest) (action (diff declaration-local.ligo_output declaration-local.ligo_output2)) (deps declaration-local.ligo_output declaration-local.ligo_output2)) +(alias (name runtest) (action (diff declarations.ligo_output declarations.ligo_output2)) (deps declarations.ligo_output declarations.ligo_output2)) +(alias (name runtest) (action (diff deep_access.ligo_output deep_access.ligo_output2)) (deps deep_access.ligo_output deep_access.ligo_output2)) +(alias (name runtest) (action (diff dispatch-counter.ligo_output dispatch-counter.ligo_output2)) (deps dispatch-counter.ligo_output dispatch-counter.ligo_output2)) +(alias (name runtest) (action (diff double_main.ligo_output double_main.ligo_output2)) (deps double_main.ligo_output double_main.ligo_output2)) +(alias (name runtest) (action (diff double_michelson_or.ligo_output double_michelson_or.ligo_output2)) (deps double_michelson_or.ligo_output double_michelson_or.ligo_output2)) +(alias (name runtest) (action (diff empty_case.ligo_output empty_case.ligo_output2)) (deps empty_case.ligo_output empty_case.ligo_output2)) +(alias (name runtest) (action (diff entrypoints.ligo_output entrypoints.ligo_output2)) (deps entrypoints.ligo_output entrypoints.ligo_output2)) +(alias (name runtest) (action (diff eq_bool.ligo_output eq_bool.ligo_output2)) (deps eq_bool.ligo_output eq_bool.ligo_output2)) +(alias (name runtest) (action (diff evaluation_tests.ligo_output evaluation_tests.ligo_output2)) (deps evaluation_tests.ligo_output evaluation_tests.ligo_output2)) +(alias (name runtest) (action (diff FA1.2.ligo_output FA1.2.ligo_output2)) (deps FA1.2.ligo_output FA1.2.ligo_output2)) +(alias (name runtest) (action (diff failwith.ligo_output failwith.ligo_output2)) (deps failwith.ligo_output failwith.ligo_output2)) +(alias (name runtest) (action (diff for_fail.ligo_output for_fail.ligo_output2)) (deps for_fail.ligo_output for_fail.ligo_output2)) +(alias (name runtest) (action (diff function-anon.ligo_output function-anon.ligo_output2)) (deps function-anon.ligo_output function-anon.ligo_output2)) +(alias (name runtest) (action (diff function-complex.ligo_output function-complex.ligo_output2)) (deps function-complex.ligo_output function-complex.ligo_output2)) +(alias (name runtest) (action (diff function-shared.ligo_output function-shared.ligo_output2)) (deps function-shared.ligo_output function-shared.ligo_output2)) +(alias (name runtest) (action (diff function.ligo_output function.ligo_output2)) (deps function.ligo_output function.ligo_output2)) +(alias (name runtest) (action (diff get_contract.ligo_output get_contract.ligo_output2)) (deps get_contract.ligo_output get_contract.ligo_output2)) +(alias (name runtest) (action (diff high-order.ligo_output high-order.ligo_output2)) (deps high-order.ligo_output high-order.ligo_output2)) +(alias (name runtest) (action (diff id.ligo_output id.ligo_output2)) (deps id.ligo_output id.ligo_output2)) +(alias (name runtest) (action (diff implicit_account.ligo_output implicit_account.ligo_output2)) (deps implicit_account.ligo_output implicit_account.ligo_output2)) +(alias (name runtest) (action (diff included.ligo_output included.ligo_output2)) (deps included.ligo_output included.ligo_output2)) +(alias (name runtest) (action (diff includer.ligo_output includer.ligo_output2)) (deps includer.ligo_output includer.ligo_output2)) +(alias (name runtest) (action (diff isnat.ligo_output isnat.ligo_output2)) (deps isnat.ligo_output isnat.ligo_output2)) +(alias (name runtest) (action (diff key_hash_comparable.ligo_output key_hash_comparable.ligo_output2)) (deps key_hash_comparable.ligo_output key_hash_comparable.ligo_output2)) +(alias (name runtest) (action (diff key_hash.ligo_output key_hash.ligo_output2)) (deps key_hash.ligo_output key_hash.ligo_output2)) +(alias (name runtest) (action (diff lambda.ligo_output lambda.ligo_output2)) (deps lambda.ligo_output lambda.ligo_output2)) +(alias (name runtest) (action (diff list.ligo_output list.ligo_output2)) (deps list.ligo_output list.ligo_output2)) +(alias (name runtest) (action (diff loop_bugs.ligo_output loop_bugs.ligo_output2)) (deps loop_bugs.ligo_output loop_bugs.ligo_output2)) +(alias (name runtest) (action (diff loop.ligo_output loop.ligo_output2)) (deps loop.ligo_output loop.ligo_output2)) +(alias (name runtest) (action (diff map.ligo_output map.ligo_output2)) (deps map.ligo_output map.ligo_output2)) +(alias (name runtest) (action (diff match.ligo_output match.ligo_output2)) (deps match.ligo_output match.ligo_output2)) +(alias (name runtest) (action (diff michelson_or_tree_intermediary.ligo_output michelson_or_tree_intermediary.ligo_output2)) (deps michelson_or_tree_intermediary.ligo_output michelson_or_tree_intermediary.ligo_output2)) +(alias (name runtest) (action (diff michelson_or_tree.ligo_output michelson_or_tree.ligo_output2)) (deps michelson_or_tree.ligo_output michelson_or_tree.ligo_output2)) +(alias (name runtest) (action (diff michelson_pair_tree_intermediary.ligo_output michelson_pair_tree_intermediary.ligo_output2)) (deps michelson_pair_tree_intermediary.ligo_output michelson_pair_tree_intermediary.ligo_output2)) +(alias (name runtest) (action (diff michelson_pair_tree.ligo_output michelson_pair_tree.ligo_output2)) (deps michelson_pair_tree.ligo_output michelson_pair_tree.ligo_output2)) +(alias (name runtest) (action (diff multiple-parameters.ligo_output multiple-parameters.ligo_output2)) (deps multiple-parameters.ligo_output multiple-parameters.ligo_output2)) +(alias (name runtest) (action (diff multisig-v2.ligo_output multisig-v2.ligo_output2)) (deps multisig-v2.ligo_output multisig-v2.ligo_output2)) +(alias (name runtest) (action (diff multisig.ligo_output multisig.ligo_output2)) (deps multisig.ligo_output multisig.ligo_output2)) +(alias (name runtest) (action (diff option.ligo_output option.ligo_output2)) (deps option.ligo_output option.ligo_output2)) +(alias (name runtest) (action (diff quote-declaration.ligo_output quote-declaration.ligo_output2)) (deps quote-declaration.ligo_output quote-declaration.ligo_output2)) +(alias (name runtest) (action (diff quote-declarations.ligo_output quote-declarations.ligo_output2)) (deps quote-declarations.ligo_output quote-declarations.ligo_output2)) +(alias (name runtest) (action (diff record.ligo_output record.ligo_output2)) (deps record.ligo_output record.ligo_output2)) +(alias (name runtest) (action (diff recursion.ligo_output recursion.ligo_output2)) (deps recursion.ligo_output recursion.ligo_output2)) +(alias (name runtest) (action (diff redeclaration.ligo_output redeclaration.ligo_output2)) (deps redeclaration.ligo_output redeclaration.ligo_output2)) +(alias (name runtest) (action (diff replaceable_id.ligo_output replaceable_id.ligo_output2)) (deps replaceable_id.ligo_output replaceable_id.ligo_output2)) +(alias (name runtest) (action (diff self_address.ligo_output self_address.ligo_output2)) (deps self_address.ligo_output self_address.ligo_output2)) +(alias (name runtest) (action (diff self_type_annotation.ligo_output self_type_annotation.ligo_output2)) (deps self_type_annotation.ligo_output self_type_annotation.ligo_output2)) +(alias (name runtest) (action (diff self_with_entrypoint.ligo_output self_with_entrypoint.ligo_output2)) (deps self_with_entrypoint.ligo_output self_with_entrypoint.ligo_output2)) +(alias (name runtest) (action (diff self_without_entrypoint.ligo_output self_without_entrypoint.ligo_output2)) (deps self_without_entrypoint.ligo_output self_without_entrypoint.ligo_output2)) +(alias (name runtest) (action (diff set_arithmetic-1.ligo_output set_arithmetic-1.ligo_output2)) (deps set_arithmetic-1.ligo_output set_arithmetic-1.ligo_output2)) +(alias (name runtest) (action (diff set_arithmetic.ligo_output set_arithmetic.ligo_output2)) (deps set_arithmetic.ligo_output set_arithmetic.ligo_output2)) +(alias (name runtest) (action (diff set_delegate.ligo_output set_delegate.ligo_output2)) (deps set_delegate.ligo_output set_delegate.ligo_output2)) +(alias (name runtest) (action (diff shadow.ligo_output shadow.ligo_output2)) (deps shadow.ligo_output shadow.ligo_output2)) +(alias (name runtest) (action (diff simple_access.ligo_output simple_access.ligo_output2)) (deps simple_access.ligo_output simple_access.ligo_output2)) +(alias (name runtest) (action (diff string_arithmetic.ligo_output string_arithmetic.ligo_output2)) (deps string_arithmetic.ligo_output string_arithmetic.ligo_output2)) +(alias (name runtest) (action (diff string.ligo_output string.ligo_output2)) (deps string.ligo_output string.ligo_output2)) +(alias (name runtest) (action (diff super-counter.ligo_output super-counter.ligo_output2)) (deps super-counter.ligo_output super-counter.ligo_output2)) +(alias (name runtest) (action (diff tez.ligo_output tez.ligo_output2)) (deps tez.ligo_output tez.ligo_output2)) +(alias (name runtest) (action (diff time-lock.ligo_output time-lock.ligo_output2)) (deps time-lock.ligo_output time-lock.ligo_output2)) +(alias (name runtest) (action (diff timestamp.ligo_output timestamp.ligo_output2)) (deps timestamp.ligo_output timestamp.ligo_output2)) +(alias (name runtest) (action (diff toto.ligo_output toto.ligo_output2)) (deps toto.ligo_output toto.ligo_output2)) +(alias (name runtest) (action (diff tuple.ligo_output tuple.ligo_output2)) (deps tuple.ligo_output tuple.ligo_output2)) +(alias (name runtest) (action (diff type-alias.ligo_output type-alias.ligo_output2)) (deps type-alias.ligo_output type-alias.ligo_output2)) +(alias (name runtest) (action (diff unit.ligo_output unit.ligo_output2)) (deps unit.ligo_output unit.ligo_output2)) +(alias (name runtest) (action (diff variant-matching.ligo_output variant-matching.ligo_output2)) (deps variant-matching.ligo_output variant-matching.ligo_output2)) +(alias (name runtest) (action (diff variant.ligo_output variant.ligo_output2)) (deps variant.ligo_output variant.ligo_output2)) +(alias (name runtest) (action (diff website1.ligo_output website1.ligo_output2)) (deps website1.ligo_output website1.ligo_output2)) +(alias (name runtest) (action (diff website2.ligo_output website2.ligo_output2)) (deps website2.ligo_output website2.ligo_output2)) + +;; check produced ast +;; reasonligo +(rule (targets address.religo_ast) (action (with-stdout-to address.religo_ast (run ligo print-ast address.religo -s reasonligo))) (deps address.religo)) +(rule (targets amount.religo_ast) (action (with-stdout-to amount.religo_ast (run ligo print-ast amount.religo -s reasonligo))) (deps amount.religo)) +(rule (targets arithmetic.religo_ast) (action (with-stdout-to arithmetic.religo_ast (run ligo print-ast arithmetic.religo -s reasonligo))) (deps arithmetic.religo)) +(rule (targets balance_constant.religo_ast) (action (with-stdout-to balance_constant.religo_ast (run ligo print-ast balance_constant.religo -s reasonligo))) (deps balance_constant.religo)) +(rule (targets bitwise_arithmetic.religo_ast) (action (with-stdout-to bitwise_arithmetic.religo_ast (run ligo print-ast bitwise_arithmetic.religo -s reasonligo))) (deps bitwise_arithmetic.religo)) +(rule (targets boolean_operators.religo_ast) (action (with-stdout-to boolean_operators.religo_ast (run ligo print-ast boolean_operators.religo -s reasonligo))) (deps boolean_operators.religo)) +(rule (targets bytes_arithmetic.religo_ast) (action (with-stdout-to bytes_arithmetic.religo_ast (run ligo print-ast bytes_arithmetic.religo -s reasonligo))) (deps bytes_arithmetic.religo)) +(rule (targets bytes_unpack.religo_ast) (action (with-stdout-to bytes_unpack.religo_ast (run ligo print-ast bytes_unpack.religo -s reasonligo))) (deps bytes_unpack.religo)) +(rule (targets check_signature.religo_ast) (action (with-stdout-to check_signature.religo_ast (run ligo print-ast check_signature.religo -s reasonligo))) (deps check_signature.religo)) +(rule (targets closure.religo_ast) (action (with-stdout-to closure.religo_ast (run ligo print-ast closure.religo -s reasonligo))) (deps closure.religo)) +(rule (targets condition-shadowing.religo_ast) (action (with-stdout-to condition-shadowing.religo_ast (run ligo print-ast condition-shadowing.religo -s reasonligo))) (deps condition-shadowing.religo)) +(rule (targets condition.religo_ast) (action (with-stdout-to condition.religo_ast (run ligo print-ast condition.religo -s reasonligo))) (deps condition.religo)) +(rule (targets counter.religo_ast) (action (with-stdout-to counter.religo_ast (run ligo print-ast counter.religo -s reasonligo))) (deps counter.religo)) +(rule (targets crypto.religo_ast) (action (with-stdout-to crypto.religo_ast (run ligo print-ast crypto.religo -s reasonligo))) (deps crypto.religo)) +(rule (targets empty_case.religo_ast) (action (with-stdout-to empty_case.religo_ast (run ligo print-ast empty_case.religo -s reasonligo))) (deps empty_case.religo)) +(rule (targets eq_bool.religo_ast) (action (with-stdout-to eq_bool.religo_ast (run ligo print-ast eq_bool.religo -s reasonligo))) (deps eq_bool.religo)) +(rule (targets function-shared.religo_ast) (action (with-stdout-to function-shared.religo_ast (run ligo print-ast function-shared.religo -s reasonligo))) (deps function-shared.religo)) +(rule (targets high-order.religo_ast) (action (with-stdout-to high-order.religo_ast (run ligo print-ast high-order.religo -s reasonligo))) (deps high-order.religo)) +(rule (targets implicit_account.religo_ast) (action (with-stdout-to implicit_account.religo_ast (run ligo print-ast implicit_account.religo -s reasonligo))) (deps implicit_account.religo)) +(rule (targets included.religo_ast) (action (with-stdout-to included.religo_ast (run ligo print-ast included.religo -s reasonligo))) (deps included.religo)) +(rule (targets includer.religo_ast) (action (with-stdout-to includer.religo_ast (run ligo print-ast includer.religo -s reasonligo))) (deps includer.religo)) +(rule (targets key_hash.religo_ast) (action (with-stdout-to key_hash.religo_ast (run ligo print-ast key_hash.religo -s reasonligo))) (deps key_hash.religo)) +(rule (targets lambda.religo_ast) (action (with-stdout-to lambda.religo_ast (run ligo print-ast lambda.religo -s reasonligo))) (deps lambda.religo)) +(rule (targets lambda2.religo_ast) (action (with-stdout-to lambda2.religo_ast (run ligo print-ast lambda2.religo -s reasonligo))) (deps lambda2.religo)) +(rule (targets let_multiple.religo_ast) (action (with-stdout-to let_multiple.religo_ast (run ligo print-ast let_multiple.religo -s reasonligo))) (deps let_multiple.religo)) +(rule (targets letin.religo_ast) (action (with-stdout-to letin.religo_ast (run ligo print-ast letin.religo -s reasonligo))) (deps letin.religo)) +(rule (targets list.religo_ast) (action (with-stdout-to list.religo_ast (run ligo print-ast list.religo -s reasonligo))) (deps list.religo)) +(rule (targets loop.religo_ast) (action (with-stdout-to loop.religo_ast (run ligo print-ast loop.religo -s reasonligo))) (deps loop.religo)) +(rule (targets map.religo_ast) (action (with-stdout-to map.religo_ast (run ligo print-ast map.religo -s reasonligo))) (deps map.religo)) +(rule (targets match_bis.religo_ast) (action (with-stdout-to match_bis.religo_ast (run ligo print-ast match_bis.religo -s reasonligo))) (deps match_bis.religo)) +(rule (targets match.religo_ast) (action (with-stdout-to match.religo_ast (run ligo print-ast match.religo -s reasonligo))) (deps match.religo)) +(rule (targets michelson_pair_tree.religo_ast) (action (with-stdout-to michelson_pair_tree.religo_ast (run ligo print-ast michelson_pair_tree.religo -s reasonligo))) (deps michelson_pair_tree.religo)) +(rule (targets multiple-parameters.religo_ast) (action (with-stdout-to multiple-parameters.religo_ast (run ligo print-ast multiple-parameters.religo -s reasonligo))) (deps multiple-parameters.religo)) +(rule (targets multisig.religo_ast) (action (with-stdout-to multisig.religo_ast (run ligo print-ast multisig.religo -s reasonligo))) (deps multisig.religo)) +(rule (targets no_semicolon.religo_ast) (action (with-stdout-to no_semicolon.religo_ast (run ligo print-ast no_semicolon.religo -s reasonligo))) (deps no_semicolon.religo)) +(rule (targets pledge.religo_ast) (action (with-stdout-to pledge.religo_ast (run ligo print-ast pledge.religo -s reasonligo))) (deps pledge.religo)) +(rule (targets record.religo_ast) (action (with-stdout-to record.religo_ast (run ligo print-ast record.religo -s reasonligo))) (deps record.religo)) +(rule (targets recursion.religo_ast) (action (with-stdout-to recursion.religo_ast (run ligo print-ast recursion.religo -s reasonligo))) (deps recursion.religo)) +(rule (targets self_address.religo_ast) (action (with-stdout-to self_address.religo_ast (run ligo print-ast self_address.religo -s reasonligo))) (deps self_address.religo)) +(rule (targets set_arithmetic.religo_ast) (action (with-stdout-to set_arithmetic.religo_ast (run ligo print-ast set_arithmetic.religo -s reasonligo))) (deps set_arithmetic.religo)) +(rule (targets set_delegate.religo_ast) (action (with-stdout-to set_delegate.religo_ast (run ligo print-ast set_delegate.religo -s reasonligo))) (deps set_delegate.religo)) +(rule (targets single_record_item.religo_ast) (action (with-stdout-to single_record_item.religo_ast (run ligo print-ast single_record_item.religo -s reasonligo))) (deps single_record_item.religo)) +(rule (targets string_arithmetic.religo_ast) (action (with-stdout-to string_arithmetic.religo_ast (run ligo print-ast string_arithmetic.religo -s reasonligo))) (deps string_arithmetic.religo)) +(rule (targets super-counter.religo_ast) (action (with-stdout-to super-counter.religo_ast (run ligo print-ast super-counter.religo -s reasonligo))) (deps super-counter.religo)) +(rule (targets tuple_list.religo_ast) (action (with-stdout-to tuple_list.religo_ast (run ligo print-ast tuple_list.religo -s reasonligo))) (deps tuple_list.religo)) +(rule (targets tuple_param_destruct.religo_ast) (action (with-stdout-to tuple_param_destruct.religo_ast (run ligo print-ast tuple_param_destruct.religo -s reasonligo))) (deps tuple_param_destruct.religo)) +(rule (targets tuple_type.religo_ast) (action (with-stdout-to tuple_type.religo_ast (run ligo print-ast tuple_type.religo -s reasonligo))) (deps tuple_type.religo)) +(rule (targets tuple.religo_ast) (action (with-stdout-to tuple.religo_ast (run ligo print-ast tuple.religo -s reasonligo))) (deps tuple.religo)) +(rule (targets tuples_no_annotation.religo_ast) (action (with-stdout-to tuples_no_annotation.religo_ast (run ligo print-ast tuples_no_annotation.religo -s reasonligo))) (deps tuples_no_annotation.religo)) +(rule (targets tuples_sequences_functions.religo_ast) (action (with-stdout-to tuples_sequences_functions.religo_ast (run ligo print-ast tuples_sequences_functions.religo -s reasonligo))) (deps tuples_sequences_functions.religo)) +(rule (targets variant.religo_ast) (action (with-stdout-to variant.religo_ast (run ligo print-ast variant.religo -s reasonligo))) (deps variant.religo)) +(rule (targets website2.religo_ast) (action (with-stdout-to website2.religo_ast (run ligo print-ast website2.religo -s reasonligo))) (deps website2.religo)) + +;; cameligo +(rule (targets assert.mligo_ast) (action (with-stdout-to assert.mligo_ast (run ligo print-ast assert.mligo -s cameligo))) (deps assert.mligo)) +(rule (targets address.mligo_ast) (action (with-stdout-to address.mligo_ast (run ligo print-ast address.mligo -s cameligo))) (deps address.mligo)) +(rule (targets amount_lambda.mligo_ast) (action (with-stdout-to amount_lambda.mligo_ast (run ligo print-ast amount_lambda.mligo -s cameligo))) (deps amount_lambda.mligo)) +(rule (targets amount.mligo_ast) (action (with-stdout-to amount.mligo_ast (run ligo print-ast amount.mligo -s cameligo))) (deps amount.mligo)) +(rule (targets arithmetic.mligo_ast) (action (with-stdout-to arithmetic.mligo_ast (run ligo print-ast arithmetic.mligo -s cameligo))) (deps arithmetic.mligo)) +(rule (targets attributes.mligo_ast) (action (with-stdout-to attributes.mligo_ast (run ligo print-ast attributes.mligo -s cameligo))) (deps attributes.mligo)) +(rule (targets balance_constant.mligo_ast) (action (with-stdout-to balance_constant.mligo_ast (run ligo print-ast balance_constant.mligo -s cameligo))) (deps balance_constant.mligo)) +(rule (targets basic.mligo_ast) (action (with-stdout-to basic.mligo_ast (run ligo print-ast basic.mligo -s cameligo))) (deps basic.mligo)) +(rule (targets big_map.mligo_ast) (action (with-stdout-to big_map.mligo_ast (run ligo print-ast big_map.mligo -s cameligo))) (deps big_map.mligo)) +(rule (targets bitwise_arithmetic.mligo_ast) (action (with-stdout-to bitwise_arithmetic.mligo_ast (run ligo print-ast bitwise_arithmetic.mligo -s cameligo))) (deps bitwise_arithmetic.mligo)) +(rule (targets boolean_operators.mligo_ast) (action (with-stdout-to boolean_operators.mligo_ast (run ligo print-ast boolean_operators.mligo -s cameligo))) (deps boolean_operators.mligo)) +(rule (targets bytes_arithmetic.mligo_ast) (action (with-stdout-to bytes_arithmetic.mligo_ast (run ligo print-ast bytes_arithmetic.mligo -s cameligo))) (deps bytes_arithmetic.mligo)) +(rule (targets bytes_unpack.mligo_ast) (action (with-stdout-to bytes_unpack.mligo_ast (run ligo print-ast bytes_unpack.mligo -s cameligo))) (deps bytes_unpack.mligo)) +(rule (targets check_signature.mligo_ast) (action (with-stdout-to check_signature.mligo_ast (run ligo print-ast check_signature.mligo -s cameligo))) (deps check_signature.mligo)) +(rule (targets closure.mligo_ast) (action (with-stdout-to closure.mligo_ast (run ligo print-ast closure.mligo -s cameligo))) (deps closure.mligo)) +(rule (targets comparable.mligo_ast) (action (with-stdout-to comparable.mligo_ast (run ligo print-ast comparable.mligo -s cameligo))) (deps comparable.mligo)) +(rule (targets condition-annot.mligo_ast) (action (with-stdout-to condition-annot.mligo_ast (run ligo print-ast condition-annot.mligo -s cameligo))) (deps condition-annot.mligo)) +(rule (targets condition-shadowing.mligo_ast) (action (with-stdout-to condition-shadowing.mligo_ast (run ligo print-ast condition-shadowing.mligo -s cameligo))) (deps condition-shadowing.mligo)) +(rule (targets condition.mligo_ast) (action (with-stdout-to condition.mligo_ast (run ligo print-ast condition.mligo -s cameligo))) (deps condition.mligo)) +(rule (targets counter.mligo_ast) (action (with-stdout-to counter.mligo_ast (run ligo print-ast counter.mligo -s cameligo))) (deps counter.mligo)) +(rule (targets create_contract.mligo_ast) (action (with-stdout-to create_contract.mligo_ast (run ligo print-ast create_contract.mligo -s cameligo))) (deps create_contract.mligo)) +(rule (targets crypto.mligo_ast) (action (with-stdout-to crypto.mligo_ast (run ligo print-ast crypto.mligo -s cameligo))) (deps crypto.mligo)) +(rule (targets curry.mligo_ast) (action (with-stdout-to curry.mligo_ast (run ligo print-ast curry.mligo -s cameligo))) (deps curry.mligo)) +(rule (targets double_michelson_or.mligo_ast) (action (with-stdout-to double_michelson_or.mligo_ast (run ligo print-ast double_michelson_or.mligo -s cameligo))) (deps double_michelson_or.mligo)) +(rule (targets empty_case.mligo_ast) (action (with-stdout-to empty_case.mligo_ast (run ligo print-ast empty_case.mligo -s cameligo))) (deps empty_case.mligo)) +(rule (targets eq_bool.mligo_ast) (action (with-stdout-to eq_bool.mligo_ast (run ligo print-ast eq_bool.mligo -s cameligo))) (deps eq_bool.mligo)) +(rule (targets FA1.2.mligo_ast) (action (with-stdout-to FA1.2.mligo_ast (run ligo print-ast FA1.2.mligo -s cameligo))) (deps FA1.2.mligo)) +(rule (targets failwith.mligo_ast) (action (with-stdout-to failwith.mligo_ast (run ligo print-ast failwith.mligo -s cameligo))) (deps failwith.mligo)) +(rule (targets fibo.mligo_ast) (action (with-stdout-to fibo.mligo_ast (run ligo print-ast fibo.mligo -s cameligo))) (deps fibo.mligo)) +(rule (targets fibo2.mligo_ast) (action (with-stdout-to fibo2.mligo_ast (run ligo print-ast fibo2.mligo -s cameligo))) (deps fibo2.mligo)) +(rule (targets fibo3.mligo_ast) (action (with-stdout-to fibo3.mligo_ast (run ligo print-ast fibo3.mligo -s cameligo))) (deps fibo3.mligo)) +(rule (targets fibo4.mligo_ast) (action (with-stdout-to fibo4.mligo_ast (run ligo print-ast fibo4.mligo -s cameligo))) (deps fibo4.mligo)) +(rule (targets function-shared.mligo_ast) (action (with-stdout-to function-shared.mligo_ast (run ligo print-ast function-shared.mligo -s cameligo))) (deps function-shared.mligo)) +(rule (targets guess_string.mligo_ast) (action (with-stdout-to guess_string.mligo_ast (run ligo print-ast guess_string.mligo -s cameligo))) (deps guess_string.mligo)) +;; pascaligo +(rule (targets address.ligo_ast) (action (with-stdout-to address.ligo_ast (run ligo print-ast address.ligo -s pascaligo))) (deps address.ligo)) +(rule (targets amount.ligo_ast) (action (with-stdout-to amount.ligo_ast (run ligo print-ast amount.ligo -s pascaligo))) (deps amount.ligo)) +(rule (targets annotation.ligo_ast) (action (with-stdout-to annotation.ligo_ast (run ligo print-ast annotation.ligo -s pascaligo))) (deps annotation.ligo)) +(rule (targets application.ligo_ast) (action (with-stdout-to application.ligo_ast (run ligo print-ast application.ligo -s pascaligo))) (deps application.ligo)) +(rule (targets arithmetic.ligo_ast) (action (with-stdout-to arithmetic.ligo_ast (run ligo print-ast arithmetic.ligo -s pascaligo))) (deps arithmetic.ligo)) +(rule (targets assign.ligo_ast) (action (with-stdout-to assign.ligo_ast (run ligo print-ast assign.ligo -s pascaligo))) (deps assign.ligo)) +(rule (targets attributes.ligo_ast) (action (with-stdout-to attributes.ligo_ast (run ligo print-ast attributes.ligo -s pascaligo))) (deps attributes.ligo)) +(rule (targets bad_type_operator.ligo_ast) (action (with-stdout-to bad_type_operator.ligo_ast (run ligo print-ast bad_type_operator.ligo -s pascaligo))) (deps bad_type_operator.ligo)) +(rule (targets balance_constant.ligo_ast) (action (with-stdout-to balance_constant.ligo_ast (run ligo print-ast balance_constant.ligo -s pascaligo))) (deps balance_constant.ligo)) +(rule (targets big_map.ligo_ast) (action (with-stdout-to big_map.ligo_ast (run ligo print-ast big_map.ligo -s pascaligo))) (deps big_map.ligo)) +(rule (targets bitwise_arithmetic.ligo_ast) (action (with-stdout-to bitwise_arithmetic.ligo_ast (run ligo print-ast bitwise_arithmetic.ligo -s pascaligo))) (deps bitwise_arithmetic.ligo)) +(rule (targets blockless.ligo_ast) (action (with-stdout-to blockless.ligo_ast (run ligo print-ast blockless.ligo -s pascaligo))) (deps blockless.ligo)) +(rule (targets boolean_operators.ligo_ast) (action (with-stdout-to boolean_operators.ligo_ast (run ligo print-ast boolean_operators.ligo -s pascaligo))) (deps boolean_operators.ligo)) +(rule (targets bytes_arithmetic.ligo_ast) (action (with-stdout-to bytes_arithmetic.ligo_ast (run ligo print-ast bytes_arithmetic.ligo -s pascaligo))) (deps bytes_arithmetic.ligo)) +(rule (targets bytes_unpack.ligo_ast) (action (with-stdout-to bytes_unpack.ligo_ast (run ligo print-ast bytes_unpack.ligo -s pascaligo))) (deps bytes_unpack.ligo)) +(rule (targets chain_id.ligo_ast) (action (with-stdout-to chain_id.ligo_ast (run ligo print-ast chain_id.ligo -s pascaligo))) (deps chain_id.ligo)) +(rule (targets check_signature.ligo_ast) (action (with-stdout-to check_signature.ligo_ast (run ligo print-ast check_signature.ligo -s pascaligo))) (deps check_signature.ligo)) +(rule (targets closure-1.ligo_ast) (action (with-stdout-to closure-1.ligo_ast (run ligo print-ast closure-1.ligo -s pascaligo))) (deps closure-1.ligo)) +(rule (targets closure-2.ligo_ast) (action (with-stdout-to closure-2.ligo_ast (run ligo print-ast closure-2.ligo -s pascaligo))) (deps closure-2.ligo)) +(rule (targets closure-3.ligo_ast) (action (with-stdout-to closure-3.ligo_ast (run ligo print-ast closure-3.ligo -s pascaligo))) (deps closure-3.ligo)) +(rule (targets closure.ligo_ast) (action (with-stdout-to closure.ligo_ast (run ligo print-ast closure.ligo -s pascaligo))) (deps closure.ligo)) +(rule (targets coase.ligo_ast) (action (with-stdout-to coase.ligo_ast (run ligo print-ast coase.ligo -s pascaligo))) (deps coase.ligo)) +(rule (targets condition-simple.ligo_ast) (action (with-stdout-to condition-simple.ligo_ast (run ligo print-ast condition-simple.ligo -s pascaligo))) (deps condition-simple.ligo)) +(rule (targets condition.ligo_ast) (action (with-stdout-to condition.ligo_ast (run ligo print-ast condition.ligo -s pascaligo))) (deps condition.ligo)) +(rule (targets counter.ligo_ast) (action (with-stdout-to counter.ligo_ast (run ligo print-ast counter.ligo -s pascaligo))) (deps counter.ligo)) +(rule (targets crypto.ligo_ast) (action (with-stdout-to crypto.ligo_ast (run ligo print-ast crypto.ligo -s pascaligo))) (deps crypto.ligo)) +(rule (targets declaration-local.ligo_ast) (action (with-stdout-to declaration-local.ligo_ast (run ligo print-ast declaration-local.ligo -s pascaligo))) (deps declaration-local.ligo)) +(rule (targets declarations.ligo_ast) (action (with-stdout-to declarations.ligo_ast (run ligo print-ast declarations.ligo -s pascaligo))) (deps declarations.ligo)) +(rule (targets deep_access.ligo_ast) (action (with-stdout-to deep_access.ligo_ast (run ligo print-ast deep_access.ligo -s pascaligo))) (deps deep_access.ligo)) +(rule (targets dispatch-counter.ligo_ast) (action (with-stdout-to dispatch-counter.ligo_ast (run ligo print-ast dispatch-counter.ligo -s pascaligo))) (deps dispatch-counter.ligo)) +(rule (targets double_main.ligo_ast) (action (with-stdout-to double_main.ligo_ast (run ligo print-ast double_main.ligo -s pascaligo))) (deps double_main.ligo)) +(rule (targets double_michelson_or.ligo_ast) (action (with-stdout-to double_michelson_or.ligo_ast (run ligo print-ast double_michelson_or.ligo -s pascaligo))) (deps double_michelson_or.ligo)) +(rule (targets empty_case.ligo_ast) (action (with-stdout-to empty_case.ligo_ast (run ligo print-ast empty_case.ligo -s pascaligo))) (deps empty_case.ligo)) +(rule (targets entrypoints.ligo_ast) (action (with-stdout-to entrypoints.ligo_ast (run ligo print-ast entrypoints.ligo -s pascaligo))) (deps entrypoints.ligo)) +(rule (targets eq_bool.ligo_ast) (action (with-stdout-to eq_bool.ligo_ast (run ligo print-ast eq_bool.ligo -s pascaligo))) (deps eq_bool.ligo)) +(rule (targets evaluation_tests.ligo_ast) (action (with-stdout-to evaluation_tests.ligo_ast (run ligo print-ast evaluation_tests.ligo -s pascaligo))) (deps evaluation_tests.ligo)) +(rule (targets FA1.2.ligo_ast) (action (with-stdout-to FA1.2.ligo_ast (run ligo print-ast FA1.2.ligo -s pascaligo))) (deps FA1.2.ligo)) +(rule (targets failwith.ligo_ast) (action (with-stdout-to failwith.ligo_ast (run ligo print-ast failwith.ligo -s pascaligo))) (deps failwith.ligo)) +(rule (targets for_fail.ligo_ast) (action (with-stdout-to for_fail.ligo_ast (run ligo print-ast for_fail.ligo -s pascaligo))) (deps for_fail.ligo)) +(rule (targets function-anon.ligo_ast) (action (with-stdout-to function-anon.ligo_ast (run ligo print-ast function-anon.ligo -s pascaligo))) (deps function-anon.ligo)) +(rule (targets function-complex.ligo_ast) (action (with-stdout-to function-complex.ligo_ast (run ligo print-ast function-complex.ligo -s pascaligo))) (deps function-complex.ligo)) +(rule (targets function-shared.ligo_ast) (action (with-stdout-to function-shared.ligo_ast (run ligo print-ast function-shared.ligo -s pascaligo))) (deps function-shared.ligo)) +(rule (targets function.ligo_ast) (action (with-stdout-to function.ligo_ast (run ligo print-ast function.ligo -s pascaligo))) (deps function.ligo)) +(rule (targets get_contract.ligo_ast) (action (with-stdout-to get_contract.ligo_ast (run ligo print-ast get_contract.ligo -s pascaligo))) (deps get_contract.ligo)) +(rule (targets high-order.ligo_ast) (action (with-stdout-to high-order.ligo_ast (run ligo print-ast high-order.ligo -s pascaligo))) (deps high-order.ligo)) +(rule (targets id.ligo_ast) (action (with-stdout-to id.ligo_ast (run ligo print-ast id.ligo -s pascaligo))) (deps id.ligo)) +(rule (targets implicit_account.ligo_ast) (action (with-stdout-to implicit_account.ligo_ast (run ligo print-ast implicit_account.ligo -s pascaligo))) (deps implicit_account.ligo)) +(rule (targets included.ligo_ast) (action (with-stdout-to included.ligo_ast (run ligo print-ast included.ligo -s pascaligo))) (deps included.ligo)) +(rule (targets includer.ligo_ast) (action (with-stdout-to includer.ligo_ast (run ligo print-ast includer.ligo -s pascaligo))) (deps includer.ligo)) +(rule (targets isnat.ligo_ast) (action (with-stdout-to isnat.ligo_ast (run ligo print-ast isnat.ligo -s pascaligo))) (deps isnat.ligo)) +(rule (targets key_hash_comparable.ligo_ast) (action (with-stdout-to key_hash_comparable.ligo_ast (run ligo print-ast key_hash_comparable.ligo -s pascaligo))) (deps key_hash_comparable.ligo)) +(rule (targets key_hash.ligo_ast) (action (with-stdout-to key_hash.ligo_ast (run ligo print-ast key_hash.ligo -s pascaligo))) (deps key_hash.ligo)) +(rule (targets lambda.ligo_ast) (action (with-stdout-to lambda.ligo_ast (run ligo print-ast lambda.ligo -s pascaligo))) (deps lambda.ligo)) +(rule (targets list.ligo_ast) (action (with-stdout-to list.ligo_ast (run ligo print-ast list.ligo -s pascaligo))) (deps list.ligo)) +(rule (targets loop_bugs.ligo_ast) (action (with-stdout-to loop_bugs.ligo_ast (run ligo print-ast loop_bugs.ligo -s pascaligo))) (deps loop_bugs.ligo)) +(rule (targets loop.ligo_ast) (action (with-stdout-to loop.ligo_ast (run ligo print-ast loop.ligo -s pascaligo))) (deps loop.ligo)) +(rule (targets map.ligo_ast) (action (with-stdout-to map.ligo_ast (run ligo print-ast map.ligo -s pascaligo))) (deps map.ligo)) +(rule (targets match.ligo_ast) (action (with-stdout-to match.ligo_ast (run ligo print-ast match.ligo -s pascaligo))) (deps match.ligo)) +(rule (targets michelson_or_tree_intermediary.ligo_ast) (action (with-stdout-to michelson_or_tree_intermediary.ligo_ast (run ligo print-ast michelson_or_tree_intermediary.ligo -s pascaligo))) (deps michelson_or_tree_intermediary.ligo)) +(rule (targets michelson_or_tree.ligo_ast) (action (with-stdout-to michelson_or_tree.ligo_ast (run ligo print-ast michelson_or_tree.ligo -s pascaligo))) (deps michelson_or_tree.ligo)) +(rule (targets michelson_pair_tree_intermediary.ligo_ast) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_ast (run ligo print-ast michelson_pair_tree_intermediary.ligo -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo)) +(rule (targets michelson_pair_tree.ligo_ast) (action (with-stdout-to michelson_pair_tree.ligo_ast (run ligo print-ast michelson_pair_tree.ligo -s pascaligo))) (deps michelson_pair_tree.ligo)) +(rule (targets multiple-parameters.ligo_ast) (action (with-stdout-to multiple-parameters.ligo_ast (run ligo print-ast multiple-parameters.ligo -s pascaligo))) (deps multiple-parameters.ligo)) +(rule (targets multisig-v2.ligo_ast) (action (with-stdout-to multisig-v2.ligo_ast (run ligo print-ast multisig-v2.ligo -s pascaligo))) (deps multisig-v2.ligo)) +(rule (targets multisig.ligo_ast) (action (with-stdout-to multisig.ligo_ast (run ligo print-ast multisig.ligo -s pascaligo))) (deps multisig.ligo)) +(rule (targets option.ligo_ast) (action (with-stdout-to option.ligo_ast (run ligo print-ast option.ligo -s pascaligo))) (deps option.ligo)) +(rule (targets quote-declaration.ligo_ast) (action (with-stdout-to quote-declaration.ligo_ast (run ligo print-ast quote-declaration.ligo -s pascaligo))) (deps quote-declaration.ligo)) +(rule (targets quote-declarations.ligo_ast) (action (with-stdout-to quote-declarations.ligo_ast (run ligo print-ast quote-declarations.ligo -s pascaligo))) (deps quote-declarations.ligo)) +(rule (targets record.ligo_ast) (action (with-stdout-to record.ligo_ast (run ligo print-ast record.ligo -s pascaligo))) (deps record.ligo)) +(rule (targets recursion.ligo_ast) (action (with-stdout-to recursion.ligo_ast (run ligo print-ast recursion.ligo -s pascaligo))) (deps recursion.ligo)) +(rule (targets redeclaration.ligo_ast) (action (with-stdout-to redeclaration.ligo_ast (run ligo print-ast redeclaration.ligo -s pascaligo))) (deps redeclaration.ligo)) +(rule (targets replaceable_id.ligo_ast) (action (with-stdout-to replaceable_id.ligo_ast (run ligo print-ast replaceable_id.ligo -s pascaligo))) (deps replaceable_id.ligo)) +(rule (targets self_address.ligo_ast) (action (with-stdout-to self_address.ligo_ast (run ligo print-ast self_address.ligo -s pascaligo))) (deps self_address.ligo)) +(rule (targets self_type_annotation.ligo_ast) (action (with-stdout-to self_type_annotation.ligo_ast (run ligo print-ast self_type_annotation.ligo -s pascaligo))) (deps self_type_annotation.ligo)) +(rule (targets self_with_entrypoint.ligo_ast) (action (with-stdout-to self_with_entrypoint.ligo_ast (run ligo print-ast self_with_entrypoint.ligo -s pascaligo))) (deps self_with_entrypoint.ligo)) +(rule (targets self_without_entrypoint.ligo_ast) (action (with-stdout-to self_without_entrypoint.ligo_ast (run ligo print-ast self_without_entrypoint.ligo -s pascaligo))) (deps self_without_entrypoint.ligo)) +(rule (targets set_arithmetic-1.ligo_ast) (action (with-stdout-to set_arithmetic-1.ligo_ast (run ligo print-ast set_arithmetic-1.ligo -s pascaligo))) (deps set_arithmetic-1.ligo)) +(rule (targets set_arithmetic.ligo_ast) (action (with-stdout-to set_arithmetic.ligo_ast (run ligo print-ast set_arithmetic.ligo -s pascaligo))) (deps set_arithmetic.ligo)) +(rule (targets set_delegate.ligo_ast) (action (with-stdout-to set_delegate.ligo_ast (run ligo print-ast set_delegate.ligo -s pascaligo))) (deps set_delegate.ligo)) +(rule (targets shadow.ligo_ast) (action (with-stdout-to shadow.ligo_ast (run ligo print-ast shadow.ligo -s pascaligo))) (deps shadow.ligo)) +(rule (targets simple_access.ligo_ast) (action (with-stdout-to simple_access.ligo_ast (run ligo print-ast simple_access.ligo -s pascaligo))) (deps simple_access.ligo)) +(rule (targets string_arithmetic.ligo_ast) (action (with-stdout-to string_arithmetic.ligo_ast (run ligo print-ast string_arithmetic.ligo -s pascaligo))) (deps string_arithmetic.ligo)) +(rule (targets string.ligo_ast) (action (with-stdout-to string.ligo_ast (run ligo print-ast string.ligo -s pascaligo))) (deps string.ligo)) +(rule (targets super-counter.ligo_ast) (action (with-stdout-to super-counter.ligo_ast (run ligo print-ast super-counter.ligo -s pascaligo))) (deps super-counter.ligo)) +(rule (targets tez.ligo_ast) (action (with-stdout-to tez.ligo_ast (run ligo print-ast tez.ligo -s pascaligo))) (deps tez.ligo)) +(rule (targets time-lock.ligo_ast) (action (with-stdout-to time-lock.ligo_ast (run ligo print-ast time-lock.ligo -s pascaligo))) (deps time-lock.ligo)) +(rule (targets timestamp.ligo_ast) (action (with-stdout-to timestamp.ligo_ast (run ligo print-ast timestamp.ligo -s pascaligo))) (deps timestamp.ligo)) +(rule (targets toto.ligo_ast) (action (with-stdout-to toto.ligo_ast (run ligo print-ast toto.ligo -s pascaligo))) (deps toto.ligo)) +(rule (targets tuple.ligo_ast) (action (with-stdout-to tuple.ligo_ast (run ligo print-ast tuple.ligo -s pascaligo))) (deps tuple.ligo)) +(rule (targets type-alias.ligo_ast) (action (with-stdout-to type-alias.ligo_ast (run ligo print-ast type-alias.ligo -s pascaligo))) (deps type-alias.ligo)) +(rule (targets unit.ligo_ast) (action (with-stdout-to unit.ligo_ast (run ligo print-ast unit.ligo -s pascaligo))) (deps unit.ligo)) +(rule (targets variant-matching.ligo_ast) (action (with-stdout-to variant-matching.ligo_ast (run ligo print-ast variant-matching.ligo -s pascaligo))) (deps variant-matching.ligo)) +(rule (targets variant.ligo_ast) (action (with-stdout-to variant.ligo_ast (run ligo print-ast variant.ligo -s pascaligo))) (deps variant.ligo)) +(rule (targets website1.ligo_ast) (action (with-stdout-to website1.ligo_ast (run ligo print-ast website1.ligo -s pascaligo))) (deps website1.ligo)) +(rule (targets website2.ligo_ast) (action (with-stdout-to website2.ligo_ast (run ligo print-ast website2.ligo -s pascaligo))) (deps website2.ligo)) + +;; reasonligo +(rule (targets address.religo_ast_pretty) (action (with-stdout-to address.religo_ast_pretty (run ligo print-ast address.religo_output -s reasonligo))) (deps address.religo_output)) +(rule (targets amount.religo_ast_pretty) (action (with-stdout-to amount.religo_ast_pretty (run ligo print-ast amount.religo_output -s reasonligo))) (deps amount.religo_output)) +(rule (targets arithmetic.religo_ast_pretty) (action (with-stdout-to arithmetic.religo_ast_pretty (run ligo print-ast arithmetic.religo_output -s reasonligo))) (deps arithmetic.religo_output)) +(rule (targets balance_constant.religo_ast_pretty) (action (with-stdout-to balance_constant.religo_ast_pretty (run ligo print-ast balance_constant.religo_output -s reasonligo))) (deps balance_constant.religo_output)) +(rule (targets bitwise_arithmetic.religo_ast_pretty) (action (with-stdout-to bitwise_arithmetic.religo_ast_pretty (run ligo print-ast bitwise_arithmetic.religo_output -s reasonligo))) (deps bitwise_arithmetic.religo_output)) +(rule (targets boolean_operators.religo_ast_pretty) (action (with-stdout-to boolean_operators.religo_ast_pretty (run ligo print-ast boolean_operators.religo_output -s reasonligo))) (deps boolean_operators.religo_output)) +(rule (targets bytes_arithmetic.religo_ast_pretty) (action (with-stdout-to bytes_arithmetic.religo_ast_pretty (run ligo print-ast bytes_arithmetic.religo_output -s reasonligo))) (deps bytes_arithmetic.religo_output)) +(rule (targets bytes_unpack.religo_ast_pretty) (action (with-stdout-to bytes_unpack.religo_ast_pretty (run ligo print-ast bytes_unpack.religo_output -s reasonligo))) (deps bytes_unpack.religo_output)) +(rule (targets check_signature.religo_ast_pretty) (action (with-stdout-to check_signature.religo_ast_pretty (run ligo print-ast check_signature.religo_output -s reasonligo))) (deps check_signature.religo_output)) +(rule (targets closure.religo_ast_pretty) (action (with-stdout-to closure.religo_ast_pretty (run ligo print-ast closure.religo_output -s reasonligo))) (deps closure.religo_output)) +(rule (targets condition-shadowing.religo_ast_pretty) (action (with-stdout-to condition-shadowing.religo_ast_pretty (run ligo print-ast condition-shadowing.religo_output -s reasonligo))) (deps condition-shadowing.religo_output)) +(rule (targets condition.religo_ast_pretty) (action (with-stdout-to condition.religo_ast_pretty (run ligo print-ast condition.religo_output -s reasonligo))) (deps condition.religo_output)) +(rule (targets counter.religo_ast_pretty) (action (with-stdout-to counter.religo_ast_pretty (run ligo print-ast counter.religo_output -s reasonligo))) (deps counter.religo_output)) +(rule (targets crypto.religo_ast_pretty) (action (with-stdout-to crypto.religo_ast_pretty (run ligo print-ast crypto.religo_output -s reasonligo))) (deps crypto.religo_output)) +(rule (targets empty_case.religo_ast_pretty) (action (with-stdout-to empty_case.religo_ast_pretty (run ligo print-ast empty_case.religo_output -s reasonligo))) (deps empty_case.religo_output)) +(rule (targets eq_bool.religo_ast_pretty) (action (with-stdout-to eq_bool.religo_ast_pretty (run ligo print-ast eq_bool.religo_output -s reasonligo))) (deps eq_bool.religo_output)) +(rule (targets function-shared.religo_ast_pretty) (action (with-stdout-to function-shared.religo_ast_pretty (run ligo print-ast function-shared.religo_output -s reasonligo))) (deps function-shared.religo_output)) +(rule (targets high-order.religo_ast_pretty) (action (with-stdout-to high-order.religo_ast_pretty (run ligo print-ast high-order.religo_output -s reasonligo))) (deps high-order.religo_output)) +(rule (targets implicit_account.religo_ast_pretty) (action (with-stdout-to implicit_account.religo_ast_pretty (run ligo print-ast implicit_account.religo_output -s reasonligo))) (deps implicit_account.religo_output)) +(rule (targets included.religo_ast_pretty) (action (with-stdout-to included.religo_ast_pretty (run ligo print-ast included.religo_output -s reasonligo))) (deps included.religo_output)) +(rule (targets includer.religo_ast_pretty) (action (with-stdout-to includer.religo_ast_pretty (run ligo print-ast includer.religo_output -s reasonligo))) (deps includer.religo_output)) +(rule (targets key_hash.religo_ast_pretty) (action (with-stdout-to key_hash.religo_ast_pretty (run ligo print-ast key_hash.religo_output -s reasonligo))) (deps key_hash.religo_output)) +(rule (targets lambda.religo_ast_pretty) (action (with-stdout-to lambda.religo_ast_pretty (run ligo print-ast lambda.religo_output -s reasonligo))) (deps lambda.religo_output)) +(rule (targets lambda2.religo_ast_pretty) (action (with-stdout-to lambda2.religo_ast_pretty (run ligo print-ast lambda2.religo_output -s reasonligo))) (deps lambda2.religo_output)) +(rule (targets let_multiple.religo_ast_pretty) (action (with-stdout-to let_multiple.religo_ast_pretty (run ligo print-ast let_multiple.religo_output -s reasonligo))) (deps let_multiple.religo_output)) +(rule (targets letin.religo_ast_pretty) (action (with-stdout-to letin.religo_ast_pretty (run ligo print-ast letin.religo_output -s reasonligo))) (deps letin.religo_output)) +(rule (targets list.religo_ast_pretty) (action (with-stdout-to list.religo_ast_pretty (run ligo print-ast list.religo_output -s reasonligo))) (deps list.religo_output)) +(rule (targets loop.religo_ast_pretty) (action (with-stdout-to loop.religo_ast_pretty (run ligo print-ast loop.religo_output -s reasonligo))) (deps loop.religo_output)) +(rule (targets map.religo_ast_pretty) (action (with-stdout-to map.religo_ast_pretty (run ligo print-ast map.religo_output -s reasonligo))) (deps map.religo_output)) +(rule (targets match_bis.religo_ast_pretty) (action (with-stdout-to match_bis.religo_ast_pretty (run ligo print-ast match_bis.religo_output -s reasonligo))) (deps match_bis.religo_output)) +(rule (targets match.religo_ast_pretty) (action (with-stdout-to match.religo_ast_pretty (run ligo print-ast match.religo_output -s reasonligo))) (deps match.religo_output)) +(rule (targets michelson_pair_tree.religo_ast_pretty) (action (with-stdout-to michelson_pair_tree.religo_ast_pretty (run ligo print-ast michelson_pair_tree.religo_output -s reasonligo))) (deps michelson_pair_tree.religo_output)) +(rule (targets multiple-parameters.religo_ast_pretty) (action (with-stdout-to multiple-parameters.religo_ast_pretty (run ligo print-ast multiple-parameters.religo_output -s reasonligo))) (deps multiple-parameters.religo_output)) +(rule (targets multisig.religo_ast_pretty) (action (with-stdout-to multisig.religo_ast_pretty (run ligo print-ast multisig.religo_output -s reasonligo))) (deps multisig.religo_output)) +(rule (targets no_semicolon.religo_ast_pretty) (action (with-stdout-to no_semicolon.religo_ast_pretty (run ligo print-ast no_semicolon.religo_output -s reasonligo))) (deps no_semicolon.religo_output)) +(rule (targets pledge.religo_ast_pretty) (action (with-stdout-to pledge.religo_ast_pretty (run ligo print-ast pledge.religo_output -s reasonligo))) (deps pledge.religo_output)) +(rule (targets record.religo_ast_pretty) (action (with-stdout-to record.religo_ast_pretty (run ligo print-ast record.religo_output -s reasonligo))) (deps record.religo_output)) +(rule (targets recursion.religo_ast_pretty) (action (with-stdout-to recursion.religo_ast_pretty (run ligo print-ast recursion.religo_output -s reasonligo))) (deps recursion.religo_output)) +(rule (targets self_address.religo_ast_pretty) (action (with-stdout-to self_address.religo_ast_pretty (run ligo print-ast self_address.religo_output -s reasonligo))) (deps self_address.religo_output)) +(rule (targets set_arithmetic.religo_ast_pretty) (action (with-stdout-to set_arithmetic.religo_ast_pretty (run ligo print-ast set_arithmetic.religo_output -s reasonligo))) (deps set_arithmetic.religo_output)) +(rule (targets set_delegate.religo_ast_pretty) (action (with-stdout-to set_delegate.religo_ast_pretty (run ligo print-ast set_delegate.religo_output -s reasonligo))) (deps set_delegate.religo_output)) +(rule (targets single_record_item.religo_ast_pretty) (action (with-stdout-to single_record_item.religo_ast_pretty (run ligo print-ast single_record_item.religo_output -s reasonligo))) (deps single_record_item.religo_output)) +(rule (targets string_arithmetic.religo_ast_pretty) (action (with-stdout-to string_arithmetic.religo_ast_pretty (run ligo print-ast string_arithmetic.religo_output -s reasonligo))) (deps string_arithmetic.religo_output)) +(rule (targets super-counter.religo_ast_pretty) (action (with-stdout-to super-counter.religo_ast_pretty (run ligo print-ast super-counter.religo_output -s reasonligo))) (deps super-counter.religo_output)) +(rule (targets tuple_list.religo_ast_pretty) (action (with-stdout-to tuple_list.religo_ast_pretty (run ligo print-ast tuple_list.religo_output -s reasonligo))) (deps tuple_list.religo_output)) +(rule (targets tuple_param_destruct.religo_ast_pretty) (action (with-stdout-to tuple_param_destruct.religo_ast_pretty (run ligo print-ast tuple_param_destruct.religo_output -s reasonligo))) (deps tuple_param_destruct.religo_output)) +(rule (targets tuple_type.religo_ast_pretty) (action (with-stdout-to tuple_type.religo_ast_pretty (run ligo print-ast tuple_type.religo_output -s reasonligo))) (deps tuple_type.religo_output)) +(rule (targets tuple.religo_ast_pretty) (action (with-stdout-to tuple.religo_ast_pretty (run ligo print-ast tuple.religo_output -s reasonligo))) (deps tuple.religo_output)) +(rule (targets tuples_no_annotation.religo_ast_pretty) (action (with-stdout-to tuples_no_annotation.religo_ast_pretty (run ligo print-ast tuples_no_annotation.religo_output -s reasonligo))) (deps tuples_no_annotation.religo_output)) +(rule (targets tuples_sequences_functions.religo_ast_pretty) (action (with-stdout-to tuples_sequences_functions.religo_ast_pretty (run ligo print-ast tuples_sequences_functions.religo_output -s reasonligo))) (deps tuples_sequences_functions.religo_output)) +(rule (targets variant.religo_ast_pretty) (action (with-stdout-to variant.religo_ast_pretty (run ligo print-ast variant.religo_output -s reasonligo))) (deps variant.religo_output)) +(rule (targets website2.religo_ast_pretty) (action (with-stdout-to website2.religo_ast_pretty (run ligo print-ast website2.religo_output -s reasonligo))) (deps website2.religo_output)) + +;; cameligo +(rule (targets assert.mligo_ast_pretty) (action (with-stdout-to assert.mligo_ast_pretty (run ligo print-ast assert.mligo_output -s cameligo))) (deps assert.mligo_output)) +(rule (targets address.mligo_ast_pretty) (action (with-stdout-to address.mligo_ast_pretty (run ligo print-ast address.mligo_output -s cameligo))) (deps address.mligo_output)) +(rule (targets amount_lambda.mligo_ast_pretty) (action (with-stdout-to amount_lambda.mligo_ast_pretty (run ligo print-ast amount_lambda.mligo_output -s cameligo))) (deps amount_lambda.mligo_output)) +(rule (targets amount.mligo_ast_pretty) (action (with-stdout-to amount.mligo_ast_pretty (run ligo print-ast amount.mligo_output -s cameligo))) (deps amount.mligo_output)) +(rule (targets arithmetic.mligo_ast_pretty) (action (with-stdout-to arithmetic.mligo_ast_pretty (run ligo print-ast arithmetic.mligo_output -s cameligo))) (deps arithmetic.mligo_output)) +(rule (targets attributes.mligo_ast_pretty) (action (with-stdout-to attributes.mligo_ast_pretty (run ligo print-ast attributes.mligo_output -s cameligo))) (deps attributes.mligo_output)) +(rule (targets balance_constant.mligo_ast_pretty) (action (with-stdout-to balance_constant.mligo_ast_pretty (run ligo print-ast balance_constant.mligo_output -s cameligo))) (deps balance_constant.mligo_output)) +(rule (targets basic.mligo_ast_pretty) (action (with-stdout-to basic.mligo_ast_pretty (run ligo print-ast basic.mligo_output -s cameligo))) (deps basic.mligo_output)) +(rule (targets big_map.mligo_ast_pretty) (action (with-stdout-to big_map.mligo_ast_pretty (run ligo print-ast big_map.mligo_output -s cameligo))) (deps big_map.mligo_output)) +(rule (targets bitwise_arithmetic.mligo_ast_pretty) (action (with-stdout-to bitwise_arithmetic.mligo_ast_pretty (run ligo print-ast bitwise_arithmetic.mligo_output -s cameligo))) (deps bitwise_arithmetic.mligo_output)) +(rule (targets boolean_operators.mligo_ast_pretty) (action (with-stdout-to boolean_operators.mligo_ast_pretty (run ligo print-ast boolean_operators.mligo_output -s cameligo))) (deps boolean_operators.mligo_output)) +(rule (targets bytes_arithmetic.mligo_ast_pretty) (action (with-stdout-to bytes_arithmetic.mligo_ast_pretty (run ligo print-ast bytes_arithmetic.mligo_output -s cameligo))) (deps bytes_arithmetic.mligo_output)) +(rule (targets bytes_unpack.mligo_ast_pretty) (action (with-stdout-to bytes_unpack.mligo_ast_pretty (run ligo print-ast bytes_unpack.mligo_output -s cameligo))) (deps bytes_unpack.mligo_output)) +(rule (targets check_signature.mligo_ast_pretty) (action (with-stdout-to check_signature.mligo_ast_pretty (run ligo print-ast check_signature.mligo_output -s cameligo))) (deps check_signature.mligo_output)) +(rule (targets closure.mligo_ast_pretty) (action (with-stdout-to closure.mligo_ast_pretty (run ligo print-ast closure.mligo_output -s cameligo))) (deps closure.mligo_output)) +(rule (targets comparable.mligo_ast_pretty) (action (with-stdout-to comparable.mligo_ast_pretty (run ligo print-ast comparable.mligo_output -s cameligo))) (deps comparable.mligo_output)) +(rule (targets condition-annot.mligo_ast_pretty) (action (with-stdout-to condition-annot.mligo_ast_pretty (run ligo print-ast condition-annot.mligo_output -s cameligo))) (deps condition-annot.mligo_output)) +(rule (targets condition-shadowing.mligo_ast_pretty) (action (with-stdout-to condition-shadowing.mligo_ast_pretty (run ligo print-ast condition-shadowing.mligo_output -s cameligo))) (deps condition-shadowing.mligo_output)) +(rule (targets condition.mligo_ast_pretty) (action (with-stdout-to condition.mligo_ast_pretty (run ligo print-ast condition.mligo_output -s cameligo))) (deps condition.mligo_output)) +(rule (targets counter.mligo_ast_pretty) (action (with-stdout-to counter.mligo_ast_pretty (run ligo print-ast counter.mligo_output -s cameligo))) (deps counter.mligo_output)) +(rule (targets create_contract.mligo_ast_pretty) (action (with-stdout-to create_contract.mligo_ast_pretty (run ligo print-ast create_contract.mligo_output -s cameligo))) (deps create_contract.mligo_output)) +(rule (targets crypto.mligo_ast_pretty) (action (with-stdout-to crypto.mligo_ast_pretty (run ligo print-ast crypto.mligo_output -s cameligo))) (deps crypto.mligo_output)) +(rule (targets curry.mligo_ast_pretty) (action (with-stdout-to curry.mligo_ast_pretty (run ligo print-ast curry.mligo_output -s cameligo))) (deps curry.mligo_output)) +(rule (targets double_michelson_or.mligo_ast_pretty) (action (with-stdout-to double_michelson_or.mligo_ast_pretty (run ligo print-ast double_michelson_or.mligo_output -s cameligo))) (deps double_michelson_or.mligo_output)) +(rule (targets empty_case.mligo_ast_pretty) (action (with-stdout-to empty_case.mligo_ast_pretty (run ligo print-ast empty_case.mligo_output -s cameligo))) (deps empty_case.mligo_output)) +(rule (targets eq_bool.mligo_ast_pretty) (action (with-stdout-to eq_bool.mligo_ast_pretty (run ligo print-ast eq_bool.mligo_output -s cameligo))) (deps eq_bool.mligo_output)) +(rule (targets FA1.2.mligo_ast_pretty) (action (with-stdout-to FA1.2.mligo_ast_pretty (run ligo print-ast FA1.2.mligo_output -s cameligo))) (deps FA1.2.mligo_output)) +(rule (targets failwith.mligo_ast_pretty) (action (with-stdout-to failwith.mligo_ast_pretty (run ligo print-ast failwith.mligo_output -s cameligo))) (deps failwith.mligo_output)) +(rule (targets fibo.mligo_ast_pretty) (action (with-stdout-to fibo.mligo_ast_pretty (run ligo print-ast fibo.mligo_output -s cameligo))) (deps fibo.mligo_output)) +(rule (targets fibo2.mligo_ast_pretty) (action (with-stdout-to fibo2.mligo_ast_pretty (run ligo print-ast fibo2.mligo_output -s cameligo))) (deps fibo2.mligo_output)) +(rule (targets fibo3.mligo_ast_pretty) (action (with-stdout-to fibo3.mligo_ast_pretty (run ligo print-ast fibo3.mligo_output -s cameligo))) (deps fibo3.mligo_output)) +(rule (targets fibo4.mligo_ast_pretty) (action (with-stdout-to fibo4.mligo_ast_pretty (run ligo print-ast fibo4.mligo_output -s cameligo))) (deps fibo4.mligo_output)) +(rule (targets function-shared.mligo_ast_pretty) (action (with-stdout-to function-shared.mligo_ast_pretty (run ligo print-ast function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output)) +(rule (targets guess_string.mligo_ast_pretty) (action (with-stdout-to guess_string.mligo_ast_pretty (run ligo print-ast guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output)) +;; pascaligo +(rule (targets address.ligo_ast_pretty) (action (with-stdout-to address.ligo_ast_pretty (run ligo print-ast address.ligo_output -s pascaligo))) (deps address.ligo_output)) +(rule (targets amount.ligo_ast_pretty) (action (with-stdout-to amount.ligo_ast_pretty (run ligo print-ast amount.ligo_output -s pascaligo))) (deps amount.ligo_output)) +(rule (targets annotation.ligo_ast_pretty) (action (with-stdout-to annotation.ligo_ast_pretty (run ligo print-ast annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output)) +(rule (targets application.ligo_ast_pretty) (action (with-stdout-to application.ligo_ast_pretty (run ligo print-ast application.ligo_output -s pascaligo))) (deps application.ligo_output)) +(rule (targets arithmetic.ligo_ast_pretty) (action (with-stdout-to arithmetic.ligo_ast_pretty (run ligo print-ast arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output)) +(rule (targets assign.ligo_ast_pretty) (action (with-stdout-to assign.ligo_ast_pretty (run ligo print-ast assign.ligo_output -s pascaligo))) (deps assign.ligo_output)) +(rule (targets attributes.ligo_ast_pretty) (action (with-stdout-to attributes.ligo_ast_pretty (run ligo print-ast attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output)) +(rule (targets bad_type_operator.ligo_ast_pretty) (action (with-stdout-to bad_type_operator.ligo_ast_pretty (run ligo print-ast bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output)) +(rule (targets balance_constant.ligo_ast_pretty) (action (with-stdout-to balance_constant.ligo_ast_pretty (run ligo print-ast balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output)) +(rule (targets big_map.ligo_ast_pretty) (action (with-stdout-to big_map.ligo_ast_pretty (run ligo print-ast big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output)) +(rule (targets bitwise_arithmetic.ligo_ast_pretty) (action (with-stdout-to bitwise_arithmetic.ligo_ast_pretty (run ligo print-ast bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output)) +(rule (targets blockless.ligo_ast_pretty) (action (with-stdout-to blockless.ligo_ast_pretty (run ligo print-ast blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output)) +(rule (targets boolean_operators.ligo_ast_pretty) (action (with-stdout-to boolean_operators.ligo_ast_pretty (run ligo print-ast boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output)) +(rule (targets bytes_arithmetic.ligo_ast_pretty) (action (with-stdout-to bytes_arithmetic.ligo_ast_pretty (run ligo print-ast bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output)) +(rule (targets bytes_unpack.ligo_ast_pretty) (action (with-stdout-to bytes_unpack.ligo_ast_pretty (run ligo print-ast bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output)) +(rule (targets chain_id.ligo_ast_pretty) (action (with-stdout-to chain_id.ligo_ast_pretty (run ligo print-ast chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output)) +(rule (targets check_signature.ligo_ast_pretty) (action (with-stdout-to check_signature.ligo_ast_pretty (run ligo print-ast check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output)) +(rule (targets closure-1.ligo_ast_pretty) (action (with-stdout-to closure-1.ligo_ast_pretty (run ligo print-ast closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output)) +(rule (targets closure-2.ligo_ast_pretty) (action (with-stdout-to closure-2.ligo_ast_pretty (run ligo print-ast closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output)) +(rule (targets closure-3.ligo_ast_pretty) (action (with-stdout-to closure-3.ligo_ast_pretty (run ligo print-ast closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output)) +(rule (targets closure.ligo_ast_pretty) (action (with-stdout-to closure.ligo_ast_pretty (run ligo print-ast closure.ligo_output -s pascaligo))) (deps closure.ligo_output)) +(rule (targets coase.ligo_ast_pretty) (action (with-stdout-to coase.ligo_ast_pretty (run ligo print-ast coase.ligo_output -s pascaligo))) (deps coase.ligo_output)) +(rule (targets condition-simple.ligo_ast_pretty) (action (with-stdout-to condition-simple.ligo_ast_pretty (run ligo print-ast condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output)) +(rule (targets condition.ligo_ast_pretty) (action (with-stdout-to condition.ligo_ast_pretty (run ligo print-ast condition.ligo_output -s pascaligo))) (deps condition.ligo_output)) +(rule (targets counter.ligo_ast_pretty) (action (with-stdout-to counter.ligo_ast_pretty (run ligo print-ast counter.ligo_output -s pascaligo))) (deps counter.ligo_output)) +(rule (targets crypto.ligo_ast_pretty) (action (with-stdout-to crypto.ligo_ast_pretty (run ligo print-ast crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output)) +(rule (targets declaration-local.ligo_ast_pretty) (action (with-stdout-to declaration-local.ligo_ast_pretty (run ligo print-ast declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output)) +(rule (targets declarations.ligo_ast_pretty) (action (with-stdout-to declarations.ligo_ast_pretty (run ligo print-ast declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output)) +(rule (targets deep_access.ligo_ast_pretty) (action (with-stdout-to deep_access.ligo_ast_pretty (run ligo print-ast deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output)) +(rule (targets dispatch-counter.ligo_ast_pretty) (action (with-stdout-to dispatch-counter.ligo_ast_pretty (run ligo print-ast dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output)) +(rule (targets double_main.ligo_ast_pretty) (action (with-stdout-to double_main.ligo_ast_pretty (run ligo print-ast double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output)) +(rule (targets double_michelson_or.ligo_ast_pretty) (action (with-stdout-to double_michelson_or.ligo_ast_pretty (run ligo print-ast double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output)) +(rule (targets empty_case.ligo_ast_pretty) (action (with-stdout-to empty_case.ligo_ast_pretty (run ligo print-ast empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output)) +(rule (targets entrypoints.ligo_ast_pretty) (action (with-stdout-to entrypoints.ligo_ast_pretty (run ligo print-ast entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output)) +(rule (targets eq_bool.ligo_ast_pretty) (action (with-stdout-to eq_bool.ligo_ast_pretty (run ligo print-ast eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output)) +(rule (targets evaluation_tests.ligo_ast_pretty) (action (with-stdout-to evaluation_tests.ligo_ast_pretty (run ligo print-ast evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output)) +(rule (targets FA1.2.ligo_ast_pretty) (action (with-stdout-to FA1.2.ligo_ast_pretty (run ligo print-ast FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output)) +(rule (targets failwith.ligo_ast_pretty) (action (with-stdout-to failwith.ligo_ast_pretty (run ligo print-ast failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output)) +(rule (targets for_fail.ligo_ast_pretty) (action (with-stdout-to for_fail.ligo_ast_pretty (run ligo print-ast for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output)) +(rule (targets function-anon.ligo_ast_pretty) (action (with-stdout-to function-anon.ligo_ast_pretty (run ligo print-ast function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output)) +(rule (targets function-complex.ligo_ast_pretty) (action (with-stdout-to function-complex.ligo_ast_pretty (run ligo print-ast function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output)) +(rule (targets function-shared.ligo_ast_pretty) (action (with-stdout-to function-shared.ligo_ast_pretty (run ligo print-ast function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output)) +(rule (targets function.ligo_ast_pretty) (action (with-stdout-to function.ligo_ast_pretty (run ligo print-ast function.ligo_output -s pascaligo))) (deps function.ligo_output)) +(rule (targets get_contract.ligo_ast_pretty) (action (with-stdout-to get_contract.ligo_ast_pretty (run ligo print-ast get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output)) +(rule (targets high-order.ligo_ast_pretty) (action (with-stdout-to high-order.ligo_ast_pretty (run ligo print-ast high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output)) +(rule (targets id.ligo_ast_pretty) (action (with-stdout-to id.ligo_ast_pretty (run ligo print-ast id.ligo_output -s pascaligo))) (deps id.ligo_output)) +(rule (targets implicit_account.ligo_ast_pretty) (action (with-stdout-to implicit_account.ligo_ast_pretty (run ligo print-ast implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output)) +(rule (targets included.ligo_ast_pretty) (action (with-stdout-to included.ligo_ast_pretty (run ligo print-ast included.ligo_output -s pascaligo))) (deps included.ligo_output)) +(rule (targets includer.ligo_ast_pretty) (action (with-stdout-to includer.ligo_ast_pretty (run ligo print-ast includer.ligo_output -s pascaligo))) (deps includer.ligo_output)) +(rule (targets isnat.ligo_ast_pretty) (action (with-stdout-to isnat.ligo_ast_pretty (run ligo print-ast isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output)) +(rule (targets key_hash_comparable.ligo_ast_pretty) (action (with-stdout-to key_hash_comparable.ligo_ast_pretty (run ligo print-ast key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output)) +(rule (targets key_hash.ligo_ast_pretty) (action (with-stdout-to key_hash.ligo_ast_pretty (run ligo print-ast key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output)) +(rule (targets lambda.ligo_ast_pretty) (action (with-stdout-to lambda.ligo_ast_pretty (run ligo print-ast lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output)) +(rule (targets list.ligo_ast_pretty) (action (with-stdout-to list.ligo_ast_pretty (run ligo print-ast list.ligo_output -s pascaligo))) (deps list.ligo_output)) +(rule (targets loop_bugs.ligo_ast_pretty) (action (with-stdout-to loop_bugs.ligo_ast_pretty (run ligo print-ast loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output)) +(rule (targets loop.ligo_ast_pretty) (action (with-stdout-to loop.ligo_ast_pretty (run ligo print-ast loop.ligo_output -s pascaligo))) (deps loop.ligo_output)) +(rule (targets map.ligo_ast_pretty) (action (with-stdout-to map.ligo_ast_pretty (run ligo print-ast map.ligo_output -s pascaligo))) (deps map.ligo_output)) +(rule (targets match.ligo_ast_pretty) (action (with-stdout-to match.ligo_ast_pretty (run ligo print-ast match.ligo_output -s pascaligo))) (deps match.ligo_output)) +(rule (targets michelson_or_tree_intermediary.ligo_ast_pretty) (action (with-stdout-to michelson_or_tree_intermediary.ligo_ast_pretty (run ligo print-ast michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output)) +(rule (targets michelson_or_tree.ligo_ast_pretty) (action (with-stdout-to michelson_or_tree.ligo_ast_pretty (run ligo print-ast michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output)) +(rule (targets michelson_pair_tree_intermediary.ligo_ast_pretty) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_ast_pretty (run ligo print-ast michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output)) +(rule (targets michelson_pair_tree.ligo_ast_pretty) (action (with-stdout-to michelson_pair_tree.ligo_ast_pretty (run ligo print-ast michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output)) +(rule (targets multiple-parameters.ligo_ast_pretty) (action (with-stdout-to multiple-parameters.ligo_ast_pretty (run ligo print-ast multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output)) +(rule (targets multisig-v2.ligo_ast_pretty) (action (with-stdout-to multisig-v2.ligo_ast_pretty (run ligo print-ast multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output)) +(rule (targets multisig.ligo_ast_pretty) (action (with-stdout-to multisig.ligo_ast_pretty (run ligo print-ast multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output)) +(rule (targets option.ligo_ast_pretty) (action (with-stdout-to option.ligo_ast_pretty (run ligo print-ast option.ligo_output -s pascaligo))) (deps option.ligo_output)) +(rule (targets quote-declaration.ligo_ast_pretty) (action (with-stdout-to quote-declaration.ligo_ast_pretty (run ligo print-ast quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output)) +(rule (targets quote-declarations.ligo_ast_pretty) (action (with-stdout-to quote-declarations.ligo_ast_pretty (run ligo print-ast quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output)) +(rule (targets record.ligo_ast_pretty) (action (with-stdout-to record.ligo_ast_pretty (run ligo print-ast record.ligo_output -s pascaligo))) (deps record.ligo_output)) +(rule (targets recursion.ligo_ast_pretty) (action (with-stdout-to recursion.ligo_ast_pretty (run ligo print-ast recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output)) +(rule (targets redeclaration.ligo_ast_pretty) (action (with-stdout-to redeclaration.ligo_ast_pretty (run ligo print-ast redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output)) +(rule (targets replaceable_id.ligo_ast_pretty) (action (with-stdout-to replaceable_id.ligo_ast_pretty (run ligo print-ast replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output)) +(rule (targets self_address.ligo_ast_pretty) (action (with-stdout-to self_address.ligo_ast_pretty (run ligo print-ast self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output)) +(rule (targets self_type_annotation.ligo_ast_pretty) (action (with-stdout-to self_type_annotation.ligo_ast_pretty (run ligo print-ast self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output)) +(rule (targets self_with_entrypoint.ligo_ast_pretty) (action (with-stdout-to self_with_entrypoint.ligo_ast_pretty (run ligo print-ast self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output)) +(rule (targets self_without_entrypoint.ligo_ast_pretty) (action (with-stdout-to self_without_entrypoint.ligo_ast_pretty (run ligo print-ast self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output)) +(rule (targets set_arithmetic-1.ligo_ast_pretty) (action (with-stdout-to set_arithmetic-1.ligo_ast_pretty (run ligo print-ast set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output)) +(rule (targets set_arithmetic.ligo_ast_pretty) (action (with-stdout-to set_arithmetic.ligo_ast_pretty (run ligo print-ast set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output)) +(rule (targets set_delegate.ligo_ast_pretty) (action (with-stdout-to set_delegate.ligo_ast_pretty (run ligo print-ast set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output)) +(rule (targets shadow.ligo_ast_pretty) (action (with-stdout-to shadow.ligo_ast_pretty (run ligo print-ast shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output)) +(rule (targets simple_access.ligo_ast_pretty) (action (with-stdout-to simple_access.ligo_ast_pretty (run ligo print-ast simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output)) +(rule (targets string_arithmetic.ligo_ast_pretty) (action (with-stdout-to string_arithmetic.ligo_ast_pretty (run ligo print-ast string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output)) +(rule (targets string.ligo_ast_pretty) (action (with-stdout-to string.ligo_ast_pretty (run ligo print-ast string.ligo_output -s pascaligo))) (deps string.ligo_output)) +(rule (targets super-counter.ligo_ast_pretty) (action (with-stdout-to super-counter.ligo_ast_pretty (run ligo print-ast super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output)) +(rule (targets tez.ligo_ast_pretty) (action (with-stdout-to tez.ligo_ast_pretty (run ligo print-ast tez.ligo_output -s pascaligo))) (deps tez.ligo_output)) +(rule (targets time-lock.ligo_ast_pretty) (action (with-stdout-to time-lock.ligo_ast_pretty (run ligo print-ast time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output)) +(rule (targets timestamp.ligo_ast_pretty) (action (with-stdout-to timestamp.ligo_ast_pretty (run ligo print-ast timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output)) +(rule (targets toto.ligo_ast_pretty) (action (with-stdout-to toto.ligo_ast_pretty (run ligo print-ast toto.ligo_output -s pascaligo))) (deps toto.ligo_output)) +(rule (targets tuple.ligo_ast_pretty) (action (with-stdout-to tuple.ligo_ast_pretty (run ligo print-ast tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output)) +(rule (targets type-alias.ligo_ast_pretty) (action (with-stdout-to type-alias.ligo_ast_pretty (run ligo print-ast type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output)) +(rule (targets unit.ligo_ast_pretty) (action (with-stdout-to unit.ligo_ast_pretty (run ligo print-ast unit.ligo_output -s pascaligo))) (deps unit.ligo_output)) +(rule (targets variant-matching.ligo_ast_pretty) (action (with-stdout-to variant-matching.ligo_ast_pretty (run ligo print-ast variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output)) +(rule (targets variant.ligo_ast_pretty) (action (with-stdout-to variant.ligo_ast_pretty (run ligo print-ast variant.ligo_output -s pascaligo))) (deps variant.ligo_output)) +(rule (targets website1.ligo_ast_pretty) (action (with-stdout-to website1.ligo_ast_pretty (run ligo print-ast website1.ligo_output -s pascaligo))) (deps website1.ligo_output)) +(rule (targets website2.ligo_ast_pretty) (action (with-stdout-to website2.ligo_ast_pretty (run ligo print-ast website2.ligo_output -s pascaligo))) (deps website2.ligo_output)) + + +;; reasonligo +(alias (name runtest) (action (diff address.religo_ast address.religo_ast_pretty)) (deps address.religo_ast address.religo_ast_pretty)) +(alias (name runtest) (action (diff amount.religo_ast amount.religo_ast_pretty)) (deps amount.religo_ast amount.religo_ast_pretty)) +(alias (name runtest) (action (diff arithmetic.religo_ast arithmetic.religo_ast_pretty)) (deps arithmetic.religo_ast arithmetic.religo_ast_pretty)) +(alias (name runtest) (action (diff balance_constant.religo_ast balance_constant.religo_ast_pretty)) (deps balance_constant.religo_ast balance_constant.religo_ast_pretty)) +(alias (name runtest) (action (diff bitwise_arithmetic.religo_ast bitwise_arithmetic.religo_ast_pretty)) (deps bitwise_arithmetic.religo_ast bitwise_arithmetic.religo_ast_pretty)) +(alias (name runtest) (action (diff boolean_operators.religo_ast boolean_operators.religo_ast_pretty)) (deps boolean_operators.religo_ast boolean_operators.religo_ast_pretty)) +(alias (name runtest) (action (diff bytes_arithmetic.religo_ast bytes_arithmetic.religo_ast_pretty)) (deps bytes_arithmetic.religo_ast bytes_arithmetic.religo_ast_pretty)) +(alias (name runtest) (action (diff bytes_unpack.religo_ast bytes_unpack.religo_ast_pretty)) (deps bytes_unpack.religo_ast bytes_unpack.religo_ast_pretty)) +(alias (name runtest) (action (diff check_signature.religo_ast check_signature.religo_ast_pretty)) (deps check_signature.religo_ast check_signature.religo_ast_pretty)) +(alias (name runtest) (action (diff closure.religo_ast closure.religo_ast_pretty)) (deps closure.religo_ast closure.religo_ast_pretty)) +(alias (name runtest) (action (diff condition-shadowing.religo_ast condition-shadowing.religo_ast_pretty)) (deps condition-shadowing.religo_ast condition-shadowing.religo_ast_pretty)) +(alias (name runtest) (action (diff condition.religo_ast condition.religo_ast_pretty)) (deps condition.religo_ast condition.religo_ast_pretty)) +(alias (name runtest) (action (diff counter.religo_ast counter.religo_ast_pretty)) (deps counter.religo_ast counter.religo_ast_pretty)) +(alias (name runtest) (action (diff crypto.religo_ast crypto.religo_ast_pretty)) (deps crypto.religo_ast crypto.religo_ast_pretty)) +(alias (name runtest) (action (diff empty_case.religo_ast empty_case.religo_ast_pretty)) (deps empty_case.religo_ast empty_case.religo_ast_pretty)) +(alias (name runtest) (action (diff eq_bool.religo_ast eq_bool.religo_ast_pretty)) (deps eq_bool.religo_ast eq_bool.religo_ast_pretty)) +(alias (name runtest) (action (diff function-shared.religo_ast function-shared.religo_ast_pretty)) (deps function-shared.religo_ast function-shared.religo_ast_pretty)) +(alias (name runtest) (action (diff high-order.religo_ast high-order.religo_ast_pretty)) (deps high-order.religo_ast high-order.religo_ast_pretty)) +(alias (name runtest) (action (diff implicit_account.religo_ast implicit_account.religo_ast_pretty)) (deps implicit_account.religo_ast implicit_account.religo_ast_pretty)) +(alias (name runtest) (action (diff included.religo_ast included.religo_ast_pretty)) (deps included.religo_ast included.religo_ast_pretty)) +(alias (name runtest) (action (diff includer.religo_ast includer.religo_ast_pretty)) (deps includer.religo_ast includer.religo_ast_pretty)) +(alias (name runtest) (action (diff key_hash.religo_ast key_hash.religo_ast_pretty)) (deps key_hash.religo_ast key_hash.religo_ast_pretty)) +(alias (name runtest) (action (diff lambda.religo_ast lambda.religo_ast_pretty)) (deps lambda.religo_ast lambda.religo_ast_pretty)) +(alias (name runtest) (action (diff lambda2.religo_ast lambda2.religo_ast_pretty)) (deps lambda2.religo_ast lambda2.religo_ast_pretty)) +(alias (name runtest) (action (diff let_multiple.religo_ast let_multiple.religo_ast_pretty)) (deps let_multiple.religo_ast let_multiple.religo_ast_pretty)) +(alias (name runtest) (action (diff letin.religo_ast letin.religo_ast_pretty)) (deps letin.religo_ast letin.religo_ast_pretty)) +(alias (name runtest) (action (diff list.religo_ast list.religo_ast_pretty)) (deps list.religo_ast list.religo_ast_pretty)) +(alias (name runtest) (action (diff loop.religo_ast loop.religo_ast_pretty)) (deps loop.religo_ast loop.religo_ast_pretty)) +(alias (name runtest) (action (diff map.religo_ast map.religo_ast_pretty)) (deps map.religo_ast map.religo_ast_pretty)) +(alias (name runtest) (action (diff match_bis.religo_ast match_bis.religo_ast_pretty)) (deps match_bis.religo_ast match_bis.religo_ast_pretty)) +(alias (name runtest) (action (diff match.religo_ast match.religo_ast_pretty)) (deps match.religo_ast match.religo_ast_pretty)) +(alias (name runtest) (action (diff michelson_pair_tree.religo_ast michelson_pair_tree.religo_ast_pretty)) (deps michelson_pair_tree.religo_ast michelson_pair_tree.religo_ast_pretty)) +(alias (name runtest) (action (diff multiple-parameters.religo_ast multiple-parameters.religo_ast_pretty)) (deps multiple-parameters.religo_ast multiple-parameters.religo_ast_pretty)) +(alias (name runtest) (action (diff multisig.religo_ast multisig.religo_ast_pretty)) (deps multisig.religo_ast multisig.religo_ast_pretty)) +(alias (name runtest) (action (diff no_semicolon.religo_ast no_semicolon.religo_ast_pretty)) (deps no_semicolon.religo_ast no_semicolon.religo_ast_pretty)) +(alias (name runtest) (action (diff pledge.religo_ast pledge.religo_ast_pretty)) (deps pledge.religo_ast pledge.religo_ast_pretty)) +(alias (name runtest) (action (diff record.religo_ast record.religo_ast_pretty)) (deps record.religo_ast record.religo_ast_pretty)) +(alias (name runtest) (action (diff recursion.religo_ast recursion.religo_ast_pretty)) (deps recursion.religo_ast recursion.religo_ast_pretty)) +(alias (name runtest) (action (diff self_address.religo_ast self_address.religo_ast_pretty)) (deps self_address.religo_ast self_address.religo_ast_pretty)) +(alias (name runtest) (action (diff set_arithmetic.religo_ast set_arithmetic.religo_ast_pretty)) (deps set_arithmetic.religo_ast set_arithmetic.religo_ast_pretty)) +(alias (name runtest) (action (diff set_delegate.religo_ast set_delegate.religo_ast_pretty)) (deps set_delegate.religo_ast set_delegate.religo_ast_pretty)) +(alias (name runtest) (action (diff single_record_item.religo_ast single_record_item.religo_ast_pretty)) (deps single_record_item.religo_ast single_record_item.religo_ast_pretty)) +(alias (name runtest) (action (diff string_arithmetic.religo_ast string_arithmetic.religo_ast_pretty)) (deps string_arithmetic.religo_ast string_arithmetic.religo_ast_pretty)) +(alias (name runtest) (action (diff super-counter.religo_ast super-counter.religo_ast_pretty)) (deps super-counter.religo_ast super-counter.religo_ast_pretty)) +(alias (name runtest) (action (diff tuple_list.religo_ast tuple_list.religo_ast_pretty)) (deps tuple_list.religo_ast tuple_list.religo_ast_pretty)) +(alias (name runtest) (action (diff tuple_param_destruct.religo_ast tuple_param_destruct.religo_ast_pretty)) (deps tuple_param_destruct.religo_ast tuple_param_destruct.religo_ast_pretty)) +(alias (name runtest) (action (diff tuple_type.religo_ast tuple_type.religo_ast_pretty)) (deps tuple_type.religo_ast tuple_type.religo_ast_pretty)) +(alias (name runtest) (action (diff tuple.religo_ast tuple.religo_ast_pretty)) (deps tuple.religo_ast tuple.religo_ast_pretty)) +(alias (name runtest) (action (diff tuples_no_annotation.religo_ast tuples_no_annotation.religo_ast_pretty)) (deps tuples_no_annotation.religo_ast tuples_no_annotation.religo_ast_pretty)) +(alias (name runtest) (action (diff tuples_sequences_functions.religo_ast tuples_sequences_functions.religo_ast_pretty)) (deps tuples_sequences_functions.religo_ast tuples_sequences_functions.religo_ast_pretty)) +(alias (name runtest) (action (diff variant.religo_ast variant.religo_ast_pretty)) (deps variant.religo_ast variant.religo_ast_pretty)) +(alias (name runtest) (action (diff website2.religo_ast website2.religo_ast_pretty)) (deps website2.religo_ast website2.religo_ast_pretty)) +;; cameligo +(alias (name runtest) (action (diff assert.mligo_ast assert.mligo_ast_pretty)) (deps assert.mligo_ast assert.mligo_ast_pretty)) +(alias (name runtest) (action (diff address.mligo_ast address.mligo_ast_pretty)) (deps address.mligo_ast address.mligo_ast_pretty)) +(alias (name runtest) (action (diff amount_lambda.mligo_ast amount_lambda.mligo_ast_pretty)) (deps amount_lambda.mligo_ast amount_lambda.mligo_ast_pretty)) +(alias (name runtest) (action (diff amount.mligo_ast amount.mligo_ast_pretty)) (deps amount.mligo_ast amount.mligo_ast_pretty)) +(alias (name runtest) (action (diff arithmetic.mligo_ast arithmetic.mligo_ast_pretty)) (deps arithmetic.mligo_ast arithmetic.mligo_ast_pretty)) +(alias (name runtest) (action (diff attributes.mligo_ast attributes.mligo_ast_pretty)) (deps attributes.mligo_ast attributes.mligo_ast_pretty)) +(alias (name runtest) (action (diff balance_constant.mligo_ast balance_constant.mligo_ast_pretty)) (deps balance_constant.mligo_ast balance_constant.mligo_ast_pretty)) +(alias (name runtest) (action (diff basic.mligo_ast basic.mligo_ast_pretty)) (deps basic.mligo_ast basic.mligo_ast_pretty)) +(alias (name runtest) (action (diff big_map.mligo_ast big_map.mligo_ast_pretty)) (deps big_map.mligo_ast big_map.mligo_ast_pretty)) +(alias (name runtest) (action (diff bitwise_arithmetic.mligo_ast bitwise_arithmetic.mligo_ast_pretty)) (deps bitwise_arithmetic.mligo_ast bitwise_arithmetic.mligo_ast_pretty)) +(alias (name runtest) (action (diff boolean_operators.mligo_ast boolean_operators.mligo_ast_pretty)) (deps boolean_operators.mligo_ast boolean_operators.mligo_ast_pretty)) +(alias (name runtest) (action (diff bytes_arithmetic.mligo_ast bytes_arithmetic.mligo_ast_pretty)) (deps bytes_arithmetic.mligo_ast bytes_arithmetic.mligo_ast_pretty)) +(alias (name runtest) (action (diff bytes_unpack.mligo_ast bytes_unpack.mligo_ast_pretty)) (deps bytes_unpack.mligo_ast bytes_unpack.mligo_ast_pretty)) +(alias (name runtest) (action (diff check_signature.mligo_ast check_signature.mligo_ast_pretty)) (deps check_signature.mligo_ast check_signature.mligo_ast_pretty)) +(alias (name runtest) (action (diff closure.mligo_ast closure.mligo_ast_pretty)) (deps closure.mligo_ast closure.mligo_ast_pretty)) +(alias (name runtest) (action (diff comparable.mligo_ast comparable.mligo_ast_pretty)) (deps comparable.mligo_ast comparable.mligo_ast_pretty)) +(alias (name runtest) (action (diff condition-annot.mligo_ast condition-annot.mligo_ast_pretty)) (deps condition-annot.mligo_ast condition-annot.mligo_ast_pretty)) +(alias (name runtest) (action (diff condition-shadowing.mligo_ast condition-shadowing.mligo_ast_pretty)) (deps condition-shadowing.mligo_ast condition-shadowing.mligo_ast_pretty)) +(alias (name runtest) (action (diff condition.mligo_ast condition.mligo_ast_pretty)) (deps condition.mligo_ast condition.mligo_ast_pretty)) +(alias (name runtest) (action (diff counter.mligo_ast counter.mligo_ast_pretty)) (deps counter.mligo_ast counter.mligo_ast_pretty)) +(alias (name runtest) (action (diff create_contract.mligo_ast create_contract.mligo_ast_pretty)) (deps create_contract.mligo_ast create_contract.mligo_ast_pretty)) +(alias (name runtest) (action (diff crypto.mligo_ast crypto.mligo_ast_pretty)) (deps crypto.mligo_ast crypto.mligo_ast_pretty)) +(alias (name runtest) (action (diff curry.mligo_ast curry.mligo_ast_pretty)) (deps curry.mligo_ast curry.mligo_ast_pretty)) +(alias (name runtest) (action (diff double_michelson_or.mligo_ast double_michelson_or.mligo_ast_pretty)) (deps double_michelson_or.mligo_ast double_michelson_or.mligo_ast_pretty)) +(alias (name runtest) (action (diff empty_case.mligo_ast empty_case.mligo_ast_pretty)) (deps empty_case.mligo_ast empty_case.mligo_ast_pretty)) +(alias (name runtest) (action (diff eq_bool.mligo_ast eq_bool.mligo_ast_pretty)) (deps eq_bool.mligo_ast eq_bool.mligo_ast_pretty)) +(alias (name runtest) (action (diff FA1.2.mligo_ast FA1.2.mligo_ast_pretty)) (deps FA1.2.mligo_ast FA1.2.mligo_ast_pretty)) +(alias (name runtest) (action (diff failwith.mligo_ast failwith.mligo_ast_pretty)) (deps failwith.mligo_ast failwith.mligo_ast_pretty)) +(alias (name runtest) (action (diff fibo.mligo_ast fibo.mligo_ast_pretty)) (deps fibo.mligo_ast fibo.mligo_ast_pretty)) +(alias (name runtest) (action (diff fibo2.mligo_ast fibo2.mligo_ast_pretty)) (deps fibo2.mligo_ast fibo2.mligo_ast_pretty)) +(alias (name runtest) (action (diff fibo3.mligo_ast fibo3.mligo_ast_pretty)) (deps fibo3.mligo_ast fibo3.mligo_ast_pretty)) +(alias (name runtest) (action (diff fibo4.mligo_ast fibo4.mligo_ast_pretty)) (deps fibo4.mligo_ast fibo4.mligo_ast_pretty)) +(alias (name runtest) (action (diff function-shared.mligo_ast function-shared.mligo_ast_pretty)) (deps function-shared.mligo_ast function-shared.mligo_ast_pretty)) +(alias (name runtest) (action (diff guess_string.mligo_ast guess_string.mligo_ast_pretty)) (deps guess_string.mligo_ast guess_string.mligo_ast_pretty)) +;; pascaligo +(alias (name runtest) (action (diff address.ligo_ast address.ligo_ast_pretty)) (deps address.ligo_ast address.ligo_ast_pretty)) +(alias (name runtest) (action (diff amount.ligo_ast amount.ligo_ast_pretty)) (deps amount.ligo_ast amount.ligo_ast_pretty)) +(alias (name runtest) (action (diff annotation.ligo_ast annotation.ligo_ast_pretty)) (deps annotation.ligo_ast annotation.ligo_ast_pretty)) +(alias (name runtest) (action (diff application.ligo_ast application.ligo_ast_pretty)) (deps application.ligo_ast application.ligo_ast_pretty)) +(alias (name runtest) (action (diff arithmetic.ligo_ast arithmetic.ligo_ast_pretty)) (deps arithmetic.ligo_ast arithmetic.ligo_ast_pretty)) +(alias (name runtest) (action (diff assign.ligo_ast assign.ligo_ast_pretty)) (deps assign.ligo_ast assign.ligo_ast_pretty)) +(alias (name runtest) (action (diff attributes.ligo_ast attributes.ligo_ast_pretty)) (deps attributes.ligo_ast attributes.ligo_ast_pretty)) +(alias (name runtest) (action (diff bad_type_operator.ligo_ast bad_type_operator.ligo_ast_pretty)) (deps bad_type_operator.ligo_ast bad_type_operator.ligo_ast_pretty)) +(alias (name runtest) (action (diff balance_constant.ligo_ast balance_constant.ligo_ast_pretty)) (deps balance_constant.ligo_ast balance_constant.ligo_ast_pretty)) +(alias (name runtest) (action (diff big_map.ligo_ast big_map.ligo_ast_pretty)) (deps big_map.ligo_ast big_map.ligo_ast_pretty)) +(alias (name runtest) (action (diff bitwise_arithmetic.ligo_ast bitwise_arithmetic.ligo_ast_pretty)) (deps bitwise_arithmetic.ligo_ast bitwise_arithmetic.ligo_ast_pretty)) +(alias (name runtest) (action (diff blockless.ligo_ast blockless.ligo_ast_pretty)) (deps blockless.ligo_ast blockless.ligo_ast_pretty)) +(alias (name runtest) (action (diff boolean_operators.ligo_ast boolean_operators.ligo_ast_pretty)) (deps boolean_operators.ligo_ast boolean_operators.ligo_ast_pretty)) +(alias (name runtest) (action (diff bytes_arithmetic.ligo_ast bytes_arithmetic.ligo_ast_pretty)) (deps bytes_arithmetic.ligo_ast bytes_arithmetic.ligo_ast_pretty)) +(alias (name runtest) (action (diff bytes_unpack.ligo_ast bytes_unpack.ligo_ast_pretty)) (deps bytes_unpack.ligo_ast bytes_unpack.ligo_ast_pretty)) +(alias (name runtest) (action (diff chain_id.ligo_ast chain_id.ligo_ast_pretty)) (deps chain_id.ligo_ast chain_id.ligo_ast_pretty)) +(alias (name runtest) (action (diff check_signature.ligo_ast check_signature.ligo_ast_pretty)) (deps check_signature.ligo_ast check_signature.ligo_ast_pretty)) +(alias (name runtest) (action (diff closure-1.ligo_ast closure-1.ligo_ast_pretty)) (deps closure-1.ligo_ast closure-1.ligo_ast_pretty)) +(alias (name runtest) (action (diff closure-2.ligo_ast closure-2.ligo_ast_pretty)) (deps closure-2.ligo_ast closure-2.ligo_ast_pretty)) +(alias (name runtest) (action (diff closure-3.ligo_ast closure-3.ligo_ast_pretty)) (deps closure-3.ligo_ast closure-3.ligo_ast_pretty)) +(alias (name runtest) (action (diff closure.ligo_ast closure.ligo_ast_pretty)) (deps closure.ligo_ast closure.ligo_ast_pretty)) +(alias (name runtest) (action (diff coase.ligo_ast coase.ligo_ast_pretty)) (deps coase.ligo_ast coase.ligo_ast_pretty)) +(alias (name runtest) (action (diff condition-simple.ligo_ast condition-simple.ligo_ast_pretty)) (deps condition-simple.ligo_ast condition-simple.ligo_ast_pretty)) +(alias (name runtest) (action (diff condition.ligo_ast condition.ligo_ast_pretty)) (deps condition.ligo_ast condition.ligo_ast_pretty)) +(alias (name runtest) (action (diff counter.ligo_ast counter.ligo_ast_pretty)) (deps counter.ligo_ast counter.ligo_ast_pretty)) +(alias (name runtest) (action (diff crypto.ligo_ast crypto.ligo_ast_pretty)) (deps crypto.ligo_ast crypto.ligo_ast_pretty)) +(alias (name runtest) (action (diff declaration-local.ligo_ast declaration-local.ligo_ast_pretty)) (deps declaration-local.ligo_ast declaration-local.ligo_ast_pretty)) +(alias (name runtest) (action (diff declarations.ligo_ast declarations.ligo_ast_pretty)) (deps declarations.ligo_ast declarations.ligo_ast_pretty)) +(alias (name runtest) (action (diff deep_access.ligo_ast deep_access.ligo_ast_pretty)) (deps deep_access.ligo_ast deep_access.ligo_ast_pretty)) +(alias (name runtest) (action (diff dispatch-counter.ligo_ast dispatch-counter.ligo_ast_pretty)) (deps dispatch-counter.ligo_ast dispatch-counter.ligo_ast_pretty)) +(alias (name runtest) (action (diff double_main.ligo_ast double_main.ligo_ast_pretty)) (deps double_main.ligo_ast double_main.ligo_ast_pretty)) +(alias (name runtest) (action (diff double_michelson_or.ligo_ast double_michelson_or.ligo_ast_pretty)) (deps double_michelson_or.ligo_ast double_michelson_or.ligo_ast_pretty)) +(alias (name runtest) (action (diff empty_case.ligo_ast empty_case.ligo_ast_pretty)) (deps empty_case.ligo_ast empty_case.ligo_ast_pretty)) +(alias (name runtest) (action (diff entrypoints.ligo_ast entrypoints.ligo_ast_pretty)) (deps entrypoints.ligo_ast entrypoints.ligo_ast_pretty)) +(alias (name runtest) (action (diff eq_bool.ligo_ast eq_bool.ligo_ast_pretty)) (deps eq_bool.ligo_ast eq_bool.ligo_ast_pretty)) +(alias (name runtest) (action (diff evaluation_tests.ligo_ast evaluation_tests.ligo_ast_pretty)) (deps evaluation_tests.ligo_ast evaluation_tests.ligo_ast_pretty)) +(alias (name runtest) (action (diff FA1.2.ligo_ast FA1.2.ligo_ast_pretty)) (deps FA1.2.ligo_ast FA1.2.ligo_ast_pretty)) +(alias (name runtest) (action (diff failwith.ligo_ast failwith.ligo_ast_pretty)) (deps failwith.ligo_ast failwith.ligo_ast_pretty)) +(alias (name runtest) (action (diff for_fail.ligo_ast for_fail.ligo_ast_pretty)) (deps for_fail.ligo_ast for_fail.ligo_ast_pretty)) +(alias (name runtest) (action (diff function-anon.ligo_ast function-anon.ligo_ast_pretty)) (deps function-anon.ligo_ast function-anon.ligo_ast_pretty)) +(alias (name runtest) (action (diff function-complex.ligo_ast function-complex.ligo_ast_pretty)) (deps function-complex.ligo_ast function-complex.ligo_ast_pretty)) +(alias (name runtest) (action (diff function-shared.ligo_ast function-shared.ligo_ast_pretty)) (deps function-shared.ligo_ast function-shared.ligo_ast_pretty)) +(alias (name runtest) (action (diff function.ligo_ast function.ligo_ast_pretty)) (deps function.ligo_ast function.ligo_ast_pretty)) +(alias (name runtest) (action (diff get_contract.ligo_ast get_contract.ligo_ast_pretty)) (deps get_contract.ligo_ast get_contract.ligo_ast_pretty)) +(alias (name runtest) (action (diff high-order.ligo_ast high-order.ligo_ast_pretty)) (deps high-order.ligo_ast high-order.ligo_ast_pretty)) +(alias (name runtest) (action (diff id.ligo_ast id.ligo_ast_pretty)) (deps id.ligo_ast id.ligo_ast_pretty)) +(alias (name runtest) (action (diff implicit_account.ligo_ast implicit_account.ligo_ast_pretty)) (deps implicit_account.ligo_ast implicit_account.ligo_ast_pretty)) +(alias (name runtest) (action (diff included.ligo_ast included.ligo_ast_pretty)) (deps included.ligo_ast included.ligo_ast_pretty)) +(alias (name runtest) (action (diff includer.ligo_ast includer.ligo_ast_pretty)) (deps includer.ligo_ast includer.ligo_ast_pretty)) +(alias (name runtest) (action (diff isnat.ligo_ast isnat.ligo_ast_pretty)) (deps isnat.ligo_ast isnat.ligo_ast_pretty)) +(alias (name runtest) (action (diff key_hash_comparable.ligo_ast key_hash_comparable.ligo_ast_pretty)) (deps key_hash_comparable.ligo_ast key_hash_comparable.ligo_ast_pretty)) +(alias (name runtest) (action (diff key_hash.ligo_ast key_hash.ligo_ast_pretty)) (deps key_hash.ligo_ast key_hash.ligo_ast_pretty)) +(alias (name runtest) (action (diff lambda.ligo_ast lambda.ligo_ast_pretty)) (deps lambda.ligo_ast lambda.ligo_ast_pretty)) +(alias (name runtest) (action (diff list.ligo_ast list.ligo_ast_pretty)) (deps list.ligo_ast list.ligo_ast_pretty)) +(alias (name runtest) (action (diff loop_bugs.ligo_ast loop_bugs.ligo_ast_pretty)) (deps loop_bugs.ligo_ast loop_bugs.ligo_ast_pretty)) +(alias (name runtest) (action (diff loop.ligo_ast loop.ligo_ast_pretty)) (deps loop.ligo_ast loop.ligo_ast_pretty)) +(alias (name runtest) (action (diff map.ligo_ast map.ligo_ast_pretty)) (deps map.ligo_ast map.ligo_ast_pretty)) +(alias (name runtest) (action (diff match.ligo_ast match.ligo_ast_pretty)) (deps match.ligo_ast match.ligo_ast_pretty)) +(alias (name runtest) (action (diff michelson_or_tree_intermediary.ligo_ast michelson_or_tree_intermediary.ligo_ast_pretty)) (deps michelson_or_tree_intermediary.ligo_ast michelson_or_tree_intermediary.ligo_ast_pretty)) +(alias (name runtest) (action (diff michelson_or_tree.ligo_ast michelson_or_tree.ligo_ast_pretty)) (deps michelson_or_tree.ligo_ast michelson_or_tree.ligo_ast_pretty)) +(alias (name runtest) (action (diff michelson_pair_tree_intermediary.ligo_ast michelson_pair_tree_intermediary.ligo_ast_pretty)) (deps michelson_pair_tree_intermediary.ligo_ast michelson_pair_tree_intermediary.ligo_ast_pretty)) +(alias (name runtest) (action (diff michelson_pair_tree.ligo_ast michelson_pair_tree.ligo_ast_pretty)) (deps michelson_pair_tree.ligo_ast michelson_pair_tree.ligo_ast_pretty)) +(alias (name runtest) (action (diff multiple-parameters.ligo_ast multiple-parameters.ligo_ast_pretty)) (deps multiple-parameters.ligo_ast multiple-parameters.ligo_ast_pretty)) +(alias (name runtest) (action (diff multisig-v2.ligo_ast multisig-v2.ligo_ast_pretty)) (deps multisig-v2.ligo_ast multisig-v2.ligo_ast_pretty)) +(alias (name runtest) (action (diff multisig.ligo_ast multisig.ligo_ast_pretty)) (deps multisig.ligo_ast multisig.ligo_ast_pretty)) +(alias (name runtest) (action (diff option.ligo_ast option.ligo_ast_pretty)) (deps option.ligo_ast option.ligo_ast_pretty)) +(alias (name runtest) (action (diff quote-declaration.ligo_ast quote-declaration.ligo_ast_pretty)) (deps quote-declaration.ligo_ast quote-declaration.ligo_ast_pretty)) +(alias (name runtest) (action (diff quote-declarations.ligo_ast quote-declarations.ligo_ast_pretty)) (deps quote-declarations.ligo_ast quote-declarations.ligo_ast_pretty)) +(alias (name runtest) (action (diff record.ligo_ast record.ligo_ast_pretty)) (deps record.ligo_ast record.ligo_ast_pretty)) +(alias (name runtest) (action (diff recursion.ligo_ast recursion.ligo_ast_pretty)) (deps recursion.ligo_ast recursion.ligo_ast_pretty)) +(alias (name runtest) (action (diff redeclaration.ligo_ast redeclaration.ligo_ast_pretty)) (deps redeclaration.ligo_ast redeclaration.ligo_ast_pretty)) +(alias (name runtest) (action (diff replaceable_id.ligo_ast replaceable_id.ligo_ast_pretty)) (deps replaceable_id.ligo_ast replaceable_id.ligo_ast_pretty)) +(alias (name runtest) (action (diff self_address.ligo_ast self_address.ligo_ast_pretty)) (deps self_address.ligo_ast self_address.ligo_ast_pretty)) +(alias (name runtest) (action (diff self_type_annotation.ligo_ast self_type_annotation.ligo_ast_pretty)) (deps self_type_annotation.ligo_ast self_type_annotation.ligo_ast_pretty)) +(alias (name runtest) (action (diff self_with_entrypoint.ligo_ast self_with_entrypoint.ligo_ast_pretty)) (deps self_with_entrypoint.ligo_ast self_with_entrypoint.ligo_ast_pretty)) +(alias (name runtest) (action (diff self_without_entrypoint.ligo_ast self_without_entrypoint.ligo_ast_pretty)) (deps self_without_entrypoint.ligo_ast self_without_entrypoint.ligo_ast_pretty)) +(alias (name runtest) (action (diff set_arithmetic-1.ligo_ast set_arithmetic-1.ligo_ast_pretty)) (deps set_arithmetic-1.ligo_ast set_arithmetic-1.ligo_ast_pretty)) +(alias (name runtest) (action (diff set_arithmetic.ligo_ast set_arithmetic.ligo_ast_pretty)) (deps set_arithmetic.ligo_ast set_arithmetic.ligo_ast_pretty)) +(alias (name runtest) (action (diff set_delegate.ligo_ast set_delegate.ligo_ast_pretty)) (deps set_delegate.ligo_ast set_delegate.ligo_ast_pretty)) +(alias (name runtest) (action (diff shadow.ligo_ast shadow.ligo_ast_pretty)) (deps shadow.ligo_ast shadow.ligo_ast_pretty)) +(alias (name runtest) (action (diff simple_access.ligo_ast simple_access.ligo_ast_pretty)) (deps simple_access.ligo_ast simple_access.ligo_ast_pretty)) +(alias (name runtest) (action (diff string_arithmetic.ligo_ast string_arithmetic.ligo_ast_pretty)) (deps string_arithmetic.ligo_ast string_arithmetic.ligo_ast_pretty)) +(alias (name runtest) (action (diff string.ligo_ast string.ligo_ast_pretty)) (deps string.ligo_ast string.ligo_ast_pretty)) +(alias (name runtest) (action (diff super-counter.ligo_ast super-counter.ligo_ast_pretty)) (deps super-counter.ligo_ast super-counter.ligo_ast_pretty)) +(alias (name runtest) (action (diff tez.ligo_ast tez.ligo_ast_pretty)) (deps tez.ligo_ast tez.ligo_ast_pretty)) +(alias (name runtest) (action (diff time-lock.ligo_ast time-lock.ligo_ast_pretty)) (deps time-lock.ligo_ast time-lock.ligo_ast_pretty)) +(alias (name runtest) (action (diff timestamp.ligo_ast timestamp.ligo_ast_pretty)) (deps timestamp.ligo_ast timestamp.ligo_ast_pretty)) +(alias (name runtest) (action (diff toto.ligo_ast toto.ligo_ast_pretty)) (deps toto.ligo_ast toto.ligo_ast_pretty)) +(alias (name runtest) (action (diff tuple.ligo_ast tuple.ligo_ast_pretty)) (deps tuple.ligo_ast tuple.ligo_ast_pretty)) +(alias (name runtest) (action (diff type-alias.ligo_ast type-alias.ligo_ast_pretty)) (deps type-alias.ligo_ast type-alias.ligo_ast_pretty)) +(alias (name runtest) (action (diff unit.ligo_ast unit.ligo_ast_pretty)) (deps unit.ligo_ast unit.ligo_ast_pretty)) +(alias (name runtest) (action (diff variant-matching.ligo_ast variant-matching.ligo_ast_pretty)) (deps variant-matching.ligo_ast variant-matching.ligo_ast_pretty)) +(alias (name runtest) (action (diff variant.ligo_ast variant.ligo_ast_pretty)) (deps variant.ligo_ast variant.ligo_ast_pretty)) +(alias (name runtest) (action (diff website1.ligo_ast website1.ligo_ast_pretty)) (deps website1.ligo_ast website1.ligo_ast_pretty)) +(alias (name runtest) (action (diff website2.ligo_ast website2.ligo_ast_pretty)) (deps website2.ligo_ast website2.ligo_ast_pretty)) \ No newline at end of file diff --git a/src/test/contracts/expected/FA1.2.ligo.expected b/src/test/contracts/expected/FA1.2.ligo.expected new file mode 100644 index 000000000..f348fa651 --- /dev/null +++ b/src/test/contracts/expected/FA1.2.ligo.expected @@ -0,0 +1,172 @@ +type tokens is big_map (address, nat) + +type allowances is big_map (address * address, nat) + +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 + ]; + 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 + ]; + 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 + ]; + 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 + ]; + 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 + ]; + 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 + ]; + 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) + ] diff --git a/src/test/contracts/expected/FA1.2.mligo.expected b/src/test/contracts/expected/FA1.2.mligo.expected new file mode 100644 index 000000000..5d8ea43fe --- /dev/null +++ b/src/test/contracts/expected/FA1.2.mligo.expected @@ -0,0 +1,136 @@ +type tokens = (address, nat) big_map + +type allowances = (address * address, nat) big_map + +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) diff --git a/src/test/contracts/expected/address.ligo.expected b/src/test/contracts/expected/address.ligo.expected new file mode 100644 index 000000000..2091d5163 --- /dev/null +++ b/src/test/contracts/expected/address.ligo.expected @@ -0,0 +1,4 @@ +function main (const p : key_hash) : address is +block { + const c : contract (unit) = Tezos.implicit_account (p) +} with Tezos.address (c) diff --git a/src/test/contracts/expected/address.mligo.expected b/src/test/contracts/expected/address.mligo.expected new file mode 100644 index 000000000..e4d873bbe --- /dev/null +++ b/src/test/contracts/expected/address.mligo.expected @@ -0,0 +1,3 @@ +let main (p : key_hash) = + let c : unit contract = Tezos.implicit_account p + in Tezos.address c diff --git a/src/test/contracts/expected/address.religo.expected b/src/test/contracts/expected/address.religo.expected new file mode 100644 index 000000000..02a35089e --- /dev/null +++ b/src/test/contracts/expected/address.religo.expected @@ -0,0 +1,4 @@ +let main = (p: key_hash): address => { + let c: contract(unit) = Tezos.implicit_account(p); + Tezos.address(c) +}; diff --git a/src/test/contracts/expected/amount.ligo.expected b/src/test/contracts/expected/amount.ligo.expected new file mode 100644 index 000000000..dfa7db042 --- /dev/null +++ b/src/test/contracts/expected/amount.ligo.expected @@ -0,0 +1,7 @@ +function check (const p : unit) : int is +block { + var result : int := 0; + if amount = 100000000mutez + then result := 42 + else result := 0 +} with result diff --git a/src/test/contracts/expected/amount.mligo.expected b/src/test/contracts/expected/amount.mligo.expected new file mode 100644 index 000000000..f274aad7a --- /dev/null +++ b/src/test/contracts/expected/amount.mligo.expected @@ -0,0 +1,2 @@ +let check_ (p : unit) : int = + if Tezos.amount = 100000000mutez then 42 else 0 diff --git a/src/test/contracts/expected/amount.religo.expected b/src/test/contracts/expected/amount.religo.expected new file mode 100644 index 000000000..f1082701d --- /dev/null +++ b/src/test/contracts/expected/amount.religo.expected @@ -0,0 +1,6 @@ +let check_ = (p: unit): int => + if (Tezos.amount == 100000000mutez) { + 42 + } else { + 0 + }; diff --git a/src/test/contracts/expected/amount_lambda.mligo.expected b/src/test/contracts/expected/amount_lambda.mligo.expected new file mode 100644 index 000000000..a9d51b22d --- /dev/null +++ b/src/test/contracts/expected/amount_lambda.mligo.expected @@ -0,0 +1,10 @@ +let f1 (x : unit) : unit -> tez = + let amt : tez = Current.amount + in fun (x : unit) -> amt + +let f2 (x : unit) : unit -> tez = + fun (x : unit) -> Current.amount + +let main (b, s : bool * (unit -> tez)) +: operation list * (unit -> tez) = + (([] : operation list), (if b then f1 () else f2 ())) diff --git a/src/test/contracts/expected/annotation.ligo.expected b/src/test/contracts/expected/annotation.ligo.expected new file mode 100644 index 000000000..a904db4e3 --- /dev/null +++ b/src/test/contracts/expected/annotation.ligo.expected @@ -0,0 +1,4 @@ +const lst : list (int) = list [] + +const my_address : address += ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address) diff --git a/src/test/contracts/expected/application.ligo.expected b/src/test/contracts/expected/application.ligo.expected new file mode 100644 index 000000000..4ffa7b48e --- /dev/null +++ b/src/test/contracts/expected/application.ligo.expected @@ -0,0 +1,13 @@ +type foo is record [bar : int -> int] + +function f (const i : int) : int is i + +function g (const i : unit) : int -> int is f + +const r : foo = record [bar = f] + +const x : int = f (42) + +const y : int = r.bar (42) + +const z : int = (g (unit)) (42) diff --git a/src/test/contracts/expected/arithmetic.ligo.expected b/src/test/contracts/expected/arithmetic.ligo.expected new file mode 100644 index 000000000..199e20d9c --- /dev/null +++ b/src/test/contracts/expected/arithmetic.ligo.expected @@ -0,0 +1,16 @@ +function mod_op (const n : int) : nat is n mod 42 + +function plus_op (const n : int) : int is n + 42 + +function minus_op (const n : int) : int is n - 42 + +function times_op (const n : int) : int is n * 42 + +function div_op (const n : int) : int is n / 2 + +function int_op (const n : nat) : int is int (n) + +function neg_op (const n : int) : int is -n + +function ediv_op (const n : int) : option (int * nat) is + ediv (n, 2) diff --git a/src/test/contracts/expected/arithmetic.mligo.expected b/src/test/contracts/expected/arithmetic.mligo.expected new file mode 100644 index 000000000..2f6020397 --- /dev/null +++ b/src/test/contracts/expected/arithmetic.mligo.expected @@ -0,0 +1,17 @@ +let mod_op (n : int) : nat = n mod 42 + +let plus_op (n : int) : int = n + 42 + +let minus_op (n : int) : int = n - 42 + +let times_op (n : int) : int = n * 42 + +let div_op (n : int) : int = n / 2 + +let neg_op (n : int) : int = -n + +let foo (n : int) : int = n + 10 + +let neg_op_2 (b : int) : int = -(foo b) + +let ediv_op (n : int) : (int * nat) option = ediv n 2 diff --git a/src/test/contracts/expected/arithmetic.religo.expected b/src/test/contracts/expected/arithmetic.religo.expected new file mode 100644 index 000000000..af641c76e --- /dev/null +++ b/src/test/contracts/expected/arithmetic.religo.expected @@ -0,0 +1,17 @@ +let mod_op = (n: int): nat => n mod 42; + +let plus_op = (n: int): int => n + 42; + +let minus_op = (n: int): int => n - 42; + +let times_op = (n: int): int => n * 42; + +let div_op = (n: int): int => n / 2; + +let neg_op = (n: int): int => -n; + +let foo = (n: int): int => n + 10; + +let neg_op_2 = (b: int): int => -foo(b); + +let ediv_op = (n: int): option((int, nat)) => ediv(n, 2); diff --git a/src/test/contracts/expected/assert.mligo.expected b/src/test/contracts/expected/assert.mligo.expected new file mode 100644 index 000000000..41785c58d --- /dev/null +++ b/src/test/contracts/expected/assert.mligo.expected @@ -0,0 +1,3 @@ +let main (p, s : bool * unit) = + let u : unit = assert p + in ([] : operation list), s diff --git a/src/test/contracts/expected/assign.ligo.expected b/src/test/contracts/expected/assign.ligo.expected new file mode 100644 index 000000000..83e6de109 --- /dev/null +++ b/src/test/contracts/expected/assign.ligo.expected @@ -0,0 +1,4 @@ +function main (const i : int) : int is +block { + i := i + 1 +} with i diff --git a/src/test/contracts/expected/attributes.ligo.expected b/src/test/contracts/expected/attributes.ligo.expected new file mode 100644 index 000000000..1622aa0aa --- /dev/null +++ b/src/test/contracts/expected/attributes.ligo.expected @@ -0,0 +1,24 @@ +const x : int = 1 + +attributes ["inline"] + +function foo (const a : int) : int is +block { + const test : int = 2 + a; + attributes ["inline"] +} with test + +attributes ["inline"] + +const y : int = 1 + +attributes ["inline"; "other"] + +function bar (const b : int) : int is +block { + function test (const z : int) : int is + block { + const r : int = 2 + b + z + } with r; + attributes ["inline"; "foo"; "bar"] +} with test (b) diff --git a/src/test/contracts/expected/attributes.mligo.expected b/src/test/contracts/expected/attributes.mligo.expected new file mode 100644 index 000000000..0623ef077 --- /dev/null +++ b/src/test/contracts/expected/attributes.mligo.expected @@ -0,0 +1,14 @@ +let x = 1 [@@inline] + +let foo (a : int) : int = + (let test = 2 + a [@@inline] + in test) [@@inline] + +let y = 1 [@@inline][@@other] + +let bar (b : int) : int = + let test = fun (z : int) -> 2 + b + z + [@@inline] + [@@foo] + [@@bar] + in test b diff --git a/src/test/contracts/expected/bad_address_format.religo.expected b/src/test/contracts/expected/bad_address_format.religo.expected new file mode 100644 index 000000000..daa5b29ed --- /dev/null +++ b/src/test/contracts/expected/bad_address_format.religo.expected @@ -0,0 +1,2 @@ +let main = (parameter: int, storage: address) => + ([] : list(operation), "KT1badaddr" : address); diff --git a/src/test/contracts/expected/bad_timestamp.ligo.expected b/src/test/contracts/expected/bad_timestamp.ligo.expected new file mode 100644 index 000000000..c8231cbc1 --- /dev/null +++ b/src/test/contracts/expected/bad_timestamp.ligo.expected @@ -0,0 +1,11 @@ +type parameter is unit + +type storage is timestamp + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + var stamp : timestamp := ("badtimestamp" : timestamp) +} with ((nil : list (operation)), stamp) diff --git a/src/test/contracts/expected/bad_type_operator.ligo.expected b/src/test/contracts/expected/bad_type_operator.ligo.expected new file mode 100644 index 000000000..462580154 --- /dev/null +++ b/src/test/contracts/expected/bad_type_operator.ligo.expected @@ -0,0 +1,12 @@ +type parameter is unit + +type binding is nat * nat + +type storage is map (binding) + +type return is list (operation) * storage + +function main + (const param : parameter; + const store : storage) : return is + ((nil : list (operation)), store) diff --git a/src/test/contracts/expected/balance_constant.ligo.expected b/src/test/contracts/expected/balance_constant.ligo.expected new file mode 100644 index 000000000..00c0fe7ca --- /dev/null +++ b/src/test/contracts/expected/balance_constant.ligo.expected @@ -0,0 +1,10 @@ +type parameter is unit + +type storage is tez + +type return is list (operation) * storage + +function main + (const param : parameter; + const store : storage) : return is + ((nil : list (operation)), Tezos.balance) diff --git a/src/test/contracts/expected/balance_constant.mligo.expected b/src/test/contracts/expected/balance_constant.mligo.expected new file mode 100644 index 000000000..e46d05670 --- /dev/null +++ b/src/test/contracts/expected/balance_constant.mligo.expected @@ -0,0 +1,8 @@ +type parameter = unit + +type storage = tez + +type return = operation list * storage + +let main (p, s : parameter * storage) : return = + ([] : operation list), Tezos.balance diff --git a/src/test/contracts/expected/balance_constant.religo.expected b/src/test/contracts/expected/balance_constant.religo.expected new file mode 100644 index 000000000..3fb310a5e --- /dev/null +++ b/src/test/contracts/expected/balance_constant.religo.expected @@ -0,0 +1,6 @@ +type storage = tez; + +let main2 = (p: unit, s: storage) => + ([] : list(operation), Tezos.balance); + +let main = (x: (unit, storage)) => main2(x[0], x[1]); diff --git a/src/test/contracts/expected/basic.mligo.expected b/src/test/contracts/expected/basic.mligo.expected new file mode 100644 index 000000000..34be829e0 --- /dev/null +++ b/src/test/contracts/expected/basic.mligo.expected @@ -0,0 +1,3 @@ +type toto = int + +let foo : toto = 42 + 127 diff --git a/src/test/contracts/expected/big_map.ligo.expected b/src/test/contracts/expected/big_map.ligo.expected new file mode 100644 index 000000000..e6a3da741 --- /dev/null +++ b/src/test/contracts/expected/big_map.ligo.expected @@ -0,0 +1,41 @@ +type parameter is unit + +type storage is big_map (int, int) * unit + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + var toto : option (int) := Some (0); + toto := s.0 [23]; + s.0 [2] := 444 +} with ((nil : list (operation)), s) + +type foo is big_map (int, int) + +function set_ (var n : int; var m : foo) : foo is +block { + m [23] := n +} with m + +function add (var n : int; var m : foo) : foo is set_ (n, m) + +function rm (var m : foo) : foo is +block { + remove 42 from map m +} with m + +function get (const m : foo) : option (int) is m [42] + +const empty_big_map : big_map (int, int) = big_map [] + +const big_map1 : big_map (int, int) += big_map [23 -> 0; 42 -> 0] + +function mutimaps (const m : foo; const n : foo) : foo is +block { + var bar : foo := m; + bar [42] := 0; + n [42] := get_force (42, bar) +} with n diff --git a/src/test/contracts/expected/big_map.mligo.expected b/src/test/contracts/expected/big_map.mligo.expected new file mode 100644 index 000000000..36eafe0fd --- /dev/null +++ b/src/test/contracts/expected/big_map.mligo.expected @@ -0,0 +1,22 @@ +type foo = (int, int) big_map + +let set_ (n, m : int * foo) : foo = + Big_map.update 23 (Some n) m + +let add (n, m : int * foo) : foo = Big_map.add 23 n m + +let rm (m : foo) : foo = Big_map.remove 42 m + +let gf (m : foo) : int = Big_map.find 23 m + +let get (m : foo) : int option = Big_map.find_opt 42 m + +let empty_map : foo = Big_map.empty + +let map1 : foo = Big_map.literal [(23, 0); (42, 0)] + +let map1 : foo = Big_map.literal [(23, 0); (42, 0)] + +let mutimaps (m : foo) (n : foo) : foo = + let bar : foo = Big_map.update 42 (Some 0) m + in Big_map.update 42 (get bar) n diff --git a/src/test/contracts/expected/bitwise_arithmetic.ligo.expected b/src/test/contracts/expected/bitwise_arithmetic.ligo.expected new file mode 100644 index 000000000..cc3e14013 --- /dev/null +++ b/src/test/contracts/expected/bitwise_arithmetic.ligo.expected @@ -0,0 +1,11 @@ +function or_op (const n : nat) : nat is Bitwise.or (n, 4n) + +function and_op (const n : nat) : nat is Bitwise.and (n, 7n) + +function xor_op (const n : nat) : nat is Bitwise.xor (n, 7n) + +function lsl_op (const n : nat) : nat is + Bitwise.shift_left (n, 7n) + +function lsr_op (const n : nat) : nat is + Bitwise.shift_right (n, 7n) diff --git a/src/test/contracts/expected/bitwise_arithmetic.mligo.expected b/src/test/contracts/expected/bitwise_arithmetic.mligo.expected new file mode 100644 index 000000000..2100e15e9 --- /dev/null +++ b/src/test/contracts/expected/bitwise_arithmetic.mligo.expected @@ -0,0 +1,9 @@ +let or_op (n : nat) : nat = Bitwise.or n 4n + +let and_op (n : nat) : nat = Bitwise.and n 7n + +let xor_op (n : nat) : nat = Bitwise.xor n 7n + +let lsl_op (n : nat) : nat = Bitwise.shift_left n 7n + +let lsr_op (n : nat) : nat = Bitwise.shift_right n 7n diff --git a/src/test/contracts/expected/bitwise_arithmetic.religo.expected b/src/test/contracts/expected/bitwise_arithmetic.religo.expected new file mode 100644 index 000000000..9468c4d57 --- /dev/null +++ b/src/test/contracts/expected/bitwise_arithmetic.religo.expected @@ -0,0 +1,9 @@ +let or_op = (n: nat): nat => Bitwise.or(n, 4n); + +let and_op = (n: nat): nat => Bitwise.and(n, 7n); + +let xor_op = (n: nat): nat => Bitwise.xor(n, 7n); + +let lsl_op = (n: nat): nat => Bitwise.shift_left(n, 7n); + +let lsr_op = (n: nat): nat => Bitwise.shift_right(n, 7n); diff --git a/src/test/contracts/expected/blockless.ligo.expected b/src/test/contracts/expected/blockless.ligo.expected new file mode 100644 index 000000000..94dddc8dd --- /dev/null +++ b/src/test/contracts/expected/blockless.ligo.expected @@ -0,0 +1 @@ +function blockless (const n : int) : int is n + 10 diff --git a/src/test/contracts/expected/boolean_operators.ligo.expected b/src/test/contracts/expected/boolean_operators.ligo.expected new file mode 100644 index 000000000..499947dc2 --- /dev/null +++ b/src/test/contracts/expected/boolean_operators.ligo.expected @@ -0,0 +1,9 @@ +function or_true (const b : bool) : bool is b or True + +function or_false (const b : bool) : bool is b or False + +function and_true (const b : bool) : bool is b and True + +function and_false (const b : bool) : bool is b and False + +function not_bool (const b : bool) : bool is not b diff --git a/src/test/contracts/expected/boolean_operators.mligo.expected b/src/test/contracts/expected/boolean_operators.mligo.expected new file mode 100644 index 000000000..be77b3592 --- /dev/null +++ b/src/test/contracts/expected/boolean_operators.mligo.expected @@ -0,0 +1,9 @@ +let or_true (b : bool) : bool = b || true + +let or_false (b : bool) : bool = b || false + +let and_true (b : bool) : bool = b && true + +let and_false (b : bool) : bool = b && false + +let not_bool (b : bool) : bool = not b diff --git a/src/test/contracts/expected/boolean_operators.religo.expected b/src/test/contracts/expected/boolean_operators.religo.expected new file mode 100644 index 000000000..0c7f1ae28 --- /dev/null +++ b/src/test/contracts/expected/boolean_operators.religo.expected @@ -0,0 +1,9 @@ +let or_true = (b: bool): bool => b || true; + +let or_false = (b: bool): bool => b || false; + +let and_true = (b: bool): bool => b && true; + +let and_false = (b: bool): bool => b && false; + +let not_bool = (b: bool): bool => ! b; diff --git a/src/test/contracts/expected/bytes_arithmetic.ligo.expected b/src/test/contracts/expected/bytes_arithmetic.ligo.expected new file mode 100644 index 000000000..4c2ff9e62 --- /dev/null +++ b/src/test/contracts/expected/bytes_arithmetic.ligo.expected @@ -0,0 +1,8 @@ +function concat_op (const s : bytes) : bytes is + Bytes.concat (s, 0x7070) + +function slice_op (const s : bytes) : bytes is + Bytes.sub (1n, 2n, s) + +function hasherman (const s : bytes) : bytes is + Crypto.sha256 (s) diff --git a/src/test/contracts/expected/bytes_arithmetic.mligo.expected b/src/test/contracts/expected/bytes_arithmetic.mligo.expected new file mode 100644 index 000000000..2d26e0d22 --- /dev/null +++ b/src/test/contracts/expected/bytes_arithmetic.mligo.expected @@ -0,0 +1,5 @@ +let concat_op (s : bytes) : bytes = Bytes.concat s 0x7070 + +let slice_op (s : bytes) : bytes = Bytes.sub 1n 2n s + +let hasherman (s : bytes) : bytes = Crypto.sha256 s diff --git a/src/test/contracts/expected/bytes_arithmetic.religo.expected b/src/test/contracts/expected/bytes_arithmetic.religo.expected new file mode 100644 index 000000000..c04599411 --- /dev/null +++ b/src/test/contracts/expected/bytes_arithmetic.religo.expected @@ -0,0 +1,5 @@ +let concat_op = (s: bytes): bytes => Bytes.concat(s, 0x7070); + +let slice_op = (s: bytes): bytes => Bytes.slice(1n, 2n, s); + +let hasherman = (s: bytes): bytes => Crypto.sha256(s); diff --git a/src/test/contracts/expected/bytes_unpack.ligo.expected b/src/test/contracts/expected/bytes_unpack.ligo.expected new file mode 100644 index 000000000..3aa83c245 --- /dev/null +++ b/src/test/contracts/expected/bytes_unpack.ligo.expected @@ -0,0 +1,15 @@ +function id_string (const p : string) : option (string) is +block { + const packed : bytes = Bytes.pack (p) +} with (Bytes.unpack (packed) : option (string)) + +function id_int (const p : int) : option (int) is +block { + const packed : bytes = Bytes.pack (p) +} with (Bytes.unpack (packed) : option (int)) + +function id_address (const p : address) + : option (address) is +block { + const packed : bytes = Bytes.pack (p) +} with (Bytes.unpack (packed) : option (address)) diff --git a/src/test/contracts/expected/bytes_unpack.mligo.expected b/src/test/contracts/expected/bytes_unpack.mligo.expected new file mode 100644 index 000000000..74bceb409 --- /dev/null +++ b/src/test/contracts/expected/bytes_unpack.mligo.expected @@ -0,0 +1,11 @@ +let id_string (p : string) : string option = + let packed : bytes = Bytes.pack p + in (Bytes.unpack packed : string option) + +let id_int (p : int) : int option = + let packed : bytes = Bytes.pack p + in (Bytes.unpack packed : int option) + +let id_address (p : address) : address option = + let packed : bytes = Bytes.pack p + in (Bytes.unpack packed : address option) diff --git a/src/test/contracts/expected/bytes_unpack.religo.expected b/src/test/contracts/expected/bytes_unpack.religo.expected new file mode 100644 index 000000000..8e2b20a69 --- /dev/null +++ b/src/test/contracts/expected/bytes_unpack.religo.expected @@ -0,0 +1,14 @@ +let id_string = (p: string): option(string) => { + let packed: bytes = Bytes.pack(p); + ((Bytes.unpack(packed)) : option(string)) +}; + +let id_int = (p: int): option(int) => { + let packed: bytes = Bytes.pack(p); + ((Bytes.unpack(packed)) : option(int)) +}; + +let id_address = (p: address): option(address) => { + let packed: bytes = Bytes.pack(p); + ((Bytes.unpack(packed)) : option(address)) +}; diff --git a/src/test/contracts/expected/chain_id.ligo.expected b/src/test/contracts/expected/chain_id.ligo.expected new file mode 100644 index 000000000..4bc329a47 --- /dev/null +++ b/src/test/contracts/expected/chain_id.ligo.expected @@ -0,0 +1,2 @@ +function chain_id (const tt : chain_id) : chain_id is + Tezos.chain_id diff --git a/src/test/contracts/expected/check_signature.ligo.expected b/src/test/contracts/expected/check_signature.ligo.expected new file mode 100644 index 000000000..79577cc6b --- /dev/null +++ b/src/test/contracts/expected/check_signature.ligo.expected @@ -0,0 +1,5 @@ +function check_signature + (const pk : key; + const signed : signature; + const msg : bytes) : bool is + Crypto.check (pk, signed, msg) diff --git a/src/test/contracts/expected/check_signature.mligo.expected b/src/test/contracts/expected/check_signature.mligo.expected new file mode 100644 index 000000000..d947f5e26 --- /dev/null +++ b/src/test/contracts/expected/check_signature.mligo.expected @@ -0,0 +1,11 @@ +let check_signature + (pk, signed, msg : key * signature * bytes) : bool = + Crypto.check pk signed msg + +let example : bool = + Crypto.check + ("edpktz4xg6csJnJ5vcmMb2H37sWXyBDcoAp3XrBvjRaTSQ1zmZTeRQ" + : key) + ("edsigtnzKd51CDomKVMFBoU8SzFZgNqRkYUaQH4DLUg8Lsimz98DFB82uiHAkdvx29DDqHxPf1noQ8noWpKMZoxTCsfprrbs4Xo" + : signature) + 0x05010000000568656c6c6f diff --git a/src/test/contracts/expected/check_signature.religo.expected b/src/test/contracts/expected/check_signature.religo.expected new file mode 100644 index 000000000..f50f2e554 --- /dev/null +++ b/src/test/contracts/expected/check_signature.religo.expected @@ -0,0 +1,4 @@ +let check_signature = (param: (key, signature, bytes)): bool => { + let (pk, signed, msg) = param; + Crypto.check(pk, signed, msg) +}; diff --git a/src/test/contracts/expected/closure-1.ligo.expected b/src/test/contracts/expected/closure-1.ligo.expected new file mode 100644 index 000000000..aa27d2afc --- /dev/null +++ b/src/test/contracts/expected/closure-1.ligo.expected @@ -0,0 +1,4 @@ +function foo (const i : int) : int is +block { + function add (const j : int) : int is i + j +} with add (i) diff --git a/src/test/contracts/expected/closure-2.ligo.expected b/src/test/contracts/expected/closure-2.ligo.expected new file mode 100644 index 000000000..296b0b728 --- /dev/null +++ b/src/test/contracts/expected/closure-2.ligo.expected @@ -0,0 +1,5 @@ +function foobar (const i : int) : int is +block { + const j : int = 3; + function add (const k : int) : int is i + j + k +} with add (42) diff --git a/src/test/contracts/expected/closure-3.ligo.expected b/src/test/contracts/expected/closure-3.ligo.expected new file mode 100644 index 000000000..b14351512 --- /dev/null +++ b/src/test/contracts/expected/closure-3.ligo.expected @@ -0,0 +1,6 @@ +function foobar (const i : int) : int is +block { + const j : int = 3; + const k : int = 4; + function add (const l : int) : int is i + j + k + l +} with add (42) diff --git a/src/test/contracts/expected/closure.ligo.expected b/src/test/contracts/expected/closure.ligo.expected new file mode 100644 index 000000000..42a74982a --- /dev/null +++ b/src/test/contracts/expected/closure.ligo.expected @@ -0,0 +1,5 @@ +function toto (const i : int) : int is +block { + function tata (const j : int) : int is i + j; + function titi (const j : int) : int is i + j +} with tata (i) + titi (i) diff --git a/src/test/contracts/expected/closure.mligo.expected b/src/test/contracts/expected/closure.mligo.expected new file mode 100644 index 000000000..a0505ca8f --- /dev/null +++ b/src/test/contracts/expected/closure.mligo.expected @@ -0,0 +1,5 @@ +let test (k : int) : int = + let j : int = k + 5 + in let close : int -> int = fun (i : int) -> i + j + in let j : int = 20 + in close 20 diff --git a/src/test/contracts/expected/closure.religo.expected b/src/test/contracts/expected/closure.religo.expected new file mode 100644 index 000000000..ed6b69611 --- /dev/null +++ b/src/test/contracts/expected/closure.religo.expected @@ -0,0 +1,6 @@ +let test = (k: int): int => { + let j: int = k + 5; + let close: (int => int) = (i: int) => i + j; + let j: int = 20; + close(20) +}; diff --git a/src/test/contracts/expected/coase.ligo.expected b/src/test/contracts/expected/coase.ligo.expected new file mode 100644 index 000000000..cd203db50 --- /dev/null +++ b/src/test/contracts/expected/coase.ligo.expected @@ -0,0 +1,137 @@ +type card_pattern_id is nat + +type card_pattern is + record [coefficient : tez; quantity : nat] + +type card_patterns is map (card_pattern_id, card_pattern) + +type card_id is nat + +type card is + record [ + card_owner : address; + card_pattern : card_pattern_id + ] + +type cards is map (card_id, card) + +type storage is + record [ + cards : cards; + card_patterns : card_patterns; + next_id : nat + ] + +type return is list (operation) * storage + +type action_buy_single is + record [card_to_buy : card_pattern_id] + +type action_sell_single is record [card_to_sell : card_id] + +type action_transfer_single is + record [card_to_transfer : card_id; destination : address] + +type parameter is + Buy_single of action_buy_single + | Sell_single of action_sell_single + | Transfer_single of action_transfer_single + +function transfer_single + (const action : action_transfer_single; + const s : storage) : return is +block { + const cards : cards = s.cards; + const card : card + = case cards [action.card_to_transfer] of [ + Some (card) -> card + | None -> + (failwith ("transfer_single: No card.") : card) + ]; + if card.card_owner =/= sender + then failwith ("This card doesn't belong to you") + else skip; + card.card_owner := action.destination; + cards [action.card_to_transfer] := card; + s.cards := cards +} with ((nil : list (operation)), s) + +function sell_single + (const action : action_sell_single; + const s : storage) : return is +block { + const card : card + = case s.cards [action.card_to_sell] of [ + Some (card) -> card + | None -> (failwith ("sell_single: No card.") : card) + ]; + if card.card_owner =/= sender + then failwith ("This card doesn't belong to you") + else skip; + const card_pattern : card_pattern + = case s.card_patterns [card.card_pattern] of [ + Some (pattern) -> pattern + | None -> + (failwith ("sell_single: No card pattern.") + : card_pattern) + ]; + card_pattern.quantity := abs (card_pattern.quantity - 1n); + const card_patterns : card_patterns = s.card_patterns; + card_patterns [card.card_pattern] := card_pattern; + s.card_patterns := card_patterns; + const cards : cards = s.cards; + remove action.card_to_sell from map cards; + s.cards := cards; + const price : tez + = card_pattern.coefficient * card_pattern.quantity; + const receiver : contract (unit) + = case (Tezos.get_contract_opt (Tezos.sender) + : option (contract (unit))) + of [ + Some (contract) -> contract + | None -> + (failwith ("sell_single: No contract.") + : contract (unit)) + ]; + const op : operation + = Tezos.transaction (unit, price, receiver); + const operations : list (operation) = list [op] +} with (operations, s) + +function buy_single + (const action : action_buy_single; + const s : storage) : return is +block { + const card_pattern : card_pattern + = case s.card_patterns [action.card_to_buy] of [ + Some (pattern) -> pattern + | None -> + (failwith ("buy_single: No card pattern.") + : card_pattern) + ]; + const price : tez + = card_pattern.coefficient * (card_pattern.quantity + 1n); + if price > amount + then failwith ("Not enough money") + else skip; + card_pattern.quantity := card_pattern.quantity + 1n; + const card_patterns : card_patterns = s.card_patterns; + card_patterns [action.card_to_buy] := card_pattern; + s.card_patterns := card_patterns; + const cards : cards = s.cards; + cards [s.next_id] := + record [ + card_owner = sender; + card_pattern = action.card_to_buy + ]; + s.cards := cards; + s.next_id := s.next_id + 1n +} with ((nil : list (operation)), s) + +function main (const action : parameter; const s : storage) + : return is + case action of [ + Buy_single (bs) -> buy_single (bs, s) + | Sell_single (as) -> sell_single (as, s) + | Transfer_single (at) -> transfer_single (at, s) + ] diff --git a/src/test/contracts/expected/comparable.mligo.expected b/src/test/contracts/expected/comparable.mligo.expected new file mode 100644 index 000000000..c5e4c00fd --- /dev/null +++ b/src/test/contracts/expected/comparable.mligo.expected @@ -0,0 +1,28 @@ +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 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/contracts/expected/condition-annot.mligo.expected b/src/test/contracts/expected/condition-annot.mligo.expected new file mode 100644 index 000000000..1eb1bf0f9 --- /dev/null +++ b/src/test/contracts/expected/condition-annot.mligo.expected @@ -0,0 +1,4 @@ +type integer = int + +let main (i : int) = + if (i = 2 : bool) then (42 : int) else (0 : integer) diff --git a/src/test/contracts/expected/condition-shadowing.mligo.expected b/src/test/contracts/expected/condition-shadowing.mligo.expected new file mode 100644 index 000000000..b704abaef --- /dev/null +++ b/src/test/contracts/expected/condition-shadowing.mligo.expected @@ -0,0 +1,9 @@ +let main (i : int) = + let result = 0 + in if i = 2 + then + let result = 42 + in result + else + let result = 0 + in result diff --git a/src/test/contracts/expected/condition-shadowing.religo.expected b/src/test/contracts/expected/condition-shadowing.religo.expected new file mode 100644 index 000000000..9f66ae5f2 --- /dev/null +++ b/src/test/contracts/expected/condition-shadowing.religo.expected @@ -0,0 +1,12 @@ +let main = (i: int) => { + let result = 0; + if (i == 2) { + + let result = 42; + result + } else { + + let result = 0; + result + } +}; diff --git a/src/test/contracts/expected/condition-simple.ligo.expected b/src/test/contracts/expected/condition-simple.ligo.expected new file mode 100644 index 000000000..420e30f9f --- /dev/null +++ b/src/test/contracts/expected/condition-simple.ligo.expected @@ -0,0 +1,2 @@ +function main (const i : int) : int is + if 1 = 1 then 42 else 0 diff --git a/src/test/contracts/expected/condition.ligo.expected b/src/test/contracts/expected/condition.ligo.expected new file mode 100644 index 000000000..7c8f809ef --- /dev/null +++ b/src/test/contracts/expected/condition.ligo.expected @@ -0,0 +1,10 @@ +function main (const i : int) : int is +block { + var result : int := 23; + if i = 2 then result := 42 else result := 0 +} with result + +function foo (const b : bool) : int is +block { + const x : int = 41 +} with 1 + (if b then x else main (x)) diff --git a/src/test/contracts/expected/condition.mligo.expected b/src/test/contracts/expected/condition.mligo.expected new file mode 100644 index 000000000..d14c7444c --- /dev/null +++ b/src/test/contracts/expected/condition.mligo.expected @@ -0,0 +1 @@ +let main (i : int) = if i = 2 then 42 else 0 diff --git a/src/test/contracts/expected/condition.religo.expected b/src/test/contracts/expected/condition.religo.expected new file mode 100644 index 000000000..9e4ec2c65 --- /dev/null +++ b/src/test/contracts/expected/condition.religo.expected @@ -0,0 +1,6 @@ +let main = (i: int) => + if (i == 2) { + 42 + } else { + 0 + }; diff --git a/src/test/contracts/expected/counter.ligo.expected b/src/test/contracts/expected/counter.ligo.expected new file mode 100644 index 000000000..7a4985c5d --- /dev/null +++ b/src/test/contracts/expected/counter.ligo.expected @@ -0,0 +1,7 @@ +type t is int + +function main (const p : int; const s : t) + : list (operation) * int is +block { + skip +} with ((nil : list (operation)), p + s) diff --git a/src/test/contracts/expected/counter.mligo.expected b/src/test/contracts/expected/counter.mligo.expected new file mode 100644 index 000000000..cf0ff35bb --- /dev/null +++ b/src/test/contracts/expected/counter.mligo.expected @@ -0,0 +1,4 @@ +type storage = int + +let main (p, s : int * storage) = + ([] : operation list), p + s diff --git a/src/test/contracts/expected/counter.religo.expected b/src/test/contracts/expected/counter.religo.expected new file mode 100644 index 000000000..5376359a4 --- /dev/null +++ b/src/test/contracts/expected/counter.religo.expected @@ -0,0 +1,5 @@ +type storage = int; + +let main = ((p, s): (int, storage)) +: (list(operation), storage) => + ([] : list(operation), p + s); diff --git a/src/test/contracts/expected/create_contract.mligo.expected b/src/test/contracts/expected/create_contract.mligo.expected new file mode 100644 index 000000000..ea091b05c --- /dev/null +++ b/src/test/contracts/expected/create_contract.mligo.expected @@ -0,0 +1,11 @@ +type return = operation list * string + +let main (action, store : string * string) : return = + let toto : operation * address = + Tezos.create_contract + (fun (p, s : nat * string) -> + (([] : operation list), "one")) + (None : key_hash option) + 300000000mutez + "un" + in ([toto.0], store) diff --git a/src/test/contracts/expected/crypto.ligo.expected b/src/test/contracts/expected/crypto.ligo.expected new file mode 100644 index 000000000..26560e6a0 --- /dev/null +++ b/src/test/contracts/expected/crypto.ligo.expected @@ -0,0 +1,5 @@ +function hasherman512 (const s : bytes) : bytes is + Crypto.sha512 (s) + +function hasherman_blake (const s : bytes) : bytes is + Crypto.blake2b (s) diff --git a/src/test/contracts/expected/crypto.mligo.expected b/src/test/contracts/expected/crypto.mligo.expected new file mode 100644 index 000000000..3dc8db6a1 --- /dev/null +++ b/src/test/contracts/expected/crypto.mligo.expected @@ -0,0 +1,3 @@ +let hasherman512 (s : bytes) : bytes = Crypto.sha512 s + +let hasherman_blake (s : bytes) : bytes = Crypto.blake2b s diff --git a/src/test/contracts/expected/crypto.religo.expected b/src/test/contracts/expected/crypto.religo.expected new file mode 100644 index 000000000..4afc4a41c --- /dev/null +++ b/src/test/contracts/expected/crypto.religo.expected @@ -0,0 +1,3 @@ +let hasherman512 = (s: bytes) => Crypto.sha512(s); + +let hasherman_blake = (s: bytes) => Crypto.blake2b(s); diff --git a/src/test/contracts/expected/curry.mligo.expected b/src/test/contracts/expected/curry.mligo.expected new file mode 100644 index 000000000..ffcaafe15 --- /dev/null +++ b/src/test/contracts/expected/curry.mligo.expected @@ -0,0 +1,9 @@ +let conv_test (j : int) (k : int) = j + k + +let main (i : int) : int = conv_test i 10 + +let partial (a : int) (b : int) : int = a + b + +let mk_partial (j : int) : int -> int = partial j + +let partial_apply (i : int) : int = mk_partial 10 i diff --git a/src/test/contracts/expected/declaration-local.ligo.expected b/src/test/contracts/expected/declaration-local.ligo.expected new file mode 100644 index 000000000..38e8d61dc --- /dev/null +++ b/src/test/contracts/expected/declaration-local.ligo.expected @@ -0,0 +1,4 @@ +function main (const i : int) : int is +block { + const j : int = 42 +} with j diff --git a/src/test/contracts/expected/declarations.ligo.expected b/src/test/contracts/expected/declarations.ligo.expected new file mode 100644 index 000000000..b41c36819 --- /dev/null +++ b/src/test/contracts/expected/declarations.ligo.expected @@ -0,0 +1,3 @@ +const foo : int = 42 + +function main (const i : int) : int is i + foo diff --git a/src/test/contracts/expected/deep_access.ligo.expected b/src/test/contracts/expected/deep_access.ligo.expected new file mode 100644 index 000000000..7e7b46eca --- /dev/null +++ b/src/test/contracts/expected/deep_access.ligo.expected @@ -0,0 +1,31 @@ +type pii is int * int + +type ppi is record [x : pii; y : pii] + +type ppp is ppi * ppi + +function main (const toto : unit) : int is +block { + var a : ppp + := (record [x = (0, 1); y = (10, 11)], + record [x = (100, 101); y = (110, 111)]); + a.0.x.0 := 2 +} with a.0.x.0 + +function asymetric_tuple_access (const foo : unit) : int is +block { + var tuple : int * (int * (int * int)) := (0, (1, (2, 3))) +} with tuple.0 + tuple.1.0 + tuple.1.1.0 + tuple.1.1.1 + +type nested_record_t is + record [nesty : record [mymap : map (int, string)]] + +function nested_record (var nee : nested_record_t) + : string is +block { + nee.nesty.mymap [1] := "one" +} with + case nee.nesty.mymap [1] of [ + Some (s) -> s + | None -> (failwith ("Should not happen.") : string) + ] diff --git a/src/test/contracts/expected/dispatch-counter.ligo.expected b/src/test/contracts/expected/dispatch-counter.ligo.expected new file mode 100644 index 000000000..ccd84ff3b --- /dev/null +++ b/src/test/contracts/expected/dispatch-counter.ligo.expected @@ -0,0 +1,21 @@ +type parameter is Increment of int | Decrement of int + +type storage is int + +type return is list (operation) * storage + +function increment (const i : int; const n : int) : int is + i + n + +function decrement (const i : int; const n : int) : int is + i - n + +const nop : list (operation) = nil + +function main + (const action : parameter; + const store : storage) : return is + case action of [ + Increment (n) -> (nop, increment (store, n)) + | Decrement (n) -> (nop, decrement (store, n)) + ] diff --git a/src/test/contracts/expected/double_main.ligo.expected b/src/test/contracts/expected/double_main.ligo.expected new file mode 100644 index 000000000..8dcacb108 --- /dev/null +++ b/src/test/contracts/expected/double_main.ligo.expected @@ -0,0 +1,14 @@ +type parameter is unit + +type storage is int + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is ((nil : list (operation)), s + 1) + +function main (const p : parameter; const s : storage) + : return is +block { + const ret : return = main (p, s) +} with (ret.0, ret.1 + 1) diff --git a/src/test/contracts/expected/double_michelson_or.ligo.expected b/src/test/contracts/expected/double_michelson_or.ligo.expected new file mode 100644 index 000000000..d006d32a8 --- /dev/null +++ b/src/test/contracts/expected/double_michelson_or.ligo.expected @@ -0,0 +1,12 @@ +type storage is michelson_or (int, "foo", string, "bar") + +type foobar is michelson_or (int, "baz", int, "fooo") + +type return is list (operation) * storage + +function main (const action : unit; const store : storage) + : return is +block { + const foo : storage = (M_right ("one") : storage); + const bar : foobar = (M_right (1) : foobar) +} with ((nil : list (operation)), (foo : storage)) diff --git a/src/test/contracts/expected/double_michelson_or.mligo.expected b/src/test/contracts/expected/double_michelson_or.mligo.expected new file mode 100644 index 000000000..756e5acba --- /dev/null +++ b/src/test/contracts/expected/double_michelson_or.mligo.expected @@ -0,0 +1,10 @@ +type storage = (int, "foo", string, "bar") michelson_or + +type foobar = (int, "baz", int, "fooo") michelson_or + +type return = operation list * storage + +let main (action, store : unit * storage) : return = + let foo = (M_right ("one") : storage) + in let bar = (M_right 1 : foobar) + in (([] : operation list), (foo : storage)) diff --git a/src/test/contracts/expected/empty_case.ligo.expected b/src/test/contracts/expected/empty_case.ligo.expected new file mode 100644 index 000000000..653f86f13 --- /dev/null +++ b/src/test/contracts/expected/empty_case.ligo.expected @@ -0,0 +1,7 @@ +type t is Bar of int | Baz + +function main (const x : t) : int is + case x of [ + Bar (n) -> n + | Baz -> -1 + ] diff --git a/src/test/contracts/expected/empty_case.mligo.expected b/src/test/contracts/expected/empty_case.mligo.expected new file mode 100644 index 000000000..7b85070fc --- /dev/null +++ b/src/test/contracts/expected/empty_case.mligo.expected @@ -0,0 +1,6 @@ +type foo = Bar of int | Baz + +let main (f : foo) : int = + match f with + Bar i -> i + | Baz -> -1 diff --git a/src/test/contracts/expected/empty_case.religo.expected b/src/test/contracts/expected/empty_case.religo.expected new file mode 100644 index 000000000..1051909b0 --- /dev/null +++ b/src/test/contracts/expected/empty_case.religo.expected @@ -0,0 +1,7 @@ +type foo = Bar(int) | Baz; + +let main = (f: foo): int => + switch(f) { + | Bar(i) => i + | Baz => (-1) + }; diff --git a/src/test/contracts/expected/entrypoints.ligo.expected b/src/test/contracts/expected/entrypoints.ligo.expected new file mode 100644 index 000000000..04eb400a0 --- /dev/null +++ b/src/test/contracts/expected/entrypoints.ligo.expected @@ -0,0 +1,23 @@ +type storage is unit + +type return is list (operation) * storage + +function cb (const a : address; const s : storage) + : return is +block { + const c : contract (unit) = get_entrypoint ("%cb", a) +} with (list [Tezos.transaction (unit, 0mutez, c)], s) + +function cbo (const a : address; const s : storage) + : return is +block { + const c : contract (unit) + = case (get_entrypoint_opt ("%cbo", a) + : option (contract (unit))) + of [ + Some (c) -> c + | None -> + (failwith ("cbo: Entrypoint not found.") + : contract (unit)) + ] +} with (list [Tezos.transaction (unit, 0mutez, c)], s) diff --git a/src/test/contracts/expected/eq_bool.ligo.expected b/src/test/contracts/expected/eq_bool.ligo.expected new file mode 100644 index 000000000..9d7199fec --- /dev/null +++ b/src/test/contracts/expected/eq_bool.ligo.expected @@ -0,0 +1,5 @@ +function main (const a : bool; const b : bool) : int is +block { + var result : int := 27; + if a = b then result := 999 else result := 1 +} with result diff --git a/src/test/contracts/expected/eq_bool.mligo.expected b/src/test/contracts/expected/eq_bool.mligo.expected new file mode 100644 index 000000000..576d4f5c7 --- /dev/null +++ b/src/test/contracts/expected/eq_bool.mligo.expected @@ -0,0 +1 @@ +let main (a, b : bool * bool) = if a = b then 999 else 1 diff --git a/src/test/contracts/expected/eq_bool.religo.expected b/src/test/contracts/expected/eq_bool.religo.expected new file mode 100644 index 000000000..35ac77780 --- /dev/null +++ b/src/test/contracts/expected/eq_bool.religo.expected @@ -0,0 +1,6 @@ +let main = ((a, b): (bool, bool)) => + if (a == b) { + 999 + } else { + 1 + }; diff --git a/src/test/contracts/expected/evaluation_tests.ligo.expected b/src/test/contracts/expected/evaluation_tests.ligo.expected new file mode 100644 index 000000000..7eef1067f --- /dev/null +++ b/src/test/contracts/expected/evaluation_tests.ligo.expected @@ -0,0 +1,5 @@ +type t is record [foo : nat; bar : string] + +const a : t = record [foo = 0n; bar = "bar"] + +const b : int = 2 diff --git a/src/test/contracts/expected/failwith.ligo.expected b/src/test/contracts/expected/failwith.ligo.expected new file mode 100644 index 000000000..e1729b39d --- /dev/null +++ b/src/test/contracts/expected/failwith.ligo.expected @@ -0,0 +1,44 @@ +type parameter is Zero of nat | Pos of nat + +type storage is unit + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + case p of [ + Zero (n) -> if n > 0n then failwith ("fail") else skip + | Pos (n) -> if n > 0n then skip else failwith ("fail") + ] +} with ((nil : list (operation)), s) + +function foobar (const i : int) : int is +block { + var p : parameter := Zero (42n); + if i > 0 + then { + i := i + 1; + if i > 10 + then { + i := 20; + failwith ("who knows"); + i := 30 + } + else skip + } + else + case p of [ + Zero (n) -> failwith (42n) + | Pos (n) -> skip + ] +} with + case p of [ + Zero (n) -> i + | Pos (n) -> (failwith ("waaaa") : int) + ] + +function failer (const p : int) : int is +block { + if p = 1 then failwith (42) else skip +} with p diff --git a/src/test/contracts/expected/failwith.mligo.expected b/src/test/contracts/expected/failwith.mligo.expected new file mode 100644 index 000000000..fee3f0102 --- /dev/null +++ b/src/test/contracts/expected/failwith.mligo.expected @@ -0,0 +1,6 @@ +type storage = unit + +let main (p, store : unit * storage) +: operation list * storage = + (failwith "This contract always fails" + : operation list * storage) diff --git a/src/test/contracts/expected/failwith.religo.expected b/src/test/contracts/expected/failwith.religo.expected new file mode 100644 index 000000000..1c0ca2203 --- /dev/null +++ b/src/test/contracts/expected/failwith.religo.expected @@ -0,0 +1,6 @@ +type storage = unit; + +let main = (p: unit, storage) => + if (true) { + failwith("This contract always fails") + }; diff --git a/src/test/contracts/expected/fibo.mligo.expected b/src/test/contracts/expected/fibo.mligo.expected new file mode 100644 index 000000000..221fe266a --- /dev/null +++ b/src/test/contracts/expected/fibo.mligo.expected @@ -0,0 +1,13 @@ +type storage = unit + +let main (p, store : unit * storage) +: operation list * storage = + let n = + (fun (f : int * int -> int) + (x : int) + (y : int) -> + f (y, x)) + (fun (x : int) (y : int) -> x + y) + 0 + 1 + in ([] : operation list), store diff --git a/src/test/contracts/expected/fibo2.mligo.expected b/src/test/contracts/expected/fibo2.mligo.expected new file mode 100644 index 000000000..bfa744d14 --- /dev/null +++ b/src/test/contracts/expected/fibo2.mligo.expected @@ -0,0 +1,10 @@ +type storage = unit + +let main (p, store : unit * storage) +: operation list * storage = + let n = + (fun (f : int -> int) (z : int) (y : int) -> f y) + (fun (x : int) -> x) + 0 + 1 + in ([] : operation list), store diff --git a/src/test/contracts/expected/fibo3.mligo.expected b/src/test/contracts/expected/fibo3.mligo.expected new file mode 100644 index 000000000..3f9cc0e83 --- /dev/null +++ b/src/test/contracts/expected/fibo3.mligo.expected @@ -0,0 +1,12 @@ +type storage = unit + +let main (p, s : unit * storage) : operation list * storage = + let n = + (fun (f : int -> int -> int) + (x : int) + (y : int) -> + f y (x + y)) + (fun (x : int) (y : int) -> x + y) + 0 + 1 + in ([] : operation list), store diff --git a/src/test/contracts/expected/fibo4.mligo.expected b/src/test/contracts/expected/fibo4.mligo.expected new file mode 100644 index 000000000..9806eabee --- /dev/null +++ b/src/test/contracts/expected/fibo4.mligo.expected @@ -0,0 +1,6 @@ +type storage = unit + +let main (p, s : unit * storage) = + (fun (f : int -> int) (x : int) -> f x) + (fun (x : int) -> x) + 1 diff --git a/src/test/contracts/expected/for_fail.ligo.expected b/src/test/contracts/expected/for_fail.ligo.expected new file mode 100644 index 000000000..7e1266a04 --- /dev/null +++ b/src/test/contracts/expected/for_fail.ligo.expected @@ -0,0 +1,7 @@ +function main (const a : int) : int is +block { + for i := 0 to 100 + block { + skip + } +} with i diff --git a/src/test/contracts/expected/function-anon.ligo.expected b/src/test/contracts/expected/function-anon.ligo.expected new file mode 100644 index 000000000..067023b21 --- /dev/null +++ b/src/test/contracts/expected/function-anon.ligo.expected @@ -0,0 +1,2 @@ +const x : int += (function (const i : int) : int is i + 1) (41) diff --git a/src/test/contracts/expected/function-complex.ligo.expected b/src/test/contracts/expected/function-complex.ligo.expected new file mode 100644 index 000000000..bdefb9850 --- /dev/null +++ b/src/test/contracts/expected/function-complex.ligo.expected @@ -0,0 +1,7 @@ +function main (const i : int) : int is +block { + var j : int := 0; + var k : int := 1; + j := k + i; + k := i + j +} with k + j diff --git a/src/test/contracts/expected/function-shared.ligo.expected b/src/test/contracts/expected/function-shared.ligo.expected new file mode 100644 index 000000000..d698ed742 --- /dev/null +++ b/src/test/contracts/expected/function-shared.ligo.expected @@ -0,0 +1,6 @@ +function inc (const i : int) : int is i + 1 + +function double_inc (const i : int) : int is inc (i + 1) + +function foo (const i : int) : int is + inc (i) + double_inc (i) diff --git a/src/test/contracts/expected/function-shared.mligo.expected b/src/test/contracts/expected/function-shared.mligo.expected new file mode 100644 index 000000000..fbdd17da5 --- /dev/null +++ b/src/test/contracts/expected/function-shared.mligo.expected @@ -0,0 +1,5 @@ +let foo (i : int) : int = i + 20 + +let bar (i : int) : int = i + 50 + +let foobar (i : int) : int = foo i + bar i diff --git a/src/test/contracts/expected/function-shared.religo.expected b/src/test/contracts/expected/function-shared.religo.expected new file mode 100644 index 000000000..ab4fcc3b2 --- /dev/null +++ b/src/test/contracts/expected/function-shared.religo.expected @@ -0,0 +1,5 @@ +let foo = (i: int): int => i + 20; + +let bar = (i: int): int => i + 50; + +let foobar = (i: int): int => foo(i) + bar(i); diff --git a/src/test/contracts/expected/function.ligo.expected b/src/test/contracts/expected/function.ligo.expected new file mode 100644 index 000000000..441d668a3 --- /dev/null +++ b/src/test/contracts/expected/function.ligo.expected @@ -0,0 +1 @@ +function main (const i : int) : int is i diff --git a/src/test/contracts/expected/get_contract.ligo.expected b/src/test/contracts/expected/get_contract.ligo.expected new file mode 100644 index 000000000..cf8137394 --- /dev/null +++ b/src/test/contracts/expected/get_contract.ligo.expected @@ -0,0 +1,20 @@ +type storage is unit + +type return is list (operation) * storage + +function cb (const s : storage) : return is +block { + const c : contract (unit) = get_contract (Tezos.sender) +} with (list [Tezos.transaction (unit, 0mutez, c)], s) + +function cbo (const s : unit) : return is +block { + const c : contract (unit) + = case (Tezos.get_contract_opt (Tezos.sender) + : option (contract (unit))) + of [ + Some (contract) -> contract + | None -> + (failwith ("contract not found") : contract (unit)) + ] +} with (list [Tezos.transaction (unit, 0mutez, c)], s) diff --git a/src/test/contracts/expected/guess_string.mligo.expected b/src/test/contracts/expected/guess_string.mligo.expected new file mode 100644 index 000000000..642fdb343 --- /dev/null +++ b/src/test/contracts/expected/guess_string.mligo.expected @@ -0,0 +1,17 @@ +type storage = {challenge : string} + +type param = {new_challenge : string; attempt : string} + +type return = operation list * storage + +let attempt (p, store : param * storage) : return = + let contract : unit contract = + match (Tezos.get_contract_opt Tezos.sender + : unit contract option) + with + Some contract -> contract + | None -> (failwith "No contract" : unit contract) + in let transfer : operation = + Tezos.transaction (unit, contract, 10000000mutez) + in let store : storage = {challenge = p.new_challenge} + in ([] : operation list), store diff --git a/src/test/contracts/expected/heap-instance.ligo.expected b/src/test/contracts/expected/heap-instance.ligo.expected new file mode 100644 index 000000000..11b1c58de --- /dev/null +++ b/src/test/contracts/expected/heap-instance.ligo.expected @@ -0,0 +1,6 @@ +type heap_elt is int * string + +function heap_elt_lt (const x : heap_elt; + const y : heap_elt) : bool is x.0 < y.0 + +#include "heap.ligo" diff --git a/src/test/contracts/expected/heap.ligo.expected b/src/test/contracts/expected/heap.ligo.expected new file mode 100644 index 000000000..9ff8f8154 --- /dev/null +++ b/src/test/contracts/expected/heap.ligo.expected @@ -0,0 +1,103 @@ +// Implementation of the heap data structure in PascaLIGO +// See: https://en.wikipedia.org/wiki/Heap_%28data_structure%29 + +type heap is map (nat, heap_elt) + +function is_empty (const h : heap) : bool is size (h) = 0n + +function get_top (const h : heap) : heap_elt is get_force (1n, h) + +function pop_switch (const h : heap) : heap is + block { + const result : heap_elt = get_top (h); + const s : nat = Map.size (h); + const last : heap_elt = + case h[s] of + Some (e) -> e + | None -> (failwith ("No element.") : heap_elt) + end; + remove 1n from map h; + h[1n] := last + } with h + +function pop_ (const h : heap) : nat is + block { + const result : heap_elt = get_top (h); + const s : nat = Map.size (h); + var current : heap_elt := + case h[s] of + Some (e) -> e + | None -> (failwith ("No element.") : heap_elt) + end; + const i : nat = 1n; + const left : nat = 2n * i; + const right : nat = left + 1n; + remove 1n from map h; + h[1n] := current; + var largest : nat := i; + const tmp : heap_elt = get_force (s, h); + if left <= s and heap_elt_lt (tmp, get_force (left,h)) + then largest := left + else + if right <= s and heap_elt_lt (tmp, get_force (right,h)) + then largest := right + else skip + } with largest + +function insert (const h : heap ; const e : heap_elt) : heap is + block { + var i : nat := size (h) + 1n; + h[i] := e; + var largest : nat := i; + var parent : nat := 0n; + while largest =/= i block { + parent := i/2n; + largest := i; + if parent >= 1n then { + if heap_elt_lt (get_force (parent,h), get_force(i,h))) then { + largest := parent; + const tmp : heap_elt = get_force (i,h); + h[i] := get_force(parent, h); + h[parent] := tmp + } else skip + } else skip + } + } with h + +function pop (const h : heap) : heap * heap_elt * nat is + block { + const result : heap_elt = get_top (h); + var s : nat := size (h); + const last : heap_elt = get_force (s,h); + remove s from map h; + h[1n] := last; + s := size (h); + var i : nat := 0n; + var largest : nat := 1n; + var left : nat := 0n; + var right : nat := 0n; + var c : nat := 0n; + while largest =/= i block { + c := c + 1n; + i := largest; + left := 2n * i; + right := left + 1n; + if left <= s then { + if heap_elt_lt (get_force (left,h), get_force(i,h)) then { + largest := left; + const tmp : heap_elt = get_force(i,h); + h[i] := get_force (left, h); + h[left] := tmp + } else skip + } + else + if right <= s then { + if heap_elt_lt (get_force (right, h), get_force (i,h)) then { + largest := right; + const tmp : heap_elt = get_force (i,h); + h[i] := get_force (right, h); + h[left] := tmp + } else skip + } else skip + } + } with (h, result, c) diff --git a/src/test/contracts/expected/high-order.ligo.expected b/src/test/contracts/expected/high-order.ligo.expected new file mode 100644 index 000000000..4a33fd6dd --- /dev/null +++ b/src/test/contracts/expected/high-order.ligo.expected @@ -0,0 +1,40 @@ +function foobar (const i : int) : int is +block { + function foo (const i : int) : int is i; + function bar (const f : int -> int) : int is f (i) +} with bar (foo) + +function higher2 (const i : int; const f : int -> int) + : int is f (i) + +function foobar2 (const i : int) : int is +block { + function foo2 (const i : int) : int is i +} with higher2 (i, foo2) + +const a : int = 0 + +function foobar3 (const i : int) : int is +block { + function foo2 (const i : int) : int is a + i +} with higher2 (i, foo2) + +function f (const i : int) : int is i + +function g (const i : int) : int is f (i) + +function foobar4 (const i : int) : int is g (g (i)) + +function higher3 + (const i : int; + const f : int -> int; + const g : int -> int) : int is f (g (i)) + +function foobar5 (const i : int) : int is +block { + const a : int = 0; + function foo (const i : int) : int is a + i; + function goo (const i : int) : int is foo (i) +} with higher3 (i, foo, goo) + +function foobar6 (const i : int) : int -> int is f diff --git a/src/test/contracts/expected/high-order.religo.expected b/src/test/contracts/expected/high-order.religo.expected new file mode 100644 index 000000000..55cc25b1f --- /dev/null +++ b/src/test/contracts/expected/high-order.religo.expected @@ -0,0 +1,41 @@ +let foobar = (i: int): int => { + let foo: int => int = (i: int) => i; + let bar: ((int => int) => int) = (f: (int => int)) => f(i); + bar(foo) +}; + +let higher2 = (i: int, f: (int => int)): int => { + let ii: int = f(i); + ii +}; + +let foobar2 = (i: int): int => { + let foo2: int => int = (i: int) => i; + higher2(i, foo2) +}; + +let a: int = 0; + +let foobar3 = (i: int): int => { + let foo2: int => int = (i: int) => a + i; + higher2(i, foo2) +}; + +let f = (i: int): int => i; + +let g = (i: int): int => f(i); + +let foobar4 = (i: int): int => g(g(i)); + +let higher3 = (i: int, f: (int => int), g: (int => int)) +: int => { + let ii: int = f(g(i)); + ii +}; + +let foobar5 = (i: int): int => { + let a: int = 0; + let foo: int => int = (i: int) => a + i; + let goo: int => int = (i: int) => foo(i); + higher3(i, foo, goo) +}; diff --git a/src/test/contracts/expected/id.ligo.expected b/src/test/contracts/expected/id.ligo.expected new file mode 100644 index 000000000..d5a8b2b39 --- /dev/null +++ b/src/test/contracts/expected/id.ligo.expected @@ -0,0 +1,164 @@ +type id is int + +type id_details is + record [ + owner : address; + controller : address; + profile : bytes + ] + +type buy is + record [ + profile : bytes; + initial_controller : option (address) + ] + +type update_owner is record [id : id; new_owner : address] + +type update_details is + record [ + id : id; + new_profile : option (bytes); + new_controller : option (address) + ] + +type action is + Buy of buy + | Update_owner of update_owner + | Update_details of update_details + | Skip of unit + +type storage is + record [ + identities : big_map (id, id_details); + next_id : int; + name_price : tez; + skip_price : tez + ] + +function buy + (const parameter : buy; + const storage : storage) : list (operation) * storage is +block { + if amount = storage.name_price + then skip + else failwith ("Incorrect amount paid."); + const profile : bytes = parameter.profile; + const initial_controller : option (address) + = parameter.initial_controller; + var identities : big_map (id, id_details) + := storage.identities; + const new_id : int = storage.next_id; + const controller : address + = case initial_controller of [ + Some (addr) -> addr + | None -> sender + ]; + const new_id_details : id_details + = record [ + owner = sender; + controller = controller; + profile = profile + ]; + identities [new_id] := new_id_details +} with + ((nil : list (operation)), + storage with + record [identities = identities; next_id = new_id + 1 + ]) + +function update_owner + (const parameter : update_owner; + const storage : storage) : list (operation) * storage is +block { + if (amount =/= 0mutez) + then + block { + failwith ("Updating owner doesn't cost anything.") + } + else skip; + const id : int = parameter.id; + const new_owner : address = parameter.new_owner; + var identities : big_map (id, id_details) + := storage.identities; + const id_details : id_details + = case identities [id] of [ + Some (id_details) -> id_details + | None -> + (failwith ("This ID does not exist.") : id_details) + ]; + if sender = id_details.owner + then skip + else failwith ("You are not the owner of this ID."); + id_details.owner := new_owner; + identities [id] := id_details +} with + ((nil : list (operation)), + storage with + record [identities = identities]) + +function update_details + (const parameter : update_details; + const storage : storage) : list (operation) * storage is +block { + if (amount =/= 0mutez) + then failwith ("Updating details doesn't cost anything.") + else skip; + const id : int = parameter.id; + const new_profile : option (bytes) = parameter.new_profile; + const new_controller : option (address) + = parameter.new_controller; + const identities : big_map (id, id_details) + = storage.identities; + const id_details : id_details + = case identities [id] of [ + Some (id_details) -> id_details + | None -> + (failwith ("This ID does not exist.") : id_details) + ]; + if (sender = id_details.controller) + or (sender = id_details.owner) + then skip + else + failwith + ("You are not the owner or controller of this ID."); + const owner : address = id_details.owner; + const profile : bytes + = case new_profile of [ + None -> id_details.profile + | Some (new_profile) -> new_profile + ]; + const controller : address + = case new_controller of [ + None -> id_details.controller + | Some (new_controller) -> new_controller + ]; + id_details.owner := owner; + id_details.controller := controller; + id_details.profile := profile; + identities [id] := id_details +} with + ((nil : list (operation)), + storage with + record [identities = identities]) + +function skip_ (const p : unit; const storage : storage) + : list (operation) * storage is +block { + if amount = storage.skip_price + then skip + else failwith ("Incorrect amount paid.") +} with + ((nil : list (operation)), + storage with + record [next_id = storage.next_id + 1]) + +function main + (const action : action; + const storage : storage) : list (operation) * storage is + case action of [ + Buy (b) -> buy (b, storage) + | Update_owner (uo) -> update_owner (uo, storage) + | Update_details (ud) -> update_details (ud, storage) + | Skip (s) -> skip_ (unit, storage) + ] diff --git a/src/test/contracts/expected/implicit_account.ligo.expected b/src/test/contracts/expected/implicit_account.ligo.expected new file mode 100644 index 000000000..cf8f0eaae --- /dev/null +++ b/src/test/contracts/expected/implicit_account.ligo.expected @@ -0,0 +1,2 @@ +function main (const kh : key_hash) : contract (unit) is + Tezos.implicit_account (kh) diff --git a/src/test/contracts/expected/implicit_account.religo.expected b/src/test/contracts/expected/implicit_account.religo.expected new file mode 100644 index 000000000..0a679da2c --- /dev/null +++ b/src/test/contracts/expected/implicit_account.religo.expected @@ -0,0 +1,2 @@ +let main = (kh: key_hash): contract(unit) => + Tezos.implicit_account(kh); diff --git a/src/test/contracts/expected/included.ligo.expected b/src/test/contracts/expected/included.ligo.expected new file mode 100644 index 000000000..3f0a2d1ca --- /dev/null +++ b/src/test/contracts/expected/included.ligo.expected @@ -0,0 +1 @@ +const foo : int = 144 diff --git a/src/test/contracts/expected/included.religo.expected b/src/test/contracts/expected/included.religo.expected new file mode 100644 index 000000000..7ef8a7b77 --- /dev/null +++ b/src/test/contracts/expected/included.religo.expected @@ -0,0 +1 @@ +let foo: int = 144; diff --git a/src/test/contracts/expected/includer.ligo.expected b/src/test/contracts/expected/includer.ligo.expected new file mode 100644 index 000000000..30f7ae052 --- /dev/null +++ b/src/test/contracts/expected/includer.ligo.expected @@ -0,0 +1,3 @@ +const foo : int = 144 + +const bar : int = foo diff --git a/src/test/contracts/expected/includer.religo.expected b/src/test/contracts/expected/includer.religo.expected new file mode 100644 index 000000000..cd520f441 --- /dev/null +++ b/src/test/contracts/expected/includer.religo.expected @@ -0,0 +1,3 @@ +let foo: int = 144; + +let bar: int = foo; diff --git a/src/test/contracts/expected/isnat.ligo.expected b/src/test/contracts/expected/isnat.ligo.expected new file mode 100644 index 000000000..1d2a4dfda --- /dev/null +++ b/src/test/contracts/expected/isnat.ligo.expected @@ -0,0 +1 @@ +function main (const i : int) : option (nat) is is_nat (i) diff --git a/src/test/contracts/expected/key_hash.ligo.expected b/src/test/contracts/expected/key_hash.ligo.expected new file mode 100644 index 000000000..f1d1219be --- /dev/null +++ b/src/test/contracts/expected/key_hash.ligo.expected @@ -0,0 +1,6 @@ +function check_hash_key + (const kh1 : key_hash; + const k2 : key) : bool * key_hash is +block { + var kh2 : key_hash := Crypto.hash_key (k2) +} with ((kh1 = kh2), kh2) diff --git a/src/test/contracts/expected/key_hash.religo.expected b/src/test/contracts/expected/key_hash.religo.expected new file mode 100644 index 000000000..a334e7140 --- /dev/null +++ b/src/test/contracts/expected/key_hash.religo.expected @@ -0,0 +1,6 @@ +let check_hash_key = (kh1_k2: (key_hash, key)) +: (bool, key_hash) => { + let (kh1, k2) = kh1_k2; + let kh2: key_hash = Crypto.hash_key(k2); + ((kh1 == kh2), kh2) +}; diff --git a/src/test/contracts/expected/key_hash_comparable.ligo.expected b/src/test/contracts/expected/key_hash_comparable.ligo.expected new file mode 100644 index 000000000..1238ee547 --- /dev/null +++ b/src/test/contracts/expected/key_hash_comparable.ligo.expected @@ -0,0 +1,10 @@ +type storage is + record [ + one : map (key_hash, nat); + two : big_map (key_hash, bool) + ] + +type return is list (operation) * storage + +function main (const a : int; const store : storage) + : return is ((nil : list (operation)), store) diff --git a/src/test/contracts/expected/lambda.ligo.expected b/src/test/contracts/expected/lambda.ligo.expected new file mode 100644 index 000000000..f796dff08 --- /dev/null +++ b/src/test/contracts/expected/lambda.ligo.expected @@ -0,0 +1,4 @@ +function f (const x : unit) : unit is Unit + +function main (const p : unit; const s : unit) : unit is + f (Unit) diff --git a/src/test/contracts/expected/lambda.religo.expected b/src/test/contracts/expected/lambda.religo.expected new file mode 100644 index 000000000..46728296f --- /dev/null +++ b/src/test/contracts/expected/lambda.religo.expected @@ -0,0 +1,4 @@ +type storage = unit; + +let main = ((p, s): (unit, storage)): unit => + (((useless: unit)) => ())(()); diff --git a/src/test/contracts/expected/lambda2.religo.expected b/src/test/contracts/expected/lambda2.religo.expected new file mode 100644 index 000000000..988de4d37 --- /dev/null +++ b/src/test/contracts/expected/lambda2.religo.expected @@ -0,0 +1,4 @@ +type storage = unit; + +let main = ((a, s): (unit, storage)): unit => + ((f: (unit => unit)) => f(()))((useless: unit) => unit); diff --git a/src/test/contracts/expected/let_multiple.religo.expected b/src/test/contracts/expected/let_multiple.religo.expected new file mode 100644 index 000000000..9292412d7 --- /dev/null +++ b/src/test/contracts/expected/let_multiple.religo.expected @@ -0,0 +1,13 @@ +let ((x: int), (y: int)) = (1, 2); + +let main = (p: unit): int => x + y; + +let ((x: int), (y: int)) = (3, 3); + +let main_paren = (p: unit): int => x + y; + +let foobar: (int, int) = (23, 42); + +let ((foo: int), (bar: int)) = foobar; + +let non_tuple_rhs = (p: unit): int => foo + bar; diff --git a/src/test/contracts/expected/letin.religo.expected b/src/test/contracts/expected/letin.religo.expected new file mode 100644 index 000000000..7668015e1 --- /dev/null +++ b/src/test/contracts/expected/letin.religo.expected @@ -0,0 +1,32 @@ +type storage = (int, int); + +let main = (n: (int, storage)): (list(operation), storage) => { + let x: (int, int) = { + let x: int = 7; + (x + n[0], n[1][0] + n[1][1]) + }; + ([] : 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 +}; diff --git a/src/test/contracts/expected/list.ligo.expected b/src/test/contracts/expected/list.ligo.expected new file mode 100644 index 000000000..037ea9069 --- /dev/null +++ b/src/test/contracts/expected/list.ligo.expected @@ -0,0 +1,32 @@ +type foobar is list (int) + +const fb : foobar = list [23; 42] + +const fb2 : foobar = 144 # fb + +const fb3 : foobar = cons (688, fb2) + +function size_ (const m : foobar) : nat is size (m) + +const bl : foobar = list [144; 51; 42; 120; 421] + +function fold_op (const s : list (int)) : int is +block { + function aggregate (const prec : int; const cur : int) + : int is prec + cur +} with List.fold (aggregate, s, 10) + +function iter_op (const s : list (int)) : int is +block { + var r : int := 0; + function aggregate (const i : int) : unit is + block { + r := r + i + } with unit; + List.iter (aggregate, s) +} with r + +function map_op (const s : list (int)) : list (int) is +block { + function increment (const i : int) : int is i + 1 +} with List.map (increment, s) diff --git a/src/test/contracts/expected/list.religo.expected b/src/test/contracts/expected/list.religo.expected new file mode 100644 index 000000000..e2c2c6867 --- /dev/null +++ b/src/test/contracts/expected/list.religo.expected @@ -0,0 +1,35 @@ +type storage = (int, list(int)); + +type parameter = list(int); + +type return = (list(operation), storage); + +let x: list(int) = []; + +let y: list(int) = [3, 4, 5]; + +let z: list(int) = [2, ...y]; + +let main = ((action, s): (parameter, storage)): return => { + let storage = + switch(action) { + | [] => s + | [hd, ...tl] => (s[0] + hd, tl) + }; + ([] : list(operation), storage) +}; + +let size_ = (s: list(int)): nat => List.length(s); + +let fold_op = (s: list(int)): int => { + let aggregate = (t: (int, int)) => t[0] + t[1]; + List.fold(aggregate, s, 10) +}; + +let map_op = (s: list(int)): list(int) => + List.map((cur: int) => cur + 1, s); + +let iter_op = (s: list(int)): unit => { + let do_nothing = (useless: int) => unit; + List.iter(do_nothing, s) +}; diff --git a/src/test/contracts/expected/loop.ligo.expected b/src/test/contracts/expected/loop.ligo.expected new file mode 100644 index 000000000..7a8e40b8a --- /dev/null +++ b/src/test/contracts/expected/loop.ligo.expected @@ -0,0 +1,231 @@ +function counter (var n : nat) : nat is +block { + var i : nat := 0n; + while i < n + block { + i := i + 1n + } +} with i + +function while_sum (var n : nat) : nat is +block { + var i : nat := 0n; + var r : nat := 0n; + while i < n + block { + i := i + 1n; + r := r + i + } +} with r + +function for_sum (var n : nat) : int is +block { + var acc : int := 0; + for i := 1 to int (n) + block { + acc := acc + i + } +} with acc + +function for_sum_step (var n : nat) : int is +block { + var acc : int := 0; + for i := 1 to int (2n * n) step 2 + block { + acc := acc + i + } +} with acc + +function for_collection_list (var nee : unit) + : (int * string) is +block { + var acc : int := 0; + var st : string := "to"; + var mylist : list (int) := list [1; 1; 1]; + for x in list mylist + block { + acc := acc + x; + st := st ^ "to" + } +} with (acc, st) + +function for_collection_set (var nee : unit) + : int * string is +block { + var acc : int := 0; + var st : string := "to"; + var myset : set (int) := set [1; 2; 3]; + for x in set myset + block { + acc := acc + x; + st := st ^ "to" + } +} with (acc, st) + +function for_collection_if_and_local_var (var nee : unit) + : int is +block { + var acc : int := 0; + const theone : int = 1; + const thetwo : int = 2; + var myset : set (int) := set [1; 2; 3]; + for x in set myset + block { + if x = theone + then acc := acc + x + else + if x = thetwo + then acc := acc + thetwo + else acc := acc + 10 + } +} with acc + +function for_collection_rhs_capture (var nee : unit) + : int is +block { + var acc : int := 0; + const mybigint : int = 1000; + var myset : set (int) := set [1; 2; 3]; + for x in set myset + block { + if x = 1 then acc := acc + mybigint else acc := acc + 10 + } +} with acc + +function for_collection_proc_call (var nee : unit) : int is +block { + var acc : int := 0; + var myset : set (int) := set [1; 2; 3]; + for x in set myset + block { + if x = 1 + then acc := acc + for_collection_rhs_capture (unit) + else acc := acc + 10 + } +} with acc + +function for_collection_comp_with_acc (var nee : unit) + : int is +block { + var myint : int := 0; + var mylist : list (int) := list [1; 10; 15]; + for x in list mylist + block { + if x < myint then skip else myint := myint + 10 + } +} with myint + +function for_collection_with_patches (var nee : unit) + : map (string, int) is +block { + var myint : int := 12; + var mylist : list (string) := list ["I"; "am"; "foo"]; + var mymap : map (string, int) := map []; + for x in list mylist + block { + patch mymap with map [x -> myint] + } +} with mymap + +function for_collection_empty (var nee : unit) : int is +block { + var acc : int := 0; + var myset : set (int) := set [1; 2; 3]; + for x in set myset + block { + skip + } +} with acc + +function for_collection_map_kv (var nee : unit) + : int * string is +block { + var acc : int := 0; + var st : string := ""; + var mymap : map (string, int) + := map ["1" -> 1; "2" -> 2; "3" -> 3]; + for k -> v in map mymap + block { + acc := acc + v; + st := st ^ k + } +} with (acc, st) + +function for_collection_map_k (var nee : unit) : string is +block { + var st : string := ""; + var mymap : map (string, int) + := map ["1" -> 1; "2" -> 2; "3" -> 3]; + for k in map mymap + block { + st := st ^ k + } +} with st + +function nested_for_collection (var nee : unit) + : int * string is +block { + var myint : int := 0; + var mystoo : string := ""; + var mylist : list (int) := list [1; 2; 3]; + var mymap : map (string, string) + := map [" one" -> ","; "two" -> " "]; + for i in list mylist + block { + myint := myint + i; + var myset : set (string) := set ["1"; "2"; "3"]; + for st in set myset + block { + myint := myint + i; + mystoo := mystoo ^ st; + for k -> v in map mymap + block { + mystoo := mystoo ^ k ^ v + } + } + } +} with (myint, mystoo) + +function nested_for_collection_local_var (var nee : unit) + : int * string is +block { + var myint : int := 0; + var myst : string := ""; + var mylist : list (int) := list [1; 2; 3]; + for i in list mylist + block { + var myst_loc : string := ""; + myint := myint + i; + var myset : set (string) := set ["1"; "2"; "3"]; + for st in set myset + block { + myint := myint + i; + myst_loc := myst_loc ^ st + }; + myst := myst_loc ^ myst + } +} with (myint, myst) + +function dummy (const n : nat) : nat is +block { + while False + block { + skip + } +} with n + +function inner_capture_in_conditional_block (var nee : unit) + : bool * int is +block { + var count : int := 1; + var ret : bool := False; + var mylist : list (int) := list [1; 2; 3]; + for it1 in list mylist + block { + for it2 in list mylist + block { + if count = it2 then ret := not (ret) else skip + }; + count := count + 1 + } +} with (ret, count) diff --git a/src/test/contracts/expected/loop.religo.expected b/src/test/contracts/expected/loop.religo.expected new file mode 100644 index 000000000..18fa276e6 --- /dev/null +++ b/src/test/contracts/expected/loop.religo.expected @@ -0,0 +1,47 @@ +let rec aux_simple = (i: int): int => + if (i < 100) { + aux_simple(i + 1) + } else { + i + }; + +let counter_simple = (n: int): int => aux_simple(n); + +type sum_aggregator = {counter: int, sum: int }; + +let counter = (n: int): int => { + let initial: sum_aggregator = { + counter: 0, + sum: 0 + }; + let rec aggregate = (prev: sum_aggregator): int => + if (prev.counter <= n) { + + + aggregate({ + counter: prev.counter + 1, + sum: prev.counter + prev.sum + }) + } else { + prev.sum + }; + aggregate(initial) +}; + +let rec aux_nest = (prev: sum_aggregator): sum_aggregator => + if (prev.counter < 100) { + + let sum: int = prev.sum + aux_simple(prev.counter); + aux_nest({counter: prev.counter + 1, sum: sum }) + } else { + ({counter: prev.counter, sum: prev.sum }) + }; + +let counter_nest = (n: int): int => { + let initial: sum_aggregator = { + counter: 0, + sum: 0 + }; + let out: sum_aggregator = aux_nest(initial); + out.sum +}; diff --git a/src/test/contracts/expected/loop_bugs.ligo.expected b/src/test/contracts/expected/loop_bugs.ligo.expected new file mode 100644 index 000000000..4687969d7 --- /dev/null +++ b/src/test/contracts/expected/loop_bugs.ligo.expected @@ -0,0 +1,23 @@ +function shadowing_in_body (var nee : unit) : string is +block { + var st : string := ""; + var list1 : list (string) := list ["to"; "to"]; + for x in list list1 + block { + const x : string = "ta"; + st := st ^ x + } +} with st + +function shadowing_assigned_in_body (var nee : unit) + : string is +block { + var st : string := ""; + var list1 : list (string) := list ["to"; "to"]; + for x in list list1 + block { + st := st ^ x; + var st : string := "ta"; + st := st ^ x + } +} with st diff --git a/src/test/contracts/expected/map.ligo.expected b/src/test/contracts/expected/map.ligo.expected new file mode 100644 index 000000000..2f52f4e84 --- /dev/null +++ b/src/test/contracts/expected/map.ligo.expected @@ -0,0 +1,66 @@ +type foobar is map (int, int) + +const empty_map : foobar = map [] + +const map1 : foobar += map [144 -> 23; 51 -> 23; 42 -> 23; 120 -> 23; 421 -> 23] + +const map2 : foobar = map [23 -> 0; 42 -> 0] + +function set_ (var n : int; var m : foobar) : foobar is +block { + m [23] := n +} with m + +function add (var n : int; var m : foobar) : foobar is + set_ (n, m) + +function rm (var m : foobar) : foobar is +block { + remove 42 from map m +} with m + +function patch_ (var m : foobar) : foobar is +block { + patch m with map [0 -> 5; 1 -> 6; 2 -> 7] +} with m + +function patch_deep (var m : foobar * nat) : foobar * nat is +block { + patch m.0 with map [1 -> 9] +} with m + +function size_ (const m : foobar) : nat is Map.size (m) + +function get (const m : foobar) : option (int) is m [42] + +function mem (const k : int; const m : foobar) : bool is + Map.mem (k, m) + +function iter_op (const m : foobar) : unit is +block { + function aggregate (const i : int; const j : int) + : unit is + block { + if i = j then skip else failwith ("fail") + } with unit +} with Map.iter (aggregate, m) + +function map_op (const m : foobar) : foobar is +block { + function increment (const i : int; const j : int) : int is + j + 1 +} with Map.map (increment, m) + +function fold_op (const m : foobar) : int is +block { + function aggregate (const i : int; const j : int * int) + : int is i + j.0 + j.1 +} with Map.fold (aggregate, m, 10) + +function deep_op (var m : foobar) : foobar is +block { + var coco : int * foobar := (0, m); + remove 42 from map coco.1; + coco.1 [32] := 16 +} with coco.1 diff --git a/src/test/contracts/expected/map.religo.expected b/src/test/contracts/expected/map.religo.expected new file mode 100644 index 000000000..0106bca64 --- /dev/null +++ b/src/test/contracts/expected/map.religo.expected @@ -0,0 +1,59 @@ +type foobar = map(int, int); + +let empty_map: foobar = Map.empty; + +let map1: foobar = + + Map.literal([(144, 23), + (51, 23), + (42, 23), + (120, 23), + (421, 23)]); + +let map2: foobar = Map.literal([(23, 0), (42, 0)]); + +let set_ = (n: int, m: foobar): foobar => + Map.update(23, Some (n), m); + +let add = (n: int, m: foobar): foobar => Map.add(23, n, m); + +let rm = (m: foobar): foobar => Map.remove(42, m); + +let patch_ = (m: foobar): foobar => + Map.literal([(0, 5), (1, 6), (2, 7)]); + +let patch_empty = (m: foobar): foobar => + Map.literal([(0, 0), (1, 1), (2, 2)]); + +let patch_deep = (m: (foobar, nat)): (foobar, nat) => + (Map.literal([(0, 0), (1, 9), (2, 2)]), 10n); + +let size_ = (m: foobar): nat => Map.size(m); + +let get = (m: foobar): option(int) => Map.find_opt(42, m); + +let get_ = (m: foobar): option(int) => Map.find_opt(42, m); + +let mem = (km: (int, foobar)): bool => Map.mem(km[0], km[1]); + +let iter_op = (m: foobar): unit => { + let assert_eq = (i: int, j: int) => assert(i == j); + Map.iter(assert_eq, m) +}; + +let map_op = (m: foobar): foobar => { + let increment = (z: int, j: int) => j + 1; + Map.map(increment, m) +}; + +let fold_op = (m: foobar): foobar => { + let aggregate = (i: int, j: (int, int)) => i + j[0] + j[1]; + Map.fold(aggregate, m, 10) +}; + +let deep_op = (m: foobar): foobar => { + let coco = (0, m); + let coco = (0, Map.remove(42, coco[1])); + let coco = (0, Map.update(32, Some (16), coco[1])); + coco[1] +}; diff --git a/src/test/contracts/expected/match.ligo.expected b/src/test/contracts/expected/match.ligo.expected new file mode 100644 index 000000000..1aca68682 --- /dev/null +++ b/src/test/contracts/expected/match.ligo.expected @@ -0,0 +1,36 @@ +function match_bool (const i : int) : int is +block { + var result : int := 23; + case i = 2 of [ + True -> result := 42 + | False -> result := 0 + ] +} with result + +function match_option (const o : option (int)) : int is +block { + var result : int := 23; + case o of [ + None -> skip + | Some (s) -> result := s + ] +} with result + +function match_expr_bool (const i : int) : int is + case i = 2 of [ + True -> 42 + | False -> 0 + ] + +function match_expr_option (const o : option (int)) : int is + case o of [ + None -> 42 + | Some (s) -> s + ] + +function match_expr_list (const l : list (int)) : int is + case l of [ + nil -> -1 + | hd # + tl -> hd + ] diff --git a/src/test/contracts/expected/match.religo.expected b/src/test/contracts/expected/match.religo.expected new file mode 100644 index 000000000..be17f120e --- /dev/null +++ b/src/test/contracts/expected/match.religo.expected @@ -0,0 +1,14 @@ +type storage = int; + +type parameter = Add(int) | Sub(int); + +type return = (list(operation), storage); + +let main = ((action, store): (parameter, storage)) => { + let store = + store + (switch(action) { + | Add(n) => n + | Sub(n) => -n + }); + (([] : list(operation)), store) +}; diff --git a/src/test/contracts/expected/match_bis.religo.expected b/src/test/contracts/expected/match_bis.religo.expected new file mode 100644 index 000000000..7df5fd566 --- /dev/null +++ b/src/test/contracts/expected/match_bis.religo.expected @@ -0,0 +1,16 @@ +type storage = int; + +type parameter = Increment(int) | Decrement(int); + +let add = ((a: int), (b: int)) => a + b; + +let sub = ((a: int), (b: int)) => a - b; + +let main = ((action, store): (parameter, storage)) => { + let store = + switch(action) { + | Increment(n) => add(store, n) + | Decrement(n) => sub(store, n) + }; + (([] : list(operation)), store) +}; diff --git a/src/test/contracts/expected/michelson_or_tree.ligo.expected b/src/test/contracts/expected/michelson_or_tree.ligo.expected new file mode 100644 index 000000000..61754f7bb --- /dev/null +++ b/src/test/contracts/expected/michelson_or_tree.ligo.expected @@ -0,0 +1,13 @@ +type inner_storage is michelson_or (int, "one", nat, "two") + +type storage is + michelson_or (int, "three", inner_storage, "four") + +type return is list (operation) * storage + +function main (const action : unit; const store : storage) + : return is +block { + const foo : storage + = (M_right ((M_left (1) : inner_storage)) : storage) +} with ((nil : list (operation)), (foo : storage)) diff --git a/src/test/contracts/expected/michelson_or_tree_intermediary.ligo.expected b/src/test/contracts/expected/michelson_or_tree_intermediary.ligo.expected new file mode 100644 index 000000000..3864b02ae --- /dev/null +++ b/src/test/contracts/expected/michelson_or_tree_intermediary.ligo.expected @@ -0,0 +1,13 @@ +type inner_storage is michelson_or (int, "one", nat, "two") + +type storage is + michelson_or (int, "three", inner_storage, "") + +type return is list (operation) * storage + +function main (const action : unit; const store : storage) + : return is +block { + const foo : storage + = (M_right ((M_left (1) : inner_storage)) : storage) +} with ((nil : list (operation)), (foo : storage)) diff --git a/src/test/contracts/expected/michelson_pair_tree.ligo.expected b/src/test/contracts/expected/michelson_pair_tree.ligo.expected new file mode 100644 index 000000000..10a2ae985 --- /dev/null +++ b/src/test/contracts/expected/michelson_pair_tree.ligo.expected @@ -0,0 +1,13 @@ +type inner_storage is + michelson_pair (int, "one", nat, "two") + +type storage is + michelson_pair (string, "three", inner_storage, "four") + +type return is list (operation) * storage + +function main (const action : unit; const store : storage) + : return is +block { + const foo : storage = ("foo", (1, 2n)) +} with ((nil : list (operation)), (foo : storage)) diff --git a/src/test/contracts/expected/michelson_pair_tree.religo.expected b/src/test/contracts/expected/michelson_pair_tree.religo.expected new file mode 100644 index 000000000..206fe57e1 --- /dev/null +++ b/src/test/contracts/expected/michelson_pair_tree.religo.expected @@ -0,0 +1,11 @@ +type inner_storage = michelson_pair(int, "one", nat, "two"); + +type storage = michelson_pair + (int, "three", inner_storage, "four"); + +type return = (list(operation), storage); + +let main = ((action, store): (unit, storage)): return => { + let foo = (3, (1, 2n)); + (([] : list(operation)), (foo : storage)) +}; diff --git a/src/test/contracts/expected/michelson_pair_tree_intermediary.ligo.expected b/src/test/contracts/expected/michelson_pair_tree_intermediary.ligo.expected new file mode 100644 index 000000000..848388bc2 --- /dev/null +++ b/src/test/contracts/expected/michelson_pair_tree_intermediary.ligo.expected @@ -0,0 +1,13 @@ +type inner_storage is + michelson_pair (int, "one", nat, "two") + +type storage is + michelson_pair (string, "three", inner_storage, "") + +type return is list (operation) * storage + +function main (const action : unit; const store : storage) + : return is +block { + const foo : storage = ("foo", (1, 2n)) +} with ((nil : list (operation)), (foo : storage)) diff --git a/src/test/contracts/expected/multiple-parameters.ligo.expected b/src/test/contracts/expected/multiple-parameters.ligo.expected new file mode 100644 index 000000000..1788ec658 --- /dev/null +++ b/src/test/contracts/expected/multiple-parameters.ligo.expected @@ -0,0 +1,14 @@ +function ab (const a : int; const b : int) : int is a + b + +function abcd + (const a : int; + const b : int; + const c : int; + const d : int) : int is a + b + c + d + 2 + +function abcde + (const a : int; + const b : int; + const c : int; + const d : int; + const e : int) : int is c + e + 3 diff --git a/src/test/contracts/expected/multiple-parameters.religo.expected b/src/test/contracts/expected/multiple-parameters.religo.expected new file mode 100644 index 000000000..aae363564 --- /dev/null +++ b/src/test/contracts/expected/multiple-parameters.religo.expected @@ -0,0 +1,6 @@ +let abcde_curried = (a: int, b: int, c: int, d: int, e: int) +: int => + c + e + 3; + +let abcde = (x: (int, int, int, int, int)): int => + abcde_curried(x[0], x[1], x[2], x[3], x[4]); diff --git a/src/test/contracts/expected/multisig-v2.ligo.expected b/src/test/contracts/expected/multisig-v2.ligo.expected new file mode 100644 index 000000000..3690c90a7 --- /dev/null +++ b/src/test/contracts/expected/multisig-v2.ligo.expected @@ -0,0 +1,129 @@ +type threshold is nat + +type max_proposal is nat + +type max_message_size is nat + +type state_hash is bytes + +type addr_set is set (address) + +type message_store is map (bytes, addr_set) + +type proposal_counters is map (address, nat) + +type storage is + record [ + state_hash : state_hash; + threshold : threshold; + max_proposal : max_proposal; + max_message_size : max_message_size; + authorized_addresses : addr_set; + message_store : message_store; + proposal_counters : proposal_counters + ] + +type message is bytes -> list (operation) + +type send_pt is message + +type withdraw_pt is message + +type default_pt is unit + +type return is list (operation) * storage + +type parameter is + Send of send_pt + | Withdraw of withdraw_pt + | Default of default_pt + +function send (const param : send_pt; const s : storage) + : return is +block { + if not Set.mem (Tezos.sender, s.authorized_addresses) + then failwith ("Unauthorized address") + else skip; + var message : message := param; + const packed_msg : bytes = Bytes.pack (message); + if Bytes.length (packed_msg) > s.max_message_size + then failwith ("Message size exceed maximum limit") + else skip; + var new_store : addr_set := set []; + case map_get (packed_msg, s.message_store) of [ + Some (voters) -> + block { + if Set.mem (Tezos.sender, voters) + then skip + else + s.proposal_counters [Tezos.sender] := + get_force (Tezos.sender, s.proposal_counters) + + 1n; + new_store := Set.add (Tezos.sender, voters) + } + | None -> + block { + s.proposal_counters [sender] := + get_force (Tezos.sender, s.proposal_counters) + 1n; + new_store := set [Tezos.sender] + } + ]; + var sender_proposal_counter : nat + := get_force (Tezos.sender, s.proposal_counters); + if sender_proposal_counter > s.max_proposal + then failwith ("Maximum number of proposal reached") + else skip; + var ret_ops : list (operation) := nil; + if Set.cardinal (new_store) >= s.threshold + then { + remove packed_msg from map s.message_store; + ret_ops := message (s.state_hash); + s.state_hash := + Crypto.sha256 + (Bytes.concat (s.state_hash, packed_msg)); + for addr -> ctr in map s.proposal_counters + block { + if Set.mem (addr, new_store) + then s.proposal_counters [addr] := abs (ctr - 1n) + else skip + } + } + else s.message_store [packed_msg] := new_store +} with (ret_ops, s) + +function withdraw + (const param : withdraw_pt; + const s : storage) : return is +block { + var message : message := param; + const packed_msg : bytes = Bytes.pack (message); + case s.message_store [packed_msg] of [ + Some (voters) -> + block { + const new_set : addr_set + = Set.remove (Tezos.sender, voters); + if Set.cardinal (voters) =/= Set.cardinal (new_set) + then + s.proposal_counters [Tezos.sender] := + abs + (get_force (Tezos.sender, s.proposal_counters) + - 1n) + else skip; + if Set.cardinal (new_set) = 0n + then remove packed_msg from map s.message_store + else s.message_store [packed_msg] := new_set + } + | None -> skip + ] +} with ((nil : list (operation)), s) + +function default (const p : default_pt; const s : storage) + : return is ((nil : list (operation)), s) + +function main (const param : parameter; const s : storage) + : return is + case param of [ + Send (p) -> send (p, s) + | Withdraw (p) -> withdraw (p, s) + | Default (p) -> default (p, s) + ] diff --git a/src/test/contracts/expected/multisig.ligo.expected b/src/test/contracts/expected/multisig.ligo.expected new file mode 100644 index 000000000..a1dd67ccf --- /dev/null +++ b/src/test/contracts/expected/multisig.ligo.expected @@ -0,0 +1,73 @@ +type counter is nat + +type threshold is nat + +type authorized_keys is list (key) + +type id is string + +type storage is + record [ + id : id; + counter : counter; + threshold : threshold; + auth : authorized_keys + ] + +type message is unit -> list (operation) + +type signatures is list (key_hash * signature) + +type check_message_pt is + record [ + counter : counter; + message : message; + signatures : signatures + ] + +type return is list (operation) * storage + +type parameter is CheckMessage of check_message_pt + +function check_message + (const param : check_message_pt; + const s : storage) : return is +block { + var message : message := param.message; + if param.counter =/= s.counter + then failwith ("Counters does not match") + else { + const packed_payload : bytes + = Bytes.pack + ((message, param.counter, s.id, Tezos.chain_id)); + var valid : nat := 0n; + var keys : authorized_keys := s.auth; + for pkh_sig in list param.signatures + block { + case keys of [ + nil -> skip + | key # + tl -> + block { + keys := tl; + if pkh_sig.0 = Crypto.hash_key (key) + then + if Crypto.check + (key, pkh_sig.1, packed_payload) + then valid := valid + 1n + else failwith ("Invalid signature") + else skip + } + ] + }; + if valid < s.threshold + then failwith ("Not enough signatures passed the check") + else s.counter := s.counter + 1n + } +} with (message (unit), s) + +function main (const param : parameter; const s : storage) + : return is + case param of [ + CheckMessage (p) -> check_message (p, s) + ] diff --git a/src/test/contracts/expected/multisig.religo.expected b/src/test/contracts/expected/multisig.religo.expected new file mode 100644 index 000000000..0161e9fe2 --- /dev/null +++ b/src/test/contracts/expected/multisig.religo.expected @@ -0,0 +1,81 @@ +type counter = nat; + +type threshold = nat; + +type authorized_keys = list(key); + +type id = string; + +type storage = { + id: id, + counter: counter, + threshold: threshold, + auth: authorized_keys +}; + +type message = unit => list(operation); + +type dummy = (key_hash, signature); + +type signatures = list(dummy); + +type check_message_pt = { + counter: counter, + message: message, + signatures: signatures +}; + +type return = (list(operation), storage); + +type parameter = CheckMessage(check_message_pt); + +let check_message = ((param, s): (check_message_pt, storage)) +: return => { + let message: message = param.message; + let s = + if (param.counter != s.counter) { + (failwith("Counters does not match") : storage) + } else { + + let packed_payload: bytes = + Bytes.pack((message, param.counter, s.id, chain_id)); + let valid: nat = 0n; + let keys: authorized_keys = s.auth; + let aux = ((vk, pkh_sig): ((nat, authorized_keys), + (key_hash, signature))): (nat, authorized_keys) => { + let (valid, keys) = vk; + switch(keys) { + | [] => vk + | [key, ...keys] => + if (pkh_sig[0] == Crypto.hash_key(key)) { + + let valid = + if ( + Crypto.check(key, pkh_sig[1], packed_payload)) { + valid + 1n + } else { + (failwith("Invalid signature") : nat) + }; + (valid, keys) + } else { + (valid, keys) + } + } + }; + let (valid, keys) = + List.fold(aux, param.signatures, (valid, keys)); + if (valid < s.threshold) { + + (failwith("Not enough signatures passed the check") + : storage) + } else { + {...s, counter: s.counter + 1n} + } + }; + (message(unit), s) +}; + +let main = ((action, store): (parameter, storage)): return => + switch(action) { + | CheckMessage(p) => check_message((p, store)) + }; diff --git a/src/test/contracts/expected/no_semicolon.religo.expected b/src/test/contracts/expected/no_semicolon.religo.expected new file mode 100644 index 000000000..01c4b5a96 --- /dev/null +++ b/src/test/contracts/expected/no_semicolon.religo.expected @@ -0,0 +1,13 @@ +type f = int; + +let a = (b: f) => { + if (b == 2) { + 3 + } else { + 4 + } +}; + +let c = (c: f) => { + 3 +}; diff --git a/src/test/contracts/expected/option.ligo.expected b/src/test/contracts/expected/option.ligo.expected new file mode 100644 index 000000000..7d14ffd57 --- /dev/null +++ b/src/test/contracts/expected/option.ligo.expected @@ -0,0 +1,12 @@ +type foobar is option (int) + +const s : foobar = Some (42) + +const n : foobar = None + +function assign (var m : int) : foobar is +block { + var coco : foobar := None; + coco := Some (m); + coco := (None : foobar) +} with coco diff --git a/src/test/contracts/expected/pledge.religo.expected b/src/test/contracts/expected/pledge.religo.expected new file mode 100644 index 000000000..8df47dc01 --- /dev/null +++ b/src/test/contracts/expected/pledge.religo.expected @@ -0,0 +1,30 @@ +type storage = address; + +type parameter = + Donate(unit) +| Distribute((unit => list(operation))); + +let donate = ((p, s): (unit, storage)) +: (list(operation), storage) => { + (([] : list(operation)), s) +}; + +let distribute = ((p, s): ((unit => list(operation)), + storage)): (list(operation), storage) => { + if (Tezos.sender == s) { + (p(()), s) + } else { + + ( + failwith("You're not the oracle for this distribution.") + : (list(operation), storage)) + } +}; + +let main = ((p, s): (parameter, storage)) +: (list(operation), storage) => { + switch(p) { + | Donate => donate(((), s)) + | Distribute msg => distribute((msg, s)) + } +}; diff --git a/src/test/contracts/expected/quote-declaration.ligo.expected b/src/test/contracts/expected/quote-declaration.ligo.expected new file mode 100644 index 000000000..d11fa919b --- /dev/null +++ b/src/test/contracts/expected/quote-declaration.ligo.expected @@ -0,0 +1,3 @@ +function foo (const input : int) : int is input + 42 + +function main (const i : int) : int is i + foo (i) diff --git a/src/test/contracts/expected/quote-declarations.ligo.expected b/src/test/contracts/expected/quote-declarations.ligo.expected new file mode 100644 index 000000000..d98fbe15a --- /dev/null +++ b/src/test/contracts/expected/quote-declarations.ligo.expected @@ -0,0 +1,5 @@ +function foo (const input : int) : int is input + 23 + +function bar (const input : int) : int is input + 51 + +function main (const i : int) : int is foo (i) + bar (i) diff --git a/src/test/contracts/expected/record.ligo.expected b/src/test/contracts/expected/record.ligo.expected new file mode 100644 index 000000000..42bed16b0 --- /dev/null +++ b/src/test/contracts/expected/record.ligo.expected @@ -0,0 +1,41 @@ +type foobar is record [foo : int; bar : int] + +const fb : foobar = record [foo = 0; bar = 0] + +type abc is record [a : int; b : int; c : int] + +const abc : abc = record [a = 42; b = 142; c = 242] + +const a : int = abc.a + +const b : int = abc.b + +const c : int = abc.c + +function projection (const r : foobar) : int is + r.foo + r.bar + +function modify (var r : foobar) : foobar is +block { + r.foo := 256 +} with r + +function modify_abc (const r : abc) : abc is +block { + const c : int = 42; + r := r with record [b = 2048; c = c] +} with r + +type big_record is + record [a : int; b : int; c : int; d : int; e : int] + +const br : big_record += record [a = 23; b = 23; c = 23; d = 23; e = 23] + +type double_record is record [inner : abc] + +function modify_inner (const r : double_record) + : double_record is +block { + r := r with record [inner.b = 2048] +} with r diff --git a/src/test/contracts/expected/record.religo.expected b/src/test/contracts/expected/record.religo.expected new file mode 100644 index 000000000..f923c8fd0 --- /dev/null +++ b/src/test/contracts/expected/record.religo.expected @@ -0,0 +1,29 @@ +type foobar = {foo: int, bar: int }; + +let fb: foobar = {foo: 0, bar: 0 }; + +type abc = {a: int, b: int, c: int }; + +let abc: abc = {a: 42, b: 142, c: 242 }; + +let a: int = abc.a; + +let b: int = abc.b; + +let c: int = abc.c; + +let projection = (r: foobar): int => r.foo + r.bar; + +let modify = (r: foobar): foobar => {foo: 256, bar: r.bar }; + +let modify_abc = (r: abc): abc => {...r, b: 2048, c: 42}; + +type big_record = {a: int, b: int, c: int, d: int, e: int }; + +let br: big_record = {a: 23, b: 23, c: 23, d: 23, e: 23 }; + +type double_record = {inner: abc }; + +let modify_inner = (r: double_record): double_record => + {...r, + inner.b: 2048}; diff --git a/src/test/contracts/expected/recursion.ligo.expected b/src/test/contracts/expected/recursion.ligo.expected new file mode 100644 index 000000000..e314beac4 --- /dev/null +++ b/src/test/contracts/expected/recursion.ligo.expected @@ -0,0 +1,9 @@ +recursive function sum (const n : int; const acc : int) + : int is if n < 1 then acc else sum (n - 1, acc + n) + +recursive +function fibo + (const n : int; + const n_1 : int; + const n_0 : int) : int is + if n < 2 then n_1 else fibo (n - 1, n_1 + n_0, n_1) diff --git a/src/test/contracts/expected/recursion.religo.expected b/src/test/contracts/expected/recursion.religo.expected new file mode 100644 index 000000000..9c598e4a3 --- /dev/null +++ b/src/test/contracts/expected/recursion.religo.expected @@ -0,0 +1,13 @@ +let rec sum = ((n, acc): (int, int)): int => + if (n < 1) { + acc + } else { + sum((n - 1, acc + n)) + }; + +let rec fibo = ((n, n_1, n_0): (int, int, int)): int => + if (n < 2) { + n_1 + } else { + fibo((n - 1, n_1 + n_0, n_1)) + }; diff --git a/src/test/contracts/expected/redeclaration.ligo.expected b/src/test/contracts/expected/redeclaration.ligo.expected new file mode 100644 index 000000000..5a22cbe79 --- /dev/null +++ b/src/test/contracts/expected/redeclaration.ligo.expected @@ -0,0 +1,7 @@ +function foo (const p : unit) : int is 0 + +function main (const p : unit; const s : int) + : list (operation) * int is + ((nil : list (operation)), foo (unit)) + +function foo (const p : unit) : int is 1 diff --git a/src/test/contracts/expected/replaceable_id.ligo.expected b/src/test/contracts/expected/replaceable_id.ligo.expected new file mode 100644 index 000000000..770be4682 --- /dev/null +++ b/src/test/contracts/expected/replaceable_id.ligo.expected @@ -0,0 +1,40 @@ +type storage_t is address + +type change_addr_pt is address + +type message_t is list (operation) + +type pass_message_pt is unit -> message_t + +type contract_return_t is list (operation) * storage_t + +type entry_point_t is + Change_address of change_addr_pt + | Pass_message of pass_message_pt + +function change_address + (const param : change_addr_pt; + const s : storage_t) : contract_return_t is +block { + if sender =/= s + then failwith ("Unauthorized sender") + else skip +} with ((nil : list (operation)), param) + +function pass_message + (const param : pass_message_pt; + const s : storage_t) : contract_return_t is +block { + if sender =/= s + then failwith ("Unauthorized sender") + else skip; + var message : pass_message_pt := param +} with (param (unit), s) + +function main + (const param : entry_point_t; + const s : storage_t) : contract_return_t is + case param of [ + Change_address (p) -> change_address (p, s) + | Pass_message (p) -> pass_message (p, s) + ] diff --git a/src/test/contracts/expected/self_address.ligo.expected b/src/test/contracts/expected/self_address.ligo.expected new file mode 100644 index 000000000..fe2f4bb47 --- /dev/null +++ b/src/test/contracts/expected/self_address.ligo.expected @@ -0,0 +1,2 @@ +function main (const p : unit) : address is + Tezos.self_address diff --git a/src/test/contracts/expected/self_address.religo.expected b/src/test/contracts/expected/self_address.religo.expected new file mode 100644 index 000000000..db48e28df --- /dev/null +++ b/src/test/contracts/expected/self_address.religo.expected @@ -0,0 +1 @@ +let main = (p: unit): address => Tezos.self_address; diff --git a/src/test/contracts/expected/self_type_annotation.ligo.expected b/src/test/contracts/expected/self_type_annotation.ligo.expected new file mode 100644 index 000000000..97bcefb75 --- /dev/null +++ b/src/test/contracts/expected/self_type_annotation.ligo.expected @@ -0,0 +1,12 @@ +type parameter is nat + +type storage is int + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + const self_contract : contract (parameter) + = Tezos.self ("%default") +} with ((nil : list (operation)), s) diff --git a/src/test/contracts/expected/self_with_entrypoint.ligo.expected b/src/test/contracts/expected/self_with_entrypoint.ligo.expected new file mode 100644 index 000000000..afea653ae --- /dev/null +++ b/src/test/contracts/expected/self_with_entrypoint.ligo.expected @@ -0,0 +1,14 @@ +type parameter is Default | Toto of int + +type storage is nat + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + const self_contract : contract (int) + = Tezos.self ("%toto"); + const op : operation + = Tezos.transaction (2, 300000000mutez, self_contract) +} with (list [op], s) diff --git a/src/test/contracts/expected/self_without_entrypoint.ligo.expected b/src/test/contracts/expected/self_without_entrypoint.ligo.expected new file mode 100644 index 000000000..7ad2b11c8 --- /dev/null +++ b/src/test/contracts/expected/self_without_entrypoint.ligo.expected @@ -0,0 +1,14 @@ +type parameter is int + +type storage is nat + +type return is list (operation) * storage + +function main (const p : parameter; const s : storage) + : return is +block { + const self_contract : contract (int) + = Tezos.self ("%default"); + const op : operation + = Tezos.transaction (2, 300000000mutez, self_contract) +} with (list [op], s) diff --git a/src/test/contracts/expected/set_arithmetic-1.ligo.expected b/src/test/contracts/expected/set_arithmetic-1.ligo.expected new file mode 100644 index 000000000..45037792b --- /dev/null +++ b/src/test/contracts/expected/set_arithmetic-1.ligo.expected @@ -0,0 +1,15 @@ +function iter_op (const s : set (int)) : int is +block { + var r : int := 0; + function aggregate (const i : int) : unit is + block { + r := r + i + } with unit; + set_iter (aggregate, s) +} with r + +function fold_op (const s : set (int)) : int is +block { + function aggregate (const i : int; const j : int) : int is + i + j +} with set_fold (aggregate, s, 15) diff --git a/src/test/contracts/expected/set_arithmetic.ligo.expected b/src/test/contracts/expected/set_arithmetic.ligo.expected new file mode 100644 index 000000000..28118588b --- /dev/null +++ b/src/test/contracts/expected/set_arithmetic.ligo.expected @@ -0,0 +1,35 @@ +const s_e : set (string) = set_empty + +const s_fb : set (string) = set ["foo"; "bar"] + +function add_op (const s : set (string)) : set (string) is + set_add ("foobar", s) + +function remove_op (const s : set (string)) + : set (string) is set_remove ("foobar", s) + +function remove_syntax (var s : set (string)) + : set (string) is +block { + remove "foobar" from set s +} with s + +function remove_deep (var s : set (string) * nat) + : set (string) * nat is +block { + remove "foobar" from set s.0 +} with s + +function patch_op (var s : set (string)) : set (string) is +block { + patch s with set ["foobar"] +} with s + +function patch_op_deep (var s : set (string) * nat) + : set (string) * nat is +block { + patch s.0 with set ["foobar"] +} with s + +function mem_op (const s : set (string)) : bool is + set_mem ("foobar", s) diff --git a/src/test/contracts/expected/set_arithmetic.religo.expected b/src/test/contracts/expected/set_arithmetic.religo.expected new file mode 100644 index 000000000..23094e255 --- /dev/null +++ b/src/test/contracts/expected/set_arithmetic.religo.expected @@ -0,0 +1,15 @@ +let literal_op = (p: unit): set(string) => + Set.literal(["foo", "bar", "foobar"]); + +let add_op = (s: set(string)): set(string) => + Set.add("foobar", s); + +let remove_op = (s: set(string)): set(string) => + Set.remove("foobar", s); + +let remove_deep = (s: (set(string), nat)): set(string) => + Set.remove("foobar", s[0]); + +let mem_op = (s: set(string)): bool => Set.mem("foobar", s); + +let size_op = (s: set(string)): nat => Set.cardinal(s); diff --git a/src/test/contracts/expected/set_delegate.ligo.expected b/src/test/contracts/expected/set_delegate.ligo.expected new file mode 100644 index 000000000..f26cf195a --- /dev/null +++ b/src/test/contracts/expected/set_delegate.ligo.expected @@ -0,0 +1,5 @@ +function main (const p : key_hash) : list (operation) is +block { + const unused : operation = set_delegate (Some (p)); + const dummy : list (operation) = nil +} with dummy diff --git a/src/test/contracts/expected/set_delegate.religo.expected b/src/test/contracts/expected/set_delegate.religo.expected new file mode 100644 index 000000000..cd18f5538 --- /dev/null +++ b/src/test/contracts/expected/set_delegate.religo.expected @@ -0,0 +1,4 @@ +let main = (p: key_hash): list(operation) => { + let unused: operation = (Tezos.set_delegate(Some (p))); + ([] : list(operation)) +}; diff --git a/src/test/contracts/expected/shadow.ligo.expected b/src/test/contracts/expected/shadow.ligo.expected new file mode 100644 index 000000000..9e94f0f6c --- /dev/null +++ b/src/test/contracts/expected/shadow.ligo.expected @@ -0,0 +1,4 @@ +function foo (const i : int) : int is +block { + function bar (const i : int) : int is i +} with bar (0) diff --git a/src/test/contracts/expected/simple_access.ligo.expected b/src/test/contracts/expected/simple_access.ligo.expected new file mode 100644 index 000000000..e761e1c5b --- /dev/null +++ b/src/test/contracts/expected/simple_access.ligo.expected @@ -0,0 +1,19 @@ +type tpi is int * int + +type rpi is record [x : int; y : int] + +type mpi is map (string, int) + +function main (const toto : tpi) : int is +block { + var a : tpi := toto; + var b : rpi := record [x = 0; y = 1]; + var m : mpi := map ["y" -> 1]; + a.0 := 2; + b.x := a.0; + m ["x"] := b.x +} with + case m ["x"] of [ + Some (s) -> s + | None -> 42 + ] diff --git a/src/test/contracts/expected/single_record_item.religo.expected b/src/test/contracts/expected/single_record_item.religo.expected new file mode 100644 index 000000000..8fc4e2a1e --- /dev/null +++ b/src/test/contracts/expected/single_record_item.religo.expected @@ -0,0 +1,3 @@ +type p = {x: int }; + +let o = (p: int): p => {x: p }; diff --git a/src/test/contracts/expected/string.ligo.expected b/src/test/contracts/expected/string.ligo.expected new file mode 100644 index 000000000..7dd9377be --- /dev/null +++ b/src/test/contracts/expected/string.ligo.expected @@ -0,0 +1,7 @@ +const s : string = "toto" + +const x : string = s ^ "bar" + +const y : string = "foo" ^ x + +const v : string = {|deadbeef|} diff --git a/src/test/contracts/expected/string_arithmetic.ligo.expected b/src/test/contracts/expected/string_arithmetic.ligo.expected new file mode 100644 index 000000000..d76fd041d --- /dev/null +++ b/src/test/contracts/expected/string_arithmetic.ligo.expected @@ -0,0 +1,5 @@ +function concat_op (const s : string) : string is + string_concat (s, "toto") + +function slice_op (const s : string) : string is + string_slice (1n, 2n, s) diff --git a/src/test/contracts/expected/string_arithmetic.religo.expected b/src/test/contracts/expected/string_arithmetic.religo.expected new file mode 100644 index 000000000..396a023e1 --- /dev/null +++ b/src/test/contracts/expected/string_arithmetic.religo.expected @@ -0,0 +1,5 @@ +let size_op = (s: string): nat => String.length(s); + +let slice_op = (s: string): string => String.sub(1n, 2n, s); + +let concat_syntax = (s: string) => s ++ "test_literal"; diff --git a/src/test/contracts/expected/super-counter.ligo.expected b/src/test/contracts/expected/super-counter.ligo.expected new file mode 100644 index 000000000..e10a7ba04 --- /dev/null +++ b/src/test/contracts/expected/super-counter.ligo.expected @@ -0,0 +1,12 @@ +type action is Increment of int | Decrement of int + +type storage is int + +type return is list (operation) * storage + +function main (const p : action; const s : int) : return is + ((nil : list (operation)), + case p of [ + Increment (n) -> s + n + | Decrement (n) -> s - n + ]) diff --git a/src/test/contracts/expected/super-counter.religo.expected b/src/test/contracts/expected/super-counter.religo.expected new file mode 100644 index 000000000..675f49db8 --- /dev/null +++ b/src/test/contracts/expected/super-counter.religo.expected @@ -0,0 +1,14 @@ +type parameter = Increment(int) | Decrement(int); + +type storage = int; + +type return = (list(operation), storage); + +let main = ((action, store): (parameter, storage)): return => { + let store = + switch(action) { + | Increment(n) => store + n + | Decrement(n) => store - n + }; + ([] : list(operation), store) +}; diff --git a/src/test/contracts/expected/tez.ligo.expected b/src/test/contracts/expected/tez.ligo.expected new file mode 100644 index 000000000..15573508a --- /dev/null +++ b/src/test/contracts/expected/tez.ligo.expected @@ -0,0 +1,21 @@ +const add_tez : tez = 21mutez + 21mutez + +const sub_tez : tez = 21mutez - 20mutez + +const not_enough_tez : tez = 4611686018427387903mutez + +const nat_mul_tez : tez = 1n * 100mutez + +const tez_mul_nat : tez = 100mutez * 10n + +const tez_div_tez1 : nat = 100mutez / 1mutez + +const tez_div_tez2 : nat = 100mutez / 90mutez + +const tez_div_tez3 : nat = 100mutez / 110mutez + +const tez_mod_tez1 : tez = 100mutez mod 1mutez + +const tez_mod_tez2 : tez = 100mutez mod 90mutez + +const tez_mod_tez3 : tez = 100mutez mod 110mutez diff --git a/src/test/contracts/expected/time-lock.ligo.expected b/src/test/contracts/expected/time-lock.ligo.expected new file mode 100644 index 000000000..96f6c1c4d --- /dev/null +++ b/src/test/contracts/expected/time-lock.ligo.expected @@ -0,0 +1,34 @@ +type storage_t is timestamp + +type message_t is unit -> list (operation) + +type default_pt is unit + +type call_pt is message_t + +type contract_return_t is list (operation) * storage_t + +type entry_point_t is + Call of call_pt + | Default of default_pt + +function call (const p : call_pt; const s : storage_t) + : contract_return_t is +block { + if s >= now + then failwith ("Contract is still time locked") + else skip; + const message : message_t = p; + const ret_ops : list (operation) = message (unit) +} with (ret_ops, s) + +function default (const p : default_pt; const s : storage_t) + : contract_return_t is ((nil : list (operation)), s) + +function main + (const param : entry_point_t; + const s : storage_t) : contract_return_t is + case param of [ + Call (p) -> call (p, s) + | Default (p) -> default (p, s) + ] diff --git a/src/test/contracts/expected/timestamp.ligo.expected b/src/test/contracts/expected/timestamp.ligo.expected new file mode 100644 index 000000000..2156b166d --- /dev/null +++ b/src/test/contracts/expected/timestamp.ligo.expected @@ -0,0 +1,5 @@ +type storage_ is timestamp + +function main (const p : unit; const s : storage_) + : list (operation) * storage_ is + ((nil : list (operation)), now) diff --git a/src/test/contracts/expected/toto.ligo.expected b/src/test/contracts/expected/toto.ligo.expected new file mode 100644 index 000000000..6fd888e1c --- /dev/null +++ b/src/test/contracts/expected/toto.ligo.expected @@ -0,0 +1,3 @@ +type toto is record [a : nat; b : nat] + +const foo : int = 3 diff --git a/src/test/contracts/expected/tuple.ligo.expected b/src/test/contracts/expected/tuple.ligo.expected new file mode 100644 index 000000000..13bd93377 --- /dev/null +++ b/src/test/contracts/expected/tuple.ligo.expected @@ -0,0 +1,27 @@ +type abc is int * int * int + +function projection_abc (const tpl : abc) : int is tpl.1 + +function modify_abc (const tpl : abc) : abc is +block { + tpl.1 := 2048 +} with tpl + +type foobar is int * int + +const fb : foobar = (0, 0) + +function projection (const tpl : foobar) : int is + tpl.0 + tpl.1 + +type big_tuple is + int * int * int * int * int * int * int * int * int * + int * int * int + +const br : big_tuple += (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) + +function update (const tpl : big_tuple) : big_tuple is +block { + tpl.11 := 2048 +} with tpl diff --git a/src/test/contracts/expected/tuple.religo.expected b/src/test/contracts/expected/tuple.religo.expected new file mode 100644 index 000000000..d9c25255e --- /dev/null +++ b/src/test/contracts/expected/tuple.religo.expected @@ -0,0 +1,13 @@ +type abc = (int, int, int); + +let projection_abc = (tpl: abc): int => tpl[1]; + +type foobar = (int, int); + +let fb: foobar = (0, 0); + +let projection = (tpl: foobar): int => tpl[0] + tpl[1]; + +type big_tuple = (int, int, int, int, int); + +let br: big_tuple = (23, 23, 23, 23, 23); diff --git a/src/test/contracts/expected/tuple_list.religo.expected b/src/test/contracts/expected/tuple_list.religo.expected new file mode 100644 index 000000000..534159047 --- /dev/null +++ b/src/test/contracts/expected/tuple_list.religo.expected @@ -0,0 +1,3 @@ +type z = list((int, int)); + +let o: z = [(2, 4), (4, 6)]; diff --git a/src/test/contracts/expected/tuple_param_destruct.religo.expected b/src/test/contracts/expected/tuple_param_destruct.religo.expected new file mode 100644 index 000000000..15245a084 --- /dev/null +++ b/src/test/contracts/expected/tuple_param_destruct.religo.expected @@ -0,0 +1,4 @@ +let sum = ((result, i): (int, int)): int => result - i; + +let parentheses = (((((result, i)))): (((int, int)))): int => + result - i; diff --git a/src/test/contracts/expected/tuple_type.religo.expected b/src/test/contracts/expected/tuple_type.religo.expected new file mode 100644 index 000000000..8bc008c3b --- /dev/null +++ b/src/test/contracts/expected/tuple_type.religo.expected @@ -0,0 +1,40 @@ +type fun_type = (int, int) => int; + +let arguments = (b: int, c: int) => { + b + c +}; + +let arguments_type_def = (b: fun_type) => b(5, 3); + +let arguments_test = (_: int) => + arguments_type_def(arguments); + +type tuple_type = ((int, int)) => int; + +let tuple = ((a, b): (int, int)) => { + a + b +}; + +let tuple_type_def = (b: tuple_type) => b((5, 3)); + +let tuple_test = (_: int) => tuple_type_def(tuple); + +let arguments_inline = (b: int, c: int) => { + b + c +}; + +let arguments_type_def_inline = (b: (int, int) => int) => + b(5, 3); + +let arguments_test_inline = (_: int) => + arguments_type_def_inline(arguments_inline); + +let tuple_inline = ((a, b): (int, int)) => { + a + b +}; + +let tuple_type_def_inline = (b: ((int, int)) => int) => + b((5, 3)); + +let tuple_test_inline = (_: int) => + tuple_type_def_inline(tuple_inline); diff --git a/src/test/contracts/expected/tuples_no_annotation.religo.expected b/src/test/contracts/expected/tuples_no_annotation.religo.expected new file mode 100644 index 000000000..38bc4f153 --- /dev/null +++ b/src/test/contracts/expected/tuples_no_annotation.religo.expected @@ -0,0 +1,7 @@ +type storage = (int, string, nat, bool); + +type parameter = int; + +let main = ((p, storage): (parameter, storage)) => { + ([] : list(operation), (2, "2", 2n, false)) +}; diff --git a/src/test/contracts/expected/tuples_sequences_functions.religo.expected b/src/test/contracts/expected/tuples_sequences_functions.religo.expected new file mode 100644 index 000000000..e4277334e --- /dev/null +++ b/src/test/contracts/expected/tuples_sequences_functions.religo.expected @@ -0,0 +1,61 @@ +let a = 1; + +let b = 1n; + +let c = 2mutez; + +let d = 1n + 2n; + +let e = 1mutez + 3mutez; + +let f = (a, c); + +let g = (a + 1, c); + +let h = ("a" ++ "2", d); + +let i = (a: int, b: int) => a + b; + +let j = (a: int, b: int) => a - b; + +let m = { + let z = 3; + z +}; + +let n = (a: int): int => a + 1; + +let o = (a: int): int => a + 1; + +let n = (a: int, b: int): int => a + 1; + +let o = (a: int, b: int): int => a + 1; + +let p = { + { + 3 + } +}; + +let q = { + f: 3, + g: 6, + h: {i: "bla", j: 1 + 2, k: {l: 1, z: 2 } } +}; + +let s = { + let a = 2; + { + z: a, + a: a + } +}; + +let t = (((((((2))))))); + +let u = + if (true) { + 1 + } else { + 2 + }; diff --git a/src/test/contracts/expected/type-alias.ligo.expected b/src/test/contracts/expected/type-alias.ligo.expected new file mode 100644 index 000000000..3fcbc5379 --- /dev/null +++ b/src/test/contracts/expected/type-alias.ligo.expected @@ -0,0 +1,3 @@ +type toto is int + +const foo : toto = 23 diff --git a/src/test/contracts/expected/unit.ligo.expected b/src/test/contracts/expected/unit.ligo.expected new file mode 100644 index 000000000..5b05cb2b7 --- /dev/null +++ b/src/test/contracts/expected/unit.ligo.expected @@ -0,0 +1 @@ +const u : unit = unit diff --git a/src/test/contracts/expected/variant-matching.ligo.expected b/src/test/contracts/expected/variant-matching.ligo.expected new file mode 100644 index 000000000..14b8841f1 --- /dev/null +++ b/src/test/contracts/expected/variant-matching.ligo.expected @@ -0,0 +1,8 @@ +type foobar is Foo of int | Bar of bool | Kee of nat + +function fb (const p : foobar) : int is + case p of [ + Foo (n) -> n + | Bar (t) -> 42 + | Kee (n) -> 23 + ] diff --git a/src/test/contracts/expected/variant.ligo.expected b/src/test/contracts/expected/variant.ligo.expected new file mode 100644 index 000000000..aae742d50 --- /dev/null +++ b/src/test/contracts/expected/variant.ligo.expected @@ -0,0 +1,7 @@ +type foobar is Foo of int | Bar of bool | Kee of nat + +const foo : foobar = Foo (42) + +const bar : foobar = Bar (True) + +const kee : foobar = Kee (23n) diff --git a/src/test/contracts/expected/variant.religo.expected b/src/test/contracts/expected/variant.religo.expected new file mode 100644 index 000000000..7846818c7 --- /dev/null +++ b/src/test/contracts/expected/variant.religo.expected @@ -0,0 +1,7 @@ +type foobar = Foo(int) | Bar(bool) | Kee(nat); + +let foo: foobar = Foo (42); + +let bar: foobar = Bar (true); + +let kee: foobar = Kee (23n); diff --git a/src/test/contracts/expected/website1.ligo.expected b/src/test/contracts/expected/website1.ligo.expected new file mode 100644 index 000000000..50e4a0851 --- /dev/null +++ b/src/test/contracts/expected/website1.ligo.expected @@ -0,0 +1,3 @@ +function main (const p : int; const s : int) + : list (operation) * int is + ((nil : list (operation)), s + 1) diff --git a/src/test/contracts/expected/website2.ligo.expected b/src/test/contracts/expected/website2.ligo.expected new file mode 100644 index 000000000..c7fb8fa6f --- /dev/null +++ b/src/test/contracts/expected/website2.ligo.expected @@ -0,0 +1,15 @@ +type action is Increment of int | Decrement of int + +type return is list (operation) * int + +function add (const a : int; const b : int) : int is a + b + +function subtract (const a : int; const b : int) : int is + a - b + +function main (const p : action; const s : int) : return is + ((nil : list (operation)), + case p of [ + Increment (n) -> add (s, n) + | Decrement (n) -> subtract (s, n) + ]) diff --git a/src/test/contracts/expected/website2.religo.expected b/src/test/contracts/expected/website2.religo.expected new file mode 100644 index 000000000..75257eea0 --- /dev/null +++ b/src/test/contracts/expected/website2.religo.expected @@ -0,0 +1,16 @@ +type storage = int; + +type parameter = Increment(int) | Decrement(int); + +let add = ((a, b): (int, int)): int => a + b; + +let sub = ((a, b): (int, int)): int => a - b; + +let main = ((p, storage): (parameter, storage)) => { + let storage = + switch(p) { + | Increment(n) => add((storage, n)) + | Decrement(n) => sub((storage, n)) + }; + ([] : list(operation), storage) +}; diff --git a/src/test/contracts/fibo2.mligo b/src/test/contracts/fibo2.mligo index f41ee0e3d..49dc8b0e9 100644 --- a/src/test/contracts/fibo2.mligo +++ b/src/test/contracts/fibo2.mligo @@ -1,6 +1,6 @@ type storage = unit -let main (p : unit; store : storage) : operation list * storage = +let main (p, store : unit * storage) : operation list * storage = let n = (fun (f : int -> int) (z : int) (y : int) -> f y) (fun (x : int) -> x) diff --git a/src/test/contracts/super-counter.religo b/src/test/contracts/super-counter.religo index 53eba61af..7245f15fc 100644 --- a/src/test/contracts/super-counter.religo +++ b/src/test/contracts/super-counter.religo @@ -6,7 +6,7 @@ type storage = int; type return = (list (operation), storage); -let main = ((action, store): (parameter, storage) : return => { +let main = ((action, store): (parameter, storage)) : return => { let store = switch (action) { | Increment (n) => store + n diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index ab9242837..209e030d9 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -2486,6 +2486,7 @@ let main = test_suite "Integration (End to End)" [ test "counter contract" counter_contract ; test "super counter contract" super_counter_contract ; test "super counter contract" super_counter_contract_mligo ; + test "super counter contract (reasonligo)" super_counter_contract_religo ; test "dispatch counter contract" dispatch_counter_contract ; test "basic (mligo)" basic_mligo ; test "basic (religo)" basic_religo ;