Modules§
Macros§
- alphabet
- Create an
Alphabetby providing definitions for all token types. - build_
grammar - Internal implementation of [
grammar]. Potentially useful because it uses an externalGrammarBuilderthat is passed as a parameter. - grammar
- Create a
Grammarby providing definitions for its procedures.
Structs§
- ASTNode
- A node in the
AST. It represents an occurrence of one of the procedures from the grammar in the text. As such, it has three properties: - Parser
- The
Parseris instantiated with anAlphabetandGrammar, and provides theparsemethod to directly compile aStringto anAST. - Parsing
Error - An error object returned when a part of the parsing process failed.
It contains
message, aStringthat describes what went wrong, andpos, aTextPositionthat points to the problematic location in the text whose parsing was attempted. - Text
Position - A position in the text.
Type Aliases§
- AST
- An AST (abstract syntax tree). Its nodes and represent occurrences of grammar procedures in the parsed text.