Module parser :: Class LALRtable
[hide private]
[frames] | no frames]

Class LALRtable

source code

LRtable --+    
          |    
 LALRtable1 --+
              |
             LALRtable

Class for construction of LALR tables

Instance Methods [hide private]
 
make_action_goto(self)
collection of LR(0) items
source code
 
items(self)
An LALR(1) kernel item of a grammar G is a production of G with a dot at some position of the right hand side (except the first) and a list of terminals: is coded as a dictionary with key (rule_number,dot_position) and value a set of terminals.
source code
 
goto(self, items, s)
goto(I,X) where I is a set of kernel items and X a grammar symbol is the closure of the set of all items (A -> sX.r,a) such that (A -> s.Xr,a) is in I
source code
 
NextToDot(self, item)
returns symbol next to the dot or empty string
source code
 
AfterDotTer(self, item, items, path)
returns FIRST of strings after the dot concatenated with lookahead
source code

Inherited from LALRtable1: AfterDot, closure, core_merge, dotatend, get_union, print_items

Inherited from LRtable: __init__, add_action, resolve_shift_reduce, rules_precedence

Instance Variables [hide private]

Inherited from LRtable: Log, gr, operators

Method Details [hide private]

make_action_goto(self)

source code 

collection of LR(0) items

Overrides: LRtable.make_action_goto

items(self)

source code 

An LALR(1) kernel item of a grammar G is a production of G with a dot at some position of the right hand side (except the first) and a list of terminals: is coded as a dictionary with key (rule_number,dot_position) and value a set of terminals.

Overrides: LALRtable1.items

goto(self, items, s)

source code 

goto(I,X) where I is a set of kernel items and X a grammar symbol is the closure of the set of all items (A -> sX.r,a) such that (A -> s.Xr,a) is in I

Overrides: LALRtable1.goto

NextToDot(self, item)

source code 

returns symbol next to the dot or empty string

Overrides: LALRtable1.NextToDot