Method Summary |
|
closure (self,
items)
The closure of a set of LR(0) items I is the
set of items constructed from I by the two rules: |
|
dotatend(self,
item,
i)
|
|
goto (self,
items,
s)
goto(I,X) where I is a set of items and X a grammar symbol is the
closure of the set of all items A -> sX.r such that A -> s.Xr is in
I |
|
items (self)
An LR(0) item of a grammar G is a production of G with a dot at some
position on the right hand side. |
|
NextToDot (self,
item)
returns symbol next to te dot or empty string |
|
print_items (self,
c)
Print SLR items |
Inherited from LRtable |
|
__init__ (self,
cfgr,
operators,
noconflicts,
expect)
|
|
add_action (self,
i,
a,
action,
j)
Set (action,j) for state i and symbol
a or raise conflict error. |
|
make_action_goto (self)
make action[i,X] and goto[i,X] All pairs
(i,s) not in action and goto dictionaries are 'error' |
|
resolve_shift_reduce (self,
i,
a,
s,
r)
Operators precedence resolution or standard option: shift |
|
rules_precedence (self)
Rule precedence obtained as the precedence of the right most
terminal. |