-
Notifications
You must be signed in to change notification settings - Fork 0
/
parsetab.py
97 lines (90 loc) · 22.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.8'
_lr_method = 'LALR'
_lr_signature = '91C93A81B1C509D3F870302C3ABD3E59'
_lr_action_items = {'REAL':([0,2,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,77,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,115,116,118,125,126,128,129,130,131,132,],[1,1,-9,-6,-10,-2,-8,1,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,1,1,1,1,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,1,-54,-58,-57,-60,-50,1,1,-29,-28,-18,-14,-27,-25,-26,1,-17,1,1,1,1,1,-20,1,-19,]),'NOTEQUALS':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,62,62,62,-62,-63,62,62,-49,62,-51,-53,-61,62,-52,-59,-54,-58,-57,-60,-50,-18,62,-17,62,]),'RETURN':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[6,-9,-6,-10,-2,-8,6,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,6,6,6,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,6,-54,-58,-57,-60,-50,6,6,-29,-28,-18,-14,-27,-25,-26,-17,6,6,6,-20,6,-19,]),'FLOATNUMBER':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,]),'VOID':([118,125,],[122,122,]),'ISEQUALS':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,66,66,66,-62,-63,66,66,-49,66,-51,-53,-61,66,-52,-59,-54,-58,-57,-60,-50,-18,66,-17,66,]),'NUMBER':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,]),'CHAR':([0,2,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,77,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,115,116,118,125,126,128,129,130,131,132,],[22,22,-9,-6,-10,-2,-8,22,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,22,22,22,22,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,22,-54,-58,-57,-60,-50,22,22,-29,-28,-18,-14,-27,-25,-26,22,-17,22,22,22,22,22,-20,22,-19,]),'WHILE':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[4,-9,-6,-10,-2,-8,4,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,4,4,4,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,4,-54,-58,-57,-60,-50,4,4,-29,-28,-18,-14,-27,-25,-26,-17,4,4,4,-20,4,-19,]),'COLON':([99,114,],[112,119,]),'CONST':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[2,-9,-6,-10,-2,-8,2,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,2,2,2,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,2,-54,-58,-57,-60,-50,2,2,-29,-28,-18,-14,-27,-25,-26,-17,2,2,2,-20,2,-19,]),'TRUE':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,]),'MINUS':([4,5,6,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,56,58,59,60,61,62,63,64,65,66,67,68,70,71,72,73,74,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,117,121,],[36,36,36,-42,-45,-43,-48,-39,-35,-46,36,-44,-38,-37,-36,-47,-41,36,-40,68,68,68,36,36,-62,-63,36,36,36,36,36,36,36,36,36,36,36,36,36,36,68,36,68,68,68,68,68,-61,68,68,-59,68,-58,-57,-60,68,-18,68,-17,36,68,]),'DIVIDE':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,65,65,65,-62,-63,65,65,65,65,65,65,-61,65,65,65,65,65,-57,-60,65,-18,65,-17,65,]),'LE':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,70,70,70,-62,-63,70,70,70,70,-51,-53,-61,70,-52,-59,-54,-58,-57,-60,70,-18,70,-17,70,]),'RPAREN':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,59,60,77,79,83,84,85,86,87,88,89,90,92,93,94,95,96,100,102,105,106,107,113,116,120,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-62,-63,99,106,-49,-56,-51,-53,-61,-55,-52,-59,-54,-58,-57,-60,-50,-30,114,116,-18,-33,-32,-17,-31,-34,]),'LT':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,67,67,67,-62,-63,67,67,67,67,-51,-53,-61,67,-52,-59,-54,-58,-57,-60,67,-18,67,-17,67,]),'PLUS':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,71,71,71,-62,-63,71,71,71,71,71,71,-61,71,71,-59,71,-58,-57,-60,71,-18,71,-17,71,]),'SLITERAL':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,]),'COMMA':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,59,60,83,84,85,86,87,88,89,90,92,93,94,95,96,100,102,105,106,107,113,116,120,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-62,-63,-49,-56,-51,-53,-61,-55,-52,-59,-54,-58,-57,-60,-50,-30,115,117,-18,-33,-32,-17,-31,-34,]),'$end':([7,8,9,10,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,103,104,106,108,109,110,111,116,130,132,],[-9,-6,-10,0,-2,-8,-1,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,-54,-58,-57,-60,-50,-29,-28,-18,-14,-27,-25,-26,-17,-20,-19,]),'FUNCTION':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[14,-9,-6,-10,-2,-8,14,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,14,14,14,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,14,-54,-58,-57,-60,-50,14,14,-29,-28,-18,-14,-27,-25,-26,-17,14,14,14,-20,14,-19,]),'GT':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,63,63,63,-62,-63,63,63,63,63,-51,-53,-61,63,-52,-59,-54,-58,-57,-60,63,-18,63,-17,63,]),'MODULO':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,72,72,72,-62,-63,72,72,72,72,72,72,-61,72,72,72,72,72,-57,-60,72,-18,72,-17,72,]),'STRING':([0,2,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,77,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,115,116,118,125,126,128,129,130,131,132,],[16,16,-9,-6,-10,-2,-8,16,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,16,16,16,16,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,16,-54,-58,-57,-60,-50,16,16,-29,-28,-18,-14,-27,-25,-26,16,-17,16,16,16,16,16,-20,16,-19,]),'FOR':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[17,-9,-6,-10,-2,-8,17,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,17,17,17,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,17,-54,-58,-57,-60,-50,17,17,-29,-28,-18,-14,-27,-25,-26,-17,17,17,17,-20,17,-19,]),'PLUSPLUS':([19,],[53,]),'EQUALS':([19,26,28,29,57,],[-42,56,58,-42,81,]),'ELSE':([12,110,],[48,-25,]),'GE':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,64,64,64,-62,-63,64,64,64,64,-51,-53,-61,64,-52,-59,-54,-58,-57,-60,64,-18,64,-17,64,]),'LPAREN':([29,51,55,],[-42,77,79,]),'IN':([52,],[78,]),'MINUSMINUS':([19,],[54,]),'TIMES':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,73,73,73,-62,-63,73,73,73,73,73,73,-61,73,73,73,73,73,-57,-60,73,-18,73,-17,73,]),'ID':([0,1,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47,49,50,53,54,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,101,103,104,106,108,109,110,111,116,117,126,128,129,130,131,132,],[19,-66,29,29,29,29,-9,-6,-10,-2,-8,19,29,-11,-65,52,-4,-7,-5,-68,-64,-67,29,29,-42,-45,-43,-48,-39,-35,-46,29,-44,-38,-37,-36,-47,-41,29,-40,-23,-24,-3,-15,-16,29,29,-62,-63,29,29,29,29,29,29,29,29,19,29,29,29,29,29,19,19,104,29,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,19,-54,-58,-57,-60,-50,19,19,29,-29,-28,-18,-14,-27,-25,-26,-17,29,19,19,19,-20,19,-19,]),'IF':([0,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,126,128,129,130,131,132,],[5,-9,-6,-10,-2,-8,5,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,5,5,5,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,5,-54,-58,-57,-60,-50,5,5,-29,-28,-18,-14,-27,-25,-26,-17,5,5,5,-20,5,-19,]),'AND':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,61,61,61,-62,-63,61,61,-49,61,-51,-53,-61,61,-52,-59,-54,-58,-57,-60,61,-18,61,-17,61,]),'LBRACKET':([1,16,22,23,24,29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,48,59,60,83,84,85,86,87,88,89,90,92,93,94,95,96,106,116,122,123,124,127,],[-66,-65,-68,-64,-67,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,69,75,76,-62,-63,-49,-56,-51,-53,-61,-55,-52,-59,-54,-58,-57,-60,-50,-18,-17,-22,-21,126,129,]),'FALSE':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,]),'INT':([0,2,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,77,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,115,116,118,125,126,128,129,130,131,132,],[23,23,-9,-6,-10,-2,-8,23,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,23,23,23,23,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,23,-54,-58,-57,-60,-50,23,23,-29,-28,-18,-14,-27,-25,-26,23,-17,23,23,23,23,23,-20,23,-19,]),'RETURNS':([112,119,],[118,125,]),'BOOLEAN':([0,2,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,69,75,76,77,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,115,116,118,125,126,128,129,130,131,132,],[24,24,-9,-6,-10,-2,-8,24,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,24,24,24,24,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,24,-54,-58,-57,-60,-50,24,24,-29,-28,-18,-14,-27,-25,-26,24,-17,24,24,24,24,24,-20,24,-19,]),'CALL':([0,4,5,6,7,8,9,11,12,13,15,18,20,21,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47,49,50,53,54,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,117,126,128,129,130,131,132,],[25,25,25,25,-9,-6,-10,-2,-8,25,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,25,-44,-38,-37,-36,-47,-41,25,-40,-23,-24,-3,-15,-16,25,25,-62,-63,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,25,-54,-58,-57,-60,-50,25,25,-29,-28,-18,-14,-27,-25,-26,-17,25,25,25,25,-20,25,-19,]),'NOT':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'RBRACKET':([7,8,9,11,12,15,18,20,21,29,30,31,32,33,34,35,37,38,39,40,41,42,44,47,49,50,53,54,59,60,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,103,104,106,108,109,110,111,116,128,130,131,132,],[-9,-6,-10,-2,-8,-11,-4,-7,-5,-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,-23,-24,-3,-15,-16,-62,-63,-12,-13,-49,-56,-51,-53,-61,-55,-52,-59,109,-54,-58,-57,-60,-50,110,111,-29,-28,-18,-14,-27,-25,-26,-17,130,-20,132,-19,]),'OR':([29,30,31,32,33,34,35,37,38,39,40,41,42,44,45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,106,107,116,121,],[-42,-45,-43,-48,-39,-35,-46,-44,-38,-37,-36,-47,-41,-40,74,74,74,-62,-63,74,74,-49,74,-51,-53,-61,74,-52,-59,-54,-58,-57,-60,-50,-18,74,-17,74,]),}
_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 = {'type_info':([0,2,13,69,75,76,77,91,97,98,115,118,125,126,128,129,131,],[3,27,3,3,3,3,101,3,3,3,101,123,123,3,3,3,3,]),'arguments_list':([79,],[105,]),'unary_minus':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,]),'unary_op':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,]),'simple_expression':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,]),'func_declaration':([0,13,69,75,76,91,97,98,126,128,129,131,],[20,20,20,20,20,20,20,20,20,20,20,20,]),'if_else_statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[7,7,7,7,7,7,7,7,7,7,7,7,]),'return_statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[8,8,8,8,8,8,8,8,8,8,8,8,]),'while_statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[9,9,9,9,9,9,9,9,9,9,9,9,]),'program':([0,],[10,]),'statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[11,50,11,11,11,50,50,50,11,50,11,50,]),'parameter_declaration':([77,115,],[100,120,]),'if_statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[12,12,12,12,12,12,12,12,12,12,12,12,]),'translation_unit':([0,69,75,76,126,129,],[13,91,97,98,128,131,]),'for_statement':([0,13,69,75,76,91,97,98,126,128,129,131,],[15,15,15,15,15,15,15,15,15,15,15,15,]),'assignment':([0,13,69,75,76,91,97,98,126,128,129,131,],[18,18,18,18,18,18,18,18,18,18,18,18,]),'binary_op':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,]),'atom':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,]),'return_type':([118,125,],[124,127,]),'else_statement':([12,],[49,]),'func_call':([0,4,5,6,13,36,43,56,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,91,97,98,117,126,128,129,131,],[21,40,40,40,21,40,40,40,40,40,40,40,40,40,40,40,40,21,40,40,40,40,40,21,21,103,40,21,21,21,40,21,21,21,21,]),'value':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,81,117,],[42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,108,42,]),'params_list':([77,],[102,]),'identifier':([0,3,4,5,6,13,14,25,27,36,43,56,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,91,97,98,101,117,126,128,129,131,],[26,28,44,44,44,26,51,55,57,44,44,44,44,44,44,44,44,44,44,44,44,26,44,44,44,44,44,26,26,44,26,26,26,113,44,26,26,26,26,]),'expression':([4,5,6,36,43,56,58,61,62,63,64,65,66,67,68,70,71,72,73,74,79,117,],[45,46,47,59,60,80,82,83,84,85,86,87,88,89,90,92,93,94,95,96,107,121,]),}
_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' -> program","S'",1,None,None,None),
('program -> translation_unit','program',1,'p_program','parser.py',17),
('translation_unit -> statement','translation_unit',1,'p_translation_unit','parser.py',21),
('translation_unit -> translation_unit statement','translation_unit',2,'p_translation_unit','parser.py',22),
('statement -> assignment','statement',1,'p_statement','parser.py',36),
('statement -> func_call','statement',1,'p_statement','parser.py',37),
('statement -> return_statement','statement',1,'p_statement','parser.py',38),
('statement -> func_declaration','statement',1,'p_statement','parser.py',39),
('statement -> if_statement','statement',1,'p_statement_block','parser.py',44),
('statement -> if_else_statement','statement',1,'p_statement_block','parser.py',45),
('statement -> while_statement','statement',1,'p_statement_block','parser.py',46),
('statement -> for_statement','statement',1,'p_statement_block','parser.py',47),
('assignment -> identifier EQUALS expression','assignment',3,'p_assignment','parser.py',57),
('assignment -> type_info identifier EQUALS expression','assignment',4,'p_decl_assignment','parser.py',62),
('assignment -> CONST type_info identifier EQUALS value','assignment',5,'p_decl_assignment','parser.py',63),
('assignment -> ID PLUSPLUS','assignment',2,'p_assignment_increment','parser.py',71),
('assignment -> ID MINUSMINUS','assignment',2,'p_assignment_decrement','parser.py',75),
('func_call -> CALL identifier LPAREN arguments_list RPAREN','func_call',5,'p_func_call','parser.py',83),
('func_call -> CALL identifier LPAREN RPAREN','func_call',4,'p_func_call','parser.py',84),
('func_declaration -> FUNCTION identifier LPAREN params_list RPAREN COLON RETURNS return_type LBRACKET translation_unit RBRACKET','func_declaration',11,'p_func_declaration','parser.py',94),
('func_declaration -> FUNCTION identifier LPAREN RPAREN COLON RETURNS return_type LBRACKET translation_unit RBRACKET','func_declaration',10,'p_func_declaration','parser.py',95),
('return_type -> type_info','return_type',1,'p_return_type','parser.py',104),
('return_type -> VOID','return_type',1,'p_return_type','parser.py',105),
('return_statement -> RETURN expression','return_statement',2,'p_return_statement','parser.py',109),
('if_else_statement -> if_statement else_statement','if_else_statement',2,'p_if_else_statement','parser.py',119),
('if_statement -> IF expression LBRACKET translation_unit RBRACKET','if_statement',5,'p_if_statement','parser.py',123),
('else_statement -> ELSE LBRACKET translation_unit RBRACKET','else_statement',4,'p_else_statement','parser.py',127),
('while_statement -> WHILE expression LBRACKET translation_unit RBRACKET','while_statement',5,'p_while_statement','parser.py',131),
('for_statement -> FOR ID IN ID','for_statement',4,'p_for_statement','parser.py',135),
('for_statement -> FOR ID IN func_call','for_statement',4,'p_for_statement','parser.py',136),
('params_list -> parameter_declaration','params_list',1,'p_params_list','parser.py',146),
('params_list -> params_list COMMA parameter_declaration','params_list',3,'p_params_list','parser.py',147),
('parameter_declaration -> type_info identifier','parameter_declaration',2,'p_parameter_declaration','parser.py',156),
('arguments_list -> expression','arguments_list',1,'p_arguments_list','parser.py',160),
('arguments_list -> arguments_list COMMA expression','arguments_list',3,'p_arguments_list','parser.py',161),
('expression -> simple_expression','expression',1,'p_expression','parser.py',173),
('expression -> func_call','expression',1,'p_expression','parser.py',174),
('expression -> atom','expression',1,'p_expression','parser.py',175),
('simple_expression -> binary_op','simple_expression',1,'p_simple_expression','parser.py',180),
('simple_expression -> unary_op','simple_expression',1,'p_simple_expression','parser.py',181),
('atom -> identifier','atom',1,'p_atom_expression_','parser.py',187),
('atom -> value','atom',1,'p_atom_expression_','parser.py',188),
('identifier -> ID','identifier',1,'p_identifier','parser.py',193),
('value -> NUMBER','value',1,'p_value','parser.py',197),
('value -> SLITERAL','value',1,'p_value','parser.py',198),
('value -> FLOATNUMBER','value',1,'p_value','parser.py',199),
('value -> TRUE','value',1,'p_value','parser.py',200),
('value -> FALSE','value',1,'p_value','parser.py',201),
('value -> unary_minus','value',1,'p_value','parser.py',202),
('binary_op -> expression AND expression','binary_op',3,'p_binary_op_and','parser.py',208),
('binary_op -> expression OR expression','binary_op',3,'p_binary_op_or','parser.py',212),
('binary_op -> expression GT expression','binary_op',3,'p_binary_op_gt','parser.py',216),
('binary_op -> expression LT expression','binary_op',3,'p_binary_op_lt','parser.py',220),
('binary_op -> expression GE expression','binary_op',3,'p_binary_op_ge','parser.py',224),
('binary_op -> expression LE expression','binary_op',3,'p_binary_op_le','parser.py',228),
('binary_op -> expression ISEQUALS expression','binary_op',3,'p_binary_op_equals','parser.py',232),
('binary_op -> expression NOTEQUALS expression','binary_op',3,'p_binary_op_notequals','parser.py',236),
('binary_op -> expression MODULO expression','binary_op',3,'p_binary_op_mod','parser.py',242),
('binary_op -> expression PLUS expression','binary_op',3,'p_binary_op_plus','parser.py',246),
('binary_op -> expression MINUS expression','binary_op',3,'p_binary_op_minus','parser.py',250),
('binary_op -> expression TIMES expression','binary_op',3,'p_binary_op_times','parser.py',254),
('binary_op -> expression DIVIDE expression','binary_op',3,'p_binary_op_divide','parser.py',258),
('unary_minus -> MINUS expression','unary_minus',2,'p_unary_minus','parser.py',264),
('unary_op -> NOT expression','unary_op',2,'p_unary_op_not','parser.py',272),
('type_info -> INT','type_info',1,'p_type_info','parser.py',276),
('type_info -> STRING','type_info',1,'p_type_info','parser.py',277),
('type_info -> REAL','type_info',1,'p_type_info','parser.py',278),
('type_info -> BOOLEAN','type_info',1,'p_type_info','parser.py',279),
('type_info -> CHAR','type_info',1,'p_type_info','parser.py',280),
]