Crate sprout

source ·

Modules

Macros

Create an Alphabet by providing definitions for all token types.
Internal implementation of grammar. Potentially useful because it uses an external GrammarBuilder that is passed as a parameter.
Create a Grammar by providing definitions for its procedures.

Structs

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:
The Parser is instantiated with an Alphabet and Grammar, and provides the parse method to directly compile a String to an AST.
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.
A position in the text.

Type Definitions

An AST (abstract syntax tree). Its nodes and represent occurrences of grammar procedures in the parsed text.