From 2e668d9052605123b8cbf41b0ae4fd4b0754cb69 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 14 Jan 2020 14:16:21 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Lean/Elab/Command.lean | 5 + stage0/src/Init/Lean/Parser/Parser.lean | 7 +- stage0/src/Init/Lean/Parser/Syntax.lean | 8 +- stage0/src/Init/LeanExt.lean | 14 +- stage0/stdlib/Init/Lean/Elab/Command.c | 111 ++ stage0/stdlib/Init/Lean/Parser/Parser.c | 1966 ++++++++++++----------- stage0/stdlib/Init/Lean/Parser/Syntax.c | 1517 +++++++++++++---- stage0/stdlib/Init/LeanExt.c | 122 +- 8 files changed, 2485 insertions(+), 1265 deletions(-) diff --git a/stage0/src/Init/Lean/Elab/Command.lean b/stage0/src/Init/Lean/Elab/Command.lean index b0270be140..45ecbb1a3d 100644 --- a/stage0/src/Init/Lean/Elab/Command.lean +++ b/stage0/src/Init/Lean/Elab/Command.lean @@ -578,6 +578,11 @@ fun stx => do env ← liftIO stx $ Parser.registerParserCategory env attrName catName; setEnv env + +@[builtinCommandElab syntax] def elabSyntax : CommandElab := +fun stx => + throwError stx ("not implemented yet " ++ toString stx) + @[inline] def withDeclId (declId : Syntax) (f : Name → CommandElabM Unit) : CommandElabM Unit := do -- ident >> optional (".{" >> sepBy1 ident ", " >> "}") let id := declId.getIdAt 0; diff --git a/stage0/src/Init/Lean/Parser/Parser.lean b/stage0/src/Init/Lean/Parser/Parser.lean index d6183dc10d..8af1bc67e8 100644 --- a/stage0/src/Init/Lean/Parser/Parser.lean +++ b/stage0/src/Init/Lean/Parser/Parser.lean @@ -1513,10 +1513,13 @@ def compileParserDescr (categories : ParserCategories) : forall {k : ParserKind} | _, ParserDescr.sepBy d₁ d₂ => sepBy <$> compileParserDescr d₁ <*> compileParserDescr d₂ | _, ParserDescr.sepBy1 d₁ d₂ => sepBy1 <$> compileParserDescr d₁ <*> compileParserDescr d₂ | _, ParserDescr.node k d => node k <$> compileParserDescr d -| _, ParserDescr.symbol tk lbp => pure $ symbol tk lbp +| _, ParserDescr.symbol tk lbp => pure $ symbolAux tk lbp +| _, ParserDescr.num => pure $ numLit +| _, ParserDescr.str => pure $ strLit +| _, ParserDescr.char => pure $ charLit +| _, ParserDescr.ident => pure $ identNoAntiquot -- Kha, do we need `ident` here? | ParserKind.leading, ParserDescr.nonReservedSymbol tk includeIdent => pure $ nonReservedSymbol tk includeIdent -| _, ParserDescr.unicodeSymbol tk₁ tk₂ lbp => pure $ unicodeSymbol tk₁ tk₂ lbp | ParserKind.leading, ParserDescr.parser catName rbp => match categories.find? catName with | some _ => pure $ categoryParser catName rbp diff --git a/stage0/src/Init/Lean/Parser/Syntax.lean b/stage0/src/Init/Lean/Parser/Syntax.lean index e8f9bda3b0..9230134301 100644 --- a/stage0/src/Init/Lean/Parser/Syntax.lean +++ b/stage0/src/Init/Lean/Parser/Syntax.lean @@ -22,18 +22,20 @@ categoryParser `syntax rbp namespace Syntax @[builtinSyntaxParser] def paren := parser! "(" >> many1 syntaxParser >> ")" -@[builtinSyntaxParser] def cat := parser! ident -@[builtinSyntaxParser] def atom := parser! strLit +@[builtinSyntaxParser] def cat := parser! ident >> optional (":" >> numLit) +@[builtinSyntaxParser] def atom := parser! strLit >> optional (":" >> numLit) @[builtinSyntaxParser] def num := parser! nonReservedSymbol "num" @[builtinSyntaxParser] def str := parser! nonReservedSymbol "str" +@[builtinSyntaxParser] def char := parser! nonReservedSymbol "char" +@[builtinSyntaxParser] def ident := parser! nonReservedSymbol "ident" @[builtinSyntaxParser] def try := parser! nonReservedSymbol "try " >> syntaxParser @[builtinSyntaxParser] def lookahead := parser! nonReservedSymbol "lookahead " >> syntaxParser +@[builtinSyntaxParser] def optional := parser! nonReservedSymbol "optional " >> syntaxParser @[builtinSyntaxParser] def sepBy := parser! nonReservedSymbol "sepBy " >> syntaxParser >> syntaxParser @[builtinSyntaxParser] def sepBy1 := parser! nonReservedSymbol "sepBy1 " >> syntaxParser >> syntaxParser @[builtinSyntaxParser] def many := tparser! pushLeading >> symbolAux "*" none @[builtinSyntaxParser] def many1 := tparser! pushLeading >> symbolAux "+" none -@[builtinSyntaxParser] def optional := tparser! pushLeading >> symbolAux "?" none @[builtinSyntaxParser] def orelse := tparser! infixR " <|> " 2 end Syntax diff --git a/stage0/src/Init/LeanExt.lean b/stage0/src/Init/LeanExt.lean index 99d696bc3e..ee400a67ae 100644 --- a/stage0/src/Init/LeanExt.lean +++ b/stage0/src/Init/LeanExt.lean @@ -40,13 +40,16 @@ inductive ParserDescrCore : ParserKind → Type | sepBy {k : ParserKind} : ParserDescrCore k → ParserDescrCore k → ParserDescrCore k | sepBy1 {k : ParserKind} : ParserDescrCore k → ParserDescrCore k → ParserDescrCore k | node {k : ParserKind} : Name → ParserDescrCore k → ParserDescrCore k -| symbol {k : ParserKind} : String → Nat → ParserDescrCore k -| unicodeSymbol {k : ParserKind} : String → String → Nat → ParserDescrCore k +| symbol {k : ParserKind} : String → Option Nat → ParserDescrCore k | nonReservedSymbol : String → Bool → ParserDescrCore ParserKind.leading +| num {k : ParserKind} : ParserDescrCore k +| str {k : ParserKind} : ParserDescrCore k +| char {k : ParserKind} : ParserDescrCore k +| ident {k : ParserKind} : ParserDescrCore k | pushLeading : ParserDescrCore ParserKind.trailing | parser : Name → Nat → ParserDescrCore ParserKind.leading -instance ParserDescrCore.inhabited {k} : Inhabited (ParserDescrCore k) := ⟨ParserDescrCore.symbol "" 0⟩ +instance ParserDescrCore.inhabited {k} : Inhabited (ParserDescrCore k) := ⟨ParserDescrCore.symbol "" none⟩ abbrev ParserDescr := ParserDescrCore ParserKind.leading abbrev TrailingParserDescr := ParserDescrCore ParserKind.trailing @@ -62,8 +65,11 @@ abbrev TrailingParserDescr := ParserDescrCore ParserKind.trailing @[matchPattern] abbrev ParserDescr.sepBy1 := @ParserDescrCore.sepBy1 @[matchPattern] abbrev ParserDescr.node := @ParserDescrCore.node @[matchPattern] abbrev ParserDescr.symbol := @ParserDescrCore.symbol +@[matchPattern] abbrev ParserDescr.num := @ParserDescrCore.num +@[matchPattern] abbrev ParserDescr.str := @ParserDescrCore.str +@[matchPattern] abbrev ParserDescr.char := @ParserDescrCore.char +@[matchPattern] abbrev ParserDescr.ident := @ParserDescrCore.ident @[matchPattern] abbrev ParserDescr.nonReservedSymbol := @ParserDescrCore.nonReservedSymbol -@[matchPattern] abbrev ParserDescr.unicodeSymbol := @ParserDescrCore.unicodeSymbol @[matchPattern] abbrev ParserDescr.pushLeading := @ParserDescrCore.pushLeading @[matchPattern] abbrev ParserDescr.parser := @ParserDescrCore.parser diff --git a/stage0/stdlib/Init/Lean/Elab/Command.c b/stage0/stdlib/Init/Lean/Elab/Command.c index dbb15b05ae..8b9f355f1f 100644 --- a/stage0/stdlib/Init/Lean/Elab/Command.c +++ b/stage0/stdlib/Init/Lean/Elab/Command.c @@ -21,6 +21,7 @@ extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__4; lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace(lean_object*); +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2; lean_object* l_Lean_extractMacroScopes(lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__4___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__3; @@ -161,6 +162,7 @@ extern lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4; extern lean_object* l_Lean_Parser_Command_mixfix___elambda__1___closed__2; lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* l_Lean_Elab_Command_elabOpen(lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1; lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSetOption___closed__3; extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; @@ -326,6 +328,7 @@ extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__7; lean_object* l_Lean_Elab_Command_elabOpenOnly(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Options_empty; extern lean_object* l_Lean_Parser_Command_variable___elambda__1___closed__2; +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3; lean_object* l_ReaderT_read___at_Lean_Elab_Command_CommandElabM_monadLog___spec__1(lean_object*, lean_object*); uint8_t l_coeDecidableEq(uint8_t); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__1; @@ -343,6 +346,7 @@ lean_object* l_PersistentHashMap_containsAux___main___at_Lean_Elab_Command_addBu lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__2; extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2; uint8_t l_Array_contains___at_Lean_findField_x3f___main___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabSyntax___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1; lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__2; @@ -359,6 +363,7 @@ lean_object* l_PersistentHashMap_empty___at_Lean_Elab_Command_mkBuiltinCommandEl lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen(lean_object*); lean_object* l_Lean_Elab_Command_elabEnd(lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax(lean_object*); lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck(lean_object*); @@ -447,6 +452,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2; lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabSyntax___closed__1; lean_object* l_Lean_Elab_Command_withIncRecDepth(lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__3; @@ -460,6 +466,7 @@ lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenSi lean_object* l_Lean_Syntax_getOptionalIdent_x3f(lean_object*); lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__2; +lean_object* l_Lean_Elab_Command_elabSyntax___closed__2; lean_object* l_Lean_Elab_Command_elabNamespace(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabReserve___rarg(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix(lean_object*); @@ -474,6 +481,7 @@ lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__1; lean_object* l_Lean_Syntax_getPos(lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__2; +lean_object* l_Lean_Elab_Command_elabSyntax(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenHiding___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4; @@ -576,6 +584,7 @@ lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMa lean_object* l_Lean_Elab_Command_mkMessageAux(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_10__mkTermState___boxed(lean_object*); +extern lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; @@ -18813,6 +18822,93 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("not implemented yet "); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_elabSyntax(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_4 = lean_box(0); +x_5 = lean_unsigned_to_nat(0u); +lean_inc(x_1); +x_6 = l_Lean_Syntax_formatStxAux___main(x_4, x_5, x_1); +x_7 = l_Lean_Options_empty; +x_8 = l_Lean_Format_pretty(x_6, x_7); +x_9 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_9, 0, x_8); +x_10 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_10, 0, x_9); +x_11 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_12 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +x_13 = l_Lean_Elab_Command_throwError___rarg(x_1, x_12, x_2, x_3); +return x_13; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabSyntax"); +return x_1; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; +x_2 = l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabSyntax), 3, 0); +return x_1; +} +} +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_Parser_Command_syntax___elambda__1___closed__1; +x_3 = l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2; +x_4 = l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3; +x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -22614,6 +22710,21 @@ lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclareSynt res = l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclareSyntaxCat(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_elabSyntax___closed__1 = _init_l_Lean_Elab_Command_elabSyntax___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__1); +l_Lean_Elab_Command_elabSyntax___closed__2 = _init_l_Lean_Elab_Command_elabSyntax___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__2); +l_Lean_Elab_Command_elabSyntax___closed__3 = _init_l_Lean_Elab_Command_elabSyntax___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__3); +l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1); +l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2); +l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3); +res = l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Elab_Command_withDeclId___closed__1 = _init_l_Lean_Elab_Command_withDeclId___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_withDeclId___closed__1); l_Lean_Elab_Command_withDeclId___closed__2 = _init_l_Lean_Elab_Command_withDeclId___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Parser/Parser.c b/stage0/stdlib/Init/Lean/Parser/Parser.c index 42491365f7..282e52ecd4 100644 --- a/stage0/stdlib/Init/Lean/Parser/Parser.c +++ b/stage0/stdlib/Init/Lean/Parser/Parser.c @@ -28717,103 +28717,135 @@ return x_263; } case 10: { -lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; +lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_dec(x_1); x_264 = lean_ctor_get(x_3, 0); lean_inc(x_264); x_265 = lean_ctor_get(x_3, 1); lean_inc(x_265); lean_dec(x_3); -x_266 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_266, 0, x_265); -x_267 = l_String_trim(x_264); +x_266 = l_String_trim(x_264); lean_dec(x_264); -lean_inc(x_267); -x_268 = l_Lean_Parser_symbolInfo(x_267, x_266); -x_269 = lean_alloc_closure((void*)(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean_closure_set(x_269, 0, x_267); -x_270 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_270, 0, x_268); -lean_ctor_set(x_270, 1, x_269); -x_271 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_271, 0, x_270); -return x_271; +lean_inc(x_266); +x_267 = l_Lean_Parser_symbolInfo(x_266, x_265); +x_268 = lean_alloc_closure((void*)(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean_closure_set(x_268, 0, x_266); +x_269 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_269, 0, x_267); +lean_ctor_set(x_269, 1, x_268); +x_270 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_270, 0, x_269); +return x_270; } case 11: { -lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; +lean_object* x_271; uint8_t x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_dec(x_1); -x_272 = lean_ctor_get(x_3, 0); -lean_inc(x_272); -x_273 = lean_ctor_get(x_3, 1); -lean_inc(x_273); -x_274 = lean_ctor_get(x_3, 2); -lean_inc(x_274); +x_271 = lean_ctor_get(x_3, 0); +lean_inc(x_271); +x_272 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); lean_dec(x_3); -x_275 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_275, 0, x_274); -x_276 = l_String_trim(x_272); -lean_dec(x_272); -x_277 = l_String_trim(x_273); -lean_dec(x_273); -lean_inc(x_277); -lean_inc(x_276); -x_278 = l_Lean_Parser_unicodeSymbolInfo(x_276, x_277, x_275); -x_279 = lean_alloc_closure((void*)(l_Lean_Parser_unicodeSymbolFn___rarg___boxed), 5, 2); -lean_closure_set(x_279, 0, x_276); -lean_closure_set(x_279, 1, x_277); -x_280 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_280, 0, x_278); -lean_ctor_set(x_280, 1, x_279); -x_281 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_281, 0, x_280); -return x_281; +x_273 = l_String_trim(x_271); +lean_dec(x_271); +lean_inc(x_273); +x_274 = l_Lean_Parser_nonReservedSymbolInfo(x_273, x_272); +x_275 = lean_alloc_closure((void*)(l_Lean_Parser_nonReservedSymbol___lambda__1___boxed), 4, 1); +lean_closure_set(x_275, 0, x_273); +x_276 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_276, 0, x_274); +lean_ctor_set(x_276, 1, x_275); +x_277 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_277, 0, x_276); +return x_277; } case 12: { -lean_object* x_282; uint8_t x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; -lean_dec(x_1); -x_282 = lean_ctor_get(x_3, 0); -lean_inc(x_282); -x_283 = lean_ctor_get_uint8(x_3, sizeof(void*)*1); +lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_dec(x_3); -x_284 = l_String_trim(x_282); -lean_dec(x_282); -lean_inc(x_284); -x_285 = l_Lean_Parser_nonReservedSymbolInfo(x_284, x_283); -x_286 = lean_alloc_closure((void*)(l_Lean_Parser_nonReservedSymbol___lambda__1___boxed), 4, 1); -lean_closure_set(x_286, 0, x_284); -x_287 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_287, 0, x_285); -lean_ctor_set(x_287, 1, x_286); -x_288 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_288, 0, x_287); -return x_288; +lean_dec(x_1); +x_278 = lean_box(x_2); +x_279 = lean_alloc_closure((void*)(l_Lean_Parser_numLitFn___boxed), 2, 1); +lean_closure_set(x_279, 0, x_278); +x_280 = l_Lean_Parser_numLit___closed__1; +x_281 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_281, 0, x_280); +lean_ctor_set(x_281, 1, x_279); +x_282 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_282, 0, x_281); +return x_282; +} +case 13: +{ +lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; +lean_dec(x_3); +lean_dec(x_1); +x_283 = lean_box(x_2); +x_284 = lean_alloc_closure((void*)(l_Lean_Parser_strLitFn___boxed), 2, 1); +lean_closure_set(x_284, 0, x_283); +x_285 = l_Lean_Parser_strLit___closed__1; +x_286 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_286, 0, x_285); +lean_ctor_set(x_286, 1, x_284); +x_287 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_287, 0, x_286); +return x_287; +} +case 14: +{ +lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; +lean_dec(x_3); +lean_dec(x_1); +x_288 = lean_box(x_2); +x_289 = lean_alloc_closure((void*)(l_Lean_Parser_charLitFn___boxed), 2, 1); +lean_closure_set(x_289, 0, x_288); +x_290 = l_Lean_Parser_charLit___closed__1; +x_291 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_291, 0, x_290); +lean_ctor_set(x_291, 1, x_289); +x_292 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_292, 0, x_291); +return x_292; +} +case 15: +{ +lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; +lean_dec(x_3); +lean_dec(x_1); +x_293 = lean_box(x_2); +x_294 = lean_alloc_closure((void*)(l_Lean_Parser_identFn___boxed), 2, 1); +lean_closure_set(x_294, 0, x_293); +x_295 = l_Lean_Parser_identNoAntiquot___closed__1; +x_296 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_296, 0, x_295); +lean_ctor_set(x_296, 1, x_294); +x_297 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_297, 0, x_296); +return x_297; } default: { -lean_object* x_289; lean_object* x_290; lean_object* x_291; -x_289 = lean_ctor_get(x_3, 0); -lean_inc(x_289); -x_290 = lean_ctor_get(x_3, 1); -lean_inc(x_290); +lean_object* x_298; lean_object* x_299; lean_object* x_300; +x_298 = lean_ctor_get(x_3, 0); +lean_inc(x_298); +x_299 = lean_ctor_get(x_3, 1); +lean_inc(x_299); lean_dec(x_3); -x_291 = l_PersistentHashMap_find_x3f___at_Lean_Parser_addLeadingParser___spec__1(x_1, x_289); -if (lean_obj_tag(x_291) == 0) +x_300 = l_PersistentHashMap_find_x3f___at_Lean_Parser_addLeadingParser___spec__1(x_1, x_298); +if (lean_obj_tag(x_300) == 0) { -lean_object* x_292; -lean_dec(x_290); -x_292 = l_Lean_Parser_throwUnknownParserCategory___rarg(x_289); -return x_292; +lean_object* x_301; +lean_dec(x_299); +x_301 = l_Lean_Parser_throwUnknownParserCategory___rarg(x_298); +return x_301; } else { -lean_object* x_293; lean_object* x_294; -lean_dec(x_291); -x_293 = l_Lean_Parser_categoryParser(x_2, x_289, x_290); -x_294 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_294, 0, x_293); -return x_294; +lean_object* x_302; lean_object* x_303; +lean_dec(x_300); +x_302 = l_Lean_Parser_categoryParser(x_2, x_298, x_299); +x_303 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_303, 0, x_302); +return x_303; } } } @@ -28823,1069 +28855,1101 @@ else switch (lean_obj_tag(x_3)) { case 0: { -lean_object* x_295; lean_object* x_296; lean_object* x_297; -x_295 = lean_ctor_get(x_3, 0); -lean_inc(x_295); -x_296 = lean_ctor_get(x_3, 1); -lean_inc(x_296); +lean_object* x_304; lean_object* x_305; lean_object* x_306; +x_304 = lean_ctor_get(x_3, 0); +lean_inc(x_304); +x_305 = lean_ctor_get(x_3, 1); +lean_inc(x_305); lean_dec(x_3); lean_inc(x_1); -x_297 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_295); -if (lean_obj_tag(x_297) == 0) +x_306 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_304); +if (lean_obj_tag(x_306) == 0) { -uint8_t x_298; -lean_dec(x_296); +uint8_t x_307; +lean_dec(x_305); lean_dec(x_1); -x_298 = !lean_is_exclusive(x_297); -if (x_298 == 0) +x_307 = !lean_is_exclusive(x_306); +if (x_307 == 0) { -return x_297; +return x_306; } else { -lean_object* x_299; lean_object* x_300; -x_299 = lean_ctor_get(x_297, 0); -lean_inc(x_299); -lean_dec(x_297); -x_300 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_300, 0, x_299); -return x_300; -} -} -else -{ -lean_object* x_301; lean_object* x_302; -x_301 = lean_ctor_get(x_297, 0); -lean_inc(x_301); -lean_dec(x_297); -x_302 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_296); -if (lean_obj_tag(x_302) == 0) -{ -uint8_t x_303; -lean_dec(x_301); -x_303 = !lean_is_exclusive(x_302); -if (x_303 == 0) -{ -return x_302; -} -else -{ -lean_object* x_304; lean_object* x_305; -x_304 = lean_ctor_get(x_302, 0); -lean_inc(x_304); -lean_dec(x_302); -x_305 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_305, 0, x_304); -return x_305; -} -} -else -{ -uint8_t x_306; -x_306 = !lean_is_exclusive(x_302); -if (x_306 == 0) -{ -lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; -x_307 = lean_ctor_get(x_302, 0); -x_308 = lean_ctor_get(x_301, 0); +lean_object* x_308; lean_object* x_309; +x_308 = lean_ctor_get(x_306, 0); lean_inc(x_308); -x_309 = lean_ctor_get(x_307, 0); -lean_inc(x_309); -x_310 = l_Lean_Parser_andthenInfo(x_308, x_309); -x_311 = lean_ctor_get(x_301, 1); -lean_inc(x_311); -lean_dec(x_301); -x_312 = lean_ctor_get(x_307, 1); -lean_inc(x_312); -lean_dec(x_307); -x_313 = lean_alloc_closure((void*)(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean_closure_set(x_313, 0, x_311); -lean_closure_set(x_313, 1, x_312); -x_314 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_314, 0, x_310); -lean_ctor_set(x_314, 1, x_313); -lean_ctor_set(x_302, 0, x_314); -return x_302; +lean_dec(x_306); +x_309 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_309, 0, x_308); +return x_309; +} } else { -lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; -x_315 = lean_ctor_get(x_302, 0); -lean_inc(x_315); -lean_dec(x_302); -x_316 = lean_ctor_get(x_301, 0); -lean_inc(x_316); -x_317 = lean_ctor_get(x_315, 0); +lean_object* x_310; lean_object* x_311; +x_310 = lean_ctor_get(x_306, 0); +lean_inc(x_310); +lean_dec(x_306); +x_311 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_305); +if (lean_obj_tag(x_311) == 0) +{ +uint8_t x_312; +lean_dec(x_310); +x_312 = !lean_is_exclusive(x_311); +if (x_312 == 0) +{ +return x_311; +} +else +{ +lean_object* x_313; lean_object* x_314; +x_313 = lean_ctor_get(x_311, 0); +lean_inc(x_313); +lean_dec(x_311); +x_314 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_314, 0, x_313); +return x_314; +} +} +else +{ +uint8_t x_315; +x_315 = !lean_is_exclusive(x_311); +if (x_315 == 0) +{ +lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; +x_316 = lean_ctor_get(x_311, 0); +x_317 = lean_ctor_get(x_310, 0); lean_inc(x_317); -x_318 = l_Lean_Parser_andthenInfo(x_316, x_317); -x_319 = lean_ctor_get(x_301, 1); -lean_inc(x_319); -lean_dec(x_301); -x_320 = lean_ctor_get(x_315, 1); +x_318 = lean_ctor_get(x_316, 0); +lean_inc(x_318); +x_319 = l_Lean_Parser_andthenInfo(x_317, x_318); +x_320 = lean_ctor_get(x_310, 1); lean_inc(x_320); -lean_dec(x_315); -x_321 = lean_alloc_closure((void*)(l_Lean_Parser_andthenFn___rarg), 5, 2); -lean_closure_set(x_321, 0, x_319); -lean_closure_set(x_321, 1, x_320); -x_322 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_322, 0, x_318); -lean_ctor_set(x_322, 1, x_321); -x_323 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_323, 0, x_322); -return x_323; +lean_dec(x_310); +x_321 = lean_ctor_get(x_316, 1); +lean_inc(x_321); +lean_dec(x_316); +x_322 = lean_alloc_closure((void*)(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean_closure_set(x_322, 0, x_320); +lean_closure_set(x_322, 1, x_321); +x_323 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_323, 0, x_319); +lean_ctor_set(x_323, 1, x_322); +lean_ctor_set(x_311, 0, x_323); +return x_311; +} +else +{ +lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; +x_324 = lean_ctor_get(x_311, 0); +lean_inc(x_324); +lean_dec(x_311); +x_325 = lean_ctor_get(x_310, 0); +lean_inc(x_325); +x_326 = lean_ctor_get(x_324, 0); +lean_inc(x_326); +x_327 = l_Lean_Parser_andthenInfo(x_325, x_326); +x_328 = lean_ctor_get(x_310, 1); +lean_inc(x_328); +lean_dec(x_310); +x_329 = lean_ctor_get(x_324, 1); +lean_inc(x_329); +lean_dec(x_324); +x_330 = lean_alloc_closure((void*)(l_Lean_Parser_andthenFn___rarg), 5, 2); +lean_closure_set(x_330, 0, x_328); +lean_closure_set(x_330, 1, x_329); +x_331 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_331, 0, x_327); +lean_ctor_set(x_331, 1, x_330); +x_332 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_332, 0, x_331); +return x_332; } } } } case 1: { -lean_object* x_324; lean_object* x_325; lean_object* x_326; -x_324 = lean_ctor_get(x_3, 0); -lean_inc(x_324); -x_325 = lean_ctor_get(x_3, 1); -lean_inc(x_325); +lean_object* x_333; lean_object* x_334; lean_object* x_335; +x_333 = lean_ctor_get(x_3, 0); +lean_inc(x_333); +x_334 = lean_ctor_get(x_3, 1); +lean_inc(x_334); lean_dec(x_3); lean_inc(x_1); -x_326 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_324); -if (lean_obj_tag(x_326) == 0) +x_335 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_333); +if (lean_obj_tag(x_335) == 0) { -uint8_t x_327; -lean_dec(x_325); +uint8_t x_336; +lean_dec(x_334); lean_dec(x_1); -x_327 = !lean_is_exclusive(x_326); -if (x_327 == 0) +x_336 = !lean_is_exclusive(x_335); +if (x_336 == 0) { -return x_326; +return x_335; } else { -lean_object* x_328; lean_object* x_329; -x_328 = lean_ctor_get(x_326, 0); -lean_inc(x_328); -lean_dec(x_326); -x_329 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_329, 0, x_328); -return x_329; -} -} -else -{ -lean_object* x_330; lean_object* x_331; -x_330 = lean_ctor_get(x_326, 0); -lean_inc(x_330); -lean_dec(x_326); -x_331 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_325); -if (lean_obj_tag(x_331) == 0) -{ -uint8_t x_332; -lean_dec(x_330); -x_332 = !lean_is_exclusive(x_331); -if (x_332 == 0) -{ -return x_331; -} -else -{ -lean_object* x_333; lean_object* x_334; -x_333 = lean_ctor_get(x_331, 0); -lean_inc(x_333); -lean_dec(x_331); -x_334 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_334, 0, x_333); -return x_334; -} -} -else -{ -uint8_t x_335; -x_335 = !lean_is_exclusive(x_331); -if (x_335 == 0) -{ -lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; -x_336 = lean_ctor_get(x_331, 0); -x_337 = lean_ctor_get(x_330, 0); +lean_object* x_337; lean_object* x_338; +x_337 = lean_ctor_get(x_335, 0); lean_inc(x_337); -x_338 = lean_ctor_get(x_336, 0); -lean_inc(x_338); -x_339 = l_Lean_Parser_orelseInfo(x_337, x_338); -x_340 = lean_ctor_get(x_330, 1); -lean_inc(x_340); -lean_dec(x_330); -x_341 = lean_ctor_get(x_336, 1); -lean_inc(x_341); -lean_dec(x_336); -x_342 = lean_alloc_closure((void*)(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean_closure_set(x_342, 0, x_340); -lean_closure_set(x_342, 1, x_341); -x_343 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_343, 0, x_339); -lean_ctor_set(x_343, 1, x_342); -lean_ctor_set(x_331, 0, x_343); -return x_331; +lean_dec(x_335); +x_338 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_338, 0, x_337); +return x_338; +} } else { -lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; -x_344 = lean_ctor_get(x_331, 0); -lean_inc(x_344); -lean_dec(x_331); -x_345 = lean_ctor_get(x_330, 0); -lean_inc(x_345); -x_346 = lean_ctor_get(x_344, 0); +lean_object* x_339; lean_object* x_340; +x_339 = lean_ctor_get(x_335, 0); +lean_inc(x_339); +lean_dec(x_335); +x_340 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_334); +if (lean_obj_tag(x_340) == 0) +{ +uint8_t x_341; +lean_dec(x_339); +x_341 = !lean_is_exclusive(x_340); +if (x_341 == 0) +{ +return x_340; +} +else +{ +lean_object* x_342; lean_object* x_343; +x_342 = lean_ctor_get(x_340, 0); +lean_inc(x_342); +lean_dec(x_340); +x_343 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_343, 0, x_342); +return x_343; +} +} +else +{ +uint8_t x_344; +x_344 = !lean_is_exclusive(x_340); +if (x_344 == 0) +{ +lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; +x_345 = lean_ctor_get(x_340, 0); +x_346 = lean_ctor_get(x_339, 0); lean_inc(x_346); -x_347 = l_Lean_Parser_orelseInfo(x_345, x_346); -x_348 = lean_ctor_get(x_330, 1); -lean_inc(x_348); -lean_dec(x_330); -x_349 = lean_ctor_get(x_344, 1); +x_347 = lean_ctor_get(x_345, 0); +lean_inc(x_347); +x_348 = l_Lean_Parser_orelseInfo(x_346, x_347); +x_349 = lean_ctor_get(x_339, 1); lean_inc(x_349); -lean_dec(x_344); -x_350 = lean_alloc_closure((void*)(l_Lean_Parser_orelseFn___rarg), 5, 2); -lean_closure_set(x_350, 0, x_348); -lean_closure_set(x_350, 1, x_349); -x_351 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_351, 0, x_347); -lean_ctor_set(x_351, 1, x_350); -x_352 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_352, 0, x_351); -return x_352; +lean_dec(x_339); +x_350 = lean_ctor_get(x_345, 1); +lean_inc(x_350); +lean_dec(x_345); +x_351 = lean_alloc_closure((void*)(l_Lean_Parser_orelseFn___rarg), 5, 2); +lean_closure_set(x_351, 0, x_349); +lean_closure_set(x_351, 1, x_350); +x_352 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_352, 0, x_348); +lean_ctor_set(x_352, 1, x_351); +lean_ctor_set(x_340, 0, x_352); +return x_340; +} +else +{ +lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; +x_353 = lean_ctor_get(x_340, 0); +lean_inc(x_353); +lean_dec(x_340); +x_354 = lean_ctor_get(x_339, 0); +lean_inc(x_354); +x_355 = lean_ctor_get(x_353, 0); +lean_inc(x_355); +x_356 = l_Lean_Parser_orelseInfo(x_354, x_355); +x_357 = lean_ctor_get(x_339, 1); +lean_inc(x_357); +lean_dec(x_339); +x_358 = lean_ctor_get(x_353, 1); +lean_inc(x_358); +lean_dec(x_353); +x_359 = lean_alloc_closure((void*)(l_Lean_Parser_orelseFn___rarg), 5, 2); +lean_closure_set(x_359, 0, x_357); +lean_closure_set(x_359, 1, x_358); +x_360 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_360, 0, x_356); +lean_ctor_set(x_360, 1, x_359); +x_361 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_361, 0, x_360); +return x_361; } } } } case 2: { -lean_object* x_353; lean_object* x_354; -x_353 = lean_ctor_get(x_3, 0); -lean_inc(x_353); -lean_dec(x_3); -x_354 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_353); -if (lean_obj_tag(x_354) == 0) -{ -uint8_t x_355; -x_355 = !lean_is_exclusive(x_354); -if (x_355 == 0) -{ -return x_354; -} -else -{ -lean_object* x_356; lean_object* x_357; -x_356 = lean_ctor_get(x_354, 0); -lean_inc(x_356); -lean_dec(x_354); -x_357 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_357, 0, x_356); -return x_357; -} -} -else -{ -uint8_t x_358; -x_358 = !lean_is_exclusive(x_354); -if (x_358 == 0) -{ -lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; -x_359 = lean_ctor_get(x_354, 0); -x_360 = lean_ctor_get(x_359, 0); -lean_inc(x_360); -x_361 = l_Lean_Parser_optionaInfo(x_360); -x_362 = lean_ctor_get(x_359, 1); +lean_object* x_362; lean_object* x_363; +x_362 = lean_ctor_get(x_3, 0); lean_inc(x_362); -lean_dec(x_359); -x_363 = lean_alloc_closure((void*)(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean_closure_set(x_363, 0, x_362); -x_364 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_364, 0, x_361); -lean_ctor_set(x_364, 1, x_363); -lean_ctor_set(x_354, 0, x_364); -return x_354; +lean_dec(x_3); +x_363 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_362); +if (lean_obj_tag(x_363) == 0) +{ +uint8_t x_364; +x_364 = !lean_is_exclusive(x_363); +if (x_364 == 0) +{ +return x_363; } else { -lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; -x_365 = lean_ctor_get(x_354, 0); +lean_object* x_365; lean_object* x_366; +x_365 = lean_ctor_get(x_363, 0); lean_inc(x_365); -lean_dec(x_354); -x_366 = lean_ctor_get(x_365, 0); -lean_inc(x_366); -x_367 = l_Lean_Parser_optionaInfo(x_366); -x_368 = lean_ctor_get(x_365, 1); -lean_inc(x_368); -lean_dec(x_365); -x_369 = lean_alloc_closure((void*)(l_Lean_Parser_optionalFn___rarg), 4, 1); -lean_closure_set(x_369, 0, x_368); -x_370 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_370, 0, x_367); -lean_ctor_set(x_370, 1, x_369); -x_371 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_371, 0, x_370); -return x_371; +lean_dec(x_363); +x_366 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_366, 0, x_365); +return x_366; +} +} +else +{ +uint8_t x_367; +x_367 = !lean_is_exclusive(x_363); +if (x_367 == 0) +{ +lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; +x_368 = lean_ctor_get(x_363, 0); +x_369 = lean_ctor_get(x_368, 0); +lean_inc(x_369); +x_370 = l_Lean_Parser_optionaInfo(x_369); +x_371 = lean_ctor_get(x_368, 1); +lean_inc(x_371); +lean_dec(x_368); +x_372 = lean_alloc_closure((void*)(l_Lean_Parser_optionalFn___rarg), 4, 1); +lean_closure_set(x_372, 0, x_371); +x_373 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_373, 0, x_370); +lean_ctor_set(x_373, 1, x_372); +lean_ctor_set(x_363, 0, x_373); +return x_363; +} +else +{ +lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; +x_374 = lean_ctor_get(x_363, 0); +lean_inc(x_374); +lean_dec(x_363); +x_375 = lean_ctor_get(x_374, 0); +lean_inc(x_375); +x_376 = l_Lean_Parser_optionaInfo(x_375); +x_377 = lean_ctor_get(x_374, 1); +lean_inc(x_377); +lean_dec(x_374); +x_378 = lean_alloc_closure((void*)(l_Lean_Parser_optionalFn___rarg), 4, 1); +lean_closure_set(x_378, 0, x_377); +x_379 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_379, 0, x_376); +lean_ctor_set(x_379, 1, x_378); +x_380 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_380, 0, x_379); +return x_380; } } } case 3: { -lean_object* x_372; lean_object* x_373; -x_372 = lean_ctor_get(x_3, 0); -lean_inc(x_372); +lean_object* x_381; lean_object* x_382; +x_381 = lean_ctor_get(x_3, 0); +lean_inc(x_381); lean_dec(x_3); -x_373 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_372); -if (lean_obj_tag(x_373) == 0) +x_382 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_381); +if (lean_obj_tag(x_382) == 0) { -uint8_t x_374; -x_374 = !lean_is_exclusive(x_373); -if (x_374 == 0) +uint8_t x_383; +x_383 = !lean_is_exclusive(x_382); +if (x_383 == 0) { -return x_373; +return x_382; } else { -lean_object* x_375; lean_object* x_376; -x_375 = lean_ctor_get(x_373, 0); -lean_inc(x_375); -lean_dec(x_373); -x_376 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_376, 0, x_375); -return x_376; +lean_object* x_384; lean_object* x_385; +x_384 = lean_ctor_get(x_382, 0); +lean_inc(x_384); +lean_dec(x_382); +x_385 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_385, 0, x_384); +return x_385; } } else { -uint8_t x_377; -x_377 = !lean_is_exclusive(x_373); -if (x_377 == 0) +uint8_t x_386; +x_386 = !lean_is_exclusive(x_382); +if (x_386 == 0) { -lean_object* x_378; uint8_t x_379; -x_378 = lean_ctor_get(x_373, 0); -x_379 = !lean_is_exclusive(x_378); -if (x_379 == 0) +lean_object* x_387; uint8_t x_388; +x_387 = lean_ctor_get(x_382, 0); +x_388 = !lean_is_exclusive(x_387); +if (x_388 == 0) { -lean_object* x_380; lean_object* x_381; -x_380 = lean_ctor_get(x_378, 1); -x_381 = lean_alloc_closure((void*)(l_Lean_Parser_lookaheadFn___rarg), 4, 1); -lean_closure_set(x_381, 0, x_380); -lean_ctor_set(x_378, 1, x_381); -return x_373; -} -else -{ -lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; -x_382 = lean_ctor_get(x_378, 0); -x_383 = lean_ctor_get(x_378, 1); -lean_inc(x_383); -lean_inc(x_382); -lean_dec(x_378); -x_384 = lean_alloc_closure((void*)(l_Lean_Parser_lookaheadFn___rarg), 4, 1); -lean_closure_set(x_384, 0, x_383); -x_385 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_385, 0, x_382); -lean_ctor_set(x_385, 1, x_384); -lean_ctor_set(x_373, 0, x_385); -return x_373; -} -} -else -{ -lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; -x_386 = lean_ctor_get(x_373, 0); -lean_inc(x_386); -lean_dec(x_373); -x_387 = lean_ctor_get(x_386, 0); -lean_inc(x_387); -x_388 = lean_ctor_get(x_386, 1); -lean_inc(x_388); -if (lean_is_exclusive(x_386)) { - lean_ctor_release(x_386, 0); - lean_ctor_release(x_386, 1); - x_389 = x_386; -} else { - lean_dec_ref(x_386); - x_389 = lean_box(0); -} +lean_object* x_389; lean_object* x_390; +x_389 = lean_ctor_get(x_387, 1); x_390 = lean_alloc_closure((void*)(l_Lean_Parser_lookaheadFn___rarg), 4, 1); -lean_closure_set(x_390, 0, x_388); -if (lean_is_scalar(x_389)) { - x_391 = lean_alloc_ctor(0, 2, 0); -} else { - x_391 = x_389; +lean_closure_set(x_390, 0, x_389); +lean_ctor_set(x_387, 1, x_390); +return x_382; } -lean_ctor_set(x_391, 0, x_387); -lean_ctor_set(x_391, 1, x_390); -x_392 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_392, 0, x_391); -return x_392; +else +{ +lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; +x_391 = lean_ctor_get(x_387, 0); +x_392 = lean_ctor_get(x_387, 1); +lean_inc(x_392); +lean_inc(x_391); +lean_dec(x_387); +x_393 = lean_alloc_closure((void*)(l_Lean_Parser_lookaheadFn___rarg), 4, 1); +lean_closure_set(x_393, 0, x_392); +x_394 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_394, 0, x_391); +lean_ctor_set(x_394, 1, x_393); +lean_ctor_set(x_382, 0, x_394); +return x_382; +} +} +else +{ +lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; +x_395 = lean_ctor_get(x_382, 0); +lean_inc(x_395); +lean_dec(x_382); +x_396 = lean_ctor_get(x_395, 0); +lean_inc(x_396); +x_397 = lean_ctor_get(x_395, 1); +lean_inc(x_397); +if (lean_is_exclusive(x_395)) { + lean_ctor_release(x_395, 0); + lean_ctor_release(x_395, 1); + x_398 = x_395; +} else { + lean_dec_ref(x_395); + x_398 = lean_box(0); +} +x_399 = lean_alloc_closure((void*)(l_Lean_Parser_lookaheadFn___rarg), 4, 1); +lean_closure_set(x_399, 0, x_397); +if (lean_is_scalar(x_398)) { + x_400 = lean_alloc_ctor(0, 2, 0); +} else { + x_400 = x_398; +} +lean_ctor_set(x_400, 0, x_396); +lean_ctor_set(x_400, 1, x_399); +x_401 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_401, 0, x_400); +return x_401; } } } case 4: { -lean_object* x_393; lean_object* x_394; -x_393 = lean_ctor_get(x_3, 0); -lean_inc(x_393); +lean_object* x_402; lean_object* x_403; +x_402 = lean_ctor_get(x_3, 0); +lean_inc(x_402); lean_dec(x_3); -x_394 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_393); -if (lean_obj_tag(x_394) == 0) +x_403 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_402); +if (lean_obj_tag(x_403) == 0) { -uint8_t x_395; -x_395 = !lean_is_exclusive(x_394); -if (x_395 == 0) +uint8_t x_404; +x_404 = !lean_is_exclusive(x_403); +if (x_404 == 0) { -return x_394; +return x_403; } else { -lean_object* x_396; lean_object* x_397; -x_396 = lean_ctor_get(x_394, 0); -lean_inc(x_396); -lean_dec(x_394); -x_397 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_397, 0, x_396); -return x_397; +lean_object* x_405; lean_object* x_406; +x_405 = lean_ctor_get(x_403, 0); +lean_inc(x_405); +lean_dec(x_403); +x_406 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_406, 0, x_405); +return x_406; } } else { -uint8_t x_398; -x_398 = !lean_is_exclusive(x_394); -if (x_398 == 0) +uint8_t x_407; +x_407 = !lean_is_exclusive(x_403); +if (x_407 == 0) { -lean_object* x_399; uint8_t x_400; -x_399 = lean_ctor_get(x_394, 0); -x_400 = !lean_is_exclusive(x_399); -if (x_400 == 0) +lean_object* x_408; uint8_t x_409; +x_408 = lean_ctor_get(x_403, 0); +x_409 = !lean_is_exclusive(x_408); +if (x_409 == 0) { -lean_object* x_401; lean_object* x_402; -x_401 = lean_ctor_get(x_399, 1); -x_402 = lean_alloc_closure((void*)(l_Lean_Parser_tryFn___rarg), 4, 1); -lean_closure_set(x_402, 0, x_401); -lean_ctor_set(x_399, 1, x_402); -return x_394; -} -else -{ -lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; -x_403 = lean_ctor_get(x_399, 0); -x_404 = lean_ctor_get(x_399, 1); -lean_inc(x_404); -lean_inc(x_403); -lean_dec(x_399); -x_405 = lean_alloc_closure((void*)(l_Lean_Parser_tryFn___rarg), 4, 1); -lean_closure_set(x_405, 0, x_404); -x_406 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_406, 0, x_403); -lean_ctor_set(x_406, 1, x_405); -lean_ctor_set(x_394, 0, x_406); -return x_394; -} -} -else -{ -lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; -x_407 = lean_ctor_get(x_394, 0); -lean_inc(x_407); -lean_dec(x_394); -x_408 = lean_ctor_get(x_407, 0); -lean_inc(x_408); -x_409 = lean_ctor_get(x_407, 1); -lean_inc(x_409); -if (lean_is_exclusive(x_407)) { - lean_ctor_release(x_407, 0); - lean_ctor_release(x_407, 1); - x_410 = x_407; -} else { - lean_dec_ref(x_407); - x_410 = lean_box(0); -} +lean_object* x_410; lean_object* x_411; +x_410 = lean_ctor_get(x_408, 1); x_411 = lean_alloc_closure((void*)(l_Lean_Parser_tryFn___rarg), 4, 1); -lean_closure_set(x_411, 0, x_409); -if (lean_is_scalar(x_410)) { - x_412 = lean_alloc_ctor(0, 2, 0); -} else { - x_412 = x_410; +lean_closure_set(x_411, 0, x_410); +lean_ctor_set(x_408, 1, x_411); +return x_403; } -lean_ctor_set(x_412, 0, x_408); -lean_ctor_set(x_412, 1, x_411); -x_413 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_413, 0, x_412); -return x_413; +else +{ +lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; +x_412 = lean_ctor_get(x_408, 0); +x_413 = lean_ctor_get(x_408, 1); +lean_inc(x_413); +lean_inc(x_412); +lean_dec(x_408); +x_414 = lean_alloc_closure((void*)(l_Lean_Parser_tryFn___rarg), 4, 1); +lean_closure_set(x_414, 0, x_413); +x_415 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_415, 0, x_412); +lean_ctor_set(x_415, 1, x_414); +lean_ctor_set(x_403, 0, x_415); +return x_403; +} +} +else +{ +lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; +x_416 = lean_ctor_get(x_403, 0); +lean_inc(x_416); +lean_dec(x_403); +x_417 = lean_ctor_get(x_416, 0); +lean_inc(x_417); +x_418 = lean_ctor_get(x_416, 1); +lean_inc(x_418); +if (lean_is_exclusive(x_416)) { + lean_ctor_release(x_416, 0); + lean_ctor_release(x_416, 1); + x_419 = x_416; +} else { + lean_dec_ref(x_416); + x_419 = lean_box(0); +} +x_420 = lean_alloc_closure((void*)(l_Lean_Parser_tryFn___rarg), 4, 1); +lean_closure_set(x_420, 0, x_418); +if (lean_is_scalar(x_419)) { + x_421 = lean_alloc_ctor(0, 2, 0); +} else { + x_421 = x_419; +} +lean_ctor_set(x_421, 0, x_417); +lean_ctor_set(x_421, 1, x_420); +x_422 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_422, 0, x_421); +return x_422; } } } case 5: { -lean_object* x_414; lean_object* x_415; -x_414 = lean_ctor_get(x_3, 0); -lean_inc(x_414); -lean_dec(x_3); -x_415 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_414); -if (lean_obj_tag(x_415) == 0) -{ -uint8_t x_416; -x_416 = !lean_is_exclusive(x_415); -if (x_416 == 0) -{ -return x_415; -} -else -{ -lean_object* x_417; lean_object* x_418; -x_417 = lean_ctor_get(x_415, 0); -lean_inc(x_417); -lean_dec(x_415); -x_418 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_418, 0, x_417); -return x_418; -} -} -else -{ -uint8_t x_419; -x_419 = !lean_is_exclusive(x_415); -if (x_419 == 0) -{ -lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; -x_420 = lean_ctor_get(x_415, 0); -x_421 = lean_ctor_get(x_420, 0); -lean_inc(x_421); -x_422 = l_Lean_Parser_noFirstTokenInfo(x_421); -x_423 = lean_ctor_get(x_420, 1); +lean_object* x_423; lean_object* x_424; +x_423 = lean_ctor_get(x_3, 0); lean_inc(x_423); -lean_dec(x_420); -x_424 = lean_box(x_2); -x_425 = lean_alloc_closure((void*)(l_Lean_Parser_manyFn___boxed), 5, 2); -lean_closure_set(x_425, 0, x_424); -lean_closure_set(x_425, 1, x_423); -x_426 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_426, 0, x_422); -lean_ctor_set(x_426, 1, x_425); -lean_ctor_set(x_415, 0, x_426); -return x_415; +lean_dec(x_3); +x_424 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_423); +if (lean_obj_tag(x_424) == 0) +{ +uint8_t x_425; +x_425 = !lean_is_exclusive(x_424); +if (x_425 == 0) +{ +return x_424; } else { -lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; -x_427 = lean_ctor_get(x_415, 0); -lean_inc(x_427); -lean_dec(x_415); -x_428 = lean_ctor_get(x_427, 0); -lean_inc(x_428); -x_429 = l_Lean_Parser_noFirstTokenInfo(x_428); -x_430 = lean_ctor_get(x_427, 1); +lean_object* x_426; lean_object* x_427; +x_426 = lean_ctor_get(x_424, 0); +lean_inc(x_426); +lean_dec(x_424); +x_427 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_427, 0, x_426); +return x_427; +} +} +else +{ +uint8_t x_428; +x_428 = !lean_is_exclusive(x_424); +if (x_428 == 0) +{ +lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; +x_429 = lean_ctor_get(x_424, 0); +x_430 = lean_ctor_get(x_429, 0); lean_inc(x_430); -lean_dec(x_427); -x_431 = lean_box(x_2); -x_432 = lean_alloc_closure((void*)(l_Lean_Parser_manyFn___boxed), 5, 2); -lean_closure_set(x_432, 0, x_431); -lean_closure_set(x_432, 1, x_430); -x_433 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_433, 0, x_429); -lean_ctor_set(x_433, 1, x_432); -x_434 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_434, 0, x_433); -return x_434; +x_431 = l_Lean_Parser_noFirstTokenInfo(x_430); +x_432 = lean_ctor_get(x_429, 1); +lean_inc(x_432); +lean_dec(x_429); +x_433 = lean_box(x_2); +x_434 = lean_alloc_closure((void*)(l_Lean_Parser_manyFn___boxed), 5, 2); +lean_closure_set(x_434, 0, x_433); +lean_closure_set(x_434, 1, x_432); +x_435 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_435, 0, x_431); +lean_ctor_set(x_435, 1, x_434); +lean_ctor_set(x_424, 0, x_435); +return x_424; +} +else +{ +lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; +x_436 = lean_ctor_get(x_424, 0); +lean_inc(x_436); +lean_dec(x_424); +x_437 = lean_ctor_get(x_436, 0); +lean_inc(x_437); +x_438 = l_Lean_Parser_noFirstTokenInfo(x_437); +x_439 = lean_ctor_get(x_436, 1); +lean_inc(x_439); +lean_dec(x_436); +x_440 = lean_box(x_2); +x_441 = lean_alloc_closure((void*)(l_Lean_Parser_manyFn___boxed), 5, 2); +lean_closure_set(x_441, 0, x_440); +lean_closure_set(x_441, 1, x_439); +x_442 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_442, 0, x_438); +lean_ctor_set(x_442, 1, x_441); +x_443 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_443, 0, x_442); +return x_443; } } } case 6: { -lean_object* x_435; lean_object* x_436; -x_435 = lean_ctor_get(x_3, 0); -lean_inc(x_435); +lean_object* x_444; lean_object* x_445; +x_444 = lean_ctor_get(x_3, 0); +lean_inc(x_444); lean_dec(x_3); -x_436 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_435); -if (lean_obj_tag(x_436) == 0) +x_445 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_444); +if (lean_obj_tag(x_445) == 0) { -uint8_t x_437; -x_437 = !lean_is_exclusive(x_436); -if (x_437 == 0) +uint8_t x_446; +x_446 = !lean_is_exclusive(x_445); +if (x_446 == 0) { -return x_436; +return x_445; } else { -lean_object* x_438; lean_object* x_439; -x_438 = lean_ctor_get(x_436, 0); -lean_inc(x_438); -lean_dec(x_436); -x_439 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_439, 0, x_438); -return x_439; +lean_object* x_447; lean_object* x_448; +x_447 = lean_ctor_get(x_445, 0); +lean_inc(x_447); +lean_dec(x_445); +x_448 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_448, 0, x_447); +return x_448; } } else { -uint8_t x_440; -x_440 = !lean_is_exclusive(x_436); -if (x_440 == 0) +uint8_t x_449; +x_449 = !lean_is_exclusive(x_445); +if (x_449 == 0) { -lean_object* x_441; uint8_t x_442; -x_441 = lean_ctor_get(x_436, 0); -x_442 = !lean_is_exclusive(x_441); -if (x_442 == 0) +lean_object* x_450; uint8_t x_451; +x_450 = lean_ctor_get(x_445, 0); +x_451 = !lean_is_exclusive(x_450); +if (x_451 == 0) { -lean_object* x_443; uint8_t x_444; lean_object* x_445; lean_object* x_446; lean_object* x_447; -x_443 = lean_ctor_get(x_441, 1); -x_444 = 0; -x_445 = lean_box(x_2); -x_446 = lean_box(x_444); -x_447 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn___boxed), 6, 3); -lean_closure_set(x_447, 0, x_445); -lean_closure_set(x_447, 1, x_443); -lean_closure_set(x_447, 2, x_446); -lean_ctor_set(x_441, 1, x_447); -return x_436; +lean_object* x_452; uint8_t x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; +x_452 = lean_ctor_get(x_450, 1); +x_453 = 0; +x_454 = lean_box(x_2); +x_455 = lean_box(x_453); +x_456 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn___boxed), 6, 3); +lean_closure_set(x_456, 0, x_454); +lean_closure_set(x_456, 1, x_452); +lean_closure_set(x_456, 2, x_455); +lean_ctor_set(x_450, 1, x_456); +return x_445; } else { -lean_object* x_448; lean_object* x_449; uint8_t x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; -x_448 = lean_ctor_get(x_441, 0); -x_449 = lean_ctor_get(x_441, 1); -lean_inc(x_449); -lean_inc(x_448); -lean_dec(x_441); -x_450 = 0; -x_451 = lean_box(x_2); -x_452 = lean_box(x_450); -x_453 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn___boxed), 6, 3); -lean_closure_set(x_453, 0, x_451); -lean_closure_set(x_453, 1, x_449); -lean_closure_set(x_453, 2, x_452); -x_454 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_454, 0, x_448); -lean_ctor_set(x_454, 1, x_453); -lean_ctor_set(x_436, 0, x_454); -return x_436; -} -} -else -{ -lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; uint8_t x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; -x_455 = lean_ctor_get(x_436, 0); -lean_inc(x_455); -lean_dec(x_436); -x_456 = lean_ctor_get(x_455, 0); -lean_inc(x_456); -x_457 = lean_ctor_get(x_455, 1); +lean_object* x_457; lean_object* x_458; uint8_t x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; +x_457 = lean_ctor_get(x_450, 0); +x_458 = lean_ctor_get(x_450, 1); +lean_inc(x_458); lean_inc(x_457); -if (lean_is_exclusive(x_455)) { - lean_ctor_release(x_455, 0); - lean_ctor_release(x_455, 1); - x_458 = x_455; -} else { - lean_dec_ref(x_455); - x_458 = lean_box(0); -} +lean_dec(x_450); x_459 = 0; x_460 = lean_box(x_2); x_461 = lean_box(x_459); x_462 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn___boxed), 6, 3); lean_closure_set(x_462, 0, x_460); -lean_closure_set(x_462, 1, x_457); +lean_closure_set(x_462, 1, x_458); lean_closure_set(x_462, 2, x_461); -if (lean_is_scalar(x_458)) { - x_463 = lean_alloc_ctor(0, 2, 0); -} else { - x_463 = x_458; -} -lean_ctor_set(x_463, 0, x_456); +x_463 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_463, 0, x_457); lean_ctor_set(x_463, 1, x_462); -x_464 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_464, 0, x_463); -return x_464; +lean_ctor_set(x_445, 0, x_463); +return x_445; +} +} +else +{ +lean_object* x_464; lean_object* x_465; lean_object* x_466; lean_object* x_467; uint8_t x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; +x_464 = lean_ctor_get(x_445, 0); +lean_inc(x_464); +lean_dec(x_445); +x_465 = lean_ctor_get(x_464, 0); +lean_inc(x_465); +x_466 = lean_ctor_get(x_464, 1); +lean_inc(x_466); +if (lean_is_exclusive(x_464)) { + lean_ctor_release(x_464, 0); + lean_ctor_release(x_464, 1); + x_467 = x_464; +} else { + lean_dec_ref(x_464); + x_467 = lean_box(0); +} +x_468 = 0; +x_469 = lean_box(x_2); +x_470 = lean_box(x_468); +x_471 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn___boxed), 6, 3); +lean_closure_set(x_471, 0, x_469); +lean_closure_set(x_471, 1, x_466); +lean_closure_set(x_471, 2, x_470); +if (lean_is_scalar(x_467)) { + x_472 = lean_alloc_ctor(0, 2, 0); +} else { + x_472 = x_467; +} +lean_ctor_set(x_472, 0, x_465); +lean_ctor_set(x_472, 1, x_471); +x_473 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_473, 0, x_472); +return x_473; } } } case 7: { -lean_object* x_465; lean_object* x_466; lean_object* x_467; -x_465 = lean_ctor_get(x_3, 0); -lean_inc(x_465); -x_466 = lean_ctor_get(x_3, 1); -lean_inc(x_466); +lean_object* x_474; lean_object* x_475; lean_object* x_476; +x_474 = lean_ctor_get(x_3, 0); +lean_inc(x_474); +x_475 = lean_ctor_get(x_3, 1); +lean_inc(x_475); lean_dec(x_3); lean_inc(x_1); -x_467 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_465); -if (lean_obj_tag(x_467) == 0) +x_476 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_474); +if (lean_obj_tag(x_476) == 0) { -uint8_t x_468; -lean_dec(x_466); +uint8_t x_477; +lean_dec(x_475); lean_dec(x_1); -x_468 = !lean_is_exclusive(x_467); -if (x_468 == 0) +x_477 = !lean_is_exclusive(x_476); +if (x_477 == 0) { -return x_467; +return x_476; } else { -lean_object* x_469; lean_object* x_470; -x_469 = lean_ctor_get(x_467, 0); -lean_inc(x_469); -lean_dec(x_467); -x_470 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_470, 0, x_469); -return x_470; -} -} -else -{ -lean_object* x_471; lean_object* x_472; -x_471 = lean_ctor_get(x_467, 0); -lean_inc(x_471); -lean_dec(x_467); -x_472 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_466); -if (lean_obj_tag(x_472) == 0) -{ -uint8_t x_473; -lean_dec(x_471); -x_473 = !lean_is_exclusive(x_472); -if (x_473 == 0) -{ -return x_472; -} -else -{ -lean_object* x_474; lean_object* x_475; -x_474 = lean_ctor_get(x_472, 0); -lean_inc(x_474); -lean_dec(x_472); -x_475 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_475, 0, x_474); -return x_475; -} -} -else -{ -uint8_t x_476; -x_476 = !lean_is_exclusive(x_472); -if (x_476 == 0) -{ -lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; uint8_t x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; -x_477 = lean_ctor_get(x_472, 0); -x_478 = lean_ctor_get(x_471, 0); +lean_object* x_478; lean_object* x_479; +x_478 = lean_ctor_get(x_476, 0); lean_inc(x_478); -x_479 = lean_ctor_get(x_477, 0); -lean_inc(x_479); -x_480 = l_Lean_Parser_sepByInfo(x_478, x_479); -x_481 = lean_ctor_get(x_471, 1); -lean_inc(x_481); -lean_dec(x_471); -x_482 = lean_ctor_get(x_477, 1); -lean_inc(x_482); -lean_dec(x_477); -x_483 = 0; -x_484 = lean_box(x_2); -x_485 = lean_box(x_483); -x_486 = lean_alloc_closure((void*)(l_Lean_Parser_sepByFn___boxed), 7, 4); -lean_closure_set(x_486, 0, x_484); -lean_closure_set(x_486, 1, x_485); -lean_closure_set(x_486, 2, x_481); -lean_closure_set(x_486, 3, x_482); -x_487 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_487, 0, x_480); -lean_ctor_set(x_487, 1, x_486); -lean_ctor_set(x_472, 0, x_487); -return x_472; +lean_dec(x_476); +x_479 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_479, 0, x_478); +return x_479; +} } else { -lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; uint8_t x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; -x_488 = lean_ctor_get(x_472, 0); +lean_object* x_480; lean_object* x_481; +x_480 = lean_ctor_get(x_476, 0); +lean_inc(x_480); +lean_dec(x_476); +x_481 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_475); +if (lean_obj_tag(x_481) == 0) +{ +uint8_t x_482; +lean_dec(x_480); +x_482 = !lean_is_exclusive(x_481); +if (x_482 == 0) +{ +return x_481; +} +else +{ +lean_object* x_483; lean_object* x_484; +x_483 = lean_ctor_get(x_481, 0); +lean_inc(x_483); +lean_dec(x_481); +x_484 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_484, 0, x_483); +return x_484; +} +} +else +{ +uint8_t x_485; +x_485 = !lean_is_exclusive(x_481); +if (x_485 == 0) +{ +lean_object* x_486; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; uint8_t x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; +x_486 = lean_ctor_get(x_481, 0); +x_487 = lean_ctor_get(x_480, 0); +lean_inc(x_487); +x_488 = lean_ctor_get(x_486, 0); lean_inc(x_488); -lean_dec(x_472); -x_489 = lean_ctor_get(x_471, 0); -lean_inc(x_489); -x_490 = lean_ctor_get(x_488, 0); +x_489 = l_Lean_Parser_sepByInfo(x_487, x_488); +x_490 = lean_ctor_get(x_480, 1); lean_inc(x_490); -x_491 = l_Lean_Parser_sepByInfo(x_489, x_490); -x_492 = lean_ctor_get(x_471, 1); -lean_inc(x_492); -lean_dec(x_471); -x_493 = lean_ctor_get(x_488, 1); -lean_inc(x_493); -lean_dec(x_488); -x_494 = 0; -x_495 = lean_box(x_2); -x_496 = lean_box(x_494); -x_497 = lean_alloc_closure((void*)(l_Lean_Parser_sepByFn___boxed), 7, 4); -lean_closure_set(x_497, 0, x_495); -lean_closure_set(x_497, 1, x_496); -lean_closure_set(x_497, 2, x_492); -lean_closure_set(x_497, 3, x_493); -x_498 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_498, 0, x_491); -lean_ctor_set(x_498, 1, x_497); -x_499 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_499, 0, x_498); -return x_499; +lean_dec(x_480); +x_491 = lean_ctor_get(x_486, 1); +lean_inc(x_491); +lean_dec(x_486); +x_492 = 0; +x_493 = lean_box(x_2); +x_494 = lean_box(x_492); +x_495 = lean_alloc_closure((void*)(l_Lean_Parser_sepByFn___boxed), 7, 4); +lean_closure_set(x_495, 0, x_493); +lean_closure_set(x_495, 1, x_494); +lean_closure_set(x_495, 2, x_490); +lean_closure_set(x_495, 3, x_491); +x_496 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_496, 0, x_489); +lean_ctor_set(x_496, 1, x_495); +lean_ctor_set(x_481, 0, x_496); +return x_481; +} +else +{ +lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; uint8_t x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; +x_497 = lean_ctor_get(x_481, 0); +lean_inc(x_497); +lean_dec(x_481); +x_498 = lean_ctor_get(x_480, 0); +lean_inc(x_498); +x_499 = lean_ctor_get(x_497, 0); +lean_inc(x_499); +x_500 = l_Lean_Parser_sepByInfo(x_498, x_499); +x_501 = lean_ctor_get(x_480, 1); +lean_inc(x_501); +lean_dec(x_480); +x_502 = lean_ctor_get(x_497, 1); +lean_inc(x_502); +lean_dec(x_497); +x_503 = 0; +x_504 = lean_box(x_2); +x_505 = lean_box(x_503); +x_506 = lean_alloc_closure((void*)(l_Lean_Parser_sepByFn___boxed), 7, 4); +lean_closure_set(x_506, 0, x_504); +lean_closure_set(x_506, 1, x_505); +lean_closure_set(x_506, 2, x_501); +lean_closure_set(x_506, 3, x_502); +x_507 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_507, 0, x_500); +lean_ctor_set(x_507, 1, x_506); +x_508 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_508, 0, x_507); +return x_508; } } } } case 8: { -lean_object* x_500; lean_object* x_501; lean_object* x_502; -x_500 = lean_ctor_get(x_3, 0); -lean_inc(x_500); -x_501 = lean_ctor_get(x_3, 1); -lean_inc(x_501); +lean_object* x_509; lean_object* x_510; lean_object* x_511; +x_509 = lean_ctor_get(x_3, 0); +lean_inc(x_509); +x_510 = lean_ctor_get(x_3, 1); +lean_inc(x_510); lean_dec(x_3); lean_inc(x_1); -x_502 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_500); -if (lean_obj_tag(x_502) == 0) +x_511 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_509); +if (lean_obj_tag(x_511) == 0) { -uint8_t x_503; -lean_dec(x_501); +uint8_t x_512; +lean_dec(x_510); lean_dec(x_1); -x_503 = !lean_is_exclusive(x_502); -if (x_503 == 0) +x_512 = !lean_is_exclusive(x_511); +if (x_512 == 0) { -return x_502; +return x_511; } else { -lean_object* x_504; lean_object* x_505; -x_504 = lean_ctor_get(x_502, 0); -lean_inc(x_504); -lean_dec(x_502); -x_505 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_505, 0, x_504); -return x_505; -} -} -else -{ -lean_object* x_506; lean_object* x_507; -x_506 = lean_ctor_get(x_502, 0); -lean_inc(x_506); -lean_dec(x_502); -x_507 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_501); -if (lean_obj_tag(x_507) == 0) -{ -uint8_t x_508; -lean_dec(x_506); -x_508 = !lean_is_exclusive(x_507); -if (x_508 == 0) -{ -return x_507; -} -else -{ -lean_object* x_509; lean_object* x_510; -x_509 = lean_ctor_get(x_507, 0); -lean_inc(x_509); -lean_dec(x_507); -x_510 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_510, 0, x_509); -return x_510; -} -} -else -{ -uint8_t x_511; -x_511 = !lean_is_exclusive(x_507); -if (x_511 == 0) -{ -lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; uint8_t x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; -x_512 = lean_ctor_get(x_507, 0); -x_513 = lean_ctor_get(x_506, 0); +lean_object* x_513; lean_object* x_514; +x_513 = lean_ctor_get(x_511, 0); lean_inc(x_513); -x_514 = lean_ctor_get(x_512, 0); -lean_inc(x_514); -x_515 = l_Lean_Parser_sepBy1Info(x_513, x_514); -x_516 = lean_ctor_get(x_506, 1); -lean_inc(x_516); -lean_dec(x_506); -x_517 = lean_ctor_get(x_512, 1); -lean_inc(x_517); -lean_dec(x_512); -x_518 = 0; -x_519 = lean_box(x_2); -x_520 = lean_box(x_518); -x_521 = lean_alloc_closure((void*)(l_Lean_Parser_sepBy1Fn___boxed), 7, 4); -lean_closure_set(x_521, 0, x_519); -lean_closure_set(x_521, 1, x_520); -lean_closure_set(x_521, 2, x_516); -lean_closure_set(x_521, 3, x_517); -x_522 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_522, 0, x_515); -lean_ctor_set(x_522, 1, x_521); -lean_ctor_set(x_507, 0, x_522); -return x_507; +lean_dec(x_511); +x_514 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_514, 0, x_513); +return x_514; +} } else { -lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; uint8_t x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; -x_523 = lean_ctor_get(x_507, 0); +lean_object* x_515; lean_object* x_516; +x_515 = lean_ctor_get(x_511, 0); +lean_inc(x_515); +lean_dec(x_511); +x_516 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_510); +if (lean_obj_tag(x_516) == 0) +{ +uint8_t x_517; +lean_dec(x_515); +x_517 = !lean_is_exclusive(x_516); +if (x_517 == 0) +{ +return x_516; +} +else +{ +lean_object* x_518; lean_object* x_519; +x_518 = lean_ctor_get(x_516, 0); +lean_inc(x_518); +lean_dec(x_516); +x_519 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_519, 0, x_518); +return x_519; +} +} +else +{ +uint8_t x_520; +x_520 = !lean_is_exclusive(x_516); +if (x_520 == 0) +{ +lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; uint8_t x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; +x_521 = lean_ctor_get(x_516, 0); +x_522 = lean_ctor_get(x_515, 0); +lean_inc(x_522); +x_523 = lean_ctor_get(x_521, 0); lean_inc(x_523); -lean_dec(x_507); -x_524 = lean_ctor_get(x_506, 0); -lean_inc(x_524); -x_525 = lean_ctor_get(x_523, 0); +x_524 = l_Lean_Parser_sepBy1Info(x_522, x_523); +x_525 = lean_ctor_get(x_515, 1); lean_inc(x_525); -x_526 = l_Lean_Parser_sepBy1Info(x_524, x_525); -x_527 = lean_ctor_get(x_506, 1); -lean_inc(x_527); -lean_dec(x_506); -x_528 = lean_ctor_get(x_523, 1); -lean_inc(x_528); -lean_dec(x_523); -x_529 = 0; -x_530 = lean_box(x_2); -x_531 = lean_box(x_529); -x_532 = lean_alloc_closure((void*)(l_Lean_Parser_sepBy1Fn___boxed), 7, 4); -lean_closure_set(x_532, 0, x_530); -lean_closure_set(x_532, 1, x_531); -lean_closure_set(x_532, 2, x_527); -lean_closure_set(x_532, 3, x_528); -x_533 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_533, 0, x_526); -lean_ctor_set(x_533, 1, x_532); -x_534 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_534, 0, x_533); -return x_534; +lean_dec(x_515); +x_526 = lean_ctor_get(x_521, 1); +lean_inc(x_526); +lean_dec(x_521); +x_527 = 0; +x_528 = lean_box(x_2); +x_529 = lean_box(x_527); +x_530 = lean_alloc_closure((void*)(l_Lean_Parser_sepBy1Fn___boxed), 7, 4); +lean_closure_set(x_530, 0, x_528); +lean_closure_set(x_530, 1, x_529); +lean_closure_set(x_530, 2, x_525); +lean_closure_set(x_530, 3, x_526); +x_531 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_531, 0, x_524); +lean_ctor_set(x_531, 1, x_530); +lean_ctor_set(x_516, 0, x_531); +return x_516; +} +else +{ +lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; uint8_t x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543; +x_532 = lean_ctor_get(x_516, 0); +lean_inc(x_532); +lean_dec(x_516); +x_533 = lean_ctor_get(x_515, 0); +lean_inc(x_533); +x_534 = lean_ctor_get(x_532, 0); +lean_inc(x_534); +x_535 = l_Lean_Parser_sepBy1Info(x_533, x_534); +x_536 = lean_ctor_get(x_515, 1); +lean_inc(x_536); +lean_dec(x_515); +x_537 = lean_ctor_get(x_532, 1); +lean_inc(x_537); +lean_dec(x_532); +x_538 = 0; +x_539 = lean_box(x_2); +x_540 = lean_box(x_538); +x_541 = lean_alloc_closure((void*)(l_Lean_Parser_sepBy1Fn___boxed), 7, 4); +lean_closure_set(x_541, 0, x_539); +lean_closure_set(x_541, 1, x_540); +lean_closure_set(x_541, 2, x_536); +lean_closure_set(x_541, 3, x_537); +x_542 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_542, 0, x_535); +lean_ctor_set(x_542, 1, x_541); +x_543 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_543, 0, x_542); +return x_543; } } } } case 9: { -lean_object* x_535; lean_object* x_536; lean_object* x_537; -x_535 = lean_ctor_get(x_3, 0); -lean_inc(x_535); -x_536 = lean_ctor_get(x_3, 1); -lean_inc(x_536); -lean_dec(x_3); -x_537 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_536); -if (lean_obj_tag(x_537) == 0) -{ -uint8_t x_538; -lean_dec(x_535); -x_538 = !lean_is_exclusive(x_537); -if (x_538 == 0) -{ -return x_537; -} -else -{ -lean_object* x_539; lean_object* x_540; -x_539 = lean_ctor_get(x_537, 0); -lean_inc(x_539); -lean_dec(x_537); -x_540 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_540, 0, x_539); -return x_540; -} -} -else -{ -uint8_t x_541; -x_541 = !lean_is_exclusive(x_537); -if (x_541 == 0) -{ -lean_object* x_542; lean_object* x_543; lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; -x_542 = lean_ctor_get(x_537, 0); -x_543 = lean_ctor_get(x_542, 0); -lean_inc(x_543); -lean_inc(x_535); -x_544 = l_Lean_Parser_nodeInfo(x_535, x_543); -x_545 = lean_ctor_get(x_542, 1); +lean_object* x_544; lean_object* x_545; lean_object* x_546; +x_544 = lean_ctor_get(x_3, 0); +lean_inc(x_544); +x_545 = lean_ctor_get(x_3, 1); lean_inc(x_545); -lean_dec(x_542); -x_546 = lean_alloc_closure((void*)(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean_closure_set(x_546, 0, x_535); -lean_closure_set(x_546, 1, x_545); -x_547 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_547, 0, x_544); -lean_ctor_set(x_547, 1, x_546); -lean_ctor_set(x_537, 0, x_547); -return x_537; +lean_dec(x_3); +x_546 = l_Lean_Parser_compileParserDescr___main(x_1, x_2, x_545); +if (lean_obj_tag(x_546) == 0) +{ +uint8_t x_547; +lean_dec(x_544); +x_547 = !lean_is_exclusive(x_546); +if (x_547 == 0) +{ +return x_546; } else { -lean_object* x_548; lean_object* x_549; lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; -x_548 = lean_ctor_get(x_537, 0); +lean_object* x_548; lean_object* x_549; +x_548 = lean_ctor_get(x_546, 0); lean_inc(x_548); -lean_dec(x_537); -x_549 = lean_ctor_get(x_548, 0); -lean_inc(x_549); -lean_inc(x_535); -x_550 = l_Lean_Parser_nodeInfo(x_535, x_549); -x_551 = lean_ctor_get(x_548, 1); -lean_inc(x_551); -lean_dec(x_548); -x_552 = lean_alloc_closure((void*)(l_Lean_Parser_nodeFn___rarg), 5, 2); -lean_closure_set(x_552, 0, x_535); -lean_closure_set(x_552, 1, x_551); -x_553 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_553, 0, x_550); -lean_ctor_set(x_553, 1, x_552); -x_554 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_554, 0, x_553); -return x_554; +lean_dec(x_546); +x_549 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_549, 0, x_548); +return x_549; +} +} +else +{ +uint8_t x_550; +x_550 = !lean_is_exclusive(x_546); +if (x_550 == 0) +{ +lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; +x_551 = lean_ctor_get(x_546, 0); +x_552 = lean_ctor_get(x_551, 0); +lean_inc(x_552); +lean_inc(x_544); +x_553 = l_Lean_Parser_nodeInfo(x_544, x_552); +x_554 = lean_ctor_get(x_551, 1); +lean_inc(x_554); +lean_dec(x_551); +x_555 = lean_alloc_closure((void*)(l_Lean_Parser_nodeFn___rarg), 5, 2); +lean_closure_set(x_555, 0, x_544); +lean_closure_set(x_555, 1, x_554); +x_556 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_556, 0, x_553); +lean_ctor_set(x_556, 1, x_555); +lean_ctor_set(x_546, 0, x_556); +return x_546; +} +else +{ +lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; +x_557 = lean_ctor_get(x_546, 0); +lean_inc(x_557); +lean_dec(x_546); +x_558 = lean_ctor_get(x_557, 0); +lean_inc(x_558); +lean_inc(x_544); +x_559 = l_Lean_Parser_nodeInfo(x_544, x_558); +x_560 = lean_ctor_get(x_557, 1); +lean_inc(x_560); +lean_dec(x_557); +x_561 = lean_alloc_closure((void*)(l_Lean_Parser_nodeFn___rarg), 5, 2); +lean_closure_set(x_561, 0, x_544); +lean_closure_set(x_561, 1, x_560); +x_562 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_562, 0, x_559); +lean_ctor_set(x_562, 1, x_561); +x_563 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_563, 0, x_562); +return x_563; } } } case 10: { -lean_object* x_555; lean_object* x_556; lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; +lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_dec(x_1); -x_555 = lean_ctor_get(x_3, 0); -lean_inc(x_555); -x_556 = lean_ctor_get(x_3, 1); -lean_inc(x_556); -lean_dec(x_3); -x_557 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_557, 0, x_556); -x_558 = l_String_trim(x_555); -lean_dec(x_555); -lean_inc(x_558); -x_559 = l_Lean_Parser_symbolInfo(x_558, x_557); -x_560 = lean_alloc_closure((void*)(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); -lean_closure_set(x_560, 0, x_558); -x_561 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_561, 0, x_559); -lean_ctor_set(x_561, 1, x_560); -x_562 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_562, 0, x_561); -return x_562; -} -case 11: -{ -lean_object* x_563; lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; -lean_dec(x_1); -x_563 = lean_ctor_get(x_3, 0); -lean_inc(x_563); -x_564 = lean_ctor_get(x_3, 1); +x_564 = lean_ctor_get(x_3, 0); lean_inc(x_564); -x_565 = lean_ctor_get(x_3, 2); +x_565 = lean_ctor_get(x_3, 1); lean_inc(x_565); lean_dec(x_3); -x_566 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_566, 0, x_565); -x_567 = l_String_trim(x_563); -lean_dec(x_563); -x_568 = l_String_trim(x_564); +x_566 = l_String_trim(x_564); lean_dec(x_564); -lean_inc(x_568); -lean_inc(x_567); -x_569 = l_Lean_Parser_unicodeSymbolInfo(x_567, x_568, x_566); -x_570 = lean_alloc_closure((void*)(l_Lean_Parser_unicodeSymbolFn___rarg___boxed), 5, 2); -lean_closure_set(x_570, 0, x_567); -lean_closure_set(x_570, 1, x_568); -x_571 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_571, 0, x_569); -lean_ctor_set(x_571, 1, x_570); -x_572 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_572, 0, x_571); -return x_572; +lean_inc(x_566); +x_567 = l_Lean_Parser_symbolInfo(x_566, x_565); +x_568 = lean_alloc_closure((void*)(l_Lean_Parser_symbolFn___rarg___boxed), 4, 1); +lean_closure_set(x_568, 0, x_566); +x_569 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_569, 0, x_567); +lean_ctor_set(x_569, 1, x_568); +x_570 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_570, 0, x_569); +return x_570; +} +case 12: +{ +lean_object* x_571; lean_object* x_572; lean_object* x_573; lean_object* x_574; lean_object* x_575; +lean_dec(x_3); +lean_dec(x_1); +x_571 = lean_box(x_2); +x_572 = lean_alloc_closure((void*)(l_Lean_Parser_numLitFn___boxed), 2, 1); +lean_closure_set(x_572, 0, x_571); +x_573 = l_Lean_Parser_numLit___closed__1; +x_574 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_574, 0, x_573); +lean_ctor_set(x_574, 1, x_572); +x_575 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_575, 0, x_574); +return x_575; +} +case 13: +{ +lean_object* x_576; lean_object* x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; +lean_dec(x_3); +lean_dec(x_1); +x_576 = lean_box(x_2); +x_577 = lean_alloc_closure((void*)(l_Lean_Parser_strLitFn___boxed), 2, 1); +lean_closure_set(x_577, 0, x_576); +x_578 = l_Lean_Parser_strLit___closed__1; +x_579 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_579, 0, x_578); +lean_ctor_set(x_579, 1, x_577); +x_580 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_580, 0, x_579); +return x_580; +} +case 14: +{ +lean_object* x_581; lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; +lean_dec(x_3); +lean_dec(x_1); +x_581 = lean_box(x_2); +x_582 = lean_alloc_closure((void*)(l_Lean_Parser_charLitFn___boxed), 2, 1); +lean_closure_set(x_582, 0, x_581); +x_583 = l_Lean_Parser_charLit___closed__1; +x_584 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_584, 0, x_583); +lean_ctor_set(x_584, 1, x_582); +x_585 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_585, 0, x_584); +return x_585; +} +case 15: +{ +lean_object* x_586; lean_object* x_587; lean_object* x_588; lean_object* x_589; lean_object* x_590; +lean_dec(x_3); +lean_dec(x_1); +x_586 = lean_box(x_2); +x_587 = lean_alloc_closure((void*)(l_Lean_Parser_identFn___boxed), 2, 1); +lean_closure_set(x_587, 0, x_586); +x_588 = l_Lean_Parser_identNoAntiquot___closed__1; +x_589 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_589, 0, x_588); +lean_ctor_set(x_589, 1, x_587); +x_590 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_590, 0, x_589); +return x_590; } default: { -lean_object* x_573; +lean_object* x_591; lean_dec(x_1); -x_573 = l_Lean_Parser_compileParserDescr___main___closed__1; -return x_573; +x_591 = l_Lean_Parser_compileParserDescr___main___closed__1; +return x_591; } } } diff --git a/stage0/stdlib/Init/Lean/Parser/Syntax.c b/stage0/stdlib/Init/Lean/Parser/Syntax.c index 88f6e95be5..dca9b3c889 100644 --- a/stage0/stdlib/Init/Lean/Parser/Syntax.c +++ b/stage0/stdlib/Init/Lean/Parser/Syntax.c @@ -15,8 +15,10 @@ extern "C" { #endif lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__6; extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__4; +lean_object* l_Lean_Parser_Syntax_cat___closed__6; lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_str___elambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Syntax_char; extern lean_object* l_Lean_Parser_manyAux___main___closed__1; lean_object* l_Lean_Parser_Syntax_try___closed__5; lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__7; @@ -37,14 +39,17 @@ lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__6; lean_object* l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__2; extern lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__4; lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__5; +lean_object* l_Lean_Parser_Syntax_optional___closed__6; lean_object* l_Lean_Parser_Syntax_paren___closed__4; lean_object* l_Lean_Parser_Syntax_many1___elambda__1___closed__2; lean_object* l_Lean_Parser_Syntax_cat___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_cat(lean_object*); lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__3; lean_object* l_Lean_Parser_Syntax_sepBy___closed__3; +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__6; lean_object* l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; lean_object* l_Lean_Parser_Syntax_many___closed__1; +lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__7; lean_object* l_Lean_Parser_Syntax_many___closed__2; lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__5; lean_object* l_Lean_Parser_Syntax_str___elambda__1___closed__3; @@ -72,23 +77,32 @@ lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_Parser_tokenFn(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__3; +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__2; +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__4; lean_object* l_Lean_Parser_ParserState_mkErrorsAt(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_many___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_paren___closed__3; lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Level_addLit___elambda__1___closed__6; +lean_object* l_Lean_Parser_Syntax_cat___closed__8; extern lean_object* l_Lean_Parser_strLit___closed__1; lean_object* l_Lean_Parser_Syntax_many1___closed__4; +lean_object* l_Lean_Parser_Syntax_char___closed__2; lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__8; +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__5; lean_object* l_Lean_Parser_Syntax_sepBy___closed__4; lean_object* l_Lean_Parser_Syntax_str___closed__4; lean_object* l_Lean_Parser_Command_syntax; lean_object* l_Lean_Parser_Command_syntax___closed__5; lean_object* l_Lean_Parser_Syntax_lookahead___closed__6; lean_object* l_Lean_Parser_Syntax_str___elambda__1___closed__6; +lean_object* l_Lean_Parser_Syntax_ident___closed__3; +extern lean_object* l_Lean_Parser_numLit___closed__1; +lean_object* l_Lean_Parser_Syntax_ident___closed__5; lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__6; lean_object* l_Lean_Parser_Syntax_paren___closed__1; +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__3; lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__4; lean_object* l_Lean_Parser_Syntax_cat___closed__1; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_orelse(lean_object*); @@ -118,35 +132,46 @@ lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__7; lean_object* l_Lean_Parser_Command_syntax___closed__3; lean_object* l_Lean_Parser_Syntax_orelse___closed__3; lean_object* l_Lean_Parser_Syntax_sepBy1___closed__4; +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__6; lean_object* l_Lean_Parser_Syntax_try___elambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Syntax_ident___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__1; lean_object* l_Lean_Parser_Command_syntax___closed__7; lean_object* l_Lean_Parser_Syntax_str___closed__1; +lean_object* l_Lean_Parser_optionaInfo(lean_object*); lean_object* l_Lean_Parser_Syntax_paren___closed__5; lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__4; +lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__8; lean_object* l_Lean_Parser_Syntax_num___closed__2; lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__5; lean_object* l_Lean_Parser_Syntax_num___closed__1; lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__2; +lean_object* l_Lean_Parser_Syntax_ident; lean_object* l_Lean_Parser_Syntax_num___closed__4; extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__3; lean_object* l_Lean_Parser_Syntax_cat; lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__4; lean_object* l_Lean_Parser_orelseInfo(lean_object*, lean_object*); +lean_object* l_Lean_Parser_Syntax_char___closed__4; lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__3; lean_object* l_Lean_Parser_Syntax_lookahead___closed__3; lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__3; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Syntax_str(lean_object*); +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__3; extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__2; lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__5; extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__11; +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__2; lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__5; +lean_object* l_Lean_Parser_Syntax_char___closed__1; +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__5; extern lean_object* l_Lean_Parser_Term_explicitBinder___closed__1; lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__6; lean_object* l_Lean_Parser_registerBuiltinParserAttribute(lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__8; lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__2; lean_object* l_Lean_Parser_Syntax_num___elambda__1(lean_object*, lean_object*, lean_object*); @@ -156,6 +181,7 @@ lean_object* l_Lean_Parser_Syntax_sepBy___closed__2; extern lean_object* l_Lean_Parser_Level_ident___elambda__1___closed__4; lean_object* l_Lean_Parser_Syntax_sepBy___closed__1; lean_object* l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(lean_object*); +lean_object* l_Lean_Parser_Syntax_ident___closed__2; lean_object* l_Lean_Parser_ParserState_restore(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_many___closed__3; lean_object* l_Lean_Parser_Syntax_optional___elambda__1(lean_object*, lean_object*, lean_object*); @@ -164,11 +190,11 @@ lean_object* l_Lean_Parser_Syntax_atom___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_sepBy(lean_object*); lean_object* l_Lean_Parser_Syntax_atom; lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__8; -extern lean_object* l_Lean_Parser_FirstTokens_toStr___closed__3; extern lean_object* l_Lean_Parser_Level_paren___closed__4; extern lean_object* l_Lean_Parser_mkAntiquot___closed__7; lean_object* l_Lean_Parser_Command_syntax___closed__1; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_paren(lean_object*); +lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__4; lean_object* l_Lean_Parser_categoryParserFn(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_str___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__3; @@ -179,6 +205,7 @@ lean_object* l_Lean_Parser_Syntax_atom___closed__1; lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__4; lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Syntax_paren___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Syntax_sepBy1(lean_object*); +lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__7; lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__5; lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__2; lean_object* l_Lean_Parser_Syntax_paren___closed__2; @@ -200,18 +227,24 @@ lean_object* l_Lean_Parser_Syntax_sepBy1___closed__1; lean_object* l_Lean_Parser_categoryParser(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_many1___closed__3; lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__5; lean_object* l_Lean_Parser_Syntax_optional___closed__5; +lean_object* l_Lean_Parser_Syntax_ident___closed__4; lean_object* l_Lean_Parser_Syntax_atom___elambda__1___closed__2; lean_object* l_Lean_Parser_regSyntaxParserAttribute(lean_object*); lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_symbolInfo(lean_object*, lean_object*); +extern lean_object* l___private_Init_Util_1__mkPanicMessage___closed__2; extern lean_object* l_Lean_Parser_epsilonInfo; +lean_object* l_Lean_Parser_Syntax_ident___closed__1; extern lean_object* l_Lean_Parser_Term_typeAscription___closed__1; lean_object* l_Lean_Parser_Syntax_atom___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_str___elambda__1___closed__1; lean_object* l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__3; lean_object* l_Lean_Parser_Syntax_sepBy1___closed__6; lean_object* l_Lean_Parser_strLitFn___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__4; +lean_object* l_Lean_Parser_Syntax_cat___closed__7; lean_object* l_Lean_Parser_Syntax_sepBy1___closed__3; lean_object* l_Lean_Parser_Syntax_sepBy1___closed__5; lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__7; @@ -220,6 +253,7 @@ lean_object* l_Lean_Parser_regBuiltinSyntaxParserAttr(lean_object*); lean_object* l_Lean_Parser_Syntax_atom___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_orelse___closed__2; lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__4; +lean_object* l_Lean_Parser_Syntax_char___closed__3; lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__3; lean_object* l_String_trim(lean_object*); extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__8; @@ -235,16 +269,22 @@ extern lean_object* l_Lean_Parser_mkAntiquot___closed__6; lean_object* l_Lean_Parser_Syntax_lookahead___closed__1; lean_object* l_Lean_Parser_Syntax_try; lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__7; +lean_object* l_Lean_Parser_Syntax_char___closed__5; +extern lean_object* l_Lean_Syntax_getKind___closed__3; lean_object* l_Lean_Parser_mkAntiquot(uint8_t, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__6; lean_object* l_Lean_Parser_Syntax_try___closed__2; +lean_object* l___regBuiltinParser_Lean_Parser_Syntax_ident(lean_object*); lean_object* l_Lean_Parser_Syntax_cat___closed__3; lean_object* l_Lean_Parser_Syntax_lookahead___closed__2; lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__4; lean_object* l_Lean_Parser_Syntax_lookahead; extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__14; +lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__6; lean_object* l_Lean_Parser_Syntax_atom___closed__2; +lean_object* l_Lean_Parser_Syntax_char___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__3; +lean_object* l_Lean_Parser_Syntax_cat___closed__5; lean_object* l_Lean_Parser_Syntax_sepBy___closed__7; lean_object* l_Lean_Parser_ParserState_mkUnexpectedError(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_many___closed__4; @@ -254,12 +294,16 @@ lean_object* l_Lean_Parser_Command_syntax___closed__2; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_atom(lean_object*); lean_object* l_Lean_Parser_Syntax_optional___closed__2; lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__5; +lean_object* l_Lean_Parser_Syntax_atom___closed__5; lean_object* l_Lean_Parser_Syntax_orelse___elambda__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__9; lean_object* l_Lean_Parser_Syntax_optional___closed__1; lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__1; +lean_object* l_Lean_Parser_numLitFn___rarg(lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Syntax_optional(lean_object*); lean_object* l_Lean_Parser_Syntax_many1___elambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_object* l___regBuiltinParser_Lean_Parser_Syntax_char(lean_object*); lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__1; lean_object* l___regBuiltinParser_Lean_Parser_Command_syntax(lean_object*); lean_object* l_Lean_Parser_Syntax_atom___closed__3; @@ -270,6 +314,7 @@ lean_object* l___regBuiltinParser_Lean_Parser_Syntax_many1(lean_object*); lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__2; lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__4; lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__6; +extern lean_object* l_Lean_Parser_Term_char___elambda__1___closed__1; lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__4; uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_orelse; @@ -888,6 +933,47 @@ x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4); return x_5; } } +lean_object* _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Util_1__mkPanicMessage___closed__2; +x_2 = l_String_trim(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Char_HasRepr___closed__1; +x_2 = l_Lean_Parser_Syntax_cat___elambda__1___closed__5; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_cat___elambda__1___closed__6; +x_2 = l_Char_HasRepr___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Syntax_cat___elambda__1___closed__7; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} lean_object* l_Lean_Parser_Syntax_cat___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -940,7 +1026,7 @@ return x_11; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_inc(x_10); x_16 = l_Lean_Parser_ParserState_restore(x_11, x_9, x_10); lean_dec(x_9); @@ -948,12 +1034,179 @@ x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_array_get_size(x_17); lean_dec(x_17); +lean_inc(x_2); x_19 = lean_apply_3(x_5, x_1, x_2, x_16); -x_20 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; -x_21 = l_Lean_Parser_ParserState_mkNode(x_19, x_20, x_18); -x_22 = l_Lean_Parser_mergeOrElseErrors(x_21, x_13, x_10); +x_20 = lean_ctor_get(x_19, 3); +lean_inc(x_20); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_60; lean_object* x_61; +x_21 = lean_ctor_get(x_19, 0); +lean_inc(x_21); +x_22 = lean_array_get_size(x_21); +lean_dec(x_21); +x_23 = lean_ctor_get(x_19, 1); +lean_inc(x_23); +lean_inc(x_2); +x_60 = l_Lean_Parser_tokenFn(x_2, x_19); +x_61 = lean_ctor_get(x_60, 3); +lean_inc(x_61); +if (lean_obj_tag(x_61) == 0) +{ +lean_object* x_62; lean_object* x_63; +x_62 = lean_ctor_get(x_60, 0); +lean_inc(x_62); +x_63 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_62); +lean_dec(x_62); +if (lean_obj_tag(x_63) == 2) +{ +lean_object* x_64; lean_object* x_65; uint8_t x_66; +x_64 = lean_ctor_get(x_63, 1); +lean_inc(x_64); +lean_dec(x_63); +x_65 = l_Lean_Parser_Syntax_cat___elambda__1___closed__5; +x_66 = lean_string_dec_eq(x_64, x_65); +lean_dec(x_64); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; +x_67 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_23); +x_68 = l_Lean_Parser_ParserState_mkErrorsAt(x_60, x_67, x_23); +x_24 = x_68; +goto block_59; +} +else +{ +x_24 = x_60; +goto block_59; +} +} +else +{ +lean_object* x_69; lean_object* x_70; +lean_dec(x_63); +x_69 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_23); +x_70 = l_Lean_Parser_ParserState_mkErrorsAt(x_60, x_69, x_23); +x_24 = x_70; +goto block_59; +} +} +else +{ +lean_object* x_71; lean_object* x_72; +lean_dec(x_61); +x_71 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_23); +x_72 = l_Lean_Parser_ParserState_mkErrorsAt(x_60, x_71, x_23); +x_24 = x_72; +goto block_59; +} +block_59: +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_24, 3); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = l_Lean_Parser_numLitFn___rarg(x_2, x_24); +x_27 = lean_ctor_get(x_26, 3); +lean_inc(x_27); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_23); +x_28 = l_Lean_nullKind; +x_29 = l_Lean_Parser_ParserState_mkNode(x_26, x_28, x_22); +x_30 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_31 = l_Lean_Parser_ParserState_mkNode(x_29, x_30, x_18); +x_32 = l_Lean_Parser_mergeOrElseErrors(x_31, x_13, x_10); lean_dec(x_10); -return x_22; +return x_32; +} +else +{ +lean_object* x_33; uint8_t x_34; +lean_dec(x_27); +x_33 = lean_ctor_get(x_26, 1); +lean_inc(x_33); +x_34 = lean_nat_dec_eq(x_33, x_23); +lean_dec(x_33); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_23); +x_35 = l_Lean_nullKind; +x_36 = l_Lean_Parser_ParserState_mkNode(x_26, x_35, x_22); +x_37 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_38 = l_Lean_Parser_ParserState_mkNode(x_36, x_37, x_18); +x_39 = l_Lean_Parser_mergeOrElseErrors(x_38, x_13, x_10); +lean_dec(x_10); +return x_39; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_40 = l_Lean_Parser_ParserState_restore(x_26, x_22, x_23); +x_41 = l_Lean_nullKind; +x_42 = l_Lean_Parser_ParserState_mkNode(x_40, x_41, x_22); +x_43 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_44 = l_Lean_Parser_ParserState_mkNode(x_42, x_43, x_18); +x_45 = l_Lean_Parser_mergeOrElseErrors(x_44, x_13, x_10); +lean_dec(x_10); +return x_45; +} +} +} +else +{ +lean_object* x_46; uint8_t x_47; +lean_dec(x_25); +lean_dec(x_2); +x_46 = lean_ctor_get(x_24, 1); +lean_inc(x_46); +x_47 = lean_nat_dec_eq(x_46, x_23); +lean_dec(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_23); +x_48 = l_Lean_nullKind; +x_49 = l_Lean_Parser_ParserState_mkNode(x_24, x_48, x_22); +x_50 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_51 = l_Lean_Parser_ParserState_mkNode(x_49, x_50, x_18); +x_52 = l_Lean_Parser_mergeOrElseErrors(x_51, x_13, x_10); +lean_dec(x_10); +return x_52; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_53 = l_Lean_Parser_ParserState_restore(x_24, x_22, x_23); +x_54 = l_Lean_nullKind; +x_55 = l_Lean_Parser_ParserState_mkNode(x_53, x_54, x_22); +x_56 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_57 = l_Lean_Parser_ParserState_mkNode(x_55, x_56, x_18); +x_58 = l_Lean_Parser_mergeOrElseErrors(x_57, x_13, x_10); +lean_dec(x_10); +return x_58; +} +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_20); +lean_dec(x_2); +x_73 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_74 = l_Lean_Parser_ParserState_mkNode(x_19, x_73, x_18); +x_75 = l_Lean_Parser_mergeOrElseErrors(x_74, x_13, x_10); +lean_dec(x_10); +return x_75; +} } } } @@ -961,28 +1214,67 @@ return x_22; lean_object* _init_l_Lean_Parser_Syntax_cat___closed__1() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Syntax_cat___elambda__1___closed__5; +x_3 = l_Lean_Parser_symbolInfo(x_2, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_cat___closed__1; +x_2 = l_Lean_Parser_numLit___closed__1; +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Syntax_cat___closed__2; +x_2 = l_Lean_Parser_optionaInfo(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__4() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Level_ident___elambda__1___closed__4; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; -x_4 = l_Lean_Parser_nodeInfo(x_3, x_2); +x_3 = l_Lean_Parser_Syntax_cat___closed__3; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Syntax_cat___closed__2() { +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_cat___elambda__1___closed__2; +x_2 = l_Lean_Parser_Syntax_cat___closed__4; +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Syntax_cat___elambda__1___closed__4; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Syntax_cat___closed__1; +x_3 = l_Lean_Parser_Syntax_cat___closed__5; x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Syntax_cat___closed__3() { +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__7() { _start: { lean_object* x_1; @@ -990,12 +1282,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_cat___elambda__1), 3, 0); return x_1; } } -lean_object* _init_l_Lean_Parser_Syntax_cat___closed__4() { +lean_object* _init_l_Lean_Parser_Syntax_cat___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_cat___closed__2; -x_2 = l_Lean_Parser_Syntax_cat___closed__3; +x_1 = l_Lean_Parser_Syntax_cat___closed__6; +x_2 = l_Lean_Parser_Syntax_cat___closed__7; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -1006,7 +1298,7 @@ lean_object* _init_l_Lean_Parser_Syntax_cat() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Syntax_cat___closed__4; +x_1 = l_Lean_Parser_Syntax_cat___closed__8; return x_1; } } @@ -1106,7 +1398,7 @@ return x_9; } else { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_inc(x_8); x_14 = l_Lean_Parser_ParserState_restore(x_9, x_7, x_8); lean_dec(x_7); @@ -1114,12 +1406,179 @@ x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_array_get_size(x_15); lean_dec(x_15); +lean_inc(x_2); x_17 = l_Lean_Parser_strLitFn___rarg(x_2, x_14); -x_18 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; -x_19 = l_Lean_Parser_ParserState_mkNode(x_17, x_18, x_16); -x_20 = l_Lean_Parser_mergeOrElseErrors(x_19, x_11, x_8); +x_18 = lean_ctor_get(x_17, 3); +lean_inc(x_18); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_58; lean_object* x_59; +x_19 = lean_ctor_get(x_17, 0); +lean_inc(x_19); +x_20 = lean_array_get_size(x_19); +lean_dec(x_19); +x_21 = lean_ctor_get(x_17, 1); +lean_inc(x_21); +lean_inc(x_2); +x_58 = l_Lean_Parser_tokenFn(x_2, x_17); +x_59 = lean_ctor_get(x_58, 3); +lean_inc(x_59); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; +x_60 = lean_ctor_get(x_58, 0); +lean_inc(x_60); +x_61 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_60); +lean_dec(x_60); +if (lean_obj_tag(x_61) == 2) +{ +lean_object* x_62; lean_object* x_63; uint8_t x_64; +x_62 = lean_ctor_get(x_61, 1); +lean_inc(x_62); +lean_dec(x_61); +x_63 = l_Lean_Parser_Syntax_cat___elambda__1___closed__5; +x_64 = lean_string_dec_eq(x_62, x_63); +lean_dec(x_62); +if (x_64 == 0) +{ +lean_object* x_65; lean_object* x_66; +x_65 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_21); +x_66 = l_Lean_Parser_ParserState_mkErrorsAt(x_58, x_65, x_21); +x_22 = x_66; +goto block_57; +} +else +{ +x_22 = x_58; +goto block_57; +} +} +else +{ +lean_object* x_67; lean_object* x_68; +lean_dec(x_61); +x_67 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_21); +x_68 = l_Lean_Parser_ParserState_mkErrorsAt(x_58, x_67, x_21); +x_22 = x_68; +goto block_57; +} +} +else +{ +lean_object* x_69; lean_object* x_70; +lean_dec(x_59); +x_69 = l_Lean_Parser_Syntax_cat___elambda__1___closed__8; +lean_inc(x_21); +x_70 = l_Lean_Parser_ParserState_mkErrorsAt(x_58, x_69, x_21); +x_22 = x_70; +goto block_57; +} +block_57: +{ +lean_object* x_23; +x_23 = lean_ctor_get(x_22, 3); +lean_inc(x_23); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = l_Lean_Parser_numLitFn___rarg(x_2, x_22); +x_25 = lean_ctor_get(x_24, 3); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +lean_dec(x_21); +x_26 = l_Lean_nullKind; +x_27 = l_Lean_Parser_ParserState_mkNode(x_24, x_26, x_20); +x_28 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_29 = l_Lean_Parser_ParserState_mkNode(x_27, x_28, x_16); +x_30 = l_Lean_Parser_mergeOrElseErrors(x_29, x_11, x_8); lean_dec(x_8); -return x_20; +return x_30; +} +else +{ +lean_object* x_31; uint8_t x_32; +lean_dec(x_25); +x_31 = lean_ctor_get(x_24, 1); +lean_inc(x_31); +x_32 = lean_nat_dec_eq(x_31, x_21); +lean_dec(x_31); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_21); +x_33 = l_Lean_nullKind; +x_34 = l_Lean_Parser_ParserState_mkNode(x_24, x_33, x_20); +x_35 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_36 = l_Lean_Parser_ParserState_mkNode(x_34, x_35, x_16); +x_37 = l_Lean_Parser_mergeOrElseErrors(x_36, x_11, x_8); +lean_dec(x_8); +return x_37; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_38 = l_Lean_Parser_ParserState_restore(x_24, x_20, x_21); +x_39 = l_Lean_nullKind; +x_40 = l_Lean_Parser_ParserState_mkNode(x_38, x_39, x_20); +x_41 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_42 = l_Lean_Parser_ParserState_mkNode(x_40, x_41, x_16); +x_43 = l_Lean_Parser_mergeOrElseErrors(x_42, x_11, x_8); +lean_dec(x_8); +return x_43; +} +} +} +else +{ +lean_object* x_44; uint8_t x_45; +lean_dec(x_23); +lean_dec(x_2); +x_44 = lean_ctor_get(x_22, 1); +lean_inc(x_44); +x_45 = lean_nat_dec_eq(x_44, x_21); +lean_dec(x_44); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_dec(x_21); +x_46 = l_Lean_nullKind; +x_47 = l_Lean_Parser_ParserState_mkNode(x_22, x_46, x_20); +x_48 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_49 = l_Lean_Parser_ParserState_mkNode(x_47, x_48, x_16); +x_50 = l_Lean_Parser_mergeOrElseErrors(x_49, x_11, x_8); +lean_dec(x_8); +return x_50; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_51 = l_Lean_Parser_ParserState_restore(x_22, x_20, x_21); +x_52 = l_Lean_nullKind; +x_53 = l_Lean_Parser_ParserState_mkNode(x_51, x_52, x_20); +x_54 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_55 = l_Lean_Parser_ParserState_mkNode(x_53, x_54, x_16); +x_56 = l_Lean_Parser_mergeOrElseErrors(x_55, x_11, x_8); +lean_dec(x_8); +return x_56; +} +} +} +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; +lean_dec(x_18); +lean_dec(x_2); +x_71 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_72 = l_Lean_Parser_ParserState_mkNode(x_17, x_71, x_16); +x_73 = l_Lean_Parser_mergeOrElseErrors(x_72, x_11, x_8); +lean_dec(x_8); +return x_73; +} } } } @@ -1128,25 +1587,35 @@ lean_object* _init_l_Lean_Parser_Syntax_atom___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; -x_2 = l_Lean_Parser_strLit___closed__1; -x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +x_1 = l_Lean_Parser_strLit___closed__1; +x_2 = l_Lean_Parser_Syntax_cat___closed__3; +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } lean_object* _init_l_Lean_Parser_Syntax_atom___closed__2() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_atom___elambda__1___closed__2; +x_2 = l_Lean_Parser_Syntax_atom___closed__1; +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_atom___closed__3() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Syntax_atom___elambda__1___closed__4; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Syntax_atom___closed__1; +x_3 = l_Lean_Parser_Syntax_atom___closed__2; x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Syntax_atom___closed__3() { +lean_object* _init_l_Lean_Parser_Syntax_atom___closed__4() { _start: { lean_object* x_1; @@ -1154,12 +1623,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_atom___elambda__1), 3, 0); return x_1; } } -lean_object* _init_l_Lean_Parser_Syntax_atom___closed__4() { +lean_object* _init_l_Lean_Parser_Syntax_atom___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_atom___closed__2; -x_2 = l_Lean_Parser_Syntax_atom___closed__3; +x_1 = l_Lean_Parser_Syntax_atom___closed__3; +x_2 = l_Lean_Parser_Syntax_atom___closed__4; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -1170,7 +1639,7 @@ lean_object* _init_l_Lean_Parser_Syntax_atom() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Syntax_atom___closed__4; +x_1 = l_Lean_Parser_Syntax_atom___closed__5; return x_1; } } @@ -1580,6 +2049,400 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_paren___elambda__1___closed__2; +x_2 = l_Lean_Parser_Term_char___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Syntax_char___elambda__1___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__3() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; +x_1 = 0; +x_2 = l_Lean_Parser_Term_char___elambda__1___closed__1; +x_3 = l_Lean_Parser_Syntax_char___elambda__1___closed__2; +x_4 = 1; +x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Term_char___elambda__1___closed__1; +x_2 = l_String_trim(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Char_HasRepr___closed__1; +x_2 = l_Lean_Parser_Syntax_char___elambda__1___closed__4; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___elambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_char___elambda__1___closed__5; +x_2 = l_Char_HasRepr___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_Syntax_char___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = l_Lean_Parser_Syntax_char___elambda__1___closed__3; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +x_7 = lean_array_get_size(x_6); +lean_dec(x_6); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +lean_inc(x_2); +x_9 = lean_apply_3(x_5, x_1, x_2, x_3); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +x_13 = lean_nat_dec_eq(x_12, x_8); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_inc(x_8); +x_14 = l_Lean_Parser_ParserState_restore(x_9, x_7, x_8); +lean_dec(x_7); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_array_get_size(x_15); +lean_dec(x_15); +x_17 = l_Lean_Parser_Syntax_char___elambda__1___closed__4; +x_18 = l_Lean_Parser_Syntax_char___elambda__1___closed__6; +x_19 = l_Lean_Parser_nonReservedSymbolFnAux(x_17, x_18, x_2, x_14); +x_20 = l_Lean_Parser_Syntax_char___elambda__1___closed__1; +x_21 = l_Lean_Parser_ParserState_mkNode(x_19, x_20, x_16); +x_22 = l_Lean_Parser_mergeOrElseErrors(x_21, x_11, x_8); +lean_dec(x_8); +return x_22; +} +} +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___closed__1() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_char___elambda__1___closed__4; +x_2 = 0; +x_3 = l_Lean_Parser_nonReservedSymbolInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_char___elambda__1___closed__1; +x_2 = l_Lean_Parser_Syntax_char___closed__1; +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_Syntax_char___elambda__1___closed__3; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Syntax_char___closed__2; +x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_char___elambda__1), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_char___closed__3; +x_2 = l_Lean_Parser_Syntax_char___closed__4; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_char() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Parser_Syntax_char___closed__5; +return x_1; +} +} +lean_object* l___regBuiltinParser_Lean_Parser_Syntax_char(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = 0; +x_3 = l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; +x_4 = l_Lean_Parser_Syntax_char___elambda__1___closed__1; +x_5 = l_Lean_Parser_Syntax_char; +x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); +return x_6; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_paren___elambda__1___closed__2; +x_2 = l_Lean_Syntax_getKind___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Syntax_ident___elambda__1___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__3() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; +x_1 = 0; +x_2 = l_Lean_Syntax_getKind___closed__3; +x_3 = l_Lean_Parser_Syntax_ident___elambda__1___closed__2; +x_4 = 1; +x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Syntax_getKind___closed__3; +x_2 = l_String_trim(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Char_HasRepr___closed__1; +x_2 = l_Lean_Parser_Syntax_ident___elambda__1___closed__4; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_ident___elambda__1___closed__5; +x_2 = l_Char_HasRepr___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_Syntax_ident___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = l_Lean_Parser_Syntax_ident___elambda__1___closed__3; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +x_7 = lean_array_get_size(x_6); +lean_dec(x_6); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +lean_inc(x_2); +x_9 = lean_apply_3(x_5, x_1, x_2, x_3); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +x_13 = lean_nat_dec_eq(x_12, x_8); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_inc(x_8); +x_14 = l_Lean_Parser_ParserState_restore(x_9, x_7, x_8); +lean_dec(x_7); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_array_get_size(x_15); +lean_dec(x_15); +x_17 = l_Lean_Parser_Syntax_ident___elambda__1___closed__4; +x_18 = l_Lean_Parser_Syntax_ident___elambda__1___closed__6; +x_19 = l_Lean_Parser_nonReservedSymbolFnAux(x_17, x_18, x_2, x_14); +x_20 = l_Lean_Parser_Syntax_ident___elambda__1___closed__1; +x_21 = l_Lean_Parser_ParserState_mkNode(x_19, x_20, x_16); +x_22 = l_Lean_Parser_mergeOrElseErrors(x_21, x_11, x_8); +lean_dec(x_8); +return x_22; +} +} +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___closed__1() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_ident___elambda__1___closed__4; +x_2 = 0; +x_3 = l_Lean_Parser_nonReservedSymbolInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_ident___elambda__1___closed__1; +x_2 = l_Lean_Parser_Syntax_ident___closed__1; +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_Syntax_ident___elambda__1___closed__3; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Syntax_ident___closed__2; +x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_ident___elambda__1), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_ident___closed__3; +x_2 = l_Lean_Parser_Syntax_ident___closed__4; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_ident() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Parser_Syntax_ident___closed__5; +return x_1; +} +} +lean_object* l___regBuiltinParser_Lean_Parser_Syntax_ident(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = 0; +x_3 = l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; +x_4 = l_Lean_Parser_Syntax_ident___elambda__1___closed__1; +x_5 = l_Lean_Parser_Syntax_ident; +x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); +return x_6; +} +} lean_object* _init_l_Lean_Parser_Syntax_try___elambda__1___closed__1() { _start: { @@ -2072,6 +2935,252 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("optional"); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_paren___elambda__1___closed__2; +x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__4() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; +x_1 = 0; +x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__1; +x_3 = l_Lean_Parser_Syntax_optional___elambda__1___closed__3; +x_4 = 1; +x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("optional "); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__5; +x_2 = l_String_trim(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Char_HasRepr___closed__1; +x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__7; +x_2 = l_Char_HasRepr___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_Syntax_optional___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = l_Lean_Parser_Syntax_optional___elambda__1___closed__4; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +x_7 = lean_array_get_size(x_6); +lean_dec(x_6); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +lean_inc(x_2); +x_9 = lean_apply_3(x_5, x_1, x_2, x_3); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +x_13 = lean_nat_dec_eq(x_12, x_8); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +return x_9; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_inc(x_8); +x_14 = l_Lean_Parser_ParserState_restore(x_9, x_7, x_8); +lean_dec(x_7); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_array_get_size(x_15); +lean_dec(x_15); +x_17 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; +x_18 = l_Lean_Parser_Syntax_optional___elambda__1___closed__8; +lean_inc(x_2); +x_19 = l_Lean_Parser_nonReservedSymbolFnAux(x_17, x_18, x_2, x_14); +x_20 = lean_ctor_get(x_19, 3); +lean_inc(x_20); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_21 = l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; +x_22 = lean_unsigned_to_nat(0u); +x_23 = l_Lean_Parser_categoryParserFn(x_21, x_22, x_2, x_19); +x_24 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +x_25 = l_Lean_Parser_ParserState_mkNode(x_23, x_24, x_16); +x_26 = l_Lean_Parser_mergeOrElseErrors(x_25, x_11, x_8); +lean_dec(x_8); +return x_26; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_dec(x_20); +lean_dec(x_2); +x_27 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +x_28 = l_Lean_Parser_ParserState_mkNode(x_19, x_27, x_16); +x_29 = l_Lean_Parser_mergeOrElseErrors(x_28, x_11, x_8); +lean_dec(x_8); +return x_29; +} +} +} +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__1() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; +x_2 = 0; +x_3 = l_Lean_Parser_nonReservedSymbolInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_Syntax_paren___closed__1; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Syntax_optional___closed__1; +x_4 = l_Lean_Parser_andthenInfo(x_3, x_2); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +x_2 = l_Lean_Parser_Syntax_optional___closed__2; +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Syntax_optional___closed__3; +x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_optional___elambda__1), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Syntax_optional___closed__4; +x_2 = l_Lean_Parser_Syntax_optional___closed__5; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Syntax_optional() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Parser_Syntax_optional___closed__6; +return x_1; +} +} +lean_object* l___regBuiltinParser_Lean_Parser_Syntax_optional(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = 0; +x_3 = l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; +x_4 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; +x_5 = l_Lean_Parser_Syntax_optional; +x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); +return x_6; +} +} lean_object* _init_l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1() { _start: { @@ -2986,224 +4095,6 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("optional"); -return x_1; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_paren___elambda__1___closed__2; -x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_FirstTokens_toStr___closed__3; -x_2 = l_String_trim(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Char_HasRepr___closed__1; -x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__3; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__4; -x_2 = l_Char_HasRepr___closed__1; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__5; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* l_Lean_Parser_Syntax_optional___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -x_5 = lean_array_get_size(x_4); -lean_dec(x_4); -lean_inc(x_3); -x_6 = l_Lean_Parser_ParserState_pushSyntax(x_3, x_1); -x_7 = lean_ctor_get(x_3, 3); -lean_inc(x_7); -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -lean_dec(x_3); -x_9 = l_Lean_Parser_tokenFn(x_2, x_6); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_9, 0); -lean_inc(x_11); -x_12 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_11); -lean_dec(x_11); -if (lean_obj_tag(x_12) == 2) -{ -lean_object* x_13; lean_object* x_14; uint8_t x_15; -x_13 = lean_ctor_get(x_12, 1); -lean_inc(x_13); -lean_dec(x_12); -x_14 = l_Lean_Parser_Syntax_optional___elambda__1___closed__3; -x_15 = lean_string_dec_eq(x_13, x_14); -lean_dec(x_13); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; -x_17 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_16, x_8); -x_18 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_19 = l_Lean_Parser_ParserState_mkNode(x_17, x_18, x_5); -return x_19; -} -else -{ -lean_object* x_20; lean_object* x_21; -lean_dec(x_8); -x_20 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_21 = l_Lean_Parser_ParserState_mkNode(x_9, x_20, x_5); -return x_21; -} -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -lean_dec(x_12); -x_22 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; -x_23 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_22, x_8); -x_24 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_25 = l_Lean_Parser_ParserState_mkNode(x_23, x_24, x_5); -return x_25; -} -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -lean_dec(x_10); -x_26 = l_Lean_Parser_Syntax_optional___elambda__1___closed__6; -x_27 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_26, x_8); -x_28 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_29 = l_Lean_Parser_ParserState_mkNode(x_27, x_28, x_5); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; -lean_dec(x_7); -lean_dec(x_3); -lean_dec(x_2); -x_30 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_31 = l_Lean_Parser_ParserState_mkNode(x_6, x_30, x_5); -return x_31; -} -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Parser_Syntax_optional___elambda__1___closed__3; -x_3 = l_Lean_Parser_symbolInfo(x_2, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_epsilonInfo; -x_2 = l_Lean_Parser_Syntax_optional___closed__1; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_2 = l_Lean_Parser_Syntax_optional___closed__2; -x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Syntax_optional___elambda__1), 3, 0); -return x_1; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Syntax_optional___closed__3; -x_2 = l_Lean_Parser_Syntax_optional___closed__4; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Syntax_optional() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Parser_Syntax_optional___closed__5; -return x_1; -} -} -lean_object* l___regBuiltinParser_Lean_Parser_Syntax_optional(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = 1; -x_3 = l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__4; -x_4 = l_Lean_Parser_Syntax_optional___elambda__1___closed__2; -x_5 = l_Lean_Parser_Syntax_optional; -x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); -return x_6; -} -} lean_object* _init_l_Lean_Parser_Syntax_orelse___elambda__1___closed__1() { _start: { @@ -3809,6 +4700,14 @@ l_Lean_Parser_Syntax_cat___elambda__1___closed__3 = _init_l_Lean_Parser_Syntax_c lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__3); l_Lean_Parser_Syntax_cat___elambda__1___closed__4 = _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__4(); lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__4); +l_Lean_Parser_Syntax_cat___elambda__1___closed__5 = _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__5); +l_Lean_Parser_Syntax_cat___elambda__1___closed__6 = _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__6); +l_Lean_Parser_Syntax_cat___elambda__1___closed__7 = _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__7(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__7); +l_Lean_Parser_Syntax_cat___elambda__1___closed__8 = _init_l_Lean_Parser_Syntax_cat___elambda__1___closed__8(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___elambda__1___closed__8); l_Lean_Parser_Syntax_cat___closed__1 = _init_l_Lean_Parser_Syntax_cat___closed__1(); lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__1); l_Lean_Parser_Syntax_cat___closed__2 = _init_l_Lean_Parser_Syntax_cat___closed__2(); @@ -3817,6 +4716,14 @@ l_Lean_Parser_Syntax_cat___closed__3 = _init_l_Lean_Parser_Syntax_cat___closed__ lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__3); l_Lean_Parser_Syntax_cat___closed__4 = _init_l_Lean_Parser_Syntax_cat___closed__4(); lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__4); +l_Lean_Parser_Syntax_cat___closed__5 = _init_l_Lean_Parser_Syntax_cat___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__5); +l_Lean_Parser_Syntax_cat___closed__6 = _init_l_Lean_Parser_Syntax_cat___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__6); +l_Lean_Parser_Syntax_cat___closed__7 = _init_l_Lean_Parser_Syntax_cat___closed__7(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__7); +l_Lean_Parser_Syntax_cat___closed__8 = _init_l_Lean_Parser_Syntax_cat___closed__8(); +lean_mark_persistent(l_Lean_Parser_Syntax_cat___closed__8); l_Lean_Parser_Syntax_cat = _init_l_Lean_Parser_Syntax_cat(); lean_mark_persistent(l_Lean_Parser_Syntax_cat); res = l___regBuiltinParser_Lean_Parser_Syntax_cat(lean_io_mk_world()); @@ -3838,6 +4745,8 @@ l_Lean_Parser_Syntax_atom___closed__3 = _init_l_Lean_Parser_Syntax_atom___closed lean_mark_persistent(l_Lean_Parser_Syntax_atom___closed__3); l_Lean_Parser_Syntax_atom___closed__4 = _init_l_Lean_Parser_Syntax_atom___closed__4(); lean_mark_persistent(l_Lean_Parser_Syntax_atom___closed__4); +l_Lean_Parser_Syntax_atom___closed__5 = _init_l_Lean_Parser_Syntax_atom___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_atom___closed__5); l_Lean_Parser_Syntax_atom = _init_l_Lean_Parser_Syntax_atom(); lean_mark_persistent(l_Lean_Parser_Syntax_atom); res = l___regBuiltinParser_Lean_Parser_Syntax_atom(lean_io_mk_world()); @@ -3897,6 +4806,60 @@ lean_mark_persistent(l_Lean_Parser_Syntax_str); res = l___regBuiltinParser_Lean_Parser_Syntax_str(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Parser_Syntax_char___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__1); +l_Lean_Parser_Syntax_char___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__2); +l_Lean_Parser_Syntax_char___elambda__1___closed__3 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__3); +l_Lean_Parser_Syntax_char___elambda__1___closed__4 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__4); +l_Lean_Parser_Syntax_char___elambda__1___closed__5 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__5); +l_Lean_Parser_Syntax_char___elambda__1___closed__6 = _init_l_Lean_Parser_Syntax_char___elambda__1___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___elambda__1___closed__6); +l_Lean_Parser_Syntax_char___closed__1 = _init_l_Lean_Parser_Syntax_char___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___closed__1); +l_Lean_Parser_Syntax_char___closed__2 = _init_l_Lean_Parser_Syntax_char___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___closed__2); +l_Lean_Parser_Syntax_char___closed__3 = _init_l_Lean_Parser_Syntax_char___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___closed__3); +l_Lean_Parser_Syntax_char___closed__4 = _init_l_Lean_Parser_Syntax_char___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___closed__4); +l_Lean_Parser_Syntax_char___closed__5 = _init_l_Lean_Parser_Syntax_char___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_char___closed__5); +l_Lean_Parser_Syntax_char = _init_l_Lean_Parser_Syntax_char(); +lean_mark_persistent(l_Lean_Parser_Syntax_char); +res = l___regBuiltinParser_Lean_Parser_Syntax_char(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Parser_Syntax_ident___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__1); +l_Lean_Parser_Syntax_ident___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__2); +l_Lean_Parser_Syntax_ident___elambda__1___closed__3 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__3); +l_Lean_Parser_Syntax_ident___elambda__1___closed__4 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__4); +l_Lean_Parser_Syntax_ident___elambda__1___closed__5 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__5); +l_Lean_Parser_Syntax_ident___elambda__1___closed__6 = _init_l_Lean_Parser_Syntax_ident___elambda__1___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___elambda__1___closed__6); +l_Lean_Parser_Syntax_ident___closed__1 = _init_l_Lean_Parser_Syntax_ident___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___closed__1); +l_Lean_Parser_Syntax_ident___closed__2 = _init_l_Lean_Parser_Syntax_ident___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___closed__2); +l_Lean_Parser_Syntax_ident___closed__3 = _init_l_Lean_Parser_Syntax_ident___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___closed__3); +l_Lean_Parser_Syntax_ident___closed__4 = _init_l_Lean_Parser_Syntax_ident___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___closed__4); +l_Lean_Parser_Syntax_ident___closed__5 = _init_l_Lean_Parser_Syntax_ident___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident___closed__5); +l_Lean_Parser_Syntax_ident = _init_l_Lean_Parser_Syntax_ident(); +lean_mark_persistent(l_Lean_Parser_Syntax_ident); +res = l___regBuiltinParser_Lean_Parser_Syntax_ident(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Parser_Syntax_try___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_try___elambda__1___closed__1(); lean_mark_persistent(l_Lean_Parser_Syntax_try___elambda__1___closed__1); l_Lean_Parser_Syntax_try___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_try___elambda__1___closed__2(); @@ -3963,6 +4926,39 @@ lean_mark_persistent(l_Lean_Parser_Syntax_lookahead); res = l___regBuiltinParser_Lean_Parser_Syntax_lookahead(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Parser_Syntax_optional___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__1); +l_Lean_Parser_Syntax_optional___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__2); +l_Lean_Parser_Syntax_optional___elambda__1___closed__3 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__3); +l_Lean_Parser_Syntax_optional___elambda__1___closed__4 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__4); +l_Lean_Parser_Syntax_optional___elambda__1___closed__5 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__5); +l_Lean_Parser_Syntax_optional___elambda__1___closed__6 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__6); +l_Lean_Parser_Syntax_optional___elambda__1___closed__7 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__7(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__7); +l_Lean_Parser_Syntax_optional___elambda__1___closed__8 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__8(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__8); +l_Lean_Parser_Syntax_optional___closed__1 = _init_l_Lean_Parser_Syntax_optional___closed__1(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__1); +l_Lean_Parser_Syntax_optional___closed__2 = _init_l_Lean_Parser_Syntax_optional___closed__2(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__2); +l_Lean_Parser_Syntax_optional___closed__3 = _init_l_Lean_Parser_Syntax_optional___closed__3(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__3); +l_Lean_Parser_Syntax_optional___closed__4 = _init_l_Lean_Parser_Syntax_optional___closed__4(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__4); +l_Lean_Parser_Syntax_optional___closed__5 = _init_l_Lean_Parser_Syntax_optional___closed__5(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__5); +l_Lean_Parser_Syntax_optional___closed__6 = _init_l_Lean_Parser_Syntax_optional___closed__6(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__6); +l_Lean_Parser_Syntax_optional = _init_l_Lean_Parser_Syntax_optional(); +lean_mark_persistent(l_Lean_Parser_Syntax_optional); +res = l___regBuiltinParser_Lean_Parser_Syntax_optional(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1(); lean_mark_persistent(l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1); l_Lean_Parser_Syntax_sepBy___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_sepBy___elambda__1___closed__2(); @@ -4073,33 +5069,6 @@ lean_mark_persistent(l_Lean_Parser_Syntax_many1); res = l___regBuiltinParser_Lean_Parser_Syntax_many1(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Syntax_optional___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__1(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__1); -l_Lean_Parser_Syntax_optional___elambda__1___closed__2 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__2(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__2); -l_Lean_Parser_Syntax_optional___elambda__1___closed__3 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__3(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__3); -l_Lean_Parser_Syntax_optional___elambda__1___closed__4 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__4(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__4); -l_Lean_Parser_Syntax_optional___elambda__1___closed__5 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__5(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__5); -l_Lean_Parser_Syntax_optional___elambda__1___closed__6 = _init_l_Lean_Parser_Syntax_optional___elambda__1___closed__6(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___elambda__1___closed__6); -l_Lean_Parser_Syntax_optional___closed__1 = _init_l_Lean_Parser_Syntax_optional___closed__1(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__1); -l_Lean_Parser_Syntax_optional___closed__2 = _init_l_Lean_Parser_Syntax_optional___closed__2(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__2); -l_Lean_Parser_Syntax_optional___closed__3 = _init_l_Lean_Parser_Syntax_optional___closed__3(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__3); -l_Lean_Parser_Syntax_optional___closed__4 = _init_l_Lean_Parser_Syntax_optional___closed__4(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__4); -l_Lean_Parser_Syntax_optional___closed__5 = _init_l_Lean_Parser_Syntax_optional___closed__5(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional___closed__5); -l_Lean_Parser_Syntax_optional = _init_l_Lean_Parser_Syntax_optional(); -lean_mark_persistent(l_Lean_Parser_Syntax_optional); -res = l___regBuiltinParser_Lean_Parser_Syntax_optional(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); l_Lean_Parser_Syntax_orelse___elambda__1___closed__1 = _init_l_Lean_Parser_Syntax_orelse___elambda__1___closed__1(); lean_mark_persistent(l_Lean_Parser_Syntax_orelse___elambda__1___closed__1); l_Lean_Parser_Syntax_orelse___closed__1 = _init_l_Lean_Parser_Syntax_orelse___closed__1(); diff --git a/stage0/stdlib/Init/LeanExt.c b/stage0/stdlib/Init/LeanExt.c index 638fad6b3c..7ef121781d 100644 --- a/stage0/stdlib/Init/LeanExt.c +++ b/stage0/stdlib/Init/LeanExt.c @@ -18,13 +18,16 @@ lean_object* l_Lean_ParserDescr_orelse(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_optional(uint8_t, lean_object*); lean_object* l_Lean_ParserDescr_lookahead(uint8_t, lean_object*); lean_object* l_Lean_ParserDescr_many(uint8_t, lean_object*); +lean_object* l_Lean_ParserDescr_ident(uint8_t); lean_object* l_Lean_ParserDescr_andthen___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_char(uint8_t); extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Lean_ParserDescr_try(uint8_t, lean_object*); -lean_object* l_Lean_ParserDescr_unicodeSymbol(uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_str(uint8_t); lean_object* l_Lean_ParserDescrCore_inhabited(uint8_t); lean_object* l_Lean_ParserDescr_many1(uint8_t, lean_object*); lean_object* l_Lean_ParserDescr_many___boxed(lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_num___boxed(lean_object*); lean_object* l_Lean_ParserDescr_many1___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_parser(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_lookahead___boxed(lean_object*, lean_object*); @@ -33,13 +36,16 @@ lean_object* l_Lean_ParserDescr_andthen(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_symbol___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_node(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_try___boxed(lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_ident___boxed(lean_object*); +lean_object* l_Lean_ParserDescr_str___boxed(lean_object*); lean_object* l_Lean_ParserDescr_node___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_nonReservedSymbol___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescrCore_inhabited___boxed(lean_object*); lean_object* l_Lean_ParserDescr_sepBy1(uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_ParserDescr_unicodeSymbol___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_char___boxed(lean_object*); lean_object* l_Lean_ParserDescr_orelse___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_sepBy___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ParserDescr_num(uint8_t); lean_object* l_Lean_ParserDescr_symbol(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_optional___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_nonReservedSymbol(lean_object*, uint8_t); @@ -48,11 +54,11 @@ lean_object* l_Lean_ParserDescrCore_inhabited(uint8_t x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_String_splitAux___main___closed__1; -x_3 = lean_unsigned_to_nat(0u); +x_2 = lean_box(0); +x_3 = l_String_splitAux___main___closed__1; x_4 = lean_alloc_ctor(10, 2, 1); -lean_ctor_set(x_4, 0, x_2); -lean_ctor_set(x_4, 1, x_3); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } @@ -293,11 +299,87 @@ x_5 = l_Lean_ParserDescr_symbol(x_4, x_2, x_3); return x_5; } } +lean_object* l_Lean_ParserDescr_num(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_ctor(12, 0, 1); +lean_ctor_set_uint8(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_ParserDescr_num___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_ParserDescr_num(x_2); +return x_3; +} +} +lean_object* l_Lean_ParserDescr_str(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_ctor(13, 0, 1); +lean_ctor_set_uint8(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_ParserDescr_str___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_ParserDescr_str(x_2); +return x_3; +} +} +lean_object* l_Lean_ParserDescr_char(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_ctor(14, 0, 1); +lean_ctor_set_uint8(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_ParserDescr_char___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_ParserDescr_char(x_2); +return x_3; +} +} +lean_object* l_Lean_ParserDescr_ident(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_ctor(15, 0, 1); +lean_ctor_set_uint8(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_ParserDescr_ident___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_ParserDescr_ident(x_2); +return x_3; +} +} lean_object* l_Lean_ParserDescr_nonReservedSymbol(lean_object* x_1, uint8_t x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_ctor(12, 1, 1); +x_3 = lean_alloc_ctor(11, 1, 1); lean_ctor_set(x_3, 0, x_1); lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); return x_3; @@ -313,33 +395,11 @@ x_4 = l_Lean_ParserDescr_nonReservedSymbol(x_1, x_3); return x_4; } } -lean_object* l_Lean_ParserDescr_unicodeSymbol(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_ctor(11, 3, 1); -lean_ctor_set(x_5, 0, x_2); -lean_ctor_set(x_5, 1, x_3); -lean_ctor_set(x_5, 2, x_4); -lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_1); -return x_5; -} -} -lean_object* l_Lean_ParserDescr_unicodeSymbol___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; lean_object* x_6; -x_5 = lean_unbox(x_1); -lean_dec(x_1); -x_6 = l_Lean_ParserDescr_unicodeSymbol(x_5, x_2, x_3, x_4); -return x_6; -} -} lean_object* _init_l_Lean_ParserDescr_pushLeading() { _start: { lean_object* x_1; -x_1 = lean_box(13); +x_1 = lean_box(16); return x_1; } } @@ -347,7 +407,7 @@ lean_object* l_Lean_ParserDescr_parser(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_ctor(14, 2, 0); +x_3 = lean_alloc_ctor(17, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3;