-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsetab.py
39 lines (32 loc) · 2.44 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
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'ALPH COMA EQ FV ID LAM LB LP NUM OP RB RP SEMIexprStart : expr SEMIexprStart : expr LB ID EQ expr RB SEMIexprStart : FV LB expr RB SEMIexprStart : ALPH LB expr COMA ID RB SEMIexpr : NUM\n | IDexpr : LP expr expr RPexpr : LP OP expr expr RPexpr : LP LAM ID expr RP'
_lr_action_items = {'FV':([0,],[4,]),'ALPH':([0,],[5,]),'NUM':([0,3,6,7,10,11,12,13,19,20,21,24,30,31,],[6,-6,-5,6,6,6,6,6,6,6,6,-7,-8,-9,]),'ID':([0,3,6,7,9,10,11,12,13,14,19,20,21,23,24,30,31,],[3,-6,-5,3,15,3,3,3,3,20,3,3,3,29,-7,-8,-9,]),'LP':([0,3,6,7,10,11,12,13,19,20,21,24,30,31,],[7,-6,-5,7,7,7,7,7,7,7,7,-7,-8,-9,]),'$end':([1,8,28,34,35,],[0,-1,-3,-2,-4,]),'SEMI':([2,3,6,22,24,30,31,32,33,],[8,-6,-5,28,-7,-8,-9,34,35,]),'LB':([2,3,4,5,6,24,30,31,],[9,-6,10,11,-5,-7,-8,-9,]),'RB':([3,6,16,24,27,29,30,31,],[-6,-5,22,-7,32,33,-8,-9,]),'COMA':([3,6,17,24,30,31,],[-6,-5,23,-7,-8,-9,]),'RP':([3,6,18,24,25,26,30,31,],[-6,-5,24,-7,30,31,-8,-9,]),'OP':([7,],[13,]),'LAM':([7,],[14,]),'EQ':([15,],[21,]),}
_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 = {'exprStart':([0,],[1,]),'expr':([0,7,10,11,12,13,19,20,21,],[2,12,16,17,18,19,25,26,27,]),}
_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' -> exprStart","S'",1,None,None,None),
('exprStart -> expr SEMI','exprStart',2,'p_normal_start','LambdaParser.py',6),
('exprStart -> expr LB ID EQ expr RB SEMI','exprStart',7,'p_substiute_start','LambdaParser.py',12),
('exprStart -> FV LB expr RB SEMI','exprStart',5,'p_free_variable_start','LambdaParser.py',24),
('exprStart -> ALPH LB expr COMA ID RB SEMI','exprStart',7,'p_alpha_start','LambdaParser.py',33),
('expr -> NUM','expr',1,'p_expression_terminals','LambdaParser.py',43),
('expr -> ID','expr',1,'p_expression_terminals','LambdaParser.py',44),
('expr -> LP expr expr RP','expr',4,'p_expression_body','LambdaParser.py',58),
('expr -> LP OP expr expr RP','expr',5,'p_expression_operation_body','LambdaParser.py',69),
('expr -> LP LAM ID expr RP','expr',5,'p_expression_abstraction','LambdaParser.py',81),
]