This repository has been archived by the owner on Aug 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsetab.py
42 lines (35 loc) · 2.49 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
39
40
41
42
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'CHANNEL COLOR EXTEND INT MEMBER PERMISSION REDUCT ROLE TIME\n\tcommand : statement\n\t\n\tstatement : expr\n\t\t\t | expr statement\t\n\t\n\texpr : MEMBER TIME \n\t\t | MEMBER\n\t | ROLE PERMISSION\n\t\t | CHANNEL INT\n\t\n\texpr : EXTEND MEMBER \n\t | EXTEND ROLE\n\t\t | EXTEND CHANNEL\n\t\n\texpr : REDUCT MEMBER \n\t | REDUCT ROLE COLOR\n\t'
_lr_action_items = {'MEMBER':([0,3,4,7,8,10,11,12,13,14,15,16,18,],[4,4,-5,13,16,-4,-6,-7,-8,-9,-10,-11,-12,]),'ROLE':([0,3,4,7,8,10,11,12,13,14,15,16,18,],[5,5,-5,14,17,-4,-6,-7,-8,-9,-10,-11,-12,]),'CHANNEL':([0,3,4,7,10,11,12,13,14,15,16,18,],[6,6,-5,15,-4,-6,-7,-8,-9,-10,-11,-12,]),'EXTEND':([0,3,4,10,11,12,13,14,15,16,18,],[7,7,-5,-4,-6,-7,-8,-9,-10,-11,-12,]),'REDUCT':([0,3,4,10,11,12,13,14,15,16,18,],[8,8,-5,-4,-6,-7,-8,-9,-10,-11,-12,]),'$end':([1,2,3,4,9,10,11,12,13,14,15,16,18,],[0,-1,-2,-5,-3,-4,-6,-7,-8,-9,-10,-11,-12,]),'TIME':([4,],[10,]),'PERMISSION':([5,],[11,]),'INT':([6,],[12,]),'COLOR':([17,],[18,]),}
_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 = {'command':([0,],[1,]),'statement':([0,3,],[2,9,]),'expr':([0,3,],[3,3,]),}
_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' -> command","S'",1,None,None,None),
('command -> statement','command',1,'p_command_statement','parser.py',95),
('statement -> expr','statement',1,'p_statement_expr','parser.py',101),
('statement -> expr statement','statement',2,'p_statement_expr','parser.py',102),
('expr -> MEMBER TIME','expr',2,'p_expr_obj','parser.py',109),
('expr -> MEMBER','expr',1,'p_expr_obj','parser.py',110),
('expr -> ROLE PERMISSION','expr',2,'p_expr_obj','parser.py',111),
('expr -> CHANNEL INT','expr',2,'p_expr_obj','parser.py',112),
('expr -> EXTEND MEMBER','expr',2,'p_extend_expr_obj','parser.py',130),
('expr -> EXTEND ROLE','expr',2,'p_extend_expr_obj','parser.py',131),
('expr -> EXTEND CHANNEL','expr',2,'p_extend_expr_obj','parser.py',132),
('expr -> REDUCT MEMBER','expr',2,'p_reduct_expr_obj','parser.py',149),
('expr -> REDUCT ROLE COLOR','expr',3,'p_reduct_expr_obj','parser.py',150),
]