-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsetab.py
38 lines (31 loc) · 1.53 KB
/
parsetab.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.8'
_lr_method = 'LALR'
_lr_signature = '73BB558D41BD0E929E879D71CD887FE6'
_lr_action_items = {'CMD':([0,1,2,3,4,5,6,7,8,9,10,],[1,-8,-2,-9,1,-3,-6,-7,-1,-4,-5,]),'RG_NAME':([1,6,],[6,9,]),'ID':([0,1,2,3,4,5,6,7,8,9,10,],[5,-8,-2,-9,5,-3,-6,-7,-1,-4,-5,]),'$end':([1,2,3,4,5,6,7,8,9,10,],[-8,-2,-9,0,-3,-6,-7,-1,-4,-5,]),'WORD':([0,1,2,3,4,5,6,7,8,9,10,],[3,7,-2,-9,3,-3,-6,10,-1,-4,-5,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'term':([0,4,],[2,8,]),'exp_list':([0,],[4,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> exp_list","S'",1,None,None,None),
('exp_list -> exp_list term','exp_list',2,'p_exp_list','grammar.py',29),
('exp_list -> term','exp_list',1,'p_exp_list','grammar.py',30),
('term -> ID','term',1,'p_ID','grammar.py',38),
('term -> CMD RG_NAME RG_NAME','term',3,'p_two_rg_names','grammar.py',43),
('term -> CMD WORD WORD','term',3,'p_two_words','grammar.py',48),
('term -> CMD RG_NAME','term',2,'p_rg_name_cmd','grammar.py',53),
('term -> CMD WORD','term',2,'p_one_word','grammar.py',58),
('term -> CMD','term',1,'p_nular','grammar.py',63),
('term -> WORD','term',1,'p_word','grammar.py',68),
]