chore: update stage0

This commit is contained in:
Leonardo de Moura 2020-01-08 14:25:56 -08:00
parent c4ad3a2390
commit c0803d989f
16 changed files with 2900 additions and 2219 deletions

View file

@ -15,7 +15,7 @@ structure Context :=
(commandStateRef : IO.Ref Command.State)
(parserStateRef : IO.Ref Parser.ModuleParserState)
(cmdPosRef : IO.Ref String.Pos)
(parserCtx : Parser.ParserContextCore)
(inputCtx : Parser.InputContext)
abbrev FrontendM := ReaderT Context (EIO Empty)
@ -25,7 +25,7 @@ EIO.catchExceptions x (fun _ => unreachable!)
@[inline] def runCommandElabM (x : Command.CommandElabM Unit) : FrontendM Unit :=
fun ctx => do
cmdPos ← liftIOCore! $ ctx.cmdPosRef.get;
let cmdCtx : Command.Context := { cmdPos := cmdPos, stateRef := ctx.commandStateRef, fileName := ctx.parserCtx.fileName, fileMap := ctx.parserCtx.fileMap };
let cmdCtx : Command.Context := { cmdPos := cmdPos, stateRef := ctx.commandStateRef, fileName := ctx.inputCtx.fileName, fileMap := ctx.inputCtx.fileMap };
EIO.catchExceptions (x cmdCtx) (fun _ => pure ())
def elabCommandAtFrontend (stx : Syntax) : FrontendM Unit :=
@ -48,12 +48,15 @@ fun ctx => liftIOCore! $ ctx.parserStateRef.set ps
def setMessages (msgs : MessageLog) : FrontendM Unit :=
fun ctx => liftIOCore! $ ctx.commandStateRef.modify $ fun s => { messages := msgs, .. s }
def getInputContext : FrontendM Parser.InputContext := do
ctx ← read; pure ctx.inputCtx
def processCommand : FrontendM Bool := do
updateCmdPos;
cs ← getCommandState;
ps ← getParserState;
c ← read;
match Parser.parseCommand cs.env c.parserCtx ps cs.messages with
cmdState ← getCommandState;
parserState ← getParserState;
inputCtx ← getInputContext;
match Parser.parseCommand cmdState.env inputCtx parserState cmdState.messages with
| (cmd, ps, messages) => do
setParserState ps;
setMessages messages;
@ -76,18 +79,18 @@ end Frontend
open Frontend
def IO.processCommands (parserCtx : Parser.ParserContextCore) (parserStateRef : IO.Ref Parser.ModuleParserState) (cmdStateRef : IO.Ref Command.State) : IO Unit := do
def IO.processCommands (inputCtx : Parser.InputContext) (parserStateRef : IO.Ref Parser.ModuleParserState) (cmdStateRef : IO.Ref Command.State) : IO Unit := do
ps ← parserStateRef.get;
cmdPosRef ← IO.mkRef ps.pos;
EIO.adaptExcept (fun (ex : Empty) => Empty.rec _ ex) $
processCommands { commandStateRef := cmdStateRef, parserStateRef := parserStateRef, cmdPosRef := cmdPosRef, parserCtx := parserCtx }
processCommands { commandStateRef := cmdStateRef, parserStateRef := parserStateRef, cmdPosRef := cmdPosRef, inputCtx := inputCtx }
def process (input : String) (env : Environment) (opts : Options) (fileName : Option String := none) : IO (Environment × MessageLog) := do
let fileName := fileName.getD "<input>";
let parserCtx := Parser.mkParserContextCore env input fileName;
let inputCtx := Parser.mkInputContext input fileName;
parserStateRef ← IO.mkRef { Parser.ModuleParserState . };
cmdStateRef ← IO.mkRef $ Command.mkState env {} opts;
IO.processCommands parserCtx parserStateRef cmdStateRef;
IO.processCommands inputCtx parserStateRef cmdStateRef;
cmdState ← cmdStateRef.get;
pure (cmdState.env, cmdState.messages)
@ -98,13 +101,13 @@ pure (env, messages.toList)
def runFrontend (env : Environment) (input : String) (opts : Options := {}) (fileName : Option String := none) : IO (Environment × MessageLog) := do
let fileName := fileName.getD "<input>";
let parserCtx := Parser.mkParserContextCore env input fileName;
match Parser.parseHeader env parserCtx with
let inputCtx := Parser.mkInputContext input fileName;
match Parser.parseHeader env inputCtx with
| (header, parserState, messages) => do
(env, messages) ← processHeader header messages parserCtx;
(env, messages) ← processHeader header messages inputCtx;
parserStateRef ← IO.mkRef parserState;
cmdStateRef ← IO.mkRef $ Command.mkState env messages opts;
IO.processCommands parserCtx parserStateRef cmdStateRef;
IO.processCommands inputCtx parserStateRef cmdStateRef;
cmdState ← cmdStateRef.get;
pure (cmdState.env, cmdState.messages)

View file

@ -18,23 +18,23 @@ imports ++ (header.getArg 1).getArgs.toList.map (fun stx =>
let id := stx.getIdAt 2;
{ module := normalizeModuleName id, runtimeOnly := runtime })
def processHeader (header : Syntax) (messages : MessageLog) (ctx : Parser.ParserContextCore) (trustLevel : UInt32 := 0) : IO (Environment × MessageLog) :=
def processHeader (header : Syntax) (messages : MessageLog) (inputCtx : Parser.InputContext) (trustLevel : UInt32 := 0) : IO (Environment × MessageLog) :=
catch
(do env ← importModules (headerToImports header) trustLevel;
pure (env, messages))
(fun e => do
env ← mkEmptyEnvironment;
let spos := header.getPos.getD 0;
let pos := ctx.fileMap.toPosition spos;
pure (env, messages.add { fileName := ctx.fileName, data := toString e, pos := pos }))
let pos := inputCtx.fileMap.toPosition spos;
pure (env, messages.add { fileName := inputCtx.fileName, data := toString e, pos := pos }))
def parseImports (input : String) (fileName : Option String := none) : IO (List Import × Position × MessageLog) := do
env ← mkEmptyEnvironment;
let fileName := fileName.getD "<input>";
let ctx := Parser.mkParserContextCore env input fileName;
match Parser.parseHeader env ctx with
let inputCtx := Parser.mkInputContext input fileName;
match Parser.parseHeader env inputCtx with
| (header, parserState, messages) => do
pure (headerToImports header, ctx.fileMap.toPosition parserState.pos, messages)
pure (headerToImports header, inputCtx.fileMap.toPosition parserState.pos, messages)
@[export lean_parse_imports]
def parseImportsExport (input : String) (fileName : Option String) : IO (List Import × Position × List Message) := do

View file

@ -412,8 +412,7 @@ private unsafe partial def toPreterm : Syntax → TermElabM Expr
@[export lean_parse_expr]
def oldParseExpr (env : Environment) (input : String) (pos : String.Pos) : Except String (Syntax × String.Pos) := do
let c := Parser.mkParserContextCore env input "<foo>";
let c := c.toParserContext env;
let c := Parser.mkParserContext env (Parser.mkInputContext input "<foo>");
let s := Parser.mkParserState c.input;
let s := s.setPos pos;
let s := (Parser.termParser Parser.appPrec : Parser.Parser).fn Parser.appPrec c s;

View file

@ -756,15 +756,12 @@ match expectedType? with
| some expectedType =>
condM (isDefEq ref eType expectedType)
(pure e)
(do -- TODO try `HasCoe`
e ← instantiateMVars ref e;
eType ← instantiateMVars ref eType;
expectedType ← instantiateMVars ref expectedType;
let msg : MessageData :=
"type mismatch" ++ indentExpr e
++ Format.line ++ "has type" ++ indentExpr eType
++ Format.line ++ "but it is expected to have type" ++ indentExpr expectedType;
throwError ref msg)
-- TODO try `HasCoe`
(let msg : MessageData :=
"type mismatch" ++ indentExpr e
++ Format.line ++ "has type" ++ indentExpr eType
++ Format.line ++ "but it is expected to have type" ++ indentExpr expectedType;
throwError ref msg)
def mkInstMVar (ref : Syntax) (type : Expr) : TermElabM Expr := do
mvar ← mkFreshExprMVar ref type MetavarKind.synthetic;

View file

