Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
7.2::
LR
LR.parser
LR.parser()->kernel

Class LR.parser()->kernel

Description

Implements an LR(1) state


Variable rules

multiset(rule) LR.parser.kernel.rules

Description

Used to check if a rule already has been added when doing closures.


Variable items

array(item) LR.parser.kernel.items

Description

Contains the items in this state.


Variable item_id_to_item

mapping(int:item) LR.parser.kernel.item_id_to_item

Description

Used to lookup items given rule and offset


Variable symbol_items

mapping(int:multiset(item)) LR.parser.kernel.symbol_items

Description

Contains the items whose next symbol is this non-terminal.


Variable action

mapping(int|string:kernel|rule) LR.parser.kernel.action

Description

The action table for this state

 object(kernel)    SHIFT to this state on this symbol.
 object(rule)      REDUCE according to this rule on this symbol.
 


Variable closure_set

multiset LR.parser.kernel.closure_set

Description

The symbols that closure has been called on.