A grammar for a language. Add operators until the grammar is complete, then call .finish()
to
construct a Parser
you can use to parse.
One “word” in the stream returned by the lexer.
An error while parsing. When Displayed, shows the message and the portion of the source it
occurred in.
The result of parsing a source string. Call .visitor()
to walk it.
A Panfix grammar, that’s ready to parse.
Describe the syntax of an operator. You typically want to construct this with the pattern!
macro.
A position in the source text. Positions are between characters.
Source text, and a “filename” for it (though it need not have been read from a file).
Newline positions within the source are indexed, which allows all methods to run in
constant time.
A start and end position in the source text.
One node in a parse tree. Allows you to inspect the node and its children, but not its parent.