@ -34,16 +34,16 @@ private def mkErrorMessage (c : ParserContext) (pos : String.Pos) (errorMsg : St
let pos := c.fileMap.toPosition pos;
{ fileName := c.fileName, pos := pos, data := errorMsg }
def parseHeader (env : Environment) (c : ParserContextCore) : Syntax × ModuleParserState × MessageLog :=
let c := c.toParserContext env;
let c := Module.updateTokens c;
let s := mkParserState c.input;
let s := whitespace c s;
let s := Module.header.fn (0:Nat) c s;
def parseHeader (env : Environment) (inputCtx : InputContext) : Syntax × ModuleParserState × MessageLog :=
let ctx := mkParserContext env inputCtx;
let ctx := Module.updateTokens ctx;
let s := mkParserState ctx.input;
let s := whitespace ctx s;
let s := Module.header.fn (0:Nat) ctx s;
let stx := s.stxStack.back;
match s.errorMsg with
| some errorMsg =>
let msg := mkErrorMessage c s.pos (toString errorMsg);
let msg := mkErrorMessage ctx s.pos (toString errorMsg);
(stx, { pos := s.pos, recovering := true }, { MessageLog . }.add msg)
| none =>
(stx, { pos := s.pos }, {})
@ -65,12 +65,12 @@ match s.errorMsg with
| some _ => pos + 1
| none => s.pos
partial def parseCommand (env : Environment) (c : ParserContextCore) : ModuleParserState → MessageLog → Syntax × ModuleParserState × MessageLog
partial def parseCommand (env : Environment) (inputCtx : InputContext) : ModuleParserState → MessageLog → Syntax × ModuleParserState × MessageLog
| s@{ pos := pos, recovering := recovering }, messages =>
if c.input.atEnd pos then
if inputCtx.input.atEnd pos then
(mkEOI pos, s, messages)
else
let c := c.toParserContext env;
let c := mkParserContext env inputCtx;
let s := { ParserState . cache := initCacheForInput c.input, pos := pos };
let s := whitespace c s;
let s := (commandParser : Parser).fn (0:Nat) c s;
@ -86,9 +86,9 @@ partial def parseCommand (env : Environment) (c : ParserContextCore) : ModulePar
let messages := messages.add msg;
parseCommand { pos := consumeInput c s.pos, recovering := true } messages
private partial def testModuleParserAux (env : Environment) (c : ParserContextCore) (displayStx : Bool) : ModuleParserState → MessageLog → IO Bool
private partial def testModuleParserAux (env : Environment) (inputCtx : InputContext) (displayStx : Bool) : ModuleParserState → MessageLog → IO Bool
| s, messages =>
match parseCommand env c s messages with
match parseCommand env inputCtx s messages with
| (stx, s, messages) =>
if isEOI stx || isExitCommand stx then do
messages.forM $ fun msg => IO.println msg;
@ -100,14 +100,14 @@ private partial def testModuleParserAux (env : Environment) (c : ParserContextCo
@[export lean_test_module_parser]
def testModuleParser (env : Environment) (input : String) (fileName := "<input>") (displayStx := false) : IO Bool :=
timeit (fileName ++ " parser") $ do
let ctx := mkParserContextCore env input fileName;
let (stx, s, messages) := parseHeader env ctx;
let inputCtx := mkInputContext input fileName;
let (stx, s, messages) := parseHeader env inputCtx;
when displayStx (IO.println stx);
testModuleParserAux env ctx displayStx s messages
testModuleParserAux env inputCtx displayStx s messages
partial def parseFileAux (env : Environment) (ctx : ParserContextCore) : ModuleParserState → MessageLog → Array Syntax → IO Syntax
partial def parseFileAux (env : Environment) (inputCtx : InputContext) : ModuleParserState → MessageLog → Array Syntax → IO Syntax
| state, msgs, stxs =>
match parseCommand env ctx state msgs with
match parseCommand env inputCtx state msgs with
| (stx, state, msgs) =>
if isEOI stx then
if msgs.isEmpty then
@ -122,9 +122,9 @@ partial def parseFileAux (env : Environment) (ctx : ParserContextCore) : ModuleP
def parseFile (env : Environment) (fname : String) : IO Syntax := do
fname ← IO.realPath fname;
contents ← IO.readTextFile fname;
let ctx := mkParserContextCore env contents fname;
let (stx, state, messages) := parseHeader env ctx;
parseFileAux env ctx state messages #[stx]
let inputCtx := mkInputContext contents fname;
let (stx, state, messages) := parseHeader env inputCtx;
parseFileAux env inputCtx state messages #[stx]
end Parser
end Lean

View file

@ -73,17 +73,20 @@ abbrev SyntaxNodeKindSet := PersistentHashMap SyntaxNodeKind Unit
def SyntaxNodeKindSet.insert (s : SyntaxNodeKindSet) (k : SyntaxNodeKind) : SyntaxNodeKindSet :=
s.insert k ()
structure ParserContextCore :=
/-
Input string and related data. Recall that the `FileMap` is a helper structure for mapping
`String.Pos` in the input string to line/column information. -/
structure InputContext :=
(input : String)
(fileName : String)
(fileMap : FileMap)
(tokens : TokenTable)
instance ParserContextCore.inhabited : Inhabited ParserContextCore :=
⟨{ input := "", fileName := "", fileMap := arbitrary _, tokens := {} }⟩
instance InputContext.inhabited : Inhabited InputContext :=
⟨{ input := "", fileName := "", fileMap := arbitrary _ }⟩
structure ParserContext extends ParserContextCore :=
structure ParserContext extends InputContext :=
(env : Environment)
(tokens : TokenTable)
structure Error :=
(unexpected : String := "")
@ -1420,23 +1423,24 @@ def getSyntaxNodeKinds (env : Environment) : List SyntaxNodeKind := do
let s := syntaxNodeKindExtension.getState env;
s.2.foldl (fun ks k _ => k::ks) []
def mkParserContextCore (env : Environment) (input : String) (fileName : String) : ParserContextCore :=
def getTokenTable (env : Environment) : TokenTable :=
(tokenTableAttribute.ext.getState env).2
def mkInputContext (input : String) (fileName : String) : InputContext :=
{ input := input,
fileName := fileName,
fileMap := input.toFileMap,
tokens := (tokenTableAttribute.ext.getState env).2 }
fileMap := input.toFileMap }
@[inline] def ParserContextCore.toParserContext (env : Environment) (ctx : ParserContextCore) : ParserContext :=
{ env := env, toParserContextCore := ctx }
def mkParserContext (env : Environment) (input : String) (fileName : String) : ParserContext :=
(mkParserContextCore env input fileName).toParserContext env
def mkParserContext (env : Environment) (ctx : InputContext) : ParserContext :=
{ toInputContext := ctx,
env := env,
tokens := getTokenTable env }
def mkParserState (input : String) : ParserState :=
{ cache := initCacheForInput input }
def runParser (env : Environment) (tables : ParsingTables) (input : String) (fileName := "<input>") (kind := "<main>") : Except String Syntax :=
let c := mkParserContext env input fileName;
let c := mkParserContext env (mkInputContext input fileName);
let s := mkParserState input;
let s := whitespace c s;
let s := prattParser kind tables (0 : Nat) c s;

View file

@ -370,7 +370,7 @@ let atom : Syntax := Syntax.atom info val;
Syntax.node kind #[atom]
def mkStxStrLit (val : String) (info : Option SourceInfo := none) : Syntax :=
mkStxLit strLitKind val info
mkStxLit strLitKind (repr val) info
def mkStxNumLit (val : String) (info : Option SourceInfo := none) : Syntax :=
mkStxLit numLitKind val info
@ -385,34 +385,14 @@ mkStxNumLit (toString val)
namespace Syntax
def isStrLit? : Syntax → Option String
| Syntax.node k args =>
if k == strLitKind && args.size == 1 then
match args.get! 0 with
| (Syntax.atom _ val) => some val
| _ => none
else
none
| _ => none
def isCharLit? : Syntax → Option Char
| Syntax.node k args =>
if k == charLitKind && args.size == 1 then
match args.get! 0 with
| (Syntax.atom _ val) => some (val.get 1)
| _ => none
else
none
| _ => none
/- Recall that we don't have special Syntax constructors for storing numeric atoms.
/- Recall that we don't have special Syntax constructors for storing numeric and string atoms.
The idea is to have an extensible approach where embedded DSLs may have new kind of atoms and/or
different ways of representing them. So, our atoms contain just the parsed string.
The main Lean parser uses the kind `numLitKind` for storing natural numbers that can be encoded
in binary, octal, decimal and hexadecimal format. `isNatLit` implements a "decoder"
for Syntax objects representing these numerals. -/
private partial def decodeBinLitAux (s : String) : Nat → Nat → Option Nat
private partial def decodeBinLitAux (s : String) : String.Pos → Nat → Option Nat
| i, val =>
if s.atEnd i then some val
else
@ -421,7 +401,7 @@ private partial def decodeBinLitAux (s : String) : Nat → Nat → Option Nat
else if c == '1' then decodeBinLitAux (s.next i) (2*val + 1)
else none
private partial def decodeOctalLitAux (s : String) : Nat → Nat → Option Nat
private partial def decodeOctalLitAux (s : String) : String.Pos → Nat → Option Nat
| i, val =>
if s.atEnd i then some val
else
@ -429,17 +409,22 @@ private partial def decodeOctalLitAux (s : String) : Nat → Nat → Option Nat
if '0' ≤ c && c ≤ '7' then decodeOctalLitAux (s.next i) (8*val + c.toNat - '0'.toNat)
else none
private partial def decodeHexLitAux (s : String) : Nat → Nat → Option Nat
private def decodeHexDigit (s : String) (i : String.Pos) : Option (Nat × String.Pos) :=
let c := s.get i;
let i := s.next i;
if '0' ≤ c && c ≤ '9' then some (c.toNat - '0'.toNat, i)
else if 'a' ≤ c && c ≤ 'f' then some (10 + c.toNat - 'a'.toNat, i)
else if 'A' ≤ c && c ≤ 'F' then some (10 + c.toNat - 'A'.toNat, i)
else none
private partial def decodeHexLitAux (s : String) : String.Pos → Nat → Option Nat
| i, val =>
if s.atEnd i then some val
else
let c := s.get i;
if '0' ≤ c && c ≤ '9' then decodeHexLitAux (s.next i) (16*val + c.toNat - '0'.toNat)
else if 'a' ≤ c && c ≤ 'f' then decodeHexLitAux (s.next i) (16*val + 10 + c.toNat - 'a'.toNat)
else if 'A' ≤ c && c ≤ 'F' then decodeHexLitAux (s.next i) (16*val + 10 + c.toNat - 'A'.toNat)
else none
else match decodeHexDigit s i with
| some (d, i) => decodeHexLitAux i (16*val + d)
| none => none
private partial def decodeDecimalLitAux (s : String) : Nat → Nat → Option Nat
private partial def decodeDecimalLitAux (s : String) : String.Pos → Nat → Option Nat
| i, val =>
if s.atEnd i then some val
else
@ -490,6 +475,70 @@ match stx.isNatLit? with
| some val => val
| none => 0
private def decodeQuotedChar (s : String) (i : String.Pos) : Option (Char × String.Pos) :=
let c := s.get i;
let i := s.next i;
if c == '\\' then pure ('\\', i)
else if c = '\"' then pure ('\"', i)
else if c = '\'' then pure ('\'', i)
else if c = 'n' then pure ('\n', i)
else if c = 't' then pure ('\t', i)
else if c = 'x' then do
(d₁, i) ← decodeHexDigit s i;
(d₂, i) ← decodeHexDigit s i;
pure (Char.ofNat (16*d₁ + d₂), i)
else if c = 'u' then do
(d₁, i) ← decodeHexDigit s i;
(d₂, i) ← decodeHexDigit s i;
(d₃, i) ← decodeHexDigit s i;
(d₄, i) ← decodeHexDigit s i;
pure $ (Char.ofNat (16*(16*(16*d₁ + d₂) + d₃) + d₄), i)
else
none
partial def decodeStrLitAux (s : String) : String.Pos → String → Option String
| i, acc => do
let c := s.get i;
let i := s.next i;
if c == '\"' then
pure acc
else if c == '\\' then do
(c, i) ← decodeQuotedChar s i;
decodeStrLitAux i (acc.push c)
else
decodeStrLitAux i (acc.push c)
def decodeStrLit (s : String) : Option String :=
decodeStrLitAux s 1 ""
def isStrLit? : Syntax → Option String
| Syntax.node k args =>
if k == strLitKind && args.size == 1 then
match args.get! 0 with
| (Syntax.atom _ val) => decodeStrLit val
| _ => none
else
none
| _ => none
def decodeCharLit (s : String) : Option Char :=
let c := s.get 1;
if c == '\\' then do
(c, _) ← decodeQuotedChar s 2;
pure c
else
pure c
def isCharLit? : Syntax → Option Char
| Syntax.node k args =>
if k == charLitKind && args.size == 1 then
match args.get! 0 with
| (Syntax.atom _ val) => decodeCharLit val
| _ => none
else
none
| _ => none
end Syntax
/-- Create an identifier using `SourceInfo` from `src` -/

View file

@ -234,7 +234,6 @@ extern lean_object* l_Lean_Parser_Term_ne___elambda__1___closed__2;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLE(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabMap___closed__3;
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__36;
extern lean_object* l_Lean_strLitKind;
lean_object* l_Lean_Elab_Term_elabMapConst(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabSubtype___lambda__1___closed__12;
extern lean_object* l_Lean_Parser_Term_mul___elambda__1___closed__2;
@ -483,6 +482,7 @@ extern lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__4;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBAnd___closed__1;
lean_object* l_Lean_Elab_Term_elabAnoymousCtor___closed__6;
lean_object* l_Lean_Elab_Term_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkStxStrLit(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabInfix___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_ElabFComp___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_mapConst___elambda__1___closed__1;
@ -542,7 +542,6 @@ lean_object* l_Lean_Elab_Term_elabseqRight___boxed(lean_object*, lean_object*, l
extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNe(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabMul___closed__1;
lean_object* l_Lean_mkStxLit(lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNe___closed__2;
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLT___closed__1;
@ -4385,7 +4384,7 @@ lean_inc(x_21);
lean_dec(x_17);
if (lean_obj_tag(x_21) == 1)
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33;
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32;
lean_dec(x_1);
x_22 = lean_ctor_get(x_16, 1);
lean_inc(x_22);
@ -4394,355 +4393,354 @@ x_23 = lean_ctor_get(x_21, 1);
lean_inc(x_23);
x_24 = l___private_Init_Lean_Elab_Quotation_1__quoteName___main(x_21);
x_25 = lean_box(0);
x_26 = l_Lean_strLitKind;
x_27 = l_Lean_mkStxLit(x_26, x_23, x_25);
x_28 = l_Lean_mkOptionalNode___closed__1;
x_29 = lean_array_push(x_28, x_27);
x_30 = l_Lean_Parser_Term_str___elambda__1___closed__2;
x_31 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_31, 0, x_30);
lean_ctor_set(x_31, 1, x_29);
x_32 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_22);
x_26 = l_Lean_mkStxStrLit(x_23, x_25);
x_27 = l_Lean_mkOptionalNode___closed__1;
x_28 = lean_array_push(x_27, x_26);
x_29 = l_Lean_Parser_Term_str___elambda__1___closed__2;
x_30 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_30, 0, x_29);
lean_ctor_set(x_30, 1, x_28);
x_31 = l_Lean_Elab_Term_getCurrMacroScope(x_2, x_22);
lean_dec(x_2);
x_33 = !lean_is_exclusive(x_32);
if (x_33 == 0)
x_32 = !lean_is_exclusive(x_31);
if (x_32 == 0)
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124;
x_34 = lean_ctor_get(x_32, 0);
x_35 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__13;
lean_inc(x_34);
x_36 = lean_name_mk_numeral(x_35, x_34);
x_37 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__10;
x_38 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__15;
x_39 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_39, 0, x_25);
lean_ctor_set(x_39, 1, x_37);
lean_ctor_set(x_39, 2, x_36);
lean_ctor_set(x_39, 3, x_38);
x_40 = l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1;
x_41 = lean_array_push(x_40, x_39);
x_42 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5;
x_43 = lean_array_push(x_41, x_42);
x_44 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_45 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_45, 0, x_44);
lean_ctor_set(x_45, 1, x_43);
x_46 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__20;
lean_inc(x_34);
x_47 = lean_name_mk_numeral(x_46, x_34);
x_48 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__18;
x_49 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__22;
x_50 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_50, 0, x_25);
lean_ctor_set(x_50, 1, x_48);
lean_ctor_set(x_50, 2, x_47);
lean_ctor_set(x_50, 3, x_49);
x_51 = lean_array_push(x_40, x_50);
x_52 = lean_array_push(x_51, x_42);
x_53 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_53, 0, x_44);
lean_ctor_set(x_53, 1, x_52);
x_54 = lean_array_push(x_40, x_53);
x_55 = lean_array_push(x_54, x_31);
x_56 = l_Lean_Parser_Term_app___elambda__1___closed__2;
x_57 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_57, 0, x_56);
lean_ctor_set(x_57, 1, x_55);
x_58 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__26;
lean_inc(x_34);
x_59 = lean_name_mk_numeral(x_58, x_34);
x_60 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__25;
x_61 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__29;
x_62 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_62, 0, x_25);
lean_ctor_set(x_62, 1, x_60);
lean_ctor_set(x_62, 2, x_59);
lean_ctor_set(x_62, 3, x_61);
x_63 = lean_array_push(x_40, x_62);
x_64 = lean_array_push(x_63, x_42);
x_65 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_65, 0, x_44);
lean_ctor_set(x_65, 1, x_64);
x_66 = lean_array_push(x_40, x_65);
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123;
x_33 = lean_ctor_get(x_31, 0);
x_34 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__13;
lean_inc(x_33);
x_35 = lean_name_mk_numeral(x_34, x_33);
x_36 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__10;
x_37 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__15;
x_38 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_38, 0, x_25);
lean_ctor_set(x_38, 1, x_36);
lean_ctor_set(x_38, 2, x_35);
lean_ctor_set(x_38, 3, x_37);
x_39 = l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1;
x_40 = lean_array_push(x_39, x_38);
x_41 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5;
x_42 = lean_array_push(x_40, x_41);
x_43 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_44 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_44, 0, x_43);
lean_ctor_set(x_44, 1, x_42);
x_45 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__20;
lean_inc(x_33);
x_46 = lean_name_mk_numeral(x_45, x_33);
x_47 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__18;
x_48 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__22;
x_49 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_49, 0, x_25);
lean_ctor_set(x_49, 1, x_47);
lean_ctor_set(x_49, 2, x_46);
lean_ctor_set(x_49, 3, x_48);
x_50 = lean_array_push(x_39, x_49);
x_51 = lean_array_push(x_50, x_41);
x_52 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_52, 0, x_43);
lean_ctor_set(x_52, 1, x_51);
x_53 = lean_array_push(x_39, x_52);
x_54 = lean_array_push(x_53, x_30);
x_55 = l_Lean_Parser_Term_app___elambda__1___closed__2;
x_56 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_56, 0, x_55);
lean_ctor_set(x_56, 1, x_54);
x_57 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__26;
lean_inc(x_33);
x_58 = lean_name_mk_numeral(x_57, x_33);
x_59 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__25;
x_60 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__29;
x_61 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_61, 0, x_25);
lean_ctor_set(x_61, 1, x_59);
lean_ctor_set(x_61, 2, x_58);
lean_ctor_set(x_61, 3, x_60);
x_62 = lean_array_push(x_39, x_61);
x_63 = lean_array_push(x_62, x_41);
x_64 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_64, 0, x_43);
lean_ctor_set(x_64, 1, x_63);
x_65 = lean_array_push(x_39, x_64);
lean_inc(x_24);
x_67 = lean_array_push(x_66, x_24);
x_68 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_68, 0, x_56);
lean_ctor_set(x_68, 1, x_67);
x_69 = lean_array_push(x_40, x_68);
x_70 = lean_array_push(x_69, x_42);
x_71 = l_Lean_nullKind___closed__2;
x_72 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_72, 0, x_71);
lean_ctor_set(x_72, 1, x_70);
x_73 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__64;
x_74 = lean_array_push(x_73, x_72);
x_75 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__63;
x_76 = lean_array_push(x_74, x_75);
x_77 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_78 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_78, 0, x_77);
lean_ctor_set(x_78, 1, x_76);
x_79 = lean_array_push(x_40, x_57);
x_80 = lean_array_push(x_79, x_78);
x_81 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_81, 0, x_56);
lean_ctor_set(x_81, 1, x_80);
x_82 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__32;
lean_inc(x_34);
x_83 = lean_name_mk_numeral(x_82, x_34);
x_84 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__31;
x_85 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__34;
x_86 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_86, 0, x_25);
lean_ctor_set(x_86, 1, x_84);
lean_ctor_set(x_86, 2, x_83);
lean_ctor_set(x_86, 3, x_85);
x_87 = lean_array_push(x_40, x_86);
x_88 = lean_array_push(x_87, x_42);
x_89 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_89, 0, x_44);
lean_ctor_set(x_89, 1, x_88);
x_90 = lean_array_push(x_40, x_81);
x_91 = lean_array_push(x_90, x_89);
x_92 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_92, 0, x_56);
lean_ctor_set(x_92, 1, x_91);
x_93 = lean_array_push(x_40, x_92);
x_94 = lean_array_push(x_93, x_42);
x_95 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_95, 0, x_71);
lean_ctor_set(x_95, 1, x_94);
x_96 = lean_array_push(x_73, x_95);
x_97 = lean_array_push(x_96, x_75);
x_98 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_98, 0, x_77);
lean_ctor_set(x_98, 1, x_97);
x_99 = lean_array_push(x_40, x_45);
x_100 = lean_array_push(x_99, x_98);
x_101 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_101, 0, x_56);
lean_ctor_set(x_101, 1, x_100);
x_102 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__39;
x_103 = lean_name_mk_numeral(x_102, x_34);
x_104 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__37;
x_105 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__41;
x_106 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_106, 0, x_25);
lean_ctor_set(x_106, 1, x_104);
lean_ctor_set(x_106, 2, x_103);
lean_ctor_set(x_106, 3, x_105);
x_107 = lean_array_push(x_40, x_106);
x_108 = lean_array_push(x_107, x_42);
x_109 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_109, 0, x_44);
lean_ctor_set(x_109, 1, x_108);
x_110 = lean_array_push(x_40, x_109);
x_111 = lean_array_push(x_110, x_24);
x_112 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_112, 0, x_56);
lean_ctor_set(x_112, 1, x_111);
x_113 = lean_array_push(x_40, x_112);
x_114 = lean_array_push(x_113, x_15);
x_115 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_115, 0, x_56);
lean_ctor_set(x_115, 1, x_114);
x_116 = lean_array_push(x_40, x_115);
x_117 = lean_array_push(x_116, x_42);
x_118 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_118, 0, x_71);
lean_ctor_set(x_118, 1, x_117);
x_119 = lean_array_push(x_73, x_118);
x_120 = lean_array_push(x_119, x_75);
x_121 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_121, 0, x_77);
lean_ctor_set(x_121, 1, x_120);
x_122 = lean_array_push(x_40, x_101);
x_123 = lean_array_push(x_122, x_121);
x_124 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_124, 0, x_56);
lean_ctor_set(x_124, 1, x_123);
lean_ctor_set(x_32, 0, x_124);
return x_32;
x_66 = lean_array_push(x_65, x_24);
x_67 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_67, 0, x_55);
lean_ctor_set(x_67, 1, x_66);
x_68 = lean_array_push(x_39, x_67);
x_69 = lean_array_push(x_68, x_41);
x_70 = l_Lean_nullKind___closed__2;
x_71 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_71, 0, x_70);
lean_ctor_set(x_71, 1, x_69);
x_72 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__64;
x_73 = lean_array_push(x_72, x_71);
x_74 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__63;
x_75 = lean_array_push(x_73, x_74);
x_76 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_77 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_77, 0, x_76);
lean_ctor_set(x_77, 1, x_75);
x_78 = lean_array_push(x_39, x_56);
x_79 = lean_array_push(x_78, x_77);
x_80 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_80, 0, x_55);
lean_ctor_set(x_80, 1, x_79);
x_81 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__32;
lean_inc(x_33);
x_82 = lean_name_mk_numeral(x_81, x_33);
x_83 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__31;
x_84 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__34;
x_85 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_85, 0, x_25);
lean_ctor_set(x_85, 1, x_83);
lean_ctor_set(x_85, 2, x_82);
lean_ctor_set(x_85, 3, x_84);
x_86 = lean_array_push(x_39, x_85);
x_87 = lean_array_push(x_86, x_41);
x_88 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_88, 0, x_43);
lean_ctor_set(x_88, 1, x_87);
x_89 = lean_array_push(x_39, x_80);
x_90 = lean_array_push(x_89, x_88);
x_91 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_91, 0, x_55);
lean_ctor_set(x_91, 1, x_90);
x_92 = lean_array_push(x_39, x_91);
x_93 = lean_array_push(x_92, x_41);
x_94 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_94, 0, x_70);
lean_ctor_set(x_94, 1, x_93);
x_95 = lean_array_push(x_72, x_94);
x_96 = lean_array_push(x_95, x_74);
x_97 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_97, 0, x_76);
lean_ctor_set(x_97, 1, x_96);
x_98 = lean_array_push(x_39, x_44);
x_99 = lean_array_push(x_98, x_97);
x_100 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_100, 0, x_55);
lean_ctor_set(x_100, 1, x_99);
x_101 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__39;
x_102 = lean_name_mk_numeral(x_101, x_33);
x_103 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__37;
x_104 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__41;
x_105 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_105, 0, x_25);
lean_ctor_set(x_105, 1, x_103);
lean_ctor_set(x_105, 2, x_102);
lean_ctor_set(x_105, 3, x_104);
x_106 = lean_array_push(x_39, x_105);
x_107 = lean_array_push(x_106, x_41);
x_108 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_108, 0, x_43);
lean_ctor_set(x_108, 1, x_107);
x_109 = lean_array_push(x_39, x_108);
x_110 = lean_array_push(x_109, x_24);
x_111 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_111, 0, x_55);
lean_ctor_set(x_111, 1, x_110);
x_112 = lean_array_push(x_39, x_111);
x_113 = lean_array_push(x_112, x_15);
x_114 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_114, 0, x_55);
lean_ctor_set(x_114, 1, x_113);
x_115 = lean_array_push(x_39, x_114);
x_116 = lean_array_push(x_115, x_41);
x_117 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_117, 0, x_70);
lean_ctor_set(x_117, 1, x_116);
x_118 = lean_array_push(x_72, x_117);
x_119 = lean_array_push(x_118, x_74);
x_120 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_120, 0, x_76);
lean_ctor_set(x_120, 1, x_119);
x_121 = lean_array_push(x_39, x_100);
x_122 = lean_array_push(x_121, x_120);
x_123 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_123, 0, x_55);
lean_ctor_set(x_123, 1, x_122);
lean_ctor_set(x_31, 0, x_123);
return x_31;
}
else
{
lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217;
x_125 = lean_ctor_get(x_32, 0);
x_126 = lean_ctor_get(x_32, 1);
lean_inc(x_126);
lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216;
x_124 = lean_ctor_get(x_31, 0);
x_125 = lean_ctor_get(x_31, 1);
lean_inc(x_125);
lean_dec(x_32);
x_127 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__13;
lean_inc(x_125);
x_128 = lean_name_mk_numeral(x_127, x_125);
x_129 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__10;
x_130 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__15;
x_131 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_131, 0, x_25);
lean_ctor_set(x_131, 1, x_129);
lean_ctor_set(x_131, 2, x_128);
lean_ctor_set(x_131, 3, x_130);
x_132 = l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1;
x_133 = lean_array_push(x_132, x_131);
x_134 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5;
x_135 = lean_array_push(x_133, x_134);
x_136 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_137 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_137, 0, x_136);
lean_ctor_set(x_137, 1, x_135);
x_138 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__20;
lean_inc(x_125);
x_139 = lean_name_mk_numeral(x_138, x_125);
x_140 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__18;
x_141 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__22;
x_142 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_142, 0, x_25);
lean_ctor_set(x_142, 1, x_140);
lean_ctor_set(x_142, 2, x_139);
lean_ctor_set(x_142, 3, x_141);
x_143 = lean_array_push(x_132, x_142);
x_144 = lean_array_push(x_143, x_134);
x_145 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_145, 0, x_136);
lean_ctor_set(x_145, 1, x_144);
x_146 = lean_array_push(x_132, x_145);
x_147 = lean_array_push(x_146, x_31);
x_148 = l_Lean_Parser_Term_app___elambda__1___closed__2;
x_149 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_149, 0, x_148);
lean_ctor_set(x_149, 1, x_147);
x_150 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__26;
lean_inc(x_125);
x_151 = lean_name_mk_numeral(x_150, x_125);
x_152 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__25;
x_153 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__29;
x_154 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_154, 0, x_25);
lean_ctor_set(x_154, 1, x_152);
lean_ctor_set(x_154, 2, x_151);
lean_ctor_set(x_154, 3, x_153);
x_155 = lean_array_push(x_132, x_154);
x_156 = lean_array_push(x_155, x_134);
x_157 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_157, 0, x_136);
lean_ctor_set(x_157, 1, x_156);
x_158 = lean_array_push(x_132, x_157);
lean_inc(x_124);
lean_dec(x_31);
x_126 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__13;
lean_inc(x_124);
x_127 = lean_name_mk_numeral(x_126, x_124);
x_128 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__10;
x_129 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__15;
x_130 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_130, 0, x_25);
lean_ctor_set(x_130, 1, x_128);
lean_ctor_set(x_130, 2, x_127);
lean_ctor_set(x_130, 3, x_129);
x_131 = l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1;
x_132 = lean_array_push(x_131, x_130);
x_133 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5;
x_134 = lean_array_push(x_132, x_133);
x_135 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_136 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_136, 0, x_135);
lean_ctor_set(x_136, 1, x_134);
x_137 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__20;
lean_inc(x_124);
x_138 = lean_name_mk_numeral(x_137, x_124);
x_139 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__18;
x_140 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__22;
x_141 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_141, 0, x_25);
lean_ctor_set(x_141, 1, x_139);
lean_ctor_set(x_141, 2, x_138);
lean_ctor_set(x_141, 3, x_140);
x_142 = lean_array_push(x_131, x_141);
x_143 = lean_array_push(x_142, x_133);
x_144 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_144, 0, x_135);
lean_ctor_set(x_144, 1, x_143);
x_145 = lean_array_push(x_131, x_144);
x_146 = lean_array_push(x_145, x_30);
x_147 = l_Lean_Parser_Term_app___elambda__1___closed__2;
x_148 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_148, 0, x_147);
lean_ctor_set(x_148, 1, x_146);
x_149 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__26;
lean_inc(x_124);
x_150 = lean_name_mk_numeral(x_149, x_124);
x_151 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__25;
x_152 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__29;
x_153 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_153, 0, x_25);
lean_ctor_set(x_153, 1, x_151);
lean_ctor_set(x_153, 2, x_150);
lean_ctor_set(x_153, 3, x_152);
x_154 = lean_array_push(x_131, x_153);
x_155 = lean_array_push(x_154, x_133);
x_156 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_156, 0, x_135);
lean_ctor_set(x_156, 1, x_155);
x_157 = lean_array_push(x_131, x_156);
lean_inc(x_24);
x_159 = lean_array_push(x_158, x_24);
x_160 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_160, 0, x_148);
lean_ctor_set(x_160, 1, x_159);
x_161 = lean_array_push(x_132, x_160);
x_162 = lean_array_push(x_161, x_134);
x_163 = l_Lean_nullKind___closed__2;
x_164 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_164, 0, x_163);
lean_ctor_set(x_164, 1, x_162);
x_165 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__64;
x_166 = lean_array_push(x_165, x_164);
x_167 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__63;
x_168 = lean_array_push(x_166, x_167);
x_169 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_170 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_170, 0, x_169);
lean_ctor_set(x_170, 1, x_168);
x_171 = lean_array_push(x_132, x_149);
x_172 = lean_array_push(x_171, x_170);
x_173 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_173, 0, x_148);
lean_ctor_set(x_173, 1, x_172);
x_174 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__32;
lean_inc(x_125);
x_175 = lean_name_mk_numeral(x_174, x_125);
x_176 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__31;
x_177 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__34;
x_178 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_178, 0, x_25);
lean_ctor_set(x_178, 1, x_176);
lean_ctor_set(x_178, 2, x_175);
lean_ctor_set(x_178, 3, x_177);
x_179 = lean_array_push(x_132, x_178);
x_180 = lean_array_push(x_179, x_134);
x_181 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_181, 0, x_136);
lean_ctor_set(x_181, 1, x_180);
x_182 = lean_array_push(x_132, x_173);
x_183 = lean_array_push(x_182, x_181);
x_184 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_184, 0, x_148);
lean_ctor_set(x_184, 1, x_183);
x_185 = lean_array_push(x_132, x_184);
x_186 = lean_array_push(x_185, x_134);
x_187 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_187, 0, x_163);
lean_ctor_set(x_187, 1, x_186);
x_188 = lean_array_push(x_165, x_187);
x_189 = lean_array_push(x_188, x_167);
x_190 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_190, 0, x_169);
lean_ctor_set(x_190, 1, x_189);
x_191 = lean_array_push(x_132, x_137);
x_192 = lean_array_push(x_191, x_190);
x_193 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_193, 0, x_148);
lean_ctor_set(x_193, 1, x_192);
x_194 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__39;
x_195 = lean_name_mk_numeral(x_194, x_125);
x_196 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__37;
x_197 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__41;
x_198 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_198, 0, x_25);
lean_ctor_set(x_198, 1, x_196);
lean_ctor_set(x_198, 2, x_195);
lean_ctor_set(x_198, 3, x_197);
x_199 = lean_array_push(x_132, x_198);
x_200 = lean_array_push(x_199, x_134);
x_201 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_201, 0, x_136);
lean_ctor_set(x_201, 1, x_200);
x_202 = lean_array_push(x_132, x_201);
x_203 = lean_array_push(x_202, x_24);
x_204 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_204, 0, x_148);
lean_ctor_set(x_204, 1, x_203);
x_205 = lean_array_push(x_132, x_204);
x_206 = lean_array_push(x_205, x_15);
x_207 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_207, 0, x_148);
lean_ctor_set(x_207, 1, x_206);
x_208 = lean_array_push(x_132, x_207);
x_209 = lean_array_push(x_208, x_134);
x_210 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_210, 0, x_163);
lean_ctor_set(x_210, 1, x_209);
x_211 = lean_array_push(x_165, x_210);
x_212 = lean_array_push(x_211, x_167);
x_213 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_213, 0, x_169);
lean_ctor_set(x_213, 1, x_212);
x_214 = lean_array_push(x_132, x_193);
x_215 = lean_array_push(x_214, x_213);
x_216 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_216, 0, x_148);
lean_ctor_set(x_216, 1, x_215);
x_217 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_217, 0, x_216);
lean_ctor_set(x_217, 1, x_126);
return x_217;
x_158 = lean_array_push(x_157, x_24);
x_159 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_159, 0, x_147);
lean_ctor_set(x_159, 1, x_158);
x_160 = lean_array_push(x_131, x_159);
x_161 = lean_array_push(x_160, x_133);
x_162 = l_Lean_nullKind___closed__2;
x_163 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_163, 0, x_162);
lean_ctor_set(x_163, 1, x_161);
x_164 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__64;
x_165 = lean_array_push(x_164, x_163);
x_166 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__63;
x_167 = lean_array_push(x_165, x_166);
x_168 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
x_169 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_169, 0, x_168);
lean_ctor_set(x_169, 1, x_167);
x_170 = lean_array_push(x_131, x_148);
x_171 = lean_array_push(x_170, x_169);
x_172 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_172, 0, x_147);
lean_ctor_set(x_172, 1, x_171);
x_173 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__32;
lean_inc(x_124);
x_174 = lean_name_mk_numeral(x_173, x_124);
x_175 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__31;
x_176 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__34;
x_177 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_177, 0, x_25);
lean_ctor_set(x_177, 1, x_175);
lean_ctor_set(x_177, 2, x_174);
lean_ctor_set(x_177, 3, x_176);
x_178 = lean_array_push(x_131, x_177);
x_179 = lean_array_push(x_178, x_133);
x_180 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_180, 0, x_135);
lean_ctor_set(x_180, 1, x_179);
x_181 = lean_array_push(x_131, x_172);
x_182 = lean_array_push(x_181, x_180);
x_183 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_183, 0, x_147);
lean_ctor_set(x_183, 1, x_182);
x_184 = lean_array_push(x_131, x_183);
x_185 = lean_array_push(x_184, x_133);
x_186 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_186, 0, x_162);
lean_ctor_set(x_186, 1, x_185);
x_187 = lean_array_push(x_164, x_186);
x_188 = lean_array_push(x_187, x_166);
x_189 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_189, 0, x_168);
lean_ctor_set(x_189, 1, x_188);
x_190 = lean_array_push(x_131, x_136);
x_191 = lean_array_push(x_190, x_189);
x_192 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_192, 0, x_147);
lean_ctor_set(x_192, 1, x_191);
x_193 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__39;
x_194 = lean_name_mk_numeral(x_193, x_124);
x_195 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__37;
x_196 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__41;
x_197 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_197, 0, x_25);
lean_ctor_set(x_197, 1, x_195);
lean_ctor_set(x_197, 2, x_194);
lean_ctor_set(x_197, 3, x_196);
x_198 = lean_array_push(x_131, x_197);
x_199 = lean_array_push(x_198, x_133);
x_200 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_200, 0, x_135);
lean_ctor_set(x_200, 1, x_199);
x_201 = lean_array_push(x_131, x_200);
x_202 = lean_array_push(x_201, x_24);
x_203 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_203, 0, x_147);
lean_ctor_set(x_203, 1, x_202);
x_204 = lean_array_push(x_131, x_203);
x_205 = lean_array_push(x_204, x_15);
x_206 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_206, 0, x_147);
lean_ctor_set(x_206, 1, x_205);
x_207 = lean_array_push(x_131, x_206);
x_208 = lean_array_push(x_207, x_133);
x_209 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_209, 0, x_162);
lean_ctor_set(x_209, 1, x_208);
x_210 = lean_array_push(x_164, x_209);
x_211 = lean_array_push(x_210, x_166);
x_212 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_212, 0, x_168);
lean_ctor_set(x_212, 1, x_211);
x_213 = lean_array_push(x_131, x_192);
x_214 = lean_array_push(x_213, x_212);
x_215 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_215, 0, x_147);
lean_ctor_set(x_215, 1, x_214);
x_216 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_216, 0, x_215);
lean_ctor_set(x_216, 1, x_125);
return x_216;
}
}
else
{
lean_object* x_218; lean_object* x_219; lean_object* x_220;
lean_object* x_217; lean_object* x_218; lean_object* x_219;
lean_dec(x_21);
lean_dec(x_15);
x_218 = lean_ctor_get(x_16, 1);
lean_inc(x_218);
x_217 = lean_ctor_get(x_16, 1);
lean_inc(x_217);
lean_dec(x_16);
x_219 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__7;
x_220 = l_Lean_Elab_Term_throwError___rarg(x_1, x_219, x_2, x_218);
return x_220;
x_218 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__7;
x_219 = l_Lean_Elab_Term_throwError___rarg(x_1, x_218, x_2, x_217);
return x_219;
}
}
}

