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
Instances For
Instances For
Instances For
Instances For
Instances For
Parser aliases for making ParserDescr extensible
- const {α : Type} (p : α) : AliasValue α
- unary {α : Type} (p : α → α) : AliasValue α
- binary {α : Type} (p : α → α → α) : AliasValue α
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
convenience function for testing
Instances For
The parsing tables for builtin parsers are "stored" in the extracted source code.
Instances For
Instances For
Instances For
Instances For
If the parsing stack is of the form #[.., openCommand], we process the open command, and execute p
Instances For
If the parsing stack is of the form #[.., openDecl], we process the open declaration, and execute p
Instances For
If the parsing stack's last element is a set_option command, then its value is set in the context
while parsing p.
Instances For
If the parsing stack ends with an the option name and value, then the option is set in the context
while parsing p. The value is the top of the stack and the name is the identifier two entries
below it.
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)ParserDescrifisDescris 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.
Instances For
Resolve the given parser name and return a list of candidates.