Trees | Index | Help |
|
---|
Module parser :: Class LRtable |
|
LALRtable1
,
LR1table
,
SLRtable
LR
table
Method Summary | |
---|---|
| |
Set (action,j) for state i and symbol
a or raise conflict error. | |
make action[i,X] and goto[i,X] All pairs
(i,s) not in action and goto dictionaries are 'error' | |
Operators precedence resolution or standard option: shift | |
Rule precedence obtained as the precedende of the right most terminal. |
Instance Variable Summary | |
---|---|
gr : a context-free grammar | |
Log : Log report for LR table construction | |
operators : operators |
Method Details |
---|
__init__(self,
cfgr,
operators=None,
noconflicts=1,
expect=0)
|
add_action(self, i, a, action, j)Set(action,j) for state i and symbol
a or raise conflict error. Conficts are resolved using the
following rules:
|
make_action_goto(self)makeaction[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 s : rule for shift r : rule for reduce
|
rules_precedence(self)Rule precedence obtained as the precedende of the right most terminal. |
Instance Variable Details |
---|
gra context-free grammar |
LogLog report for LR table construction |
operatorsoperators |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Mar 29 22:42:42 2004 | http://epydoc.sf.net |