Crate wagon_gll

Source
Expand description

A (pseudo) generic GLL parsing library in Rust.

Written to supplement parsers generated by wagon-codegen-gll as a proof-of-concept for the WAGon ecosystem.

This library could be used to write GLL parsers in another way, as long as you stick to required patterns. However, the library was created with WAGs in mind. As a result, if you only care about pure GLL parsing, there are probably faster implementations out there that do not have to consider the possibility of the grammar changing at runtime.

Modules§

gss
An implementation of the GSS.
sppf
An implementation of the SPPF.
value
An extension of wagon_value::Value to deal with some GLL specific elements.

Structs§

GLLState
The state object for the GLL parse process.
GrammarSlot
A GrammarSlot as defined by the original paper.
RegexTerminal
A special type of Terminal which is a regex recognizer.

Enums§

GLLError
Errors possible during the GLL process.
GLLImplementationError
Errors possible because of implementation mistakes.
GLLParseError
Errors possible while GLL parsing.
GLLProcessError
Errors that can occur when processing the finished state object.

Constants§

ROOT_UUID
The ID of the initial non-terminal.

Traits§

Label
The main trait all elements in a GLL grammar should implement.

Type Aliases§

AttributeKey
The key for the AttributeMap.
AttributeMap
The datastructure for attributes passed along as arguments.
GLLBlockLabel
A pointer to a Label.
GLLResult
Result of anything in the GLL process that can return an error.
ImplementationResult
Result for something that can only have issues in the implementation.
LabelMap
A map from a uuid to a specific GLLBlockLabel.
ParseResult
Result of the GLL parse.
ProcessResult
Result type for any operations on the finished state that can error.
RegexMap
A map from a regular expression to the RegexTerminal that it represents.
ReturnMap
The datastructure for attributes returned from a non-terminal.
RuleMap
A map representing a rule and the constituent Idents of that rule.
Terminal
A Terminal, represented as a byte array.
TerminalBit
A single byte in a Terminal.