From ff0d18417608ddcc73f05c2096cc39db34d9229f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 8 Jul 2019 22:04:51 -0700 Subject: [PATCH] chore(stage0): update --- src/stage0/init/lean/compiler/ir/boxing.cpp | 143 +- src/stage0/init/lean/compiler/ir/emitcpp.cpp | 3684 +++++--- src/stage0/init/lean/parser/level.cpp | 539 +- src/stage0/init/lean/parser/parser.cpp | 74 +- src/stage0/init/lean/parser/term.cpp | 8764 +++++++++++++----- 5 files changed, 9273 insertions(+), 3931 deletions(-) diff --git a/src/stage0/init/lean/compiler/ir/boxing.cpp b/src/stage0/init/lean/compiler/ir/boxing.cpp index af796dd031..6bb518cd9b 100644 --- a/src/stage0/init/lean/compiler/ir/boxing.cpp +++ b/src/stage0/init/lean/compiler/ir/boxing.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.ir.boxing -// Imports: init.control.estate init.control.reader init.lean.compiler.externattr init.lean.compiler.ir.basic init.lean.compiler.ir.compilerm init.lean.compiler.ir.freevars +// Imports: init.control.estate init.control.reader init.lean.runtime init.lean.compiler.externattr init.lean.compiler.ir.basic init.lean.compiler.ir.compilerm init.lean.compiler.ir.freevars #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -39,6 +39,8 @@ obj* l_Lean_IR_ExplicitBoxing_unboxResultIfNeeded(obj*, uint8, obj*, obj*, obj*, obj* l_Nat_mfoldAux___main___at_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___spec__2(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_getScrutineeType___boxed(obj*); obj* l_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___closed__1; +uint8 l_Lean_IR_ExplicitBoxing_isBoxedName___main(obj*); +uint8 l_Lean_IR_ExplicitBoxing_isBoxedName(obj*); obj* l_Lean_IR_ExplicitBoxing_run(obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_mkBoxedVersion___boxed(obj*); obj* l_Lean_IR_ExplicitBoxing_withParams___rarg(obj*, obj*, obj*, obj*); @@ -91,6 +93,7 @@ uint8 nat_dec_eq(obj*, obj*); } obj* l_Lean_IR_ExplicitBoxing_withVDecl___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_IR_paramInh; +obj* l_Lean_IR_ExplicitBoxing_isBoxedName___main___boxed(obj*); obj* l_Array_push(obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_castArgsIfNeededAux___at_Lean_IR_ExplicitBoxing_visitFnBody___main___spec__2(obj*, obj*, obj*, obj*); obj* l_Lean_IR_LocalContext_getType(obj*, obj*); @@ -98,6 +101,9 @@ obj* l_Array_ummapAux___main___at_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___spe obj* l_Array_miterateAux___main___at_Lean_IR_ExplicitBoxing_boxArgsIfNeeded___spec__2(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_withJDecl___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Lean_IR_ExplicitBoxing_castArgsIfNeededAux___spec__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +namespace lean { +uint8 string_dec_eq(obj*, obj*); +} obj* l_Lean_IR_LocalContext_getJPParams(obj*, obj*); obj* l_Array_miterateAux___main___at_Lean_IR_ExplicitBoxing_boxArgsIfNeeded___spec__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_castArgsIfNeededAux___at_Lean_IR_ExplicitBoxing_visitFnBody___main___spec__2___boxed(obj*, obj*, obj*, obj*); @@ -106,6 +112,8 @@ obj* l_Lean_IR_ExplicitBoxing_castResultIfNeeded___boxed(obj*, obj*, obj*, obj*, obj* l_Lean_IR_ExplicitBoxing_castArgsIfNeededAux(obj*, obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_getJPParams___boxed(obj*, obj*, obj*); obj* l_Lean_IR_ExplicitBoxing_getLocalContext(obj*, obj*); +extern obj* l_Lean_closureMaxArgs; +obj* l_Lean_IR_ExplicitBoxing_isBoxedName___boxed(obj*); obj* l_Lean_IR_ExplicitBoxing_mkFresh(obj*); obj* l_Lean_PersistentEnvExtension_addEntry___rarg(obj*, obj*, obj*); uint8 l_Lean_IR_ExplicitBoxing_requiresBoxedVersion(obj*, obj*); @@ -169,6 +177,64 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } +uint8 l_Lean_IR_ExplicitBoxing_isBoxedName___main(obj* x_1) { +_start: +{ +if (lean::obj_tag(x_1) == 1) +{ +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::cnstr_get(x_1, 1); +x_3 = l_Lean_IR_ExplicitBoxing_mkBoxedName___closed__1; +x_4 = lean::string_dec_eq(x_2, x_3); +if (x_4 == 0) +{ +uint8 x_5; +x_5 = 0; +return x_5; +} +else +{ +uint8 x_6; +x_6 = 1; +return x_6; +} +} +else +{ +uint8 x_7; +x_7 = 0; +return x_7; +} +} +} +obj* l_Lean_IR_ExplicitBoxing_isBoxedName___main___boxed(obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_1); +lean::dec(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} +uint8 l_Lean_IR_ExplicitBoxing_isBoxedName(obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_1); +return x_2; +} +} +obj* l_Lean_IR_ExplicitBoxing_isBoxedName___boxed(obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_ExplicitBoxing_isBoxedName(x_1); +lean::dec(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} obj* l___private_init_lean_compiler_ir_boxing_1__mkFresh(obj* x_1) { _start: { @@ -250,40 +316,61 @@ x_3 = l_Lean_IR_Decl_params___main(x_2); x_4 = lean::array_get_size(x_3); x_5 = lean::mk_nat_obj(0u); x_6 = lean::nat_dec_lt(x_5, x_4); -lean::dec(x_4); if (x_6 == 0) { -uint8 x_7; +obj* x_7; uint8 x_8; lean::dec(x_3); -x_7 = 0; -return x_7; +x_7 = l_Lean_closureMaxArgs; +x_8 = lean::nat_dec_lt(x_7, x_4); +lean::dec(x_4); +return x_8; } else { -uint8 x_8; uint8 x_9; -x_8 = l_Lean_IR_Decl_resultType___main(x_2); -x_9 = l_Lean_IR_IRType_isScalar___main(x_8); -if (x_9 == 0) -{ -uint8 x_10; -x_10 = l_Array_anyMAux___main___at_Lean_IR_ExplicitBoxing_requiresBoxedVersion___spec__1(x_6, x_3, x_5); -lean::dec(x_3); +uint8 x_9; uint8 x_10; +x_9 = l_Lean_IR_Decl_resultType___main(x_2); +x_10 = l_Lean_IR_IRType_isScalar___main(x_9); if (x_10 == 0) { -obj* x_11; uint8 x_12; -x_11 = l_Lean_IR_Decl_name___main(x_2); -x_12 = l_Lean_isExtern(x_1, x_11); -return x_12; -} -else -{ -return x_6; -} -} -else -{ +uint8 x_11; +x_11 = l_Array_anyMAux___main___at_Lean_IR_ExplicitBoxing_requiresBoxedVersion___spec__1(x_6, x_3, x_5); lean::dec(x_3); -return x_6; +if (x_11 == 0) +{ +obj* x_12; uint8 x_13; +x_12 = l_Lean_IR_Decl_name___main(x_2); +x_13 = l_Lean_isExtern(x_1, x_12); +if (x_13 == 0) +{ +obj* x_14; uint8 x_15; +x_14 = l_Lean_closureMaxArgs; +x_15 = lean::nat_dec_lt(x_14, x_4); +lean::dec(x_4); +return x_15; +} +else +{ +uint8 x_16; +lean::dec(x_4); +x_16 = 1; +return x_16; +} +} +else +{ +uint8 x_17; +lean::dec(x_4); +x_17 = 1; +return x_17; +} +} +else +{ +uint8 x_18; +lean::dec(x_4); +lean::dec(x_3); +x_18 = 1; +return x_18; } } } @@ -6333,6 +6420,7 @@ return x_4; } obj* initialize_init_control_estate(obj*); obj* initialize_init_control_reader(obj*); +obj* initialize_init_lean_runtime(obj*); obj* initialize_init_lean_compiler_externattr(obj*); obj* initialize_init_lean_compiler_ir_basic(obj*); obj* initialize_init_lean_compiler_ir_compilerm(obj*); @@ -6346,6 +6434,8 @@ w = initialize_init_control_estate(w); if (io_result_is_error(w)) return w; w = initialize_init_control_reader(w); if (io_result_is_error(w)) return w; +w = initialize_init_lean_runtime(w); +if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_externattr(w); if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_basic(w); @@ -6357,6 +6447,7 @@ if (io_result_is_error(w)) return w; l_Lean_IR_ExplicitBoxing_mkBoxedName___closed__1 = _init_l_Lean_IR_ExplicitBoxing_mkBoxedName___closed__1(); lean::mark_persistent(l_Lean_IR_ExplicitBoxing_mkBoxedName___closed__1); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "ExplicitBoxing"), "mkBoxedName"), 1, l_Lean_IR_ExplicitBoxing_mkBoxedName); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "ExplicitBoxing"), "isBoxedName"), 1, l_Lean_IR_ExplicitBoxing_isBoxedName___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "ExplicitBoxing"), "requiresBoxedVersion"), 2, l_Lean_IR_ExplicitBoxing_requiresBoxedVersion___boxed); l_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___closed__1 = _init_l_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___closed__1(); lean::mark_persistent(l_Lean_IR_ExplicitBoxing_mkBoxedVersionAux___closed__1); diff --git a/src/stage0/init/lean/compiler/ir/emitcpp.cpp b/src/stage0/init/lean/compiler/ir/emitcpp.cpp index f9b38beb63..53c9b5e953 100644 --- a/src/stage0/init/lean/compiler/ir/emitcpp.cpp +++ b/src/stage0/init/lean/compiler/ir/emitcpp.cpp @@ -89,6 +89,7 @@ obj* l_Lean_IR_EmitCpp_emitBlock___main___closed__1; obj* l_Lean_IR_EmitCpp_openNamespacesAux___boxed(obj*, obj*, obj*); obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitTailCall___spec__3(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_closeNamespaces(obj*, obj*, obj*); +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2; obj* l_Lean_IR_EmitCpp_emitLit___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitTailCall___spec__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_getDecl___boxed(obj*, obj*, obj*); @@ -139,9 +140,11 @@ obj* decl_to_string_core(obj*); obj* l_Lean_IR_EmitCpp_emitDecl(obj*, obj*, obj*); obj* l_Array_uget(obj*, obj*, usize, obj*); obj* l_Lean_Name_toStringWithSep___main(obj*, obj*); +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3; obj* l_Lean_IR_EmitCpp_openNamespaces___boxed(obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_isObj___boxed(obj*, obj*, obj*); obj* l_String_foldlAux___main___at_Lean_IR_EmitCpp_quoteString___spec__1(obj*, obj*, obj*, obj*); +uint8 l_Lean_IR_ExplicitBoxing_isBoxedName___main(obj*); obj* l_Lean_IR_EmitCpp_emitDeclInit___closed__2; obj* l_Lean_IR_EmitCpp_emitCase___closed__1; obj* l_Array_mforAux___main___at_Lean_IR_EmitCpp_emitInitFn___spec__1___closed__2; @@ -198,6 +201,7 @@ obj* l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; extern obj* l_String_quote___closed__1; obj* l_Lean_IR_EmitCpp_declareParams___boxed(obj*, obj*, obj*); uint8 l_Lean_hasInitAttr(obj*, obj*); +obj* l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4; obj* l_RBNode_insert___at_Lean_NameSet_insert___spec__1(obj*, obj*, obj*); obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitArgs___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_emitCppInitName___boxed(obj*, obj*, obj*); @@ -215,6 +219,8 @@ obj* l_Lean_IR_EmitCpp_emitInitFn___closed__1; obj* l_Lean_IR_EmitCpp_throwInvalidExportName___rarg___closed__1; obj* l_Lean_IR_EmitCpp_toCppType___main___closed__4; obj* l_Lean_IR_EmitCpp_emitApp___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1; +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_emitMainFn___closed__7; obj* l_Lean_IR_EmitCpp_quoteNameAux___main(obj*); obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitCtorSetArgs___spec__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); @@ -283,6 +289,7 @@ obj* l_Lean_IR_Decl_name___main(obj*); obj* l_Lean_IR_EmitCpp_toCppType___main(uint8); obj* l_Lean_IR_EmitCpp_emitReuse___closed__1; obj* l_Lean_IR_EmitCpp_argToCppString(obj*); +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_mforAux___main___at_Lean_IR_EmitCpp_emitCase___spec__1___closed__1; obj* l_Lean_IR_EmitCpp_emitApp___closed__2; extern obj* l_Char_quoteCore___closed__5; @@ -311,6 +318,7 @@ obj* l_Lean_IR_EmitCpp_emitMainFn___closed__12; obj* l_Lean_IR_EmitCpp_emitSet(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_emitFnDeclAux(obj*, obj*, uint8, obj*, obj*); obj* l_Lean_IR_EmitCpp_emitMainFn___closed__2; +obj* l_Lean_IR_EmitCpp_emitDeclAux___closed__2; obj* l_Lean_IR_EmitCpp_emitFullApp___closed__1; obj* l_Array_mforAux___main___at_Lean_IR_EmitCpp_emitInitFn___spec__2(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_EmitCpp_emitReset___closed__1; @@ -2688,6 +2696,14 @@ obj* _init_l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3() { _start: { obj* x_1; +x_1 = lean::mk_string("obj**"); +return x_1; +} +} +obj* _init_l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4() { +_start: +{ +obj* x_1; x_1 = lean::mk_string("extern "); return x_1; } @@ -2700,37 +2716,37 @@ x_6 = l_Lean_IR_Decl_params___main(x_1); x_7 = l_Array_isEmpty___rarg(x_6); if (x_7 == 0) { -obj* x_49; -x_49 = lean::cnstr_get(x_5, 1); -lean::inc(x_49); +obj* x_64; +x_64 = lean::cnstr_get(x_5, 1); +lean::inc(x_64); lean::dec(x_5); -x_8 = x_49; -goto block_48; +x_8 = x_64; +goto block_63; } else { if (x_3 == 0) { -obj* x_50; -x_50 = lean::cnstr_get(x_5, 1); -lean::inc(x_50); +obj* x_65; +x_65 = lean::cnstr_get(x_5, 1); +lean::inc(x_65); lean::dec(x_5); -x_8 = x_50; -goto block_48; +x_8 = x_65; +goto block_63; } else { -obj* x_51; obj* x_52; obj* x_53; -x_51 = lean::cnstr_get(x_5, 1); -lean::inc(x_51); +obj* x_66; obj* x_67; obj* x_68; +x_66 = lean::cnstr_get(x_5, 1); +lean::inc(x_66); lean::dec(x_5); -x_52 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3; -x_53 = lean::string_append(x_51, x_52); -x_8 = x_53; -goto block_48; +x_67 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4; +x_68 = lean::string_append(x_66, x_67); +x_8 = x_68; +goto block_63; } } -block_48: +block_63: { uint8 x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; x_9 = l_Lean_IR_Decl_resultType___main(x_1); @@ -2742,92 +2758,138 @@ x_14 = lean::string_append(x_8, x_13); lean::dec(x_13); if (x_7 == 0) { -obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_44; uint8 x_45; x_15 = l_Prod_HasRepr___rarg___closed__1; x_16 = lean::string_append(x_14, x_15); x_17 = lean::box(0); +lean::inc(x_16); x_18 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_18, 0, x_17); lean::cnstr_set(x_18, 1, x_16); x_19 = lean::array_get_size(x_6); +x_44 = l_Lean_closureMaxArgs; +x_45 = lean::nat_dec_lt(x_44, x_19); +if (x_45 == 0) +{ +lean::dec(x_16); +x_20 = x_17; +goto block_43; +} +else +{ +obj* x_46; uint8 x_47; +x_46 = l_Lean_IR_Decl_name___main(x_1); +x_47 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_46); +lean::dec(x_46); +if (x_47 == 0) +{ +lean::dec(x_16); +x_20 = x_17; +goto block_43; +} +else +{ +obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +lean::dec(x_19); +lean::dec(x_18); +lean::dec(x_6); +x_48 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3; +x_49 = lean::string_append(x_16, x_48); +x_50 = l_Option_HasRepr___rarg___closed__3; +x_51 = lean::string_append(x_49, x_50); +x_52 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; +x_53 = lean::string_append(x_51, x_52); +x_54 = l_IO_println___rarg___closed__1; +x_55 = lean::string_append(x_53, x_54); +x_56 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_56, 0, x_17); +lean::cnstr_set(x_56, 1, x_55); +return x_56; +} +} +block_43: +{ +obj* x_21; +lean::dec(x_20); lean::inc(x_19); -x_20 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitFnDeclAux___spec__1(x_6, x_19, x_19, x_4, x_18); +x_21 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitFnDeclAux___spec__1(x_6, x_19, x_19, x_4, x_18); lean::dec(x_19); lean::dec(x_6); -if (lean::obj_tag(x_20) == 0) +if (lean::obj_tag(x_21) == 0) { -uint8 x_21; -x_21 = !lean::is_exclusive(x_20); -if (x_21 == 0) +uint8 x_22; +x_22 = !lean::is_exclusive(x_21); +if (x_22 == 0) { -obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; -x_22 = lean::cnstr_get(x_20, 1); -x_23 = lean::cnstr_get(x_20, 0); -lean::dec(x_23); -x_24 = l_Option_HasRepr___rarg___closed__3; -x_25 = lean::string_append(x_22, x_24); -x_26 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; -x_27 = lean::string_append(x_25, x_26); -x_28 = l_IO_println___rarg___closed__1; -x_29 = lean::string_append(x_27, x_28); -lean::cnstr_set(x_20, 1, x_29); -lean::cnstr_set(x_20, 0, x_17); -return x_20; +obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_23 = lean::cnstr_get(x_21, 1); +x_24 = lean::cnstr_get(x_21, 0); +lean::dec(x_24); +x_25 = l_Option_HasRepr___rarg___closed__3; +x_26 = lean::string_append(x_23, x_25); +x_27 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; +x_28 = lean::string_append(x_26, x_27); +x_29 = l_IO_println___rarg___closed__1; +x_30 = lean::string_append(x_28, x_29); +lean::cnstr_set(x_21, 1, x_30); +lean::cnstr_set(x_21, 0, x_17); +return x_21; } else { -obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; -x_30 = lean::cnstr_get(x_20, 1); -lean::inc(x_30); -lean::dec(x_20); -x_31 = l_Option_HasRepr___rarg___closed__3; -x_32 = lean::string_append(x_30, x_31); -x_33 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; -x_34 = lean::string_append(x_32, x_33); -x_35 = l_IO_println___rarg___closed__1; -x_36 = lean::string_append(x_34, x_35); -x_37 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_37, 0, x_17); -lean::cnstr_set(x_37, 1, x_36); -return x_37; +obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; +x_31 = lean::cnstr_get(x_21, 1); +lean::inc(x_31); +lean::dec(x_21); +x_32 = l_Option_HasRepr___rarg___closed__3; +x_33 = lean::string_append(x_31, x_32); +x_34 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; +x_35 = lean::string_append(x_33, x_34); +x_36 = l_IO_println___rarg___closed__1; +x_37 = lean::string_append(x_35, x_36); +x_38 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_38, 0, x_17); +lean::cnstr_set(x_38, 1, x_37); +return x_38; } } else { -uint8 x_38; -x_38 = !lean::is_exclusive(x_20); -if (x_38 == 0) +uint8 x_39; +x_39 = !lean::is_exclusive(x_21); +if (x_39 == 0) { -return x_20; +return x_21; } else { -obj* x_39; obj* x_40; obj* x_41; -x_39 = lean::cnstr_get(x_20, 0); -x_40 = lean::cnstr_get(x_20, 1); +obj* x_40; obj* x_41; obj* x_42; +x_40 = lean::cnstr_get(x_21, 0); +x_41 = lean::cnstr_get(x_21, 1); +lean::inc(x_41); lean::inc(x_40); -lean::inc(x_39); -lean::dec(x_20); -x_41 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_41, 0, x_39); -lean::cnstr_set(x_41, 1, x_40); -return x_41; +lean::dec(x_21); +x_42 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_42, 0, x_40); +lean::cnstr_set(x_42, 1, x_41); +return x_42; +} } } } else { -obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; +obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; lean::dec(x_6); -x_42 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; -x_43 = lean::string_append(x_14, x_42); -x_44 = l_IO_println___rarg___closed__1; -x_45 = lean::string_append(x_43, x_44); -x_46 = lean::box(0); -x_47 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_47, 0, x_46); -lean::cnstr_set(x_47, 1, x_45); -return x_47; +x_57 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2; +x_58 = lean::string_append(x_14, x_57); +x_59 = l_IO_println___rarg___closed__1; +x_60 = lean::string_append(x_58, x_59); +x_61 = lean::box(0); +x_62 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_62, 0, x_61); +lean::cnstr_set(x_62, 1, x_60); +return x_62; } } } @@ -22663,6 +22725,30 @@ x_4 = l_Lean_IR_EmitCpp_emitFnBody___main(x_1, x_2, x_3); return x_4; } } +obj* _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string("obj * "); +return x_1; +} +} +obj* _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string(" = _args["); +return x_1; +} +} +obj* _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string("];"); +return x_1; +} +} obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { @@ -22671,6 +22757,128 @@ x_6 = lean::mk_nat_obj(0u); x_7 = lean::nat_dec_eq(x_3, x_6); if (x_7 == 0) { +uint8 x_8; +x_8 = !lean::is_exclusive(x_5); +if (x_8 == 0) +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; +x_9 = lean::cnstr_get(x_5, 1); +x_10 = lean::cnstr_get(x_5, 0); +lean::dec(x_10); +x_11 = lean::mk_nat_obj(1u); +x_12 = lean::nat_sub(x_3, x_11); +lean::dec(x_3); +x_13 = lean::nat_sub(x_2, x_12); +x_14 = lean::nat_sub(x_13, x_11); +lean::dec(x_13); +x_15 = l_Lean_IR_paramInh; +x_16 = lean::array_get(x_15, x_1, x_14); +x_17 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1; +x_18 = lean::string_append(x_9, x_17); +x_19 = lean::cnstr_get(x_16, 0); +lean::inc(x_19); +lean::dec(x_16); +x_20 = l_Nat_repr(x_19); +x_21 = l_Lean_IR_VarId_HasToString___closed__1; +x_22 = lean::string_append(x_21, x_20); +lean::dec(x_20); +x_23 = lean::string_append(x_18, x_22); +lean::dec(x_22); +x_24 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2; +x_25 = lean::string_append(x_23, x_24); +x_26 = l_Nat_repr(x_14); +x_27 = lean::string_append(x_25, x_26); +lean::dec(x_26); +x_28 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3; +x_29 = lean::string_append(x_27, x_28); +x_30 = l_IO_println___rarg___closed__1; +x_31 = lean::string_append(x_29, x_30); +x_32 = lean::box(0); +lean::cnstr_set(x_5, 1, x_31); +lean::cnstr_set(x_5, 0, x_32); +x_3 = x_12; +goto _start; +} +else +{ +obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; +x_34 = lean::cnstr_get(x_5, 1); +lean::inc(x_34); +lean::dec(x_5); +x_35 = lean::mk_nat_obj(1u); +x_36 = lean::nat_sub(x_3, x_35); +lean::dec(x_3); +x_37 = lean::nat_sub(x_2, x_36); +x_38 = lean::nat_sub(x_37, x_35); +lean::dec(x_37); +x_39 = l_Lean_IR_paramInh; +x_40 = lean::array_get(x_39, x_1, x_38); +x_41 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1; +x_42 = lean::string_append(x_34, x_41); +x_43 = lean::cnstr_get(x_40, 0); +lean::inc(x_43); +lean::dec(x_40); +x_44 = l_Nat_repr(x_43); +x_45 = l_Lean_IR_VarId_HasToString___closed__1; +x_46 = lean::string_append(x_45, x_44); +lean::dec(x_44); +x_47 = lean::string_append(x_42, x_46); +lean::dec(x_46); +x_48 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2; +x_49 = lean::string_append(x_47, x_48); +x_50 = l_Nat_repr(x_38); +x_51 = lean::string_append(x_49, x_50); +lean::dec(x_50); +x_52 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3; +x_53 = lean::string_append(x_51, x_52); +x_54 = l_IO_println___rarg___closed__1; +x_55 = lean::string_append(x_53, x_54); +x_56 = lean::box(0); +x_57 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_57, 0, x_56); +lean::cnstr_set(x_57, 1, x_55); +x_3 = x_36; +x_5 = x_57; +goto _start; +} +} +else +{ +uint8 x_59; +lean::dec(x_3); +x_59 = !lean::is_exclusive(x_5); +if (x_59 == 0) +{ +obj* x_60; obj* x_61; +x_60 = lean::cnstr_get(x_5, 0); +lean::dec(x_60); +x_61 = lean::box(0); +lean::cnstr_set(x_5, 0, x_61); +return x_5; +} +else +{ +obj* x_62; obj* x_63; obj* x_64; +x_62 = lean::cnstr_get(x_5, 1); +lean::inc(x_62); +lean::dec(x_5); +x_63 = lean::box(0); +x_64 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_64, 0, x_63); +lean::cnstr_set(x_64, 1, x_62); +return x_64; +} +} +} +} +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; uint8 x_7; +x_6 = lean::mk_nat_obj(0u); +x_7 = lean::nat_dec_eq(x_3, x_6); +if (x_7 == 0) +{ obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; uint8 x_29; x_8 = lean::mk_nat_obj(1u); x_9 = lean::nat_sub(x_3, x_8); @@ -22766,6 +22974,14 @@ x_1 = lean::mk_string("_start:"); return x_1; } } +obj* _init_l_Lean_IR_EmitCpp_emitDeclAux___closed__2() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string("obj** _args"); +return x_1; +} +} obj* l_Lean_IR_EmitCpp_emitDeclAux(obj* x_1, obj* x_2, obj* x_3) { _start: { @@ -22791,22 +23007,23 @@ x_11 = lean::cnstr_get(x_9, 1); lean::inc(x_11); lean::dec(x_9); x_12 = l_Lean_IR_Decl_name___main(x_1); +lean::inc(x_12); x_13 = l_Lean_hasInitAttr(x_6, x_12); if (x_13 == 0) { -uint8 x_245; -x_245 = 0; -x_14 = x_245; -goto block_244; +uint8 x_412; +x_412 = 0; +x_14 = x_412; +goto block_411; } else { -uint8 x_246; -x_246 = 1; -x_14 = x_246; -goto block_244; +uint8 x_413; +x_413 = 1; +x_14 = x_413; +goto block_411; } -block_244: +block_411: { if (x_14 == 0) { @@ -22846,526 +23063,497 @@ uint8 x_25; x_25 = !lean::is_exclusive(x_24); if (x_25 == 0) { -obj* x_26; obj* x_27; obj* x_56; +obj* x_26; obj* x_27; x_26 = lean::cnstr_get(x_24, 0); lean::dec(x_26); lean::cnstr_set(x_24, 0, x_8); lean::inc(x_15); -x_56 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_2, x_24); -if (lean::obj_tag(x_56) == 0) +x_27 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_2, x_24); +if (lean::obj_tag(x_27) == 0) { -uint8 x_57; -x_57 = !lean::is_exclusive(x_56); -if (x_57 == 0) -{ -obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; uint8 x_66; -x_58 = lean::cnstr_get(x_56, 0); -x_59 = lean::cnstr_get(x_56, 1); -x_60 = l_Lean_IR_EmitCpp_toCppType___main(x_17); -x_61 = lean::string_append(x_59, x_60); -lean::dec(x_60); -x_62 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; -x_63 = lean::string_append(x_61, x_62); -x_64 = lean::array_get_size(x_16); -x_65 = lean::mk_nat_obj(0u); -x_66 = lean::nat_dec_lt(x_65, x_64); -if (x_66 == 0) -{ -obj* x_67; obj* x_68; obj* x_69; obj* x_70; obj* x_71; -lean::dec(x_64); -lean::free_heap_obj(x_56); -x_67 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_68 = lean::string_append(x_67, x_58); -lean::dec(x_58); -x_69 = l_Unit_HasRepr___closed__1; -x_70 = lean::string_append(x_68, x_69); -x_71 = lean::string_append(x_63, x_70); -lean::dec(x_70); -x_27 = x_71; -goto block_55; -} -else -{ -obj* x_72; obj* x_73; obj* x_74; obj* x_75; -x_72 = lean::string_append(x_63, x_58); -lean::dec(x_58); -x_73 = l_Prod_HasRepr___rarg___closed__1; -x_74 = lean::string_append(x_72, x_73); -lean::cnstr_set(x_56, 1, x_74); -lean::cnstr_set(x_56, 0, x_8); -lean::inc(x_64); -x_75 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_64, x_64, x_2, x_56); -lean::dec(x_64); -if (lean::obj_tag(x_75) == 0) -{ -obj* x_76; obj* x_77; obj* x_78; -x_76 = lean::cnstr_get(x_75, 1); -lean::inc(x_76); -lean::dec(x_75); -x_77 = l_Option_HasRepr___rarg___closed__3; -x_78 = lean::string_append(x_76, x_77); -x_27 = x_78; -goto block_55; -} -else -{ -uint8 x_79; -lean::dec(x_2); -lean::dec(x_21); -lean::dec(x_20); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_79 = !lean::is_exclusive(x_75); -if (x_79 == 0) -{ -return x_75; -} -else -{ -obj* x_80; obj* x_81; obj* x_82; -x_80 = lean::cnstr_get(x_75, 0); -x_81 = lean::cnstr_get(x_75, 1); -lean::inc(x_81); -lean::inc(x_80); -lean::dec(x_75); -x_82 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_82, 0, x_80); -lean::cnstr_set(x_82, 1, x_81); -return x_82; -} -} -} -} -else -{ -obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; obj* x_88; obj* x_89; obj* x_90; uint8 x_91; -x_83 = lean::cnstr_get(x_56, 0); -x_84 = lean::cnstr_get(x_56, 1); -lean::inc(x_84); -lean::inc(x_83); -lean::dec(x_56); -x_85 = l_Lean_IR_EmitCpp_toCppType___main(x_17); -x_86 = lean::string_append(x_84, x_85); -lean::dec(x_85); -x_87 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; -x_88 = lean::string_append(x_86, x_87); -x_89 = lean::array_get_size(x_16); -x_90 = lean::mk_nat_obj(0u); -x_91 = lean::nat_dec_lt(x_90, x_89); -if (x_91 == 0) -{ -obj* x_92; obj* x_93; obj* x_94; obj* x_95; obj* x_96; -lean::dec(x_89); -x_92 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_93 = lean::string_append(x_92, x_83); -lean::dec(x_83); -x_94 = l_Unit_HasRepr___closed__1; -x_95 = lean::string_append(x_93, x_94); -x_96 = lean::string_append(x_88, x_95); -lean::dec(x_95); -x_27 = x_96; -goto block_55; -} -else -{ -obj* x_97; obj* x_98; obj* x_99; obj* x_100; obj* x_101; -x_97 = lean::string_append(x_88, x_83); -lean::dec(x_83); -x_98 = l_Prod_HasRepr___rarg___closed__1; -x_99 = lean::string_append(x_97, x_98); -x_100 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_100, 0, x_8); -lean::cnstr_set(x_100, 1, x_99); -lean::inc(x_89); -x_101 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_89, x_89, x_2, x_100); -lean::dec(x_89); -if (lean::obj_tag(x_101) == 0) -{ -obj* x_102; obj* x_103; obj* x_104; -x_102 = lean::cnstr_get(x_101, 1); -lean::inc(x_102); -lean::dec(x_101); -x_103 = l_Option_HasRepr___rarg___closed__3; -x_104 = lean::string_append(x_102, x_103); -x_27 = x_104; -goto block_55; -} -else -{ -obj* x_105; obj* x_106; obj* x_107; obj* x_108; -lean::dec(x_2); -lean::dec(x_21); -lean::dec(x_20); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_105 = lean::cnstr_get(x_101, 0); -lean::inc(x_105); -x_106 = lean::cnstr_get(x_101, 1); -lean::inc(x_106); -if (lean::is_exclusive(x_101)) { - lean::cnstr_release(x_101, 0); - lean::cnstr_release(x_101, 1); - x_107 = x_101; +obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_140; uint8 x_141; +x_28 = lean::cnstr_get(x_27, 0); +lean::inc(x_28); +x_29 = lean::cnstr_get(x_27, 1); +lean::inc(x_29); +if (lean::is_exclusive(x_27)) { + lean::cnstr_release(x_27, 0); + lean::cnstr_release(x_27, 1); + x_30 = x_27; } else { - lean::dec_ref(x_101); - x_107 = lean::box(0); -} -if (lean::is_scalar(x_107)) { - x_108 = lean::alloc_cnstr(1, 2, 0); -} else { - x_108 = x_107; -} -lean::cnstr_set(x_108, 0, x_105); -lean::cnstr_set(x_108, 1, x_106); -return x_108; -} -} + lean::dec_ref(x_27); + x_30 = lean::box(0); } +x_31 = l_Lean_IR_EmitCpp_toCppType___main(x_17); +x_32 = lean::string_append(x_29, x_31); +lean::dec(x_31); +x_33 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; +x_34 = lean::string_append(x_32, x_33); +x_35 = lean::array_get_size(x_16); +x_140 = lean::mk_nat_obj(0u); +x_141 = lean::nat_dec_lt(x_140, x_35); +if (x_141 == 0) +{ +obj* x_142; obj* x_143; obj* x_144; obj* x_145; obj* x_146; +x_142 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_143 = lean::string_append(x_142, x_28); +lean::dec(x_28); +x_144 = l_Unit_HasRepr___closed__1; +x_145 = lean::string_append(x_143, x_144); +x_146 = lean::string_append(x_34, x_145); +lean::dec(x_145); +x_36 = x_146; +goto block_139; } else { -uint8 x_109; +obj* x_147; obj* x_148; obj* x_149; obj* x_150; obj* x_151; obj* x_161; uint8 x_162; +x_147 = lean::string_append(x_34, x_28); +lean::dec(x_28); +x_148 = l_Prod_HasRepr___rarg___closed__1; +x_149 = lean::string_append(x_147, x_148); +lean::inc(x_149); +x_150 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_150, 0, x_8); +lean::cnstr_set(x_150, 1, x_149); +x_161 = l_Lean_closureMaxArgs; +x_162 = lean::nat_dec_lt(x_161, x_35); +if (x_162 == 0) +{ +lean::dec(x_149); +x_151 = x_8; +goto block_160; +} +else +{ +uint8 x_163; +x_163 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +if (x_163 == 0) +{ +lean::dec(x_149); +x_151 = x_8; +goto block_160; +} +else +{ +obj* x_164; obj* x_165; obj* x_166; obj* x_167; +lean::dec(x_150); +x_164 = l_Lean_IR_EmitCpp_emitDeclAux___closed__2; +x_165 = lean::string_append(x_149, x_164); +x_166 = l_Option_HasRepr___rarg___closed__3; +x_167 = lean::string_append(x_165, x_166); +x_36 = x_167; +goto block_139; +} +} +block_160: +{ +obj* x_152; +lean::dec(x_151); +lean::inc(x_35); +x_152 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(x_16, x_35, x_35, x_2, x_150); +if (lean::obj_tag(x_152) == 0) +{ +obj* x_153; obj* x_154; obj* x_155; +x_153 = lean::cnstr_get(x_152, 1); +lean::inc(x_153); +lean::dec(x_152); +x_154 = l_Option_HasRepr___rarg___closed__3; +x_155 = lean::string_append(x_153, x_154); +x_36 = x_155; +goto block_139; +} +else +{ +uint8 x_156; +lean::dec(x_35); +lean::dec(x_30); lean::dec(x_2); lean::dec(x_21); lean::dec(x_20); lean::dec(x_18); lean::dec(x_16); lean::dec(x_15); +lean::dec(x_12); lean::dec(x_11); lean::dec(x_10); -x_109 = !lean::is_exclusive(x_56); -if (x_109 == 0) +x_156 = !lean::is_exclusive(x_152); +if (x_156 == 0) { +return x_152; +} +else +{ +obj* x_157; obj* x_158; obj* x_159; +x_157 = lean::cnstr_get(x_152, 0); +x_158 = lean::cnstr_get(x_152, 1); +lean::inc(x_158); +lean::inc(x_157); +lean::dec(x_152); +x_159 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_159, 0, x_157); +lean::cnstr_set(x_159, 1, x_158); +return x_159; +} +} +} +} +block_139: +{ +obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; uint8 x_43; +x_37 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; +x_38 = lean::string_append(x_36, x_37); +x_39 = l_IO_println___rarg___closed__1; +x_40 = lean::string_append(x_38, x_39); +lean::inc(x_40); +if (lean::is_scalar(x_30)) { + x_41 = lean::alloc_cnstr(0, 2, 0); +} else { + x_41 = x_30; +} +lean::cnstr_set(x_41, 0, x_8); +lean::cnstr_set(x_41, 1, x_40); +x_42 = l_Lean_closureMaxArgs; +x_43 = lean::nat_dec_lt(x_42, x_35); +if (x_43 == 0) +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; +lean::dec(x_41); +lean::dec(x_35); +lean::dec(x_12); +x_44 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_45 = lean::string_append(x_40, x_44); +x_46 = lean::string_append(x_45, x_39); +x_47 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_47, 0, x_8); +lean::cnstr_set(x_47, 1, x_46); +lean::inc(x_15); +x_48 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_48, 0, x_20); +lean::cnstr_set(x_48, 1, x_21); +lean::cnstr_set(x_48, 2, x_10); +lean::cnstr_set(x_48, 3, x_11); +lean::cnstr_set(x_48, 4, x_15); +lean::cnstr_set(x_48, 5, x_16); +x_49 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_48, x_47); +if (lean::obj_tag(x_49) == 0) +{ +uint8 x_50; +x_50 = !lean::is_exclusive(x_49); +if (x_50 == 0) +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +x_51 = lean::cnstr_get(x_49, 1); +x_52 = lean::cnstr_get(x_49, 0); +lean::dec(x_52); +x_53 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_54 = lean::string_append(x_51, x_53); +x_55 = lean::string_append(x_54, x_39); +lean::cnstr_set(x_49, 1, x_55); +lean::cnstr_set(x_49, 0, x_8); +x_56 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_49); +lean::dec(x_2); return x_56; } else { -obj* x_110; obj* x_111; obj* x_112; -x_110 = lean::cnstr_get(x_56, 0); -x_111 = lean::cnstr_get(x_56, 1); -lean::inc(x_111); -lean::inc(x_110); -lean::dec(x_56); -x_112 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_112, 0, x_110); -lean::cnstr_set(x_112, 1, x_111); +obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; +x_57 = lean::cnstr_get(x_49, 1); +lean::inc(x_57); +lean::dec(x_49); +x_58 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_59 = lean::string_append(x_57, x_58); +x_60 = lean::string_append(x_59, x_39); +x_61 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_61, 0, x_8); +lean::cnstr_set(x_61, 1, x_60); +x_62 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_61); +lean::dec(x_2); +return x_62; +} +} +else +{ +uint8 x_63; +lean::dec(x_2); +lean::dec(x_15); +x_63 = !lean::is_exclusive(x_49); +if (x_63 == 0) +{ +return x_49; +} +else +{ +obj* x_64; obj* x_65; obj* x_66; +x_64 = lean::cnstr_get(x_49, 0); +x_65 = lean::cnstr_get(x_49, 1); +lean::inc(x_65); +lean::inc(x_64); +lean::dec(x_49); +x_66 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_66, 0, x_64); +lean::cnstr_set(x_66, 1, x_65); +return x_66; +} +} +} +else +{ +uint8 x_67; +x_67 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +lean::dec(x_12); +if (x_67 == 0) +{ +obj* x_68; obj* x_69; obj* x_70; obj* x_71; obj* x_72; obj* x_73; +lean::dec(x_41); +lean::dec(x_35); +x_68 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_69 = lean::string_append(x_40, x_68); +x_70 = lean::string_append(x_69, x_39); +x_71 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_71, 0, x_8); +lean::cnstr_set(x_71, 1, x_70); +lean::inc(x_15); +x_72 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_72, 0, x_20); +lean::cnstr_set(x_72, 1, x_21); +lean::cnstr_set(x_72, 2, x_10); +lean::cnstr_set(x_72, 3, x_11); +lean::cnstr_set(x_72, 4, x_15); +lean::cnstr_set(x_72, 5, x_16); +x_73 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_72, x_71); +if (lean::obj_tag(x_73) == 0) +{ +uint8 x_74; +x_74 = !lean::is_exclusive(x_73); +if (x_74 == 0) +{ +obj* x_75; obj* x_76; obj* x_77; obj* x_78; obj* x_79; obj* x_80; +x_75 = lean::cnstr_get(x_73, 1); +x_76 = lean::cnstr_get(x_73, 0); +lean::dec(x_76); +x_77 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_78 = lean::string_append(x_75, x_77); +x_79 = lean::string_append(x_78, x_39); +lean::cnstr_set(x_73, 1, x_79); +lean::cnstr_set(x_73, 0, x_8); +x_80 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_73); +lean::dec(x_2); +return x_80; +} +else +{ +obj* x_81; obj* x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; +x_81 = lean::cnstr_get(x_73, 1); +lean::inc(x_81); +lean::dec(x_73); +x_82 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_83 = lean::string_append(x_81, x_82); +x_84 = lean::string_append(x_83, x_39); +x_85 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_85, 0, x_8); +lean::cnstr_set(x_85, 1, x_84); +x_86 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_85); +lean::dec(x_2); +return x_86; +} +} +else +{ +uint8 x_87; +lean::dec(x_2); +lean::dec(x_15); +x_87 = !lean::is_exclusive(x_73); +if (x_87 == 0) +{ +return x_73; +} +else +{ +obj* x_88; obj* x_89; obj* x_90; +x_88 = lean::cnstr_get(x_73, 0); +x_89 = lean::cnstr_get(x_73, 1); +lean::inc(x_89); +lean::inc(x_88); +lean::dec(x_73); +x_90 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_90, 0, x_88); +lean::cnstr_set(x_90, 1, x_89); +return x_90; +} +} +} +else +{ +obj* x_91; +lean::dec(x_40); +lean::inc(x_35); +x_91 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_35, x_35, x_2, x_41); +lean::dec(x_35); +if (lean::obj_tag(x_91) == 0) +{ +uint8 x_92; +x_92 = !lean::is_exclusive(x_91); +if (x_92 == 0) +{ +obj* x_93; obj* x_94; obj* x_95; obj* x_96; obj* x_97; obj* x_98; obj* x_99; +x_93 = lean::cnstr_get(x_91, 1); +x_94 = lean::cnstr_get(x_91, 0); +lean::dec(x_94); +x_95 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_96 = lean::string_append(x_93, x_95); +x_97 = lean::string_append(x_96, x_39); +lean::cnstr_set(x_91, 1, x_97); +lean::cnstr_set(x_91, 0, x_8); +lean::inc(x_15); +x_98 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_98, 0, x_20); +lean::cnstr_set(x_98, 1, x_21); +lean::cnstr_set(x_98, 2, x_10); +lean::cnstr_set(x_98, 3, x_11); +lean::cnstr_set(x_98, 4, x_15); +lean::cnstr_set(x_98, 5, x_16); +x_99 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_98, x_91); +if (lean::obj_tag(x_99) == 0) +{ +uint8 x_100; +x_100 = !lean::is_exclusive(x_99); +if (x_100 == 0) +{ +obj* x_101; obj* x_102; obj* x_103; obj* x_104; obj* x_105; obj* x_106; +x_101 = lean::cnstr_get(x_99, 1); +x_102 = lean::cnstr_get(x_99, 0); +lean::dec(x_102); +x_103 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_104 = lean::string_append(x_101, x_103); +x_105 = lean::string_append(x_104, x_39); +lean::cnstr_set(x_99, 1, x_105); +lean::cnstr_set(x_99, 0, x_8); +x_106 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_99); +lean::dec(x_2); +return x_106; +} +else +{ +obj* x_107; obj* x_108; obj* x_109; obj* x_110; obj* x_111; obj* x_112; +x_107 = lean::cnstr_get(x_99, 1); +lean::inc(x_107); +lean::dec(x_99); +x_108 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_109 = lean::string_append(x_107, x_108); +x_110 = lean::string_append(x_109, x_39); +x_111 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_111, 0, x_8); +lean::cnstr_set(x_111, 1, x_110); +x_112 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_111); +lean::dec(x_2); return x_112; } } -block_55: -{ -obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; -x_28 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; -x_29 = lean::string_append(x_27, x_28); -x_30 = l_IO_println___rarg___closed__1; -x_31 = lean::string_append(x_29, x_30); -x_32 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; -x_33 = lean::string_append(x_31, x_32); -x_34 = lean::string_append(x_33, x_30); -x_35 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_35, 0, x_8); -lean::cnstr_set(x_35, 1, x_34); -lean::inc(x_15); -x_36 = lean::alloc_cnstr(0, 6, 0); -lean::cnstr_set(x_36, 0, x_20); -lean::cnstr_set(x_36, 1, x_21); -lean::cnstr_set(x_36, 2, x_10); -lean::cnstr_set(x_36, 3, x_11); -lean::cnstr_set(x_36, 4, x_15); -lean::cnstr_set(x_36, 5, x_16); -x_37 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_36, x_35); -if (lean::obj_tag(x_37) == 0) -{ -uint8 x_38; -x_38 = !lean::is_exclusive(x_37); -if (x_38 == 0) -{ -obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; -x_39 = lean::cnstr_get(x_37, 1); -x_40 = lean::cnstr_get(x_37, 0); -lean::dec(x_40); -x_41 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; -x_42 = lean::string_append(x_39, x_41); -x_43 = lean::string_append(x_42, x_30); -lean::cnstr_set(x_37, 1, x_43); -lean::cnstr_set(x_37, 0, x_8); -x_44 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_37); -lean::dec(x_2); -return x_44; -} else { -obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; -x_45 = lean::cnstr_get(x_37, 1); -lean::inc(x_45); -lean::dec(x_37); -x_46 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; -x_47 = lean::string_append(x_45, x_46); -x_48 = lean::string_append(x_47, x_30); -x_49 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_49, 0, x_8); -lean::cnstr_set(x_49, 1, x_48); -x_50 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_49); -lean::dec(x_2); -return x_50; -} -} -else -{ -uint8 x_51; +uint8 x_113; lean::dec(x_2); lean::dec(x_15); -x_51 = !lean::is_exclusive(x_37); -if (x_51 == 0) +x_113 = !lean::is_exclusive(x_99); +if (x_113 == 0) { -return x_37; +return x_99; } else { -obj* x_52; obj* x_53; obj* x_54; -x_52 = lean::cnstr_get(x_37, 0); -x_53 = lean::cnstr_get(x_37, 1); -lean::inc(x_53); -lean::inc(x_52); -lean::dec(x_37); -x_54 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_54, 0, x_52); -lean::cnstr_set(x_54, 1, x_53); -return x_54; -} +obj* x_114; obj* x_115; obj* x_116; +x_114 = lean::cnstr_get(x_99, 0); +x_115 = lean::cnstr_get(x_99, 1); +lean::inc(x_115); +lean::inc(x_114); +lean::dec(x_99); +x_116 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_116, 0, x_114); +lean::cnstr_set(x_116, 1, x_115); +return x_116; } } } else { -obj* x_113; obj* x_114; obj* x_115; obj* x_138; -x_113 = lean::cnstr_get(x_24, 1); -lean::inc(x_113); -lean::dec(x_24); -x_114 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_114, 0, x_8); -lean::cnstr_set(x_114, 1, x_113); -lean::inc(x_15); -x_138 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_2, x_114); -if (lean::obj_tag(x_138) == 0) -{ -obj* x_139; obj* x_140; obj* x_141; obj* x_142; obj* x_143; obj* x_144; obj* x_145; obj* x_146; obj* x_147; uint8 x_148; -x_139 = lean::cnstr_get(x_138, 0); -lean::inc(x_139); -x_140 = lean::cnstr_get(x_138, 1); -lean::inc(x_140); -if (lean::is_exclusive(x_138)) { - lean::cnstr_release(x_138, 0); - lean::cnstr_release(x_138, 1); - x_141 = x_138; -} else { - lean::dec_ref(x_138); - x_141 = lean::box(0); -} -x_142 = l_Lean_IR_EmitCpp_toCppType___main(x_17); -x_143 = lean::string_append(x_140, x_142); -lean::dec(x_142); -x_144 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; -x_145 = lean::string_append(x_143, x_144); -x_146 = lean::array_get_size(x_16); -x_147 = lean::mk_nat_obj(0u); -x_148 = lean::nat_dec_lt(x_147, x_146); -if (x_148 == 0) -{ -obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_153; -lean::dec(x_146); -lean::dec(x_141); -x_149 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_150 = lean::string_append(x_149, x_139); -lean::dec(x_139); -x_151 = l_Unit_HasRepr___closed__1; -x_152 = lean::string_append(x_150, x_151); -x_153 = lean::string_append(x_145, x_152); -lean::dec(x_152); -x_115 = x_153; -goto block_137; -} -else -{ -obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; -x_154 = lean::string_append(x_145, x_139); -lean::dec(x_139); -x_155 = l_Prod_HasRepr___rarg___closed__1; -x_156 = lean::string_append(x_154, x_155); -if (lean::is_scalar(x_141)) { - x_157 = lean::alloc_cnstr(0, 2, 0); -} else { - x_157 = x_141; -} -lean::cnstr_set(x_157, 0, x_8); -lean::cnstr_set(x_157, 1, x_156); -lean::inc(x_146); -x_158 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_146, x_146, x_2, x_157); -lean::dec(x_146); -if (lean::obj_tag(x_158) == 0) -{ -obj* x_159; obj* x_160; obj* x_161; -x_159 = lean::cnstr_get(x_158, 1); -lean::inc(x_159); -lean::dec(x_158); -x_160 = l_Option_HasRepr___rarg___closed__3; -x_161 = lean::string_append(x_159, x_160); -x_115 = x_161; -goto block_137; -} -else -{ -obj* x_162; obj* x_163; obj* x_164; obj* x_165; -lean::dec(x_2); -lean::dec(x_21); -lean::dec(x_20); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_162 = lean::cnstr_get(x_158, 0); -lean::inc(x_162); -x_163 = lean::cnstr_get(x_158, 1); -lean::inc(x_163); -if (lean::is_exclusive(x_158)) { - lean::cnstr_release(x_158, 0); - lean::cnstr_release(x_158, 1); - x_164 = x_158; -} else { - lean::dec_ref(x_158); - x_164 = lean::box(0); -} -if (lean::is_scalar(x_164)) { - x_165 = lean::alloc_cnstr(1, 2, 0); -} else { - x_165 = x_164; -} -lean::cnstr_set(x_165, 0, x_162); -lean::cnstr_set(x_165, 1, x_163); -return x_165; -} -} -} -else -{ -obj* x_166; obj* x_167; obj* x_168; obj* x_169; -lean::dec(x_2); -lean::dec(x_21); -lean::dec(x_20); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_166 = lean::cnstr_get(x_138, 0); -lean::inc(x_166); -x_167 = lean::cnstr_get(x_138, 1); -lean::inc(x_167); -if (lean::is_exclusive(x_138)) { - lean::cnstr_release(x_138, 0); - lean::cnstr_release(x_138, 1); - x_168 = x_138; -} else { - lean::dec_ref(x_138); - x_168 = lean::box(0); -} -if (lean::is_scalar(x_168)) { - x_169 = lean::alloc_cnstr(1, 2, 0); -} else { - x_169 = x_168; -} -lean::cnstr_set(x_169, 0, x_166); -lean::cnstr_set(x_169, 1, x_167); -return x_169; -} -block_137: -{ -obj* x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; -x_116 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; -x_117 = lean::string_append(x_115, x_116); -x_118 = l_IO_println___rarg___closed__1; +obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_122; obj* x_123; +x_117 = lean::cnstr_get(x_91, 1); +lean::inc(x_117); +lean::dec(x_91); +x_118 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; x_119 = lean::string_append(x_117, x_118); -x_120 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; -x_121 = lean::string_append(x_119, x_120); -x_122 = lean::string_append(x_121, x_118); -x_123 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_123, 0, x_8); -lean::cnstr_set(x_123, 1, x_122); +x_120 = lean::string_append(x_119, x_39); +x_121 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_121, 0, x_8); +lean::cnstr_set(x_121, 1, x_120); lean::inc(x_15); -x_124 = lean::alloc_cnstr(0, 6, 0); -lean::cnstr_set(x_124, 0, x_20); -lean::cnstr_set(x_124, 1, x_21); -lean::cnstr_set(x_124, 2, x_10); -lean::cnstr_set(x_124, 3, x_11); -lean::cnstr_set(x_124, 4, x_15); -lean::cnstr_set(x_124, 5, x_16); -x_125 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_124, x_123); -if (lean::obj_tag(x_125) == 0) +x_122 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_122, 0, x_20); +lean::cnstr_set(x_122, 1, x_21); +lean::cnstr_set(x_122, 2, x_10); +lean::cnstr_set(x_122, 3, x_11); +lean::cnstr_set(x_122, 4, x_15); +lean::cnstr_set(x_122, 5, x_16); +x_123 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_122, x_121); +if (lean::obj_tag(x_123) == 0) { -obj* x_126; obj* x_127; obj* x_128; obj* x_129; obj* x_130; obj* x_131; obj* x_132; -x_126 = lean::cnstr_get(x_125, 1); -lean::inc(x_126); -if (lean::is_exclusive(x_125)) { - lean::cnstr_release(x_125, 0); - lean::cnstr_release(x_125, 1); - x_127 = x_125; +obj* x_124; obj* x_125; obj* x_126; obj* x_127; obj* x_128; obj* x_129; obj* x_130; +x_124 = lean::cnstr_get(x_123, 1); +lean::inc(x_124); +if (lean::is_exclusive(x_123)) { + lean::cnstr_release(x_123, 0); + lean::cnstr_release(x_123, 1); + x_125 = x_123; } else { - lean::dec_ref(x_125); - x_127 = lean::box(0); + lean::dec_ref(x_123); + x_125 = lean::box(0); } -x_128 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; -x_129 = lean::string_append(x_126, x_128); -x_130 = lean::string_append(x_129, x_118); -if (lean::is_scalar(x_127)) { - x_131 = lean::alloc_cnstr(0, 2, 0); +x_126 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_127 = lean::string_append(x_124, x_126); +x_128 = lean::string_append(x_127, x_39); +if (lean::is_scalar(x_125)) { + x_129 = lean::alloc_cnstr(0, 2, 0); } else { - x_131 = x_127; + x_129 = x_125; } -lean::cnstr_set(x_131, 0, x_8); -lean::cnstr_set(x_131, 1, x_130); -x_132 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_131); +lean::cnstr_set(x_129, 0, x_8); +lean::cnstr_set(x_129, 1, x_128); +x_130 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_129); lean::dec(x_2); -return x_132; +return x_130; } else { -obj* x_133; obj* x_134; obj* x_135; obj* x_136; +obj* x_131; obj* x_132; obj* x_133; obj* x_134; lean::dec(x_2); lean::dec(x_15); -x_133 = lean::cnstr_get(x_125, 0); -lean::inc(x_133); -x_134 = lean::cnstr_get(x_125, 1); -lean::inc(x_134); -if (lean::is_exclusive(x_125)) { - lean::cnstr_release(x_125, 0); - lean::cnstr_release(x_125, 1); - x_135 = x_125; +x_131 = lean::cnstr_get(x_123, 0); +lean::inc(x_131); +x_132 = lean::cnstr_get(x_123, 1); +lean::inc(x_132); +if (lean::is_exclusive(x_123)) { + lean::cnstr_release(x_123, 0); + lean::cnstr_release(x_123, 1); + x_133 = x_123; } else { - lean::dec_ref(x_125); - x_135 = lean::box(0); + lean::dec_ref(x_123); + x_133 = lean::box(0); } -if (lean::is_scalar(x_135)) { - x_136 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_133)) { + x_134 = lean::alloc_cnstr(1, 2, 0); } else { - x_136 = x_135; -} -lean::cnstr_set(x_136, 0, x_133); -lean::cnstr_set(x_136, 1, x_134); -return x_136; + x_134 = x_133; } +lean::cnstr_set(x_134, 0, x_131); +lean::cnstr_set(x_134, 1, x_132); +return x_134; } } } else { -uint8 x_170; +uint8 x_135; lean::dec(x_2); lean::dec(x_21); lean::dec(x_20); @@ -23374,686 +23562,828 @@ lean::dec(x_16); lean::dec(x_15); lean::dec(x_11); lean::dec(x_10); -x_170 = !lean::is_exclusive(x_24); -if (x_170 == 0) +x_135 = !lean::is_exclusive(x_91); +if (x_135 == 0) +{ +return x_91; +} +else +{ +obj* x_136; obj* x_137; obj* x_138; +x_136 = lean::cnstr_get(x_91, 0); +x_137 = lean::cnstr_get(x_91, 1); +lean::inc(x_137); +lean::inc(x_136); +lean::dec(x_91); +x_138 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_138, 0, x_136); +lean::cnstr_set(x_138, 1, x_137); +return x_138; +} +} +} +} +} +} +else +{ +uint8 x_168; +lean::dec(x_2); +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_168 = !lean::is_exclusive(x_27); +if (x_168 == 0) +{ +return x_27; +} +else +{ +obj* x_169; obj* x_170; obj* x_171; +x_169 = lean::cnstr_get(x_27, 0); +x_170 = lean::cnstr_get(x_27, 1); +lean::inc(x_170); +lean::inc(x_169); +lean::dec(x_27); +x_171 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_171, 0, x_169); +lean::cnstr_set(x_171, 1, x_170); +return x_171; +} +} +} +else +{ +obj* x_172; obj* x_173; obj* x_174; +x_172 = lean::cnstr_get(x_24, 1); +lean::inc(x_172); +lean::dec(x_24); +x_173 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_173, 0, x_8); +lean::cnstr_set(x_173, 1, x_172); +lean::inc(x_15); +x_174 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_2, x_173); +if (lean::obj_tag(x_174) == 0) +{ +obj* x_175; obj* x_176; obj* x_177; obj* x_178; obj* x_179; obj* x_180; obj* x_181; obj* x_182; obj* x_183; obj* x_251; uint8 x_252; +x_175 = lean::cnstr_get(x_174, 0); +lean::inc(x_175); +x_176 = lean::cnstr_get(x_174, 1); +lean::inc(x_176); +if (lean::is_exclusive(x_174)) { + lean::cnstr_release(x_174, 0); + lean::cnstr_release(x_174, 1); + x_177 = x_174; +} else { + lean::dec_ref(x_174); + x_177 = lean::box(0); +} +x_178 = l_Lean_IR_EmitCpp_toCppType___main(x_17); +x_179 = lean::string_append(x_176, x_178); +lean::dec(x_178); +x_180 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; +x_181 = lean::string_append(x_179, x_180); +x_182 = lean::array_get_size(x_16); +x_251 = lean::mk_nat_obj(0u); +x_252 = lean::nat_dec_lt(x_251, x_182); +if (x_252 == 0) +{ +obj* x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; +x_253 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_254 = lean::string_append(x_253, x_175); +lean::dec(x_175); +x_255 = l_Unit_HasRepr___closed__1; +x_256 = lean::string_append(x_254, x_255); +x_257 = lean::string_append(x_181, x_256); +lean::dec(x_256); +x_183 = x_257; +goto block_250; +} +else +{ +obj* x_258; obj* x_259; obj* x_260; obj* x_261; obj* x_262; obj* x_272; uint8 x_273; +x_258 = lean::string_append(x_181, x_175); +lean::dec(x_175); +x_259 = l_Prod_HasRepr___rarg___closed__1; +x_260 = lean::string_append(x_258, x_259); +lean::inc(x_260); +x_261 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_261, 0, x_8); +lean::cnstr_set(x_261, 1, x_260); +x_272 = l_Lean_closureMaxArgs; +x_273 = lean::nat_dec_lt(x_272, x_182); +if (x_273 == 0) +{ +lean::dec(x_260); +x_262 = x_8; +goto block_271; +} +else +{ +uint8 x_274; +x_274 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +if (x_274 == 0) +{ +lean::dec(x_260); +x_262 = x_8; +goto block_271; +} +else +{ +obj* x_275; obj* x_276; obj* x_277; obj* x_278; +lean::dec(x_261); +x_275 = l_Lean_IR_EmitCpp_emitDeclAux___closed__2; +x_276 = lean::string_append(x_260, x_275); +x_277 = l_Option_HasRepr___rarg___closed__3; +x_278 = lean::string_append(x_276, x_277); +x_183 = x_278; +goto block_250; +} +} +block_271: +{ +obj* x_263; +lean::dec(x_262); +lean::inc(x_182); +x_263 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(x_16, x_182, x_182, x_2, x_261); +if (lean::obj_tag(x_263) == 0) +{ +obj* x_264; obj* x_265; obj* x_266; +x_264 = lean::cnstr_get(x_263, 1); +lean::inc(x_264); +lean::dec(x_263); +x_265 = l_Option_HasRepr___rarg___closed__3; +x_266 = lean::string_append(x_264, x_265); +x_183 = x_266; +goto block_250; +} +else +{ +obj* x_267; obj* x_268; obj* x_269; obj* x_270; +lean::dec(x_182); +lean::dec(x_177); +lean::dec(x_2); +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_267 = lean::cnstr_get(x_263, 0); +lean::inc(x_267); +x_268 = lean::cnstr_get(x_263, 1); +lean::inc(x_268); +if (lean::is_exclusive(x_263)) { + lean::cnstr_release(x_263, 0); + lean::cnstr_release(x_263, 1); + x_269 = x_263; +} else { + lean::dec_ref(x_263); + x_269 = lean::box(0); +} +if (lean::is_scalar(x_269)) { + x_270 = lean::alloc_cnstr(1, 2, 0); +} else { + x_270 = x_269; +} +lean::cnstr_set(x_270, 0, x_267); +lean::cnstr_set(x_270, 1, x_268); +return x_270; +} +} +} +block_250: +{ +obj* x_184; obj* x_185; obj* x_186; obj* x_187; obj* x_188; obj* x_189; uint8 x_190; +x_184 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; +x_185 = lean::string_append(x_183, x_184); +x_186 = l_IO_println___rarg___closed__1; +x_187 = lean::string_append(x_185, x_186); +lean::inc(x_187); +if (lean::is_scalar(x_177)) { + x_188 = lean::alloc_cnstr(0, 2, 0); +} else { + x_188 = x_177; +} +lean::cnstr_set(x_188, 0, x_8); +lean::cnstr_set(x_188, 1, x_187); +x_189 = l_Lean_closureMaxArgs; +x_190 = lean::nat_dec_lt(x_189, x_182); +if (x_190 == 0) +{ +obj* x_191; obj* x_192; obj* x_193; obj* x_194; obj* x_195; obj* x_196; +lean::dec(x_188); +lean::dec(x_182); +lean::dec(x_12); +x_191 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_192 = lean::string_append(x_187, x_191); +x_193 = lean::string_append(x_192, x_186); +x_194 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_194, 0, x_8); +lean::cnstr_set(x_194, 1, x_193); +lean::inc(x_15); +x_195 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_195, 0, x_20); +lean::cnstr_set(x_195, 1, x_21); +lean::cnstr_set(x_195, 2, x_10); +lean::cnstr_set(x_195, 3, x_11); +lean::cnstr_set(x_195, 4, x_15); +lean::cnstr_set(x_195, 5, x_16); +x_196 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_195, x_194); +if (lean::obj_tag(x_196) == 0) +{ +obj* x_197; obj* x_198; obj* x_199; obj* x_200; obj* x_201; obj* x_202; obj* x_203; +x_197 = lean::cnstr_get(x_196, 1); +lean::inc(x_197); +if (lean::is_exclusive(x_196)) { + lean::cnstr_release(x_196, 0); + lean::cnstr_release(x_196, 1); + x_198 = x_196; +} else { + lean::dec_ref(x_196); + x_198 = lean::box(0); +} +x_199 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_200 = lean::string_append(x_197, x_199); +x_201 = lean::string_append(x_200, x_186); +if (lean::is_scalar(x_198)) { + x_202 = lean::alloc_cnstr(0, 2, 0); +} else { + x_202 = x_198; +} +lean::cnstr_set(x_202, 0, x_8); +lean::cnstr_set(x_202, 1, x_201); +x_203 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_202); +lean::dec(x_2); +return x_203; +} +else +{ +obj* x_204; obj* x_205; obj* x_206; obj* x_207; +lean::dec(x_2); +lean::dec(x_15); +x_204 = lean::cnstr_get(x_196, 0); +lean::inc(x_204); +x_205 = lean::cnstr_get(x_196, 1); +lean::inc(x_205); +if (lean::is_exclusive(x_196)) { + lean::cnstr_release(x_196, 0); + lean::cnstr_release(x_196, 1); + x_206 = x_196; +} else { + lean::dec_ref(x_196); + x_206 = lean::box(0); +} +if (lean::is_scalar(x_206)) { + x_207 = lean::alloc_cnstr(1, 2, 0); +} else { + x_207 = x_206; +} +lean::cnstr_set(x_207, 0, x_204); +lean::cnstr_set(x_207, 1, x_205); +return x_207; +} +} +else +{ +uint8 x_208; +x_208 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +lean::dec(x_12); +if (x_208 == 0) +{ +obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_213; obj* x_214; +lean::dec(x_188); +lean::dec(x_182); +x_209 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_210 = lean::string_append(x_187, x_209); +x_211 = lean::string_append(x_210, x_186); +x_212 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_212, 0, x_8); +lean::cnstr_set(x_212, 1, x_211); +lean::inc(x_15); +x_213 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_213, 0, x_20); +lean::cnstr_set(x_213, 1, x_21); +lean::cnstr_set(x_213, 2, x_10); +lean::cnstr_set(x_213, 3, x_11); +lean::cnstr_set(x_213, 4, x_15); +lean::cnstr_set(x_213, 5, x_16); +x_214 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_213, x_212); +if (lean::obj_tag(x_214) == 0) +{ +obj* x_215; obj* x_216; obj* x_217; obj* x_218; obj* x_219; obj* x_220; obj* x_221; +x_215 = lean::cnstr_get(x_214, 1); +lean::inc(x_215); +if (lean::is_exclusive(x_214)) { + lean::cnstr_release(x_214, 0); + lean::cnstr_release(x_214, 1); + x_216 = x_214; +} else { + lean::dec_ref(x_214); + x_216 = lean::box(0); +} +x_217 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_218 = lean::string_append(x_215, x_217); +x_219 = lean::string_append(x_218, x_186); +if (lean::is_scalar(x_216)) { + x_220 = lean::alloc_cnstr(0, 2, 0); +} else { + x_220 = x_216; +} +lean::cnstr_set(x_220, 0, x_8); +lean::cnstr_set(x_220, 1, x_219); +x_221 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_220); +lean::dec(x_2); +return x_221; +} +else +{ +obj* x_222; obj* x_223; obj* x_224; obj* x_225; +lean::dec(x_2); +lean::dec(x_15); +x_222 = lean::cnstr_get(x_214, 0); +lean::inc(x_222); +x_223 = lean::cnstr_get(x_214, 1); +lean::inc(x_223); +if (lean::is_exclusive(x_214)) { + lean::cnstr_release(x_214, 0); + lean::cnstr_release(x_214, 1); + x_224 = x_214; +} else { + lean::dec_ref(x_214); + x_224 = lean::box(0); +} +if (lean::is_scalar(x_224)) { + x_225 = lean::alloc_cnstr(1, 2, 0); +} else { + x_225 = x_224; +} +lean::cnstr_set(x_225, 0, x_222); +lean::cnstr_set(x_225, 1, x_223); +return x_225; +} +} +else +{ +obj* x_226; +lean::dec(x_187); +lean::inc(x_182); +x_226 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_182, x_182, x_2, x_188); +lean::dec(x_182); +if (lean::obj_tag(x_226) == 0) +{ +obj* x_227; obj* x_228; obj* x_229; obj* x_230; obj* x_231; obj* x_232; obj* x_233; obj* x_234; +x_227 = lean::cnstr_get(x_226, 1); +lean::inc(x_227); +if (lean::is_exclusive(x_226)) { + lean::cnstr_release(x_226, 0); + lean::cnstr_release(x_226, 1); + x_228 = x_226; +} else { + lean::dec_ref(x_226); + x_228 = lean::box(0); +} +x_229 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_230 = lean::string_append(x_227, x_229); +x_231 = lean::string_append(x_230, x_186); +if (lean::is_scalar(x_228)) { + x_232 = lean::alloc_cnstr(0, 2, 0); +} else { + x_232 = x_228; +} +lean::cnstr_set(x_232, 0, x_8); +lean::cnstr_set(x_232, 1, x_231); +lean::inc(x_15); +x_233 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_233, 0, x_20); +lean::cnstr_set(x_233, 1, x_21); +lean::cnstr_set(x_233, 2, x_10); +lean::cnstr_set(x_233, 3, x_11); +lean::cnstr_set(x_233, 4, x_15); +lean::cnstr_set(x_233, 5, x_16); +x_234 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_233, x_232); +if (lean::obj_tag(x_234) == 0) +{ +obj* x_235; obj* x_236; obj* x_237; obj* x_238; obj* x_239; obj* x_240; obj* x_241; +x_235 = lean::cnstr_get(x_234, 1); +lean::inc(x_235); +if (lean::is_exclusive(x_234)) { + lean::cnstr_release(x_234, 0); + lean::cnstr_release(x_234, 1); + x_236 = x_234; +} else { + lean::dec_ref(x_234); + x_236 = lean::box(0); +} +x_237 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_238 = lean::string_append(x_235, x_237); +x_239 = lean::string_append(x_238, x_186); +if (lean::is_scalar(x_236)) { + x_240 = lean::alloc_cnstr(0, 2, 0); +} else { + x_240 = x_236; +} +lean::cnstr_set(x_240, 0, x_8); +lean::cnstr_set(x_240, 1, x_239); +x_241 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_2, x_240); +lean::dec(x_2); +return x_241; +} +else +{ +obj* x_242; obj* x_243; obj* x_244; obj* x_245; +lean::dec(x_2); +lean::dec(x_15); +x_242 = lean::cnstr_get(x_234, 0); +lean::inc(x_242); +x_243 = lean::cnstr_get(x_234, 1); +lean::inc(x_243); +if (lean::is_exclusive(x_234)) { + lean::cnstr_release(x_234, 0); + lean::cnstr_release(x_234, 1); + x_244 = x_234; +} else { + lean::dec_ref(x_234); + x_244 = lean::box(0); +} +if (lean::is_scalar(x_244)) { + x_245 = lean::alloc_cnstr(1, 2, 0); +} else { + x_245 = x_244; +} +lean::cnstr_set(x_245, 0, x_242); +lean::cnstr_set(x_245, 1, x_243); +return x_245; +} +} +else +{ +obj* x_246; obj* x_247; obj* x_248; obj* x_249; +lean::dec(x_2); +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_11); +lean::dec(x_10); +x_246 = lean::cnstr_get(x_226, 0); +lean::inc(x_246); +x_247 = lean::cnstr_get(x_226, 1); +lean::inc(x_247); +if (lean::is_exclusive(x_226)) { + lean::cnstr_release(x_226, 0); + lean::cnstr_release(x_226, 1); + x_248 = x_226; +} else { + lean::dec_ref(x_226); + x_248 = lean::box(0); +} +if (lean::is_scalar(x_248)) { + x_249 = lean::alloc_cnstr(1, 2, 0); +} else { + x_249 = x_248; +} +lean::cnstr_set(x_249, 0, x_246); +lean::cnstr_set(x_249, 1, x_247); +return x_249; +} +} +} +} +} +else +{ +obj* x_279; obj* x_280; obj* x_281; obj* x_282; +lean::dec(x_2); +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_279 = lean::cnstr_get(x_174, 0); +lean::inc(x_279); +x_280 = lean::cnstr_get(x_174, 1); +lean::inc(x_280); +if (lean::is_exclusive(x_174)) { + lean::cnstr_release(x_174, 0); + lean::cnstr_release(x_174, 1); + x_281 = x_174; +} else { + lean::dec_ref(x_174); + x_281 = lean::box(0); +} +if (lean::is_scalar(x_281)) { + x_282 = lean::alloc_cnstr(1, 2, 0); +} else { + x_282 = x_281; +} +lean::cnstr_set(x_282, 0, x_279); +lean::cnstr_set(x_282, 1, x_280); +return x_282; +} +} +} +else +{ +uint8 x_283; +lean::dec(x_2); +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_283 = !lean::is_exclusive(x_24); +if (x_283 == 0) { return x_24; } else { -obj* x_171; obj* x_172; obj* x_173; -x_171 = lean::cnstr_get(x_24, 0); -x_172 = lean::cnstr_get(x_24, 1); -lean::inc(x_172); -lean::inc(x_171); +obj* x_284; obj* x_285; obj* x_286; +x_284 = lean::cnstr_get(x_24, 0); +x_285 = lean::cnstr_get(x_24, 1); +lean::inc(x_285); +lean::inc(x_284); lean::dec(x_24); -x_173 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_173, 0, x_171); -lean::cnstr_set(x_173, 1, x_172); -return x_173; +x_286 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_286, 0, x_284); +lean::cnstr_set(x_286, 1, x_285); +return x_286; } } } else { -obj* x_174; obj* x_175; obj* x_176; obj* x_177; obj* x_178; obj* x_179; -x_174 = lean::cnstr_get(x_2, 0); -x_175 = lean::cnstr_get(x_2, 1); -x_176 = lean::cnstr_get(x_2, 4); -x_177 = lean::cnstr_get(x_2, 5); -lean::inc(x_177); -lean::inc(x_176); -lean::inc(x_175); -lean::inc(x_174); +obj* x_287; obj* x_288; obj* x_289; obj* x_290; obj* x_291; obj* x_292; +x_287 = lean::cnstr_get(x_2, 0); +x_288 = lean::cnstr_get(x_2, 1); +x_289 = lean::cnstr_get(x_2, 4); +x_290 = lean::cnstr_get(x_2, 5); +lean::inc(x_290); +lean::inc(x_289); +lean::inc(x_288); +lean::inc(x_287); lean::dec(x_2); lean::inc(x_11); lean::inc(x_10); -lean::inc(x_175); -lean::inc(x_174); -x_178 = lean::alloc_cnstr(0, 6, 0); -lean::cnstr_set(x_178, 0, x_174); -lean::cnstr_set(x_178, 1, x_175); -lean::cnstr_set(x_178, 2, x_10); -lean::cnstr_set(x_178, 3, x_11); -lean::cnstr_set(x_178, 4, x_176); -lean::cnstr_set(x_178, 5, x_177); +lean::inc(x_288); +lean::inc(x_287); +x_291 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_291, 0, x_287); +lean::cnstr_set(x_291, 1, x_288); +lean::cnstr_set(x_291, 2, x_10); +lean::cnstr_set(x_291, 3, x_11); +lean::cnstr_set(x_291, 4, x_289); +lean::cnstr_set(x_291, 5, x_290); lean::inc(x_15); -x_179 = l_Lean_IR_EmitCpp_openNamespacesFor(x_15, x_178, x_4); -if (lean::obj_tag(x_179) == 0) +x_292 = l_Lean_IR_EmitCpp_openNamespacesFor(x_15, x_291, x_4); +if (lean::obj_tag(x_292) == 0) { -obj* x_180; obj* x_181; obj* x_182; obj* x_183; obj* x_206; -x_180 = lean::cnstr_get(x_179, 1); -lean::inc(x_180); -if (lean::is_exclusive(x_179)) { - lean::cnstr_release(x_179, 0); - lean::cnstr_release(x_179, 1); - x_181 = x_179; +obj* x_293; obj* x_294; obj* x_295; obj* x_296; +x_293 = lean::cnstr_get(x_292, 1); +lean::inc(x_293); +if (lean::is_exclusive(x_292)) { + lean::cnstr_release(x_292, 0); + lean::cnstr_release(x_292, 1); + x_294 = x_292; } else { - lean::dec_ref(x_179); - x_181 = lean::box(0); + lean::dec_ref(x_292); + x_294 = lean::box(0); } -if (lean::is_scalar(x_181)) { - x_182 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_294)) { + x_295 = lean::alloc_cnstr(0, 2, 0); } else { - x_182 = x_181; + x_295 = x_294; } -lean::cnstr_set(x_182, 0, x_8); -lean::cnstr_set(x_182, 1, x_180); +lean::cnstr_set(x_295, 0, x_8); +lean::cnstr_set(x_295, 1, x_293); lean::inc(x_15); -x_206 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_178, x_182); -if (lean::obj_tag(x_206) == 0) +x_296 = l_Lean_IR_EmitCpp_toBaseCppName(x_15, x_291, x_295); +if (lean::obj_tag(x_296) == 0) { -obj* x_207; obj* x_208; obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_213; obj* x_214; obj* x_215; uint8 x_216; -x_207 = lean::cnstr_get(x_206, 0); -lean::inc(x_207); -x_208 = lean::cnstr_get(x_206, 1); -lean::inc(x_208); -if (lean::is_exclusive(x_206)) { - lean::cnstr_release(x_206, 0); - lean::cnstr_release(x_206, 1); - x_209 = x_206; +obj* x_297; obj* x_298; obj* x_299; obj* x_300; obj* x_301; obj* x_302; obj* x_303; obj* x_304; obj* x_305; obj* x_373; uint8 x_374; +x_297 = lean::cnstr_get(x_296, 0); +lean::inc(x_297); +x_298 = lean::cnstr_get(x_296, 1); +lean::inc(x_298); +if (lean::is_exclusive(x_296)) { + lean::cnstr_release(x_296, 0); + lean::cnstr_release(x_296, 1); + x_299 = x_296; } else { - lean::dec_ref(x_206); - x_209 = lean::box(0); + lean::dec_ref(x_296); + x_299 = lean::box(0); } -x_210 = l_Lean_IR_EmitCpp_toCppType___main(x_17); -x_211 = lean::string_append(x_208, x_210); -lean::dec(x_210); -x_212 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; -x_213 = lean::string_append(x_211, x_212); -x_214 = lean::array_get_size(x_16); -x_215 = lean::mk_nat_obj(0u); -x_216 = lean::nat_dec_lt(x_215, x_214); -if (x_216 == 0) +x_300 = l_Lean_IR_EmitCpp_toCppType___main(x_17); +x_301 = lean::string_append(x_298, x_300); +lean::dec(x_300); +x_302 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; +x_303 = lean::string_append(x_301, x_302); +x_304 = lean::array_get_size(x_16); +x_373 = lean::mk_nat_obj(0u); +x_374 = lean::nat_dec_lt(x_373, x_304); +if (x_374 == 0) { -obj* x_217; obj* x_218; obj* x_219; obj* x_220; obj* x_221; -lean::dec(x_214); -lean::dec(x_209); -x_217 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_218 = lean::string_append(x_217, x_207); -lean::dec(x_207); -x_219 = l_Unit_HasRepr___closed__1; -x_220 = lean::string_append(x_218, x_219); -x_221 = lean::string_append(x_213, x_220); -lean::dec(x_220); -x_183 = x_221; -goto block_205; -} -else -{ -obj* x_222; obj* x_223; obj* x_224; obj* x_225; obj* x_226; -x_222 = lean::string_append(x_213, x_207); -lean::dec(x_207); -x_223 = l_Prod_HasRepr___rarg___closed__1; -x_224 = lean::string_append(x_222, x_223); -if (lean::is_scalar(x_209)) { - x_225 = lean::alloc_cnstr(0, 2, 0); -} else { - x_225 = x_209; -} -lean::cnstr_set(x_225, 0, x_8); -lean::cnstr_set(x_225, 1, x_224); -lean::inc(x_214); -x_226 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_214, x_214, x_178, x_225); -lean::dec(x_214); -if (lean::obj_tag(x_226) == 0) -{ -obj* x_227; obj* x_228; obj* x_229; -x_227 = lean::cnstr_get(x_226, 1); -lean::inc(x_227); -lean::dec(x_226); -x_228 = l_Option_HasRepr___rarg___closed__3; -x_229 = lean::string_append(x_227, x_228); -x_183 = x_229; -goto block_205; -} -else -{ -obj* x_230; obj* x_231; obj* x_232; obj* x_233; -lean::dec(x_178); -lean::dec(x_175); -lean::dec(x_174); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_230 = lean::cnstr_get(x_226, 0); -lean::inc(x_230); -x_231 = lean::cnstr_get(x_226, 1); -lean::inc(x_231); -if (lean::is_exclusive(x_226)) { - lean::cnstr_release(x_226, 0); - lean::cnstr_release(x_226, 1); - x_232 = x_226; -} else { - lean::dec_ref(x_226); - x_232 = lean::box(0); -} -if (lean::is_scalar(x_232)) { - x_233 = lean::alloc_cnstr(1, 2, 0); -} else { - x_233 = x_232; -} -lean::cnstr_set(x_233, 0, x_230); -lean::cnstr_set(x_233, 1, x_231); -return x_233; -} -} -} -else -{ -obj* x_234; obj* x_235; obj* x_236; obj* x_237; -lean::dec(x_178); -lean::dec(x_175); -lean::dec(x_174); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_234 = lean::cnstr_get(x_206, 0); -lean::inc(x_234); -x_235 = lean::cnstr_get(x_206, 1); -lean::inc(x_235); -if (lean::is_exclusive(x_206)) { - lean::cnstr_release(x_206, 0); - lean::cnstr_release(x_206, 1); - x_236 = x_206; -} else { - lean::dec_ref(x_206); - x_236 = lean::box(0); -} -if (lean::is_scalar(x_236)) { - x_237 = lean::alloc_cnstr(1, 2, 0); -} else { - x_237 = x_236; -} -lean::cnstr_set(x_237, 0, x_234); -lean::cnstr_set(x_237, 1, x_235); -return x_237; -} -block_205: -{ -obj* x_184; obj* x_185; obj* x_186; obj* x_187; obj* x_188; obj* x_189; obj* x_190; obj* x_191; obj* x_192; obj* x_193; -x_184 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; -x_185 = lean::string_append(x_183, x_184); -x_186 = l_IO_println___rarg___closed__1; -x_187 = lean::string_append(x_185, x_186); -x_188 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; -x_189 = lean::string_append(x_187, x_188); -x_190 = lean::string_append(x_189, x_186); -x_191 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_191, 0, x_8); -lean::cnstr_set(x_191, 1, x_190); -lean::inc(x_15); -x_192 = lean::alloc_cnstr(0, 6, 0); -lean::cnstr_set(x_192, 0, x_174); -lean::cnstr_set(x_192, 1, x_175); -lean::cnstr_set(x_192, 2, x_10); -lean::cnstr_set(x_192, 3, x_11); -lean::cnstr_set(x_192, 4, x_15); -lean::cnstr_set(x_192, 5, x_16); -x_193 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_192, x_191); -if (lean::obj_tag(x_193) == 0) -{ -obj* x_194; obj* x_195; obj* x_196; obj* x_197; obj* x_198; obj* x_199; obj* x_200; -x_194 = lean::cnstr_get(x_193, 1); -lean::inc(x_194); -if (lean::is_exclusive(x_193)) { - lean::cnstr_release(x_193, 0); - lean::cnstr_release(x_193, 1); - x_195 = x_193; -} else { - lean::dec_ref(x_193); - x_195 = lean::box(0); -} -x_196 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; -x_197 = lean::string_append(x_194, x_196); -x_198 = lean::string_append(x_197, x_186); -if (lean::is_scalar(x_195)) { - x_199 = lean::alloc_cnstr(0, 2, 0); -} else { - x_199 = x_195; -} -lean::cnstr_set(x_199, 0, x_8); -lean::cnstr_set(x_199, 1, x_198); -x_200 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_178, x_199); -lean::dec(x_178); -return x_200; -} -else -{ -obj* x_201; obj* x_202; obj* x_203; obj* x_204; -lean::dec(x_178); -lean::dec(x_15); -x_201 = lean::cnstr_get(x_193, 0); -lean::inc(x_201); -x_202 = lean::cnstr_get(x_193, 1); -lean::inc(x_202); -if (lean::is_exclusive(x_193)) { - lean::cnstr_release(x_193, 0); - lean::cnstr_release(x_193, 1); - x_203 = x_193; -} else { - lean::dec_ref(x_193); - x_203 = lean::box(0); -} -if (lean::is_scalar(x_203)) { - x_204 = lean::alloc_cnstr(1, 2, 0); -} else { - x_204 = x_203; -} -lean::cnstr_set(x_204, 0, x_201); -lean::cnstr_set(x_204, 1, x_202); -return x_204; -} -} -} -else -{ -obj* x_238; obj* x_239; obj* x_240; obj* x_241; -lean::dec(x_178); -lean::dec(x_175); -lean::dec(x_174); -lean::dec(x_18); -lean::dec(x_16); -lean::dec(x_15); -lean::dec(x_11); -lean::dec(x_10); -x_238 = lean::cnstr_get(x_179, 0); -lean::inc(x_238); -x_239 = lean::cnstr_get(x_179, 1); -lean::inc(x_239); -if (lean::is_exclusive(x_179)) { - lean::cnstr_release(x_179, 0); - lean::cnstr_release(x_179, 1); - x_240 = x_179; -} else { - lean::dec_ref(x_179); - x_240 = lean::box(0); -} -if (lean::is_scalar(x_240)) { - x_241 = lean::alloc_cnstr(1, 2, 0); -} else { - x_241 = x_240; -} -lean::cnstr_set(x_241, 0, x_238); -lean::cnstr_set(x_241, 1, x_239); -return x_241; -} -} -} -else -{ -obj* x_242; -lean::dec(x_11); -lean::dec(x_10); -lean::dec(x_4); -lean::dec(x_2); -lean::dec(x_1); -x_242 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_242, 0, x_8); -lean::cnstr_set(x_242, 1, x_7); -return x_242; -} -} -else -{ -obj* x_243; -lean::dec(x_11); -lean::dec(x_10); -lean::dec(x_4); -lean::dec(x_2); -lean::dec(x_1); -x_243 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_243, 0, x_8); -lean::cnstr_set(x_243, 1, x_7); -return x_243; -} -} -} -else -{ -obj* x_247; obj* x_248; obj* x_249; obj* x_250; obj* x_251; obj* x_252; obj* x_253; obj* x_254; uint8 x_255; uint8 x_256; -x_247 = lean::cnstr_get(x_4, 0); -x_248 = lean::cnstr_get(x_4, 1); -lean::inc(x_248); -lean::inc(x_247); -lean::dec(x_4); -x_249 = lean::box(0); -lean::inc(x_248); -x_250 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_250, 0, x_249); -lean::cnstr_set(x_250, 1, x_248); -lean::inc(x_1); -x_251 = l_Lean_IR_mkVarJPMaps(x_1); -x_252 = lean::cnstr_get(x_251, 0); -lean::inc(x_252); -x_253 = lean::cnstr_get(x_251, 1); -lean::inc(x_253); -lean::dec(x_251); -x_254 = l_Lean_IR_Decl_name___main(x_1); -x_255 = l_Lean_hasInitAttr(x_247, x_254); -if (x_255 == 0) -{ -uint8 x_333; -x_333 = 0; -x_256 = x_333; -goto block_332; -} -else -{ -uint8 x_334; -x_334 = 1; -x_256 = x_334; -goto block_332; -} -block_332: -{ -if (x_256 == 0) -{ -if (lean::obj_tag(x_1) == 0) -{ -obj* x_257; obj* x_258; uint8 x_259; obj* x_260; obj* x_261; obj* x_262; obj* x_263; obj* x_264; obj* x_265; obj* x_266; obj* x_267; -lean::dec(x_248); -x_257 = lean::cnstr_get(x_1, 0); -lean::inc(x_257); -x_258 = lean::cnstr_get(x_1, 1); -lean::inc(x_258); -x_259 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); -x_260 = lean::cnstr_get(x_1, 2); -lean::inc(x_260); -lean::dec(x_1); -x_261 = lean::cnstr_get(x_2, 0); -lean::inc(x_261); -x_262 = lean::cnstr_get(x_2, 1); -lean::inc(x_262); -x_263 = lean::cnstr_get(x_2, 4); -lean::inc(x_263); -x_264 = lean::cnstr_get(x_2, 5); -lean::inc(x_264); -if (lean::is_exclusive(x_2)) { - lean::cnstr_release(x_2, 0); - lean::cnstr_release(x_2, 1); - lean::cnstr_release(x_2, 2); - lean::cnstr_release(x_2, 3); - lean::cnstr_release(x_2, 4); - lean::cnstr_release(x_2, 5); - x_265 = x_2; -} else { - lean::dec_ref(x_2); - x_265 = lean::box(0); -} -lean::inc(x_253); -lean::inc(x_252); -lean::inc(x_262); -lean::inc(x_261); -if (lean::is_scalar(x_265)) { - x_266 = lean::alloc_cnstr(0, 6, 0); -} else { - x_266 = x_265; -} -lean::cnstr_set(x_266, 0, x_261); -lean::cnstr_set(x_266, 1, x_262); -lean::cnstr_set(x_266, 2, x_252); -lean::cnstr_set(x_266, 3, x_253); -lean::cnstr_set(x_266, 4, x_263); -lean::cnstr_set(x_266, 5, x_264); -lean::inc(x_257); -x_267 = l_Lean_IR_EmitCpp_openNamespacesFor(x_257, x_266, x_250); -if (lean::obj_tag(x_267) == 0) -{ -obj* x_268; obj* x_269; obj* x_270; obj* x_271; obj* x_294; -x_268 = lean::cnstr_get(x_267, 1); -lean::inc(x_268); -if (lean::is_exclusive(x_267)) { - lean::cnstr_release(x_267, 0); - lean::cnstr_release(x_267, 1); - x_269 = x_267; -} else { - lean::dec_ref(x_267); - x_269 = lean::box(0); -} -if (lean::is_scalar(x_269)) { - x_270 = lean::alloc_cnstr(0, 2, 0); -} else { - x_270 = x_269; -} -lean::cnstr_set(x_270, 0, x_249); -lean::cnstr_set(x_270, 1, x_268); -lean::inc(x_257); -x_294 = l_Lean_IR_EmitCpp_toBaseCppName(x_257, x_266, x_270); -if (lean::obj_tag(x_294) == 0) -{ -obj* x_295; obj* x_296; obj* x_297; obj* x_298; obj* x_299; obj* x_300; obj* x_301; obj* x_302; obj* x_303; uint8 x_304; -x_295 = lean::cnstr_get(x_294, 0); -lean::inc(x_295); -x_296 = lean::cnstr_get(x_294, 1); -lean::inc(x_296); -if (lean::is_exclusive(x_294)) { - lean::cnstr_release(x_294, 0); - lean::cnstr_release(x_294, 1); - x_297 = x_294; -} else { - lean::dec_ref(x_294); - x_297 = lean::box(0); -} -x_298 = l_Lean_IR_EmitCpp_toCppType___main(x_259); -x_299 = lean::string_append(x_296, x_298); -lean::dec(x_298); -x_300 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; -x_301 = lean::string_append(x_299, x_300); -x_302 = lean::array_get_size(x_258); -x_303 = lean::mk_nat_obj(0u); -x_304 = lean::nat_dec_lt(x_303, x_302); -if (x_304 == 0) -{ -obj* x_305; obj* x_306; obj* x_307; obj* x_308; obj* x_309; -lean::dec(x_302); +obj* x_375; obj* x_376; obj* x_377; obj* x_378; obj* x_379; +x_375 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_376 = lean::string_append(x_375, x_297); lean::dec(x_297); -x_305 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_306 = lean::string_append(x_305, x_295); -lean::dec(x_295); -x_307 = l_Unit_HasRepr___closed__1; -x_308 = lean::string_append(x_306, x_307); -x_309 = lean::string_append(x_301, x_308); -lean::dec(x_308); -x_271 = x_309; -goto block_293; +x_377 = l_Unit_HasRepr___closed__1; +x_378 = lean::string_append(x_376, x_377); +x_379 = lean::string_append(x_303, x_378); +lean::dec(x_378); +x_305 = x_379; +goto block_372; } else { -obj* x_310; obj* x_311; obj* x_312; obj* x_313; obj* x_314; -x_310 = lean::string_append(x_301, x_295); -lean::dec(x_295); -x_311 = l_Prod_HasRepr___rarg___closed__1; -x_312 = lean::string_append(x_310, x_311); -if (lean::is_scalar(x_297)) { - x_313 = lean::alloc_cnstr(0, 2, 0); +obj* x_380; obj* x_381; obj* x_382; obj* x_383; obj* x_384; obj* x_394; uint8 x_395; +x_380 = lean::string_append(x_303, x_297); +lean::dec(x_297); +x_381 = l_Prod_HasRepr___rarg___closed__1; +x_382 = lean::string_append(x_380, x_381); +lean::inc(x_382); +x_383 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_383, 0, x_8); +lean::cnstr_set(x_383, 1, x_382); +x_394 = l_Lean_closureMaxArgs; +x_395 = lean::nat_dec_lt(x_394, x_304); +if (x_395 == 0) +{ +lean::dec(x_382); +x_384 = x_8; +goto block_393; +} +else +{ +uint8 x_396; +x_396 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +if (x_396 == 0) +{ +lean::dec(x_382); +x_384 = x_8; +goto block_393; +} +else +{ +obj* x_397; obj* x_398; obj* x_399; obj* x_400; +lean::dec(x_383); +x_397 = l_Lean_IR_EmitCpp_emitDeclAux___closed__2; +x_398 = lean::string_append(x_382, x_397); +x_399 = l_Option_HasRepr___rarg___closed__3; +x_400 = lean::string_append(x_398, x_399); +x_305 = x_400; +goto block_372; +} +} +block_393: +{ +obj* x_385; +lean::dec(x_384); +lean::inc(x_304); +x_385 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(x_16, x_304, x_304, x_291, x_383); +if (lean::obj_tag(x_385) == 0) +{ +obj* x_386; obj* x_387; obj* x_388; +x_386 = lean::cnstr_get(x_385, 1); +lean::inc(x_386); +lean::dec(x_385); +x_387 = l_Option_HasRepr___rarg___closed__3; +x_388 = lean::string_append(x_386, x_387); +x_305 = x_388; +goto block_372; +} +else +{ +obj* x_389; obj* x_390; obj* x_391; obj* x_392; +lean::dec(x_304); +lean::dec(x_299); +lean::dec(x_291); +lean::dec(x_288); +lean::dec(x_287); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_389 = lean::cnstr_get(x_385, 0); +lean::inc(x_389); +x_390 = lean::cnstr_get(x_385, 1); +lean::inc(x_390); +if (lean::is_exclusive(x_385)) { + lean::cnstr_release(x_385, 0); + lean::cnstr_release(x_385, 1); + x_391 = x_385; } else { - x_313 = x_297; + lean::dec_ref(x_385); + x_391 = lean::box(0); } -lean::cnstr_set(x_313, 0, x_249); -lean::cnstr_set(x_313, 1, x_312); -lean::inc(x_302); -x_314 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_258, x_302, x_302, x_266, x_313); -lean::dec(x_302); -if (lean::obj_tag(x_314) == 0) -{ -obj* x_315; obj* x_316; obj* x_317; -x_315 = lean::cnstr_get(x_314, 1); -lean::inc(x_315); -lean::dec(x_314); -x_316 = l_Option_HasRepr___rarg___closed__3; -x_317 = lean::string_append(x_315, x_316); -x_271 = x_317; -goto block_293; +if (lean::is_scalar(x_391)) { + x_392 = lean::alloc_cnstr(1, 2, 0); +} else { + x_392 = x_391; } -else +lean::cnstr_set(x_392, 0, x_389); +lean::cnstr_set(x_392, 1, x_390); +return x_392; +} +} +} +block_372: { -obj* x_318; obj* x_319; obj* x_320; obj* x_321; -lean::dec(x_266); -lean::dec(x_262); -lean::dec(x_261); -lean::dec(x_260); -lean::dec(x_258); -lean::dec(x_257); -lean::dec(x_253); -lean::dec(x_252); -x_318 = lean::cnstr_get(x_314, 0); -lean::inc(x_318); -x_319 = lean::cnstr_get(x_314, 1); +obj* x_306; obj* x_307; obj* x_308; obj* x_309; obj* x_310; obj* x_311; uint8 x_312; +x_306 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; +x_307 = lean::string_append(x_305, x_306); +x_308 = l_IO_println___rarg___closed__1; +x_309 = lean::string_append(x_307, x_308); +lean::inc(x_309); +if (lean::is_scalar(x_299)) { + x_310 = lean::alloc_cnstr(0, 2, 0); +} else { + x_310 = x_299; +} +lean::cnstr_set(x_310, 0, x_8); +lean::cnstr_set(x_310, 1, x_309); +x_311 = l_Lean_closureMaxArgs; +x_312 = lean::nat_dec_lt(x_311, x_304); +if (x_312 == 0) +{ +obj* x_313; obj* x_314; obj* x_315; obj* x_316; obj* x_317; obj* x_318; +lean::dec(x_310); +lean::dec(x_304); +lean::dec(x_12); +x_313 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_314 = lean::string_append(x_309, x_313); +x_315 = lean::string_append(x_314, x_308); +x_316 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_316, 0, x_8); +lean::cnstr_set(x_316, 1, x_315); +lean::inc(x_15); +x_317 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_317, 0, x_287); +lean::cnstr_set(x_317, 1, x_288); +lean::cnstr_set(x_317, 2, x_10); +lean::cnstr_set(x_317, 3, x_11); +lean::cnstr_set(x_317, 4, x_15); +lean::cnstr_set(x_317, 5, x_16); +x_318 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_317, x_316); +if (lean::obj_tag(x_318) == 0) +{ +obj* x_319; obj* x_320; obj* x_321; obj* x_322; obj* x_323; obj* x_324; obj* x_325; +x_319 = lean::cnstr_get(x_318, 1); lean::inc(x_319); -if (lean::is_exclusive(x_314)) { - lean::cnstr_release(x_314, 0); - lean::cnstr_release(x_314, 1); - x_320 = x_314; +if (lean::is_exclusive(x_318)) { + lean::cnstr_release(x_318, 0); + lean::cnstr_release(x_318, 1); + x_320 = x_318; } else { - lean::dec_ref(x_314); + lean::dec_ref(x_318); x_320 = lean::box(0); } +x_321 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_322 = lean::string_append(x_319, x_321); +x_323 = lean::string_append(x_322, x_308); if (lean::is_scalar(x_320)) { - x_321 = lean::alloc_cnstr(1, 2, 0); + x_324 = lean::alloc_cnstr(0, 2, 0); } else { - x_321 = x_320; + x_324 = x_320; } -lean::cnstr_set(x_321, 0, x_318); -lean::cnstr_set(x_321, 1, x_319); -return x_321; -} -} -} -else -{ -obj* x_322; obj* x_323; obj* x_324; obj* x_325; -lean::dec(x_266); -lean::dec(x_262); -lean::dec(x_261); -lean::dec(x_260); -lean::dec(x_258); -lean::dec(x_257); -lean::dec(x_253); -lean::dec(x_252); -x_322 = lean::cnstr_get(x_294, 0); -lean::inc(x_322); -x_323 = lean::cnstr_get(x_294, 1); -lean::inc(x_323); -if (lean::is_exclusive(x_294)) { - lean::cnstr_release(x_294, 0); - lean::cnstr_release(x_294, 1); - x_324 = x_294; -} else { - lean::dec_ref(x_294); - x_324 = lean::box(0); -} -if (lean::is_scalar(x_324)) { - x_325 = lean::alloc_cnstr(1, 2, 0); -} else { - x_325 = x_324; -} -lean::cnstr_set(x_325, 0, x_322); -lean::cnstr_set(x_325, 1, x_323); +lean::cnstr_set(x_324, 0, x_8); +lean::cnstr_set(x_324, 1, x_323); +x_325 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_291, x_324); +lean::dec(x_291); return x_325; } -block_293: -{ -obj* x_272; obj* x_273; obj* x_274; obj* x_275; obj* x_276; obj* x_277; obj* x_278; obj* x_279; obj* x_280; obj* x_281; -x_272 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; -x_273 = lean::string_append(x_271, x_272); -x_274 = l_IO_println___rarg___closed__1; -x_275 = lean::string_append(x_273, x_274); -x_276 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; -x_277 = lean::string_append(x_275, x_276); -x_278 = lean::string_append(x_277, x_274); -x_279 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_279, 0, x_249); -lean::cnstr_set(x_279, 1, x_278); -lean::inc(x_257); -x_280 = lean::alloc_cnstr(0, 6, 0); -lean::cnstr_set(x_280, 0, x_261); -lean::cnstr_set(x_280, 1, x_262); -lean::cnstr_set(x_280, 2, x_252); -lean::cnstr_set(x_280, 3, x_253); -lean::cnstr_set(x_280, 4, x_257); -lean::cnstr_set(x_280, 5, x_258); -x_281 = l_Lean_IR_EmitCpp_emitFnBody___main(x_260, x_280, x_279); -if (lean::obj_tag(x_281) == 0) -{ -obj* x_282; obj* x_283; obj* x_284; obj* x_285; obj* x_286; obj* x_287; obj* x_288; -x_282 = lean::cnstr_get(x_281, 1); -lean::inc(x_282); -if (lean::is_exclusive(x_281)) { - lean::cnstr_release(x_281, 0); - lean::cnstr_release(x_281, 1); - x_283 = x_281; -} else { - lean::dec_ref(x_281); - x_283 = lean::box(0); -} -x_284 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; -x_285 = lean::string_append(x_282, x_284); -x_286 = lean::string_append(x_285, x_274); -if (lean::is_scalar(x_283)) { - x_287 = lean::alloc_cnstr(0, 2, 0); -} else { - x_287 = x_283; -} -lean::cnstr_set(x_287, 0, x_249); -lean::cnstr_set(x_287, 1, x_286); -x_288 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_257, x_266, x_287); -lean::dec(x_266); -return x_288; -} -else -{ -obj* x_289; obj* x_290; obj* x_291; obj* x_292; -lean::dec(x_266); -lean::dec(x_257); -x_289 = lean::cnstr_get(x_281, 0); -lean::inc(x_289); -x_290 = lean::cnstr_get(x_281, 1); -lean::inc(x_290); -if (lean::is_exclusive(x_281)) { - lean::cnstr_release(x_281, 0); - lean::cnstr_release(x_281, 1); - x_291 = x_281; -} else { - lean::dec_ref(x_281); - x_291 = lean::box(0); -} -if (lean::is_scalar(x_291)) { - x_292 = lean::alloc_cnstr(1, 2, 0); -} else { - x_292 = x_291; -} -lean::cnstr_set(x_292, 0, x_289); -lean::cnstr_set(x_292, 1, x_290); -return x_292; -} -} -} else { obj* x_326; obj* x_327; obj* x_328; obj* x_329; -lean::dec(x_266); -lean::dec(x_262); -lean::dec(x_261); -lean::dec(x_260); -lean::dec(x_258); -lean::dec(x_257); -lean::dec(x_253); -lean::dec(x_252); -x_326 = lean::cnstr_get(x_267, 0); +lean::dec(x_291); +lean::dec(x_15); +x_326 = lean::cnstr_get(x_318, 0); lean::inc(x_326); -x_327 = lean::cnstr_get(x_267, 1); +x_327 = lean::cnstr_get(x_318, 1); lean::inc(x_327); -if (lean::is_exclusive(x_267)) { - lean::cnstr_release(x_267, 0); - lean::cnstr_release(x_267, 1); - x_328 = x_267; +if (lean::is_exclusive(x_318)) { + lean::cnstr_release(x_318, 0); + lean::cnstr_release(x_318, 1); + x_328 = x_318; } else { - lean::dec_ref(x_267); + lean::dec_ref(x_318); x_328 = lean::box(0); } if (lean::is_scalar(x_328)) { @@ -24068,56 +24398,977 @@ return x_329; } else { -obj* x_330; -lean::dec(x_253); -lean::dec(x_252); -lean::dec(x_250); -lean::dec(x_2); -lean::dec(x_1); -x_330 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_330, 0, x_249); -lean::cnstr_set(x_330, 1, x_248); -return x_330; +uint8 x_330; +x_330 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_12); +lean::dec(x_12); +if (x_330 == 0) +{ +obj* x_331; obj* x_332; obj* x_333; obj* x_334; obj* x_335; obj* x_336; +lean::dec(x_310); +lean::dec(x_304); +x_331 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_332 = lean::string_append(x_309, x_331); +x_333 = lean::string_append(x_332, x_308); +x_334 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_334, 0, x_8); +lean::cnstr_set(x_334, 1, x_333); +lean::inc(x_15); +x_335 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_335, 0, x_287); +lean::cnstr_set(x_335, 1, x_288); +lean::cnstr_set(x_335, 2, x_10); +lean::cnstr_set(x_335, 3, x_11); +lean::cnstr_set(x_335, 4, x_15); +lean::cnstr_set(x_335, 5, x_16); +x_336 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_335, x_334); +if (lean::obj_tag(x_336) == 0) +{ +obj* x_337; obj* x_338; obj* x_339; obj* x_340; obj* x_341; obj* x_342; obj* x_343; +x_337 = lean::cnstr_get(x_336, 1); +lean::inc(x_337); +if (lean::is_exclusive(x_336)) { + lean::cnstr_release(x_336, 0); + lean::cnstr_release(x_336, 1); + x_338 = x_336; +} else { + lean::dec_ref(x_336); + x_338 = lean::box(0); +} +x_339 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_340 = lean::string_append(x_337, x_339); +x_341 = lean::string_append(x_340, x_308); +if (lean::is_scalar(x_338)) { + x_342 = lean::alloc_cnstr(0, 2, 0); +} else { + x_342 = x_338; +} +lean::cnstr_set(x_342, 0, x_8); +lean::cnstr_set(x_342, 1, x_341); +x_343 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_291, x_342); +lean::dec(x_291); +return x_343; +} +else +{ +obj* x_344; obj* x_345; obj* x_346; obj* x_347; +lean::dec(x_291); +lean::dec(x_15); +x_344 = lean::cnstr_get(x_336, 0); +lean::inc(x_344); +x_345 = lean::cnstr_get(x_336, 1); +lean::inc(x_345); +if (lean::is_exclusive(x_336)) { + lean::cnstr_release(x_336, 0); + lean::cnstr_release(x_336, 1); + x_346 = x_336; +} else { + lean::dec_ref(x_336); + x_346 = lean::box(0); +} +if (lean::is_scalar(x_346)) { + x_347 = lean::alloc_cnstr(1, 2, 0); +} else { + x_347 = x_346; +} +lean::cnstr_set(x_347, 0, x_344); +lean::cnstr_set(x_347, 1, x_345); +return x_347; } } else { -obj* x_331; -lean::dec(x_253); -lean::dec(x_252); -lean::dec(x_250); -lean::dec(x_2); -lean::dec(x_1); -x_331 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_331, 0, x_249); -lean::cnstr_set(x_331, 1, x_248); -return x_331; +obj* x_348; +lean::dec(x_309); +lean::inc(x_304); +x_348 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_16, x_304, x_304, x_291, x_310); +lean::dec(x_304); +if (lean::obj_tag(x_348) == 0) +{ +obj* x_349; obj* x_350; obj* x_351; obj* x_352; obj* x_353; obj* x_354; obj* x_355; obj* x_356; +x_349 = lean::cnstr_get(x_348, 1); +lean::inc(x_349); +if (lean::is_exclusive(x_348)) { + lean::cnstr_release(x_348, 0); + lean::cnstr_release(x_348, 1); + x_350 = x_348; +} else { + lean::dec_ref(x_348); + x_350 = lean::box(0); +} +x_351 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_352 = lean::string_append(x_349, x_351); +x_353 = lean::string_append(x_352, x_308); +if (lean::is_scalar(x_350)) { + x_354 = lean::alloc_cnstr(0, 2, 0); +} else { + x_354 = x_350; +} +lean::cnstr_set(x_354, 0, x_8); +lean::cnstr_set(x_354, 1, x_353); +lean::inc(x_15); +x_355 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_355, 0, x_287); +lean::cnstr_set(x_355, 1, x_288); +lean::cnstr_set(x_355, 2, x_10); +lean::cnstr_set(x_355, 3, x_11); +lean::cnstr_set(x_355, 4, x_15); +lean::cnstr_set(x_355, 5, x_16); +x_356 = l_Lean_IR_EmitCpp_emitFnBody___main(x_18, x_355, x_354); +if (lean::obj_tag(x_356) == 0) +{ +obj* x_357; obj* x_358; obj* x_359; obj* x_360; obj* x_361; obj* x_362; obj* x_363; +x_357 = lean::cnstr_get(x_356, 1); +lean::inc(x_357); +if (lean::is_exclusive(x_356)) { + lean::cnstr_release(x_356, 0); + lean::cnstr_release(x_356, 1); + x_358 = x_356; +} else { + lean::dec_ref(x_356); + x_358 = lean::box(0); +} +x_359 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_360 = lean::string_append(x_357, x_359); +x_361 = lean::string_append(x_360, x_308); +if (lean::is_scalar(x_358)) { + x_362 = lean::alloc_cnstr(0, 2, 0); +} else { + x_362 = x_358; +} +lean::cnstr_set(x_362, 0, x_8); +lean::cnstr_set(x_362, 1, x_361); +x_363 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_15, x_291, x_362); +lean::dec(x_291); +return x_363; +} +else +{ +obj* x_364; obj* x_365; obj* x_366; obj* x_367; +lean::dec(x_291); +lean::dec(x_15); +x_364 = lean::cnstr_get(x_356, 0); +lean::inc(x_364); +x_365 = lean::cnstr_get(x_356, 1); +lean::inc(x_365); +if (lean::is_exclusive(x_356)) { + lean::cnstr_release(x_356, 0); + lean::cnstr_release(x_356, 1); + x_366 = x_356; +} else { + lean::dec_ref(x_356); + x_366 = lean::box(0); +} +if (lean::is_scalar(x_366)) { + x_367 = lean::alloc_cnstr(1, 2, 0); +} else { + x_367 = x_366; +} +lean::cnstr_set(x_367, 0, x_364); +lean::cnstr_set(x_367, 1, x_365); +return x_367; +} +} +else +{ +obj* x_368; obj* x_369; obj* x_370; obj* x_371; +lean::dec(x_291); +lean::dec(x_288); +lean::dec(x_287); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_11); +lean::dec(x_10); +x_368 = lean::cnstr_get(x_348, 0); +lean::inc(x_368); +x_369 = lean::cnstr_get(x_348, 1); +lean::inc(x_369); +if (lean::is_exclusive(x_348)) { + lean::cnstr_release(x_348, 0); + lean::cnstr_release(x_348, 1); + x_370 = x_348; +} else { + lean::dec_ref(x_348); + x_370 = lean::box(0); +} +if (lean::is_scalar(x_370)) { + x_371 = lean::alloc_cnstr(1, 2, 0); +} else { + x_371 = x_370; +} +lean::cnstr_set(x_371, 0, x_368); +lean::cnstr_set(x_371, 1, x_369); +return x_371; +} } } } } else { -uint8 x_335; +obj* x_401; obj* x_402; obj* x_403; obj* x_404; +lean::dec(x_291); +lean::dec(x_288); +lean::dec(x_287); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_401 = lean::cnstr_get(x_296, 0); +lean::inc(x_401); +x_402 = lean::cnstr_get(x_296, 1); +lean::inc(x_402); +if (lean::is_exclusive(x_296)) { + lean::cnstr_release(x_296, 0); + lean::cnstr_release(x_296, 1); + x_403 = x_296; +} else { + lean::dec_ref(x_296); + x_403 = lean::box(0); +} +if (lean::is_scalar(x_403)) { + x_404 = lean::alloc_cnstr(1, 2, 0); +} else { + x_404 = x_403; +} +lean::cnstr_set(x_404, 0, x_401); +lean::cnstr_set(x_404, 1, x_402); +return x_404; +} +} +else +{ +obj* x_405; obj* x_406; obj* x_407; obj* x_408; +lean::dec(x_291); +lean::dec(x_288); +lean::dec(x_287); +lean::dec(x_18); +lean::dec(x_16); +lean::dec(x_15); +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +x_405 = lean::cnstr_get(x_292, 0); +lean::inc(x_405); +x_406 = lean::cnstr_get(x_292, 1); +lean::inc(x_406); +if (lean::is_exclusive(x_292)) { + lean::cnstr_release(x_292, 0); + lean::cnstr_release(x_292, 1); + x_407 = x_292; +} else { + lean::dec_ref(x_292); + x_407 = lean::box(0); +} +if (lean::is_scalar(x_407)) { + x_408 = lean::alloc_cnstr(1, 2, 0); +} else { + x_408 = x_407; +} +lean::cnstr_set(x_408, 0, x_405); +lean::cnstr_set(x_408, 1, x_406); +return x_408; +} +} +} +else +{ +obj* x_409; +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +lean::dec(x_4); lean::dec(x_2); lean::dec(x_1); -x_335 = !lean::is_exclusive(x_4); -if (x_335 == 0) +x_409 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_409, 0, x_8); +lean::cnstr_set(x_409, 1, x_7); +return x_409; +} +} +else +{ +obj* x_410; +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_10); +lean::dec(x_4); +lean::dec(x_2); +lean::dec(x_1); +x_410 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_410, 0, x_8); +lean::cnstr_set(x_410, 1, x_7); +return x_410; +} +} +} +else +{ +obj* x_414; obj* x_415; obj* x_416; obj* x_417; obj* x_418; obj* x_419; obj* x_420; obj* x_421; uint8 x_422; uint8 x_423; +x_414 = lean::cnstr_get(x_4, 0); +x_415 = lean::cnstr_get(x_4, 1); +lean::inc(x_415); +lean::inc(x_414); +lean::dec(x_4); +x_416 = lean::box(0); +lean::inc(x_415); +x_417 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_417, 0, x_416); +lean::cnstr_set(x_417, 1, x_415); +lean::inc(x_1); +x_418 = l_Lean_IR_mkVarJPMaps(x_1); +x_419 = lean::cnstr_get(x_418, 0); +lean::inc(x_419); +x_420 = lean::cnstr_get(x_418, 1); +lean::inc(x_420); +lean::dec(x_418); +x_421 = l_Lean_IR_Decl_name___main(x_1); +lean::inc(x_421); +x_422 = l_Lean_hasInitAttr(x_414, x_421); +if (x_422 == 0) +{ +uint8 x_554; +x_554 = 0; +x_423 = x_554; +goto block_553; +} +else +{ +uint8 x_555; +x_555 = 1; +x_423 = x_555; +goto block_553; +} +block_553: +{ +if (x_423 == 0) +{ +if (lean::obj_tag(x_1) == 0) +{ +obj* x_424; obj* x_425; uint8 x_426; obj* x_427; obj* x_428; obj* x_429; obj* x_430; obj* x_431; obj* x_432; obj* x_433; obj* x_434; +lean::dec(x_415); +x_424 = lean::cnstr_get(x_1, 0); +lean::inc(x_424); +x_425 = lean::cnstr_get(x_1, 1); +lean::inc(x_425); +x_426 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); +x_427 = lean::cnstr_get(x_1, 2); +lean::inc(x_427); +lean::dec(x_1); +x_428 = lean::cnstr_get(x_2, 0); +lean::inc(x_428); +x_429 = lean::cnstr_get(x_2, 1); +lean::inc(x_429); +x_430 = lean::cnstr_get(x_2, 4); +lean::inc(x_430); +x_431 = lean::cnstr_get(x_2, 5); +lean::inc(x_431); +if (lean::is_exclusive(x_2)) { + lean::cnstr_release(x_2, 0); + lean::cnstr_release(x_2, 1); + lean::cnstr_release(x_2, 2); + lean::cnstr_release(x_2, 3); + lean::cnstr_release(x_2, 4); + lean::cnstr_release(x_2, 5); + x_432 = x_2; +} else { + lean::dec_ref(x_2); + x_432 = lean::box(0); +} +lean::inc(x_420); +lean::inc(x_419); +lean::inc(x_429); +lean::inc(x_428); +if (lean::is_scalar(x_432)) { + x_433 = lean::alloc_cnstr(0, 6, 0); +} else { + x_433 = x_432; +} +lean::cnstr_set(x_433, 0, x_428); +lean::cnstr_set(x_433, 1, x_429); +lean::cnstr_set(x_433, 2, x_419); +lean::cnstr_set(x_433, 3, x_420); +lean::cnstr_set(x_433, 4, x_430); +lean::cnstr_set(x_433, 5, x_431); +lean::inc(x_424); +x_434 = l_Lean_IR_EmitCpp_openNamespacesFor(x_424, x_433, x_417); +if (lean::obj_tag(x_434) == 0) +{ +obj* x_435; obj* x_436; obj* x_437; obj* x_438; +x_435 = lean::cnstr_get(x_434, 1); +lean::inc(x_435); +if (lean::is_exclusive(x_434)) { + lean::cnstr_release(x_434, 0); + lean::cnstr_release(x_434, 1); + x_436 = x_434; +} else { + lean::dec_ref(x_434); + x_436 = lean::box(0); +} +if (lean::is_scalar(x_436)) { + x_437 = lean::alloc_cnstr(0, 2, 0); +} else { + x_437 = x_436; +} +lean::cnstr_set(x_437, 0, x_416); +lean::cnstr_set(x_437, 1, x_435); +lean::inc(x_424); +x_438 = l_Lean_IR_EmitCpp_toBaseCppName(x_424, x_433, x_437); +if (lean::obj_tag(x_438) == 0) +{ +obj* x_439; obj* x_440; obj* x_441; obj* x_442; obj* x_443; obj* x_444; obj* x_445; obj* x_446; obj* x_447; obj* x_515; uint8 x_516; +x_439 = lean::cnstr_get(x_438, 0); +lean::inc(x_439); +x_440 = lean::cnstr_get(x_438, 1); +lean::inc(x_440); +if (lean::is_exclusive(x_438)) { + lean::cnstr_release(x_438, 0); + lean::cnstr_release(x_438, 1); + x_441 = x_438; +} else { + lean::dec_ref(x_438); + x_441 = lean::box(0); +} +x_442 = l_Lean_IR_EmitCpp_toCppType___main(x_426); +x_443 = lean::string_append(x_440, x_442); +lean::dec(x_442); +x_444 = l_Lean_IR_EmitCpp_emitFnDeclAux___closed__1; +x_445 = lean::string_append(x_443, x_444); +x_446 = lean::array_get_size(x_425); +x_515 = lean::mk_nat_obj(0u); +x_516 = lean::nat_dec_lt(x_515, x_446); +if (x_516 == 0) +{ +obj* x_517; obj* x_518; obj* x_519; obj* x_520; obj* x_521; +x_517 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_518 = lean::string_append(x_517, x_439); +lean::dec(x_439); +x_519 = l_Unit_HasRepr___closed__1; +x_520 = lean::string_append(x_518, x_519); +x_521 = lean::string_append(x_445, x_520); +lean::dec(x_520); +x_447 = x_521; +goto block_514; +} +else +{ +obj* x_522; obj* x_523; obj* x_524; obj* x_525; obj* x_526; obj* x_536; uint8 x_537; +x_522 = lean::string_append(x_445, x_439); +lean::dec(x_439); +x_523 = l_Prod_HasRepr___rarg___closed__1; +x_524 = lean::string_append(x_522, x_523); +lean::inc(x_524); +x_525 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_525, 0, x_416); +lean::cnstr_set(x_525, 1, x_524); +x_536 = l_Lean_closureMaxArgs; +x_537 = lean::nat_dec_lt(x_536, x_446); +if (x_537 == 0) +{ +lean::dec(x_524); +x_526 = x_416; +goto block_535; +} +else +{ +uint8 x_538; +x_538 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_421); +if (x_538 == 0) +{ +lean::dec(x_524); +x_526 = x_416; +goto block_535; +} +else +{ +obj* x_539; obj* x_540; obj* x_541; obj* x_542; +lean::dec(x_525); +x_539 = l_Lean_IR_EmitCpp_emitDeclAux___closed__2; +x_540 = lean::string_append(x_524, x_539); +x_541 = l_Option_HasRepr___rarg___closed__3; +x_542 = lean::string_append(x_540, x_541); +x_447 = x_542; +goto block_514; +} +} +block_535: +{ +obj* x_527; +lean::dec(x_526); +lean::inc(x_446); +x_527 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(x_425, x_446, x_446, x_433, x_525); +if (lean::obj_tag(x_527) == 0) +{ +obj* x_528; obj* x_529; obj* x_530; +x_528 = lean::cnstr_get(x_527, 1); +lean::inc(x_528); +lean::dec(x_527); +x_529 = l_Option_HasRepr___rarg___closed__3; +x_530 = lean::string_append(x_528, x_529); +x_447 = x_530; +goto block_514; +} +else +{ +obj* x_531; obj* x_532; obj* x_533; obj* x_534; +lean::dec(x_446); +lean::dec(x_441); +lean::dec(x_433); +lean::dec(x_429); +lean::dec(x_428); +lean::dec(x_427); +lean::dec(x_425); +lean::dec(x_424); +lean::dec(x_421); +lean::dec(x_420); +lean::dec(x_419); +x_531 = lean::cnstr_get(x_527, 0); +lean::inc(x_531); +x_532 = lean::cnstr_get(x_527, 1); +lean::inc(x_532); +if (lean::is_exclusive(x_527)) { + lean::cnstr_release(x_527, 0); + lean::cnstr_release(x_527, 1); + x_533 = x_527; +} else { + lean::dec_ref(x_527); + x_533 = lean::box(0); +} +if (lean::is_scalar(x_533)) { + x_534 = lean::alloc_cnstr(1, 2, 0); +} else { + x_534 = x_533; +} +lean::cnstr_set(x_534, 0, x_531); +lean::cnstr_set(x_534, 1, x_532); +return x_534; +} +} +} +block_514: +{ +obj* x_448; obj* x_449; obj* x_450; obj* x_451; obj* x_452; obj* x_453; uint8 x_454; +x_448 = l_Lean_IR_EmitCpp_openNamespacesAux___main___closed__2; +x_449 = lean::string_append(x_447, x_448); +x_450 = l_IO_println___rarg___closed__1; +x_451 = lean::string_append(x_449, x_450); +lean::inc(x_451); +if (lean::is_scalar(x_441)) { + x_452 = lean::alloc_cnstr(0, 2, 0); +} else { + x_452 = x_441; +} +lean::cnstr_set(x_452, 0, x_416); +lean::cnstr_set(x_452, 1, x_451); +x_453 = l_Lean_closureMaxArgs; +x_454 = lean::nat_dec_lt(x_453, x_446); +if (x_454 == 0) +{ +obj* x_455; obj* x_456; obj* x_457; obj* x_458; obj* x_459; obj* x_460; +lean::dec(x_452); +lean::dec(x_446); +lean::dec(x_421); +x_455 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_456 = lean::string_append(x_451, x_455); +x_457 = lean::string_append(x_456, x_450); +x_458 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_458, 0, x_416); +lean::cnstr_set(x_458, 1, x_457); +lean::inc(x_424); +x_459 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_459, 0, x_428); +lean::cnstr_set(x_459, 1, x_429); +lean::cnstr_set(x_459, 2, x_419); +lean::cnstr_set(x_459, 3, x_420); +lean::cnstr_set(x_459, 4, x_424); +lean::cnstr_set(x_459, 5, x_425); +x_460 = l_Lean_IR_EmitCpp_emitFnBody___main(x_427, x_459, x_458); +if (lean::obj_tag(x_460) == 0) +{ +obj* x_461; obj* x_462; obj* x_463; obj* x_464; obj* x_465; obj* x_466; obj* x_467; +x_461 = lean::cnstr_get(x_460, 1); +lean::inc(x_461); +if (lean::is_exclusive(x_460)) { + lean::cnstr_release(x_460, 0); + lean::cnstr_release(x_460, 1); + x_462 = x_460; +} else { + lean::dec_ref(x_460); + x_462 = lean::box(0); +} +x_463 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_464 = lean::string_append(x_461, x_463); +x_465 = lean::string_append(x_464, x_450); +if (lean::is_scalar(x_462)) { + x_466 = lean::alloc_cnstr(0, 2, 0); +} else { + x_466 = x_462; +} +lean::cnstr_set(x_466, 0, x_416); +lean::cnstr_set(x_466, 1, x_465); +x_467 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_424, x_433, x_466); +lean::dec(x_433); +return x_467; +} +else +{ +obj* x_468; obj* x_469; obj* x_470; obj* x_471; +lean::dec(x_433); +lean::dec(x_424); +x_468 = lean::cnstr_get(x_460, 0); +lean::inc(x_468); +x_469 = lean::cnstr_get(x_460, 1); +lean::inc(x_469); +if (lean::is_exclusive(x_460)) { + lean::cnstr_release(x_460, 0); + lean::cnstr_release(x_460, 1); + x_470 = x_460; +} else { + lean::dec_ref(x_460); + x_470 = lean::box(0); +} +if (lean::is_scalar(x_470)) { + x_471 = lean::alloc_cnstr(1, 2, 0); +} else { + x_471 = x_470; +} +lean::cnstr_set(x_471, 0, x_468); +lean::cnstr_set(x_471, 1, x_469); +return x_471; +} +} +else +{ +uint8 x_472; +x_472 = l_Lean_IR_ExplicitBoxing_isBoxedName___main(x_421); +lean::dec(x_421); +if (x_472 == 0) +{ +obj* x_473; obj* x_474; obj* x_475; obj* x_476; obj* x_477; obj* x_478; +lean::dec(x_452); +lean::dec(x_446); +x_473 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_474 = lean::string_append(x_451, x_473); +x_475 = lean::string_append(x_474, x_450); +x_476 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_476, 0, x_416); +lean::cnstr_set(x_476, 1, x_475); +lean::inc(x_424); +x_477 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_477, 0, x_428); +lean::cnstr_set(x_477, 1, x_429); +lean::cnstr_set(x_477, 2, x_419); +lean::cnstr_set(x_477, 3, x_420); +lean::cnstr_set(x_477, 4, x_424); +lean::cnstr_set(x_477, 5, x_425); +x_478 = l_Lean_IR_EmitCpp_emitFnBody___main(x_427, x_477, x_476); +if (lean::obj_tag(x_478) == 0) +{ +obj* x_479; obj* x_480; obj* x_481; obj* x_482; obj* x_483; obj* x_484; obj* x_485; +x_479 = lean::cnstr_get(x_478, 1); +lean::inc(x_479); +if (lean::is_exclusive(x_478)) { + lean::cnstr_release(x_478, 0); + lean::cnstr_release(x_478, 1); + x_480 = x_478; +} else { + lean::dec_ref(x_478); + x_480 = lean::box(0); +} +x_481 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_482 = lean::string_append(x_479, x_481); +x_483 = lean::string_append(x_482, x_450); +if (lean::is_scalar(x_480)) { + x_484 = lean::alloc_cnstr(0, 2, 0); +} else { + x_484 = x_480; +} +lean::cnstr_set(x_484, 0, x_416); +lean::cnstr_set(x_484, 1, x_483); +x_485 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_424, x_433, x_484); +lean::dec(x_433); +return x_485; +} +else +{ +obj* x_486; obj* x_487; obj* x_488; obj* x_489; +lean::dec(x_433); +lean::dec(x_424); +x_486 = lean::cnstr_get(x_478, 0); +lean::inc(x_486); +x_487 = lean::cnstr_get(x_478, 1); +lean::inc(x_487); +if (lean::is_exclusive(x_478)) { + lean::cnstr_release(x_478, 0); + lean::cnstr_release(x_478, 1); + x_488 = x_478; +} else { + lean::dec_ref(x_478); + x_488 = lean::box(0); +} +if (lean::is_scalar(x_488)) { + x_489 = lean::alloc_cnstr(1, 2, 0); +} else { + x_489 = x_488; +} +lean::cnstr_set(x_489, 0, x_486); +lean::cnstr_set(x_489, 1, x_487); +return x_489; +} +} +else +{ +obj* x_490; +lean::dec(x_451); +lean::inc(x_446); +x_490 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1(x_425, x_446, x_446, x_433, x_452); +lean::dec(x_446); +if (lean::obj_tag(x_490) == 0) +{ +obj* x_491; obj* x_492; obj* x_493; obj* x_494; obj* x_495; obj* x_496; obj* x_497; obj* x_498; +x_491 = lean::cnstr_get(x_490, 1); +lean::inc(x_491); +if (lean::is_exclusive(x_490)) { + lean::cnstr_release(x_490, 0); + lean::cnstr_release(x_490, 1); + x_492 = x_490; +} else { + lean::dec_ref(x_490); + x_492 = lean::box(0); +} +x_493 = l_Lean_IR_EmitCpp_emitDeclAux___closed__1; +x_494 = lean::string_append(x_491, x_493); +x_495 = lean::string_append(x_494, x_450); +if (lean::is_scalar(x_492)) { + x_496 = lean::alloc_cnstr(0, 2, 0); +} else { + x_496 = x_492; +} +lean::cnstr_set(x_496, 0, x_416); +lean::cnstr_set(x_496, 1, x_495); +lean::inc(x_424); +x_497 = lean::alloc_cnstr(0, 6, 0); +lean::cnstr_set(x_497, 0, x_428); +lean::cnstr_set(x_497, 1, x_429); +lean::cnstr_set(x_497, 2, x_419); +lean::cnstr_set(x_497, 3, x_420); +lean::cnstr_set(x_497, 4, x_424); +lean::cnstr_set(x_497, 5, x_425); +x_498 = l_Lean_IR_EmitCpp_emitFnBody___main(x_427, x_497, x_496); +if (lean::obj_tag(x_498) == 0) +{ +obj* x_499; obj* x_500; obj* x_501; obj* x_502; obj* x_503; obj* x_504; obj* x_505; +x_499 = lean::cnstr_get(x_498, 1); +lean::inc(x_499); +if (lean::is_exclusive(x_498)) { + lean::cnstr_release(x_498, 0); + lean::cnstr_release(x_498, 1); + x_500 = x_498; +} else { + lean::dec_ref(x_498); + x_500 = lean::box(0); +} +x_501 = l_Lean_IR_EmitCpp_closeNamespacesAux___main___closed__1; +x_502 = lean::string_append(x_499, x_501); +x_503 = lean::string_append(x_502, x_450); +if (lean::is_scalar(x_500)) { + x_504 = lean::alloc_cnstr(0, 2, 0); +} else { + x_504 = x_500; +} +lean::cnstr_set(x_504, 0, x_416); +lean::cnstr_set(x_504, 1, x_503); +x_505 = l_Lean_IR_EmitCpp_closeNamespacesFor(x_424, x_433, x_504); +lean::dec(x_433); +return x_505; +} +else +{ +obj* x_506; obj* x_507; obj* x_508; obj* x_509; +lean::dec(x_433); +lean::dec(x_424); +x_506 = lean::cnstr_get(x_498, 0); +lean::inc(x_506); +x_507 = lean::cnstr_get(x_498, 1); +lean::inc(x_507); +if (lean::is_exclusive(x_498)) { + lean::cnstr_release(x_498, 0); + lean::cnstr_release(x_498, 1); + x_508 = x_498; +} else { + lean::dec_ref(x_498); + x_508 = lean::box(0); +} +if (lean::is_scalar(x_508)) { + x_509 = lean::alloc_cnstr(1, 2, 0); +} else { + x_509 = x_508; +} +lean::cnstr_set(x_509, 0, x_506); +lean::cnstr_set(x_509, 1, x_507); +return x_509; +} +} +else +{ +obj* x_510; obj* x_511; obj* x_512; obj* x_513; +lean::dec(x_433); +lean::dec(x_429); +lean::dec(x_428); +lean::dec(x_427); +lean::dec(x_425); +lean::dec(x_424); +lean::dec(x_420); +lean::dec(x_419); +x_510 = lean::cnstr_get(x_490, 0); +lean::inc(x_510); +x_511 = lean::cnstr_get(x_490, 1); +lean::inc(x_511); +if (lean::is_exclusive(x_490)) { + lean::cnstr_release(x_490, 0); + lean::cnstr_release(x_490, 1); + x_512 = x_490; +} else { + lean::dec_ref(x_490); + x_512 = lean::box(0); +} +if (lean::is_scalar(x_512)) { + x_513 = lean::alloc_cnstr(1, 2, 0); +} else { + x_513 = x_512; +} +lean::cnstr_set(x_513, 0, x_510); +lean::cnstr_set(x_513, 1, x_511); +return x_513; +} +} +} +} +} +else +{ +obj* x_543; obj* x_544; obj* x_545; obj* x_546; +lean::dec(x_433); +lean::dec(x_429); +lean::dec(x_428); +lean::dec(x_427); +lean::dec(x_425); +lean::dec(x_424); +lean::dec(x_421); +lean::dec(x_420); +lean::dec(x_419); +x_543 = lean::cnstr_get(x_438, 0); +lean::inc(x_543); +x_544 = lean::cnstr_get(x_438, 1); +lean::inc(x_544); +if (lean::is_exclusive(x_438)) { + lean::cnstr_release(x_438, 0); + lean::cnstr_release(x_438, 1); + x_545 = x_438; +} else { + lean::dec_ref(x_438); + x_545 = lean::box(0); +} +if (lean::is_scalar(x_545)) { + x_546 = lean::alloc_cnstr(1, 2, 0); +} else { + x_546 = x_545; +} +lean::cnstr_set(x_546, 0, x_543); +lean::cnstr_set(x_546, 1, x_544); +return x_546; +} +} +else +{ +obj* x_547; obj* x_548; obj* x_549; obj* x_550; +lean::dec(x_433); +lean::dec(x_429); +lean::dec(x_428); +lean::dec(x_427); +lean::dec(x_425); +lean::dec(x_424); +lean::dec(x_421); +lean::dec(x_420); +lean::dec(x_419); +x_547 = lean::cnstr_get(x_434, 0); +lean::inc(x_547); +x_548 = lean::cnstr_get(x_434, 1); +lean::inc(x_548); +if (lean::is_exclusive(x_434)) { + lean::cnstr_release(x_434, 0); + lean::cnstr_release(x_434, 1); + x_549 = x_434; +} else { + lean::dec_ref(x_434); + x_549 = lean::box(0); +} +if (lean::is_scalar(x_549)) { + x_550 = lean::alloc_cnstr(1, 2, 0); +} else { + x_550 = x_549; +} +lean::cnstr_set(x_550, 0, x_547); +lean::cnstr_set(x_550, 1, x_548); +return x_550; +} +} +else +{ +obj* x_551; +lean::dec(x_421); +lean::dec(x_420); +lean::dec(x_419); +lean::dec(x_417); +lean::dec(x_2); +lean::dec(x_1); +x_551 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_551, 0, x_416); +lean::cnstr_set(x_551, 1, x_415); +return x_551; +} +} +else +{ +obj* x_552; +lean::dec(x_421); +lean::dec(x_420); +lean::dec(x_419); +lean::dec(x_417); +lean::dec(x_2); +lean::dec(x_1); +x_552 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_552, 0, x_416); +lean::cnstr_set(x_552, 1, x_415); +return x_552; +} +} +} +} +else +{ +uint8 x_556; +lean::dec(x_2); +lean::dec(x_1); +x_556 = !lean::is_exclusive(x_4); +if (x_556 == 0) { return x_4; } else { -obj* x_336; obj* x_337; obj* x_338; -x_336 = lean::cnstr_get(x_4, 0); -x_337 = lean::cnstr_get(x_4, 1); -lean::inc(x_337); -lean::inc(x_336); +obj* x_557; obj* x_558; obj* x_559; +x_557 = lean::cnstr_get(x_4, 0); +x_558 = lean::cnstr_get(x_4, 1); +lean::inc(x_558); +lean::inc(x_557); lean::dec(x_4); -x_338 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_338, 0, x_336); -lean::cnstr_set(x_338, 1, x_337); -return x_338; +x_559 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_559, 0, x_557); +lean::cnstr_set(x_559, 1, x_558); +return x_559; } } } @@ -24133,6 +25384,17 @@ lean::dec(x_1); return x_6; } } +obj* l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__2(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_4); +lean::dec(x_2); +lean::dec(x_1); +return x_6; +} +} obj* _init_l_Lean_IR_EmitCpp_emitDecl___closed__1() { _start: { @@ -30440,6 +31702,8 @@ l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2 = _init_l_Lean_IR_EmitCpp_emitFnDecl lean::mark_persistent(l_Lean_IR_EmitCpp_emitFnDeclAux___closed__2); l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3 = _init_l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3(); lean::mark_persistent(l_Lean_IR_EmitCpp_emitFnDeclAux___closed__3); +l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4 = _init_l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4(); +lean::mark_persistent(l_Lean_IR_EmitCpp_emitFnDeclAux___closed__4); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "EmitCpp"), "emitFnDeclAux"), 5, l_Lean_IR_EmitCpp_emitFnDeclAux___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "EmitCpp"), "emitFnDecl"), 4, l_Lean_IR_EmitCpp_emitFnDecl___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "EmitCpp"), "cppQualifiedNameToName"), 1, l_Lean_IR_EmitCpp_cppQualifiedNameToName); @@ -30700,8 +31964,16 @@ REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_na l_Lean_IR_EmitCpp_emitFnBody___main___closed__1 = _init_l_Lean_IR_EmitCpp_emitFnBody___main___closed__1(); lean::mark_persistent(l_Lean_IR_EmitCpp_emitFnBody___main___closed__1); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "EmitCpp"), "emitFnBody"), 3, l_Lean_IR_EmitCpp_emitFnBody); +l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1 = _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1(); +lean::mark_persistent(l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__1); +l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2 = _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2(); +lean::mark_persistent(l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__2); +l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3 = _init_l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3(); +lean::mark_persistent(l_Nat_mforAux___main___at_Lean_IR_EmitCpp_emitDeclAux___spec__1___closed__3); l_Lean_IR_EmitCpp_emitDeclAux___closed__1 = _init_l_Lean_IR_EmitCpp_emitDeclAux___closed__1(); lean::mark_persistent(l_Lean_IR_EmitCpp_emitDeclAux___closed__1); +l_Lean_IR_EmitCpp_emitDeclAux___closed__2 = _init_l_Lean_IR_EmitCpp_emitDeclAux___closed__2(); +lean::mark_persistent(l_Lean_IR_EmitCpp_emitDeclAux___closed__2); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "IR"), "EmitCpp"), "emitDeclAux"), 3, l_Lean_IR_EmitCpp_emitDeclAux); l_Lean_IR_EmitCpp_emitDecl___closed__1 = _init_l_Lean_IR_EmitCpp_emitDecl___closed__1(); lean::mark_persistent(l_Lean_IR_EmitCpp_emitDecl___closed__1); diff --git a/src/stage0/init/lean/parser/level.cpp b/src/stage0/init/lean/parser/level.cpp index 62cfee0485..1ab29b4152 100644 --- a/src/stage0/init/lean/parser/level.cpp +++ b/src/stage0/init/lean/parser/level.cpp @@ -17,53 +17,70 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; obj* l_Lean_Parser_addBuiltinLeadingParser(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_regBuiltinLevelParserAttr___closed__2; obj* l_Lean_Parser_Level_paren; -obj* l_Lean_Parser_andthenFn___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Level_addLit___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_symbolInfo(obj*, obj*); obj* l_Lean_Parser_andthenInfo(obj*, obj*); obj* l_Lean_Parser_Level_max; obj* l_Lean_Parser_builtinLevelParsingTable; extern obj* l_Lean_Parser_appPrec; +obj* l_Lean_Parser_symbolFnAux(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_registerBuiltinParserAttribute(obj*, obj*, obj*); obj* l_Lean_Parser_Level_addLit; +extern obj* l_Lean_Parser_symbolFn___rarg___closed__1; obj* l___regBuiltinParser_Lean_Parser_Level_num___closed__1; obj* l_ExceptT_lift___rarg___lambda__1(obj*); obj* l_Lean_Parser_levelParserFn(uint8); obj* l_Lean_Parser_mkAtomicInfo(obj*); +obj* l_Lean_Parser_Level_max___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_levelParser(uint8, obj*); obj* l_Lean_Parser_Level_num; obj* l___regBuiltinParser_Lean_Parser_Level_addLit(obj*); obj* l___regBuiltinParser_Lean_Parser_Level_hole(obj*); +obj* l_Lean_Parser_Level_paren___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_ParserState_mkNode(obj*, obj*, obj*); obj* l_Lean_Parser_levelParserFn___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_runBuiltinParserUnsafe(obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_Parser_Parser_inhabited___closed__1; -obj* l_Lean_Parser_many1Fn___boxed(obj*, obj*, obj*, obj*, obj*); +namespace lean { +obj* string_append(obj*, obj*); +} +obj* l_Lean_Parser_manyAux___main(uint8, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_addLit___closed__1; obj* l_Lean_Parser_levelParser___boxed(obj*, obj*); +extern obj* l_Char_HasRepr___closed__1; extern "C" obj* lean_name_mk_string(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_imax(obj*); +extern obj* l_Lean_nullKind; obj* l_Lean_Parser_addBuiltinTrailingParser(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_levelParserFn___rarg___closed__1; -obj* l_Lean_Parser_symbolFn___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_numLitFn___rarg(obj*, obj*); +obj* l_Lean_Parser_ParserState_pushSyntax(obj*, obj*); obj* l_Lean_Parser_Level_imax; obj* l___regBuiltinParser_Lean_Parser_Level_hole___closed__1; obj* l_Lean_Parser_regBuiltinLevelParserAttr(obj*); +obj* l_Lean_Parser_Level_hole___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_trim(obj*); obj* l_Lean_Parser_numLitFn___boxed(obj*, obj*); obj* l_Lean_Parser_levelParserFn___boxed(obj*); +obj* l_Lean_Parser_Level_addLit___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Level_hole___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_max(obj*); obj* l_Lean_Parser_nodeInfo(obj*); +obj* l_Array_size(obj*, obj*); obj* l_Lean_Parser_identFn___boxed(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_ident___closed__1; obj* l_Lean_Parser_levelParserFn___rarg(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_regBuiltinLevelParserAttr___closed__1; -obj* l_Lean_Parser_nodeFn___rarg(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_num(obj*); obj* l_Lean_Parser_Level_hole; +obj* l_Lean_Parser_Level_max___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_paren(obj*); obj* l_Lean_Parser_Level_ident; extern obj* l_Lean_Parser_epsilonInfo; +obj* l_Lean_Parser_Level_imax___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_max___closed__1; -obj* l_Lean_Parser_pushLeadingFn___boxed(obj*, obj*, obj*); +obj* l_Lean_Parser_Level_imax___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Level_paren___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Level_imax___closed__1; obj* l___regBuiltinParser_Lean_Parser_Level_paren___closed__1; obj* l___regBuiltinParser_Lean_Parser_Level_ident(obj*); @@ -170,10 +187,64 @@ x_4 = l_Lean_Parser_levelParser(x_3, x_2); return x_4; } } +obj* l_Lean_Parser_Level_paren___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_10 = lean::string_append(x_9, x_2); +x_11 = l_Char_HasRepr___closed__1; +x_12 = lean::string_append(x_10, x_11); +lean::inc(x_5); +x_13 = l_Lean_Parser_symbolFnAux(x_2, x_12, x_5, x_6); +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; +x_15 = l_Lean_Parser_levelParserFn___rarg___closed__1; +x_16 = l_Lean_Parser_builtinLevelParsingTable; +x_17 = lean::mk_nat_obj(0u); +lean::inc(x_5); +x_18 = l_Lean_Parser_runBuiltinParserUnsafe(x_15, x_16, x_17, x_5, x_13); +x_19 = lean::cnstr_get(x_18, 3); +lean::inc(x_19); +if (lean::obj_tag(x_19) == 0) +{ +obj* x_20; obj* x_21; obj* x_22; obj* x_23; +x_20 = lean::string_append(x_9, x_3); +x_21 = lean::string_append(x_20, x_11); +x_22 = l_Lean_Parser_symbolFnAux(x_3, x_21, x_5, x_18); +x_23 = l_Lean_Parser_ParserState_mkNode(x_22, x_1, x_8); +return x_23; +} +else +{ +obj* x_24; +lean::dec(x_19); +lean::dec(x_5); +x_24 = l_Lean_Parser_ParserState_mkNode(x_18, x_1, x_8); +return x_24; +} +} +else +{ +obj* x_25; +lean::dec(x_14); +lean::dec(x_5); +x_25 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_8); +return x_25; +} +} +} obj* _init_l_Lean_Parser_Level_paren() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -191,40 +262,39 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_17 = lean::box(1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -x_19 = lean::mk_nat_obj(0u); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_20, 0, x_19); -x_21 = lean::box(0); -x_22 = lean::mk_string(")"); -x_23 = l_String_trim(x_22); -lean::dec(x_22); -lean::inc(x_23); -x_24 = l_Lean_Parser_symbolInfo(x_23, x_21); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_25, 0, x_23); -x_26 = l_Lean_Parser_andthenInfo(x_18, x_24); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_20); -lean::closure_set(x_27, 1, x_25); -x_28 = l_Lean_Parser_andthenInfo(x_14, x_26); -x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_29, 0, x_15); -lean::closure_set(x_29, 1, x_27); -x_30 = l_Lean_Parser_nodeInfo(x_28); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_31, 0, x_9); -lean::closure_set(x_31, 1, x_29); -x_32 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_32, 0, x_30); -lean::cnstr_set(x_32, 1, x_31); -return x_32; +x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_16 = lean::box(1); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +x_18 = lean::box(0); +x_19 = lean::mk_string(")"); +x_20 = l_String_trim(x_19); +lean::dec(x_19); +lean::inc(x_20); +x_21 = l_Lean_Parser_symbolInfo(x_20, x_18); +x_22 = l_Lean_Parser_andthenInfo(x_17, x_21); +x_23 = l_Lean_Parser_andthenInfo(x_14, x_22); +x_24 = l_Lean_Parser_nodeInfo(x_23); +x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Level_paren___elambda__1___boxed), 6, 3); +lean::closure_set(x_25, 0, x_9); +lean::closure_set(x_25, 1, x_13); +lean::closure_set(x_25, 2, x_20); +x_26 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_26, 0, x_24); +lean::cnstr_set(x_26, 1, x_25); +return x_26; +} +} +obj* l_Lean_Parser_Level_paren___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; +x_7 = l_Lean_Parser_Level_paren___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +return x_7; } } obj* _init_l___regBuiltinParser_Lean_Parser_Level_paren___closed__1() { @@ -254,10 +324,75 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Level_max___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_10 = lean::string_append(x_9, x_2); +x_11 = l_Char_HasRepr___closed__1; +x_12 = lean::string_append(x_10, x_11); +lean::inc(x_5); +x_13 = l_Lean_Parser_symbolFnAux(x_2, x_12, x_5, x_6); +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_15 = lean::cnstr_get(x_13, 0); +lean::inc(x_15); +x_16 = lean::array_get_size(x_15); +lean::dec(x_15); +x_17 = l_Lean_Parser_levelParserFn___rarg___closed__1; +x_18 = l_Lean_Parser_builtinLevelParsingTable; +x_19 = l_Lean_Parser_appPrec; +lean::inc(x_5); +x_20 = l_Lean_Parser_runBuiltinParserUnsafe(x_17, x_18, x_19, x_5, x_13); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +uint8 x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +x_22 = 0; +x_23 = l_Lean_Parser_manyAux___main(x_22, x_3, x_4, x_5, x_20); +x_24 = l_Lean_nullKind; +x_25 = l_Lean_Parser_ParserState_mkNode(x_23, x_24, x_16); +x_26 = l_Lean_Parser_ParserState_mkNode(x_25, x_1, x_8); +return x_26; +} +else +{ +obj* x_27; obj* x_28; obj* x_29; +lean::dec(x_21); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_27 = l_Lean_nullKind; +x_28 = l_Lean_Parser_ParserState_mkNode(x_20, x_27, x_16); +x_29 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_8); +return x_29; +} +} +else +{ +obj* x_30; +lean::dec(x_14); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_30 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_8); +return x_30; +} +} +} obj* _init_l_Lean_Parser_Level_max() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -273,33 +408,33 @@ x_11 = l_String_trim(x_8); lean::dec(x_8); lean::inc(x_11); x_12 = l_Lean_Parser_symbolInfo(x_11, x_10); -x_13 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_13, 0, x_11); -x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_15 = lean::box(1); -x_16 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_16, 0, x_14); -lean::cnstr_set(x_16, 1, x_15); -x_17 = l_Lean_Parser_appPrec; -x_18 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_18, 0, x_17); -x_19 = 0; -x_20 = lean::box(x_19); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_21, 0, x_20); -lean::closure_set(x_21, 1, x_18); -x_22 = l_Lean_Parser_andthenInfo(x_12, x_16); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_13); -lean::closure_set(x_23, 1, x_21); -x_24 = l_Lean_Parser_nodeInfo(x_22); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_9); -lean::closure_set(x_25, 1, x_23); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_24); -lean::cnstr_set(x_26, 1, x_25); -return x_26; +x_13 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_14 = lean::box(1); +x_15 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_15, 0, x_13); +lean::cnstr_set(x_15, 1, x_14); +x_16 = l_Lean_Parser_appPrec; +x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_17, 0, x_16); +x_18 = l_Lean_Parser_andthenInfo(x_12, x_15); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Level_max___elambda__1___boxed), 6, 3); +lean::closure_set(x_20, 0, x_9); +lean::closure_set(x_20, 1, x_11); +lean::closure_set(x_20, 2, x_17); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +return x_21; +} +} +obj* l_Lean_Parser_Level_max___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; +x_7 = l_Lean_Parser_Level_max___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean::dec(x_2); +return x_7; } } obj* _init_l___regBuiltinParser_Lean_Parser_Level_max___closed__1() { @@ -329,10 +464,75 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Level_imax___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_10 = lean::string_append(x_9, x_2); +x_11 = l_Char_HasRepr___closed__1; +x_12 = lean::string_append(x_10, x_11); +lean::inc(x_5); +x_13 = l_Lean_Parser_symbolFnAux(x_2, x_12, x_5, x_6); +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_15 = lean::cnstr_get(x_13, 0); +lean::inc(x_15); +x_16 = lean::array_get_size(x_15); +lean::dec(x_15); +x_17 = l_Lean_Parser_levelParserFn___rarg___closed__1; +x_18 = l_Lean_Parser_builtinLevelParsingTable; +x_19 = l_Lean_Parser_appPrec; +lean::inc(x_5); +x_20 = l_Lean_Parser_runBuiltinParserUnsafe(x_17, x_18, x_19, x_5, x_13); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +uint8 x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +x_22 = 0; +x_23 = l_Lean_Parser_manyAux___main(x_22, x_3, x_4, x_5, x_20); +x_24 = l_Lean_nullKind; +x_25 = l_Lean_Parser_ParserState_mkNode(x_23, x_24, x_16); +x_26 = l_Lean_Parser_ParserState_mkNode(x_25, x_1, x_8); +return x_26; +} +else +{ +obj* x_27; obj* x_28; obj* x_29; +lean::dec(x_21); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_27 = l_Lean_nullKind; +x_28 = l_Lean_Parser_ParserState_mkNode(x_20, x_27, x_16); +x_29 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_8); +return x_29; +} +} +else +{ +obj* x_30; +lean::dec(x_14); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_30 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_8); +return x_30; +} +} +} obj* _init_l_Lean_Parser_Level_imax() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -348,33 +548,33 @@ x_11 = l_String_trim(x_8); lean::dec(x_8); lean::inc(x_11); x_12 = l_Lean_Parser_symbolInfo(x_11, x_10); -x_13 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_13, 0, x_11); -x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_15 = lean::box(1); -x_16 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_16, 0, x_14); -lean::cnstr_set(x_16, 1, x_15); -x_17 = l_Lean_Parser_appPrec; -x_18 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_18, 0, x_17); -x_19 = 0; -x_20 = lean::box(x_19); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_21, 0, x_20); -lean::closure_set(x_21, 1, x_18); -x_22 = l_Lean_Parser_andthenInfo(x_12, x_16); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_13); -lean::closure_set(x_23, 1, x_21); -x_24 = l_Lean_Parser_nodeInfo(x_22); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_9); -lean::closure_set(x_25, 1, x_23); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_24); -lean::cnstr_set(x_26, 1, x_25); -return x_26; +x_13 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_14 = lean::box(1); +x_15 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_15, 0, x_13); +lean::cnstr_set(x_15, 1, x_14); +x_16 = l_Lean_Parser_appPrec; +x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_17, 0, x_16); +x_18 = l_Lean_Parser_andthenInfo(x_12, x_15); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Level_imax___elambda__1___boxed), 6, 3); +lean::closure_set(x_20, 0, x_9); +lean::closure_set(x_20, 1, x_11); +lean::closure_set(x_20, 2, x_17); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +return x_21; +} +} +obj* l_Lean_Parser_Level_imax___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; +x_7 = l_Lean_Parser_Level_imax___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean::dec(x_2); +return x_7; } } obj* _init_l___regBuiltinParser_Lean_Parser_Level_imax___closed__1() { @@ -404,10 +604,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Level_hole___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Level_hole() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -423,16 +640,24 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_nodeInfo(x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_14); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_14 = l_Lean_Parser_nodeInfo(x_13); +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Level_hole___elambda__1___boxed), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; +} +} +obj* l_Lean_Parser_Level_hole___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Level_hole___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Level_hole___closed__1() { @@ -548,10 +773,60 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Level_addLit___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +lean::inc(x_5); +x_8 = l_Lean_Parser_ParserState_pushSyntax(x_5, x_3); +x_9 = lean::cnstr_get(x_5, 3); +lean::inc(x_9); +lean::dec(x_5); +if (lean::obj_tag(x_9) == 0) +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; +x_10 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_11 = lean::string_append(x_10, x_2); +x_12 = l_Char_HasRepr___closed__1; +x_13 = lean::string_append(x_11, x_12); +lean::inc(x_4); +x_14 = l_Lean_Parser_symbolFnAux(x_2, x_13, x_4, x_8); +x_15 = lean::cnstr_get(x_14, 3); +lean::inc(x_15); +if (lean::obj_tag(x_15) == 0) +{ +obj* x_16; obj* x_17; +x_16 = l_Lean_Parser_numLitFn___rarg(x_4, x_14); +x_17 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_7); +return x_17; +} +else +{ +obj* x_18; +lean::dec(x_15); +lean::dec(x_4); +x_18 = l_Lean_Parser_ParserState_mkNode(x_14, x_1, x_7); +return x_18; +} +} +else +{ +obj* x_19; +lean::dec(x_9); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_8, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Level_addLit() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -569,32 +844,28 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::mk_string("numLit"); -x_17 = l_Lean_Parser_mkAtomicInfo(x_16); -x_18 = 1; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_numLitFn___boxed), 2, 1); -lean::closure_set(x_20, 0, x_19); -x_21 = l_Lean_Parser_andthenInfo(x_14, x_17); -x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_22, 0, x_15); -lean::closure_set(x_22, 1, x_20); -x_23 = l_Lean_Parser_epsilonInfo; -x_24 = l_Lean_Parser_andthenInfo(x_23, x_21); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_pushLeadingFn___boxed), 3, 0); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_26, 0, x_25); -lean::closure_set(x_26, 1, x_22); -x_27 = l_Lean_Parser_nodeInfo(x_24); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_28, 0, x_9); -lean::closure_set(x_28, 1, x_26); -x_29 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_29, 0, x_27); -lean::cnstr_set(x_29, 1, x_28); -return x_29; +x_15 = lean::mk_string("numLit"); +x_16 = l_Lean_Parser_mkAtomicInfo(x_15); +x_17 = l_Lean_Parser_andthenInfo(x_14, x_16); +x_18 = l_Lean_Parser_epsilonInfo; +x_19 = l_Lean_Parser_andthenInfo(x_18, x_17); +x_20 = l_Lean_Parser_nodeInfo(x_19); +x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Level_addLit___elambda__1___boxed), 5, 2); +lean::closure_set(x_21, 0, x_9); +lean::closure_set(x_21, 1, x_13); +x_22 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_22, 0, x_20); +lean::cnstr_set(x_22, 1, x_21); +return x_22; +} +} +obj* l_Lean_Parser_Level_addLit___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Level_addLit___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Level_addLit___closed__1() { diff --git a/src/stage0/init/lean/parser/parser.cpp b/src/stage0/init/lean/parser/parser.cpp index 7134312fec..9f29b0ed44 100644 --- a/src/stage0/init/lean/parser/parser.cpp +++ b/src/stage0/init/lean/parser/parser.cpp @@ -397,6 +397,7 @@ obj* l_Lean_Parser_many(uint8, obj*); obj* l_Lean_Parser_finishCommentBlock___main(obj*, obj*, obj*); uint8 l_Lean_Parser_TokenConfig_beq(obj*, obj*); obj* l___private_init_lean_parser_parser_4__tokenFnAux(obj*, obj*); +obj* l_Lean_Parser_node___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_mkCApp(obj*, obj*); obj* l_Lean_Parser_numLitFn___rarg(obj*, obj*); obj* l_Lean_Parser_noFirstTokenInfo(obj*); @@ -2292,23 +2293,36 @@ return x_5; } } } +obj* l_Lean_Parser_node___lambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_1, 1); +lean::inc(x_6); +lean::dec(x_1); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_2, x_8); +return x_10; +} +} obj* l_Lean_Parser_node(uint8 x_1, obj* x_2, obj* x_3) { _start: { -obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; +obj* x_4; obj* x_5; obj* x_6; obj* x_7; x_4 = lean::cnstr_get(x_3, 0); lean::inc(x_4); x_5 = l_Lean_Parser_nodeInfo(x_4); -x_6 = lean::cnstr_get(x_3, 1); -lean::inc(x_6); -lean::dec(x_3); -x_7 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_7, 0, x_2); -lean::closure_set(x_7, 1, x_6); -x_8 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_8, 0, x_5); -lean::cnstr_set(x_8, 1, x_7); -return x_8; +x_6 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_node___lambda__1), 5, 2); +lean::closure_set(x_6, 0, x_3); +lean::closure_set(x_6, 1, x_2); +x_7 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_7, 0, x_5); +lean::cnstr_set(x_7, 1, x_6); +return x_7; } } obj* l_Lean_Parser_node___boxed(obj* x_1, obj* x_2, obj* x_3) { @@ -2324,39 +2338,33 @@ return x_5; obj* l_Lean_Parser_leadingNode(obj* x_1, obj* x_2) { _start: { -obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_3 = lean::cnstr_get(x_2, 0); lean::inc(x_3); x_4 = l_Lean_Parser_nodeInfo(x_3); -x_5 = lean::cnstr_get(x_2, 1); -lean::inc(x_5); -lean::dec(x_2); -x_6 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_6, 0, x_1); -lean::closure_set(x_6, 1, x_5); -x_7 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_7, 0, x_4); -lean::cnstr_set(x_7, 1, x_6); -return x_7; +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_node___lambda__1), 5, 2); +lean::closure_set(x_5, 0, x_2); +lean::closure_set(x_5, 1, x_1); +x_6 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_6, 0, x_4); +lean::cnstr_set(x_6, 1, x_5); +return x_6; } } obj* l_Lean_Parser_trailingNode(obj* x_1, obj* x_2) { _start: { -obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_3 = lean::cnstr_get(x_2, 0); lean::inc(x_3); x_4 = l_Lean_Parser_nodeInfo(x_3); -x_5 = lean::cnstr_get(x_2, 1); -lean::inc(x_5); -lean::dec(x_2); -x_6 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_6, 0, x_1); -lean::closure_set(x_6, 1, x_5); -x_7 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_7, 0, x_4); -lean::cnstr_set(x_7, 1, x_6); -return x_7; +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_node___lambda__1), 5, 2); +lean::closure_set(x_5, 0, x_2); +lean::closure_set(x_5, 1, x_1); +x_6 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_6, 0, x_4); +lean::cnstr_set(x_6, 1, x_5); +return x_6; } } obj* l_Lean_Parser_orelseFn___main___rarg(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { diff --git a/src/stage0/init/lean/parser/term.cpp b/src/stage0/init/lean/parser/term.cpp index aca3833df8..ad46819658 100644 --- a/src/stage0/init/lean/parser/term.cpp +++ b/src/stage0/init/lean/parser/term.cpp @@ -15,11 +15,16 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif obj* l___regBuiltinParser_Lean_Parser_Term_sub___closed__1; +uint8 l_Lean_Parser_checkTailNoWs(obj*); obj* l_Lean_Parser_Term_arrow; obj* l_Lean_Parser_Term_structInstSource; obj* l_Lean_Parser_regBuiltinTermParserAttr(obj*); +obj* l_Lean_Parser_Term_subtype___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_add___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_unicodeSymbolFnAux(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_termParser(uint8, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_ge___closed__1; +obj* l_Lean_Parser_Term_hole___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_show___closed__1; obj* l_Lean_Parser_orelseFn___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_strLitFn___boxed(obj*, obj*); @@ -30,24 +35,33 @@ obj* l_Lean_Parser_addBuiltinLeadingParser(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_optType; obj* l_Lean_Parser_Term_namedArgument; obj* l_Lean_Parser_Term_array; -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2; +obj* l_Lean_Parser_Term_show___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_hole___elambda__1(obj*, obj*, obj*, obj*, obj*); namespace lean { obj* nat_sub(obj*, obj*); } obj* l_Lean_Parser_Term_unicodeInfixL(obj*, obj*, obj*); +extern obj* l_Lean_Parser_unicodeSymbolFn___rarg___closed__1; +obj* l_Lean_Parser_Term_sorry___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_ParserState_restore(obj*, obj*, obj*); obj* l_Lean_Parser_Term_fromTerm; -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_anonymousCtor___closed__1; +obj* l_Lean_Parser_Term_binderTactic___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_add(obj*); +obj* l_Lean_Parser_Term_haveAssign___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_suffices___closed__1; obj* l_Lean_Parser_andthenFn___rarg(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_forall(obj*); obj* l_Lean_Parser_Term_infixR___boxed(obj*, obj*); obj* l_Lean_Parser_Term_le; -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +extern obj* l_Lean_Parser_unicodeSymbolCheckPrecFn___closed__2; +obj* l_Lean_Parser_Term_mod___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_symbolInfo(obj*, obj*); +obj* l_Lean_Parser_Term_nomatch___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_lt___closed__1; +obj* l_Lean_Parser_Term_list___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_sepByFn___main(uint8, uint8, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_cdot___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_andthenInfo(obj*, obj*); obj* l_Lean_Parser_Term_parenSpecial; obj* l_Lean_Parser_orelseInfo(obj*, obj*); @@ -56,96 +70,127 @@ obj* l_Lean_Parser_Term_hole; obj* l_Lean_Parser_termParserFn___rarg(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_have; obj* l_Lean_Parser_Term_modN; -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_sort___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_namedArgument___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_implicitBinder___closed__3; +obj* l_Lean_Parser_Term_subtype___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_binderType___closed__2; obj* l___regBuiltinParser_Lean_Parser_Term_if(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_fun(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_fcomp(obj*); -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1(uint8, uint8, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_type___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_sepBy1Info(obj*, obj*); -extern obj* l_Lean_Parser_builtinLevelParsingTable; obj* l_Lean_Parser_builtinTermParsingTable; obj* l___regBuiltinParser_Lean_Parser_Term_hole(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_cdot(obj*); obj* l_Lean_Parser_Term_binderType___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_sorry___closed__1; +obj* l_Lean_Parser_sepBy1Fn___main(uint8, uint8, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_tupleTail; obj* l___regBuiltinParser_Lean_Parser_Term_app___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_have___closed__1; +obj* l_Lean_Parser_Term_app___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_fun___closed__1; +obj* l_Lean_Parser_Term_tupleTail___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_namedArgument___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_infixR(obj*, obj*); +extern obj* l_Lean_Parser_unicodeSymbolCheckPrecFn___closed__1; extern obj* l_Lean_Parser_appPrec; obj* l___regBuiltinParser_Lean_Parser_Term_depArrow___closed__1; obj* l_Lean_Parser_Term_binderTactic; obj* l_Lean_Parser_symbolFnAux(obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_sub___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_tupleTail___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_anonymousCtor(obj*); obj* l_Lean_Parser_registerBuiltinParserAttribute(obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_if___closed__1; obj* l_Lean_Parser_Term_beq; obj* l_Lean_Parser_Term_suffices; +extern obj* l_Lean_Parser_symbolFn___rarg___closed__1; +obj* l_Lean_Parser_Term_mul___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_explicitBinder___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_implicitBinder(uint8); obj* l_Lean_Parser_Term_sub; obj* l_Lean_Parser_Term_mul; -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2(uint8, uint8, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_explicitBinder___closed__10; +obj* l_Lean_Parser_Term_anonymousCtor___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_list___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_ExceptT_lift___rarg___lambda__1(obj*); -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2(uint8, uint8, obj*, obj*, obj*); obj* l_Lean_Parser_termParserFn___rarg___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_or___closed__1; obj* l_Lean_Parser_mkAtomicInfo(obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1; +obj* l_Lean_Parser_Term_arrow___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_show___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_ge___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_proj___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_implicitBinder___closed__2; obj* l_Lean_Parser_Term_structInst; -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3(uint8, uint8, obj*, uint8, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_le___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_id___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_infixL(obj*, obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1; obj* l_Lean_Parser_Term_str; +obj* l_Lean_Parser_Term_modN___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_fieldIdxFn(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_modN(obj*); obj* l_Lean_Parser_Term_equation; +obj* l_Lean_Parser_Term_implicitBinder___closed__5; obj* l___regBuiltinParser_Lean_Parser_Term_cdot___closed__1; -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_id; +obj* l_Lean_Parser_Term_structInst___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_add; +obj* l_Lean_Parser_Term_type___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_haveAssign; obj* l___regBuiltinParser_Lean_Parser_Term_proj(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_str(obj*); +obj* l_Lean_Parser_Term_explicitBinder___closed__8; obj* l_Lean_Parser_Term_depArrow; obj* l___regBuiltinParser_Lean_Parser_Term_mul___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_fcomp___closed__1; -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1(uint8, uint8, obj*, obj*, obj*); -obj* l_Lean_Parser_symbolNoWsFn___boxed(obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_le(obj*); obj* l_Lean_Parser_Term_fcomp; obj* l_Lean_Parser_Term_unicodeInfixR___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_paren___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_proj___closed__1; obj* l_Lean_Parser_ParserState_mkNode(obj*, obj*, obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3(uint8, uint8, obj*, uint8, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_suffices(obj*); obj* l_Lean_Parser_regBuiltinTermParserAttr___closed__2; +obj* l_Lean_Parser_Term_implicitBinder___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_levelParserFn___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_typeSpec___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_binderIdent; +obj* l_Lean_Parser_Term_structInstField___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_unicodeInfixR(obj*, obj*, obj*); obj* l_Lean_Parser_Term_binderType(uint8); obj* l_Lean_Parser_runBuiltinParserUnsafe(obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_Parser_Parser_inhabited___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_structInst___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_eq(obj*); +obj* l_Lean_Parser_Term_paren___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); namespace lean { obj* string_append(obj*, obj*); } -obj* l_Lean_Parser_many1Fn___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_nomatch___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_manyAux___main(uint8, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_anonymousCtor___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_array(obj*); obj* l_Lean_Parser_Term_if; obj* l___regBuiltinParser_Lean_Parser_Term_iff(obj*); obj* l_Lean_Parser_termParserFn___rarg___boxed(obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_str___closed__1; +obj* l_Lean_Parser_Term_explicitBinder___closed__11; +obj* l_Lean_Parser_Term_eq___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_iff; obj* l___regBuiltinParser_Lean_Parser_Term_type(obj*); +obj* l_Lean_Parser_Term_typeAscription___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_type___closed__1; obj* l_Lean_Parser_Term_simpleBinder; obj* l_Lean_Parser_termParser___boxed(obj*, obj*); +obj* l_Lean_Parser_Term_suffices___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_iff___closed__1; +obj* l_Lean_Parser_Term_implicitBinder___closed__4; obj* l_Lean_Parser_Term_bracktedBinder___closed__2; +obj* l_Lean_Parser_Term_explicitBinder___closed__6; +extern obj* l_Char_HasRepr___closed__1; obj* l_Lean_Parser_tryFn___rarg(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_cdot; obj* l_Lean_Parser_Term_gt; @@ -155,122 +200,165 @@ obj* l___regBuiltinParser_Lean_Parser_Term_sorry(obj*); extern "C" obj* lean_name_mk_string(obj*, obj*); obj* l_Lean_Parser_Term_sort; obj* l_Lean_Parser_Term_infixL___boxed(obj*, obj*); +obj* l_Lean_Parser_Term_gt___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_hole___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_match(obj*); +obj* l_Lean_Parser_Term_fun___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); namespace lean { obj* nat_add(obj*, obj*); } +obj* l_Lean_Parser_Term_fromTerm___elambda__1(obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_nullKind; -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3(uint8, uint8, obj*, uint8, obj*, obj*, obj*); obj* l_Lean_Parser_Term_sorry; obj* l_Lean_Parser_addBuiltinTrailingParser(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_match; -extern obj* l_Lean_Parser_levelParserFn___rarg___closed__1; obj* l_Lean_Parser_Term_explicitBinder___closed__1; namespace lean { uint8 nat_dec_eq(obj*, obj*); } +obj* l_Lean_Parser_Term_fcomp___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_structInst___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_structInst(obj*); +obj* l_Lean_Parser_Term_explicitBinder___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_unicodeInfixL___boxed(obj*, obj*, obj*); obj* l_Lean_Parser_symbolFn___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_paren___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_num___closed__1; +obj* l_Lean_Parser_Term_have___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_depArrow___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_unicodeSymbolCheckPrecFnAux(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_have___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_strAux___main(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_add___closed__1; +obj* l_Lean_Parser_Term_equation___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_subtype; +obj* l_Lean_Parser_Term_if___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_forall; +obj* l_Lean_Parser_Term_explicitBinder___closed__3; obj* l___regBuiltinParser_Lean_Parser_Term_and(obj*); obj* l_Lean_Parser_Term_mod; obj* l___regBuiltinParser_Lean_Parser_Term_forall___closed__1; obj* l_Lean_Parser_Term_proj; -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2; +obj* l_Lean_Parser_Term_forall___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_array___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_sort(obj*); +obj* l_Lean_Parser_Term_equation___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_sub(obj*); obj* l_Lean_Parser_noFirstTokenInfo(obj*); obj* l_Lean_Parser_ParserState_pushSyntax(obj*, obj*); +obj* l_Lean_Parser_Term_array___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_nomatch(obj*); obj* l_Lean_Parser_Term_explicitBinder___closed__2; +obj* l_Lean_Parser_Term_fun___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_and___closed__1; -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_iff___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_match___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_id(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_depArrow(obj*); +obj* l_Lean_Parser_Term_instBinder___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_div(obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_mod___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_paren(obj*); +obj* l_Lean_Parser_identFn___rarg(obj*, obj*); obj* l_Lean_Parser_Term_unicodeInfixR___boxed(obj*, obj*, obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3(uint8, uint8, obj*, uint8, obj*, obj*, obj*); obj* l_String_trim(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_id___closed__1; obj* l_Lean_Parser_optionalFn___rarg(obj*, obj*, obj*, obj*); +extern obj* l_Lean_Parser_symbolNoWsFn___closed__1; +obj* l_Array_shrink___main___rarg(obj*, obj*); obj* l_Lean_Parser_Term_or; +obj* l_Lean_Parser_Term_simpleBinder___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_binderDefault; +obj* l_Lean_Parser_Term_explicitBinder___closed__4; obj* l_Lean_Parser_regBuiltinTermParserAttr___closed__1; obj* l_Lean_Parser_numLitFn___boxed(obj*, obj*); obj* l_Lean_Parser_Term_show; obj* l_Lean_Parser_Term_explicitBinder(uint8); +obj* l_Lean_Parser_Term_instBinder___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_explicitBinder___closed__5; obj* l_Lean_Parser_symbolNoWsInfo(obj*, obj*); -obj* l_Lean_Parser_unicodeSymbolCheckPrecFn___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_unicodeSymbolFn___rarg___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_id___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_or(obj*); obj* l_Lean_Parser_Term_instBinder; obj* l___regBuiltinParser_Lean_Parser_Term_arrow(obj*); -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_div___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_le___closed__1; +obj* l_Lean_Parser_Term_lt___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_ParserState_mkError(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_have(obj*); obj* l_Lean_Parser_Term_list; obj* l_Lean_Parser_nodeInfo(obj*); +obj* l_Lean_Parser_Term_implicitBinder___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_proj___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Array_size(obj*, obj*); -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_binderTactic___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_fromTerm___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_eq___closed__1; obj* l_Lean_Parser_Term_typeAscription; obj* l_Lean_Parser_termParserFn(uint8); -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2(uint8, uint8, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_structInstSource___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_implicitBinder___closed__6; obj* l___regBuiltinParser_Lean_Parser_Term_div___closed__1; obj* l_Lean_Parser_identFn___boxed(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_subtype___closed__1; -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2(uint8, uint8, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_app(obj*); +obj* l_Lean_Parser_Term_beq___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_implicitBinder___boxed(obj*); -obj* l_Lean_Parser_fieldIdx___lambda__1___boxed(obj*, obj*, obj*); obj* l_Lean_Parser_Term_bracktedBinder(uint8); +obj* l_Lean_Parser_Term_sort___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_optIdent; -obj* l_Lean_Parser_nodeFn___rarg(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_show(obj*); -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1(uint8, uint8, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_arrow___closed__1; +obj* l_Lean_Parser_Term_array___elambda__1(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_termParserFn___boxed(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_beq(obj*); +obj* l_Lean_Parser_Term_implicitBinder___closed__7; +obj* l_Lean_Parser_Term_match___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_list(obj*); obj* l_Lean_Parser_Term_explicitBinder___boxed(obj*); obj* l_Lean_Parser_Term_nomatch; obj* l___regBuiltinParser_Lean_Parser_Term_ge(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_num(obj*); +obj* l_Lean_Parser_Term_typeAscription___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_unicodeSymbolInfo(obj*, obj*, obj*); obj* l_Lean_Parser_Term_type; obj* l___regBuiltinParser_Lean_Parser_Term_subtype(obj*); obj* l___regBuiltinParser_Lean_Parser_Term_mod(obj*); +obj* l_Lean_Parser_Term_haveAssign___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_structInstField___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_binderType___boxed(obj*); obj* l_Lean_Parser_Term_anonymousCtor; obj* l_Lean_Parser_Term_implicitBinder___closed__1; +obj* l_Lean_Parser_Term_binderDefault___elambda__1(obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_Parser_epsilonInfo; obj* l_Lean_Parser_Term_bracktedBinder___closed__1; obj* l_Lean_Parser_Term_eq; +obj* l_Lean_Parser_Term_sorry___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_typeSpec___elambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_or___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_bracktedBinder___boxed(obj*); obj* l_Lean_Parser_Term_structInstField; -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_binderDefault___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_gt___closed__1; -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_explicitBinder___closed__7; +obj* l_Lean_Parser_Term_forall___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_beq___closed__1; obj* l___regBuiltinParser_Lean_Parser_Term_gt(obj*); obj* l_Lean_Parser_Term_div; -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1(uint8, uint8, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_explicitBinder___closed__9; +obj* l_Lean_Parser_Term_suffices___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_if___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_typeSpec; +obj* l_Lean_Parser_Term_structInstSource___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Term_ge; obj* l___regBuiltinParser_Lean_Parser_Term_list___closed__1; obj* l_Lean_Parser_Term_fun; obj* l_Lean_Parser_pushLeadingFn___boxed(obj*, obj*, obj*); +obj* l_Lean_Parser_Term_depArrow___elambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_and___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_mul(obj*); -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_Parser_Term_cdot___elambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_sepByInfo(obj*, obj*); obj* l___regBuiltinParser_Lean_Parser_Term_lt(obj*); obj* l_Lean_Parser_Term_lt; @@ -561,142 +649,167 @@ lean::dec(x_1); return x_3; } } -obj* _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1() { +obj* l_Lean_Parser_Term_id___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { _start: { -obj* x_1; obj* x_2; -x_1 = lean::mk_string(", "); -x_2 = l_String_trim(x_1); -lean::dec(x_1); -return x_2; -} -} -obj* _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2() { -_start: +obj* x_9; obj* x_10; obj* x_11; obj* x_12; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +lean::inc(x_7); +x_11 = l_Lean_Parser_identFn___rarg(x_7, x_8); +x_12 = lean::cnstr_get(x_11, 3); +lean::inc(x_12); +if (lean::obj_tag(x_12) == 0) { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; -x_1 = lean::mk_string(", "); -x_2 = l_String_trim(x_1); -lean::dec(x_1); -x_3 = lean::mk_string("expected '"); -x_4 = lean::string_append(x_3, x_2); -lean::dec(x_2); -x_5 = lean::mk_string("'"); -x_6 = lean::string_append(x_4, x_5); -lean::dec(x_5); -return x_6; -} -} -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3(uint8 x_1, uint8 x_2, obj* x_3, uint8 x_4, obj* x_5, obj* x_6, obj* x_7) { -_start: -{ -obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; -x_8 = lean::cnstr_get(x_7, 0); -lean::inc(x_8); -x_9 = lean::array_get_size(x_8); -lean::dec(x_8); -x_10 = lean::cnstr_get(x_7, 1); -lean::inc(x_10); -x_11 = l_Lean_Parser_levelParserFn___rarg___closed__1; -x_12 = l_Lean_Parser_builtinLevelParsingTable; -x_13 = lean::mk_nat_obj(0u); -lean::inc(x_6); -x_14 = l_Lean_Parser_runBuiltinParserUnsafe(x_11, x_12, x_13, x_6, x_7); -x_15 = lean::cnstr_get(x_14, 3); +obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_13 = lean::cnstr_get(x_11, 0); +lean::inc(x_13); +x_14 = lean::array_get_size(x_13); +lean::dec(x_13); +x_15 = lean::cnstr_get(x_11, 1); lean::inc(x_15); -if (lean::obj_tag(x_15) == 0) +x_16 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_17 = lean::string_append(x_16, x_2); +x_18 = l_Char_HasRepr___closed__1; +x_19 = lean::string_append(x_17, x_18); +lean::inc(x_7); +x_20 = l_Lean_Parser_symbolFnAux(x_2, x_19, x_7, x_11); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) { -obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; -lean::dec(x_10); -lean::dec(x_9); -x_16 = lean::cnstr_get(x_14, 0); -lean::inc(x_16); -x_17 = lean::array_get_size(x_16); -lean::dec(x_16); -x_18 = lean::cnstr_get(x_14, 1); -lean::inc(x_18); -x_19 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1; -x_20 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2; -lean::inc(x_6); -x_21 = l_Lean_Parser_symbolFnAux(x_19, x_20, x_6, x_14); -x_22 = lean::cnstr_get(x_21, 3); -lean::inc(x_22); -if (lean::obj_tag(x_22) == 0) +uint8 x_22; uint8 x_23; obj* x_24; obj* x_25; +x_22 = 0; +x_23 = 0; +lean::inc(x_7); +x_24 = l_Lean_Parser_sepBy1Fn___main(x_22, x_23, x_3, x_4, x_6, x_7, x_20); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) { -lean::dec(x_18); -lean::dec(x_17); -{ -uint8 _tmp_3 = x_2; -obj* _tmp_6 = x_21; -x_4 = _tmp_3; -x_7 = _tmp_6; -} -goto _start; -} -else -{ -obj* x_24; obj* x_25; obj* x_26; -lean::dec(x_22); -lean::dec(x_6); -x_24 = l_Lean_Parser_ParserState_restore(x_21, x_17, x_18); -lean::dec(x_17); -x_25 = l_Lean_nullKind; -x_26 = l_Lean_Parser_ParserState_mkNode(x_24, x_25, x_3); -return x_26; -} -} -else +obj* x_26; obj* x_27; obj* x_28; obj* x_29; +x_26 = lean::string_append(x_16, x_5); +x_27 = lean::string_append(x_26, x_18); +x_28 = l_Lean_Parser_symbolFnAux(x_5, x_27, x_7, x_24); +x_29 = lean::cnstr_get(x_28, 3); +lean::inc(x_29); +if (lean::obj_tag(x_29) == 0) { +obj* x_30; obj* x_31; obj* x_32; lean::dec(x_15); -lean::dec(x_6); -if (x_4 == 0) -{ -obj* x_27; obj* x_28; obj* x_29; obj* x_30; -lean::dec(x_10); -lean::dec(x_9); -x_27 = lean::box(0); -x_28 = l_Lean_Parser_ParserState_pushSyntax(x_14, x_27); -x_29 = l_Lean_nullKind; -x_30 = l_Lean_Parser_ParserState_mkNode(x_28, x_29, x_3); -return x_30; +x_30 = l_Lean_nullKind; +x_31 = l_Lean_Parser_ParserState_mkNode(x_28, x_30, x_14); +x_32 = l_Lean_Parser_ParserState_mkNode(x_31, x_1, x_10); +return x_32; } else { -obj* x_31; obj* x_32; obj* x_33; -x_31 = l_Lean_Parser_ParserState_restore(x_14, x_9, x_10); -lean::dec(x_9); -x_32 = l_Lean_nullKind; -x_33 = l_Lean_Parser_ParserState_mkNode(x_31, x_32, x_3); -return x_33; -} -} -} -} -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: +obj* x_33; uint8 x_34; +lean::dec(x_29); +x_33 = lean::cnstr_get(x_28, 1); +lean::inc(x_33); +x_34 = lean::nat_dec_eq(x_33, x_15); +lean::dec(x_33); +if (x_34 == 0) { -obj* x_6; obj* x_7; uint8 x_8; obj* x_9; -x_6 = lean::cnstr_get(x_5, 0); -lean::inc(x_6); -x_7 = lean::array_get_size(x_6); +obj* x_35; obj* x_36; obj* x_37; +lean::dec(x_15); +x_35 = l_Lean_nullKind; +x_36 = l_Lean_Parser_ParserState_mkNode(x_28, x_35, x_14); +x_37 = l_Lean_Parser_ParserState_mkNode(x_36, x_1, x_10); +return x_37; +} +else +{ +obj* x_38; obj* x_39; obj* x_40; obj* x_41; +x_38 = l_Lean_Parser_ParserState_restore(x_28, x_14, x_15); +x_39 = l_Lean_nullKind; +x_40 = l_Lean_Parser_ParserState_mkNode(x_38, x_39, x_14); +x_41 = l_Lean_Parser_ParserState_mkNode(x_40, x_1, x_10); +return x_41; +} +} +} +else +{ +obj* x_42; uint8 x_43; +lean::dec(x_25); +lean::dec(x_7); +x_42 = lean::cnstr_get(x_24, 1); +lean::inc(x_42); +x_43 = lean::nat_dec_eq(x_42, x_15); +lean::dec(x_42); +if (x_43 == 0) +{ +obj* x_44; obj* x_45; obj* x_46; +lean::dec(x_15); +x_44 = l_Lean_nullKind; +x_45 = l_Lean_Parser_ParserState_mkNode(x_24, x_44, x_14); +x_46 = l_Lean_Parser_ParserState_mkNode(x_45, x_1, x_10); +return x_46; +} +else +{ +obj* x_47; obj* x_48; obj* x_49; obj* x_50; +x_47 = l_Lean_Parser_ParserState_restore(x_24, x_14, x_15); +x_48 = l_Lean_nullKind; +x_49 = l_Lean_Parser_ParserState_mkNode(x_47, x_48, x_14); +x_50 = l_Lean_Parser_ParserState_mkNode(x_49, x_1, x_10); +return x_50; +} +} +} +else +{ +obj* x_51; uint8 x_52; +lean::dec(x_21); +lean::dec(x_7); lean::dec(x_6); -x_8 = 0; -x_9 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3(x_1, x_2, x_7, x_8, x_3, x_4, x_5); -return x_9; -} -} -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: +lean::dec(x_4); +lean::dec(x_3); +x_51 = lean::cnstr_get(x_20, 1); +lean::inc(x_51); +x_52 = lean::nat_dec_eq(x_51, x_15); +lean::dec(x_51); +if (x_52 == 0) { -obj* x_6; -x_6 = l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2(x_1, x_2, x_3, x_4, x_5); -return x_6; +obj* x_53; obj* x_54; obj* x_55; +lean::dec(x_15); +x_53 = l_Lean_nullKind; +x_54 = l_Lean_Parser_ParserState_mkNode(x_20, x_53, x_14); +x_55 = l_Lean_Parser_ParserState_mkNode(x_54, x_1, x_10); +return x_55; +} +else +{ +obj* x_56; obj* x_57; obj* x_58; obj* x_59; +x_56 = l_Lean_Parser_ParserState_restore(x_20, x_14, x_15); +x_57 = l_Lean_nullKind; +x_58 = l_Lean_Parser_ParserState_mkNode(x_56, x_57, x_14); +x_59 = l_Lean_Parser_ParserState_mkNode(x_58, x_1, x_10); +return x_59; +} +} +} +else +{ +obj* x_60; +lean::dec(x_12); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +lean::dec(x_3); +x_60 = l_Lean_Parser_ParserState_mkNode(x_11, x_1, x_10); +return x_60; +} } } obj* _init_l_Lean_Parser_Term_id() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; uint8 x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; uint8 x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -708,105 +821,58 @@ x_8 = lean::mk_string("id"); x_9 = lean_name_mk_string(x_7, x_8); x_10 = lean::mk_string("ident"); x_11 = l_Lean_Parser_mkAtomicInfo(x_10); -x_12 = 0; -x_13 = lean::box(x_12); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_14, 0, x_13); -x_15 = lean::box(0); -x_16 = lean::mk_string(".{"); -x_17 = l_String_trim(x_16); -lean::dec(x_16); -lean::inc(x_17); -x_18 = l_Lean_Parser_symbolInfo(x_17, x_15); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_17); -x_20 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_21 = lean::box(1); -x_22 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_22, 0, x_20); -lean::cnstr_set(x_22, 1, x_21); -x_23 = lean::mk_string(", "); -x_24 = l_String_trim(x_23); -lean::dec(x_23); -x_25 = l_Lean_Parser_symbolInfo(x_24, x_15); -x_26 = l_Lean_Parser_sepBy1Info(x_22, x_25); -x_27 = 0; -x_28 = lean::box(x_12); -x_29 = lean::box(x_27); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1___boxed), 5, 2); -lean::closure_set(x_30, 0, x_28); -lean::closure_set(x_30, 1, x_29); -x_31 = lean::mk_string("}"); -x_32 = l_String_trim(x_31); -lean::dec(x_31); -lean::inc(x_32); -x_33 = l_Lean_Parser_symbolInfo(x_32, x_15); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_34, 0, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_26, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_30); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_andthenInfo(x_18, x_35); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_19); -lean::closure_set(x_38, 1, x_36); -x_39 = l_Lean_Parser_noFirstTokenInfo(x_37); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_40, 0, x_38); -x_41 = l_Lean_Parser_andthenInfo(x_11, x_39); -x_42 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_42, 0, x_14); -lean::closure_set(x_42, 1, x_40); -x_43 = l_Lean_Parser_nodeInfo(x_41); -x_44 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_44, 0, x_9); -lean::closure_set(x_44, 1, x_42); -x_45 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_45, 0, x_43); -lean::cnstr_set(x_45, 1, x_44); -return x_45; +x_12 = lean::box(0); +x_13 = lean::mk_string(".{"); +x_14 = l_String_trim(x_13); +lean::dec(x_13); +lean::inc(x_14); +x_15 = l_Lean_Parser_symbolInfo(x_14, x_12); +x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_17 = lean::box(1); +x_18 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_18, 0, x_16); +lean::cnstr_set(x_18, 1, x_17); +x_19 = lean::mk_nat_obj(0u); +x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_levelParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_20, 0, x_19); +x_21 = lean::mk_string(", "); +x_22 = l_String_trim(x_21); +lean::dec(x_21); +lean::inc(x_22); +x_23 = l_Lean_Parser_symbolInfo(x_22, x_12); +x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_24, 0, x_22); +x_25 = l_Lean_Parser_sepBy1Info(x_18, x_23); +x_26 = lean::mk_string("}"); +x_27 = l_String_trim(x_26); +lean::dec(x_26); +lean::inc(x_27); +x_28 = l_Lean_Parser_symbolInfo(x_27, x_12); +x_29 = l_Lean_Parser_andthenInfo(x_25, x_28); +x_30 = l_Lean_Parser_andthenInfo(x_15, x_29); +x_31 = l_Lean_Parser_noFirstTokenInfo(x_30); +x_32 = l_Lean_Parser_andthenInfo(x_11, x_31); +x_33 = l_Lean_Parser_nodeInfo(x_32); +x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_id___elambda__1___boxed), 8, 5); +lean::closure_set(x_34, 0, x_9); +lean::closure_set(x_34, 1, x_14); +lean::closure_set(x_34, 2, x_20); +lean::closure_set(x_34, 3, x_24); +lean::closure_set(x_34, 4, x_27); +x_35 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_35, 0, x_33); +lean::cnstr_set(x_35, 1, x_34); +return x_35; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +obj* l_Lean_Parser_Term_id___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { _start: { -uint8 x_8; uint8 x_9; uint8 x_10; obj* x_11; -x_8 = lean::unbox(x_1); -lean::dec(x_1); -x_9 = lean::unbox(x_2); -lean::dec(x_2); -x_10 = lean::unbox(x_4); -lean::dec(x_4); -x_11 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3(x_8, x_9, x_3, x_10, x_5, x_6, x_7); +obj* x_9; +x_9 = l_Lean_Parser_Term_id___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean::dec(x_5); -return x_11; -} -} -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); lean::dec(x_2); -x_8 = l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_id___spec__2(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); -return x_8; -} -} -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_id___spec__1(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); -return x_8; +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_id___closed__1() { @@ -922,10 +988,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_type___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Term_type() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -943,16 +1026,24 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = l_Lean_Parser_nodeInfo(x_14); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_15); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_15 = l_Lean_Parser_nodeInfo(x_14); +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_type___elambda__1___boxed), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; +} +} +obj* l_Lean_Parser_Term_type___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_type___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_type___closed__1() { @@ -982,10 +1073,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_sort___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Term_sort() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1003,16 +1111,24 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = l_Lean_Parser_nodeInfo(x_14); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_15); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_15 = l_Lean_Parser_nodeInfo(x_14); +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_sort___elambda__1___boxed), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; +} +} +obj* l_Lean_Parser_Term_sort___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_sort___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_sort___closed__1() { @@ -1042,10 +1158,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_hole___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Term_hole() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1063,16 +1196,24 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = l_Lean_Parser_nodeInfo(x_14); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_15); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_15 = l_Lean_Parser_nodeInfo(x_14); +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_hole___elambda__1___boxed), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; +} +} +obj* l_Lean_Parser_Term_hole___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_hole___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_hole___closed__1() { @@ -1102,10 +1243,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_sorry___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Term_sorry() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1123,16 +1281,24 @@ x_12 = l_String_trim(x_8); lean::dec(x_8); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_11); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_nodeInfo(x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_14); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_14 = l_Lean_Parser_nodeInfo(x_13); +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_sorry___elambda__1___boxed), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; +} +} +obj* l_Lean_Parser_Term_sorry___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_sorry___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_sorry___closed__1() { @@ -1162,10 +1328,27 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_cdot___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_13; +} +} obj* _init_l_Lean_Parser_Term_cdot() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1183,16 +1366,24 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = l_Lean_Parser_nodeInfo(x_14); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_15); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_15 = l_Lean_Parser_nodeInfo(x_14); +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_cdot___elambda__1___boxed), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; +} +} +obj* l_Lean_Parser_Term_cdot___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_cdot___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_cdot___closed__1() { @@ -1222,10 +1413,46 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_typeAscription___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Term_typeAscription() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1241,31 +1468,33 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_typeAscription___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3(uint8 x_1, uint8 x_2, obj* x_3, uint8 x_4, obj* x_5, obj* x_6, obj* x_7) { +obj* l_Lean_Parser_Term_typeAscription___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_typeAscription___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_tupleTail___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { _start: { obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; @@ -1273,108 +1502,40 @@ x_8 = lean::cnstr_get(x_7, 0); lean::inc(x_8); x_9 = lean::array_get_size(x_8); lean::dec(x_8); -x_10 = lean::cnstr_get(x_7, 1); -lean::inc(x_10); -x_11 = l_Lean_Parser_termParserFn___rarg___closed__1; -x_12 = l_Lean_Parser_builtinTermParsingTable; -x_13 = lean::mk_nat_obj(0u); +x_10 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_11 = lean::string_append(x_10, x_2); +x_12 = l_Char_HasRepr___closed__1; +x_13 = lean::string_append(x_11, x_12); lean::inc(x_6); -x_14 = l_Lean_Parser_runBuiltinParserUnsafe(x_11, x_12, x_13, x_6, x_7); +x_14 = l_Lean_Parser_symbolFnAux(x_2, x_13, x_6, x_7); x_15 = lean::cnstr_get(x_14, 3); lean::inc(x_15); if (lean::obj_tag(x_15) == 0) { -obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; -lean::dec(x_10); -lean::dec(x_9); -x_16 = lean::cnstr_get(x_14, 0); -lean::inc(x_16); -x_17 = lean::array_get_size(x_16); -lean::dec(x_16); -x_18 = lean::cnstr_get(x_14, 1); -lean::inc(x_18); -x_19 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1; -x_20 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2; -lean::inc(x_6); -x_21 = l_Lean_Parser_symbolFnAux(x_19, x_20, x_6, x_14); -x_22 = lean::cnstr_get(x_21, 3); -lean::inc(x_22); -if (lean::obj_tag(x_22) == 0) -{ -lean::dec(x_18); -lean::dec(x_17); -{ -uint8 _tmp_3 = x_2; -obj* _tmp_6 = x_21; -x_4 = _tmp_3; -x_7 = _tmp_6; -} -goto _start; -} -else -{ -obj* x_24; obj* x_25; obj* x_26; -lean::dec(x_22); -lean::dec(x_6); -x_24 = l_Lean_Parser_ParserState_restore(x_21, x_17, x_18); -lean::dec(x_17); -x_25 = l_Lean_nullKind; -x_26 = l_Lean_Parser_ParserState_mkNode(x_24, x_25, x_3); -return x_26; -} +uint8 x_16; uint8 x_17; obj* x_18; obj* x_19; +x_16 = 0; +x_17 = 0; +x_18 = l_Lean_Parser_sepBy1Fn___main(x_16, x_17, x_4, x_3, x_5, x_6, x_14); +x_19 = l_Lean_Parser_ParserState_mkNode(x_18, x_1, x_9); +return x_19; } else { +obj* x_20; lean::dec(x_15); lean::dec(x_6); -if (x_4 == 0) -{ -obj* x_27; obj* x_28; obj* x_29; obj* x_30; -lean::dec(x_10); -lean::dec(x_9); -x_27 = lean::box(0); -x_28 = l_Lean_Parser_ParserState_pushSyntax(x_14, x_27); -x_29 = l_Lean_nullKind; -x_30 = l_Lean_Parser_ParserState_mkNode(x_28, x_29, x_3); -return x_30; +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_20 = l_Lean_Parser_ParserState_mkNode(x_14, x_1, x_9); +return x_20; } -else -{ -obj* x_31; obj* x_32; obj* x_33; -x_31 = l_Lean_Parser_ParserState_restore(x_14, x_9, x_10); -lean::dec(x_9); -x_32 = l_Lean_nullKind; -x_33 = l_Lean_Parser_ParserState_mkNode(x_31, x_32, x_3); -return x_33; -} -} -} -} -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; obj* x_7; uint8 x_8; obj* x_9; -x_6 = lean::cnstr_get(x_5, 0); -lean::inc(x_6); -x_7 = lean::array_get_size(x_6); -lean::dec(x_6); -x_8 = 0; -x_9 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3(x_1, x_2, x_7, x_8, x_3, x_4, x_5); -return x_9; -} -} -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; -x_6 = l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2(x_1, x_2, x_3, x_4, x_5); -return x_6; } } obj* _init_l_Lean_Parser_Term_tupleTail() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; uint8 x_19; uint8 x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1390,6 +1551,7 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); +lean::inc(x_12); x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); lean::closure_set(x_14, 0, x_12); x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); @@ -1397,67 +1559,30 @@ x_16 = lean::box(1); x_17 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_17, 0, x_15); lean::cnstr_set(x_17, 1, x_16); +x_18 = lean::mk_nat_obj(0u); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_19, 0, x_18); lean::inc(x_13); -x_18 = l_Lean_Parser_sepBy1Info(x_17, x_13); -x_19 = 0; -x_20 = 0; -x_21 = lean::box(x_19); -x_22 = lean::box(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed), 5, 2); -lean::closure_set(x_23, 0, x_21); -lean::closure_set(x_23, 1, x_22); -x_24 = l_Lean_Parser_andthenInfo(x_13, x_18); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_14); -lean::closure_set(x_25, 1, x_23); -x_26 = l_Lean_Parser_nodeInfo(x_24); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_9); -lean::closure_set(x_27, 1, x_25); -x_28 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_28, 0, x_26); -lean::cnstr_set(x_28, 1, x_27); -return x_28; +x_20 = l_Lean_Parser_sepBy1Info(x_17, x_13); +x_21 = l_Lean_Parser_andthenInfo(x_13, x_20); +x_22 = l_Lean_Parser_nodeInfo(x_21); +x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_tupleTail___elambda__1___boxed), 7, 4); +lean::closure_set(x_23, 0, x_9); +lean::closure_set(x_23, 1, x_12); +lean::closure_set(x_23, 2, x_14); +lean::closure_set(x_23, 3, x_19); +x_24 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_24, 0, x_22); +lean::cnstr_set(x_24, 1, x_23); +return x_24; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +obj* l_Lean_Parser_Term_tupleTail___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { _start: { -uint8 x_8; uint8 x_9; uint8 x_10; obj* x_11; -x_8 = lean::unbox(x_1); -lean::dec(x_1); -x_9 = lean::unbox(x_2); +obj* x_8; +x_8 = l_Lean_Parser_Term_tupleTail___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean::dec(x_2); -x_10 = lean::unbox(x_4); -lean::dec(x_4); -x_11 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_tupleTail___spec__3(x_8, x_9, x_3, x_10, x_5, x_6, x_7); -lean::dec(x_5); -return x_11; -} -} -obj* l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepBy1Fn___main___at_Lean_Parser_Term_tupleTail___spec__2(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); -return x_8; -} -} -obj* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); return x_8; } } @@ -1488,10 +1613,164 @@ lean::cnstr_set(x_11, 1, x_10); return x_11; } } +obj* l_Lean_Parser_Term_paren___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; +x_8 = lean::cnstr_get(x_7, 0); +lean::inc(x_8); +x_9 = lean::array_get_size(x_8); +lean::dec(x_8); +x_10 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_11 = lean::string_append(x_10, x_2); +x_12 = l_Char_HasRepr___closed__1; +x_13 = lean::string_append(x_11, x_12); +lean::inc(x_6); +x_14 = l_Lean_Parser_symbolFnAux(x_2, x_13, x_6, x_7); +x_15 = lean::cnstr_get(x_14, 3); +lean::inc(x_15); +if (lean::obj_tag(x_15) == 0) +{ +obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; +x_16 = lean::cnstr_get(x_14, 0); +lean::inc(x_16); +x_17 = lean::array_get_size(x_16); +lean::dec(x_16); +x_18 = lean::cnstr_get(x_14, 1); +lean::inc(x_18); +x_49 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_50 = l_Lean_Parser_builtinTermParsingTable; +x_51 = lean::mk_nat_obj(0u); +lean::inc(x_6); +x_52 = l_Lean_Parser_runBuiltinParserUnsafe(x_49, x_50, x_51, x_6, x_14); +x_53 = lean::cnstr_get(x_52, 3); +lean::inc(x_53); +if (lean::obj_tag(x_53) == 0) +{ +obj* x_54; +lean::inc(x_6); +x_54 = lean::apply_3(x_3, x_5, x_6, x_52); +x_19 = x_54; +goto block_48; +} +else +{ +lean::dec(x_53); +lean::dec(x_5); +lean::dec(x_3); +x_19 = x_52; +goto block_48; +} +block_48: +{ +obj* x_20; +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; +lean::dec(x_18); +x_21 = l_Lean_nullKind; +x_22 = l_Lean_Parser_ParserState_mkNode(x_19, x_21, x_17); +x_23 = lean::cnstr_get(x_22, 3); +lean::inc(x_23); +if (lean::obj_tag(x_23) == 0) +{ +obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_24 = lean::string_append(x_10, x_4); +x_25 = lean::string_append(x_24, x_12); +x_26 = l_Lean_Parser_symbolFnAux(x_4, x_25, x_6, x_22); +x_27 = l_Lean_Parser_ParserState_mkNode(x_26, x_1, x_9); +return x_27; +} +else +{ +obj* x_28; +lean::dec(x_23); +lean::dec(x_6); +x_28 = l_Lean_Parser_ParserState_mkNode(x_22, x_1, x_9); +return x_28; +} +} +else +{ +obj* x_29; uint8 x_30; +lean::dec(x_20); +x_29 = lean::cnstr_get(x_19, 1); +lean::inc(x_29); +x_30 = lean::nat_dec_eq(x_29, x_18); +lean::dec(x_29); +if (x_30 == 0) +{ +obj* x_31; obj* x_32; obj* x_33; +lean::dec(x_18); +x_31 = l_Lean_nullKind; +x_32 = l_Lean_Parser_ParserState_mkNode(x_19, x_31, x_17); +x_33 = lean::cnstr_get(x_32, 3); +lean::inc(x_33); +if (lean::obj_tag(x_33) == 0) +{ +obj* x_34; obj* x_35; obj* x_36; obj* x_37; +x_34 = lean::string_append(x_10, x_4); +x_35 = lean::string_append(x_34, x_12); +x_36 = l_Lean_Parser_symbolFnAux(x_4, x_35, x_6, x_32); +x_37 = l_Lean_Parser_ParserState_mkNode(x_36, x_1, x_9); +return x_37; +} +else +{ +obj* x_38; +lean::dec(x_33); +lean::dec(x_6); +x_38 = l_Lean_Parser_ParserState_mkNode(x_32, x_1, x_9); +return x_38; +} +} +else +{ +obj* x_39; obj* x_40; obj* x_41; obj* x_42; +x_39 = l_Lean_Parser_ParserState_restore(x_19, x_17, x_18); +x_40 = l_Lean_nullKind; +x_41 = l_Lean_Parser_ParserState_mkNode(x_39, x_40, x_17); +x_42 = lean::cnstr_get(x_41, 3); +lean::inc(x_42); +if (lean::obj_tag(x_42) == 0) +{ +obj* x_43; obj* x_44; obj* x_45; obj* x_46; +x_43 = lean::string_append(x_10, x_4); +x_44 = lean::string_append(x_43, x_12); +x_45 = l_Lean_Parser_symbolFnAux(x_4, x_44, x_6, x_41); +x_46 = l_Lean_Parser_ParserState_mkNode(x_45, x_1, x_9); +return x_46; +} +else +{ +obj* x_47; +lean::dec(x_42); +lean::dec(x_6); +x_47 = l_Lean_Parser_ParserState_mkNode(x_41, x_1, x_9); +return x_47; +} +} +} +} +} +else +{ +obj* x_55; +lean::dec(x_15); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_3); +x_55 = l_Lean_Parser_ParserState_mkNode(x_14, x_1, x_9); +return x_55; +} +} +} obj* _init_l_Lean_Parser_Term_paren() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1509,52 +1788,46 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_17 = lean::box(1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -x_19 = lean::mk_nat_obj(0u); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_20, 0, x_19); -x_21 = l_Lean_Parser_Term_parenSpecial; -x_22 = lean::cnstr_get(x_21, 0); -lean::inc(x_22); -x_23 = l_Lean_Parser_andthenInfo(x_18, x_22); -x_24 = lean::cnstr_get(x_21, 1); -lean::inc(x_24); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_20); -lean::closure_set(x_25, 1, x_24); -x_26 = l_Lean_Parser_noFirstTokenInfo(x_23); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_27, 0, x_25); -x_28 = lean::box(0); -x_29 = lean::mk_string(")"); -x_30 = l_String_trim(x_29); -lean::dec(x_29); -lean::inc(x_30); -x_31 = l_Lean_Parser_symbolInfo(x_30, x_28); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_32, 0, x_30); -x_33 = l_Lean_Parser_andthenInfo(x_26, x_31); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_34, 0, x_27); -lean::closure_set(x_34, 1, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_14, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_15); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_nodeInfo(x_35); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_9); -lean::closure_set(x_38, 1, x_36); -x_39 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_39, 0, x_37); -lean::cnstr_set(x_39, 1, x_38); -return x_39; +x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_16 = lean::box(1); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +x_18 = l_Lean_Parser_Term_parenSpecial; +x_19 = lean::cnstr_get(x_18, 0); +lean::inc(x_19); +x_20 = l_Lean_Parser_andthenInfo(x_17, x_19); +x_21 = lean::cnstr_get(x_18, 1); +lean::inc(x_21); +x_22 = l_Lean_Parser_noFirstTokenInfo(x_20); +x_23 = lean::box(0); +x_24 = lean::mk_string(")"); +x_25 = l_String_trim(x_24); +lean::dec(x_24); +lean::inc(x_25); +x_26 = l_Lean_Parser_symbolInfo(x_25, x_23); +x_27 = l_Lean_Parser_andthenInfo(x_22, x_26); +x_28 = l_Lean_Parser_andthenInfo(x_14, x_27); +x_29 = l_Lean_Parser_nodeInfo(x_28); +x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_paren___elambda__1___boxed), 7, 4); +lean::closure_set(x_30, 0, x_9); +lean::closure_set(x_30, 1, x_13); +lean::closure_set(x_30, 2, x_21); +lean::closure_set(x_30, 3, x_25); +x_31 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_31, 0, x_29); +lean::cnstr_set(x_31, 1, x_30); +return x_31; +} +} +obj* l_Lean_Parser_Term_paren___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; +x_8 = l_Lean_Parser_Term_paren___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean::dec(x_4); +lean::dec(x_2); +return x_8; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_paren___closed__1() { @@ -1584,10 +1857,66 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_anonymousCtor___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Char_HasRepr___closed__1; +x_14 = lean::string_append(x_12, x_13); +lean::inc(x_7); +x_15 = l_Lean_Parser_symbolFnAux(x_2, x_14, x_7, x_8); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +uint8 x_17; uint8 x_18; obj* x_19; obj* x_20; +x_17 = 0; +x_18 = 0; +lean::inc(x_7); +x_19 = l_Lean_Parser_sepBy1Fn___main(x_17, x_18, x_3, x_4, x_6, x_7, x_15); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; obj* x_24; +x_21 = lean::string_append(x_11, x_5); +x_22 = lean::string_append(x_21, x_13); +x_23 = l_Lean_Parser_symbolFnAux(x_5, x_22, x_7, x_19); +x_24 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_10); +return x_24; +} +else +{ +obj* x_25; +lean::dec(x_20); +lean::dec(x_7); +x_25 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_10); +return x_25; +} +} +else +{ +obj* x_26; +lean::dec(x_16); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +lean::dec(x_3); +x_26 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_10); +return x_26; +} +} +} obj* _init_l_Lean_Parser_Term_anonymousCtor() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; uint8 x_24; uint8 x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1605,49 +1934,51 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_17 = lean::box(1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -x_19 = lean::box(0); -x_20 = lean::mk_string(", "); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_19); -x_23 = l_Lean_Parser_sepBy1Info(x_18, x_22); -x_24 = 0; -x_25 = 0; -x_26 = lean::box(x_24); -x_27 = lean::box(x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed), 5, 2); -lean::closure_set(x_28, 0, x_26); -lean::closure_set(x_28, 1, x_27); -x_29 = lean::mk_string("⟩"); -x_30 = l_String_trim(x_29); -lean::dec(x_29); -lean::inc(x_30); -x_31 = l_Lean_Parser_symbolInfo(x_30, x_19); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_32, 0, x_30); -x_33 = l_Lean_Parser_andthenInfo(x_23, x_31); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_34, 0, x_28); -lean::closure_set(x_34, 1, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_14, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_15); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_nodeInfo(x_35); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_9); -lean::closure_set(x_38, 1, x_36); -x_39 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_39, 0, x_37); -lean::cnstr_set(x_39, 1, x_38); -return x_39; +x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_16 = lean::box(1); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +x_18 = lean::mk_nat_obj(0u); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_19, 0, x_18); +x_20 = lean::box(0); +x_21 = lean::mk_string(", "); +x_22 = l_String_trim(x_21); +lean::dec(x_21); +lean::inc(x_22); +x_23 = l_Lean_Parser_symbolInfo(x_22, x_20); +x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_24, 0, x_22); +x_25 = l_Lean_Parser_sepBy1Info(x_17, x_23); +x_26 = lean::mk_string("⟩"); +x_27 = l_String_trim(x_26); +lean::dec(x_26); +lean::inc(x_27); +x_28 = l_Lean_Parser_symbolInfo(x_27, x_20); +x_29 = l_Lean_Parser_andthenInfo(x_25, x_28); +x_30 = l_Lean_Parser_andthenInfo(x_14, x_29); +x_31 = l_Lean_Parser_nodeInfo(x_30); +x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_anonymousCtor___elambda__1___boxed), 8, 5); +lean::closure_set(x_32, 0, x_9); +lean::closure_set(x_32, 1, x_13); +lean::closure_set(x_32, 2, x_19); +lean::closure_set(x_32, 3, x_24); +lean::closure_set(x_32, 4, x_27); +x_33 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_33, 0, x_31); +lean::cnstr_set(x_33, 1, x_32); +return x_33; +} +} +obj* l_Lean_Parser_Term_anonymousCtor___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_anonymousCtor___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_5); +lean::dec(x_2); +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_anonymousCtor___closed__1() { @@ -1710,10 +2041,323 @@ lean::cnstr_set(x_16, 1, x_15); return x_16; } } +obj* l_Lean_Parser_Term_if___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_38 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_39 = lean::string_append(x_38, x_2); +x_40 = l_Char_HasRepr___closed__1; +x_41 = lean::string_append(x_39, x_40); +lean::inc(x_7); +x_42 = l_Lean_Parser_symbolFnAux(x_2, x_41, x_7, x_8); +x_43 = lean::cnstr_get(x_42, 3); +lean::inc(x_43); +if (lean::obj_tag(x_43) == 0) +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; +x_44 = lean::cnstr_get(x_42, 0); +lean::inc(x_44); +x_45 = lean::cnstr_get(x_42, 1); +lean::inc(x_45); +x_46 = lean::array_get_size(x_44); +lean::dec(x_44); +lean::inc(x_7); +x_47 = l_Lean_Parser_identFn___rarg(x_7, x_42); +x_48 = lean::cnstr_get(x_47, 3); +lean::inc(x_48); +if (lean::obj_tag(x_48) == 0) +{ +obj* x_49; obj* x_50; obj* x_51; obj* x_52; +x_49 = lean::string_append(x_38, x_5); +x_50 = lean::string_append(x_49, x_40); +lean::inc(x_7); +x_51 = l_Lean_Parser_symbolFnAux(x_5, x_50, x_7, x_47); +x_52 = lean::cnstr_get(x_51, 3); +lean::inc(x_52); +if (lean::obj_tag(x_52) == 0) +{ +obj* x_53; obj* x_54; +lean::dec(x_45); +x_53 = l_Lean_nullKind; +x_54 = l_Lean_Parser_ParserState_mkNode(x_51, x_53, x_46); +x_11 = x_54; +goto block_37; +} +else +{ +uint8 x_55; +x_55 = !lean::is_exclusive(x_51); +if (x_55 == 0) +{ +obj* x_56; obj* x_57; obj* x_58; obj* x_59; uint8 x_60; +x_56 = lean::cnstr_get(x_51, 0); +x_57 = lean::cnstr_get(x_51, 3); +lean::dec(x_57); +x_58 = lean::cnstr_get(x_51, 1); +lean::dec(x_58); +x_59 = l_Array_shrink___main___rarg(x_56, x_46); +lean::inc(x_45); +lean::cnstr_set(x_51, 1, x_45); +lean::cnstr_set(x_51, 0, x_59); +x_60 = lean::nat_dec_eq(x_45, x_45); +if (x_60 == 0) +{ +obj* x_61; obj* x_62; +lean::dec(x_45); +x_61 = l_Lean_nullKind; +x_62 = l_Lean_Parser_ParserState_mkNode(x_51, x_61, x_46); +x_11 = x_62; +goto block_37; +} +else +{ +obj* x_63; obj* x_64; obj* x_65; +x_63 = l_Lean_Parser_ParserState_restore(x_51, x_46, x_45); +x_64 = l_Lean_nullKind; +x_65 = l_Lean_Parser_ParserState_mkNode(x_63, x_64, x_46); +x_11 = x_65; +goto block_37; +} +} +else +{ +obj* x_66; obj* x_67; obj* x_68; obj* x_69; uint8 x_70; +x_66 = lean::cnstr_get(x_51, 0); +x_67 = lean::cnstr_get(x_51, 2); +lean::inc(x_67); +lean::inc(x_66); +lean::dec(x_51); +x_68 = l_Array_shrink___main___rarg(x_66, x_46); +lean::inc(x_45); +x_69 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_69, 0, x_68); +lean::cnstr_set(x_69, 1, x_45); +lean::cnstr_set(x_69, 2, x_67); +lean::cnstr_set(x_69, 3, x_52); +x_70 = lean::nat_dec_eq(x_45, x_45); +if (x_70 == 0) +{ +obj* x_71; obj* x_72; +lean::dec(x_45); +x_71 = l_Lean_nullKind; +x_72 = l_Lean_Parser_ParserState_mkNode(x_69, x_71, x_46); +x_11 = x_72; +goto block_37; +} +else +{ +obj* x_73; obj* x_74; obj* x_75; +x_73 = l_Lean_Parser_ParserState_restore(x_69, x_46, x_45); +x_74 = l_Lean_nullKind; +x_75 = l_Lean_Parser_ParserState_mkNode(x_73, x_74, x_46); +x_11 = x_75; +goto block_37; +} +} +} +} +else +{ +obj* x_76; +lean::dec(x_48); +x_76 = lean::cnstr_get(x_47, 3); +lean::inc(x_76); +if (lean::obj_tag(x_76) == 0) +{ +obj* x_77; obj* x_78; +lean::dec(x_45); +x_77 = l_Lean_nullKind; +x_78 = l_Lean_Parser_ParserState_mkNode(x_47, x_77, x_46); +x_11 = x_78; +goto block_37; +} +else +{ +uint8 x_79; +x_79 = !lean::is_exclusive(x_47); +if (x_79 == 0) +{ +obj* x_80; obj* x_81; obj* x_82; obj* x_83; uint8 x_84; +x_80 = lean::cnstr_get(x_47, 0); +x_81 = lean::cnstr_get(x_47, 3); +lean::dec(x_81); +x_82 = lean::cnstr_get(x_47, 1); +lean::dec(x_82); +x_83 = l_Array_shrink___main___rarg(x_80, x_46); +lean::inc(x_45); +lean::cnstr_set(x_47, 1, x_45); +lean::cnstr_set(x_47, 0, x_83); +x_84 = lean::nat_dec_eq(x_45, x_45); +if (x_84 == 0) +{ +obj* x_85; obj* x_86; +lean::dec(x_45); +x_85 = l_Lean_nullKind; +x_86 = l_Lean_Parser_ParserState_mkNode(x_47, x_85, x_46); +x_11 = x_86; +goto block_37; +} +else +{ +obj* x_87; obj* x_88; obj* x_89; +x_87 = l_Lean_Parser_ParserState_restore(x_47, x_46, x_45); +x_88 = l_Lean_nullKind; +x_89 = l_Lean_Parser_ParserState_mkNode(x_87, x_88, x_46); +x_11 = x_89; +goto block_37; +} +} +else +{ +obj* x_90; obj* x_91; obj* x_92; obj* x_93; uint8 x_94; +x_90 = lean::cnstr_get(x_47, 0); +x_91 = lean::cnstr_get(x_47, 2); +lean::inc(x_91); +lean::inc(x_90); +lean::dec(x_47); +x_92 = l_Array_shrink___main___rarg(x_90, x_46); +lean::inc(x_45); +x_93 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_93, 0, x_92); +lean::cnstr_set(x_93, 1, x_45); +lean::cnstr_set(x_93, 2, x_91); +lean::cnstr_set(x_93, 3, x_76); +x_94 = lean::nat_dec_eq(x_45, x_45); +if (x_94 == 0) +{ +obj* x_95; obj* x_96; +lean::dec(x_45); +x_95 = l_Lean_nullKind; +x_96 = l_Lean_Parser_ParserState_mkNode(x_93, x_95, x_46); +x_11 = x_96; +goto block_37; +} +else +{ +obj* x_97; obj* x_98; obj* x_99; +x_97 = l_Lean_Parser_ParserState_restore(x_93, x_46, x_45); +x_98 = l_Lean_nullKind; +x_99 = l_Lean_Parser_ParserState_mkNode(x_97, x_98, x_46); +x_11 = x_99; +goto block_37; +} +} +} +} +} +else +{ +obj* x_100; +lean::dec(x_43); +lean::dec(x_7); +x_100 = l_Lean_Parser_ParserState_mkNode(x_42, x_1, x_10); +return x_100; +} +block_37: +{ +obj* x_12; +x_12 = lean::cnstr_get(x_11, 3); +lean::inc(x_12); +if (lean::obj_tag(x_12) == 0) +{ +obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +x_13 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_14 = l_Lean_Parser_builtinTermParsingTable; +x_15 = lean::mk_nat_obj(0u); +lean::inc(x_7); +x_16 = l_Lean_Parser_runBuiltinParserUnsafe(x_13, x_14, x_15, x_7, x_11); +x_17 = lean::cnstr_get(x_16, 3); +lean::inc(x_17); +if (lean::obj_tag(x_17) == 0) +{ +obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; +x_18 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_19 = lean::string_append(x_18, x_3); +x_20 = l_Char_HasRepr___closed__1; +x_21 = lean::string_append(x_19, x_20); +lean::inc(x_7); +x_22 = l_Lean_Parser_symbolFnAux(x_3, x_21, x_7, x_16); +x_23 = lean::cnstr_get(x_22, 3); +lean::inc(x_23); +if (lean::obj_tag(x_23) == 0) +{ +obj* x_24; obj* x_25; +lean::inc(x_7); +x_24 = l_Lean_Parser_runBuiltinParserUnsafe(x_13, x_14, x_15, x_7, x_22); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +obj* x_26; obj* x_27; obj* x_28; obj* x_29; +x_26 = lean::string_append(x_18, x_4); +x_27 = lean::string_append(x_26, x_20); +lean::inc(x_7); +x_28 = l_Lean_Parser_symbolFnAux(x_4, x_27, x_7, x_24); +x_29 = lean::cnstr_get(x_28, 3); +lean::inc(x_29); +if (lean::obj_tag(x_29) == 0) +{ +obj* x_30; obj* x_31; +x_30 = l_Lean_Parser_runBuiltinParserUnsafe(x_13, x_14, x_15, x_7, x_28); +x_31 = l_Lean_Parser_ParserState_mkNode(x_30, x_1, x_10); +return x_31; +} +else +{ +obj* x_32; +lean::dec(x_29); +lean::dec(x_7); +x_32 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_10); +return x_32; +} +} +else +{ +obj* x_33; +lean::dec(x_25); +lean::dec(x_7); +x_33 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_10); +return x_33; +} +} +else +{ +obj* x_34; +lean::dec(x_23); +lean::dec(x_7); +x_34 = l_Lean_Parser_ParserState_mkNode(x_22, x_1, x_10); +return x_34; +} +} +else +{ +obj* x_35; +lean::dec(x_17); +lean::dec(x_7); +x_35 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_10); +return x_35; +} +} +else +{ +obj* x_36; +lean::dec(x_12); +lean::dec(x_7); +x_36 = l_Lean_Parser_ParserState_mkNode(x_11, x_1, x_10); +return x_36; +} +} +} +} obj* _init_l_Lean_Parser_Term_if() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; uint8 x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1729,88 +2373,62 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string(" then "); +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = lean::mk_string(" then "); +x_18 = l_String_trim(x_17); +lean::dec(x_17); +lean::inc(x_18); +x_19 = l_Lean_Parser_symbolInfo(x_18, x_10); +x_20 = lean::mk_string(" else "); x_21 = l_String_trim(x_20); lean::dec(x_20); lean::inc(x_21); x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_23, 0, x_21); -x_24 = lean::mk_string(" else "); -x_25 = l_String_trim(x_24); -lean::dec(x_24); -lean::inc(x_25); -x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_27, 0, x_25); -lean::inc(x_17); -x_28 = l_Lean_Parser_andthenInfo(x_26, x_17); -lean::inc(x_19); -x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_29, 0, x_27); -lean::closure_set(x_29, 1, x_19); -lean::inc(x_17); -x_30 = l_Lean_Parser_andthenInfo(x_17, x_28); -lean::inc(x_19); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_31, 0, x_19); -lean::closure_set(x_31, 1, x_29); -x_32 = l_Lean_Parser_andthenInfo(x_22, x_30); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_33, 0, x_23); -lean::closure_set(x_33, 1, x_31); -x_34 = l_Lean_Parser_andthenInfo(x_17, x_32); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_19); -lean::closure_set(x_35, 1, x_33); -x_36 = lean::mk_string("ident"); -x_37 = l_Lean_Parser_mkAtomicInfo(x_36); -x_38 = 0; -x_39 = lean::box(x_38); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_40, 0, x_39); -x_41 = lean::mk_string(" : "); -x_42 = l_String_trim(x_41); -lean::dec(x_41); -lean::inc(x_42); -x_43 = l_Lean_Parser_symbolInfo(x_42, x_10); -x_44 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_44, 0, x_42); -x_45 = l_Lean_Parser_andthenInfo(x_37, x_43); -x_46 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_46, 0, x_40); -lean::closure_set(x_46, 1, x_44); -x_47 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_47, 0, x_46); -x_48 = l_Lean_Parser_noFirstTokenInfo(x_45); -x_49 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_49, 0, x_47); -x_50 = l_Lean_Parser_andthenInfo(x_48, x_34); -x_51 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_51, 0, x_49); -lean::closure_set(x_51, 1, x_35); -x_52 = l_Lean_Parser_andthenInfo(x_13, x_50); -x_53 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_53, 0, x_14); -lean::closure_set(x_53, 1, x_51); -x_54 = l_Lean_Parser_nodeInfo(x_52); -x_55 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_55, 0, x_9); -lean::closure_set(x_55, 1, x_53); -x_56 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_56, 0, x_54); -lean::cnstr_set(x_56, 1, x_55); -return x_56; +lean::inc(x_16); +x_23 = l_Lean_Parser_andthenInfo(x_22, x_16); +lean::inc(x_16); +x_24 = l_Lean_Parser_andthenInfo(x_16, x_23); +x_25 = l_Lean_Parser_andthenInfo(x_19, x_24); +x_26 = l_Lean_Parser_andthenInfo(x_16, x_25); +x_27 = lean::mk_string("ident"); +x_28 = l_Lean_Parser_mkAtomicInfo(x_27); +x_29 = lean::mk_string(" : "); +x_30 = l_String_trim(x_29); +lean::dec(x_29); +lean::inc(x_30); +x_31 = l_Lean_Parser_symbolInfo(x_30, x_10); +x_32 = l_Lean_Parser_andthenInfo(x_28, x_31); +x_33 = l_Lean_Parser_noFirstTokenInfo(x_32); +x_34 = l_Lean_Parser_andthenInfo(x_33, x_26); +x_35 = l_Lean_Parser_andthenInfo(x_13, x_34); +x_36 = l_Lean_Parser_nodeInfo(x_35); +x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_if___elambda__1___boxed), 8, 5); +lean::closure_set(x_37, 0, x_9); +lean::closure_set(x_37, 1, x_12); +lean::closure_set(x_37, 2, x_18); +lean::closure_set(x_37, 3, x_21); +lean::closure_set(x_37, 4, x_30); +x_38 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_38, 0, x_36); +lean::cnstr_set(x_38, 1, x_37); +return x_38; +} +} +obj* l_Lean_Parser_Term_if___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_if___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_if___closed__1() { @@ -1840,10 +2458,46 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_fromTerm___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Term_fromTerm() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1859,34 +2513,72 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_fromTerm___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_fromTerm___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_fromTerm___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_haveAssign___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} } } obj* _init_l_Lean_Parser_Term_haveAssign() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1902,34 +2594,408 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_haveAssign___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_haveAssign___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_haveAssign___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_have___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { +_start: +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; +x_10 = lean::cnstr_get(x_9, 0); +lean::inc(x_10); +x_11 = lean::array_get_size(x_10); +lean::dec(x_10); +x_52 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_53 = lean::string_append(x_52, x_2); +x_54 = l_Char_HasRepr___closed__1; +x_55 = lean::string_append(x_53, x_54); +lean::inc(x_8); +x_56 = l_Lean_Parser_symbolFnAux(x_2, x_55, x_8, x_9); +x_57 = lean::cnstr_get(x_56, 3); +lean::inc(x_57); +if (lean::obj_tag(x_57) == 0) +{ +obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; +x_58 = lean::cnstr_get(x_56, 0); +lean::inc(x_58); +x_59 = lean::cnstr_get(x_56, 1); +lean::inc(x_59); +x_60 = lean::array_get_size(x_58); +lean::dec(x_58); +lean::inc(x_8); +x_61 = l_Lean_Parser_identFn___rarg(x_8, x_56); +x_62 = lean::cnstr_get(x_61, 3); +lean::inc(x_62); +if (lean::obj_tag(x_62) == 0) +{ +obj* x_63; obj* x_64; obj* x_65; obj* x_66; +x_63 = lean::string_append(x_52, x_6); +x_64 = lean::string_append(x_63, x_54); +lean::inc(x_8); +x_65 = l_Lean_Parser_symbolFnAux(x_6, x_64, x_8, x_61); +x_66 = lean::cnstr_get(x_65, 3); +lean::inc(x_66); +if (lean::obj_tag(x_66) == 0) +{ +obj* x_67; obj* x_68; +lean::dec(x_59); +x_67 = l_Lean_nullKind; +x_68 = l_Lean_Parser_ParserState_mkNode(x_65, x_67, x_60); +x_12 = x_68; +goto block_51; +} +else +{ +uint8 x_69; +x_69 = !lean::is_exclusive(x_65); +if (x_69 == 0) +{ +obj* x_70; obj* x_71; obj* x_72; obj* x_73; uint8 x_74; +x_70 = lean::cnstr_get(x_65, 0); +x_71 = lean::cnstr_get(x_65, 3); +lean::dec(x_71); +x_72 = lean::cnstr_get(x_65, 1); +lean::dec(x_72); +x_73 = l_Array_shrink___main___rarg(x_70, x_60); +lean::inc(x_59); +lean::cnstr_set(x_65, 1, x_59); +lean::cnstr_set(x_65, 0, x_73); +x_74 = lean::nat_dec_eq(x_59, x_59); +if (x_74 == 0) +{ +obj* x_75; obj* x_76; +lean::dec(x_59); +x_75 = l_Lean_nullKind; +x_76 = l_Lean_Parser_ParserState_mkNode(x_65, x_75, x_60); +x_12 = x_76; +goto block_51; +} +else +{ +obj* x_77; obj* x_78; obj* x_79; +x_77 = l_Lean_Parser_ParserState_restore(x_65, x_60, x_59); +x_78 = l_Lean_nullKind; +x_79 = l_Lean_Parser_ParserState_mkNode(x_77, x_78, x_60); +x_12 = x_79; +goto block_51; +} +} +else +{ +obj* x_80; obj* x_81; obj* x_82; obj* x_83; uint8 x_84; +x_80 = lean::cnstr_get(x_65, 0); +x_81 = lean::cnstr_get(x_65, 2); +lean::inc(x_81); +lean::inc(x_80); +lean::dec(x_65); +x_82 = l_Array_shrink___main___rarg(x_80, x_60); +lean::inc(x_59); +x_83 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_83, 0, x_82); +lean::cnstr_set(x_83, 1, x_59); +lean::cnstr_set(x_83, 2, x_81); +lean::cnstr_set(x_83, 3, x_66); +x_84 = lean::nat_dec_eq(x_59, x_59); +if (x_84 == 0) +{ +obj* x_85; obj* x_86; +lean::dec(x_59); +x_85 = l_Lean_nullKind; +x_86 = l_Lean_Parser_ParserState_mkNode(x_83, x_85, x_60); +x_12 = x_86; +goto block_51; +} +else +{ +obj* x_87; obj* x_88; obj* x_89; +x_87 = l_Lean_Parser_ParserState_restore(x_83, x_60, x_59); +x_88 = l_Lean_nullKind; +x_89 = l_Lean_Parser_ParserState_mkNode(x_87, x_88, x_60); +x_12 = x_89; +goto block_51; +} +} +} +} +else +{ +obj* x_90; +lean::dec(x_62); +x_90 = lean::cnstr_get(x_61, 3); +lean::inc(x_90); +if (lean::obj_tag(x_90) == 0) +{ +obj* x_91; obj* x_92; +lean::dec(x_59); +x_91 = l_Lean_nullKind; +x_92 = l_Lean_Parser_ParserState_mkNode(x_61, x_91, x_60); +x_12 = x_92; +goto block_51; +} +else +{ +uint8 x_93; +x_93 = !lean::is_exclusive(x_61); +if (x_93 == 0) +{ +obj* x_94; obj* x_95; obj* x_96; obj* x_97; uint8 x_98; +x_94 = lean::cnstr_get(x_61, 0); +x_95 = lean::cnstr_get(x_61, 3); +lean::dec(x_95); +x_96 = lean::cnstr_get(x_61, 1); +lean::dec(x_96); +x_97 = l_Array_shrink___main___rarg(x_94, x_60); +lean::inc(x_59); +lean::cnstr_set(x_61, 1, x_59); +lean::cnstr_set(x_61, 0, x_97); +x_98 = lean::nat_dec_eq(x_59, x_59); +if (x_98 == 0) +{ +obj* x_99; obj* x_100; +lean::dec(x_59); +x_99 = l_Lean_nullKind; +x_100 = l_Lean_Parser_ParserState_mkNode(x_61, x_99, x_60); +x_12 = x_100; +goto block_51; +} +else +{ +obj* x_101; obj* x_102; obj* x_103; +x_101 = l_Lean_Parser_ParserState_restore(x_61, x_60, x_59); +x_102 = l_Lean_nullKind; +x_103 = l_Lean_Parser_ParserState_mkNode(x_101, x_102, x_60); +x_12 = x_103; +goto block_51; +} +} +else +{ +obj* x_104; obj* x_105; obj* x_106; obj* x_107; uint8 x_108; +x_104 = lean::cnstr_get(x_61, 0); +x_105 = lean::cnstr_get(x_61, 2); +lean::inc(x_105); +lean::inc(x_104); +lean::dec(x_61); +x_106 = l_Array_shrink___main___rarg(x_104, x_60); +lean::inc(x_59); +x_107 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_107, 0, x_106); +lean::cnstr_set(x_107, 1, x_59); +lean::cnstr_set(x_107, 2, x_105); +lean::cnstr_set(x_107, 3, x_90); +x_108 = lean::nat_dec_eq(x_59, x_59); +if (x_108 == 0) +{ +obj* x_109; obj* x_110; +lean::dec(x_59); +x_109 = l_Lean_nullKind; +x_110 = l_Lean_Parser_ParserState_mkNode(x_107, x_109, x_60); +x_12 = x_110; +goto block_51; +} +else +{ +obj* x_111; obj* x_112; obj* x_113; +x_111 = l_Lean_Parser_ParserState_restore(x_107, x_60, x_59); +x_112 = l_Lean_nullKind; +x_113 = l_Lean_Parser_ParserState_mkNode(x_111, x_112, x_60); +x_12 = x_113; +goto block_51; +} +} +} +} +} +else +{ +obj* x_114; +lean::dec(x_57); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_4); +lean::dec(x_3); +x_114 = l_Lean_Parser_ParserState_mkNode(x_56, x_1, x_11); +return x_114; +} +block_51: +{ +obj* x_13; +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +lean::inc(x_8); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_8, x_12); +x_18 = lean::cnstr_get(x_17, 3); +lean::inc(x_18); +if (lean::obj_tag(x_18) == 0) +{ +obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; +x_19 = lean::cnstr_get(x_17, 0); +lean::inc(x_19); +x_20 = lean::array_get_size(x_19); +lean::dec(x_19); +x_21 = lean::cnstr_get(x_17, 1); +lean::inc(x_21); +lean::inc(x_8); +lean::inc(x_7); +x_22 = lean::apply_3(x_3, x_7, x_8, x_17); +x_23 = lean::cnstr_get(x_22, 3); +lean::inc(x_23); +if (lean::obj_tag(x_23) == 0) +{ +obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_7); +lean::dec(x_4); +x_24 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_25 = lean::string_append(x_24, x_5); +x_26 = l_Char_HasRepr___closed__1; +x_27 = lean::string_append(x_25, x_26); +lean::inc(x_8); +x_28 = l_Lean_Parser_symbolFnAux(x_5, x_27, x_8, x_22); +x_29 = lean::cnstr_get(x_28, 3); +lean::inc(x_29); +if (lean::obj_tag(x_29) == 0) +{ +obj* x_30; obj* x_31; +x_30 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_8, x_28); +x_31 = l_Lean_Parser_ParserState_mkNode(x_30, x_1, x_11); +return x_31; +} +else +{ +obj* x_32; +lean::dec(x_29); +lean::dec(x_8); +x_32 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_11); +return x_32; +} +} +else +{ +obj* x_33; uint8 x_34; +lean::dec(x_23); +x_33 = lean::cnstr_get(x_22, 1); +lean::inc(x_33); +x_34 = lean::nat_dec_eq(x_33, x_21); +lean::dec(x_33); +if (x_34 == 0) +{ +obj* x_35; +lean::dec(x_21); +lean::dec(x_20); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_4); +x_35 = l_Lean_Parser_ParserState_mkNode(x_22, x_1, x_11); +return x_35; +} +else +{ +obj* x_36; obj* x_37; obj* x_38; +x_36 = l_Lean_Parser_ParserState_restore(x_22, x_20, x_21); +lean::dec(x_20); +lean::inc(x_8); +x_37 = lean::apply_3(x_4, x_7, x_8, x_36); +x_38 = lean::cnstr_get(x_37, 3); +lean::inc(x_38); +if (lean::obj_tag(x_38) == 0) +{ +obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; +x_39 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_40 = lean::string_append(x_39, x_5); +x_41 = l_Char_HasRepr___closed__1; +x_42 = lean::string_append(x_40, x_41); +lean::inc(x_8); +x_43 = l_Lean_Parser_symbolFnAux(x_5, x_42, x_8, x_37); +x_44 = lean::cnstr_get(x_43, 3); +lean::inc(x_44); +if (lean::obj_tag(x_44) == 0) +{ +obj* x_45; obj* x_46; +x_45 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_8, x_43); +x_46 = l_Lean_Parser_ParserState_mkNode(x_45, x_1, x_11); +return x_46; +} +else +{ +obj* x_47; +lean::dec(x_44); +lean::dec(x_8); +x_47 = l_Lean_Parser_ParserState_mkNode(x_43, x_1, x_11); +return x_47; +} +} +else +{ +obj* x_48; +lean::dec(x_38); +lean::dec(x_8); +x_48 = l_Lean_Parser_ParserState_mkNode(x_37, x_1, x_11); +return x_48; +} +} +} +} +else +{ +obj* x_49; +lean::dec(x_18); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_4); +lean::dec(x_3); +x_49 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_11); +return x_49; +} +} +else +{ +obj* x_50; +lean::dec(x_13); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_4); +lean::dec(x_3); +x_50 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_11); +return x_50; +} +} } } obj* _init_l_Lean_Parser_Term_have() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; uint8 x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -1945,89 +3011,65 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_Term_haveAssign; -x_21 = lean::cnstr_get(x_20, 0); -lean::inc(x_21); -x_22 = l_Lean_Parser_Term_fromTerm; -x_23 = lean::cnstr_get(x_22, 0); +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_Term_haveAssign; +x_18 = lean::cnstr_get(x_17, 0); +lean::inc(x_18); +x_19 = l_Lean_Parser_Term_fromTerm; +x_20 = lean::cnstr_get(x_19, 0); +lean::inc(x_20); +x_21 = l_Lean_Parser_orelseInfo(x_18, x_20); +x_22 = lean::cnstr_get(x_17, 1); +lean::inc(x_22); +x_23 = lean::cnstr_get(x_19, 1); lean::inc(x_23); -x_24 = l_Lean_Parser_orelseInfo(x_21, x_23); -x_25 = lean::cnstr_get(x_20, 1); +x_24 = lean::mk_string("; "); +x_25 = l_String_trim(x_24); +lean::dec(x_24); lean::inc(x_25); -x_26 = lean::cnstr_get(x_22, 1); -lean::inc(x_26); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_25); -lean::closure_set(x_27, 1, x_26); -x_28 = lean::mk_string("; "); -x_29 = l_String_trim(x_28); -lean::dec(x_28); -lean::inc(x_29); -x_30 = l_Lean_Parser_symbolInfo(x_29, x_10); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_31, 0, x_29); -lean::inc(x_17); -x_32 = l_Lean_Parser_andthenInfo(x_30, x_17); -lean::inc(x_19); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_33, 0, x_31); -lean::closure_set(x_33, 1, x_19); -x_34 = l_Lean_Parser_andthenInfo(x_24, x_32); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_27); -lean::closure_set(x_35, 1, x_33); -x_36 = l_Lean_Parser_andthenInfo(x_17, x_34); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_37, 0, x_19); -lean::closure_set(x_37, 1, x_35); -x_38 = lean::mk_string("ident"); -x_39 = l_Lean_Parser_mkAtomicInfo(x_38); -x_40 = 0; -x_41 = lean::box(x_40); -x_42 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_42, 0, x_41); -x_43 = lean::mk_string(" : "); -x_44 = l_String_trim(x_43); -lean::dec(x_43); -lean::inc(x_44); -x_45 = l_Lean_Parser_symbolInfo(x_44, x_10); -x_46 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_46, 0, x_44); -x_47 = l_Lean_Parser_andthenInfo(x_39, x_45); -x_48 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_48, 0, x_42); -lean::closure_set(x_48, 1, x_46); -x_49 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_49, 0, x_48); -x_50 = l_Lean_Parser_noFirstTokenInfo(x_47); -x_51 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_51, 0, x_49); -x_52 = l_Lean_Parser_andthenInfo(x_50, x_36); -x_53 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_53, 0, x_51); -lean::closure_set(x_53, 1, x_37); -x_54 = l_Lean_Parser_andthenInfo(x_13, x_52); -x_55 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_55, 0, x_14); -lean::closure_set(x_55, 1, x_53); -x_56 = l_Lean_Parser_nodeInfo(x_54); -x_57 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_57, 0, x_9); -lean::closure_set(x_57, 1, x_55); -x_58 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_58, 0, x_56); -lean::cnstr_set(x_58, 1, x_57); -return x_58; +x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); +lean::inc(x_16); +x_27 = l_Lean_Parser_andthenInfo(x_26, x_16); +x_28 = l_Lean_Parser_andthenInfo(x_21, x_27); +x_29 = l_Lean_Parser_andthenInfo(x_16, x_28); +x_30 = lean::mk_string("ident"); +x_31 = l_Lean_Parser_mkAtomicInfo(x_30); +x_32 = lean::mk_string(" : "); +x_33 = l_String_trim(x_32); +lean::dec(x_32); +lean::inc(x_33); +x_34 = l_Lean_Parser_symbolInfo(x_33, x_10); +x_35 = l_Lean_Parser_andthenInfo(x_31, x_34); +x_36 = l_Lean_Parser_noFirstTokenInfo(x_35); +x_37 = l_Lean_Parser_andthenInfo(x_36, x_29); +x_38 = l_Lean_Parser_andthenInfo(x_13, x_37); +x_39 = l_Lean_Parser_nodeInfo(x_38); +x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_have___elambda__1___boxed), 9, 6); +lean::closure_set(x_40, 0, x_9); +lean::closure_set(x_40, 1, x_12); +lean::closure_set(x_40, 2, x_22); +lean::closure_set(x_40, 3, x_23); +lean::closure_set(x_40, 4, x_25); +lean::closure_set(x_40, 5, x_33); +x_41 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_41, 0, x_39); +lean::cnstr_set(x_41, 1, x_40); +return x_41; +} +} +obj* l_Lean_Parser_Term_have___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { +_start: +{ +obj* x_10; +x_10 = l_Lean_Parser_Term_have___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_2); +return x_10; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_have___closed__1() { @@ -2057,10 +3099,311 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_suffices___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_33 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_34 = lean::string_append(x_33, x_2); +x_35 = l_Char_HasRepr___closed__1; +x_36 = lean::string_append(x_34, x_35); +lean::inc(x_7); +x_37 = l_Lean_Parser_symbolFnAux(x_2, x_36, x_7, x_8); +x_38 = lean::cnstr_get(x_37, 3); +lean::inc(x_38); +if (lean::obj_tag(x_38) == 0) +{ +obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_39 = lean::cnstr_get(x_37, 0); +lean::inc(x_39); +x_40 = lean::cnstr_get(x_37, 1); +lean::inc(x_40); +x_41 = lean::array_get_size(x_39); +lean::dec(x_39); +lean::inc(x_7); +x_42 = l_Lean_Parser_identFn___rarg(x_7, x_37); +x_43 = lean::cnstr_get(x_42, 3); +lean::inc(x_43); +if (lean::obj_tag(x_43) == 0) +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; +x_44 = lean::string_append(x_33, x_5); +x_45 = lean::string_append(x_44, x_35); +lean::inc(x_7); +x_46 = l_Lean_Parser_symbolFnAux(x_5, x_45, x_7, x_42); +x_47 = lean::cnstr_get(x_46, 3); +lean::inc(x_47); +if (lean::obj_tag(x_47) == 0) +{ +obj* x_48; obj* x_49; +lean::dec(x_40); +x_48 = l_Lean_nullKind; +x_49 = l_Lean_Parser_ParserState_mkNode(x_46, x_48, x_41); +x_11 = x_49; +goto block_32; +} +else +{ +uint8 x_50; +x_50 = !lean::is_exclusive(x_46); +if (x_50 == 0) +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; uint8 x_55; +x_51 = lean::cnstr_get(x_46, 0); +x_52 = lean::cnstr_get(x_46, 3); +lean::dec(x_52); +x_53 = lean::cnstr_get(x_46, 1); +lean::dec(x_53); +x_54 = l_Array_shrink___main___rarg(x_51, x_41); +lean::inc(x_40); +lean::cnstr_set(x_46, 1, x_40); +lean::cnstr_set(x_46, 0, x_54); +x_55 = lean::nat_dec_eq(x_40, x_40); +if (x_55 == 0) +{ +obj* x_56; obj* x_57; +lean::dec(x_40); +x_56 = l_Lean_nullKind; +x_57 = l_Lean_Parser_ParserState_mkNode(x_46, x_56, x_41); +x_11 = x_57; +goto block_32; +} +else +{ +obj* x_58; obj* x_59; obj* x_60; +x_58 = l_Lean_Parser_ParserState_restore(x_46, x_41, x_40); +x_59 = l_Lean_nullKind; +x_60 = l_Lean_Parser_ParserState_mkNode(x_58, x_59, x_41); +x_11 = x_60; +goto block_32; +} +} +else +{ +obj* x_61; obj* x_62; obj* x_63; obj* x_64; uint8 x_65; +x_61 = lean::cnstr_get(x_46, 0); +x_62 = lean::cnstr_get(x_46, 2); +lean::inc(x_62); +lean::inc(x_61); +lean::dec(x_46); +x_63 = l_Array_shrink___main___rarg(x_61, x_41); +lean::inc(x_40); +x_64 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_64, 0, x_63); +lean::cnstr_set(x_64, 1, x_40); +lean::cnstr_set(x_64, 2, x_62); +lean::cnstr_set(x_64, 3, x_47); +x_65 = lean::nat_dec_eq(x_40, x_40); +if (x_65 == 0) +{ +obj* x_66; obj* x_67; +lean::dec(x_40); +x_66 = l_Lean_nullKind; +x_67 = l_Lean_Parser_ParserState_mkNode(x_64, x_66, x_41); +x_11 = x_67; +goto block_32; +} +else +{ +obj* x_68; obj* x_69; obj* x_70; +x_68 = l_Lean_Parser_ParserState_restore(x_64, x_41, x_40); +x_69 = l_Lean_nullKind; +x_70 = l_Lean_Parser_ParserState_mkNode(x_68, x_69, x_41); +x_11 = x_70; +goto block_32; +} +} +} +} +else +{ +obj* x_71; +lean::dec(x_43); +x_71 = lean::cnstr_get(x_42, 3); +lean::inc(x_71); +if (lean::obj_tag(x_71) == 0) +{ +obj* x_72; obj* x_73; +lean::dec(x_40); +x_72 = l_Lean_nullKind; +x_73 = l_Lean_Parser_ParserState_mkNode(x_42, x_72, x_41); +x_11 = x_73; +goto block_32; +} +else +{ +uint8 x_74; +x_74 = !lean::is_exclusive(x_42); +if (x_74 == 0) +{ +obj* x_75; obj* x_76; obj* x_77; obj* x_78; uint8 x_79; +x_75 = lean::cnstr_get(x_42, 0); +x_76 = lean::cnstr_get(x_42, 3); +lean::dec(x_76); +x_77 = lean::cnstr_get(x_42, 1); +lean::dec(x_77); +x_78 = l_Array_shrink___main___rarg(x_75, x_41); +lean::inc(x_40); +lean::cnstr_set(x_42, 1, x_40); +lean::cnstr_set(x_42, 0, x_78); +x_79 = lean::nat_dec_eq(x_40, x_40); +if (x_79 == 0) +{ +obj* x_80; obj* x_81; +lean::dec(x_40); +x_80 = l_Lean_nullKind; +x_81 = l_Lean_Parser_ParserState_mkNode(x_42, x_80, x_41); +x_11 = x_81; +goto block_32; +} +else +{ +obj* x_82; obj* x_83; obj* x_84; +x_82 = l_Lean_Parser_ParserState_restore(x_42, x_41, x_40); +x_83 = l_Lean_nullKind; +x_84 = l_Lean_Parser_ParserState_mkNode(x_82, x_83, x_41); +x_11 = x_84; +goto block_32; +} +} +else +{ +obj* x_85; obj* x_86; obj* x_87; obj* x_88; uint8 x_89; +x_85 = lean::cnstr_get(x_42, 0); +x_86 = lean::cnstr_get(x_42, 2); +lean::inc(x_86); +lean::inc(x_85); +lean::dec(x_42); +x_87 = l_Array_shrink___main___rarg(x_85, x_41); +lean::inc(x_40); +x_88 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_88, 0, x_87); +lean::cnstr_set(x_88, 1, x_40); +lean::cnstr_set(x_88, 2, x_86); +lean::cnstr_set(x_88, 3, x_71); +x_89 = lean::nat_dec_eq(x_40, x_40); +if (x_89 == 0) +{ +obj* x_90; obj* x_91; +lean::dec(x_40); +x_90 = l_Lean_nullKind; +x_91 = l_Lean_Parser_ParserState_mkNode(x_88, x_90, x_41); +x_11 = x_91; +goto block_32; +} +else +{ +obj* x_92; obj* x_93; obj* x_94; +x_92 = l_Lean_Parser_ParserState_restore(x_88, x_41, x_40); +x_93 = l_Lean_nullKind; +x_94 = l_Lean_Parser_ParserState_mkNode(x_92, x_93, x_41); +x_11 = x_94; +goto block_32; +} +} +} +} +} +else +{ +obj* x_95; +lean::dec(x_38); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +x_95 = l_Lean_Parser_ParserState_mkNode(x_37, x_1, x_10); +return x_95; +} +block_32: +{ +obj* x_12; +x_12 = lean::cnstr_get(x_11, 3); +lean::inc(x_12); +if (lean::obj_tag(x_12) == 0) +{ +obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +x_13 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_14 = l_Lean_Parser_builtinTermParsingTable; +x_15 = lean::mk_nat_obj(0u); +lean::inc(x_7); +x_16 = l_Lean_Parser_runBuiltinParserUnsafe(x_13, x_14, x_15, x_7, x_11); +x_17 = lean::cnstr_get(x_16, 3); +lean::inc(x_17); +if (lean::obj_tag(x_17) == 0) +{ +obj* x_18; obj* x_19; +lean::inc(x_7); +x_18 = lean::apply_3(x_4, x_6, x_7, x_16); +x_19 = lean::cnstr_get(x_18, 3); +lean::inc(x_19); +if (lean::obj_tag(x_19) == 0) +{ +obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_20 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_21 = lean::string_append(x_20, x_3); +x_22 = l_Char_HasRepr___closed__1; +x_23 = lean::string_append(x_21, x_22); +lean::inc(x_7); +x_24 = l_Lean_Parser_symbolFnAux(x_3, x_23, x_7, x_18); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +obj* x_26; obj* x_27; +x_26 = l_Lean_Parser_runBuiltinParserUnsafe(x_13, x_14, x_15, x_7, x_24); +x_27 = l_Lean_Parser_ParserState_mkNode(x_26, x_1, x_10); +return x_27; +} +else +{ +obj* x_28; +lean::dec(x_25); +lean::dec(x_7); +x_28 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_10); +return x_28; +} +} +else +{ +obj* x_29; +lean::dec(x_19); +lean::dec(x_7); +x_29 = l_Lean_Parser_ParserState_mkNode(x_18, x_1, x_10); +return x_29; +} +} +else +{ +obj* x_30; +lean::dec(x_17); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +x_30 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_10); +return x_30; +} +} +else +{ +obj* x_31; +lean::dec(x_12); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +x_31 = l_Lean_Parser_ParserState_mkNode(x_11, x_1, x_10); +return x_31; +} +} +} +} obj* _init_l_Lean_Parser_Term_suffices() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; uint8 x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2076,80 +3419,58 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string("; "); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -lean::inc(x_21); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_23, 0, x_21); -lean::inc(x_17); -x_24 = l_Lean_Parser_andthenInfo(x_22, x_17); -lean::inc(x_19); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_23); -lean::closure_set(x_25, 1, x_19); -x_26 = l_Lean_Parser_Term_fromTerm; -x_27 = lean::cnstr_get(x_26, 0); -lean::inc(x_27); -x_28 = l_Lean_Parser_andthenInfo(x_27, x_24); -x_29 = lean::cnstr_get(x_26, 1); +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = lean::mk_string("; "); +x_18 = l_String_trim(x_17); +lean::dec(x_17); +lean::inc(x_18); +x_19 = l_Lean_Parser_symbolInfo(x_18, x_10); +lean::inc(x_16); +x_20 = l_Lean_Parser_andthenInfo(x_19, x_16); +x_21 = l_Lean_Parser_Term_fromTerm; +x_22 = lean::cnstr_get(x_21, 0); +lean::inc(x_22); +x_23 = l_Lean_Parser_andthenInfo(x_22, x_20); +x_24 = lean::cnstr_get(x_21, 1); +lean::inc(x_24); +x_25 = l_Lean_Parser_andthenInfo(x_16, x_23); +x_26 = lean::mk_string("ident"); +x_27 = l_Lean_Parser_mkAtomicInfo(x_26); +x_28 = lean::mk_string(" : "); +x_29 = l_String_trim(x_28); +lean::dec(x_28); lean::inc(x_29); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_30, 0, x_29); -lean::closure_set(x_30, 1, x_25); -x_31 = l_Lean_Parser_andthenInfo(x_17, x_28); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_32, 0, x_19); -lean::closure_set(x_32, 1, x_30); -x_33 = lean::mk_string("ident"); -x_34 = l_Lean_Parser_mkAtomicInfo(x_33); -x_35 = 0; -x_36 = lean::box(x_35); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_37, 0, x_36); -x_38 = lean::mk_string(" : "); -x_39 = l_String_trim(x_38); -lean::dec(x_38); -lean::inc(x_39); -x_40 = l_Lean_Parser_symbolInfo(x_39, x_10); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_41, 0, x_39); -x_42 = l_Lean_Parser_andthenInfo(x_34, x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_37); -lean::closure_set(x_43, 1, x_41); -x_44 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_44, 0, x_43); -x_45 = l_Lean_Parser_noFirstTokenInfo(x_42); -x_46 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_46, 0, x_44); -x_47 = l_Lean_Parser_andthenInfo(x_45, x_31); -x_48 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_48, 0, x_46); -lean::closure_set(x_48, 1, x_32); -x_49 = l_Lean_Parser_andthenInfo(x_13, x_47); -x_50 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_50, 0, x_14); -lean::closure_set(x_50, 1, x_48); -x_51 = l_Lean_Parser_nodeInfo(x_49); -x_52 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_52, 0, x_9); -lean::closure_set(x_52, 1, x_50); -x_53 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_53, 0, x_51); -lean::cnstr_set(x_53, 1, x_52); -return x_53; +x_30 = l_Lean_Parser_symbolInfo(x_29, x_10); +x_31 = l_Lean_Parser_andthenInfo(x_27, x_30); +x_32 = l_Lean_Parser_noFirstTokenInfo(x_31); +x_33 = l_Lean_Parser_andthenInfo(x_32, x_25); +x_34 = l_Lean_Parser_andthenInfo(x_13, x_33); +x_35 = l_Lean_Parser_nodeInfo(x_34); +x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_suffices___elambda__1___boxed), 8, 5); +lean::closure_set(x_36, 0, x_9); +lean::closure_set(x_36, 1, x_12); +lean::closure_set(x_36, 2, x_18); +lean::closure_set(x_36, 3, x_24); +lean::closure_set(x_36, 4, x_29); +x_37 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_37, 0, x_35); +lean::cnstr_set(x_37, 1, x_36); +return x_37; +} +} +obj* l_Lean_Parser_Term_suffices___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_suffices___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_suffices___closed__1() { @@ -2179,10 +3500,66 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_show___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_10 = lean::string_append(x_9, x_2); +x_11 = l_Char_HasRepr___closed__1; +x_12 = lean::string_append(x_10, x_11); +lean::inc(x_5); +x_13 = l_Lean_Parser_symbolFnAux(x_2, x_12, x_5, x_6); +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; +x_15 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_16 = l_Lean_Parser_builtinTermParsingTable; +x_17 = lean::mk_nat_obj(0u); +lean::inc(x_5); +x_18 = l_Lean_Parser_runBuiltinParserUnsafe(x_15, x_16, x_17, x_5, x_13); +x_19 = lean::cnstr_get(x_18, 3); +lean::inc(x_19); +if (lean::obj_tag(x_19) == 0) +{ +obj* x_20; obj* x_21; +x_20 = lean::apply_3(x_3, x_4, x_5, x_18); +x_21 = l_Lean_Parser_ParserState_mkNode(x_20, x_1, x_8); +return x_21; +} +else +{ +obj* x_22; +lean::dec(x_19); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_22 = l_Lean_Parser_ParserState_mkNode(x_18, x_1, x_8); +return x_22; +} +} +else +{ +obj* x_23; +lean::dec(x_14); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_23 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_8); +return x_23; +} +} +} obj* _init_l_Lean_Parser_Term_show() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2198,37 +3575,36 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_Term_fromTerm; -x_21 = lean::cnstr_get(x_20, 0); -lean::inc(x_21); -x_22 = l_Lean_Parser_andthenInfo(x_17, x_21); -x_23 = lean::cnstr_get(x_20, 1); -lean::inc(x_23); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_24, 0, x_19); -lean::closure_set(x_24, 1, x_23); -x_25 = l_Lean_Parser_andthenInfo(x_13, x_22); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_26, 0, x_14); -lean::closure_set(x_26, 1, x_24); -x_27 = l_Lean_Parser_nodeInfo(x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_28, 0, x_9); -lean::closure_set(x_28, 1, x_26); -x_29 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_29, 0, x_27); -lean::cnstr_set(x_29, 1, x_28); -return x_29; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_Term_fromTerm; +x_18 = lean::cnstr_get(x_17, 0); +lean::inc(x_18); +x_19 = l_Lean_Parser_andthenInfo(x_16, x_18); +x_20 = lean::cnstr_get(x_17, 1); +lean::inc(x_20); +x_21 = l_Lean_Parser_andthenInfo(x_13, x_19); +x_22 = l_Lean_Parser_nodeInfo(x_21); +x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_show___elambda__1___boxed), 6, 3); +lean::closure_set(x_23, 0, x_9); +lean::closure_set(x_23, 1, x_12); +lean::closure_set(x_23, 2, x_20); +x_24 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_24, 0, x_22); +lean::cnstr_set(x_24, 1, x_23); +return x_24; +} +} +obj* l_Lean_Parser_Term_show___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; +x_7 = l_Lean_Parser_Term_show___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean::dec(x_2); +return x_7; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_show___closed__1() { @@ -2258,10 +3634,150 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_fun___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { +_start: +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; +x_10 = lean::cnstr_get(x_9, 0); +lean::inc(x_10); +x_11 = lean::array_get_size(x_10); +lean::dec(x_10); +x_12 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_13 = lean::string_append(x_12, x_2); +x_14 = l_Lean_Parser_unicodeSymbolFn___rarg___closed__1; +x_15 = lean::string_append(x_13, x_14); +x_16 = lean::string_append(x_15, x_3); +x_17 = l_Char_HasRepr___closed__1; +x_18 = lean::string_append(x_16, x_17); +lean::inc(x_8); +x_19 = l_Lean_Parser_unicodeSymbolFnAux(x_2, x_3, x_18, x_8, x_9); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_21 = lean::cnstr_get(x_19, 0); +lean::inc(x_21); +x_22 = lean::array_get_size(x_21); +lean::dec(x_21); +x_23 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_24 = l_Lean_Parser_builtinTermParsingTable; +x_25 = l_Lean_Parser_appPrec; +lean::inc(x_8); +x_26 = l_Lean_Parser_runBuiltinParserUnsafe(x_23, x_24, x_25, x_8, x_19); +x_27 = lean::cnstr_get(x_26, 3); +lean::inc(x_27); +if (lean::obj_tag(x_27) == 0) +{ +uint8 x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; +x_28 = 0; +lean::inc(x_8); +x_29 = l_Lean_Parser_manyAux___main(x_28, x_4, x_7, x_8, x_26); +x_30 = l_Lean_nullKind; +x_31 = l_Lean_Parser_ParserState_mkNode(x_29, x_30, x_22); +x_32 = lean::cnstr_get(x_31, 3); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; +x_33 = lean::string_append(x_12, x_5); +x_34 = lean::string_append(x_33, x_14); +x_35 = lean::string_append(x_34, x_6); +x_36 = lean::string_append(x_35, x_17); +lean::inc(x_8); +x_37 = l_Lean_Parser_unicodeSymbolFnAux(x_5, x_6, x_36, x_8, x_31); +x_38 = lean::cnstr_get(x_37, 3); +lean::inc(x_38); +if (lean::obj_tag(x_38) == 0) +{ +obj* x_39; obj* x_40; obj* x_41; +x_39 = lean::mk_nat_obj(0u); +x_40 = l_Lean_Parser_runBuiltinParserUnsafe(x_23, x_24, x_39, x_8, x_37); +x_41 = l_Lean_Parser_ParserState_mkNode(x_40, x_1, x_11); +return x_41; +} +else +{ +obj* x_42; +lean::dec(x_38); +lean::dec(x_8); +x_42 = l_Lean_Parser_ParserState_mkNode(x_37, x_1, x_11); +return x_42; +} +} +else +{ +obj* x_43; +lean::dec(x_32); +lean::dec(x_8); +x_43 = l_Lean_Parser_ParserState_mkNode(x_31, x_1, x_11); +return x_43; +} +} +else +{ +obj* x_44; obj* x_45; obj* x_46; +lean::dec(x_27); +lean::dec(x_7); +lean::dec(x_4); +x_44 = l_Lean_nullKind; +x_45 = l_Lean_Parser_ParserState_mkNode(x_26, x_44, x_22); +x_46 = lean::cnstr_get(x_45, 3); +lean::inc(x_46); +if (lean::obj_tag(x_46) == 0) +{ +obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; +x_47 = lean::string_append(x_12, x_5); +x_48 = lean::string_append(x_47, x_14); +x_49 = lean::string_append(x_48, x_6); +x_50 = lean::string_append(x_49, x_17); +lean::inc(x_8); +x_51 = l_Lean_Parser_unicodeSymbolFnAux(x_5, x_6, x_50, x_8, x_45); +x_52 = lean::cnstr_get(x_51, 3); +lean::inc(x_52); +if (lean::obj_tag(x_52) == 0) +{ +obj* x_53; obj* x_54; obj* x_55; +x_53 = lean::mk_nat_obj(0u); +x_54 = l_Lean_Parser_runBuiltinParserUnsafe(x_23, x_24, x_53, x_8, x_51); +x_55 = l_Lean_Parser_ParserState_mkNode(x_54, x_1, x_11); +return x_55; +} +else +{ +obj* x_56; +lean::dec(x_52); +lean::dec(x_8); +x_56 = l_Lean_Parser_ParserState_mkNode(x_51, x_1, x_11); +return x_56; +} +} +else +{ +obj* x_57; +lean::dec(x_46); +lean::dec(x_8); +x_57 = l_Lean_Parser_ParserState_mkNode(x_45, x_1, x_11); +return x_57; +} +} +} +else +{ +obj* x_58; +lean::dec(x_20); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_4); +x_58 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_11); +return x_58; +} +} +} obj* _init_l_Lean_Parser_Term_fun() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; uint8 x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2281,58 +3797,51 @@ lean::dec(x_8); lean::inc(x_13); lean::inc(x_12); x_14 = l_Lean_Parser_unicodeSymbolInfo(x_12, x_13, x_10); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_unicodeSymbolFn___rarg___boxed), 5, 2); -lean::closure_set(x_15, 0, x_12); -lean::closure_set(x_15, 1, x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_17 = lean::box(1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -x_19 = l_Lean_Parser_appPrec; -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_20, 0, x_19); -x_21 = 0; -x_22 = lean::box(x_21); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_23, 0, x_22); -lean::closure_set(x_23, 1, x_20); -x_24 = lean::mk_string("⇒"); -x_25 = l_String_trim(x_24); -lean::dec(x_24); -x_26 = lean::mk_string("=>"); -x_27 = l_String_trim(x_26); -lean::dec(x_26); -lean::inc(x_27); -lean::inc(x_25); -x_28 = l_Lean_Parser_unicodeSymbolInfo(x_25, x_27, x_10); -x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_unicodeSymbolFn___rarg___boxed), 5, 2); -lean::closure_set(x_29, 0, x_25); -lean::closure_set(x_29, 1, x_27); -x_30 = lean::mk_nat_obj(0u); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_31, 0, x_30); -lean::inc(x_18); -x_32 = l_Lean_Parser_andthenInfo(x_28, x_18); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_33, 0, x_29); -lean::closure_set(x_33, 1, x_31); -x_34 = l_Lean_Parser_andthenInfo(x_18, x_32); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_23); -lean::closure_set(x_35, 1, x_33); -x_36 = l_Lean_Parser_andthenInfo(x_14, x_34); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_37, 0, x_15); -lean::closure_set(x_37, 1, x_35); -x_38 = l_Lean_Parser_nodeInfo(x_36); -x_39 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_39, 0, x_9); -lean::closure_set(x_39, 1, x_37); -x_40 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_40, 0, x_38); -lean::cnstr_set(x_40, 1, x_39); -return x_40; +x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_16 = lean::box(1); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +x_18 = l_Lean_Parser_appPrec; +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_19, 0, x_18); +x_20 = lean::mk_string("⇒"); +x_21 = l_String_trim(x_20); +lean::dec(x_20); +x_22 = lean::mk_string("=>"); +x_23 = l_String_trim(x_22); +lean::dec(x_22); +lean::inc(x_23); +lean::inc(x_21); +x_24 = l_Lean_Parser_unicodeSymbolInfo(x_21, x_23, x_10); +lean::inc(x_17); +x_25 = l_Lean_Parser_andthenInfo(x_24, x_17); +x_26 = l_Lean_Parser_andthenInfo(x_17, x_25); +x_27 = l_Lean_Parser_andthenInfo(x_14, x_26); +x_28 = l_Lean_Parser_nodeInfo(x_27); +x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_fun___elambda__1___boxed), 9, 6); +lean::closure_set(x_29, 0, x_9); +lean::closure_set(x_29, 1, x_12); +lean::closure_set(x_29, 2, x_13); +lean::closure_set(x_29, 3, x_19); +lean::closure_set(x_29, 4, x_21); +lean::closure_set(x_29, 5, x_23); +x_30 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_30, 0, x_28); +lean::cnstr_set(x_30, 1, x_29); +return x_30; +} +} +obj* l_Lean_Parser_Term_fun___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { +_start: +{ +obj* x_10; +x_10 = l_Lean_Parser_Term_fun___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_10; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_fun___closed__1() { @@ -2362,10 +3871,62 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_structInstField___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +lean::inc(x_4); +x_8 = l_Lean_Parser_identFn___rarg(x_4, x_5); +x_9 = lean::cnstr_get(x_8, 3); +lean::inc(x_9); +if (lean::obj_tag(x_9) == 0) +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; +x_10 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_11 = lean::string_append(x_10, x_2); +x_12 = l_Char_HasRepr___closed__1; +x_13 = lean::string_append(x_11, x_12); +lean::inc(x_4); +x_14 = l_Lean_Parser_symbolFnAux(x_2, x_13, x_4, x_8); +x_15 = lean::cnstr_get(x_14, 3); +lean::inc(x_15); +if (lean::obj_tag(x_15) == 0) +{ +obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; +x_16 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_17 = l_Lean_Parser_builtinTermParsingTable; +x_18 = lean::mk_nat_obj(0u); +x_19 = l_Lean_Parser_runBuiltinParserUnsafe(x_16, x_17, x_18, x_4, x_14); +x_20 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_7); +return x_20; +} +else +{ +obj* x_21; +lean::dec(x_15); +lean::dec(x_4); +x_21 = l_Lean_Parser_ParserState_mkNode(x_14, x_1, x_7); +return x_21; +} +} +else +{ +obj* x_22; +lean::dec(x_9); +lean::dec(x_4); +x_22 = l_Lean_Parser_ParserState_mkNode(x_8, x_1, x_7); +return x_22; +} +} +} obj* _init_l_Lean_Parser_Term_structInstField() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; uint8 x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2377,48 +3938,121 @@ x_8 = lean::mk_string("structInstField"); x_9 = lean_name_mk_string(x_7, x_8); x_10 = lean::mk_string("ident"); x_11 = l_Lean_Parser_mkAtomicInfo(x_10); -x_12 = 0; -x_13 = lean::box(x_12); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_14, 0, x_13); -x_15 = lean::box(0); -x_16 = lean::mk_string(" := "); -x_17 = l_String_trim(x_16); +x_12 = lean::box(0); +x_13 = lean::mk_string(" := "); +x_14 = l_String_trim(x_13); +lean::dec(x_13); +lean::inc(x_14); +x_15 = l_Lean_Parser_symbolInfo(x_14, x_12); +x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_17 = lean::box(1); +x_18 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_18, 0, x_16); +lean::cnstr_set(x_18, 1, x_17); +x_19 = l_Lean_Parser_andthenInfo(x_15, x_18); +x_20 = l_Lean_Parser_andthenInfo(x_11, x_19); +x_21 = l_Lean_Parser_nodeInfo(x_20); +x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_structInstField___elambda__1___boxed), 5, 2); +lean::closure_set(x_22, 0, x_9); +lean::closure_set(x_22, 1, x_14); +x_23 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_23, 0, x_21); +lean::cnstr_set(x_23, 1, x_22); +return x_23; +} +} +obj* l_Lean_Parser_Term_structInstField___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_structInstField___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_structInstSource___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_14 = lean::cnstr_get(x_12, 0); +lean::inc(x_14); +x_15 = lean::array_get_size(x_14); +lean::dec(x_14); +x_16 = lean::cnstr_get(x_12, 1); +lean::inc(x_16); +x_17 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_18 = l_Lean_Parser_builtinTermParsingTable; +x_19 = lean::mk_nat_obj(0u); +x_20 = l_Lean_Parser_runBuiltinParserUnsafe(x_17, x_18, x_19, x_4, x_12); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +obj* x_22; obj* x_23; obj* x_24; lean::dec(x_16); -lean::inc(x_17); -x_18 = l_Lean_Parser_symbolInfo(x_17, x_15); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_17); -x_20 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_21 = lean::box(1); -x_22 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_22, 0, x_20); -lean::cnstr_set(x_22, 1, x_21); -x_23 = lean::mk_nat_obj(0u); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_24, 0, x_23); -x_25 = l_Lean_Parser_andthenInfo(x_18, x_22); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_26, 0, x_19); -lean::closure_set(x_26, 1, x_24); -x_27 = l_Lean_Parser_andthenInfo(x_11, x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_28, 0, x_14); -lean::closure_set(x_28, 1, x_26); -x_29 = l_Lean_Parser_nodeInfo(x_27); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_30, 0, x_9); -lean::closure_set(x_30, 1, x_28); -x_31 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_31, 0, x_29); -lean::cnstr_set(x_31, 1, x_30); -return x_31; +x_22 = l_Lean_nullKind; +x_23 = l_Lean_Parser_ParserState_mkNode(x_20, x_22, x_15); +x_24 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_7); +return x_24; +} +else +{ +obj* x_25; uint8 x_26; +lean::dec(x_21); +x_25 = lean::cnstr_get(x_20, 1); +lean::inc(x_25); +x_26 = lean::nat_dec_eq(x_25, x_16); +lean::dec(x_25); +if (x_26 == 0) +{ +obj* x_27; obj* x_28; obj* x_29; +lean::dec(x_16); +x_27 = l_Lean_nullKind; +x_28 = l_Lean_Parser_ParserState_mkNode(x_20, x_27, x_15); +x_29 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_7); +return x_29; +} +else +{ +obj* x_30; obj* x_31; obj* x_32; obj* x_33; +x_30 = l_Lean_Parser_ParserState_restore(x_20, x_15, x_16); +x_31 = l_Lean_nullKind; +x_32 = l_Lean_Parser_ParserState_mkNode(x_30, x_31, x_15); +x_33 = l_Lean_Parser_ParserState_mkNode(x_32, x_1, x_7); +return x_33; +} +} +} +else +{ +obj* x_34; +lean::dec(x_13); +lean::dec(x_4); +x_34 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_34; +} } } obj* _init_l_Lean_Parser_Term_structInstSource() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2434,187 +4068,339 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_noFirstTokenInfo(x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_21, 0, x_19); -x_22 = l_Lean_Parser_andthenInfo(x_13, x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_14); -lean::closure_set(x_23, 1, x_21); -x_24 = l_Lean_Parser_nodeInfo(x_22); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_9); -lean::closure_set(x_25, 1, x_23); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_24); -lean::cnstr_set(x_26, 1, x_25); -return x_26; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_noFirstTokenInfo(x_16); +x_18 = l_Lean_Parser_andthenInfo(x_13, x_17); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_structInstSource___elambda__1___boxed), 5, 2); +lean::closure_set(x_20, 0, x_9); +lean::closure_set(x_20, 1, x_12); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +return x_21; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3(uint8 x_1, uint8 x_2, obj* x_3, uint8 x_4, obj* x_5, obj* x_6, obj* x_7) { -_start: -{ -obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_36; obj* x_37; -x_8 = l_Lean_Parser_Term_structInstField; -x_9 = lean::cnstr_get(x_8, 1); -lean::inc(x_9); -x_10 = l_Lean_Parser_Term_structInstSource; -x_11 = lean::cnstr_get(x_10, 1); -lean::inc(x_11); -x_12 = lean::cnstr_get(x_7, 0); -lean::inc(x_12); -x_13 = lean::array_get_size(x_12); -lean::dec(x_12); -x_14 = lean::cnstr_get(x_7, 1); -lean::inc(x_14); -lean::inc(x_6); -lean::inc(x_5); -x_36 = lean::apply_3(x_9, x_5, x_6, x_7); -x_37 = lean::cnstr_get(x_36, 3); -lean::inc(x_37); -if (lean::obj_tag(x_37) == 0) -{ -lean::dec(x_11); -x_15 = x_36; -goto block_35; -} -else -{ -obj* x_38; uint8 x_39; -lean::dec(x_37); -x_38 = lean::cnstr_get(x_36, 1); -lean::inc(x_38); -x_39 = lean::nat_dec_eq(x_38, x_14); -lean::dec(x_38); -if (x_39 == 0) -{ -lean::dec(x_11); -x_15 = x_36; -goto block_35; -} -else -{ -obj* x_40; obj* x_41; -lean::inc(x_14); -x_40 = l_Lean_Parser_ParserState_restore(x_36, x_13, x_14); -lean::inc(x_6); -lean::inc(x_5); -x_41 = lean::apply_3(x_11, x_5, x_6, x_40); -x_15 = x_41; -goto block_35; -} -} -block_35: -{ -obj* x_16; -x_16 = lean::cnstr_get(x_15, 3); -lean::inc(x_16); -if (lean::obj_tag(x_16) == 0) -{ -obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; -lean::dec(x_14); -lean::dec(x_13); -x_17 = lean::cnstr_get(x_15, 0); -lean::inc(x_17); -x_18 = lean::array_get_size(x_17); -lean::dec(x_17); -x_19 = lean::cnstr_get(x_15, 1); -lean::inc(x_19); -x_20 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1; -x_21 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2; -lean::inc(x_6); -x_22 = l_Lean_Parser_symbolFnAux(x_20, x_21, x_6, x_15); -x_23 = lean::cnstr_get(x_22, 3); -lean::inc(x_23); -if (lean::obj_tag(x_23) == 0) -{ -lean::dec(x_19); -lean::dec(x_18); -{ -uint8 _tmp_3 = x_2; -obj* _tmp_6 = x_22; -x_4 = _tmp_3; -x_7 = _tmp_6; -} -goto _start; -} -else -{ -obj* x_25; obj* x_26; obj* x_27; -lean::dec(x_23); -lean::dec(x_6); -lean::dec(x_5); -x_25 = l_Lean_Parser_ParserState_restore(x_22, x_18, x_19); -lean::dec(x_18); -x_26 = l_Lean_nullKind; -x_27 = l_Lean_Parser_ParserState_mkNode(x_25, x_26, x_3); -return x_27; -} -} -else -{ -lean::dec(x_16); -lean::dec(x_6); -lean::dec(x_5); -if (x_4 == 0) -{ -obj* x_28; obj* x_29; obj* x_30; obj* x_31; -lean::dec(x_14); -lean::dec(x_13); -x_28 = lean::box(0); -x_29 = l_Lean_Parser_ParserState_pushSyntax(x_15, x_28); -x_30 = l_Lean_nullKind; -x_31 = l_Lean_Parser_ParserState_mkNode(x_29, x_30, x_3); -return x_31; -} -else -{ -obj* x_32; obj* x_33; obj* x_34; -x_32 = l_Lean_Parser_ParserState_restore(x_15, x_13, x_14); -lean::dec(x_13); -x_33 = l_Lean_nullKind; -x_34 = l_Lean_Parser_ParserState_mkNode(x_32, x_33, x_3); -return x_34; -} -} -} -} -} -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; obj* x_7; uint8 x_8; obj* x_9; -x_6 = lean::cnstr_get(x_5, 0); -lean::inc(x_6); -x_7 = lean::array_get_size(x_6); -lean::dec(x_6); -x_8 = 1; -x_9 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3(x_1, x_2, x_7, x_8, x_3, x_4, x_5); -return x_9; -} -} -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { +obj* l_Lean_Parser_Term_structInstSource___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; -x_6 = l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Lean_Parser_Term_structInstSource___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); return x_6; } } +obj* l_Lean_Parser_Term_structInst___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { +_start: +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +x_10 = lean::cnstr_get(x_9, 0); +lean::inc(x_10); +x_11 = lean::array_get_size(x_10); +lean::dec(x_10); +x_12 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_13 = lean::string_append(x_12, x_2); +x_14 = l_Char_HasRepr___closed__1; +x_15 = lean::string_append(x_13, x_14); +lean::inc(x_8); +x_16 = l_Lean_Parser_symbolFnAux(x_2, x_15, x_8, x_9); +x_17 = lean::cnstr_get(x_16, 3); +lean::inc(x_17); +if (lean::obj_tag(x_17) == 0) +{ +obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_66; obj* x_67; +x_18 = lean::cnstr_get(x_16, 0); +lean::inc(x_18); +x_19 = lean::cnstr_get(x_16, 1); +lean::inc(x_19); +x_20 = lean::array_get_size(x_18); +lean::dec(x_18); +lean::inc(x_8); +x_66 = l_Lean_Parser_identFn___rarg(x_8, x_16); +x_67 = lean::cnstr_get(x_66, 3); +lean::inc(x_67); +if (lean::obj_tag(x_67) == 0) +{ +obj* x_68; obj* x_69; obj* x_70; obj* x_71; +x_68 = lean::string_append(x_12, x_3); +x_69 = lean::string_append(x_68, x_14); +lean::inc(x_8); +x_70 = l_Lean_Parser_symbolFnAux(x_3, x_69, x_8, x_66); +x_71 = lean::cnstr_get(x_70, 3); +lean::inc(x_71); +if (lean::obj_tag(x_71) == 0) +{ +x_21 = x_70; +goto block_65; +} +else +{ +uint8 x_72; +x_72 = !lean::is_exclusive(x_70); +if (x_72 == 0) +{ +obj* x_73; obj* x_74; obj* x_75; obj* x_76; +x_73 = lean::cnstr_get(x_70, 0); +x_74 = lean::cnstr_get(x_70, 3); +lean::dec(x_74); +x_75 = lean::cnstr_get(x_70, 1); +lean::dec(x_75); +x_76 = l_Array_shrink___main___rarg(x_73, x_20); +lean::inc(x_19); +lean::cnstr_set(x_70, 1, x_19); +lean::cnstr_set(x_70, 0, x_76); +x_21 = x_70; +goto block_65; +} +else +{ +obj* x_77; obj* x_78; obj* x_79; obj* x_80; +x_77 = lean::cnstr_get(x_70, 0); +x_78 = lean::cnstr_get(x_70, 2); +lean::inc(x_78); +lean::inc(x_77); +lean::dec(x_70); +x_79 = l_Array_shrink___main___rarg(x_77, x_20); +lean::inc(x_19); +x_80 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_80, 0, x_79); +lean::cnstr_set(x_80, 1, x_19); +lean::cnstr_set(x_80, 2, x_78); +lean::cnstr_set(x_80, 3, x_71); +x_21 = x_80; +goto block_65; +} +} +} +else +{ +obj* x_81; +lean::dec(x_67); +x_81 = lean::cnstr_get(x_66, 3); +lean::inc(x_81); +if (lean::obj_tag(x_81) == 0) +{ +x_21 = x_66; +goto block_65; +} +else +{ +uint8 x_82; +x_82 = !lean::is_exclusive(x_66); +if (x_82 == 0) +{ +obj* x_83; obj* x_84; obj* x_85; obj* x_86; +x_83 = lean::cnstr_get(x_66, 0); +x_84 = lean::cnstr_get(x_66, 3); +lean::dec(x_84); +x_85 = lean::cnstr_get(x_66, 1); +lean::dec(x_85); +x_86 = l_Array_shrink___main___rarg(x_83, x_20); +lean::inc(x_19); +lean::cnstr_set(x_66, 1, x_19); +lean::cnstr_set(x_66, 0, x_86); +x_21 = x_66; +goto block_65; +} +else +{ +obj* x_87; obj* x_88; obj* x_89; obj* x_90; +x_87 = lean::cnstr_get(x_66, 0); +x_88 = lean::cnstr_get(x_66, 2); +lean::inc(x_88); +lean::inc(x_87); +lean::dec(x_66); +x_89 = l_Array_shrink___main___rarg(x_87, x_20); +lean::inc(x_19); +x_90 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_90, 0, x_89); +lean::cnstr_set(x_90, 1, x_19); +lean::cnstr_set(x_90, 2, x_88); +lean::cnstr_set(x_90, 3, x_81); +x_21 = x_90; +goto block_65; +} +} +} +block_65: +{ +obj* x_22; +x_22 = lean::cnstr_get(x_21, 3); +lean::inc(x_22); +if (lean::obj_tag(x_22) == 0) +{ +obj* x_23; obj* x_24; obj* x_25; +lean::dec(x_19); +x_23 = l_Lean_nullKind; +x_24 = l_Lean_Parser_ParserState_mkNode(x_21, x_23, x_20); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +uint8 x_26; uint8 x_27; obj* x_28; obj* x_29; +x_26 = 0; +x_27 = 1; +lean::inc(x_8); +x_28 = l_Lean_Parser_sepByFn___main(x_26, x_27, x_4, x_5, x_7, x_8, x_24); +x_29 = lean::cnstr_get(x_28, 3); +lean::inc(x_29); +if (lean::obj_tag(x_29) == 0) +{ +obj* x_30; obj* x_31; obj* x_32; obj* x_33; +x_30 = lean::string_append(x_12, x_6); +x_31 = lean::string_append(x_30, x_14); +x_32 = l_Lean_Parser_symbolFnAux(x_6, x_31, x_8, x_28); +x_33 = l_Lean_Parser_ParserState_mkNode(x_32, x_1, x_11); +return x_33; +} +else +{ +obj* x_34; +lean::dec(x_29); +lean::dec(x_8); +x_34 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_11); +return x_34; +} +} +else +{ +obj* x_35; +lean::dec(x_25); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +x_35 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_11); +return x_35; +} +} +else +{ +obj* x_36; uint8 x_37; +lean::dec(x_22); +x_36 = lean::cnstr_get(x_21, 1); +lean::inc(x_36); +x_37 = lean::nat_dec_eq(x_36, x_19); +lean::dec(x_36); +if (x_37 == 0) +{ +obj* x_38; obj* x_39; obj* x_40; +lean::dec(x_19); +x_38 = l_Lean_nullKind; +x_39 = l_Lean_Parser_ParserState_mkNode(x_21, x_38, x_20); +x_40 = lean::cnstr_get(x_39, 3); +lean::inc(x_40); +if (lean::obj_tag(x_40) == 0) +{ +uint8 x_41; uint8 x_42; obj* x_43; obj* x_44; +x_41 = 0; +x_42 = 1; +lean::inc(x_8); +x_43 = l_Lean_Parser_sepByFn___main(x_41, x_42, x_4, x_5, x_7, x_8, x_39); +x_44 = lean::cnstr_get(x_43, 3); +lean::inc(x_44); +if (lean::obj_tag(x_44) == 0) +{ +obj* x_45; obj* x_46; obj* x_47; obj* x_48; +x_45 = lean::string_append(x_12, x_6); +x_46 = lean::string_append(x_45, x_14); +x_47 = l_Lean_Parser_symbolFnAux(x_6, x_46, x_8, x_43); +x_48 = l_Lean_Parser_ParserState_mkNode(x_47, x_1, x_11); +return x_48; +} +else +{ +obj* x_49; +lean::dec(x_44); +lean::dec(x_8); +x_49 = l_Lean_Parser_ParserState_mkNode(x_43, x_1, x_11); +return x_49; +} +} +else +{ +obj* x_50; +lean::dec(x_40); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +x_50 = l_Lean_Parser_ParserState_mkNode(x_39, x_1, x_11); +return x_50; +} +} +else +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; +x_51 = l_Lean_Parser_ParserState_restore(x_21, x_20, x_19); +x_52 = l_Lean_nullKind; +x_53 = l_Lean_Parser_ParserState_mkNode(x_51, x_52, x_20); +x_54 = lean::cnstr_get(x_53, 3); +lean::inc(x_54); +if (lean::obj_tag(x_54) == 0) +{ +uint8 x_55; uint8 x_56; obj* x_57; obj* x_58; +x_55 = 0; +x_56 = 1; +lean::inc(x_8); +x_57 = l_Lean_Parser_sepByFn___main(x_55, x_56, x_4, x_5, x_7, x_8, x_53); +x_58 = lean::cnstr_get(x_57, 3); +lean::inc(x_58); +if (lean::obj_tag(x_58) == 0) +{ +obj* x_59; obj* x_60; obj* x_61; obj* x_62; +x_59 = lean::string_append(x_12, x_6); +x_60 = lean::string_append(x_59, x_14); +x_61 = l_Lean_Parser_symbolFnAux(x_6, x_60, x_8, x_57); +x_62 = l_Lean_Parser_ParserState_mkNode(x_61, x_1, x_11); +return x_62; +} +else +{ +obj* x_63; +lean::dec(x_58); +lean::dec(x_8); +x_63 = l_Lean_Parser_ParserState_mkNode(x_57, x_1, x_11); +return x_63; +} +} +else +{ +obj* x_64; +lean::dec(x_54); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +x_64 = l_Lean_Parser_ParserState_mkNode(x_53, x_1, x_11); +return x_64; +} +} +} +} +} +else +{ +obj* x_91; +lean::dec(x_17); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +x_91 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_11); +return x_91; +} +} +} obj* _init_l_Lean_Parser_Term_structInst() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; uint8 x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2632,114 +4418,69 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::mk_string("ident"); -x_17 = l_Lean_Parser_mkAtomicInfo(x_16); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_20, 0, x_19); -x_21 = lean::box(0); -x_22 = lean::mk_string(" . "); -x_23 = l_String_trim(x_22); -lean::dec(x_22); -lean::inc(x_23); -x_24 = l_Lean_Parser_symbolInfo(x_23, x_21); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_25, 0, x_23); -x_26 = l_Lean_Parser_andthenInfo(x_17, x_24); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_20); -lean::closure_set(x_27, 1, x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_28, 0, x_27); -x_29 = l_Lean_Parser_noFirstTokenInfo(x_26); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); +x_15 = lean::mk_string("ident"); +x_16 = l_Lean_Parser_mkAtomicInfo(x_15); +x_17 = lean::box(0); +x_18 = lean::mk_string(" . "); +x_19 = l_String_trim(x_18); +lean::dec(x_18); +lean::inc(x_19); +x_20 = l_Lean_Parser_symbolInfo(x_19, x_17); +x_21 = l_Lean_Parser_andthenInfo(x_16, x_20); +x_22 = l_Lean_Parser_noFirstTokenInfo(x_21); +x_23 = l_Lean_Parser_Term_structInstField; +x_24 = lean::cnstr_get(x_23, 0); +lean::inc(x_24); +x_25 = l_Lean_Parser_Term_structInstSource; +x_26 = lean::cnstr_get(x_25, 0); +lean::inc(x_26); +x_27 = l_Lean_Parser_orelseInfo(x_24, x_26); +x_28 = lean::cnstr_get(x_23, 1); +lean::inc(x_28); +x_29 = lean::cnstr_get(x_25, 1); +lean::inc(x_29); +x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); lean::closure_set(x_30, 0, x_28); -x_31 = l_Lean_Parser_Term_structInstField; -x_32 = lean::cnstr_get(x_31, 0); +lean::closure_set(x_30, 1, x_29); +x_31 = lean::mk_string(", "); +x_32 = l_String_trim(x_31); +lean::dec(x_31); lean::inc(x_32); -x_33 = l_Lean_Parser_Term_structInstSource; -x_34 = lean::cnstr_get(x_33, 0); -lean::inc(x_34); -x_35 = l_Lean_Parser_orelseInfo(x_32, x_34); -x_36 = lean::mk_string(", "); +x_33 = l_Lean_Parser_symbolInfo(x_32, x_17); +x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_34, 0, x_32); +x_35 = l_Lean_Parser_sepByInfo(x_27, x_33); +x_36 = lean::mk_string("}"); x_37 = l_String_trim(x_36); lean::dec(x_36); -x_38 = l_Lean_Parser_symbolInfo(x_37, x_21); -x_39 = l_Lean_Parser_sepByInfo(x_35, x_38); -x_40 = 1; -x_41 = lean::box(x_18); -x_42 = lean::box(x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1___boxed), 5, 2); -lean::closure_set(x_43, 0, x_41); -lean::closure_set(x_43, 1, x_42); -x_44 = lean::mk_string("}"); -x_45 = l_String_trim(x_44); -lean::dec(x_44); -lean::inc(x_45); -x_46 = l_Lean_Parser_symbolInfo(x_45, x_21); -x_47 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_47, 0, x_45); -x_48 = l_Lean_Parser_andthenInfo(x_39, x_46); -x_49 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_49, 0, x_43); -lean::closure_set(x_49, 1, x_47); -x_50 = l_Lean_Parser_andthenInfo(x_29, x_48); -x_51 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_51, 0, x_30); -lean::closure_set(x_51, 1, x_49); -x_52 = l_Lean_Parser_andthenInfo(x_14, x_50); -x_53 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_53, 0, x_15); -lean::closure_set(x_53, 1, x_51); -x_54 = l_Lean_Parser_nodeInfo(x_52); -x_55 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_55, 0, x_9); -lean::closure_set(x_55, 1, x_53); -x_56 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_56, 0, x_54); -lean::cnstr_set(x_56, 1, x_55); -return x_56; +lean::inc(x_37); +x_38 = l_Lean_Parser_symbolInfo(x_37, x_17); +x_39 = l_Lean_Parser_andthenInfo(x_35, x_38); +x_40 = l_Lean_Parser_andthenInfo(x_22, x_39); +x_41 = l_Lean_Parser_andthenInfo(x_14, x_40); +x_42 = l_Lean_Parser_nodeInfo(x_41); +x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_structInst___elambda__1___boxed), 9, 6); +lean::closure_set(x_43, 0, x_9); +lean::closure_set(x_43, 1, x_13); +lean::closure_set(x_43, 2, x_19); +lean::closure_set(x_43, 3, x_30); +lean::closure_set(x_43, 4, x_34); +lean::closure_set(x_43, 5, x_37); +x_44 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_44, 0, x_42); +lean::cnstr_set(x_44, 1, x_43); +return x_44; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +obj* l_Lean_Parser_Term_structInst___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9) { _start: { -uint8 x_8; uint8 x_9; uint8 x_10; obj* x_11; -x_8 = lean::unbox(x_1); -lean::dec(x_1); -x_9 = lean::unbox(x_2); +obj* x_10; +x_10 = l_Lean_Parser_Term_structInst___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean::dec(x_6); +lean::dec(x_3); lean::dec(x_2); -x_10 = lean::unbox(x_4); -lean::dec(x_4); -x_11 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_structInst___spec__3(x_8, x_9, x_3, x_10, x_5, x_6, x_7); -return x_11; -} -} -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_structInst___spec__2(x_6, x_7, x_3, x_4, x_5); -return x_8; -} -} -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepByFn___at_Lean_Parser_Term_structInst___spec__1(x_6, x_7, x_3, x_4, x_5); -return x_8; +return x_10; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_structInst___closed__1() { @@ -2769,10 +4510,46 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_typeSpec___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Term_typeSpec() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2788,28 +4565,30 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_typeSpec___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_typeSpec___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_typeSpec___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l_Lean_Parser_Term_optType() { @@ -2830,10 +4609,118 @@ lean::cnstr_set(x_6, 1, x_5); return x_6; } } +obj* l_Lean_Parser_Term_subtype___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Char_HasRepr___closed__1; +x_14 = lean::string_append(x_12, x_13); +lean::inc(x_7); +x_15 = l_Lean_Parser_symbolFnAux(x_2, x_14, x_7, x_8); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +obj* x_17; obj* x_18; +lean::inc(x_7); +x_17 = l_Lean_Parser_identFn___rarg(x_7, x_15); +x_18 = lean::cnstr_get(x_17, 3); +lean::inc(x_18); +if (lean::obj_tag(x_18) == 0) +{ +obj* x_19; obj* x_20; +lean::inc(x_7); +x_19 = lean::apply_3(x_5, x_6, x_7, x_17); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; obj* x_24; +x_21 = lean::string_append(x_11, x_3); +x_22 = lean::string_append(x_21, x_13); +lean::inc(x_7); +x_23 = l_Lean_Parser_symbolFnAux(x_3, x_22, x_7, x_19); +x_24 = lean::cnstr_get(x_23, 3); +lean::inc(x_24); +if (lean::obj_tag(x_24) == 0) +{ +obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +x_25 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_26 = l_Lean_Parser_builtinTermParsingTable; +x_27 = lean::mk_nat_obj(0u); +lean::inc(x_7); +x_28 = l_Lean_Parser_runBuiltinParserUnsafe(x_25, x_26, x_27, x_7, x_23); +x_29 = lean::cnstr_get(x_28, 3); +lean::inc(x_29); +if (lean::obj_tag(x_29) == 0) +{ +obj* x_30; obj* x_31; obj* x_32; obj* x_33; +x_30 = lean::string_append(x_11, x_4); +x_31 = lean::string_append(x_30, x_13); +x_32 = l_Lean_Parser_symbolFnAux(x_4, x_31, x_7, x_28); +x_33 = l_Lean_Parser_ParserState_mkNode(x_32, x_1, x_10); +return x_33; +} +else +{ +obj* x_34; +lean::dec(x_29); +lean::dec(x_7); +x_34 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_10); +return x_34; +} +} +else +{ +obj* x_35; +lean::dec(x_24); +lean::dec(x_7); +x_35 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_10); +return x_35; +} +} +else +{ +obj* x_36; +lean::dec(x_20); +lean::dec(x_7); +x_36 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_10); +return x_36; +} +} +else +{ +obj* x_37; +lean::dec(x_18); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_5); +x_37 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_10); +return x_37; +} +} +else +{ +obj* x_38; +lean::dec(x_16); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_5); +x_38 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_10); +return x_38; +} +} +} obj* _init_l_Lean_Parser_Term_subtype() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; uint8 x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -2849,69 +4736,55 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::mk_string("ident"); -x_16 = l_Lean_Parser_mkAtomicInfo(x_15); -x_17 = 0; -x_18 = lean::box(x_17); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string(" // "); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -lean::inc(x_21); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_23, 0, x_21); -x_24 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_25 = lean::box(1); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_24); -lean::cnstr_set(x_26, 1, x_25); -x_27 = lean::mk_nat_obj(0u); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_28, 0, x_27); -x_29 = lean::mk_string("}"); -x_30 = l_String_trim(x_29); -lean::dec(x_29); +x_14 = lean::mk_string("ident"); +x_15 = l_Lean_Parser_mkAtomicInfo(x_14); +x_16 = lean::mk_string(" // "); +x_17 = l_String_trim(x_16); +lean::dec(x_16); +lean::inc(x_17); +x_18 = l_Lean_Parser_symbolInfo(x_17, x_10); +x_19 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_20 = lean::box(1); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +x_22 = lean::mk_string("}"); +x_23 = l_String_trim(x_22); +lean::dec(x_22); +lean::inc(x_23); +x_24 = l_Lean_Parser_symbolInfo(x_23, x_10); +x_25 = l_Lean_Parser_andthenInfo(x_21, x_24); +x_26 = l_Lean_Parser_andthenInfo(x_18, x_25); +x_27 = l_Lean_Parser_Term_optType; +x_28 = lean::cnstr_get(x_27, 0); +lean::inc(x_28); +x_29 = l_Lean_Parser_andthenInfo(x_28, x_26); +x_30 = lean::cnstr_get(x_27, 1); lean::inc(x_30); -x_31 = l_Lean_Parser_symbolInfo(x_30, x_10); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_32, 0, x_30); -x_33 = l_Lean_Parser_andthenInfo(x_26, x_31); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_34, 0, x_28); -lean::closure_set(x_34, 1, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_22, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_23); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_Term_optType; -x_38 = lean::cnstr_get(x_37, 0); -lean::inc(x_38); -x_39 = l_Lean_Parser_andthenInfo(x_38, x_35); -x_40 = lean::cnstr_get(x_37, 1); -lean::inc(x_40); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_41, 0, x_40); -lean::closure_set(x_41, 1, x_36); -x_42 = l_Lean_Parser_andthenInfo(x_16, x_39); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_19); -lean::closure_set(x_43, 1, x_41); -x_44 = l_Lean_Parser_andthenInfo(x_13, x_42); -x_45 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_45, 0, x_14); -lean::closure_set(x_45, 1, x_43); -x_46 = l_Lean_Parser_nodeInfo(x_44); -x_47 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_47, 0, x_9); -lean::closure_set(x_47, 1, x_45); -x_48 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_48, 0, x_46); -lean::cnstr_set(x_48, 1, x_47); -return x_48; +x_31 = l_Lean_Parser_andthenInfo(x_15, x_29); +x_32 = l_Lean_Parser_andthenInfo(x_13, x_31); +x_33 = l_Lean_Parser_nodeInfo(x_32); +x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_subtype___elambda__1___boxed), 8, 5); +lean::closure_set(x_34, 0, x_9); +lean::closure_set(x_34, 1, x_12); +lean::closure_set(x_34, 2, x_17); +lean::closure_set(x_34, 3, x_23); +lean::closure_set(x_34, 4, x_30); +x_35 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_35, 0, x_33); +lean::cnstr_set(x_35, 1, x_34); +return x_35; +} +} +obj* l_Lean_Parser_Term_subtype___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_subtype___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_subtype___closed__1() { @@ -2941,142 +4814,66 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } -obj* _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1() { +obj* l_Lean_Parser_Term_list___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { _start: { -obj* x_1; obj* x_2; -x_1 = lean::mk_string(","); -x_2 = l_String_trim(x_1); -lean::dec(x_1); -return x_2; -} -} -obj* _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2() { -_start: -{ -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; -x_1 = lean::mk_string(","); -x_2 = l_String_trim(x_1); -lean::dec(x_1); -x_3 = lean::mk_string("expected '"); -x_4 = lean::string_append(x_3, x_2); -lean::dec(x_2); -x_5 = lean::mk_string("'"); -x_6 = lean::string_append(x_4, x_5); -lean::dec(x_5); -return x_6; -} -} -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3(uint8 x_1, uint8 x_2, obj* x_3, uint8 x_4, obj* x_5, obj* x_6, obj* x_7) { -_start: -{ -obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; -x_8 = lean::cnstr_get(x_7, 0); -lean::inc(x_8); -x_9 = lean::array_get_size(x_8); -lean::dec(x_8); -x_10 = lean::cnstr_get(x_7, 1); -lean::inc(x_10); -x_11 = l_Lean_Parser_termParserFn___rarg___closed__1; -x_12 = l_Lean_Parser_builtinTermParsingTable; -x_13 = lean::mk_nat_obj(0u); -lean::inc(x_6); -x_14 = l_Lean_Parser_runBuiltinParserUnsafe(x_11, x_12, x_13, x_6, x_7); -x_15 = lean::cnstr_get(x_14, 3); -lean::inc(x_15); -if (lean::obj_tag(x_15) == 0) -{ -obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; -lean::dec(x_10); +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); lean::dec(x_9); -x_16 = lean::cnstr_get(x_14, 0); +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Char_HasRepr___closed__1; +x_14 = lean::string_append(x_12, x_13); +lean::inc(x_7); +x_15 = l_Lean_Parser_symbolFnAux(x_2, x_14, x_7, x_8); +x_16 = lean::cnstr_get(x_15, 3); lean::inc(x_16); -x_17 = lean::array_get_size(x_16); -lean::dec(x_16); -x_18 = lean::cnstr_get(x_14, 1); -lean::inc(x_18); -x_19 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1; -x_20 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2; -lean::inc(x_6); -x_21 = l_Lean_Parser_symbolFnAux(x_19, x_20, x_6, x_14); -x_22 = lean::cnstr_get(x_21, 3); -lean::inc(x_22); -if (lean::obj_tag(x_22) == 0) +if (lean::obj_tag(x_16) == 0) { -lean::dec(x_18); -lean::dec(x_17); +uint8 x_17; uint8 x_18; obj* x_19; obj* x_20; +x_17 = 0; +x_18 = 1; +lean::inc(x_7); +x_19 = l_Lean_Parser_sepByFn___main(x_17, x_18, x_3, x_4, x_6, x_7, x_15); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) { -uint8 _tmp_3 = x_2; -obj* _tmp_6 = x_21; -x_4 = _tmp_3; -x_7 = _tmp_6; -} -goto _start; +obj* x_21; obj* x_22; obj* x_23; obj* x_24; +x_21 = lean::string_append(x_11, x_5); +x_22 = lean::string_append(x_21, x_13); +x_23 = l_Lean_Parser_symbolFnAux(x_5, x_22, x_7, x_19); +x_24 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_10); +return x_24; } else { -obj* x_24; obj* x_25; obj* x_26; -lean::dec(x_22); +obj* x_25; +lean::dec(x_20); +lean::dec(x_7); +x_25 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_10); +return x_25; +} +} +else +{ +obj* x_26; +lean::dec(x_16); +lean::dec(x_7); lean::dec(x_6); -x_24 = l_Lean_Parser_ParserState_restore(x_21, x_17, x_18); -lean::dec(x_17); -x_25 = l_Lean_nullKind; -x_26 = l_Lean_Parser_ParserState_mkNode(x_24, x_25, x_3); +lean::dec(x_4); +lean::dec(x_3); +x_26 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_10); return x_26; } } -else -{ -lean::dec(x_15); -lean::dec(x_6); -if (x_4 == 0) -{ -obj* x_27; obj* x_28; obj* x_29; obj* x_30; -lean::dec(x_10); -lean::dec(x_9); -x_27 = lean::box(0); -x_28 = l_Lean_Parser_ParserState_pushSyntax(x_14, x_27); -x_29 = l_Lean_nullKind; -x_30 = l_Lean_Parser_ParserState_mkNode(x_28, x_29, x_3); -return x_30; -} -else -{ -obj* x_31; obj* x_32; obj* x_33; -x_31 = l_Lean_Parser_ParserState_restore(x_14, x_9, x_10); -lean::dec(x_9); -x_32 = l_Lean_nullKind; -x_33 = l_Lean_Parser_ParserState_mkNode(x_31, x_32, x_3); -return x_33; -} -} -} -} -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; obj* x_7; uint8 x_8; obj* x_9; -x_6 = lean::cnstr_get(x_5, 0); -lean::inc(x_6); -x_7 = lean::array_get_size(x_6); -lean::dec(x_6); -x_8 = 1; -x_9 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3(x_1, x_2, x_7, x_8, x_3, x_4, x_5); -return x_9; -} -} -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1(uint8 x_1, uint8 x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; -x_6 = l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2(x_1, x_2, x_3, x_4, x_5); -return x_6; -} } obj* _init_l_Lean_Parser_Term_list() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; uint8 x_24; uint8 x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3094,90 +4891,51 @@ x_13 = l_String_trim(x_12); lean::dec(x_12); lean::inc(x_13); x_14 = l_Lean_Parser_symbolInfo(x_13, x_11); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_15, 0, x_13); -x_16 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_17 = lean::box(1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -x_19 = lean::box(0); -x_20 = lean::mk_string(","); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_19); -x_23 = l_Lean_Parser_sepByInfo(x_18, x_22); -x_24 = 0; -x_25 = 1; -x_26 = lean::box(x_24); -x_27 = lean::box(x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1___boxed), 5, 2); -lean::closure_set(x_28, 0, x_26); -lean::closure_set(x_28, 1, x_27); -x_29 = lean::mk_string("]"); -x_30 = l_String_trim(x_29); -lean::dec(x_29); -lean::inc(x_30); -x_31 = l_Lean_Parser_symbolInfo(x_30, x_19); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_32, 0, x_30); -x_33 = l_Lean_Parser_andthenInfo(x_23, x_31); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_34, 0, x_28); -lean::closure_set(x_34, 1, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_14, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_15); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_nodeInfo(x_35); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_9); -lean::closure_set(x_38, 1, x_36); -x_39 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_39, 0, x_37); -lean::cnstr_set(x_39, 1, x_38); -return x_39; +x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_16 = lean::box(1); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +x_18 = lean::mk_nat_obj(0u); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_19, 0, x_18); +x_20 = lean::box(0); +x_21 = lean::mk_string(","); +x_22 = l_String_trim(x_21); +lean::dec(x_21); +lean::inc(x_22); +x_23 = l_Lean_Parser_symbolInfo(x_22, x_20); +x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_24, 0, x_22); +x_25 = l_Lean_Parser_sepByInfo(x_17, x_23); +x_26 = lean::mk_string("]"); +x_27 = l_String_trim(x_26); +lean::dec(x_26); +lean::inc(x_27); +x_28 = l_Lean_Parser_symbolInfo(x_27, x_20); +x_29 = l_Lean_Parser_andthenInfo(x_25, x_28); +x_30 = l_Lean_Parser_andthenInfo(x_14, x_29); +x_31 = l_Lean_Parser_nodeInfo(x_30); +x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_list___elambda__1___boxed), 8, 5); +lean::closure_set(x_32, 0, x_9); +lean::closure_set(x_32, 1, x_13); +lean::closure_set(x_32, 2, x_19); +lean::closure_set(x_32, 3, x_24); +lean::closure_set(x_32, 4, x_27); +x_33 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_33, 0, x_31); +lean::cnstr_set(x_33, 1, x_32); +return x_33; } } -obj* l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +obj* l_Lean_Parser_Term_list___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { _start: { -uint8 x_8; uint8 x_9; uint8 x_10; obj* x_11; -x_8 = lean::unbox(x_1); -lean::dec(x_1); -x_9 = lean::unbox(x_2); -lean::dec(x_2); -x_10 = lean::unbox(x_4); -lean::dec(x_4); -x_11 = l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3(x_8, x_9, x_3, x_10, x_5, x_6, x_7); +obj* x_9; +x_9 = l_Lean_Parser_Term_list___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); lean::dec(x_5); -return x_11; -} -} -obj* l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); lean::dec(x_2); -x_8 = l_Lean_Parser_sepByFn___main___at_Lean_Parser_Term_list___spec__2(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); -return x_8; -} -} -obj* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; uint8 x_7; obj* x_8; -x_6 = lean::unbox(x_1); -lean::dec(x_1); -x_7 = lean::unbox(x_2); -lean::dec(x_2); -x_8 = l_Lean_Parser_sepByFn___at_Lean_Parser_Term_list___spec__1(x_6, x_7, x_3, x_4, x_5); -lean::dec(x_3); -return x_8; +return x_9; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_list___closed__1() { @@ -3322,10 +5080,46 @@ x_3 = l_Lean_Parser_Term_binderType(x_2); return x_3; } } +obj* l_Lean_Parser_Term_binderDefault___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Term_binderDefault() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3341,34 +5135,72 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_binderDefault___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_binderDefault___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_binderDefault___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_binderTactic___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} } } obj* _init_l_Lean_Parser_Term_binderTactic() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3384,137 +5216,331 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_binderTactic___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_binderTactic___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_binderTactic___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; +} +} +obj* l_Lean_Parser_Term_explicitBinder___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; obj* x_12; obj* x_13; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; obj* x_70; +x_11 = lean::cnstr_get(x_10, 0); +lean::inc(x_11); +x_12 = lean::array_get_size(x_11); +lean::dec(x_11); +x_65 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_66 = lean::string_append(x_65, x_2); +x_67 = l_Char_HasRepr___closed__1; +x_68 = lean::string_append(x_66, x_67); +lean::inc(x_9); +x_69 = l_Lean_Parser_symbolFnAux(x_2, x_68, x_9, x_10); +x_70 = lean::cnstr_get(x_69, 3); +lean::inc(x_70); +if (lean::obj_tag(x_70) == 0) +{ +obj* x_71; obj* x_72; obj* x_73; obj* x_74; +x_71 = lean::cnstr_get(x_69, 0); +lean::inc(x_71); +x_72 = lean::array_get_size(x_71); +lean::dec(x_71); +lean::inc(x_3); +lean::inc(x_9); +lean::inc(x_8); +x_73 = lean::apply_3(x_3, x_8, x_9, x_69); +x_74 = lean::cnstr_get(x_73, 3); +lean::inc(x_74); +if (lean::obj_tag(x_74) == 0) +{ +uint8 x_75; obj* x_76; obj* x_77; obj* x_78; +x_75 = 0; +lean::inc(x_9); +lean::inc(x_8); +x_76 = l_Lean_Parser_manyAux___main(x_75, x_3, x_8, x_9, x_73); +x_77 = l_Lean_nullKind; +x_78 = l_Lean_Parser_ParserState_mkNode(x_76, x_77, x_72); +x_13 = x_78; +goto block_64; +} +else +{ +obj* x_79; obj* x_80; +lean::dec(x_74); +lean::dec(x_3); +x_79 = l_Lean_nullKind; +x_80 = l_Lean_Parser_ParserState_mkNode(x_73, x_79, x_72); +x_13 = x_80; +goto block_64; +} +} +else +{ +obj* x_81; +lean::dec(x_70); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +x_81 = l_Lean_Parser_ParserState_mkNode(x_69, x_1, x_12); +return x_81; +} +block_64: +{ +obj* x_14; +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; +lean::inc(x_9); +lean::inc(x_8); +x_15 = lean::apply_3(x_7, x_8, x_9, x_13); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_56; obj* x_57; +x_17 = lean::cnstr_get(x_15, 0); +lean::inc(x_17); +x_18 = lean::array_get_size(x_17); +lean::dec(x_17); +x_19 = lean::cnstr_get(x_15, 1); +lean::inc(x_19); +lean::inc(x_9); +lean::inc(x_8); +x_56 = lean::apply_3(x_4, x_8, x_9, x_15); +x_57 = lean::cnstr_get(x_56, 3); +lean::inc(x_57); +if (lean::obj_tag(x_57) == 0) +{ +lean::dec(x_8); +lean::dec(x_5); +x_20 = x_56; +goto block_55; +} +else +{ +obj* x_58; uint8 x_59; +lean::dec(x_57); +x_58 = lean::cnstr_get(x_56, 1); +lean::inc(x_58); +x_59 = lean::nat_dec_eq(x_58, x_19); +lean::dec(x_58); +if (x_59 == 0) +{ +lean::dec(x_8); +lean::dec(x_5); +x_20 = x_56; +goto block_55; +} +else +{ +obj* x_60; obj* x_61; +lean::inc(x_19); +x_60 = l_Lean_Parser_ParserState_restore(x_56, x_18, x_19); +lean::inc(x_9); +x_61 = lean::apply_3(x_5, x_8, x_9, x_60); +x_20 = x_61; +goto block_55; +} +} +block_55: +{ +obj* x_21; +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +obj* x_22; obj* x_23; obj* x_24; +lean::dec(x_19); +x_22 = l_Lean_nullKind; +x_23 = l_Lean_Parser_ParserState_mkNode(x_20, x_22, x_18); +x_24 = lean::cnstr_get(x_23, 3); +lean::inc(x_24); +if (lean::obj_tag(x_24) == 0) +{ +obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_25 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_26 = lean::string_append(x_25, x_6); +x_27 = l_Char_HasRepr___closed__1; +x_28 = lean::string_append(x_26, x_27); +x_29 = l_Lean_Parser_symbolFnAux(x_6, x_28, x_9, x_23); +x_30 = l_Lean_Parser_ParserState_mkNode(x_29, x_1, x_12); +return x_30; +} +else +{ +obj* x_31; +lean::dec(x_24); +lean::dec(x_9); +x_31 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_12); +return x_31; +} +} +else +{ +obj* x_32; uint8 x_33; +lean::dec(x_21); +x_32 = lean::cnstr_get(x_20, 1); +lean::inc(x_32); +x_33 = lean::nat_dec_eq(x_32, x_19); +lean::dec(x_32); +if (x_33 == 0) +{ +obj* x_34; obj* x_35; obj* x_36; +lean::dec(x_19); +x_34 = l_Lean_nullKind; +x_35 = l_Lean_Parser_ParserState_mkNode(x_20, x_34, x_18); +x_36 = lean::cnstr_get(x_35, 3); +lean::inc(x_36); +if (lean::obj_tag(x_36) == 0) +{ +obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; +x_37 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_38 = lean::string_append(x_37, x_6); +x_39 = l_Char_HasRepr___closed__1; +x_40 = lean::string_append(x_38, x_39); +x_41 = l_Lean_Parser_symbolFnAux(x_6, x_40, x_9, x_35); +x_42 = l_Lean_Parser_ParserState_mkNode(x_41, x_1, x_12); +return x_42; +} +else +{ +obj* x_43; +lean::dec(x_36); +lean::dec(x_9); +x_43 = l_Lean_Parser_ParserState_mkNode(x_35, x_1, x_12); +return x_43; +} +} +else +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; +x_44 = l_Lean_Parser_ParserState_restore(x_20, x_18, x_19); +x_45 = l_Lean_nullKind; +x_46 = l_Lean_Parser_ParserState_mkNode(x_44, x_45, x_18); +x_47 = lean::cnstr_get(x_46, 3); +lean::inc(x_47); +if (lean::obj_tag(x_47) == 0) +{ +obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; +x_48 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_49 = lean::string_append(x_48, x_6); +x_50 = l_Char_HasRepr___closed__1; +x_51 = lean::string_append(x_49, x_50); +x_52 = l_Lean_Parser_symbolFnAux(x_6, x_51, x_9, x_46); +x_53 = l_Lean_Parser_ParserState_mkNode(x_52, x_1, x_12); +return x_53; +} +else +{ +obj* x_54; +lean::dec(x_47); +lean::dec(x_9); +x_54 = l_Lean_Parser_ParserState_mkNode(x_46, x_1, x_12); +return x_54; +} +} +} +} +} +else +{ +obj* x_62; +lean::dec(x_16); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_5); +lean::dec(x_4); +x_62 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_12); +return x_62; +} +} +else +{ +obj* x_63; +lean::dec(x_14); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_5); +lean::dec(x_4); +x_63 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_12); +return x_63; +} +} } } obj* _init_l_Lean_Parser_Term_explicitBinder___closed__1() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; x_1 = lean::box(0); -x_2 = lean::mk_string("Lean"); -x_3 = lean_name_mk_string(x_1, x_2); -x_4 = lean::mk_string("Parser"); -x_5 = lean_name_mk_string(x_3, x_4); -x_6 = lean::mk_string("Term"); -x_7 = lean_name_mk_string(x_5, x_6); -x_8 = lean::mk_string("explicitBinder"); -x_9 = lean_name_mk_string(x_7, x_8); -x_10 = lean::box(0); -x_11 = lean::mk_string("("); -x_12 = l_String_trim(x_11); -lean::dec(x_11); -lean::inc(x_12); -x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_Term_binderIdent; -x_16 = lean::cnstr_get(x_15, 0); -lean::inc(x_16); -x_17 = lean::cnstr_get(x_15, 1); -lean::inc(x_17); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_20, 0, x_19); -lean::closure_set(x_20, 1, x_17); -x_21 = l_Lean_Parser_Term_binderDefault; -x_22 = lean::cnstr_get(x_21, 0); -lean::inc(x_22); -x_23 = l_Lean_Parser_Term_binderTactic; -x_24 = lean::cnstr_get(x_23, 0); -lean::inc(x_24); -x_25 = l_Lean_Parser_orelseInfo(x_22, x_24); -x_26 = lean::cnstr_get(x_21, 1); -lean::inc(x_26); -x_27 = lean::cnstr_get(x_23, 1); -lean::inc(x_27); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_28, 0, x_26); -lean::closure_set(x_28, 1, x_27); -x_29 = l_Lean_Parser_noFirstTokenInfo(x_25); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_30, 0, x_28); -x_31 = lean::mk_string(")"); -x_32 = l_String_trim(x_31); -lean::dec(x_31); -lean::inc(x_32); -x_33 = l_Lean_Parser_symbolInfo(x_32, x_10); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_34, 0, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_29, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_30); -lean::closure_set(x_36, 1, x_34); -x_37 = lean::mk_string(" : "); -x_38 = l_String_trim(x_37); -lean::dec(x_37); -lean::inc(x_38); -x_39 = l_Lean_Parser_symbolInfo(x_38, x_10); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_40, 0, x_38); -x_41 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_42 = lean::box(1); -x_43 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_43, 0, x_41); -lean::cnstr_set(x_43, 1, x_42); -x_44 = lean::mk_nat_obj(0u); -x_45 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_45, 0, x_44); -x_46 = l_Lean_Parser_andthenInfo(x_39, x_43); -x_47 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_47, 0, x_40); -lean::closure_set(x_47, 1, x_45); -x_48 = l_Lean_Parser_noFirstTokenInfo(x_46); -x_49 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_49, 0, x_47); -x_50 = l_Lean_Parser_andthenInfo(x_48, x_35); -x_51 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_51, 0, x_49); -lean::closure_set(x_51, 1, x_36); -x_52 = l_Lean_Parser_andthenInfo(x_16, x_50); -x_53 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_53, 0, x_20); -lean::closure_set(x_53, 1, x_51); -x_54 = l_Lean_Parser_andthenInfo(x_13, x_52); -x_55 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_55, 0, x_14); -lean::closure_set(x_55, 1, x_53); -x_56 = l_Lean_Parser_nodeInfo(x_54); -x_57 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_57, 0, x_9); -lean::closure_set(x_57, 1, x_55); -x_58 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_58, 0, x_56); -lean::cnstr_set(x_58, 1, x_57); -return x_58; +x_2 = l_Lean_Parser_Term_binderDefault; +x_3 = lean::cnstr_get(x_2, 0); +lean::inc(x_3); +x_4 = l_Lean_Parser_Term_binderTactic; +x_5 = lean::cnstr_get(x_4, 0); +lean::inc(x_5); +x_6 = l_Lean_Parser_orelseInfo(x_3, x_5); +x_7 = l_Lean_Parser_noFirstTokenInfo(x_6); +x_8 = lean::mk_string(")"); +x_9 = l_String_trim(x_8); +lean::dec(x_8); +x_10 = l_Lean_Parser_symbolInfo(x_9, x_1); +x_11 = l_Lean_Parser_andthenInfo(x_7, x_10); +return x_11; } } obj* _init_l_Lean_Parser_Term_explicitBinder___closed__2() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +obj* x_1; obj* x_2; +x_1 = l_Lean_Parser_Term_binderIdent; +x_2 = lean::cnstr_get(x_1, 0); +lean::inc(x_2); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__3() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; +x_1 = lean::box(0); +x_2 = lean::mk_string("("); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +return x_4; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__4() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3524,91 +5550,162 @@ x_6 = lean::mk_string("Term"); x_7 = lean_name_mk_string(x_5, x_6); x_8 = lean::mk_string("explicitBinder"); x_9 = lean_name_mk_string(x_7, x_8); -x_10 = lean::box(0); -x_11 = lean::mk_string("("); -x_12 = l_String_trim(x_11); -lean::dec(x_11); -lean::inc(x_12); -x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +return x_9; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__5() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_string("("); +x_2 = l_String_trim(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__6() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = l_Lean_Parser_Term_binderIdent; +x_2 = lean::cnstr_get(x_1, 1); +lean::inc(x_2); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__7() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = l_Lean_Parser_Term_binderDefault; +x_2 = lean::cnstr_get(x_1, 1); +lean::inc(x_2); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__8() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = l_Lean_Parser_Term_binderTactic; +x_2 = lean::cnstr_get(x_1, 1); +lean::inc(x_2); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__9() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_string(")"); +x_2 = l_String_trim(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__10() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +x_1 = lean::box(0); +x_2 = lean::mk_string(" : "); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +lean::inc(x_3); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_5, 0, x_3); +x_6 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_7 = lean::box(1); +x_8 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_8, 0, x_6); +lean::cnstr_set(x_8, 1, x_7); +x_9 = lean::mk_nat_obj(0u); +x_10 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_10, 0, x_9); +x_11 = l_Lean_Parser_andthenInfo(x_4, x_8); +x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean::closure_set(x_12, 0, x_5); +lean::closure_set(x_12, 1, x_10); +x_13 = l_Lean_Parser_noFirstTokenInfo(x_11); +x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_Term_binderIdent; -x_16 = lean::cnstr_get(x_15, 0); -lean::inc(x_16); -x_17 = lean::cnstr_get(x_15, 1); -lean::inc(x_17); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_20, 0, x_19); -lean::closure_set(x_20, 1, x_17); -x_21 = l_Lean_Parser_Term_binderDefault; -x_22 = lean::cnstr_get(x_21, 0); -lean::inc(x_22); -x_23 = l_Lean_Parser_Term_binderTactic; -x_24 = lean::cnstr_get(x_23, 0); -lean::inc(x_24); -x_25 = l_Lean_Parser_orelseInfo(x_22, x_24); -x_26 = lean::cnstr_get(x_21, 1); -lean::inc(x_26); -x_27 = lean::cnstr_get(x_23, 1); -lean::inc(x_27); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_28, 0, x_26); -lean::closure_set(x_28, 1, x_27); -x_29 = l_Lean_Parser_noFirstTokenInfo(x_25); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_30, 0, x_28); -x_31 = lean::mk_string(")"); -x_32 = l_String_trim(x_31); -lean::dec(x_31); -lean::inc(x_32); -x_33 = l_Lean_Parser_symbolInfo(x_32, x_10); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_34, 0, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_29, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_30); -lean::closure_set(x_36, 1, x_34); -x_37 = lean::mk_string(" : "); -x_38 = l_String_trim(x_37); -lean::dec(x_37); -lean::inc(x_38); -x_39 = l_Lean_Parser_symbolInfo(x_38, x_10); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_40, 0, x_38); -x_41 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_42 = lean::box(1); -x_43 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_43, 0, x_41); -lean::cnstr_set(x_43, 1, x_42); -x_44 = lean::mk_nat_obj(0u); -x_45 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_45, 0, x_44); -x_46 = l_Lean_Parser_andthenInfo(x_39, x_43); -x_47 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_47, 0, x_40); -lean::closure_set(x_47, 1, x_45); -x_48 = l_Lean_Parser_andthenInfo(x_46, x_35); -x_49 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_49, 0, x_47); -lean::closure_set(x_49, 1, x_36); -x_50 = l_Lean_Parser_andthenInfo(x_16, x_48); -x_51 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_51, 0, x_20); -lean::closure_set(x_51, 1, x_49); -x_52 = l_Lean_Parser_andthenInfo(x_13, x_50); -x_53 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_53, 0, x_14); -lean::closure_set(x_53, 1, x_51); -x_54 = l_Lean_Parser_nodeInfo(x_52); -x_55 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_55, 0, x_9); -lean::closure_set(x_55, 1, x_53); -x_56 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_56, 0, x_54); -lean::cnstr_set(x_56, 1, x_55); -return x_56; +x_15 = l_Lean_Parser_Term_explicitBinder___closed__1; +x_16 = l_Lean_Parser_andthenInfo(x_13, x_15); +x_17 = l_Lean_Parser_Term_explicitBinder___closed__2; +x_18 = l_Lean_Parser_andthenInfo(x_17, x_16); +x_19 = l_Lean_Parser_Term_explicitBinder___closed__3; +x_20 = l_Lean_Parser_andthenInfo(x_19, x_18); +x_21 = l_Lean_Parser_nodeInfo(x_20); +x_22 = l_Lean_Parser_Term_explicitBinder___closed__4; +x_23 = l_Lean_Parser_Term_explicitBinder___closed__5; +x_24 = l_Lean_Parser_Term_explicitBinder___closed__6; +x_25 = l_Lean_Parser_Term_explicitBinder___closed__7; +x_26 = l_Lean_Parser_Term_explicitBinder___closed__8; +x_27 = l_Lean_Parser_Term_explicitBinder___closed__9; +x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_explicitBinder___elambda__1___boxed), 10, 7); +lean::closure_set(x_28, 0, x_22); +lean::closure_set(x_28, 1, x_23); +lean::closure_set(x_28, 2, x_24); +lean::closure_set(x_28, 3, x_25); +lean::closure_set(x_28, 4, x_26); +lean::closure_set(x_28, 5, x_27); +lean::closure_set(x_28, 6, x_14); +x_29 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_29, 0, x_21); +lean::cnstr_set(x_29, 1, x_28); +return x_29; +} +} +obj* _init_l_Lean_Parser_Term_explicitBinder___closed__11() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_1 = lean::box(0); +x_2 = lean::mk_string(" : "); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +lean::inc(x_3); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_5, 0, x_3); +x_6 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_7 = lean::box(1); +x_8 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_8, 0, x_6); +lean::cnstr_set(x_8, 1, x_7); +x_9 = lean::mk_nat_obj(0u); +x_10 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_10, 0, x_9); +x_11 = l_Lean_Parser_andthenInfo(x_4, x_8); +x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean::closure_set(x_12, 0, x_5); +lean::closure_set(x_12, 1, x_10); +x_13 = l_Lean_Parser_Term_explicitBinder___closed__1; +x_14 = l_Lean_Parser_andthenInfo(x_11, x_13); +x_15 = l_Lean_Parser_Term_explicitBinder___closed__2; +x_16 = l_Lean_Parser_andthenInfo(x_15, x_14); +x_17 = l_Lean_Parser_Term_explicitBinder___closed__3; +x_18 = l_Lean_Parser_andthenInfo(x_17, x_16); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = l_Lean_Parser_Term_explicitBinder___closed__4; +x_21 = l_Lean_Parser_Term_explicitBinder___closed__5; +x_22 = l_Lean_Parser_Term_explicitBinder___closed__6; +x_23 = l_Lean_Parser_Term_explicitBinder___closed__7; +x_24 = l_Lean_Parser_Term_explicitBinder___closed__8; +x_25 = l_Lean_Parser_Term_explicitBinder___closed__9; +x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_explicitBinder___elambda__1___boxed), 10, 7); +lean::closure_set(x_26, 0, x_20); +lean::closure_set(x_26, 1, x_21); +lean::closure_set(x_26, 2, x_22); +lean::closure_set(x_26, 3, x_23); +lean::closure_set(x_26, 4, x_24); +lean::closure_set(x_26, 5, x_25); +lean::closure_set(x_26, 6, x_12); +x_27 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_27, 0, x_19); +lean::cnstr_set(x_27, 1, x_26); +return x_27; } } obj* l_Lean_Parser_Term_explicitBinder(uint8 x_1) { @@ -3617,17 +5714,27 @@ _start: if (x_1 == 0) { obj* x_2; -x_2 = l_Lean_Parser_Term_explicitBinder___closed__1; +x_2 = l_Lean_Parser_Term_explicitBinder___closed__10; return x_2; } else { obj* x_3; -x_3 = l_Lean_Parser_Term_explicitBinder___closed__2; +x_3 = l_Lean_Parser_Term_explicitBinder___closed__11; return x_3; } } } +obj* l_Lean_Parser_Term_explicitBinder___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; +x_11 = l_Lean_Parser_Term_explicitBinder___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean::dec(x_6); +lean::dec(x_2); +return x_11; +} +} obj* l_Lean_Parser_Term_explicitBinder___boxed(obj* x_1) { _start: { @@ -3638,92 +5745,169 @@ x_3 = l_Lean_Parser_Term_explicitBinder(x_2); return x_3; } } +obj* l_Lean_Parser_Term_implicitBinder___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Char_HasRepr___closed__1; +x_14 = lean::string_append(x_12, x_13); +lean::inc(x_7); +x_15 = l_Lean_Parser_symbolFnAux(x_2, x_14, x_7, x_8); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +obj* x_17; obj* x_18; obj* x_19; obj* x_20; +x_17 = lean::cnstr_get(x_15, 0); +lean::inc(x_17); +x_18 = lean::array_get_size(x_17); +lean::dec(x_17); +lean::inc(x_3); +lean::inc(x_7); +lean::inc(x_6); +x_19 = lean::apply_3(x_3, x_6, x_7, x_15); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +uint8 x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_21 = 0; +lean::inc(x_7); +lean::inc(x_6); +x_22 = l_Lean_Parser_manyAux___main(x_21, x_3, x_6, x_7, x_19); +x_23 = l_Lean_nullKind; +x_24 = l_Lean_Parser_ParserState_mkNode(x_22, x_23, x_18); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +obj* x_26; obj* x_27; +lean::inc(x_7); +x_26 = lean::apply_3(x_5, x_6, x_7, x_24); +x_27 = lean::cnstr_get(x_26, 3); +lean::inc(x_27); +if (lean::obj_tag(x_27) == 0) +{ +obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_28 = lean::string_append(x_11, x_4); +x_29 = lean::string_append(x_28, x_13); +x_30 = l_Lean_Parser_symbolFnAux(x_4, x_29, x_7, x_26); +x_31 = l_Lean_Parser_ParserState_mkNode(x_30, x_1, x_10); +return x_31; +} +else +{ +obj* x_32; +lean::dec(x_27); +lean::dec(x_7); +x_32 = l_Lean_Parser_ParserState_mkNode(x_26, x_1, x_10); +return x_32; +} +} +else +{ +obj* x_33; +lean::dec(x_25); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_5); +x_33 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_10); +return x_33; +} +} +else +{ +obj* x_34; obj* x_35; obj* x_36; +lean::dec(x_20); +lean::dec(x_3); +x_34 = l_Lean_nullKind; +x_35 = l_Lean_Parser_ParserState_mkNode(x_19, x_34, x_18); +x_36 = lean::cnstr_get(x_35, 3); +lean::inc(x_36); +if (lean::obj_tag(x_36) == 0) +{ +obj* x_37; obj* x_38; +lean::inc(x_7); +x_37 = lean::apply_3(x_5, x_6, x_7, x_35); +x_38 = lean::cnstr_get(x_37, 3); +lean::inc(x_38); +if (lean::obj_tag(x_38) == 0) +{ +obj* x_39; obj* x_40; obj* x_41; obj* x_42; +x_39 = lean::string_append(x_11, x_4); +x_40 = lean::string_append(x_39, x_13); +x_41 = l_Lean_Parser_symbolFnAux(x_4, x_40, x_7, x_37); +x_42 = l_Lean_Parser_ParserState_mkNode(x_41, x_1, x_10); +return x_42; +} +else +{ +obj* x_43; +lean::dec(x_38); +lean::dec(x_7); +x_43 = l_Lean_Parser_ParserState_mkNode(x_37, x_1, x_10); +return x_43; +} +} +else +{ +obj* x_44; +lean::dec(x_36); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_5); +x_44 = l_Lean_Parser_ParserState_mkNode(x_35, x_1, x_10); +return x_44; +} +} +} +else +{ +obj* x_45; +lean::dec(x_16); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_3); +x_45 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_10); +return x_45; +} +} +} obj* _init_l_Lean_Parser_Term_implicitBinder___closed__1() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::box(0); -x_2 = lean::mk_string("Lean"); -x_3 = lean_name_mk_string(x_1, x_2); -x_4 = lean::mk_string("Parser"); -x_5 = lean_name_mk_string(x_3, x_4); -x_6 = lean::mk_string("Term"); -x_7 = lean_name_mk_string(x_5, x_6); -x_8 = lean::mk_string("implicitBinder"); -x_9 = lean_name_mk_string(x_7, x_8); -x_10 = lean::box(0); -x_11 = lean::mk_string("{"); -x_12 = l_String_trim(x_11); -lean::dec(x_11); -lean::inc(x_12); -x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_Term_binderIdent; -x_16 = lean::cnstr_get(x_15, 0); -lean::inc(x_16); -x_17 = lean::cnstr_get(x_15, 1); -lean::inc(x_17); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_20, 0, x_19); -lean::closure_set(x_20, 1, x_17); -x_21 = lean::mk_string("}"); -x_22 = l_String_trim(x_21); -lean::dec(x_21); -lean::inc(x_22); -x_23 = l_Lean_Parser_symbolInfo(x_22, x_10); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_24, 0, x_22); -x_25 = lean::mk_string(" : "); -x_26 = l_String_trim(x_25); -lean::dec(x_25); -lean::inc(x_26); -x_27 = l_Lean_Parser_symbolInfo(x_26, x_10); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_28, 0, x_26); -x_29 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_30 = lean::box(1); -x_31 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_31, 0, x_29); -lean::cnstr_set(x_31, 1, x_30); -x_32 = lean::mk_nat_obj(0u); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_33, 0, x_32); -x_34 = l_Lean_Parser_andthenInfo(x_27, x_31); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_28); -lean::closure_set(x_35, 1, x_33); -x_36 = l_Lean_Parser_noFirstTokenInfo(x_34); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_37, 0, x_35); -x_38 = l_Lean_Parser_andthenInfo(x_36, x_23); -x_39 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_39, 0, x_37); -lean::closure_set(x_39, 1, x_24); -x_40 = l_Lean_Parser_andthenInfo(x_16, x_38); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_41, 0, x_20); -lean::closure_set(x_41, 1, x_39); -x_42 = l_Lean_Parser_andthenInfo(x_13, x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_14); -lean::closure_set(x_43, 1, x_41); -x_44 = l_Lean_Parser_nodeInfo(x_42); -x_45 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_45, 0, x_9); -lean::closure_set(x_45, 1, x_43); -x_46 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_46, 0, x_44); -lean::cnstr_set(x_46, 1, x_45); -return x_46; +x_2 = lean::mk_string("}"); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +return x_4; } } obj* _init_l_Lean_Parser_Term_implicitBinder___closed__2() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; +x_1 = lean::box(0); +x_2 = lean::mk_string("{"); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +return x_4; +} +} +obj* _init_l_Lean_Parser_Term_implicitBinder___closed__3() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3733,70 +5917,124 @@ x_6 = lean::mk_string("Term"); x_7 = lean_name_mk_string(x_5, x_6); x_8 = lean::mk_string("implicitBinder"); x_9 = lean_name_mk_string(x_7, x_8); -x_10 = lean::box(0); -x_11 = lean::mk_string("{"); -x_12 = l_String_trim(x_11); -lean::dec(x_11); -lean::inc(x_12); -x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +return x_9; +} +} +obj* _init_l_Lean_Parser_Term_implicitBinder___closed__4() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_string("{"); +x_2 = l_String_trim(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_implicitBinder___closed__5() { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_string("}"); +x_2 = l_String_trim(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* _init_l_Lean_Parser_Term_implicitBinder___closed__6() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_1 = lean::box(0); +x_2 = lean::mk_string(" : "); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +lean::inc(x_3); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_5, 0, x_3); +x_6 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_7 = lean::box(1); +x_8 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_8, 0, x_6); +lean::cnstr_set(x_8, 1, x_7); +x_9 = lean::mk_nat_obj(0u); +x_10 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_10, 0, x_9); +x_11 = l_Lean_Parser_andthenInfo(x_4, x_8); +x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean::closure_set(x_12, 0, x_5); +lean::closure_set(x_12, 1, x_10); +x_13 = l_Lean_Parser_noFirstTokenInfo(x_11); +x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); lean::closure_set(x_14, 0, x_12); -x_15 = l_Lean_Parser_Term_binderIdent; -x_16 = lean::cnstr_get(x_15, 0); -lean::inc(x_16); -x_17 = lean::cnstr_get(x_15, 1); -lean::inc(x_17); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_20, 0, x_19); -lean::closure_set(x_20, 1, x_17); -x_21 = lean::mk_string("}"); -x_22 = l_String_trim(x_21); -lean::dec(x_21); -lean::inc(x_22); -x_23 = l_Lean_Parser_symbolInfo(x_22, x_10); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_24, 0, x_22); -x_25 = lean::mk_string(" : "); -x_26 = l_String_trim(x_25); -lean::dec(x_25); -lean::inc(x_26); -x_27 = l_Lean_Parser_symbolInfo(x_26, x_10); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_28, 0, x_26); -x_29 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_30 = lean::box(1); -x_31 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_31, 0, x_29); -lean::cnstr_set(x_31, 1, x_30); -x_32 = lean::mk_nat_obj(0u); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_33, 0, x_32); -x_34 = l_Lean_Parser_andthenInfo(x_27, x_31); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_28); -lean::closure_set(x_35, 1, x_33); -x_36 = l_Lean_Parser_andthenInfo(x_34, x_23); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_37, 0, x_35); -lean::closure_set(x_37, 1, x_24); -x_38 = l_Lean_Parser_andthenInfo(x_16, x_36); -x_39 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_39, 0, x_20); -lean::closure_set(x_39, 1, x_37); -x_40 = l_Lean_Parser_andthenInfo(x_13, x_38); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_41, 0, x_14); -lean::closure_set(x_41, 1, x_39); -x_42 = l_Lean_Parser_nodeInfo(x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_9); -lean::closure_set(x_43, 1, x_41); -x_44 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_44, 0, x_42); -lean::cnstr_set(x_44, 1, x_43); -return x_44; +x_15 = l_Lean_Parser_Term_implicitBinder___closed__1; +x_16 = l_Lean_Parser_andthenInfo(x_13, x_15); +x_17 = l_Lean_Parser_Term_explicitBinder___closed__2; +x_18 = l_Lean_Parser_andthenInfo(x_17, x_16); +x_19 = l_Lean_Parser_Term_implicitBinder___closed__2; +x_20 = l_Lean_Parser_andthenInfo(x_19, x_18); +x_21 = l_Lean_Parser_nodeInfo(x_20); +x_22 = l_Lean_Parser_Term_implicitBinder___closed__3; +x_23 = l_Lean_Parser_Term_implicitBinder___closed__4; +x_24 = l_Lean_Parser_Term_explicitBinder___closed__6; +x_25 = l_Lean_Parser_Term_implicitBinder___closed__5; +x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_implicitBinder___elambda__1___boxed), 8, 5); +lean::closure_set(x_26, 0, x_22); +lean::closure_set(x_26, 1, x_23); +lean::closure_set(x_26, 2, x_24); +lean::closure_set(x_26, 3, x_25); +lean::closure_set(x_26, 4, x_14); +x_27 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_27, 0, x_21); +lean::cnstr_set(x_27, 1, x_26); +return x_27; +} +} +obj* _init_l_Lean_Parser_Term_implicitBinder___closed__7() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_1 = lean::box(0); +x_2 = lean::mk_string(" : "); +x_3 = l_String_trim(x_2); +lean::dec(x_2); +lean::inc(x_3); +x_4 = l_Lean_Parser_symbolInfo(x_3, x_1); +x_5 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_5, 0, x_3); +x_6 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_7 = lean::box(1); +x_8 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_8, 0, x_6); +lean::cnstr_set(x_8, 1, x_7); +x_9 = lean::mk_nat_obj(0u); +x_10 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_10, 0, x_9); +x_11 = l_Lean_Parser_andthenInfo(x_4, x_8); +x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean::closure_set(x_12, 0, x_5); +lean::closure_set(x_12, 1, x_10); +x_13 = l_Lean_Parser_Term_implicitBinder___closed__1; +x_14 = l_Lean_Parser_andthenInfo(x_11, x_13); +x_15 = l_Lean_Parser_Term_explicitBinder___closed__2; +x_16 = l_Lean_Parser_andthenInfo(x_15, x_14); +x_17 = l_Lean_Parser_Term_implicitBinder___closed__2; +x_18 = l_Lean_Parser_andthenInfo(x_17, x_16); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = l_Lean_Parser_Term_implicitBinder___closed__3; +x_21 = l_Lean_Parser_Term_implicitBinder___closed__4; +x_22 = l_Lean_Parser_Term_explicitBinder___closed__6; +x_23 = l_Lean_Parser_Term_implicitBinder___closed__5; +x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_implicitBinder___elambda__1___boxed), 8, 5); +lean::closure_set(x_24, 0, x_20); +lean::closure_set(x_24, 1, x_21); +lean::closure_set(x_24, 2, x_22); +lean::closure_set(x_24, 3, x_23); +lean::closure_set(x_24, 4, x_12); +x_25 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_25, 0, x_19); +lean::cnstr_set(x_25, 1, x_24); +return x_25; } } obj* l_Lean_Parser_Term_implicitBinder(uint8 x_1) { @@ -3805,17 +6043,27 @@ _start: if (x_1 == 0) { obj* x_2; -x_2 = l_Lean_Parser_Term_implicitBinder___closed__1; +x_2 = l_Lean_Parser_Term_implicitBinder___closed__6; return x_2; } else { obj* x_3; -x_3 = l_Lean_Parser_Term_implicitBinder___closed__2; +x_3 = l_Lean_Parser_Term_implicitBinder___closed__7; return x_3; } } } +obj* l_Lean_Parser_Term_implicitBinder___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_implicitBinder___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_4); +lean::dec(x_2); +return x_9; +} +} obj* l_Lean_Parser_Term_implicitBinder___boxed(obj* x_1) { _start: { @@ -3826,10 +6074,273 @@ x_3 = l_Lean_Parser_Term_implicitBinder(x_2); return x_3; } } +obj* l_Lean_Parser_Term_instBinder___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_8 = lean::cnstr_get(x_7, 0); +lean::inc(x_8); +x_9 = lean::array_get_size(x_8); +lean::dec(x_8); +x_26 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_27 = lean::string_append(x_26, x_2); +x_28 = l_Char_HasRepr___closed__1; +x_29 = lean::string_append(x_27, x_28); +lean::inc(x_6); +x_30 = l_Lean_Parser_symbolFnAux(x_2, x_29, x_6, x_7); +x_31 = lean::cnstr_get(x_30, 3); +lean::inc(x_31); +if (lean::obj_tag(x_31) == 0) +{ +obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_32 = lean::cnstr_get(x_30, 0); +lean::inc(x_32); +x_33 = lean::cnstr_get(x_30, 1); +lean::inc(x_33); +x_34 = lean::array_get_size(x_32); +lean::dec(x_32); +lean::inc(x_6); +x_35 = l_Lean_Parser_identFn___rarg(x_6, x_30); +x_36 = lean::cnstr_get(x_35, 3); +lean::inc(x_36); +if (lean::obj_tag(x_36) == 0) +{ +obj* x_37; obj* x_38; obj* x_39; obj* x_40; +x_37 = lean::string_append(x_26, x_4); +x_38 = lean::string_append(x_37, x_28); +lean::inc(x_6); +x_39 = l_Lean_Parser_symbolFnAux(x_4, x_38, x_6, x_35); +x_40 = lean::cnstr_get(x_39, 3); +lean::inc(x_40); +if (lean::obj_tag(x_40) == 0) +{ +obj* x_41; obj* x_42; +lean::dec(x_33); +x_41 = l_Lean_nullKind; +x_42 = l_Lean_Parser_ParserState_mkNode(x_39, x_41, x_34); +x_10 = x_42; +goto block_25; +} +else +{ +uint8 x_43; +x_43 = !lean::is_exclusive(x_39); +if (x_43 == 0) +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; uint8 x_48; +x_44 = lean::cnstr_get(x_39, 0); +x_45 = lean::cnstr_get(x_39, 3); +lean::dec(x_45); +x_46 = lean::cnstr_get(x_39, 1); +lean::dec(x_46); +x_47 = l_Array_shrink___main___rarg(x_44, x_34); +lean::inc(x_33); +lean::cnstr_set(x_39, 1, x_33); +lean::cnstr_set(x_39, 0, x_47); +x_48 = lean::nat_dec_eq(x_33, x_33); +if (x_48 == 0) +{ +obj* x_49; obj* x_50; +lean::dec(x_33); +x_49 = l_Lean_nullKind; +x_50 = l_Lean_Parser_ParserState_mkNode(x_39, x_49, x_34); +x_10 = x_50; +goto block_25; +} +else +{ +obj* x_51; obj* x_52; obj* x_53; +x_51 = l_Lean_Parser_ParserState_restore(x_39, x_34, x_33); +x_52 = l_Lean_nullKind; +x_53 = l_Lean_Parser_ParserState_mkNode(x_51, x_52, x_34); +x_10 = x_53; +goto block_25; +} +} +else +{ +obj* x_54; obj* x_55; obj* x_56; obj* x_57; uint8 x_58; +x_54 = lean::cnstr_get(x_39, 0); +x_55 = lean::cnstr_get(x_39, 2); +lean::inc(x_55); +lean::inc(x_54); +lean::dec(x_39); +x_56 = l_Array_shrink___main___rarg(x_54, x_34); +lean::inc(x_33); +x_57 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_57, 0, x_56); +lean::cnstr_set(x_57, 1, x_33); +lean::cnstr_set(x_57, 2, x_55); +lean::cnstr_set(x_57, 3, x_40); +x_58 = lean::nat_dec_eq(x_33, x_33); +if (x_58 == 0) +{ +obj* x_59; obj* x_60; +lean::dec(x_33); +x_59 = l_Lean_nullKind; +x_60 = l_Lean_Parser_ParserState_mkNode(x_57, x_59, x_34); +x_10 = x_60; +goto block_25; +} +else +{ +obj* x_61; obj* x_62; obj* x_63; +x_61 = l_Lean_Parser_ParserState_restore(x_57, x_34, x_33); +x_62 = l_Lean_nullKind; +x_63 = l_Lean_Parser_ParserState_mkNode(x_61, x_62, x_34); +x_10 = x_63; +goto block_25; +} +} +} +} +else +{ +obj* x_64; +lean::dec(x_36); +x_64 = lean::cnstr_get(x_35, 3); +lean::inc(x_64); +if (lean::obj_tag(x_64) == 0) +{ +obj* x_65; obj* x_66; +lean::dec(x_33); +x_65 = l_Lean_nullKind; +x_66 = l_Lean_Parser_ParserState_mkNode(x_35, x_65, x_34); +x_10 = x_66; +goto block_25; +} +else +{ +uint8 x_67; +x_67 = !lean::is_exclusive(x_35); +if (x_67 == 0) +{ +obj* x_68; obj* x_69; obj* x_70; obj* x_71; uint8 x_72; +x_68 = lean::cnstr_get(x_35, 0); +x_69 = lean::cnstr_get(x_35, 3); +lean::dec(x_69); +x_70 = lean::cnstr_get(x_35, 1); +lean::dec(x_70); +x_71 = l_Array_shrink___main___rarg(x_68, x_34); +lean::inc(x_33); +lean::cnstr_set(x_35, 1, x_33); +lean::cnstr_set(x_35, 0, x_71); +x_72 = lean::nat_dec_eq(x_33, x_33); +if (x_72 == 0) +{ +obj* x_73; obj* x_74; +lean::dec(x_33); +x_73 = l_Lean_nullKind; +x_74 = l_Lean_Parser_ParserState_mkNode(x_35, x_73, x_34); +x_10 = x_74; +goto block_25; +} +else +{ +obj* x_75; obj* x_76; obj* x_77; +x_75 = l_Lean_Parser_ParserState_restore(x_35, x_34, x_33); +x_76 = l_Lean_nullKind; +x_77 = l_Lean_Parser_ParserState_mkNode(x_75, x_76, x_34); +x_10 = x_77; +goto block_25; +} +} +else +{ +obj* x_78; obj* x_79; obj* x_80; obj* x_81; uint8 x_82; +x_78 = lean::cnstr_get(x_35, 0); +x_79 = lean::cnstr_get(x_35, 2); +lean::inc(x_79); +lean::inc(x_78); +lean::dec(x_35); +x_80 = l_Array_shrink___main___rarg(x_78, x_34); +lean::inc(x_33); +x_81 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_81, 0, x_80); +lean::cnstr_set(x_81, 1, x_33); +lean::cnstr_set(x_81, 2, x_79); +lean::cnstr_set(x_81, 3, x_64); +x_82 = lean::nat_dec_eq(x_33, x_33); +if (x_82 == 0) +{ +obj* x_83; obj* x_84; +lean::dec(x_33); +x_83 = l_Lean_nullKind; +x_84 = l_Lean_Parser_ParserState_mkNode(x_81, x_83, x_34); +x_10 = x_84; +goto block_25; +} +else +{ +obj* x_85; obj* x_86; obj* x_87; +x_85 = l_Lean_Parser_ParserState_restore(x_81, x_34, x_33); +x_86 = l_Lean_nullKind; +x_87 = l_Lean_Parser_ParserState_mkNode(x_85, x_86, x_34); +x_10 = x_87; +goto block_25; +} +} +} +} +} +else +{ +obj* x_88; +lean::dec(x_31); +lean::dec(x_6); +x_88 = l_Lean_Parser_ParserState_mkNode(x_30, x_1, x_9); +return x_88; +} +block_25: +{ +obj* x_11; +x_11 = lean::cnstr_get(x_10, 3); +lean::inc(x_11); +if (lean::obj_tag(x_11) == 0) +{ +obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_12 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_13 = l_Lean_Parser_builtinTermParsingTable; +x_14 = lean::mk_nat_obj(0u); +lean::inc(x_6); +x_15 = l_Lean_Parser_runBuiltinParserUnsafe(x_12, x_13, x_14, x_6, x_10); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; +x_17 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_18 = lean::string_append(x_17, x_3); +x_19 = l_Char_HasRepr___closed__1; +x_20 = lean::string_append(x_18, x_19); +x_21 = l_Lean_Parser_symbolFnAux(x_3, x_20, x_6, x_15); +x_22 = l_Lean_Parser_ParserState_mkNode(x_21, x_1, x_9); +return x_22; +} +else +{ +obj* x_23; +lean::dec(x_16); +lean::dec(x_6); +x_23 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_9); +return x_23; +} +} +else +{ +obj* x_24; +lean::dec(x_11); +lean::dec(x_6); +x_24 = l_Lean_Parser_ParserState_mkNode(x_10, x_1, x_9); +return x_24; +} +} +} +} obj* _init_l_Lean_Parser_Term_instBinder() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; uint8 x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3845,65 +6356,50 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string("]"); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -lean::inc(x_21); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_23, 0, x_21); -x_24 = l_Lean_Parser_andthenInfo(x_17, x_22); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_19); -lean::closure_set(x_25, 1, x_23); -x_26 = lean::mk_string("ident"); -x_27 = l_Lean_Parser_mkAtomicInfo(x_26); -x_28 = 0; -x_29 = lean::box(x_28); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_30, 0, x_29); -x_31 = lean::mk_string(" : "); -x_32 = l_String_trim(x_31); -lean::dec(x_31); -lean::inc(x_32); -x_33 = l_Lean_Parser_symbolInfo(x_32, x_10); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_34, 0, x_32); -x_35 = l_Lean_Parser_andthenInfo(x_27, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_30); -lean::closure_set(x_36, 1, x_34); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_37, 0, x_36); -x_38 = l_Lean_Parser_noFirstTokenInfo(x_35); -x_39 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean::closure_set(x_39, 0, x_37); -x_40 = l_Lean_Parser_andthenInfo(x_38, x_24); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_41, 0, x_39); -lean::closure_set(x_41, 1, x_25); -x_42 = l_Lean_Parser_andthenInfo(x_13, x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_14); -lean::closure_set(x_43, 1, x_41); -x_44 = l_Lean_Parser_nodeInfo(x_42); -x_45 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_45, 0, x_9); -lean::closure_set(x_45, 1, x_43); -x_46 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_46, 0, x_44); -lean::cnstr_set(x_46, 1, x_45); -return x_46; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = lean::mk_string("]"); +x_18 = l_String_trim(x_17); +lean::dec(x_17); +lean::inc(x_18); +x_19 = l_Lean_Parser_symbolInfo(x_18, x_10); +x_20 = l_Lean_Parser_andthenInfo(x_16, x_19); +x_21 = lean::mk_string("ident"); +x_22 = l_Lean_Parser_mkAtomicInfo(x_21); +x_23 = lean::mk_string(" : "); +x_24 = l_String_trim(x_23); +lean::dec(x_23); +lean::inc(x_24); +x_25 = l_Lean_Parser_symbolInfo(x_24, x_10); +x_26 = l_Lean_Parser_andthenInfo(x_22, x_25); +x_27 = l_Lean_Parser_noFirstTokenInfo(x_26); +x_28 = l_Lean_Parser_andthenInfo(x_27, x_20); +x_29 = l_Lean_Parser_andthenInfo(x_13, x_28); +x_30 = l_Lean_Parser_nodeInfo(x_29); +x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_instBinder___elambda__1___boxed), 7, 4); +lean::closure_set(x_31, 0, x_9); +lean::closure_set(x_31, 1, x_12); +lean::closure_set(x_31, 2, x_18); +lean::closure_set(x_31, 3, x_24); +x_32 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_32, 0, x_30); +lean::cnstr_set(x_32, 1, x_31); +return x_32; +} +} +obj* l_Lean_Parser_Term_instBinder___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; +x_8 = l_Lean_Parser_Term_instBinder___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +return x_8; } } obj* _init_l_Lean_Parser_Term_bracktedBinder___closed__1() { @@ -3968,10 +6464,73 @@ x_3 = l_Lean_Parser_Term_bracktedBinder(x_2); return x_3; } } +obj* l_Lean_Parser_Term_depArrow___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; +x_8 = lean::cnstr_get(x_7, 0); +lean::inc(x_8); +x_9 = lean::array_get_size(x_8); +lean::dec(x_8); +lean::inc(x_6); +lean::inc(x_5); +x_10 = lean::apply_3(x_4, x_5, x_6, x_7); +x_11 = lean::cnstr_get(x_10, 3); +lean::inc(x_11); +if (lean::obj_tag(x_11) == 0) +{ +obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_12 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_13 = lean::string_append(x_12, x_2); +x_14 = l_Lean_Parser_unicodeSymbolFn___rarg___closed__1; +x_15 = lean::string_append(x_13, x_14); +x_16 = lean::string_append(x_15, x_3); +x_17 = l_Char_HasRepr___closed__1; +x_18 = lean::string_append(x_16, x_17); +x_19 = l_Lean_Parser_unicodeSymbolCheckPrecFn___closed__1; +x_20 = lean::string_append(x_19, x_2); +x_21 = l_Lean_Parser_unicodeSymbolCheckPrecFn___closed__2; +x_22 = lean::string_append(x_20, x_21); +x_23 = lean::mk_nat_obj(25u); +lean::inc(x_6); +x_24 = l_Lean_Parser_unicodeSymbolCheckPrecFnAux(x_2, x_3, x_23, x_18, x_22, x_5, x_6, x_10); +lean::dec(x_5); +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_26 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_27 = l_Lean_Parser_builtinTermParsingTable; +x_28 = lean::mk_nat_obj(0u); +x_29 = l_Lean_Parser_runBuiltinParserUnsafe(x_26, x_27, x_28, x_6, x_24); +x_30 = l_Lean_Parser_ParserState_mkNode(x_29, x_1, x_9); +return x_30; +} +else +{ +obj* x_31; +lean::dec(x_25); +lean::dec(x_6); +x_31 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_9); +return x_31; +} +} +else +{ +obj* x_32; +lean::dec(x_11); +lean::dec(x_6); +lean::dec(x_5); +x_32 = l_Lean_Parser_ParserState_mkNode(x_10, x_1, x_9); +return x_32; +} +} +} obj* _init_l_Lean_Parser_Term_depArrow() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; uint8 x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; uint8 x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -3995,39 +6554,38 @@ lean::cnstr_set(x_17, 0, x_16); lean::inc(x_15); lean::inc(x_13); x_18 = l_Lean_Parser_unicodeSymbolInfo(x_13, x_15, x_17); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_unicodeSymbolCheckPrecFn___boxed), 6, 3); -lean::closure_set(x_19, 0, x_13); -lean::closure_set(x_19, 1, x_15); -lean::closure_set(x_19, 2, x_16); -x_20 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_21 = lean::box(1); -x_22 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_22, 0, x_20); -lean::cnstr_set(x_22, 1, x_21); -x_23 = lean::mk_nat_obj(0u); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_24, 0, x_23); -x_25 = l_Lean_Parser_andthenInfo(x_18, x_22); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_26, 0, x_19); -lean::closure_set(x_26, 1, x_24); -x_27 = lean::cnstr_get(x_11, 0); -lean::inc(x_27); -x_28 = l_Lean_Parser_andthenInfo(x_27, x_25); -x_29 = lean::cnstr_get(x_11, 1); -lean::inc(x_29); +x_19 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_20 = lean::box(1); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +x_22 = l_Lean_Parser_andthenInfo(x_18, x_21); +x_23 = lean::cnstr_get(x_11, 0); +lean::inc(x_23); +x_24 = l_Lean_Parser_andthenInfo(x_23, x_22); +x_25 = lean::cnstr_get(x_11, 1); +lean::inc(x_25); lean::dec(x_11); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_30, 0, x_29); -lean::closure_set(x_30, 1, x_26); -x_31 = l_Lean_Parser_nodeInfo(x_28); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_32, 0, x_9); -lean::closure_set(x_32, 1, x_30); -x_33 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_33, 0, x_31); -lean::cnstr_set(x_33, 1, x_32); -return x_33; +x_26 = l_Lean_Parser_nodeInfo(x_24); +x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_depArrow___elambda__1___boxed), 7, 4); +lean::closure_set(x_27, 0, x_9); +lean::closure_set(x_27, 1, x_13); +lean::closure_set(x_27, 2, x_15); +lean::closure_set(x_27, 3, x_25); +x_28 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_28, 0, x_26); +lean::cnstr_set(x_28, 1, x_27); +return x_28; +} +} +obj* l_Lean_Parser_Term_depArrow___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; +x_8 = l_Lean_Parser_Term_depArrow___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean::dec(x_3); +lean::dec(x_2); +return x_8; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_depArrow___closed__1() { @@ -4057,10 +6615,50 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_simpleBinder___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +lean::inc(x_2); +lean::inc(x_4); +lean::inc(x_3); +x_8 = lean::apply_3(x_2, x_3, x_4, x_5); +x_9 = lean::cnstr_get(x_8, 3); +lean::inc(x_9); +if (lean::obj_tag(x_9) == 0) +{ +uint8 x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_10 = 0; +x_11 = l_Lean_Parser_manyAux___main(x_10, x_2, x_3, x_4, x_8); +x_12 = l_Lean_nullKind; +lean::inc(x_7); +x_13 = l_Lean_Parser_ParserState_mkNode(x_11, x_12, x_7); +x_14 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_7); +return x_14; +} +else +{ +obj* x_15; obj* x_16; obj* x_17; +lean::dec(x_9); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +x_15 = l_Lean_nullKind; +lean::inc(x_7); +x_16 = l_Lean_Parser_ParserState_mkNode(x_8, x_15, x_7); +x_17 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_7); +return x_17; +} +} +} obj* _init_l_Lean_Parser_Term_simpleBinder() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; uint8 x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4075,25 +6673,201 @@ x_11 = lean::cnstr_get(x_10, 0); lean::inc(x_11); x_12 = lean::cnstr_get(x_10, 1); lean::inc(x_12); -x_13 = 0; -x_14 = lean::box(x_13); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_15, 0, x_14); -lean::closure_set(x_15, 1, x_12); -x_16 = l_Lean_Parser_nodeInfo(x_11); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_15); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_16); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_13 = l_Lean_Parser_nodeInfo(x_11); +x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_simpleBinder___elambda__1), 5, 2); +lean::closure_set(x_14, 0, x_9); +lean::closure_set(x_14, 1, x_12); +x_15 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_15, 0, x_13); +lean::cnstr_set(x_15, 1, x_14); +return x_15; +} +} +obj* l_Lean_Parser_Term_forall___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_11 = lean::cnstr_get(x_10, 0); +lean::inc(x_11); +x_12 = lean::array_get_size(x_11); +lean::dec(x_11); +x_13 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_14 = lean::string_append(x_13, x_2); +x_15 = l_Lean_Parser_unicodeSymbolFn___rarg___closed__1; +x_16 = lean::string_append(x_14, x_15); +x_17 = lean::string_append(x_16, x_3); +x_18 = l_Char_HasRepr___closed__1; +x_19 = lean::string_append(x_17, x_18); +lean::inc(x_9); +x_20 = l_Lean_Parser_unicodeSymbolFnAux(x_2, x_3, x_19, x_9, x_10); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +obj* x_22; obj* x_23; obj* x_24; obj* x_57; obj* x_58; obj* x_59; +x_22 = lean::cnstr_get(x_20, 0); +lean::inc(x_22); +x_23 = lean::array_get_size(x_22); +lean::dec(x_22); +x_57 = lean::cnstr_get(x_20, 1); +lean::inc(x_57); +lean::inc(x_9); +lean::inc(x_8); +x_58 = lean::apply_3(x_4, x_8, x_9, x_20); +x_59 = lean::cnstr_get(x_58, 3); +lean::inc(x_59); +if (lean::obj_tag(x_59) == 0) +{ +lean::dec(x_57); +lean::dec(x_5); +x_24 = x_58; +goto block_56; +} +else +{ +obj* x_60; uint8 x_61; +lean::dec(x_59); +x_60 = lean::cnstr_get(x_58, 1); +lean::inc(x_60); +x_61 = lean::nat_dec_eq(x_60, x_57); +lean::dec(x_60); +if (x_61 == 0) +{ +lean::dec(x_57); +lean::dec(x_5); +x_24 = x_58; +goto block_56; +} +else +{ +obj* x_62; obj* x_63; +x_62 = l_Lean_Parser_ParserState_restore(x_58, x_23, x_57); +lean::inc(x_9); +lean::inc(x_8); +x_63 = lean::apply_3(x_5, x_8, x_9, x_62); +x_24 = x_63; +goto block_56; +} +} +block_56: +{ +obj* x_25; +x_25 = lean::cnstr_get(x_24, 3); +lean::inc(x_25); +if (lean::obj_tag(x_25) == 0) +{ +uint8 x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_26 = 0; +lean::inc(x_9); +x_27 = l_Lean_Parser_manyAux___main(x_26, x_6, x_8, x_9, x_24); +x_28 = l_Lean_nullKind; +x_29 = l_Lean_Parser_ParserState_mkNode(x_27, x_28, x_23); +x_30 = lean::cnstr_get(x_29, 3); +lean::inc(x_30); +if (lean::obj_tag(x_30) == 0) +{ +obj* x_31; obj* x_32; obj* x_33; obj* x_34; +x_31 = lean::string_append(x_13, x_7); +x_32 = lean::string_append(x_31, x_18); +lean::inc(x_9); +x_33 = l_Lean_Parser_symbolFnAux(x_7, x_32, x_9, x_29); +x_34 = lean::cnstr_get(x_33, 3); +lean::inc(x_34); +if (lean::obj_tag(x_34) == 0) +{ +obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +x_35 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_36 = l_Lean_Parser_builtinTermParsingTable; +x_37 = lean::mk_nat_obj(0u); +x_38 = l_Lean_Parser_runBuiltinParserUnsafe(x_35, x_36, x_37, x_9, x_33); +x_39 = l_Lean_Parser_ParserState_mkNode(x_38, x_1, x_12); +return x_39; +} +else +{ +obj* x_40; +lean::dec(x_34); +lean::dec(x_9); +x_40 = l_Lean_Parser_ParserState_mkNode(x_33, x_1, x_12); +return x_40; +} +} +else +{ +obj* x_41; +lean::dec(x_30); +lean::dec(x_9); +x_41 = l_Lean_Parser_ParserState_mkNode(x_29, x_1, x_12); +return x_41; +} +} +else +{ +obj* x_42; obj* x_43; obj* x_44; +lean::dec(x_25); +lean::dec(x_8); +lean::dec(x_6); +x_42 = l_Lean_nullKind; +x_43 = l_Lean_Parser_ParserState_mkNode(x_24, x_42, x_23); +x_44 = lean::cnstr_get(x_43, 3); +lean::inc(x_44); +if (lean::obj_tag(x_44) == 0) +{ +obj* x_45; obj* x_46; obj* x_47; obj* x_48; +x_45 = lean::string_append(x_13, x_7); +x_46 = lean::string_append(x_45, x_18); +lean::inc(x_9); +x_47 = l_Lean_Parser_symbolFnAux(x_7, x_46, x_9, x_43); +x_48 = lean::cnstr_get(x_47, 3); +lean::inc(x_48); +if (lean::obj_tag(x_48) == 0) +{ +obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; +x_49 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_50 = l_Lean_Parser_builtinTermParsingTable; +x_51 = lean::mk_nat_obj(0u); +x_52 = l_Lean_Parser_runBuiltinParserUnsafe(x_49, x_50, x_51, x_9, x_47); +x_53 = l_Lean_Parser_ParserState_mkNode(x_52, x_1, x_12); +return x_53; +} +else +{ +obj* x_54; +lean::dec(x_48); +lean::dec(x_9); +x_54 = l_Lean_Parser_ParserState_mkNode(x_47, x_1, x_12); +return x_54; +} +} +else +{ +obj* x_55; +lean::dec(x_44); +lean::dec(x_9); +x_55 = l_Lean_Parser_ParserState_mkNode(x_43, x_1, x_12); +return x_55; +} +} +} +} +else +{ +obj* x_64; +lean::dec(x_21); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_6); +lean::dec(x_5); +lean::dec(x_4); +x_64 = l_Lean_Parser_ParserState_mkNode(x_20, x_1, x_12); +return x_64; +} } } obj* _init_l_Lean_Parser_Term_forall() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; uint8 x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; uint8 x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; uint8 x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4113,65 +6887,61 @@ lean::dec(x_8); lean::inc(x_13); lean::inc(x_12); x_14 = l_Lean_Parser_unicodeSymbolInfo(x_12, x_13, x_10); -x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_unicodeSymbolFn___rarg___boxed), 5, 2); -lean::closure_set(x_15, 0, x_12); -lean::closure_set(x_15, 1, x_13); -x_16 = 0; -x_17 = l_Lean_Parser_Term_bracktedBinder(x_16); -x_18 = l_Lean_Parser_Term_simpleBinder; -x_19 = lean::cnstr_get(x_18, 0); +x_15 = 0; +x_16 = l_Lean_Parser_Term_bracktedBinder(x_15); +x_17 = l_Lean_Parser_Term_simpleBinder; +x_18 = lean::cnstr_get(x_17, 0); +lean::inc(x_18); +x_19 = lean::cnstr_get(x_16, 0); lean::inc(x_19); -x_20 = lean::cnstr_get(x_17, 0); -lean::inc(x_20); -x_21 = l_Lean_Parser_orelseInfo(x_19, x_20); -x_22 = lean::cnstr_get(x_18, 1); +x_20 = l_Lean_Parser_orelseInfo(x_18, x_19); +x_21 = lean::cnstr_get(x_17, 1); +lean::inc(x_21); +x_22 = lean::cnstr_get(x_16, 1); lean::inc(x_22); -x_23 = lean::cnstr_get(x_17, 1); -lean::inc(x_23); -lean::dec(x_17); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_24, 0, x_22); -lean::closure_set(x_24, 1, x_23); -x_25 = 0; -x_26 = lean::box(x_25); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_27, 0, x_26); -lean::closure_set(x_27, 1, x_24); -x_28 = lean::mk_string(", "); -x_29 = l_String_trim(x_28); -lean::dec(x_28); -lean::inc(x_29); -x_30 = l_Lean_Parser_symbolInfo(x_29, x_10); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_31, 0, x_29); -x_32 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_33 = lean::box(1); -x_34 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_34, 0, x_32); -lean::cnstr_set(x_34, 1, x_33); -x_35 = lean::mk_nat_obj(0u); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_36, 0, x_35); -x_37 = l_Lean_Parser_andthenInfo(x_30, x_34); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_31); -lean::closure_set(x_38, 1, x_36); -x_39 = l_Lean_Parser_andthenInfo(x_21, x_37); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_40, 0, x_27); -lean::closure_set(x_40, 1, x_38); -x_41 = l_Lean_Parser_andthenInfo(x_14, x_39); -x_42 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_42, 0, x_15); -lean::closure_set(x_42, 1, x_40); -x_43 = l_Lean_Parser_nodeInfo(x_41); -x_44 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_44, 0, x_9); -lean::closure_set(x_44, 1, x_42); -x_45 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_45, 0, x_43); -lean::cnstr_set(x_45, 1, x_44); -return x_45; +lean::dec(x_16); +lean::inc(x_22); +lean::inc(x_21); +x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); +lean::closure_set(x_23, 0, x_21); +lean::closure_set(x_23, 1, x_22); +x_24 = lean::mk_string(", "); +x_25 = l_String_trim(x_24); +lean::dec(x_24); +lean::inc(x_25); +x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); +x_27 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_28 = lean::box(1); +x_29 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_29, 0, x_27); +lean::cnstr_set(x_29, 1, x_28); +x_30 = l_Lean_Parser_andthenInfo(x_26, x_29); +x_31 = l_Lean_Parser_andthenInfo(x_20, x_30); +x_32 = l_Lean_Parser_andthenInfo(x_14, x_31); +x_33 = l_Lean_Parser_nodeInfo(x_32); +x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_forall___elambda__1___boxed), 10, 7); +lean::closure_set(x_34, 0, x_9); +lean::closure_set(x_34, 1, x_12); +lean::closure_set(x_34, 2, x_13); +lean::closure_set(x_34, 3, x_21); +lean::closure_set(x_34, 4, x_22); +lean::closure_set(x_34, 5, x_23); +lean::closure_set(x_34, 6, x_25); +x_35 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_35, 0, x_33); +lean::cnstr_set(x_35, 1, x_34); +return x_35; +} +} +obj* l_Lean_Parser_Term_forall___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; +x_11 = l_Lean_Parser_Term_forall___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean::dec(x_7); +lean::dec(x_3); +lean::dec(x_2); +return x_11; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_forall___closed__1() { @@ -4201,10 +6971,85 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_equation___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_10 = lean::array_get_size(x_9); +lean::dec(x_9); +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Char_HasRepr___closed__1; +x_14 = lean::string_append(x_12, x_13); +lean::inc(x_7); +x_15 = l_Lean_Parser_symbolFnAux(x_2, x_14, x_7, x_8); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +uint8 x_17; uint8 x_18; obj* x_19; obj* x_20; +x_17 = 0; +x_18 = 0; +lean::inc(x_7); +x_19 = l_Lean_Parser_sepBy1Fn___main(x_17, x_18, x_3, x_4, x_6, x_7, x_15); +x_20 = lean::cnstr_get(x_19, 3); +lean::inc(x_20); +if (lean::obj_tag(x_20) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; obj* x_24; +x_21 = lean::string_append(x_11, x_5); +x_22 = lean::string_append(x_21, x_13); +lean::inc(x_7); +x_23 = l_Lean_Parser_symbolFnAux(x_5, x_22, x_7, x_19); +x_24 = lean::cnstr_get(x_23, 3); +lean::inc(x_24); +if (lean::obj_tag(x_24) == 0) +{ +obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; +x_25 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_26 = l_Lean_Parser_builtinTermParsingTable; +x_27 = lean::mk_nat_obj(0u); +x_28 = l_Lean_Parser_runBuiltinParserUnsafe(x_25, x_26, x_27, x_7, x_23); +x_29 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_10); +return x_29; +} +else +{ +obj* x_30; +lean::dec(x_24); +lean::dec(x_7); +x_30 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_10); +return x_30; +} +} +else +{ +obj* x_31; +lean::dec(x_20); +lean::dec(x_7); +x_31 = l_Lean_Parser_ParserState_mkNode(x_19, x_1, x_10); +return x_31; +} +} +else +{ +obj* x_32; +lean::dec(x_16); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +lean::dec(x_3); +x_32 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_10); +return x_32; +} +} +} obj* _init_l_Lean_Parser_Term_equation() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; uint8 x_24; uint8 x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4220,62 +7065,185 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string(", "); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -lean::inc(x_17); -x_23 = l_Lean_Parser_sepBy1Info(x_17, x_22); -x_24 = 0; -x_25 = 0; -x_26 = lean::box(x_24); -x_27 = lean::box(x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed), 5, 2); -lean::closure_set(x_28, 0, x_26); -lean::closure_set(x_28, 1, x_27); -x_29 = lean::mk_string(" => "); -x_30 = l_String_trim(x_29); +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = lean::mk_nat_obj(0u); +x_18 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_18, 0, x_17); +x_19 = lean::mk_string(", "); +x_20 = l_String_trim(x_19); +lean::dec(x_19); +lean::inc(x_20); +x_21 = l_Lean_Parser_symbolInfo(x_20, x_10); +x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_22, 0, x_20); +lean::inc(x_16); +x_23 = l_Lean_Parser_sepBy1Info(x_16, x_21); +x_24 = lean::mk_string(" => "); +x_25 = l_String_trim(x_24); +lean::dec(x_24); +lean::inc(x_25); +x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); +x_27 = l_Lean_Parser_andthenInfo(x_26, x_16); +x_28 = l_Lean_Parser_andthenInfo(x_23, x_27); +x_29 = l_Lean_Parser_andthenInfo(x_13, x_28); +x_30 = l_Lean_Parser_nodeInfo(x_29); +x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_equation___elambda__1___boxed), 8, 5); +lean::closure_set(x_31, 0, x_9); +lean::closure_set(x_31, 1, x_12); +lean::closure_set(x_31, 2, x_18); +lean::closure_set(x_31, 3, x_22); +lean::closure_set(x_31, 4, x_25); +x_32 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_32, 0, x_30); +lean::cnstr_set(x_32, 1, x_31); +return x_32; +} +} +obj* l_Lean_Parser_Term_equation___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) { +_start: +{ +obj* x_9; +x_9 = l_Lean_Parser_Term_equation___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean::dec(x_5); +lean::dec(x_2); +return x_9; +} +} +obj* l_Lean_Parser_Term_match___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_11 = lean::cnstr_get(x_10, 0); +lean::inc(x_11); +x_12 = lean::array_get_size(x_11); +lean::dec(x_11); +x_13 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_14 = lean::string_append(x_13, x_2); +x_15 = l_Char_HasRepr___closed__1; +x_16 = lean::string_append(x_14, x_15); +lean::inc(x_9); +x_17 = l_Lean_Parser_symbolFnAux(x_2, x_16, x_9, x_10); +x_18 = lean::cnstr_get(x_17, 3); +lean::inc(x_18); +if (lean::obj_tag(x_18) == 0) +{ +uint8 x_19; uint8 x_20; obj* x_21; obj* x_22; +x_19 = 0; +x_20 = 0; +lean::inc(x_9); +lean::inc(x_8); +x_21 = l_Lean_Parser_sepBy1Fn___main(x_19, x_20, x_3, x_4, x_8, x_9, x_17); +x_22 = lean::cnstr_get(x_21, 3); +lean::inc(x_22); +if (lean::obj_tag(x_22) == 0) +{ +obj* x_23; obj* x_24; +lean::inc(x_9); +lean::inc(x_8); +x_23 = lean::apply_3(x_7, x_8, x_9, x_21); +x_24 = lean::cnstr_get(x_23, 3); +lean::inc(x_24); +if (lean::obj_tag(x_24) == 0) +{ +obj* x_25; obj* x_26; obj* x_27; obj* x_28; +x_25 = lean::string_append(x_13, x_5); +x_26 = lean::string_append(x_25, x_15); +lean::inc(x_9); +x_27 = l_Lean_Parser_symbolFnAux(x_5, x_26, x_9, x_23); +x_28 = lean::cnstr_get(x_27, 3); +lean::inc(x_28); +if (lean::obj_tag(x_28) == 0) +{ +obj* x_29; obj* x_30; obj* x_31; obj* x_32; +x_29 = lean::cnstr_get(x_27, 0); +lean::inc(x_29); +x_30 = lean::array_get_size(x_29); lean::dec(x_29); -lean::inc(x_30); -x_31 = l_Lean_Parser_symbolInfo(x_30, x_10); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_32, 0, x_30); -x_33 = l_Lean_Parser_andthenInfo(x_31, x_17); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_34, 0, x_32); -lean::closure_set(x_34, 1, x_19); -x_35 = l_Lean_Parser_andthenInfo(x_23, x_33); -x_36 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_36, 0, x_28); -lean::closure_set(x_36, 1, x_34); -x_37 = l_Lean_Parser_andthenInfo(x_13, x_35); -x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_38, 0, x_14); -lean::closure_set(x_38, 1, x_36); -x_39 = l_Lean_Parser_nodeInfo(x_37); -x_40 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_40, 0, x_9); -lean::closure_set(x_40, 1, x_38); -x_41 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_41, 0, x_39); -lean::cnstr_set(x_41, 1, x_40); +lean::inc(x_6); +lean::inc(x_9); +lean::inc(x_8); +x_31 = lean::apply_3(x_6, x_8, x_9, x_27); +x_32 = lean::cnstr_get(x_31, 3); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_33 = l_Lean_Parser_manyAux___main(x_19, x_6, x_8, x_9, x_31); +x_34 = l_Lean_nullKind; +x_35 = l_Lean_Parser_ParserState_mkNode(x_33, x_34, x_30); +x_36 = l_Lean_Parser_ParserState_mkNode(x_35, x_1, x_12); +return x_36; +} +else +{ +obj* x_37; obj* x_38; obj* x_39; +lean::dec(x_32); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_6); +x_37 = l_Lean_nullKind; +x_38 = l_Lean_Parser_ParserState_mkNode(x_31, x_37, x_30); +x_39 = l_Lean_Parser_ParserState_mkNode(x_38, x_1, x_12); +return x_39; +} +} +else +{ +obj* x_40; +lean::dec(x_28); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_6); +x_40 = l_Lean_Parser_ParserState_mkNode(x_27, x_1, x_12); +return x_40; +} +} +else +{ +obj* x_41; +lean::dec(x_24); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_6); +x_41 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_12); return x_41; } } +else +{ +obj* x_42; +lean::dec(x_22); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_6); +x_42 = l_Lean_Parser_ParserState_mkNode(x_21, x_1, x_12); +return x_42; +} +} +else +{ +obj* x_43; +lean::dec(x_18); +lean::dec(x_9); +lean::dec(x_8); +lean::dec(x_7); +lean::dec(x_6); +lean::dec(x_4); +lean::dec(x_3); +x_43 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_12); +return x_43; +} +} +} obj* _init_l_Lean_Parser_Term_match() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; uint8 x_22; uint8 x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4291,70 +7259,64 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_string(", "); -x_19 = l_String_trim(x_18); -lean::dec(x_18); -x_20 = l_Lean_Parser_symbolInfo(x_19, x_10); -x_21 = l_Lean_Parser_sepBy1Info(x_17, x_20); -x_22 = 0; -x_23 = 0; -x_24 = lean::box(x_22); -x_25 = lean::box(x_23); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___spec__1___boxed), 5, 2); -lean::closure_set(x_26, 0, x_24); -lean::closure_set(x_26, 1, x_25); -x_27 = lean::mk_string(" with "); -x_28 = l_String_trim(x_27); -lean::dec(x_27); +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = lean::mk_nat_obj(0u); +x_18 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); +lean::closure_set(x_18, 0, x_17); +x_19 = lean::mk_string(", "); +x_20 = l_String_trim(x_19); +lean::dec(x_19); +lean::inc(x_20); +x_21 = l_Lean_Parser_symbolInfo(x_20, x_10); +x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean::closure_set(x_22, 0, x_20); +x_23 = l_Lean_Parser_sepBy1Info(x_16, x_21); +x_24 = lean::mk_string(" with "); +x_25 = l_String_trim(x_24); +lean::dec(x_24); +lean::inc(x_25); +x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); +x_27 = l_Lean_Parser_Term_equation; +x_28 = lean::cnstr_get(x_27, 0); lean::inc(x_28); -x_29 = l_Lean_Parser_symbolInfo(x_28, x_10); -x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_30, 0, x_28); -x_31 = l_Lean_Parser_Term_equation; +x_29 = lean::cnstr_get(x_27, 1); +lean::inc(x_29); +x_30 = l_Lean_Parser_andthenInfo(x_26, x_28); +x_31 = l_Lean_Parser_Term_optType; x_32 = lean::cnstr_get(x_31, 0); lean::inc(x_32); -x_33 = lean::cnstr_get(x_31, 1); -lean::inc(x_33); -x_34 = lean::box(x_22); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_many1Fn___boxed), 5, 2); -lean::closure_set(x_35, 0, x_34); -lean::closure_set(x_35, 1, x_33); -x_36 = l_Lean_Parser_andthenInfo(x_29, x_32); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_37, 0, x_30); -lean::closure_set(x_37, 1, x_35); -x_38 = l_Lean_Parser_Term_optType; -x_39 = lean::cnstr_get(x_38, 0); -lean::inc(x_39); -x_40 = l_Lean_Parser_andthenInfo(x_39, x_36); -x_41 = lean::cnstr_get(x_38, 1); -lean::inc(x_41); -x_42 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_42, 0, x_41); -lean::closure_set(x_42, 1, x_37); -x_43 = l_Lean_Parser_andthenInfo(x_21, x_40); -x_44 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_44, 0, x_26); -lean::closure_set(x_44, 1, x_42); -x_45 = l_Lean_Parser_andthenInfo(x_13, x_43); -x_46 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_46, 0, x_14); -lean::closure_set(x_46, 1, x_44); -x_47 = l_Lean_Parser_nodeInfo(x_45); -x_48 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_48, 0, x_9); -lean::closure_set(x_48, 1, x_46); -x_49 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_49, 0, x_47); -lean::cnstr_set(x_49, 1, x_48); -return x_49; +x_33 = l_Lean_Parser_andthenInfo(x_32, x_30); +x_34 = lean::cnstr_get(x_31, 1); +lean::inc(x_34); +x_35 = l_Lean_Parser_andthenInfo(x_23, x_33); +x_36 = l_Lean_Parser_andthenInfo(x_13, x_35); +x_37 = l_Lean_Parser_nodeInfo(x_36); +x_38 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_match___elambda__1___boxed), 10, 7); +lean::closure_set(x_38, 0, x_9); +lean::closure_set(x_38, 1, x_12); +lean::closure_set(x_38, 2, x_18); +lean::closure_set(x_38, 3, x_22); +lean::closure_set(x_38, 4, x_25); +lean::closure_set(x_38, 5, x_29); +lean::closure_set(x_38, 6, x_34); +x_39 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_39, 0, x_37); +lean::cnstr_set(x_39, 1, x_38); +return x_39; +} +} +obj* l_Lean_Parser_Term_match___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) { +_start: +{ +obj* x_11; +x_11 = l_Lean_Parser_Term_match___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean::dec(x_5); +lean::dec(x_2); +return x_11; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_match___closed__1() { @@ -4384,10 +7346,46 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_nomatch___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +x_8 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_9 = lean::string_append(x_8, x_2); +x_10 = l_Char_HasRepr___closed__1; +x_11 = lean::string_append(x_9, x_10); +lean::inc(x_4); +x_12 = l_Lean_Parser_symbolFnAux(x_2, x_11, x_4, x_5); +x_13 = lean::cnstr_get(x_12, 3); +lean::inc(x_13); +if (lean::obj_tag(x_13) == 0) +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_14 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_15 = l_Lean_Parser_builtinTermParsingTable; +x_16 = lean::mk_nat_obj(0u); +x_17 = l_Lean_Parser_runBuiltinParserUnsafe(x_14, x_15, x_16, x_4, x_12); +x_18 = l_Lean_Parser_ParserState_mkNode(x_17, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; +lean::dec(x_13); +lean::dec(x_4); +x_19 = l_Lean_Parser_ParserState_mkNode(x_12, x_1, x_7); +return x_19; +} +} +} obj* _init_l_Lean_Parser_Term_nomatch() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4403,28 +7401,30 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_16 = lean::box(1); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set(x_17, 1, x_16); -x_18 = lean::mk_nat_obj(0u); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = l_Lean_Parser_andthenInfo(x_13, x_17); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_21, 0, x_14); -lean::closure_set(x_21, 1, x_19); -x_22 = l_Lean_Parser_nodeInfo(x_20); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_9); -lean::closure_set(x_23, 1, x_21); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_22); -lean::cnstr_set(x_24, 1, x_23); -return x_24; +x_14 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_15 = lean::box(1); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +x_17 = l_Lean_Parser_andthenInfo(x_13, x_16); +x_18 = l_Lean_Parser_nodeInfo(x_17); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_nomatch___elambda__1___boxed), 5, 2); +lean::closure_set(x_19, 0, x_9); +lean::closure_set(x_19, 1, x_12); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set(x_20, 1, x_19); +return x_20; +} +} +obj* l_Lean_Parser_Term_nomatch___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_nomatch___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_3); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_nomatch___closed__1() { @@ -4454,10 +7454,139 @@ x_5 = l_Lean_Parser_addBuiltinLeadingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_namedArgument___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_8 = lean::cnstr_get(x_7, 0); +lean::inc(x_8); +x_9 = lean::cnstr_get(x_7, 1); +lean::inc(x_9); +x_10 = lean::array_get_size(x_8); +lean::dec(x_8); +x_31 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_32 = lean::string_append(x_31, x_2); +x_33 = l_Char_HasRepr___closed__1; +x_34 = lean::string_append(x_32, x_33); +lean::inc(x_6); +x_35 = l_Lean_Parser_symbolFnAux(x_2, x_34, x_6, x_7); +x_36 = lean::cnstr_get(x_35, 3); +lean::inc(x_36); +if (lean::obj_tag(x_36) == 0) +{ +obj* x_37; obj* x_38; +lean::inc(x_6); +x_37 = l_Lean_Parser_identFn___rarg(x_6, x_35); +x_38 = lean::cnstr_get(x_37, 3); +lean::inc(x_38); +if (lean::obj_tag(x_38) == 0) +{ +obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; +x_39 = lean::string_append(x_31, x_3); +x_40 = lean::string_append(x_39, x_33); +lean::inc(x_6); +x_41 = l_Lean_Parser_symbolFnAux(x_3, x_40, x_6, x_37); +x_42 = lean::cnstr_get(x_41, 0); +lean::inc(x_42); +x_43 = lean::cnstr_get(x_41, 2); +lean::inc(x_43); +x_44 = lean::cnstr_get(x_41, 3); +lean::inc(x_44); +x_11 = x_41; +x_12 = x_42; +x_13 = x_43; +x_14 = x_44; +goto block_30; +} +else +{ +obj* x_45; obj* x_46; obj* x_47; +lean::dec(x_38); +x_45 = lean::cnstr_get(x_37, 0); +lean::inc(x_45); +x_46 = lean::cnstr_get(x_37, 2); +lean::inc(x_46); +x_47 = lean::cnstr_get(x_37, 3); +lean::inc(x_47); +x_11 = x_37; +x_12 = x_45; +x_13 = x_46; +x_14 = x_47; +goto block_30; +} +} +else +{ +obj* x_48; obj* x_49; obj* x_50; +lean::dec(x_36); +x_48 = lean::cnstr_get(x_35, 0); +lean::inc(x_48); +x_49 = lean::cnstr_get(x_35, 2); +lean::inc(x_49); +x_50 = lean::cnstr_get(x_35, 3); +lean::inc(x_50); +x_11 = x_35; +x_12 = x_48; +x_13 = x_49; +x_14 = x_50; +goto block_30; +} +block_30: +{ +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; +lean::dec(x_13); +lean::dec(x_12); +lean::dec(x_9); +x_15 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_16 = l_Lean_Parser_builtinTermParsingTable; +x_17 = lean::mk_nat_obj(0u); +lean::inc(x_6); +x_18 = l_Lean_Parser_runBuiltinParserUnsafe(x_15, x_16, x_17, x_6, x_11); +x_19 = lean::cnstr_get(x_18, 3); +lean::inc(x_19); +if (lean::obj_tag(x_19) == 0) +{ +obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_20 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_21 = lean::string_append(x_20, x_4); +x_22 = l_Char_HasRepr___closed__1; +x_23 = lean::string_append(x_21, x_22); +x_24 = l_Lean_Parser_symbolFnAux(x_4, x_23, x_6, x_18); +x_25 = l_Lean_Parser_ParserState_mkNode(x_24, x_1, x_10); +return x_25; +} +else +{ +obj* x_26; +lean::dec(x_19); +lean::dec(x_6); +x_26 = l_Lean_Parser_ParserState_mkNode(x_18, x_1, x_10); +return x_26; +} +} +else +{ +obj* x_27; obj* x_28; obj* x_29; +lean::dec(x_11); +lean::dec(x_6); +x_27 = l_Array_shrink___main___rarg(x_12, x_10); +x_28 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_28, 0, x_27); +lean::cnstr_set(x_28, 1, x_9); +lean::cnstr_set(x_28, 2, x_13); +lean::cnstr_set(x_28, 3, x_14); +x_29 = l_Lean_Parser_ParserState_mkNode(x_28, x_1, x_10); +return x_29; +} +} +} +} obj* _init_l_Lean_Parser_Term_namedArgument() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; uint8 x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4473,68 +7602,135 @@ x_12 = l_String_trim(x_11); lean::dec(x_11); lean::inc(x_12); x_13 = l_Lean_Parser_symbolInfo(x_12, x_10); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_12); -x_15 = lean::mk_string("ident"); -x_16 = l_Lean_Parser_mkAtomicInfo(x_15); -x_17 = 1; -x_18 = lean::box(x_17); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_19, 0, x_18); -x_20 = lean::mk_string(" := "); -x_21 = l_String_trim(x_20); -lean::dec(x_20); -lean::inc(x_21); -x_22 = l_Lean_Parser_symbolInfo(x_21, x_10); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_23, 0, x_21); -x_24 = l_Lean_Parser_andthenInfo(x_16, x_22); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_19); -lean::closure_set(x_25, 1, x_23); -x_26 = l_Lean_Parser_andthenInfo(x_13, x_24); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_14); -lean::closure_set(x_27, 1, x_25); -x_28 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_tryFn___rarg), 4, 1); -lean::closure_set(x_28, 0, x_27); -x_29 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_30 = lean::box(1); +x_14 = lean::mk_string("ident"); +x_15 = l_Lean_Parser_mkAtomicInfo(x_14); +x_16 = lean::mk_string(" := "); +x_17 = l_String_trim(x_16); +lean::dec(x_16); +lean::inc(x_17); +x_18 = l_Lean_Parser_symbolInfo(x_17, x_10); +x_19 = l_Lean_Parser_andthenInfo(x_15, x_18); +x_20 = l_Lean_Parser_andthenInfo(x_13, x_19); +x_21 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_22 = lean::box(1); +x_23 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_23, 0, x_21); +lean::cnstr_set(x_23, 1, x_22); +x_24 = lean::mk_string(")"); +x_25 = l_String_trim(x_24); +lean::dec(x_24); +lean::inc(x_25); +x_26 = l_Lean_Parser_symbolInfo(x_25, x_10); +x_27 = l_Lean_Parser_andthenInfo(x_23, x_26); +x_28 = l_Lean_Parser_andthenInfo(x_20, x_27); +x_29 = l_Lean_Parser_nodeInfo(x_28); +x_30 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_namedArgument___elambda__1___boxed), 7, 4); +lean::closure_set(x_30, 0, x_9); +lean::closure_set(x_30, 1, x_12); +lean::closure_set(x_30, 2, x_17); +lean::closure_set(x_30, 3, x_25); x_31 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_31, 0, x_29); lean::cnstr_set(x_31, 1, x_30); -x_32 = lean::mk_nat_obj(0u); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_33, 0, x_32); -x_34 = lean::mk_string(")"); -x_35 = l_String_trim(x_34); -lean::dec(x_34); -lean::inc(x_35); -x_36 = l_Lean_Parser_symbolInfo(x_35, x_10); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_37, 0, x_35); -x_38 = l_Lean_Parser_andthenInfo(x_31, x_36); -x_39 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_39, 0, x_33); -lean::closure_set(x_39, 1, x_37); -x_40 = l_Lean_Parser_andthenInfo(x_26, x_38); -x_41 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_41, 0, x_28); -lean::closure_set(x_41, 1, x_39); -x_42 = l_Lean_Parser_nodeInfo(x_40); -x_43 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_43, 0, x_9); -lean::closure_set(x_43, 1, x_41); -x_44 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_44, 0, x_42); -lean::cnstr_set(x_44, 1, x_43); -return x_44; +return x_31; +} +} +obj* l_Lean_Parser_Term_namedArgument___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { +_start: +{ +obj* x_8; +x_8 = l_Lean_Parser_Term_namedArgument___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +return x_8; +} +} +obj* l_Lean_Parser_Term_app___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +lean::inc(x_3); +lean::inc(x_5); +x_8 = l_Lean_Parser_ParserState_pushSyntax(x_5, x_3); +x_9 = lean::cnstr_get(x_5, 3); +lean::inc(x_9); +if (lean::obj_tag(x_9) == 0) +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_10 = lean::cnstr_get(x_8, 0); +lean::inc(x_10); +x_11 = lean::array_get_size(x_10); +lean::dec(x_10); +x_12 = lean::cnstr_get(x_5, 1); +lean::inc(x_12); +lean::dec(x_5); +lean::inc(x_4); +x_13 = lean::apply_3(x_2, x_3, x_4, x_8); +x_14 = lean::cnstr_get(x_13, 3); +lean::inc(x_14); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_15; +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_4); +x_15 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_7); +return x_15; +} +else +{ +obj* x_16; uint8 x_17; +lean::dec(x_14); +x_16 = lean::cnstr_get(x_13, 1); +lean::inc(x_16); +x_17 = lean::nat_dec_eq(x_16, x_12); +lean::dec(x_16); +if (x_17 == 0) +{ +obj* x_18; +lean::dec(x_12); +lean::dec(x_11); +lean::dec(x_4); +x_18 = l_Lean_Parser_ParserState_mkNode(x_13, x_1, x_7); +return x_18; +} +else +{ +obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +x_19 = l_Lean_Parser_ParserState_restore(x_13, x_11, x_12); +lean::dec(x_11); +x_20 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_21 = l_Lean_Parser_builtinTermParsingTable; +x_22 = l_Lean_Parser_appPrec; +x_23 = l_Lean_Parser_runBuiltinParserUnsafe(x_20, x_21, x_22, x_4, x_19); +x_24 = l_Lean_Parser_ParserState_mkNode(x_23, x_1, x_7); +return x_24; +} +} +} +else +{ +obj* x_25; +lean::dec(x_9); +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +x_25 = l_Lean_Parser_ParserState_mkNode(x_8, x_1, x_7); +return x_25; +} } } obj* _init_l_Lean_Parser_Term_app() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4549,32 +7745,22 @@ x_11 = lean::box(1); x_12 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_12, 0, x_10); lean::cnstr_set(x_12, 1, x_11); -x_13 = l_Lean_Parser_appPrec; -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_14, 0, x_13); -x_15 = l_Lean_Parser_Term_namedArgument; -x_16 = lean::cnstr_get(x_15, 0); +x_13 = l_Lean_Parser_Term_namedArgument; +x_14 = lean::cnstr_get(x_13, 0); +lean::inc(x_14); +x_15 = l_Lean_Parser_orelseInfo(x_14, x_12); +x_16 = lean::cnstr_get(x_13, 1); lean::inc(x_16); -x_17 = l_Lean_Parser_orelseInfo(x_16, x_12); -x_18 = lean::cnstr_get(x_15, 1); -lean::inc(x_18); -x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_19, 0, x_18); -lean::closure_set(x_19, 1, x_14); -x_20 = l_Lean_Parser_epsilonInfo; -x_21 = l_Lean_Parser_andthenInfo(x_20, x_17); -x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_pushLeadingFn___boxed), 3, 0); -x_23 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_23, 0, x_22); -lean::closure_set(x_23, 1, x_19); -x_24 = l_Lean_Parser_nodeInfo(x_21); -x_25 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_25, 0, x_9); -lean::closure_set(x_25, 1, x_23); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_24); -lean::cnstr_set(x_26, 1, x_25); -return x_26; +x_17 = l_Lean_Parser_epsilonInfo; +x_18 = l_Lean_Parser_andthenInfo(x_17, x_15); +x_19 = l_Lean_Parser_nodeInfo(x_18); +x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_app___elambda__1), 5, 2); +lean::closure_set(x_20, 0, x_9); +lean::closure_set(x_20, 1, x_16); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_19); +lean::cnstr_set(x_21, 1, x_20); +return x_21; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_app___closed__1() { @@ -4604,10 +7790,174 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_proj___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +x_7 = lean::array_get_size(x_6); +lean::dec(x_6); +lean::inc(x_3); +lean::inc(x_5); +x_8 = l_Lean_Parser_ParserState_pushSyntax(x_5, x_3); +x_9 = lean::cnstr_get(x_5, 3); +lean::inc(x_9); +lean::dec(x_5); +if (lean::obj_tag(x_9) == 0) +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; uint8 x_14; +x_10 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_11 = lean::string_append(x_10, x_2); +x_12 = l_Lean_Parser_symbolNoWsFn___closed__1; +x_13 = lean::string_append(x_11, x_12); +x_14 = l_Lean_Parser_checkTailNoWs(x_3); +lean::dec(x_3); +if (x_14 == 0) +{ +obj* x_15; obj* x_16; +x_15 = l_Lean_Parser_ParserState_mkError(x_8, x_13); +x_16 = lean::cnstr_get(x_15, 3); +lean::inc(x_16); +if (lean::obj_tag(x_16) == 0) +{ +obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_17 = lean::cnstr_get(x_15, 0); +lean::inc(x_17); +x_18 = lean::array_get_size(x_17); +lean::dec(x_17); +x_19 = lean::cnstr_get(x_15, 1); +lean::inc(x_19); +x_20 = l_Lean_Parser_fieldIdxFn(x_4, x_15); +x_21 = lean::cnstr_get(x_20, 3); +lean::inc(x_21); +if (lean::obj_tag(x_21) == 0) +{ +obj* x_22; +lean::dec(x_19); +lean::dec(x_18); +lean::dec(x_4); +x_22 = l_Lean_Parser_ParserState_mkNode(x_20, x_1, x_7); +return x_22; +} +else +{ +obj* x_23; uint8 x_24; +lean::dec(x_21); +x_23 = lean::cnstr_get(x_20, 1); +lean::inc(x_23); +x_24 = lean::nat_dec_eq(x_23, x_19); +lean::dec(x_23); +if (x_24 == 0) +{ +obj* x_25; +lean::dec(x_19); +lean::dec(x_18); +lean::dec(x_4); +x_25 = l_Lean_Parser_ParserState_mkNode(x_20, x_1, x_7); +return x_25; +} +else +{ +obj* x_26; obj* x_27; obj* x_28; +x_26 = l_Lean_Parser_ParserState_restore(x_20, x_18, x_19); +lean::dec(x_18); +x_27 = l_Lean_Parser_identFn___rarg(x_4, x_26); +x_28 = l_Lean_Parser_ParserState_mkNode(x_27, x_1, x_7); +return x_28; +} +} +} +else +{ +obj* x_29; +lean::dec(x_16); +lean::dec(x_4); +x_29 = l_Lean_Parser_ParserState_mkNode(x_15, x_1, x_7); +return x_29; +} +} +else +{ +obj* x_30; obj* x_31; obj* x_32; +x_30 = lean::mk_nat_obj(0u); +x_31 = l_Lean_Parser_strAux___main(x_2, x_13, x_30, x_4, x_8); +x_32 = lean::cnstr_get(x_31, 3); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; +x_33 = lean::cnstr_get(x_31, 0); +lean::inc(x_33); +x_34 = lean::array_get_size(x_33); +lean::dec(x_33); +x_35 = lean::cnstr_get(x_31, 1); +lean::inc(x_35); +x_36 = l_Lean_Parser_fieldIdxFn(x_4, x_31); +x_37 = lean::cnstr_get(x_36, 3); +lean::inc(x_37); +if (lean::obj_tag(x_37) == 0) +{ +obj* x_38; +lean::dec(x_35); +lean::dec(x_34); +lean::dec(x_4); +x_38 = l_Lean_Parser_ParserState_mkNode(x_36, x_1, x_7); +return x_38; +} +else +{ +obj* x_39; uint8 x_40; +lean::dec(x_37); +x_39 = lean::cnstr_get(x_36, 1); +lean::inc(x_39); +x_40 = lean::nat_dec_eq(x_39, x_35); +lean::dec(x_39); +if (x_40 == 0) +{ +obj* x_41; +lean::dec(x_35); +lean::dec(x_34); +lean::dec(x_4); +x_41 = l_Lean_Parser_ParserState_mkNode(x_36, x_1, x_7); +return x_41; +} +else +{ +obj* x_42; obj* x_43; obj* x_44; +x_42 = l_Lean_Parser_ParserState_restore(x_36, x_34, x_35); +lean::dec(x_34); +x_43 = l_Lean_Parser_identFn___rarg(x_4, x_42); +x_44 = l_Lean_Parser_ParserState_mkNode(x_43, x_1, x_7); +return x_44; +} +} +} +else +{ +obj* x_45; +lean::dec(x_32); +lean::dec(x_4); +x_45 = l_Lean_Parser_ParserState_mkNode(x_31, x_1, x_7); +return x_45; +} +} +} +else +{ +obj* x_46; +lean::dec(x_9); +lean::dec(x_4); +lean::dec(x_3); +x_46 = l_Lean_Parser_ParserState_mkNode(x_8, x_1, x_7); +return x_46; +} +} +} obj* _init_l_Lean_Parser_Term_proj() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; uint8 x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4627,39 +7977,31 @@ x_15 = l_String_trim(x_14); lean::dec(x_14); lean::inc(x_15); x_16 = l_Lean_Parser_symbolNoWsInfo(x_15, x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolNoWsFn___boxed), 4, 1); -lean::closure_set(x_17, 0, x_15); -x_18 = lean::mk_string("fieldIdx"); -x_19 = l_Lean_Parser_mkAtomicInfo(x_18); -x_20 = lean::mk_string("ident"); -x_21 = l_Lean_Parser_mkAtomicInfo(x_20); -x_22 = 1; -x_23 = lean::box(x_22); -x_24 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_identFn___boxed), 2, 1); -lean::closure_set(x_24, 0, x_23); -x_25 = l_Lean_Parser_orelseInfo(x_19, x_21); -x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_fieldIdx___lambda__1___boxed), 3, 0); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean::closure_set(x_27, 0, x_26); -lean::closure_set(x_27, 1, x_24); -x_28 = l_Lean_Parser_andthenInfo(x_16, x_25); -x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_29, 0, x_17); -lean::closure_set(x_29, 1, x_27); -x_30 = l_Lean_Parser_epsilonInfo; -x_31 = l_Lean_Parser_andthenInfo(x_30, x_28); -x_32 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_pushLeadingFn___boxed), 3, 0); -x_33 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_33, 0, x_32); -lean::closure_set(x_33, 1, x_29); -x_34 = l_Lean_Parser_nodeInfo(x_31); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_9); -lean::closure_set(x_35, 1, x_33); -x_36 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_36, 0, x_34); -lean::cnstr_set(x_36, 1, x_35); -return x_36; +x_17 = lean::mk_string("fieldIdx"); +x_18 = l_Lean_Parser_mkAtomicInfo(x_17); +x_19 = lean::mk_string("ident"); +x_20 = l_Lean_Parser_mkAtomicInfo(x_19); +x_21 = l_Lean_Parser_orelseInfo(x_18, x_20); +x_22 = l_Lean_Parser_andthenInfo(x_16, x_21); +x_23 = l_Lean_Parser_epsilonInfo; +x_24 = l_Lean_Parser_andthenInfo(x_23, x_22); +x_25 = l_Lean_Parser_nodeInfo(x_24); +x_26 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_proj___elambda__1___boxed), 5, 2); +lean::closure_set(x_26, 0, x_9); +lean::closure_set(x_26, 1, x_15); +x_27 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_27, 0, x_25); +lean::cnstr_set(x_27, 1, x_26); +return x_27; +} +} +obj* l_Lean_Parser_Term_proj___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Lean_Parser_Term_proj___elambda__1(x_1, x_2, x_3, x_4, x_5); +lean::dec(x_2); +return x_6; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_proj___closed__1() { @@ -4689,10 +8031,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_arrow___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_arrow() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4711,16 +8069,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_arrow___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_arrow___closed__1() { @@ -4750,10 +8105,133 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_array___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +lean::inc(x_4); +lean::inc(x_6); +x_9 = l_Lean_Parser_ParserState_pushSyntax(x_6, x_4); +x_10 = lean::cnstr_get(x_6, 3); +lean::inc(x_10); +lean::dec(x_6); +if (lean::obj_tag(x_10) == 0) +{ +obj* x_11; obj* x_12; obj* x_13; obj* x_14; uint8 x_15; +x_11 = l_Lean_Parser_symbolFn___rarg___closed__1; +x_12 = lean::string_append(x_11, x_2); +x_13 = l_Lean_Parser_symbolNoWsFn___closed__1; +x_14 = lean::string_append(x_12, x_13); +x_15 = l_Lean_Parser_checkTailNoWs(x_4); +lean::dec(x_4); +if (x_15 == 0) +{ +obj* x_16; obj* x_17; +x_16 = l_Lean_Parser_ParserState_mkError(x_9, x_14); +x_17 = lean::cnstr_get(x_16, 3); +lean::inc(x_17); +if (lean::obj_tag(x_17) == 0) +{ +obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; +x_18 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_19 = l_Lean_Parser_builtinTermParsingTable; +x_20 = lean::mk_nat_obj(0u); +lean::inc(x_5); +x_21 = l_Lean_Parser_runBuiltinParserUnsafe(x_18, x_19, x_20, x_5, x_16); +x_22 = lean::cnstr_get(x_21, 3); +lean::inc(x_22); +if (lean::obj_tag(x_22) == 0) +{ +obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_23 = lean::string_append(x_11, x_3); +x_24 = l_Char_HasRepr___closed__1; +x_25 = lean::string_append(x_23, x_24); +x_26 = l_Lean_Parser_symbolFnAux(x_3, x_25, x_5, x_21); +x_27 = l_Lean_Parser_ParserState_mkNode(x_26, x_1, x_8); +return x_27; +} +else +{ +obj* x_28; +lean::dec(x_22); +lean::dec(x_5); +x_28 = l_Lean_Parser_ParserState_mkNode(x_21, x_1, x_8); +return x_28; +} +} +else +{ +obj* x_29; +lean::dec(x_17); +lean::dec(x_5); +x_29 = l_Lean_Parser_ParserState_mkNode(x_16, x_1, x_8); +return x_29; +} +} +else +{ +obj* x_30; obj* x_31; obj* x_32; +x_30 = lean::mk_nat_obj(0u); +x_31 = l_Lean_Parser_strAux___main(x_2, x_14, x_30, x_5, x_9); +x_32 = lean::cnstr_get(x_31, 3); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_33 = l_Lean_Parser_termParserFn___rarg___closed__1; +x_34 = l_Lean_Parser_builtinTermParsingTable; +lean::inc(x_5); +x_35 = l_Lean_Parser_runBuiltinParserUnsafe(x_33, x_34, x_30, x_5, x_31); +x_36 = lean::cnstr_get(x_35, 3); +lean::inc(x_36); +if (lean::obj_tag(x_36) == 0) +{ +obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; +x_37 = lean::string_append(x_11, x_3); +x_38 = l_Char_HasRepr___closed__1; +x_39 = lean::string_append(x_37, x_38); +x_40 = l_Lean_Parser_symbolFnAux(x_3, x_39, x_5, x_35); +x_41 = l_Lean_Parser_ParserState_mkNode(x_40, x_1, x_8); +return x_41; +} +else +{ +obj* x_42; +lean::dec(x_36); +lean::dec(x_5); +x_42 = l_Lean_Parser_ParserState_mkNode(x_35, x_1, x_8); +return x_42; +} +} +else +{ +obj* x_43; +lean::dec(x_32); +lean::dec(x_5); +x_43 = l_Lean_Parser_ParserState_mkNode(x_31, x_1, x_8); +return x_43; +} +} +} +else +{ +obj* x_44; +lean::dec(x_10); +lean::dec(x_5); +lean::dec(x_4); +x_44 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_44; +} +} +} obj* _init_l_Lean_Parser_Term_array() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4773,46 +8251,40 @@ x_15 = l_String_trim(x_14); lean::dec(x_14); lean::inc(x_15); x_16 = l_Lean_Parser_symbolNoWsInfo(x_15, x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolNoWsFn___boxed), 4, 1); -lean::closure_set(x_17, 0, x_15); -x_18 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); -x_19 = lean::box(1); -x_20 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_20, 0, x_18); -lean::cnstr_set(x_20, 1, x_19); -x_21 = lean::mk_nat_obj(0u); -x_22 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_termParserFn___rarg___boxed), 4, 1); -lean::closure_set(x_22, 0, x_21); -x_23 = lean::box(0); -x_24 = lean::mk_string("]"); -x_25 = l_String_trim(x_24); -lean::dec(x_24); -lean::inc(x_25); -x_26 = l_Lean_Parser_symbolInfo(x_25, x_23); -x_27 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean::closure_set(x_27, 0, x_25); -x_28 = l_Lean_Parser_andthenInfo(x_20, x_26); -x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_29, 0, x_22); -lean::closure_set(x_29, 1, x_27); -x_30 = l_Lean_Parser_andthenInfo(x_16, x_28); -x_31 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_31, 0, x_17); -lean::closure_set(x_31, 1, x_29); -x_32 = l_Lean_Parser_epsilonInfo; -x_33 = l_Lean_Parser_andthenInfo(x_32, x_30); -x_34 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_pushLeadingFn___boxed), 3, 0); -x_35 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean::closure_set(x_35, 0, x_34); -lean::closure_set(x_35, 1, x_31); -x_36 = l_Lean_Parser_nodeInfo(x_33); -x_37 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_37, 0, x_9); -lean::closure_set(x_37, 1, x_35); -x_38 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_38, 0, x_36); -lean::cnstr_set(x_38, 1, x_37); -return x_38; +x_17 = lean::alloc_closure(reinterpret_cast(l_ExceptT_lift___rarg___lambda__1), 1, 0); +x_18 = lean::box(1); +x_19 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_19, 0, x_17); +lean::cnstr_set(x_19, 1, x_18); +x_20 = lean::box(0); +x_21 = lean::mk_string("]"); +x_22 = l_String_trim(x_21); +lean::dec(x_21); +lean::inc(x_22); +x_23 = l_Lean_Parser_symbolInfo(x_22, x_20); +x_24 = l_Lean_Parser_andthenInfo(x_19, x_23); +x_25 = l_Lean_Parser_andthenInfo(x_16, x_24); +x_26 = l_Lean_Parser_epsilonInfo; +x_27 = l_Lean_Parser_andthenInfo(x_26, x_25); +x_28 = l_Lean_Parser_nodeInfo(x_27); +x_29 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_array___elambda__1___boxed), 6, 3); +lean::closure_set(x_29, 0, x_9); +lean::closure_set(x_29, 1, x_15); +lean::closure_set(x_29, 2, x_22); +x_30 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_30, 0, x_28); +lean::cnstr_set(x_30, 1, x_29); +return x_30; +} +} +obj* l_Lean_Parser_Term_array___elambda__1___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +obj* x_7; +x_7 = l_Lean_Parser_Term_array___elambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean::dec(x_3); +lean::dec(x_2); +return x_7; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_array___closed__1() { @@ -4842,10 +8314,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_fcomp___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_fcomp() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4862,16 +8350,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_fcomp___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_fcomp___closed__1() { @@ -4901,10 +8386,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_add___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_add() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4921,16 +8422,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_add___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_add___closed__1() { @@ -4960,10 +8458,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_sub___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_sub() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -4980,16 +8494,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_sub___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_sub___closed__1() { @@ -5019,10 +8530,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_mul___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_mul() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5039,16 +8566,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_mul___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_mul___closed__1() { @@ -5078,10 +8602,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_div___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_div() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5098,16 +8638,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_div___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_div___closed__1() { @@ -5137,10 +8674,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_mod___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_mod() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5157,16 +8710,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_mod___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_mod___closed__1() { @@ -5196,10 +8746,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_modN___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_modN() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5216,16 +8782,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_modN___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_modN___closed__1() { @@ -5255,10 +8818,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_le___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_le() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5277,16 +8856,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_le___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_le___closed__1() { @@ -5316,10 +8892,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_ge___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_ge() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5338,16 +8930,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_ge___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_ge___closed__1() { @@ -5377,10 +8966,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_lt___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_lt() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5397,16 +9002,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_lt___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_lt___closed__1() { @@ -5436,10 +9038,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_gt___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_gt() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5456,16 +9074,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_gt___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_gt___closed__1() { @@ -5495,10 +9110,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_eq___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_eq() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5515,16 +9146,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_eq___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_eq___closed__1() { @@ -5554,10 +9182,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_beq___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_beq() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5574,16 +9218,13 @@ lean::dec(x_10); x_13 = lean::cnstr_get(x_12, 0); lean::inc(x_13); x_14 = l_Lean_Parser_nodeInfo(x_13); -x_15 = lean::cnstr_get(x_12, 1); -lean::inc(x_15); -lean::dec(x_12); -x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_16, 0, x_9); -lean::closure_set(x_16, 1, x_15); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_14); -lean::cnstr_set(x_17, 1, x_16); -return x_17; +x_15 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_beq___elambda__1), 5, 2); +lean::closure_set(x_15, 0, x_9); +lean::closure_set(x_15, 1, x_12); +x_16 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_16, 0, x_14); +lean::cnstr_set(x_16, 1, x_15); +return x_16; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_beq___closed__1() { @@ -5613,10 +9254,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_and___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_and() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5635,16 +9292,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_and___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_and___closed__1() { @@ -5674,10 +9328,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_or___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_or() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5696,16 +9366,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_or___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_or___closed__1() { @@ -5735,10 +9402,26 @@ x_5 = l_Lean_Parser_addBuiltinTrailingParser(x_2, x_3, x_4, x_1); return x_5; } } +obj* l_Lean_Parser_Term_iff___elambda__1(obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +lean::dec(x_2); +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +x_8 = lean::array_get_size(x_7); +lean::dec(x_7); +x_9 = lean::apply_3(x_6, x_3, x_4, x_5); +x_10 = l_Lean_Parser_ParserState_mkNode(x_9, x_1, x_8); +return x_10; +} +} obj* _init_l_Lean_Parser_Term_iff() { _start: { -obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; x_1 = lean::box(0); x_2 = lean::mk_string("Lean"); x_3 = lean_name_mk_string(x_1, x_2); @@ -5757,16 +9440,13 @@ lean::dec(x_10); x_14 = lean::cnstr_get(x_13, 0); lean::inc(x_14); x_15 = l_Lean_Parser_nodeInfo(x_14); -x_16 = lean::cnstr_get(x_13, 1); -lean::inc(x_16); -lean::dec(x_13); -x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean::closure_set(x_17, 0, x_9); -lean::closure_set(x_17, 1, x_16); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_15); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +x_16 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_Term_iff___elambda__1), 5, 2); +lean::closure_set(x_16, 0, x_9); +lean::closure_set(x_16, 1, x_13); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set(x_17, 1, x_16); +return x_17; } } obj* _init_l___regBuiltinParser_Lean_Parser_Term_iff___closed__1() { @@ -5828,10 +9508,6 @@ REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_na REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "infixR"), 2, l_Lean_Parser_Term_infixR___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "unicodeInfixL"), 3, l_Lean_Parser_Term_unicodeInfixL___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "infixL"), 2, l_Lean_Parser_Term_infixL___boxed); -l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1 = _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1(); -lean::mark_persistent(l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__1); -l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2 = _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2(); -lean::mark_persistent(l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_id___spec__3___closed__2); l_Lean_Parser_Term_id = _init_l_Lean_Parser_Term_id(); lean::mark_persistent(l_Lean_Parser_Term_id); lean::register_constant(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "id"), l_Lean_Parser_Term_id); @@ -5981,10 +9657,6 @@ l___regBuiltinParser_Lean_Parser_Term_subtype___closed__1 = _init_l___regBuiltin lean::mark_persistent(l___regBuiltinParser_Lean_Parser_Term_subtype___closed__1); w = l___regBuiltinParser_Lean_Parser_Term_subtype(w); if (io_result_is_error(w)) return w; -l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1 = _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1(); -lean::mark_persistent(l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__1); -l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2 = _init_l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2(); -lean::mark_persistent(l___private_init_lean_parser_parser_1__sepByFnAux___main___at_Lean_Parser_Term_list___spec__3___closed__2); l_Lean_Parser_Term_list = _init_l_Lean_Parser_Term_list(); lean::mark_persistent(l_Lean_Parser_Term_list); lean::register_constant(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "list"), l_Lean_Parser_Term_list); @@ -6010,11 +9682,39 @@ l_Lean_Parser_Term_explicitBinder___closed__1 = _init_l_Lean_Parser_Term_explici lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__1); l_Lean_Parser_Term_explicitBinder___closed__2 = _init_l_Lean_Parser_Term_explicitBinder___closed__2(); lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__2); +l_Lean_Parser_Term_explicitBinder___closed__3 = _init_l_Lean_Parser_Term_explicitBinder___closed__3(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__3); +l_Lean_Parser_Term_explicitBinder___closed__4 = _init_l_Lean_Parser_Term_explicitBinder___closed__4(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__4); +l_Lean_Parser_Term_explicitBinder___closed__5 = _init_l_Lean_Parser_Term_explicitBinder___closed__5(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__5); +l_Lean_Parser_Term_explicitBinder___closed__6 = _init_l_Lean_Parser_Term_explicitBinder___closed__6(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__6); +l_Lean_Parser_Term_explicitBinder___closed__7 = _init_l_Lean_Parser_Term_explicitBinder___closed__7(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__7); +l_Lean_Parser_Term_explicitBinder___closed__8 = _init_l_Lean_Parser_Term_explicitBinder___closed__8(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__8); +l_Lean_Parser_Term_explicitBinder___closed__9 = _init_l_Lean_Parser_Term_explicitBinder___closed__9(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__9); +l_Lean_Parser_Term_explicitBinder___closed__10 = _init_l_Lean_Parser_Term_explicitBinder___closed__10(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__10); +l_Lean_Parser_Term_explicitBinder___closed__11 = _init_l_Lean_Parser_Term_explicitBinder___closed__11(); +lean::mark_persistent(l_Lean_Parser_Term_explicitBinder___closed__11); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "explicitBinder"), 1, l_Lean_Parser_Term_explicitBinder___boxed); l_Lean_Parser_Term_implicitBinder___closed__1 = _init_l_Lean_Parser_Term_implicitBinder___closed__1(); lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__1); l_Lean_Parser_Term_implicitBinder___closed__2 = _init_l_Lean_Parser_Term_implicitBinder___closed__2(); lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__2); +l_Lean_Parser_Term_implicitBinder___closed__3 = _init_l_Lean_Parser_Term_implicitBinder___closed__3(); +lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__3); +l_Lean_Parser_Term_implicitBinder___closed__4 = _init_l_Lean_Parser_Term_implicitBinder___closed__4(); +lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__4); +l_Lean_Parser_Term_implicitBinder___closed__5 = _init_l_Lean_Parser_Term_implicitBinder___closed__5(); +lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__5); +l_Lean_Parser_Term_implicitBinder___closed__6 = _init_l_Lean_Parser_Term_implicitBinder___closed__6(); +lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__6); +l_Lean_Parser_Term_implicitBinder___closed__7 = _init_l_Lean_Parser_Term_implicitBinder___closed__7(); +lean::mark_persistent(l_Lean_Parser_Term_implicitBinder___closed__7); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Parser"), "Term"), "implicitBinder"), 1, l_Lean_Parser_Term_implicitBinder___boxed); l_Lean_Parser_Term_instBinder = _init_l_Lean_Parser_Term_instBinder(); lean::mark_persistent(l_Lean_Parser_Term_instBinder);