View file

@ -13,7 +13,6 @@
#ifdef __cplusplus
extern "C" {
#endif
lean_object* l_Lean_Parser_mkParserContextCore(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_getCommandState___closed__1;
lean_object* l_unreachable_x21___rarg(lean_object*);
lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*);
@ -22,10 +21,12 @@ extern lean_object* l_Lean_Parser_ModuleParserState_inhabited___closed__1;
extern lean_object* l_EIO_Monad___closed__1;
lean_object* l_Lean_Elab_IO_processCommands(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_runFrontend(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommandsAux___rarg___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_liftIOCore_x21(lean_object*);
lean_object* lean_io_mk_ref(lean_object*, lean_object*);
lean_object* lean_io_ref_get(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_runCommandElabM___closed__1;
lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_runCommandElabM(lean_object*, lean_object*, lean_object*);
lean_object* l_PersistentArray_forM___at___private_Init_Lean_Parser_Module_4__testModuleParserAux___main___spec__6(lean_object*, lean_object*, lean_object*);
lean_object* l_PersistentArray_push___rarg(lean_object*, lean_object*);
@ -34,6 +35,7 @@ lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___rarg(lean_object*,
lean_object* l_Lean_Elab_processHeader(lean_object*, lean_object*, lean_object*, uint32_t, lean_object*);
extern lean_object* l_Lean_Elab_parseImports___closed__1;
lean_object* l_Lean_MessageLog_toList(lean_object*);
lean_object* l_Lean_Elab_Frontend_getInputContext___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_setParserState___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_object*, lean_object*);
@ -51,8 +53,10 @@ lean_object* lean_run_frontend(lean_object*, lean_object*, lean_object*, lean_ob
lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___boxed(lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommandsAux(lean_object*);
lean_object* l_Lean_Elab_Frontend_elabCommandAtFrontend___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommand___boxed(lean_object*, lean_object*);
uint8_t l_Lean_Parser_isExitCommand(lean_object*);
extern lean_object* l___private_Init_Lean_Parser_Module_4__testModuleParserAux___main___closed__1;
lean_object* l_Lean_Elab_Frontend_getInputContext(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_getCommandState(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_getParserState(lean_object*, lean_object*);
lean_object* lean_process_input(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -71,10 +75,12 @@ uint8_t l_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(lean_obj
extern lean_object* l_Nat_Inhabited;
lean_object* l_Lean_Elab_Frontend_getParserState___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Elab_process(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommands___boxed(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommands(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_getCommandState___boxed(lean_object*, lean_object*);
lean_object* l_monadInhabited___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___rarg___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Frontend_liftIOCore_x21___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
@ -1317,6 +1323,27 @@ lean_dec(x_2);
return x_4;
}
}
lean_object* l_Lean_Elab_Frontend_getInputContext(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4;
x_3 = lean_ctor_get(x_1, 3);
lean_inc(x_3);
x_4 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_4, 0, x_3);
lean_ctor_set(x_4, 1, x_2);
return x_4;
}
}
lean_object* l_Lean_Elab_Frontend_getInputContext___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_Frontend_getInputContext(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Elab_Frontend_processCommand(lean_object* x_1, lean_object* x_2) {
_start:
{
@ -1340,358 +1367,359 @@ lean_dec(x_5);
x_8 = l_Lean_Elab_Frontend_getParserState(x_1, x_7);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 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_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 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;
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
x_10 = lean_ctor_get(x_8, 1);
lean_inc(x_10);
lean_dec(x_8);
x_11 = lean_ctor_get(x_6, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_1, 3);
x_11 = l_Lean_Elab_Frontend_getInputContext(x_1, x_10);
x_12 = lean_ctor_get(x_11, 0);
lean_inc(x_12);
x_13 = lean_ctor_get(x_6, 1);
x_13 = lean_ctor_get(x_11, 1);
lean_inc(x_13);
lean_dec(x_6);
x_14 = l_Lean_Parser_parseCommand___main(x_11, x_12, x_9, x_13);
x_15 = lean_ctor_get(x_14, 1);
lean_dec(x_11);
x_14 = lean_ctor_get(x_6, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_6, 1);
lean_inc(x_15);
x_16 = lean_ctor_get(x_14, 0);
lean_inc(x_16);
lean_dec(x_14);
x_17 = lean_ctor_get(x_15, 0);
lean_dec(x_6);
x_16 = l_Lean_Parser_parseCommand___main(x_14, x_12, x_9, x_15);
x_17 = lean_ctor_get(x_16, 1);
lean_inc(x_17);
x_18 = lean_ctor_get(x_15, 1);
x_18 = lean_ctor_get(x_16, 0);
lean_inc(x_18);
lean_dec(x_15);
x_19 = l_Lean_Elab_Frontend_setParserState(x_17, x_1, x_10);
if (lean_obj_tag(x_19) == 0)
{
lean_object* x_20; lean_object* x_21;
x_20 = lean_ctor_get(x_19, 1);
lean_dec(x_16);
x_19 = lean_ctor_get(x_17, 0);
lean_inc(x_19);
x_20 = lean_ctor_get(x_17, 1);
lean_inc(x_20);
lean_dec(x_19);
x_21 = l_Lean_Elab_Frontend_setMessages(x_18, x_1, x_20);
lean_dec(x_17);
x_21 = l_Lean_Elab_Frontend_setParserState(x_19, x_1, x_13);
if (lean_obj_tag(x_21) == 0)
{
uint8_t x_22;
x_22 = !lean_is_exclusive(x_21);
if (x_22 == 0)
lean_object* x_22; lean_object* x_23;
x_22 = lean_ctor_get(x_21, 1);
lean_inc(x_22);
lean_dec(x_21);
x_23 = l_Lean_Elab_Frontend_setMessages(x_20, x_1, x_22);
if (lean_obj_tag(x_23) == 0)
{
lean_object* x_23; lean_object* x_24; uint8_t x_25;
x_23 = lean_ctor_get(x_21, 1);
x_24 = lean_ctor_get(x_21, 0);
lean_dec(x_24);
lean_inc(x_16);
x_25 = l_Lean_Parser_isEOI(x_16);
if (x_25 == 0)
uint8_t x_24;
x_24 = !lean_is_exclusive(x_23);
if (x_24 == 0)
{
uint8_t x_26;
lean_inc(x_16);
x_26 = l_Lean_Parser_isExitCommand(x_16);
if (x_26 == 0)
{
lean_object* x_27;
lean_free_object(x_21);
x_27 = l_Lean_Elab_Frontend_elabCommandAtFrontend(x_16, x_1, x_23);
lean_dec(x_1);
if (lean_obj_tag(x_27) == 0)
lean_object* x_25; lean_object* x_26; uint8_t x_27;
x_25 = lean_ctor_get(x_23, 1);
x_26 = lean_ctor_get(x_23, 0);
lean_dec(x_26);
lean_inc(x_18);
x_27 = l_Lean_Parser_isEOI(x_18);
if (x_27 == 0)
{
uint8_t x_28;
x_28 = !lean_is_exclusive(x_27);
lean_inc(x_18);
x_28 = l_Lean_Parser_isExitCommand(x_18);
if (x_28 == 0)
{
lean_object* x_29; uint8_t x_30; lean_object* x_31;
x_29 = lean_ctor_get(x_27, 0);
lean_object* x_29;
lean_free_object(x_23);
x_29 = l_Lean_Elab_Frontend_elabCommandAtFrontend(x_18, x_1, x_25);
if (lean_obj_tag(x_29) == 0)
{
uint8_t x_30;
x_30 = !lean_is_exclusive(x_29);
if (x_30 == 0)
{
lean_object* x_31; uint8_t x_32; lean_object* x_33;
x_31 = lean_ctor_get(x_29, 0);
lean_dec(x_31);
x_32 = 0;
x_33 = lean_box(x_32);
lean_ctor_set(x_29, 0, x_33);
return x_29;
}
else
{
lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37;
x_34 = lean_ctor_get(x_29, 1);
lean_inc(x_34);
lean_dec(x_29);
x_30 = 0;
x_31 = lean_box(x_30);
lean_ctor_set(x_27, 0, x_31);
return x_27;
}
else
{
lean_object* x_32; uint8_t x_33; lean_object* x_34; lean_object* x_35;
x_32 = lean_ctor_get(x_27, 1);
lean_inc(x_32);
lean_dec(x_27);
x_33 = 0;
x_34 = lean_box(x_33);
x_35 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_35, 0, x_34);
lean_ctor_set(x_35, 1, x_32);
return x_35;
x_35 = 0;
x_36 = lean_box(x_35);
x_37 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_34);
return x_37;
}
}
else
{
uint8_t x_36;
x_36 = !lean_is_exclusive(x_27);
if (x_36 == 0)
uint8_t x_38;
x_38 = !lean_is_exclusive(x_29);
if (x_38 == 0)
{
return x_27;
return x_29;
}
else
{
lean_object* x_37; lean_object* x_38; lean_object* x_39;
x_37 = lean_ctor_get(x_27, 0);
x_38 = lean_ctor_get(x_27, 1);
lean_inc(x_38);
lean_inc(x_37);
lean_dec(x_27);
x_39 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_39, 0, x_37);
lean_ctor_set(x_39, 1, x_38);
return x_39;
lean_object* x_39; lean_object* x_40; lean_object* x_41;
x_39 = lean_ctor_get(x_29, 0);
x_40 = lean_ctor_get(x_29, 1);
lean_inc(x_40);
lean_inc(x_39);
lean_dec(x_29);
x_41 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_41, 0, x_39);
lean_ctor_set(x_41, 1, x_40);
return x_41;
}
}
}
else
{
uint8_t x_40; lean_object* x_41;
lean_dec(x_16);
lean_dec(x_1);
x_40 = 1;
x_41 = lean_box(x_40);
lean_ctor_set(x_21, 0, x_41);
return x_21;
}
}
else
{
uint8_t x_42; lean_object* x_43;
lean_dec(x_16);
lean_dec(x_1);
lean_dec(x_18);
x_42 = 1;
x_43 = lean_box(x_42);
lean_ctor_set(x_21, 0, x_43);
return x_21;
lean_ctor_set(x_23, 0, x_43);
return x_23;
}
}
else
{
lean_object* x_44; uint8_t x_45;
x_44 = lean_ctor_get(x_21, 1);
lean_inc(x_44);
lean_dec(x_21);
lean_inc(x_16);
x_45 = l_Lean_Parser_isEOI(x_16);
if (x_45 == 0)
{
uint8_t x_46;
lean_inc(x_16);
x_46 = l_Lean_Parser_isExitCommand(x_16);
if (x_46 == 0)
{
lean_object* x_47;
x_47 = l_Lean_Elab_Frontend_elabCommandAtFrontend(x_16, x_1, x_44);
lean_dec(x_1);
if (lean_obj_tag(x_47) == 0)
{
lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52;
x_48 = lean_ctor_get(x_47, 1);
lean_inc(x_48);
if (lean_is_exclusive(x_47)) {
lean_ctor_release(x_47, 0);
lean_ctor_release(x_47, 1);
x_49 = x_47;
} else {
lean_dec_ref(x_47);
x_49 = lean_box(0);
}
x_50 = 0;
x_51 = lean_box(x_50);
if (lean_is_scalar(x_49)) {
x_52 = lean_alloc_ctor(0, 2, 0);
} else {
x_52 = x_49;
}
lean_ctor_set(x_52, 0, x_51);
lean_ctor_set(x_52, 1, x_48);
return x_52;
}
else
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56;
x_53 = lean_ctor_get(x_47, 0);
lean_inc(x_53);
x_54 = lean_ctor_get(x_47, 1);
lean_inc(x_54);
if (lean_is_exclusive(x_47)) {
lean_ctor_release(x_47, 0);
lean_ctor_release(x_47, 1);
x_55 = x_47;
} else {
lean_dec_ref(x_47);
x_55 = lean_box(0);
}
if (lean_is_scalar(x_55)) {
x_56 = lean_alloc_ctor(1, 2, 0);
} else {
x_56 = x_55;
}
lean_ctor_set(x_56, 0, x_53);
lean_ctor_set(x_56, 1, x_54);
return x_56;
}
}
else
{
uint8_t x_57; lean_object* x_58; lean_object* x_59;
lean_dec(x_16);
lean_dec(x_1);
x_57 = 1;
x_58 = lean_box(x_57);
x_59 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_59, 0, x_58);
lean_ctor_set(x_59, 1, x_44);
return x_59;
}
}
else
{
uint8_t x_60; lean_object* x_61; lean_object* x_62;
lean_dec(x_16);
lean_dec(x_1);
x_60 = 1;
x_61 = lean_box(x_60);
x_62 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_62, 0, x_61);
lean_ctor_set(x_62, 1, x_44);
return x_62;
}
}
}
else
{
uint8_t x_63;
lean_dec(x_16);
lean_dec(x_1);
x_63 = !lean_is_exclusive(x_21);
if (x_63 == 0)
{
return x_21;
}
else
{
lean_object* x_64; lean_object* x_65; lean_object* x_66;
x_64 = lean_ctor_get(x_21, 0);
x_65 = lean_ctor_get(x_21, 1);
lean_inc(x_65);
lean_inc(x_64);
lean_dec(x_21);
x_66 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_66, 0, x_64);
lean_ctor_set(x_66, 1, x_65);
return x_66;
}
}
}
else
{
uint8_t x_67;
uint8_t x_44; lean_object* x_45;
lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_1);
x_67 = !lean_is_exclusive(x_19);
if (x_67 == 0)
{
return x_19;
x_44 = 1;
x_45 = lean_box(x_44);
lean_ctor_set(x_23, 0, x_45);
return x_23;
}
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_70;
x_68 = lean_ctor_get(x_19, 0);
x_69 = lean_ctor_get(x_19, 1);
lean_inc(x_69);
lean_inc(x_68);
lean_dec(x_19);
x_70 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_70, 0, x_68);
lean_ctor_set(x_70, 1, x_69);
return x_70;
lean_object* x_46; uint8_t x_47;
x_46 = lean_ctor_get(x_23, 1);
lean_inc(x_46);
lean_dec(x_23);
lean_inc(x_18);
x_47 = l_Lean_Parser_isEOI(x_18);
if (x_47 == 0)
{
uint8_t x_48;
lean_inc(x_18);
x_48 = l_Lean_Parser_isExitCommand(x_18);
if (x_48 == 0)
{
lean_object* x_49;
x_49 = l_Lean_Elab_Frontend_elabCommandAtFrontend(x_18, x_1, x_46);
if (lean_obj_tag(x_49) == 0)
{
lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54;
x_50 = lean_ctor_get(x_49, 1);
lean_inc(x_50);
if (lean_is_exclusive(x_49)) {
lean_ctor_release(x_49, 0);
lean_ctor_release(x_49, 1);
x_51 = x_49;
} else {
lean_dec_ref(x_49);
x_51 = lean_box(0);
}
x_52 = 0;
x_53 = lean_box(x_52);
if (lean_is_scalar(x_51)) {
x_54 = lean_alloc_ctor(0, 2, 0);
} else {
x_54 = x_51;
}
lean_ctor_set(x_54, 0, x_53);
lean_ctor_set(x_54, 1, x_50);
return x_54;
}
else
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58;
x_55 = lean_ctor_get(x_49, 0);
lean_inc(x_55);
x_56 = lean_ctor_get(x_49, 1);
lean_inc(x_56);
if (lean_is_exclusive(x_49)) {
lean_ctor_release(x_49, 0);
lean_ctor_release(x_49, 1);
x_57 = x_49;
} else {
lean_dec_ref(x_49);
x_57 = lean_box(0);
}
if (lean_is_scalar(x_57)) {
x_58 = lean_alloc_ctor(1, 2, 0);
} else {
x_58 = x_57;
}
lean_ctor_set(x_58, 0, x_55);
lean_ctor_set(x_58, 1, x_56);
return x_58;
}
}
else
{
uint8_t x_59; lean_object* x_60; lean_object* x_61;
lean_dec(x_18);
x_59 = 1;
x_60 = lean_box(x_59);
x_61 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_61, 0, x_60);
lean_ctor_set(x_61, 1, x_46);
return x_61;
}
}
else
{
uint8_t x_62; lean_object* x_63; lean_object* x_64;
lean_dec(x_18);
x_62 = 1;
x_63 = lean_box(x_62);
x_64 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_64, 0, x_63);
lean_ctor_set(x_64, 1, x_46);
return x_64;
}
}
}
else
{
uint8_t x_71;
uint8_t x_65;
lean_dec(x_18);
x_65 = !lean_is_exclusive(x_23);
if (x_65 == 0)
{
return x_23;
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68;
x_66 = lean_ctor_get(x_23, 0);
x_67 = lean_ctor_get(x_23, 1);
lean_inc(x_67);
lean_inc(x_66);
lean_dec(x_23);
x_68 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_68, 0, x_66);
lean_ctor_set(x_68, 1, x_67);
return x_68;
}
}
}
else
{
uint8_t x_69;
lean_dec(x_20);
lean_dec(x_18);
x_69 = !lean_is_exclusive(x_21);
if (x_69 == 0)
{
return x_21;
}
else
{
lean_object* x_70; lean_object* x_71; lean_object* x_72;
x_70 = lean_ctor_get(x_21, 0);
x_71 = lean_ctor_get(x_21, 1);
lean_inc(x_71);
lean_inc(x_70);
lean_dec(x_21);
x_72 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_72, 0, x_70);
lean_ctor_set(x_72, 1, x_71);
return x_72;
}
}
}
else
{
uint8_t x_73;
lean_dec(x_6);
lean_dec(x_1);
x_71 = !lean_is_exclusive(x_8);
if (x_71 == 0)
x_73 = !lean_is_exclusive(x_8);
if (x_73 == 0)
{
return x_8;
}
else
{
lean_object* x_72; lean_object* x_73; lean_object* x_74;
x_72 = lean_ctor_get(x_8, 0);
x_73 = lean_ctor_get(x_8, 1);
lean_inc(x_73);
lean_inc(x_72);
lean_object* x_74; lean_object* x_75; lean_object* x_76;
x_74 = lean_ctor_get(x_8, 0);
x_75 = lean_ctor_get(x_8, 1);
lean_inc(x_75);
lean_inc(x_74);
lean_dec(x_8);
x_74 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_74, 0, x_72);
lean_ctor_set(x_74, 1, x_73);
return x_74;
x_76 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_76, 0, x_74);
lean_ctor_set(x_76, 1, x_75);
return x_76;
}
}
}
else
{
uint8_t x_75;
lean_dec(x_1);
x_75 = !lean_is_exclusive(x_5);
if (x_75 == 0)
uint8_t x_77;
x_77 = !lean_is_exclusive(x_5);
if (x_77 == 0)
{
return x_5;
}
else
{
lean_object* x_76; lean_object* x_77; lean_object* x_78;
x_76 = lean_ctor_get(x_5, 0);
x_77 = lean_ctor_get(x_5, 1);
lean_inc(x_77);
lean_inc(x_76);
lean_object* x_78; lean_object* x_79; lean_object* x_80;
x_78 = lean_ctor_get(x_5, 0);
x_79 = lean_ctor_get(x_5, 1);
lean_inc(x_79);
lean_inc(x_78);
lean_dec(x_5);
x_78 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_78, 0, x_76);
lean_ctor_set(x_78, 1, x_77);
return x_78;
x_80 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_80, 0, x_78);
lean_ctor_set(x_80, 1, x_79);
return x_80;
}
}
}
else
{
uint8_t x_79;
lean_dec(x_1);
x_79 = !lean_is_exclusive(x_3);
if (x_79 == 0)
uint8_t x_81;
x_81 = !lean_is_exclusive(x_3);
if (x_81 == 0)
{
return x_3;
}
else
{
lean_object* x_80; lean_object* x_81; lean_object* x_82;
x_80 = lean_ctor_get(x_3, 0);
x_81 = lean_ctor_get(x_3, 1);
lean_inc(x_81);
lean_inc(x_80);
lean_object* x_82; lean_object* x_83; lean_object* x_84;
x_82 = lean_ctor_get(x_3, 0);
x_83 = lean_ctor_get(x_3, 1);
lean_inc(x_83);
lean_inc(x_82);
lean_dec(x_3);
x_82 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_82, 0, x_80);
lean_ctor_set(x_82, 1, x_81);
return x_82;
x_84 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_84, 0, x_82);
lean_ctor_set(x_84, 1, x_83);
return x_84;
}
}
}
}
lean_object* l_Lean_Elab_Frontend_processCommand___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_Frontend_processCommand(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___rarg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
lean_inc(x_1);
x_3 = l_Lean_Elab_Frontend_processCommand(x_1, x_2);
if (lean_obj_tag(x_3) == 0)
{
@ -1712,7 +1740,6 @@ goto _start;
else
{
uint8_t x_8;
lean_dec(x_1);
x_8 = !lean_is_exclusive(x_3);
if (x_8 == 0)
{
@ -1740,7 +1767,6 @@ return x_13;
else
{
uint8_t x_14;
lean_dec(x_1);
x_14 = !lean_is_exclusive(x_3);
if (x_14 == 0)
{
@ -1766,10 +1792,19 @@ lean_object* l_Lean_Elab_Frontend_processCommandsAux___main(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Frontend_processCommandsAux___main___rarg), 2, 0);
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Frontend_processCommandsAux___main___rarg___boxed), 2, 0);
return x_2;
}
}
lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___rarg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_Frontend_processCommandsAux___main___rarg(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Elab_Frontend_processCommandsAux___main___boxed(lean_object* x_1) {
_start:
{
@ -1791,10 +1826,19 @@ lean_object* l_Lean_Elab_Frontend_processCommandsAux(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Frontend_processCommandsAux___rarg), 2, 0);
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Frontend_processCommandsAux___rarg___boxed), 2, 0);
return x_2;
}
}
lean_object* l_Lean_Elab_Frontend_processCommandsAux___rarg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_Frontend_processCommandsAux___rarg(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Elab_Frontend_processCommandsAux___boxed(lean_object* x_1) {
_start:
{
@ -1812,6 +1856,15 @@ x_3 = l_Lean_Elab_Frontend_processCommandsAux___main___rarg(x_1, x_2);
return x_3;
}
}
lean_object* l_Lean_Elab_Frontend_processCommands___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_Frontend_processCommands(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* l_Lean_Elab_IO_processCommands(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
@ -1843,6 +1896,7 @@ lean_ctor_set(x_12, 1, x_2);
lean_ctor_set(x_12, 2, x_10);
lean_ctor_set(x_12, 3, x_1);
x_13 = l_Lean_Elab_Frontend_processCommandsAux___main___rarg(x_12, x_11);
lean_dec(x_12);
x_14 = !lean_is_exclusive(x_13);
if (x_14 == 0)
{
@ -1947,7 +2001,7 @@ lean_inc(x_9);
x_10 = lean_ctor_get(x_7, 1);
lean_inc(x_10);
lean_dec(x_7);
x_11 = l_Lean_Parser_mkParserContextCore(x_2, x_1, x_8);
x_11 = l_Lean_Parser_mkInputContext(x_1, x_8);
x_12 = l_PersistentArray_empty___closed__3;
x_13 = l_Lean_Elab_Command_mkState(x_2, x_12, x_3);
x_14 = lean_io_mk_ref(x_13, x_10);
@ -2235,7 +2289,7 @@ goto block_94;
block_94:
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint32_t x_13; lean_object* x_14;
x_7 = l_Lean_Parser_mkParserContextCore(x_1, x_2, x_6);
x_7 = l_Lean_Parser_mkInputContext(x_2, x_6);
lean_inc(x_7);
x_8 = l_Lean_Parser_parseHeader(x_1, x_7);
x_9 = lean_ctor_get(x_8, 1);

View file

@ -13,7 +13,6 @@
#ifdef __cplusplus
extern "C" {
#endif
lean_object* l_Lean_Parser_mkParserContextCore(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_headerToImports___closed__4;
lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*);
lean_object* l_List_map___main___at_Lean_Elab_headerToImports___spec__1(lean_object*);
@ -22,6 +21,7 @@ extern lean_object* l_Lean_stxInh;
lean_object* l_List_append___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Elab_headerToImports___closed__2;
lean_object* l_Lean_Elab_headerToImports(lean_object*);
lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*);
lean_object* l_PersistentArray_push___rarg(lean_object*, lean_object*);
extern lean_object* l_String_splitAux___main___closed__1;
lean_object* l_Lean_Elab_headerToImports___closed__1;
@ -490,7 +490,7 @@ lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t
x_7 = lean_ctor_get(x_5, 0);
x_8 = l_Lean_Elab_parseImports___closed__1;
lean_inc(x_1);
x_9 = l_Lean_Parser_mkParserContextCore(x_7, x_1, x_8);
x_9 = l_Lean_Parser_mkInputContext(x_1, x_8);
x_10 = l_Lean_Parser_parseHeader(x_7, x_9);
x_11 = !lean_is_exclusive(x_10);
if (x_11 == 0)
@ -597,7 +597,7 @@ lean_inc(x_39);
lean_dec(x_5);
x_41 = l_Lean_Elab_parseImports___closed__1;
lean_inc(x_1);
x_42 = l_Lean_Parser_mkParserContextCore(x_39, x_1, x_41);
x_42 = l_Lean_Parser_mkInputContext(x_1, x_41);
x_43 = l_Lean_Parser_parseHeader(x_39, x_42);
x_44 = lean_ctor_get(x_43, 1);
lean_inc(x_44);
@ -664,7 +664,7 @@ x_59 = lean_ctor_get(x_2, 0);
lean_inc(x_59);
lean_dec(x_2);
lean_inc(x_1);
x_60 = l_Lean_Parser_mkParserContextCore(x_58, x_1, x_59);
x_60 = l_Lean_Parser_mkInputContext(x_1, x_59);
x_61 = l_Lean_Parser_parseHeader(x_58, x_60);
x_62 = !lean_is_exclusive(x_61);
if (x_62 == 0)
@ -773,7 +773,7 @@ x_92 = lean_ctor_get(x_2, 0);
lean_inc(x_92);
lean_dec(x_2);
lean_inc(x_1);
x_93 = l_Lean_Parser_mkParserContextCore(x_90, x_1, x_92);
x_93 = l_Lean_Parser_mkInputContext(x_1, x_92);
x_94 = l_Lean_Parser_parseHeader(x_90, x_93);
x_95 = lean_ctor_get(x_94, 1);
lean_inc(x_95);

File diff suppressed because it is too large Load diff

View file

@ -19537,122 +19537,101 @@ x_11 = lean_unbox(x_10);
lean_dec(x_10);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; 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_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
lean_object* x_12; lean_object* x_13; 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_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_12 = lean_ctor_get(x_9, 1);
lean_inc(x_12);
lean_dec(x_9);
lean_inc(x_5);
x_13 = l_Lean_Elab_Term_instantiateMVars(x_1, x_4, x_5, x_12);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
lean_dec(x_13);
lean_inc(x_5);
x_16 = l_Lean_Elab_Term_instantiateMVars(x_1, x_3, x_5, x_15);
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
x_18 = lean_ctor_get(x_16, 1);
lean_inc(x_18);
lean_dec(x_16);
lean_inc(x_5);
x_19 = l_Lean_Elab_Term_instantiateMVars(x_1, x_8, x_5, x_18);
x_20 = lean_ctor_get(x_19, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_19, 1);
lean_inc(x_21);
lean_dec(x_19);
x_22 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_22, 0, x_14);
x_23 = l_Lean_indentExpr(x_22);
x_24 = l_Lean_Elab_Term_ensureHasType___closed__3;
x_25 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_25, 0, x_24);
lean_ctor_set(x_25, 1, x_23);
x_26 = l_Lean_MessageData_ofList___closed__3;
x_27 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_27, 0, x_25);
lean_ctor_set(x_27, 1, x_26);
x_28 = l_Lean_Meta_Exception_mkAppTypeMismatchMessage___closed__8;
x_13 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_13, 0, x_4);
x_14 = l_Lean_indentExpr(x_13);
x_15 = l_Lean_Elab_Term_ensureHasType___closed__3;
x_16 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_14);
x_17 = l_Lean_MessageData_ofList___closed__3;
x_18 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_18, 0, x_16);
lean_ctor_set(x_18, 1, x_17);
x_19 = l_Lean_Meta_Exception_mkAppTypeMismatchMessage___closed__8;
x_20 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_19);
x_21 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_21, 0, x_3);
x_22 = l_Lean_indentExpr(x_21);
x_23 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_23, 0, x_20);
lean_ctor_set(x_23, 1, x_22);
x_24 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_24, 0, x_23);
lean_ctor_set(x_24, 1, x_17);
x_25 = l_Lean_KernelException_toMessageData___closed__12;
x_26 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_25);
x_27 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_27, 0, x_8);
x_28 = l_Lean_indentExpr(x_27);
x_29 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_29, 0, x_27);
lean_ctor_set(x_29, 0, x_26);
lean_ctor_set(x_29, 1, x_28);
x_30 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_30, 0, x_17);
x_31 = l_Lean_indentExpr(x_30);
x_32 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_32, 0, x_29);
lean_ctor_set(x_32, 1, x_31);
x_33 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_33, 0, x_32);
lean_ctor_set(x_33, 1, x_26);
x_34 = l_Lean_KernelException_toMessageData___closed__12;
x_35 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_35, 0, x_33);
lean_ctor_set(x_35, 1, x_34);
x_36 = lean_alloc_ctor(2, 1, 0);
lean_ctor_set(x_36, 0, x_20);
x_37 = l_Lean_indentExpr(x_36);
x_38 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_38, 0, x_35);
lean_ctor_set(x_38, 1, x_37);
x_39 = l_Lean_Elab_Term_throwError___rarg(x_1, x_38, x_5, x_21);
return x_39;
x_30 = l_Lean_Elab_Term_throwError___rarg(x_1, x_29, x_5, x_12);
return x_30;
}
else
{
uint8_t x_40;
uint8_t x_31;
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_1);
x_40 = !lean_is_exclusive(x_9);
if (x_40 == 0)
x_31 = !lean_is_exclusive(x_9);
if (x_31 == 0)
{
lean_object* x_41;
x_41 = lean_ctor_get(x_9, 0);
lean_dec(x_41);
lean_object* x_32;
x_32 = lean_ctor_get(x_9, 0);
lean_dec(x_32);
lean_ctor_set(x_9, 0, x_4);
return x_9;
}
else
{
lean_object* x_42; lean_object* x_43;
x_42 = lean_ctor_get(x_9, 1);
lean_inc(x_42);
lean_object* x_33; lean_object* x_34;
x_33 = lean_ctor_get(x_9, 1);
lean_inc(x_33);
lean_dec(x_9);
x_43 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_43, 0, x_4);
lean_ctor_set(x_43, 1, x_42);
return x_43;
x_34 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_34, 0, x_4);
lean_ctor_set(x_34, 1, x_33);
return x_34;
}
}
}
else
{
uint8_t x_44;
uint8_t x_35;
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_1);
x_44 = !lean_is_exclusive(x_9);
if (x_44 == 0)
x_35 = !lean_is_exclusive(x_9);
if (x_35 == 0)
{
return x_9;
}
else
{
lean_object* x_45; lean_object* x_46; lean_object* x_47;
x_45 = lean_ctor_get(x_9, 0);
x_46 = lean_ctor_get(x_9, 1);
lean_inc(x_46);
lean_inc(x_45);
lean_object* x_36; lean_object* x_37; lean_object* x_38;
x_36 = lean_ctor_get(x_9, 0);
x_37 = lean_ctor_get(x_9, 1);
lean_inc(x_37);
lean_inc(x_36);
lean_dec(x_9);
x_47 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_47, 0, x_45);
lean_ctor_set(x_47, 1, x_46);
return x_47;
x_38 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_38, 0, x_36);
lean_ctor_set(x_38, 1, x_37);
return x_38;
}
}
}

