-
Notifications
You must be signed in to change notification settings - Fork 0
/
parsetab.py
64 lines (57 loc) · 9.8 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '!\x91\x8f\x9a\x1f\xde\xc9\xa5\xabWb\xd5\xdb}\xb50'
_lr_action_items = {'RAISE':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,37,-6,-7,37,-6,37,37,-24,37,-31,37,37,37,37,-13,37,-12,37,37,37,37,37,-15,37,37,-14,37,-8,37,37,37,-9,37,]),'NUMBER':([0,4,5,6,7,9,11,12,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,44,45,67,71,73,],[1,16,16,-1,16,1,16,16,16,16,16,16,16,16,-5,16,16,16,16,16,16,16,16,16,16,-2,16,16,16,16,-3,-4,16,]),'LBRACKET':([0,4,5,6,7,9,11,12,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,44,45,67,71,73,],[2,2,2,-1,2,2,2,2,2,2,2,2,2,2,-5,2,2,2,2,2,2,2,2,2,2,-2,2,2,2,2,-3,-4,2,]),'LCURLY':([0,4,5,6,7,9,11,12,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,44,45,67,71,73,],[3,3,3,-1,3,3,3,3,3,3,3,3,3,3,-5,3,3,3,3,3,3,3,3,3,3,-2,3,3,3,3,-3,-4,3,]),'MINUS':([0,1,4,5,6,7,8,9,10,11,12,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,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,67,69,70,71,72,73,74,],[4,-7,4,4,-1,4,35,4,-6,4,4,-7,-17,-6,-16,35,4,4,4,4,4,4,-5,4,4,4,4,4,4,4,4,4,4,-2,4,4,-24,35,4,4,-31,35,35,35,35,-13,35,-12,35,35,-10,35,35,-15,-11,35,-14,35,-8,35,-3,35,35,-4,-9,4,35,]),'LE':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,23,-6,-7,-17,-6,-16,23,-24,23,-31,23,23,None,None,-13,23,-12,None,None,-10,23,23,-15,-11,23,-14,23,-8,23,23,23,-9,23,]),'RPAREN':([16,17,18,19,20,40,41,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,66,69,70,72,74,],[-7,-17,-6,-16,46,64,-24,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,-27,-28,-15,-11,-21,-14,-8,72,-34,-29,-30,-9,-35,]),'RCURLY':([13,15,68,],[-32,45,-33,]),'NE':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,36,-6,-7,-17,-6,-16,36,-24,36,-31,36,36,-19,-22,-13,-20,-12,-18,-23,-10,36,36,-15,-11,-21,-14,36,-8,36,36,36,-9,36,]),'LT':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,29,-6,-7,-17,-6,-16,29,-24,29,-31,29,29,None,None,-13,29,-12,None,None,-10,29,29,-15,-11,29,-14,29,-8,29,29,29,-9,29,]),'PLUS':([0,1,4,5,6,7,8,9,10,11,12,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,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,67,69,70,71,72,73,74,],[5,-7,5,5,-1,5,31,5,-6,5,5,-7,-17,-6,-16,31,5,5,5,5,5,5,-5,5,5,5,5,5,5,5,5,5,5,-2,5,5,-24,31,5,5,-31,31,31,31,31,-13,31,-12,31,31,-10,31,31,-15,-11,31,-14,31,-8,31,-3,31,31,-4,-9,5,31,]),'COLON':([1,10,],[12,39,]),'$end':([6,9,27,38,67,71,],[-1,0,-5,-2,-3,-4,]),'GT':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,30,-6,-7,-17,-6,-16,30,-24,30,-31,30,30,None,None,-13,30,-12,None,None,-10,30,30,-15,-11,30,-14,30,-8,30,30,30,-9,30,]),'IMPLIES':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,32,-6,-7,-17,-6,-16,32,-24,32,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,-27,-28,-15,-11,-21,-14,32,-8,32,32,32,-9,32,]),'DIVIDE':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,25,-6,-7,25,-6,25,25,-24,25,-31,25,25,25,25,-13,25,-12,25,25,25,25,25,-15,25,25,-14,25,-8,25,25,25,-9,25,]),'PERIOD':([1,8,10,16,17,18,19,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,69,70,72,],[-7,27,-6,-7,-17,-6,-16,-24,67,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,-27,-28,-15,-11,-21,-14,71,-8,-29,-30,-9,]),'TIMES':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,28,-6,-7,28,-6,28,28,-24,28,-31,28,28,28,28,-13,28,-12,28,28,28,28,28,-15,28,28,-14,28,-8,28,28,28,-9,28,]),'GE':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,24,-6,-7,-17,-6,-16,24,-24,24,-31,24,24,None,None,-13,24,-12,None,None,-10,24,24,-15,-11,24,-14,24,-8,24,24,24,-9,24,]),'LPAREN':([0,4,5,6,7,9,10,11,12,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,44,45,67,71,73,],[7,7,7,-1,7,7,40,7,7,40,7,7,7,7,7,7,-5,7,7,7,7,7,7,7,7,7,7,-2,7,7,7,7,-3,-4,7,]),'EQ':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,26,-6,-7,-17,-6,-16,26,-24,26,-31,26,26,-19,-22,-13,-20,-12,-18,-23,-10,26,26,-15,-11,-21,-14,26,-8,26,26,26,-9,26,]),'AND':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,21,-6,-7,-17,-6,-16,21,-24,21,-31,-26,21,-19,-22,-13,-20,-12,-18,-23,-10,21,21,-15,-11,-21,-14,21,-8,21,21,21,-9,21,]),'NAME':([0,2,3,4,5,6,7,9,11,12,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,43,44,45,67,71,73,],[10,13,13,18,18,-1,18,10,18,18,18,18,18,18,18,18,-5,18,18,18,18,18,18,18,18,18,18,-2,18,18,68,18,18,-3,-4,18,]),'NOT':([0,4,5,6,7,9,11,12,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,44,45,67,71,73,],[11,11,11,-1,11,11,11,11,11,11,11,11,11,11,-5,11,11,11,11,11,11,11,11,11,11,-2,11,11,11,11,-3,-4,11,]),'RBRACKET':([13,14,68,],[-32,44,-33,]),'COMMA':([13,14,15,16,17,18,19,41,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,66,68,69,70,72,74,],[-32,43,43,-7,-17,-6,-16,-24,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,-27,-28,-15,-11,-21,-14,-8,73,-34,-33,-29,-30,-9,-35,]),'REMAINDER':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,34,-6,-7,34,-6,34,34,-24,34,-31,34,34,34,34,-13,34,-12,34,34,34,34,34,-15,34,34,-14,34,-8,34,34,34,-9,34,]),'OR':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,22,-6,-7,-17,-6,-16,22,-24,22,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,22,22,-15,-11,-21,-14,22,-8,22,22,22,-9,22,]),'EQUIV':([1,8,10,16,17,18,19,20,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,69,70,72,74,],[-7,33,-6,-7,-17,-6,-16,33,-24,33,-31,-26,-25,-19,-22,-13,-20,-12,-18,-23,-10,-27,-28,-15,-11,-21,-14,33,-8,33,33,33,-9,33,]),}
_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 = {'formula':([0,4,5,7,9,11,12,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,39,40,44,45,73,],[8,17,19,20,8,41,42,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,66,69,70,74,]),'topformulas':([0,],[9,]),'names':([2,3,],[14,15,]),'topformula':([0,9,],[6,38,]),'arguments':([40,],[65,]),}
_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' -> topformulas","S'",1,None,None,None),
('topformulas -> topformula','topformulas',1,'p_topformulas1','decreasoner.py',1672),
('topformulas -> topformulas topformula','topformulas',2,'p_topformulas2','decreasoner.py',1676),
('topformula -> NUMBER COLON formula PERIOD','topformula',4,'p_topformula1','decreasoner.py',1680),
('topformula -> NAME COLON formula PERIOD','topformula',4,'p_topformula2','decreasoner.py',1684),
('topformula -> formula PERIOD','topformula',2,'p_topformula3','decreasoner.py',1688),
('formula -> NAME','formula',1,'p_formula1','decreasoner.py',1692),
('formula -> NUMBER','formula',1,'p_formula2','decreasoner.py',1696),
('formula -> NAME LPAREN RPAREN','formula',3,'p_formula3','decreasoner.py',1700),
('formula -> NAME LPAREN arguments RPAREN','formula',4,'p_formula4','decreasoner.py',1704),
('formula -> formula PLUS formula','formula',3,'p_formula5','decreasoner.py',1708),
('formula -> formula MINUS formula','formula',3,'p_formula6','decreasoner.py',1712),
('formula -> formula TIMES formula','formula',3,'p_formula7','decreasoner.py',1716),
('formula -> formula DIVIDE formula','formula',3,'p_formula8','decreasoner.py',1720),
('formula -> formula RAISE formula','formula',3,'p_formula9','decreasoner.py',1724),
('formula -> formula REMAINDER formula','formula',3,'p_formula10','decreasoner.py',1728),
('formula -> PLUS formula','formula',2,'p_formula11','decreasoner.py',1732),
('formula -> MINUS formula','formula',2,'p_formula12','decreasoner.py',1736),
('formula -> formula LT formula','formula',3,'p_formula13','decreasoner.py',1740),
('formula -> formula LE formula','formula',3,'p_formula14','decreasoner.py',1744),
('formula -> formula EQ formula','formula',3,'p_formula15','decreasoner.py',1748),
('formula -> formula NE formula','formula',3,'p_formula16','decreasoner.py',1752),
('formula -> formula GE formula','formula',3,'p_formula17','decreasoner.py',1756),
('formula -> formula GT formula','formula',3,'p_formula18','decreasoner.py',1760),
('formula -> NOT formula','formula',2,'p_formula19','decreasoner.py',1764),
('formula -> formula OR formula','formula',3,'p_formula20','decreasoner.py',1768),
('formula -> formula AND formula','formula',3,'p_formula21','decreasoner.py',1772),
('formula -> formula IMPLIES formula','formula',3,'p_formula22','decreasoner.py',1776),
('formula -> formula EQUIV formula','formula',3,'p_formula23','decreasoner.py',1780),
('formula -> LBRACKET names RBRACKET formula','formula',4,'p_formula24','decreasoner.py',1784),
('formula -> LCURLY names RCURLY formula','formula',4,'p_formula25','decreasoner.py',1788),
('formula -> LPAREN formula RPAREN','formula',3,'p_formula26','decreasoner.py',1792),
('names -> NAME','names',1,'p_names1','decreasoner.py',1796),
('names -> names COMMA NAME','names',3,'p_names2','decreasoner.py',1800),
('arguments -> formula','arguments',1,'p_arguments1','decreasoner.py',1804),
('arguments -> arguments COMMA formula','arguments',3,'p_arguments2','decreasoner.py',1808),
]