Documentation

Lean.Parser.Extension

Extensible parsing via attributes

Equations
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
inductive Lean.Parser.AliasValue (α : Type) :
Type
def Lean.Parser.registerAliasCore {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lean.Name) (value : Lean.Parser.AliasValue α) :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Parser.getAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lean.Name) :
Equations
def Lean.Parser.getConstAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lean.Name) :
IO α
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Parser.getUnaryAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lean.Name) :
IO (αα)
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Parser.getBinaryAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lean.Name) :
IO (ααα)
Equations
  • One or more equations did not get rendered due to their size.
  • Number of syntax nodes produced by this parser. none means "sum of input sizes".

    stackSz? : Option Nat
  • Whether arguments should be wrapped in group(·) if they do not produce exactly one syntax node.

    autoGroupArgs : Bool
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
  • One or more equations did not get rendered due to their size.
@[implementedBy Lean.Parser.mkParserOfConstantUnsafe]
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
@[implementedBy Lean.Parser.evalParserConstUnsafe]

Run declName if possible and inside a quotation, or else p. The ParserInfo will always be taken from p.

Equations
  • One or more equations did not get rendered due to their size.
def Lean.Parser.addBuiltinParser (catName : Lean.Name) (declName : Lean.Name) (leading : Bool) (p : Lean.Parser.Parser) (prio : Nat) :
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
def Lean.Parser.runParserCategory (env : Lean.Environment) (catName : Lean.Name) (input : String) (fileName : optParam String "<input>") :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Parser.declareBuiltinParser (addFnName : Lean.Name) (catName : Lean.Name) (declName : Lean.Name) (prio : Nat) :
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.

If the parsing stack is of the form #[.., openCommand], we process the open command, and execute p

Equations
  • One or more equations did not get rendered due to their size.

If the parsing stack is of the form #[.., openDecl], we process the open declaration, and execute p

Equations
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.