View file

@ -13,6 +13,7 @@
#ifdef __cplusplus
extern "C" {
#endif
extern lean_object* l___private_Init_Lean_Syntax_10__decodeNatLitVal___closed__1;
lean_object* l_Lean_Meta_isExprDefEqAux(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_name_eq(lean_object*, lean_object*);
lean_object* l_Lean_Meta_evalNat___main___closed__10;
@ -53,7 +54,6 @@ lean_object* l_Lean_mkNatLit(lean_object*);
lean_object* l___private_Init_Lean_Meta_Offset_2__isOffset(lean_object*);
lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Syntax_9__decodeNatLitVal___closed__1;
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
lean_object* _init_l_Lean_Meta_evalNat___main___closed__1() {
@ -227,7 +227,7 @@ return x_12;
else
{
lean_object* x_13;
x_13 = l___private_Init_Lean_Syntax_9__decodeNatLitVal___closed__1;
x_13 = l___private_Init_Lean_Syntax_10__decodeNatLitVal___closed__1;
return x_13;
}
}

View file

@ -13,12 +13,12 @@
#ifdef __cplusplus
extern "C" {
#endif
lean_object* l_Lean_Parser_mkParserContextCore(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__5;
extern lean_object* l_Lean_Parser_manyAux___main___closed__1;
lean_object* l_IO_print___at___private_Init_Lean_Parser_Module_4__testModuleParserAux___main___spec__4(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_declareLeadingBuiltinParser___closed__1;
lean_object* l_Lean_Parser_andthenInfo(lean_object*, lean_object*);
lean_object* l_Lean_Parser_mkParserContext(lean_object*, lean_object*);
lean_object* l_Lean_Parser_Module_import___closed__8;
lean_object* lean_io_timeit(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_Module_import___closed__4;
@ -42,6 +42,7 @@ lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__2;
lean_object* l_Lean_Parser_Module_import;
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__2;
lean_object* l_Lean_Parser_Module_header___closed__4;
lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*);
lean_object* l_Lean_Parser_ParserAttribute_runParserFn(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_forMAux___main___at___private_Init_Lean_Parser_Module_4__testModuleParserAux___main___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
@ -1410,151 +1411,68 @@ uint8_t x_2;
x_2 = !lean_is_exclusive(x_1);
if (x_2 == 0)
{
lean_object* x_3; uint8_t x_4;
x_3 = lean_ctor_get(x_1, 0);
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_3 = lean_ctor_get(x_1, 2);
x_4 = l_Lean_Parser_Module_header;
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
x_6 = l_Lean_Parser_addParserTokens(x_3, x_5);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_5 = lean_ctor_get(x_3, 3);
x_6 = l_Lean_Parser_Module_header;
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = l_Lean_Parser_addParserTokens(x_5, x_7);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10;
lean_dec(x_8);
x_9 = l___private_Init_Lean_Parser_Parser_11__addTokenTableEntry___closed__1;
x_10 = l_unreachable_x21___rarg(x_9);
lean_ctor_set(x_3, 3, x_10);
lean_object* x_7; lean_object* x_8;
lean_dec(x_6);
x_7 = l___private_Init_Lean_Parser_Parser_11__addTokenTableEntry___closed__1;
x_8 = l_unreachable_x21___rarg(x_7);
lean_ctor_set(x_1, 2, x_8);
return x_1;
}
else
{
lean_object* x_11;
x_11 = lean_ctor_get(x_8, 0);
lean_inc(x_11);
lean_dec(x_8);
lean_ctor_set(x_3, 3, x_11);
lean_object* x_9;
x_9 = lean_ctor_get(x_6, 0);
lean_inc(x_9);
lean_dec(x_6);
lean_ctor_set(x_1, 2, x_9);
return x_1;
}
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
x_12 = lean_ctor_get(x_3, 0);
x_13 = lean_ctor_get(x_3, 1);
x_14 = lean_ctor_get(x_3, 2);
x_15 = lean_ctor_get(x_3, 3);
lean_inc(x_15);
lean_inc(x_14);
lean_inc(x_13);
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
x_10 = lean_ctor_get(x_1, 0);
x_11 = lean_ctor_get(x_1, 1);
x_12 = lean_ctor_get(x_1, 2);
lean_inc(x_12);
lean_dec(x_3);
x_16 = l_Lean_Parser_Module_header;
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
x_18 = l_Lean_Parser_addParserTokens(x_15, x_17);
if (lean_obj_tag(x_18) == 0)
{
lean_object* x_19; lean_object* x_20; lean_object* x_21;
lean_dec(x_18);
x_19 = l___private_Init_Lean_Parser_Parser_11__addTokenTableEntry___closed__1;
x_20 = l_unreachable_x21___rarg(x_19);
x_21 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_21, 0, x_12);
lean_ctor_set(x_21, 1, x_13);
lean_ctor_set(x_21, 2, x_14);
lean_ctor_set(x_21, 3, x_20);
lean_ctor_set(x_1, 0, x_21);
return x_1;
}
else
{
lean_object* x_22; lean_object* x_23;
x_22 = lean_ctor_get(x_18, 0);
lean_inc(x_22);
lean_dec(x_18);
x_23 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_23, 0, x_12);
lean_ctor_set(x_23, 1, x_13);
lean_ctor_set(x_23, 2, x_14);
lean_ctor_set(x_23, 3, x_22);
lean_ctor_set(x_1, 0, x_23);
return x_1;
}
}
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
x_24 = lean_ctor_get(x_1, 0);
x_25 = lean_ctor_get(x_1, 1);
lean_inc(x_25);
lean_inc(x_24);
lean_inc(x_11);
lean_inc(x_10);
lean_dec(x_1);
x_26 = lean_ctor_get(x_24, 0);
lean_inc(x_26);
x_27 = lean_ctor_get(x_24, 1);
lean_inc(x_27);
x_28 = lean_ctor_get(x_24, 2);
lean_inc(x_28);
x_29 = lean_ctor_get(x_24, 3);
lean_inc(x_29);
if (lean_is_exclusive(x_24)) {
lean_ctor_release(x_24, 0);
lean_ctor_release(x_24, 1);
lean_ctor_release(x_24, 2);
lean_ctor_release(x_24, 3);
x_30 = x_24;
} else {
lean_dec_ref(x_24);
x_30 = lean_box(0);
}
x_31 = l_Lean_Parser_Module_header;
x_32 = lean_ctor_get(x_31, 0);
lean_inc(x_32);
x_33 = l_Lean_Parser_addParserTokens(x_29, x_32);
if (lean_obj_tag(x_33) == 0)
x_13 = l_Lean_Parser_Module_header;
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = l_Lean_Parser_addParserTokens(x_12, x_14);
if (lean_obj_tag(x_15) == 0)
{
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37;
lean_dec(x_33);
x_34 = l___private_Init_Lean_Parser_Parser_11__addTokenTableEntry___closed__1;
x_35 = l_unreachable_x21___rarg(x_34);
if (lean_is_scalar(x_30)) {
x_36 = lean_alloc_ctor(0, 4, 0);
} else {
x_36 = x_30;
}
lean_ctor_set(x_36, 0, x_26);
lean_ctor_set(x_36, 1, x_27);
lean_ctor_set(x_36, 2, x_28);
lean_ctor_set(x_36, 3, x_35);
x_37 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_37, 0, x_36);
lean_ctor_set(x_37, 1, x_25);
return x_37;
lean_object* x_16; lean_object* x_17; lean_object* x_18;
lean_dec(x_15);
x_16 = l___private_Init_Lean_Parser_Parser_11__addTokenTableEntry___closed__1;
x_17 = l_unreachable_x21___rarg(x_16);
x_18 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_18, 0, x_10);
lean_ctor_set(x_18, 1, x_11);
lean_ctor_set(x_18, 2, x_17);
return x_18;
}
else
{
lean_object* x_38; lean_object* x_39; lean_object* x_40;
x_38 = lean_ctor_get(x_33, 0);
lean_inc(x_38);
lean_dec(x_33);
if (lean_is_scalar(x_30)) {
x_39 = lean_alloc_ctor(0, 4, 0);
} else {
x_39 = x_30;
}
lean_ctor_set(x_39, 0, x_26);
lean_ctor_set(x_39, 1, x_27);
lean_ctor_set(x_39, 2, x_28);
lean_ctor_set(x_39, 3, x_38);
x_40 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_25);
return x_40;
lean_object* x_19; lean_object* x_20;
x_19 = lean_ctor_get(x_15, 0);
lean_inc(x_19);
lean_dec(x_15);
x_20 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_20, 0, x_10);
lean_ctor_set(x_20, 1, x_11);
lean_ctor_set(x_20, 2, x_19);
return x_20;
}
}
}
@ -1619,9 +1537,7 @@ lean_object* l_Lean_Parser_parseHeader(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 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_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
x_3 = l_Lean_Parser_mkParserContext(x_1, x_2);
x_4 = l_Lean_Parser_Module_updateTokens(x_3);
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
@ -1828,11 +1744,9 @@ if (x_9 == 0)
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 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;
x_10 = lean_ctor_get(x_3, 0);
lean_dec(x_10);
lean_inc(x_1);
lean_inc(x_2);
x_11 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_11, 0, x_2);
lean_ctor_set(x_11, 1, x_1);
lean_inc(x_1);
x_11 = l_Lean_Parser_mkParserContext(x_1, x_2);
x_12 = l_Lean_Parser_initCacheForInput(x_7);
lean_dec(x_7);
x_13 = lean_box(0);
@ -1913,11 +1827,9 @@ else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48;
lean_dec(x_3);
lean_inc(x_1);
lean_inc(x_2);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_2);
lean_ctor_set(x_39, 1, x_1);
lean_inc(x_1);
x_39 = l_Lean_Parser_mkParserContext(x_1, x_2);
x_40 = l_Lean_Parser_initCacheForInput(x_7);
lean_dec(x_7);
x_41 = lean_box(0);
@ -2776,7 +2688,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj
x_6 = l_Lean_Parser_testModuleParser___closed__1;
lean_inc(x_3);
x_7 = lean_string_append(x_3, x_6);
x_8 = l_Lean_Parser_mkParserContextCore(x_1, x_2, x_3);
x_8 = l_Lean_Parser_mkInputContext(x_2, x_3);
lean_inc(x_8);
lean_inc(x_1);
x_9 = l_Lean_Parser_parseHeader(x_1, x_8);
@ -3000,7 +2912,7 @@ lean_inc(x_8);
x_9 = lean_ctor_get(x_7, 1);
lean_inc(x_9);
lean_dec(x_7);
x_10 = l_Lean_Parser_mkParserContextCore(x_1, x_8, x_5);
x_10 = l_Lean_Parser_mkInputContext(x_8, x_5);
lean_inc(x_10);
lean_inc(x_1);
x_11 = l_Lean_Parser_parseHeader(x_1, x_10);

