Crate sprout Copy item path Source parse prelude tokenize alphabet Create an Alphabet
by providing definitions for all token types. build_grammar Internal implementation of [grammar
]. Potentially useful because it
uses an external GrammarBuilder
that is passed as a parameter. grammar Create a Grammar
by providing definitions for its procedures. 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 Parser
is instantiated with an Alphabet
and Grammar
, and provides the
parse
method to directly compile a String
to an AST
. ParsingError An error object returned when a part of the parsing process failed.
It contains message
, a String
that describes what went wrong,
and pos
, a TextPosition
that points to the problematic location in the text
whose parsing was attempted. TextPosition A position in the text. AST An AST (abstract syntax tree). Its nodes and represent occurrences of grammar procedures
in the parsed text.