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
head: usize
Index of the rule's head in the parser's array of variables
head_action: TreeAction
Action of the rule's head (replace or not)
reduction_length: usize
Size of the rule's body by only counting terminals and variables
bytecode: Vec<LROpCode>
Bytecode for the rule's production