Extensible parsing via attributes
- token (val : Token) : OLeanEntry
- kind (val : SyntaxNodeKind) : OLeanEntry
- category (catName declName : Name) (behavior : LeadingIdentBehavior) : OLeanEntry
- parser (catName declName : Name) (prio : Nat) : OLeanEntry
Instances For
- tokens : TokenTable
- kinds : SyntaxNodeKindSet
- categories : ParserCategories
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Parser aliases for making ParserDescr
extensible
- const {α : Type} (p : α) : AliasValue α
- unary {α : Type} (p : α → α) : AliasValue α
- binary {α : Type} (p : α → α → α) : AliasValue α
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Equations
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
convenience function for testing
Equations
Instances For
The parsing tables for builtin parsers are "stored" in the extracted source code.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
If the parsing stack is of the form #[.., openCommand]
, we process the open command, and execute p
Equations
Instances For
If the parsing stack is of the form #[.., openDecl]
, we process the open declaration, and execute p
Equations
Instances For
Helper environment extension that gives us access to built-in aliases in pure parser functions.
Result of resolving a parser name.
- category
(cat : Name)
: ParserResolution
Reference to a category.
- parser
(decl : Name)
(isDescr : Bool)
: ParserResolution
Reference to a parser declaration in the environment. A
(Trailing)ParserDescr
ifisDescr
is true. - alias
(p : ParserAliasValue)
: ParserResolution
Reference to a parser alias. Note that as aliases are built-in, a corresponding declaration may not be in the environment (yet).
Instances For
Resolve the given parser name and return a list of candidates.
Equations
Instances For
Equations
Instances For
Resolve the given parser name and return a list of candidates.
Equations
Instances For
Resolve the given parser name and return a list of candidates.