View file

@ -23,7 +23,6 @@ lean_object* l_Lean_Parser_charLit___boxed(lean_object*);
lean_object* l_RBNode_find___main___at_Lean_Parser_indexed___spec__1(lean_object*);
lean_object* l_Lean_Parser_declareLeadingBuiltinParser___closed__2;
lean_object* l_Lean_Parser_builtinTokenTable;
lean_object* l_Lean_Parser_mkParserContextCore(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_finishCommentBlock(lean_object*, lean_object*, lean_object*);
lean_object* lean_string_push(lean_object*, uint32_t);
extern lean_object* l_Lean_Name_toString___closed__1;
@ -63,12 +62,13 @@ extern lean_object* l___private_Init_Lean_Environment_8__persistentEnvExtensions
lean_object* l_Lean_Parser_ParserState_mkError(lean_object*, lean_object*);
lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_Parser_mkSyntaxNodeKindExtension___spec__1___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Parser_takeUntilFn___main___at_Lean_Parser_octalNumberFn___spec__3(lean_object*, lean_object*);
lean_object* l_Lean_Parser_mkParserContext(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_mkParserContext(lean_object*, lean_object*);
lean_object* l_Lean_Parser_hashAndthen___boxed(lean_object*);
lean_object* l_Lean_Parser_declareBuiltinParser___closed__8;
lean_object* l_Lean_Parser_optional___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Parser_TokenConfig_toStr___closed__1;
lean_object* l_Lean_Parser_manyFn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_InputContext_inhabited___closed__1;
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* l_Lean_Parser_sepByInfo(lean_object*, lean_object*);
lean_object* l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__5;
@ -142,6 +142,7 @@ lean_object* l___private_Init_Lean_Parser_Parser_18__noImmediateColon___elambda_
lean_object* l_Lean_Parser_Trie_matchPrefix___rarg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_octalNumberFn___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_ParserState_stackSize___boxed(lean_object*);
lean_object* l_Lean_Parser_getTokenTable___boxed(lean_object*);
lean_object* l_Lean_Parser_octalNumberFn(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_satisfyFn___at_Lean_Parser_identFnAux___main___spec__4___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_hexNumberFn(lean_object*, lean_object*, lean_object*);
@ -163,6 +164,7 @@ lean_object* l_PersistentHashMap_foldlM___at___private_Init_Lean_Parser_Parser_1
lean_object* l_Lean_Parser_optionalFn___boxed(lean_object*);
lean_object* l_Array_iterateMAux___main___at_Lean_Parser_mkSyntaxNodeKindExtension___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_stxInh;
lean_object* l_Lean_Parser_InputContext_inhabited;
lean_object* l_HashMapImp_find_x3f___at_Lean_Parser_compileParserDescr___main___spec__1(lean_object*, lean_object*);
lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Parser_Parser_10__mkImportedTokenTable___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Parser_Parser_18__noImmediateColon___elambda__1___rarg___closed__1;
@ -229,6 +231,7 @@ lean_object* l_Lean_Parser_symbolOrIdentInfo(lean_object*);
lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Parser_Parser_14__addImportedParsers___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_try___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Parser_mkAntiquot___closed__4;
lean_object* l_Lean_Parser_mkInputContext(lean_object*, lean_object*);
lean_object* l_Lean_Parser_addBuiltinParser___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_ParserAttribute_runParserFn(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_addBuiltinParser(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
@ -323,7 +326,6 @@ lean_object* l_Lean_Parser_quotedSymbolFn___rarg___closed__5;
lean_object* l_Lean_Parser_optional(uint8_t, lean_object*);
extern lean_object* l_Lean_AttributeImpl_inhabited___closed__4;
lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Syntax_foldSepRevArgs___spec__1(lean_object*);
lean_object* l_Lean_Parser_mkParserContextCore___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_numLit___boxed(lean_object*);
lean_object* l_Lean_Parser_identFn___boxed(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Parser_Parser_18__noImmediateColon___boxed(lean_object*);
@ -410,7 +412,6 @@ lean_object* l_Lean_Parser_Parser_inhabited(uint8_t);
lean_object* l___private_Init_Lean_Parser_Parser_7__mkResult(lean_object*, lean_object*);
lean_object* l_AssocList_find___main___at_Lean_Parser_compileParserDescr___main___spec__2___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Parser_dollarSymbol___elambda__1___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Parser_ParserContextCore_inhabited;
lean_object* l_Lean_Parser_takeUntilFn___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Parser_registerParserAttribute___spec__5(lean_object*, lean_object*);
lean_object* l_Lean_Parser_TokenTableAttribute_inhabited___closed__5;
@ -503,7 +504,6 @@ extern lean_object* l_Lean_strLitKind___closed__1;
lean_object* l_Lean_Parser_symbolOrIdentInfo___elambda__2(lean_object*);
lean_object* l___private_Init_Lean_Parser_Parser_8__mergePrecendences___closed__3;
lean_object* l_Lean_Parser_mkParserOfConstant___closed__1;
lean_object* l_Lean_Parser_ParserContextCore_toParserContext(lean_object*, lean_object*);
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Parser_Parser_2__sepByFnAux(uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Parser_Parser_14__addImportedParsers___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
@ -669,6 +669,7 @@ lean_object* l_Lean_Parser_mkTokenTableAttribute___closed__1;
lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepArgs___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_rawCh(uint8_t, uint32_t, uint8_t);
lean_object* l_mkHashMapImp___rarg(lean_object*);
lean_object* l_Lean_Parser_getTokenTable(lean_object*);
lean_object* l_Lean_Parser_many1Indent___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_sepByInfo___elambda__1(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_symbolOrIdentInfo___elambda__2___boxed(lean_object*);
@ -1146,7 +1147,6 @@ lean_object* l_Lean_Parser_sepBy___boxed(lean_object*, lean_object*, lean_object
lean_object* l_Lean_Parser_trailingLoop___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Parser_quotedSymbol___boxed(lean_object*);
lean_object* l_Lean_Parser_symbolOrIdent(uint8_t, lean_object*);
lean_object* l_Lean_Parser_ParserContextCore_inhabited___closed__1;
lean_object* l_Lean_Parser_ParserState_mergeErrors(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_isIdRest(uint32_t);
lean_object* l_Lean_Parser_numberFnAux___boxed(lean_object*, lean_object*);
@ -1976,26 +1976,24 @@ x_8 = l_PersistentHashMap_insertAux___main___at_Lean_Parser_SyntaxNodeKindSet_in
return x_8;
}
}
lean_object* _init_l_Lean_Parser_ParserContextCore_inhabited___closed__1() {
lean_object* _init_l_Lean_Parser_InputContext_inhabited___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_String_splitAux___main___closed__1;
x_2 = l_Lean_FileMap_Inhabited___closed__1;
x_3 = l_Lean_Parser_Trie_HasEmptyc___closed__1;
x_4 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_1);
lean_ctor_set(x_4, 2, x_2);
lean_ctor_set(x_4, 3, x_3);
return x_4;
x_3 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_1);
lean_ctor_set(x_3, 2, x_2);
return x_3;
}
}
lean_object* _init_l_Lean_Parser_ParserContextCore_inhabited() {
lean_object* _init_l_Lean_Parser_InputContext_inhabited() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_Parser_ParserContextCore_inhabited___closed__1;
x_1 = l_Lean_Parser_InputContext_inhabited___closed__1;
return x_1;
}
}
@ -8925,6 +8923,7 @@ x_3 = lean_ctor_get(x_1, 0);
lean_inc(x_3);
x_4 = lean_ctor_get(x_3, 0);
lean_inc(x_4);
lean_dec(x_3);
x_5 = lean_ctor_get(x_2, 1);
lean_inc(x_5);
x_6 = lean_string_utf8_get(x_4, x_5);
@ -8942,9 +8941,8 @@ x_11 = l_Char_isDigit(x_6);
if (x_11 == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
x_12 = lean_ctor_get(x_3, 3);
x_12 = lean_ctor_get(x_1, 2);
lean_inc(x_12);
lean_dec(x_3);
lean_inc(x_5);
x_13 = l_Lean_Parser_Trie_matchPrefix___rarg(x_4, x_12, x_5);
lean_dec(x_4);
@ -8961,7 +8959,6 @@ else
lean_object* x_17;
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
x_17 = l_Lean_Parser_numberFnAux(x_1, x_2);
lean_dec(x_1);
return x_17;
@ -8970,7 +8967,6 @@ return x_17;
else
{
lean_object* x_18; lean_object* x_19;
lean_dec(x_3);
x_18 = l_Lean_Parser_ParserState_next(x_2, x_4, x_5);
lean_dec(x_4);
x_19 = l_Lean_Parser_charLitFnAux(x_5, x_1, x_18);
@ -8981,7 +8977,6 @@ return x_19;
else
{
lean_object* x_20; lean_object* x_21;
lean_dec(x_3);
x_20 = l_Lean_Parser_ParserState_next(x_2, x_4, x_5);
lean_dec(x_4);
x_21 = l_Lean_Parser_strLitFnAux___main(x_5, x_1, x_20);
@ -23392,105 +23387,102 @@ return x_54;
}
case 2:
{
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61;
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60;
x_55 = lean_ctor_get(x_4, 0);
lean_inc(x_55);
lean_dec(x_4);
x_56 = lean_ctor_get(x_12, 1);
lean_inc(x_56);
lean_dec(x_12);
x_57 = lean_ctor_get(x_2, 0);
x_57 = lean_ctor_get(x_2, 2);
lean_inc(x_57);
lean_dec(x_2);
x_58 = lean_ctor_get(x_57, 3);
lean_inc(x_58);
lean_dec(x_57);
x_59 = lean_unsigned_to_nat(0u);
x_60 = l_Lean_Parser_Trie_matchPrefix___rarg(x_56, x_58, x_59);
x_58 = lean_unsigned_to_nat(0u);
x_59 = l_Lean_Parser_Trie_matchPrefix___rarg(x_56, x_57, x_58);
lean_dec(x_56);
x_61 = !lean_is_exclusive(x_60);
if (x_61 == 0)
x_60 = !lean_is_exclusive(x_59);
if (x_60 == 0)
{
lean_object* x_62; lean_object* x_63;
x_62 = lean_ctor_get(x_60, 1);
x_63 = lean_ctor_get(x_60, 0);
lean_dec(x_63);
if (lean_obj_tag(x_62) == 0)
lean_object* x_61; lean_object* x_62;
x_61 = lean_ctor_get(x_59, 1);
x_62 = lean_ctor_get(x_59, 0);
lean_dec(x_62);
if (lean_obj_tag(x_61) == 0)
{
lean_ctor_set(x_60, 1, x_59);
lean_ctor_set(x_60, 0, x_55);
return x_60;
lean_ctor_set(x_59, 1, x_58);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
else
{
lean_object* x_64; lean_object* x_65;
x_64 = lean_ctor_get(x_62, 0);
lean_object* x_63; lean_object* x_64;
x_63 = lean_ctor_get(x_61, 0);
lean_inc(x_63);
lean_dec(x_61);
x_64 = lean_ctor_get(x_63, 1);
lean_inc(x_64);
lean_dec(x_62);
x_65 = lean_ctor_get(x_64, 1);
if (lean_obj_tag(x_64) == 0)
{
lean_object* x_65;
x_65 = lean_ctor_get(x_63, 2);
lean_inc(x_65);
lean_dec(x_63);
if (lean_obj_tag(x_65) == 0)
{
lean_object* x_66;
x_66 = lean_ctor_get(x_64, 2);
lean_inc(x_66);
lean_dec(x_64);
if (lean_obj_tag(x_66) == 0)
lean_ctor_set(x_59, 1, x_58);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
else
{
lean_ctor_set(x_60, 1, x_59);
lean_ctor_set(x_60, 0, x_55);
return x_60;
lean_object* x_66;
x_66 = lean_ctor_get(x_65, 0);
lean_inc(x_66);
lean_dec(x_65);
lean_ctor_set(x_59, 1, x_66);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
}
else
{
lean_object* x_67;
x_67 = lean_ctor_get(x_66, 0);
x_67 = lean_ctor_get(x_63, 2);
lean_inc(x_67);
lean_dec(x_66);
lean_ctor_set(x_60, 1, x_67);
lean_ctor_set(x_60, 0, x_55);
return x_60;
}
}
else
lean_dec(x_63);
if (lean_obj_tag(x_67) == 0)
{
lean_object* x_68;
x_68 = lean_ctor_get(x_64, 2);
x_68 = lean_ctor_get(x_64, 0);
lean_inc(x_68);
lean_dec(x_64);
if (lean_obj_tag(x_68) == 0)
lean_ctor_set(x_59, 1, x_68);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
else
{
lean_object* x_69;
x_69 = lean_ctor_get(x_65, 0);
lean_object* x_69; lean_object* x_70; uint8_t x_71;
x_69 = lean_ctor_get(x_64, 0);
lean_inc(x_69);
lean_dec(x_65);
lean_ctor_set(x_60, 1, x_69);
lean_ctor_set(x_60, 0, x_55);
return x_60;
}
else
{
lean_object* x_70; lean_object* x_71; uint8_t x_72;
x_70 = lean_ctor_get(x_65, 0);
lean_dec(x_64);
x_70 = lean_ctor_get(x_67, 0);
lean_inc(x_70);
lean_dec(x_65);
x_71 = lean_ctor_get(x_68, 0);
lean_inc(x_71);
lean_dec(x_68);
x_72 = l_Lean_Parser_checkTailNoWs(x_1);
if (x_72 == 0)
{
lean_dec(x_71);
lean_ctor_set(x_60, 1, x_70);
lean_ctor_set(x_60, 0, x_55);
return x_60;
}
else
lean_dec(x_67);
x_71 = l_Lean_Parser_checkTailNoWs(x_1);
if (x_71 == 0)
{
lean_dec(x_70);
lean_ctor_set(x_60, 1, x_71);
lean_ctor_set(x_60, 0, x_55);
return x_60;
lean_ctor_set(x_59, 1, x_69);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
else
{
lean_dec(x_69);
lean_ctor_set(x_59, 1, x_70);
lean_ctor_set(x_59, 0, x_55);
return x_59;
}
}
}
@ -23498,97 +23490,97 @@ return x_60;
}
else
{
lean_object* x_72;
x_72 = lean_ctor_get(x_59, 1);
lean_inc(x_72);
lean_dec(x_59);
if (lean_obj_tag(x_72) == 0)
{
lean_object* x_73;
x_73 = lean_ctor_get(x_60, 1);
lean_inc(x_73);
lean_dec(x_60);
if (lean_obj_tag(x_73) == 0)
{
lean_object* x_74;
x_74 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_74, 0, x_55);
lean_ctor_set(x_74, 1, x_59);
return x_74;
x_73 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_73, 0, x_55);
lean_ctor_set(x_73, 1, x_58);
return x_73;
}
else
{
lean_object* x_75; lean_object* x_76;
x_75 = lean_ctor_get(x_73, 0);
lean_object* x_74; lean_object* x_75;
x_74 = lean_ctor_get(x_72, 0);
lean_inc(x_74);
lean_dec(x_72);
x_75 = lean_ctor_get(x_74, 1);
lean_inc(x_75);
lean_dec(x_73);
x_76 = lean_ctor_get(x_75, 1);
if (lean_obj_tag(x_75) == 0)
{
lean_object* x_76;
x_76 = lean_ctor_get(x_74, 2);
lean_inc(x_76);
lean_dec(x_74);
if (lean_obj_tag(x_76) == 0)
{
lean_object* x_77;
x_77 = lean_ctor_get(x_75, 2);
lean_inc(x_77);
lean_dec(x_75);
if (lean_obj_tag(x_77) == 0)
{
lean_object* x_78;
x_78 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_78, 0, x_55);
lean_ctor_set(x_78, 1, x_59);
return x_78;
x_77 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_77, 0, x_55);
lean_ctor_set(x_77, 1, x_58);
return x_77;
}
else
{
lean_object* x_79; lean_object* x_80;
x_79 = lean_ctor_get(x_77, 0);
lean_inc(x_79);
lean_dec(x_77);
x_80 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_80, 0, x_55);
lean_ctor_set(x_80, 1, x_79);
return x_80;
lean_object* x_78; lean_object* x_79;
x_78 = lean_ctor_get(x_76, 0);
lean_inc(x_78);
lean_dec(x_76);
x_79 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_79, 0, x_55);
lean_ctor_set(x_79, 1, x_78);
return x_79;
}
}
else
{
lean_object* x_81;
x_81 = lean_ctor_get(x_75, 2);
lean_object* x_80;
x_80 = lean_ctor_get(x_74, 2);
lean_inc(x_80);
lean_dec(x_74);
if (lean_obj_tag(x_80) == 0)
{
lean_object* x_81; lean_object* x_82;
x_81 = lean_ctor_get(x_75, 0);
lean_inc(x_81);
lean_dec(x_75);
if (lean_obj_tag(x_81) == 0)
{
lean_object* x_82; lean_object* x_83;
x_82 = lean_ctor_get(x_76, 0);
lean_inc(x_82);
lean_dec(x_76);
x_83 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_83, 0, x_55);
lean_ctor_set(x_83, 1, x_82);
return x_83;
x_82 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_82, 0, x_55);
lean_ctor_set(x_82, 1, x_81);
return x_82;
}
else
{
lean_object* x_84; lean_object* x_85; uint8_t x_86;
x_84 = lean_ctor_get(x_76, 0);
lean_object* x_83; lean_object* x_84; uint8_t x_85;
x_83 = lean_ctor_get(x_75, 0);
lean_inc(x_83);
lean_dec(x_75);
x_84 = lean_ctor_get(x_80, 0);
lean_inc(x_84);
lean_dec(x_76);
x_85 = lean_ctor_get(x_81, 0);
lean_inc(x_85);
lean_dec(x_81);
x_86 = l_Lean_Parser_checkTailNoWs(x_1);
if (x_86 == 0)
lean_dec(x_80);
x_85 = l_Lean_Parser_checkTailNoWs(x_1);
if (x_85 == 0)
{
lean_object* x_86;
lean_dec(x_84);
x_86 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_86, 0, x_55);
lean_ctor_set(x_86, 1, x_83);
return x_86;
}
else
{
lean_object* x_87;
lean_dec(x_85);
lean_dec(x_83);
x_87 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_87, 0, x_55);
lean_ctor_set(x_87, 1, x_84);
return x_87;
}
else
{
lean_object* x_88;
lean_dec(x_84);
x_88 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_88, 0, x_55);
lean_ctor_set(x_88, 1, x_85);
return x_88;
}
}
}
}
@ -23596,30 +23588,30 @@ return x_88;
}
default:
{
uint8_t x_89;
uint8_t x_88;
lean_dec(x_12);
lean_dec(x_2);
x_89 = !lean_is_exclusive(x_4);
if (x_89 == 0)
x_88 = !lean_is_exclusive(x_4);
if (x_88 == 0)
{
lean_object* x_90; lean_object* x_91;
x_90 = lean_ctor_get(x_4, 1);
lean_dec(x_90);
x_91 = l_Lean_Parser_appPrec;
lean_ctor_set(x_4, 1, x_91);
lean_object* x_89; lean_object* x_90;
x_89 = lean_ctor_get(x_4, 1);
lean_dec(x_89);
x_90 = l_Lean_Parser_appPrec;
lean_ctor_set(x_4, 1, x_90);
return x_4;
}
else
{
lean_object* x_92; lean_object* x_93; lean_object* x_94;
x_92 = lean_ctor_get(x_4, 0);
lean_inc(x_92);
lean_object* x_91; lean_object* x_92; lean_object* x_93;
x_91 = lean_ctor_get(x_4, 0);
lean_inc(x_91);
lean_dec(x_4);
x_93 = l_Lean_Parser_appPrec;
x_94 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_94, 0, x_92);
lean_ctor_set(x_94, 1, x_93);
return x_94;
x_92 = l_Lean_Parser_appPrec;
x_93 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_93, 0, x_91);
lean_ctor_set(x_93, 1, x_92);
return x_93;
}
}
}
@ -27770,56 +27762,53 @@ lean_dec(x_1);
return x_2;
}
}
lean_object* l_Lean_Parser_mkParserContextCore(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
lean_object* l_Lean_Parser_getTokenTable(lean_object* x_1) {
_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_inc(x_2);
x_4 = l_Lean_FileMap_ofString(x_2);
x_5 = l_Lean_Parser_tokenTableAttribute;
x_6 = lean_ctor_get(x_5, 1);
lean_inc(x_6);
x_7 = l_Lean_PersistentEnvExtension_getState___rarg(x_6, x_1);
lean_dec(x_6);
x_8 = lean_ctor_get(x_7, 1);
lean_inc(x_8);
lean_dec(x_7);
x_9 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_9, 0, x_2);
lean_ctor_set(x_9, 1, x_3);
lean_ctor_set(x_9, 2, x_4);
lean_ctor_set(x_9, 3, x_8);
return x_9;
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_2 = l_Lean_Parser_tokenTableAttribute;
x_3 = lean_ctor_get(x_2, 1);
lean_inc(x_3);
x_4 = l_Lean_PersistentEnvExtension_getState___rarg(x_3, x_1);
lean_dec(x_3);
x_5 = lean_ctor_get(x_4, 1);
lean_inc(x_5);
lean_dec(x_4);
return x_5;
}
}
lean_object* l_Lean_Parser_mkParserContextCore___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
lean_object* l_Lean_Parser_getTokenTable___boxed(lean_object* x_1) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Parser_mkParserContextCore(x_1, x_2, x_3);
lean_object* x_2;
x_2 = l_Lean_Parser_getTokenTable(x_1);
lean_dec(x_1);
return x_2;
}
}
lean_object* l_Lean_Parser_mkInputContext(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4;
lean_inc(x_1);
x_3 = l_Lean_FileMap_ofString(x_1);
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* l_Lean_Parser_ParserContextCore_toParserContext(lean_object* x_1, lean_object* x_2) {
lean_object* l_Lean_Parser_mkParserContext(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = lean_alloc_ctor(0, 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_mkParserContext(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5;
x_4 = l_Lean_Parser_mkParserContextCore(x_1, x_2, x_3);
x_5 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_5, 0, x_4);
lean_ctor_set(x_5, 1, x_1);
return x_5;
lean_object* x_3; lean_object* x_4;
x_3 = l_Lean_Parser_getTokenTable(x_1);
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_2);
lean_ctor_set(x_4, 1, x_1);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
lean_object* l_Lean_Parser_mkParserState(lean_object* x_1) {
@ -27850,38 +27839,39 @@ return x_2;
lean_object* l_Lean_Parser_runParser(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
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_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_inc(x_3);
x_6 = l_Lean_Parser_mkParserContext(x_1, x_3, x_4);
x_7 = l_Lean_Parser_mkParserState(x_3);
x_6 = l_Lean_Parser_mkInputContext(x_3, x_4);
x_7 = l_Lean_Parser_mkParserContext(x_1, x_6);
x_8 = l_Lean_Parser_mkParserState(x_3);
lean_dec(x_3);
x_8 = l_Lean_Parser_whitespace___main(x_6, x_7);
x_9 = lean_unsigned_to_nat(0u);
lean_inc(x_6);
x_10 = l_Lean_Parser_prattParser(x_5, x_2, x_9, x_6, x_8);
x_11 = lean_ctor_get(x_10, 3);
lean_inc(x_11);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14;
lean_dec(x_6);
x_12 = lean_ctor_get(x_10, 0);
x_9 = l_Lean_Parser_whitespace___main(x_7, x_8);
x_10 = lean_unsigned_to_nat(0u);
lean_inc(x_7);
x_11 = l_Lean_Parser_prattParser(x_5, x_2, x_10, x_7, x_9);
x_12 = lean_ctor_get(x_11, 3);
lean_inc(x_12);
lean_dec(x_10);
x_13 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_12);
lean_dec(x_12);
x_14 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_14, 0, x_13);
return x_14;
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_13; lean_object* x_14; lean_object* x_15;
lean_dec(x_7);
x_13 = lean_ctor_get(x_11, 0);
lean_inc(x_13);
lean_dec(x_11);
x_14 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_13);
lean_dec(x_13);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
else
{
lean_object* x_15; lean_object* x_16;
lean_dec(x_11);
x_15 = l_Lean_Parser_ParserState_toErrorMsg(x_6, x_10);
x_16 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
lean_object* x_16; lean_object* x_17;
lean_dec(x_12);
x_16 = l_Lean_Parser_ParserState_toErrorMsg(x_7, x_11);
x_17 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_17, 0, x_16);
return x_17;
}
}
}
@ -38341,10 +38331,10 @@ l_Lean_Parser_TokenConfig_HasToString___closed__1 = _init_l_Lean_Parser_TokenCon
lean_mark_persistent(l_Lean_Parser_TokenConfig_HasToString___closed__1);
l_Lean_Parser_TokenConfig_HasToString = _init_l_Lean_Parser_TokenConfig_HasToString();
lean_mark_persistent(l_Lean_Parser_TokenConfig_HasToString);
l_Lean_Parser_ParserContextCore_inhabited___closed__1 = _init_l_Lean_Parser_ParserContextCore_inhabited___closed__1();
lean_mark_persistent(l_Lean_Parser_ParserContextCore_inhabited___closed__1);
l_Lean_Parser_ParserContextCore_inhabited = _init_l_Lean_Parser_ParserContextCore_inhabited();
lean_mark_persistent(l_Lean_Parser_ParserContextCore_inhabited);
l_Lean_Parser_InputContext_inhabited___closed__1 = _init_l_Lean_Parser_InputContext_inhabited___closed__1();
lean_mark_persistent(l_Lean_Parser_InputContext_inhabited___closed__1);
l_Lean_Parser_InputContext_inhabited = _init_l_Lean_Parser_InputContext_inhabited();
lean_mark_persistent(l_Lean_Parser_InputContext_inhabited);
l_Lean_Parser_Error_Inhabited___closed__1 = _init_l_Lean_Parser_Error_Inhabited___closed__1();
lean_mark_persistent(l_Lean_Parser_Error_Inhabited___closed__1);
l_Lean_Parser_Error_Inhabited = _init_l_Lean_Parser_Error_Inhabited();

File diff suppressed because it is too large Load diff