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.
- Grammar
Slot - A
GrammarSlot
as defined by the original paper. - Regex
Terminal - A special type of Terminal which is a regex recognizer.
Enums§
- GLLError
- Errors possible during the GLL process.
- GLLImplementation
Error - Errors possible because of implementation mistakes.
- GLLParse
Error - Errors possible while GLL parsing.
- GLLProcess
Error - 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§
- Attribute
Key - The key for the
AttributeMap
. - Attribute
Map - The datastructure for attributes passed along as arguments.
- GLLBlock
Label - A pointer to a
Label
. - GLLResult
- Result of anything in the GLL process that can return an error.
- Implementation
Result - Result for something that can only have issues in the implementation.
- Label
Map - A map from a uuid to a specific
GLLBlockLabel
. - Parse
Result - Result of the GLL parse.
- Process
Result - Result type for any operations on the finished state that can error.
- Regex
Map - A map from a regular expression to the
RegexTerminal
that it represents. - Return
Map - The datastructure for attributes returned from a non-terminal.
- RuleMap
- A map representing a rule and the constituent
Ident
s of that rule. - Terminal
- A Terminal, represented as a byte array.
- Terminal
Bit - A single byte in a
Terminal
.