Struct hime_redist::parsers::LRProduction [] [src]

pub struct LRProduction {
    pub head: usize,
    pub head_action: TreeAction,
    pub reduction_length: usize,
    pub bytecode: Vec<LROpCode>,
}

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

Fields

Index of the rule's head in the parser's array of variables

Action of the rule's head (replace or not)

Size of the rule's body by only counting terminals and variables

Bytecode for the rule's production

Methods

impl LRProduction
[src]

[src]

Creates and loads a production

Trait Implementations

Auto Trait Implementations

impl Send for LRProduction

impl Sync for LRProduction