Module hime_redist::parsers

source ·
Expand description

Module for parsers API

Modules

Module for LR(k) parsers
Module for RNGLR parsers
Module for AST subtree in parsers

Structs

Represents a LR action in a LR parse table
Represents the contexts opening by transitions from a state
Container for the expected terminals for a LR state
Represents a rule’s production in a LR parser The binary representation of a LR Production is as follow: — header u16: head’s index u8: 1=replace, 0=nothing u8: reduction length u8: bytecode length in number of op-code — production’s bytecode array of LROpCode

Constants

Accept the input
No possible action => Error
Apply a reduction
Shift to another state
Add a null variable This can be found only in RNGLR productions
Add a virtual symbol
Pop an AST from the stack
Execute a semantic action
The maximum number of errors
Drop the node and all its descendants
Keep the node as is
Promote the node, i.e. replace its parent with it and insert its children where it was
Replace the node by its children
Replace the node by epsilon

Traits

Functions

Gets the base LR op-code
Gets the tree action encoded in the specified LR op-code

Type Definitions

Represents an action in a LR parser
Represent an op-code for a LR production An op-code can be either an instruction or raw data
Represents a tree action for an AST node