-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsetab.py
94 lines (87 loc) · 17.1 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
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'ADDSUB AND AS DIM ELSE END EQUALS FINISH FLOAT FNUMBER FOR GOSUB ID IF INPUT INT LBRACKET LPAREN MULTDIV NEXT NOT NUMBER OR PRINT PRINTLN PROGRAM RBRACKET RELATIONAL RETURN RPAREN SEMICOLON START STRING SUBROUTINE THEN TO WHILE\n S : MAIN_ACTION PROGRAM START DECL R MAIN_ACTION_C B FINISH\n \n MAIN_ACTION_C :\n \n MAIN_ACTION :\n \n R : SUBROUTINE_RULE R\n |\n \n SUBROUTINE_RULE : SUBROUTINE ID SUBACTION B RETURN\n \n SUBACTION :\n \n DECL : DIM ID AS TYPE SEMICOLON DECL\n | DIM ID ARRAY AS TYPE SEMICOLON DECL\n |\n \n ARRAY : ARRAY_RULE ARRAY\n | ARRAY_RULE\n \n ARRAY_RULE : LBRACKET EXPRESSION RBRACKET\n \n TYPE : INT\n | FLOAT\n \n B : STATEMENT B\n | STATEMENT\n |\n \n STATEMENT : IF_RULE\n | IFELSE_RULE\n | WHILE_RULE\n | GOSUB_RULE\n | FOR_RULE\n | PRINT_RULE\n | PRINTLN_RULE\n | INPUT_RULE\n | ASSIGN\n \n INPUT_RULE : INPUT LPAREN EXPRESSION RPAREN SEMICOLON\n \n PRINT_RULE : PRINT LPAREN STRING RPAREN SEMICOLON\n | PRINT LPAREN EXPRESSION RPAREN SEMICOLON\n \n PRINTLN_RULE : PRINTLN LPAREN STRING RPAREN SEMICOLON\n | PRINTLN LPAREN EXPRESSION RPAREN SEMICOLON\n \n GOSUB_RULE : GOSUB ID SEMICOLON\n \n FOR_RULE : FOR ASSIGN TO EXPRESSION FOR_ACTION B NEXT ID\n \n FOR_ACTION :\n \n WHILE_RULE : WHILE LPAREN WHILE_ACTION EXPRESSION WHILE_ACTION_JUMP RPAREN B END\n \n WHILE_ACTION : \n \n WHILE_ACTION_JUMP :\n \n IF_RULE : IF LPAREN EXPRESSION IF_ACTION RPAREN THEN B END\n \n IFELSE_RULE : IF LPAREN EXPRESSION IF_ACTION RPAREN THEN B ELSE_ACTION ELSE_RULE END \n \n ELSE_RULE : ELSE B\n \n IF_ACTION :\n \n ELSE_ACTION :\n \n ASSIGN : ID EQUALS EXPRESSION SEMICOLON\n | ID ARRAY BOUND_CHECK EQUALS EXPRESSION SEMICOLON\n \n BOUND_CHECK :\n \n EXPRESSION : OR_LEVEL\n \n OR_LEVEL : OR_LEVEL OR AND_LEVEL\n | AND_LEVEL\n \n AND_LEVEL : AND_LEVEL AND RELATIONAL_LEVEL\n | RELATIONAL_LEVEL\n \n RELATIONAL_LEVEL : RELATIONAL_LEVEL RELATIONAL ADDSUB_LEVEL\n | ADDSUB_LEVEL\n \n ADDSUB_LEVEL : ADDSUB_LEVEL ADDSUB MULTDIV_LEVEL\n | MULTDIV_LEVEL\n \n MULTDIV_LEVEL : MULTDIV_LEVEL MULTDIV NOT_LEVEL\n | NOT_LEVEL\n \n NOT_LEVEL : NOT NOT_LEVEL\n | F\n \n F : ID\n | ID ARRAY BOUND_CHECK\n | FNUMBER\n | NUMBER\n | LPAREN EXPRESSION RPAREN\n \n '
_lr_action_items = {'PROGRAM':([0,2,],[-3,3,]),'$end':([1,56,],[0,-1,]),'START':([3,],[4,]),'DIM':([4,68,92,],[6,6,6,]),'SUBROUTINE':([4,5,8,68,90,91,92,110,],[-10,9,9,-10,-6,-8,-10,-9,]),'IF':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,29,-4,-7,-12,29,-19,-20,-21,-22,-23,-24,-25,-26,-27,29,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,29,-29,-30,-31,-32,-28,29,29,-45,-39,-36,-34,29,-40,]),'WHILE':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,30,-4,-7,-12,30,-19,-20,-21,-22,-23,-24,-25,-26,-27,30,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,30,-29,-30,-31,-32,-28,30,30,-45,-39,-36,-34,30,-40,]),'GOSUB':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,31,-4,-7,-12,31,-19,-20,-21,-22,-23,-24,-25,-26,-27,31,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,31,-29,-30,-31,-32,-28,31,31,-45,-39,-36,-34,31,-40,]),'FOR':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,33,-4,-7,-12,33,-19,-20,-21,-22,-23,-24,-25,-26,-27,33,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,33,-29,-30,-31,-32,-28,33,33,-45,-39,-36,-34,33,-40,]),'PRINT':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,34,-4,-7,-12,34,-19,-20,-21,-22,-23,-24,-25,-26,-27,34,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,34,-29,-30,-31,-32,-28,34,34,-45,-39,-36,-34,34,-40,]),'PRINTLN':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,35,-4,-7,-12,35,-19,-20,-21,-22,-23,-24,-25,-26,-27,35,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,35,-29,-30,-31,-32,-28,35,35,-45,-39,-36,-34,35,-40,]),'INPUT':([4,5,7,8,11,12,13,16,19,20,21,22,23,24,25,26,27,28,37,42,44,45,46,47,48,49,51,52,53,54,68,70,76,77,81,90,91,92,93,94,95,96,97,98,99,102,104,110,114,115,116,117,118,119,120,121,122,127,129,130,132,133,],[-10,-5,-2,-5,36,-4,-7,-12,36,-19,-20,-21,-22,-23,-24,-25,-26,-27,36,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-10,-13,-58,-46,-33,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,-35,-9,36,-29,-30,-31,-32,-28,36,36,-45,-39,-36,-34,36,-40,]),'ID':([4,5,6,7,8,9,11,12,13,16,17,19,20,21,22,23,24,25,26,27,28,31,33,37,42,44,45,46,47,48,49,50,51,52,53,54,55,58,59,61,64,65,66,68,70,71,72,73,74,75,76,77,80,81,84,90,91,92,93,94,95,96,97,98,99,102,103,104,110,114,115,116,117,118,119,120,121,122,126,127,129,130,132,133,],[-10,-5,10,-2,-5,13,32,-4,-7,-12,52,32,-19,-20,-21,-22,-23,-24,-25,-26,-27,60,32,32,-11,-47,-49,-51,-53,-55,-57,52,-59,-60,-62,-63,52,52,-37,52,52,52,52,-10,-13,52,52,52,52,52,-58,-46,52,-33,52,-6,-8,-10,-48,-50,-52,-54,-56,-61,-64,-44,52,-35,-9,32,-29,-30,-31,-32,-28,32,32,-45,130,-39,-36,-34,32,-40,]),'FINISH':([4,5,7,8,11,12,18,19,20,21,22,23,24,25,26,27,28,57,68,81,90,91,92,102,110,115,116,117,118,119,122,127,129,130,133,],[-10,-5,-2,-5,-18,-4,56,-17,-19,-20,-21,-22,-23,-24,-25,-26,-27,-16,-10,-33,-6,-8,-10,-44,-9,-29,-30,-31,-32,-28,-45,-39,-36,-34,-40,]),'AS':([10,15,16,42,70,],[14,41,-12,-11,-13,]),'LBRACKET':([10,16,32,52,70,],[17,17,17,17,-13,]),'RETURN':([13,19,20,21,22,23,24,25,26,27,28,37,57,67,81,102,115,116,117,118,119,122,127,129,130,133,],[-7,-17,-19,-20,-21,-22,-23,-24,-25,-26,-27,-18,-16,90,-33,-44,-29,-30,-31,-32,-28,-45,-39,-36,-34,-40,]),'INT':([14,41,],[39,39,]),'FLOAT':([14,41,],[40,40,]),'EQUALS':([16,32,42,62,70,83,],[-12,61,-11,-46,-13,103,]),'MULTDIV':([16,42,48,49,51,52,53,54,70,76,77,96,97,98,99,],[-12,-11,75,-57,-59,-60,-62,-63,-13,-58,-46,75,-56,-61,-64,]),'ADDSUB':([16,42,47,48,49,51,52,53,54,70,76,77,95,96,97,98,99,],[-12,-11,74,-55,-57,-59,-60,-62,-63,-13,-58,-46,74,-54,-56,-61,-64,]),'RELATIONAL':([16,42,46,47,48,49,51,52,53,54,70,76,77,94,95,96,97,98,99,],[-12,-11,73,-53,-55,-57,-59,-60,-62,-63,-13,-58,-46,73,-52,-54,-56,-61,-64,]),'AND':([16,42,45,46,47,48,49,51,52,53,54,70,76,77,93,94,95,96,97,98,99,],[-12,-11,72,-51,-53,-55,-57,-59,-60,-62,-63,-13,-58,-46,72,-50,-52,-54,-56,-61,-64,]),'OR':([16,42,44,45,46,47,48,49,51,52,53,54,70,76,77,93,94,95,96,97,98,99,],[-12,-11,71,-49,-51,-53,-55,-57,-59,-60,-62,-63,-13,-58,-46,-48,-50,-52,-54,-56,-61,-64,]),'RBRACKET':([16,42,43,44,45,46,47,48,49,51,52,53,54,70,76,77,93,94,95,96,97,98,99,],[-12,-11,70,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-13,-58,-46,-48,-50,-52,-54,-56,-61,-64,]),'RPAREN':([16,42,44,45,46,47,48,49,51,52,53,54,70,76,77,78,79,85,86,87,88,89,93,94,95,96,97,98,99,100,101,112,],[-12,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-13,-58,-46,99,-42,105,106,107,108,109,-48,-50,-52,-54,-56,-61,-64,111,-38,121,]),'SEMICOLON':([16,38,39,40,42,44,45,46,47,48,49,51,52,53,54,60,69,70,76,77,82,93,94,95,96,97,98,99,105,106,107,108,109,113,],[-12,68,-14,-15,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,81,92,-13,-58,-46,102,-48,-50,-52,-54,-56,-61,-64,115,116,117,118,119,122,]),'NEXT':([16,19,20,21,22,23,24,25,26,27,28,42,44,45,46,47,48,49,51,52,53,54,57,70,76,77,81,93,94,95,96,97,98,99,102,104,114,115,116,117,118,119,122,123,127,129,130,133,],[-12,-17,-19,-20,-21,-22,-23,-24,-25,-26,-27,-11,-47,-49,-51,-53,-55,-57,-59,-60,-62,-63,-16,-13,-58,-46,-33,-48,-50,-52,-54,-56,-61,-64,-44,-35,-18,-29,-30,-31,-32,-28,-45,126,-39,-36,-34,-40,]),'NOT':([17,50,55,58,59,61,64,65,66,71,72,73,74,75,80,84,103,],[50,50,50,50,-37,50,50,50,50,50,50,50,50,50,50,50,50,]),'FNUMBER':([17,50,55,58,59,61,64,65,66,71,72,73,74,75,80,84,103,],[53,53,53,53,-37,53,53,53,53,53,53,53,53,53,53,53,53,]),'NUMBER':([17,50,55,58,59,61,64,65,66,71,72,73,74,75,80,84,103,],[54,54,54,54,-37,54,54,54,54,54,54,54,54,54,54,54,54,]),'LPAREN':([17,29,30,34,35,36,50,55,58,59,61,64,65,66,71,72,73,74,75,80,84,103,],[55,58,59,64,65,66,55,55,55,-37,55,55,55,55,55,55,55,55,55,55,55,55,]),'END':([19,20,21,22,23,24,25,26,27,28,57,81,102,115,116,117,118,119,120,121,122,124,125,127,129,130,131,132,133,134,],[-17,-19,-20,-21,-22,-23,-24,-25,-26,-27,-16,-33,-44,-29,-30,-31,-32,-28,-18,-18,-45,127,129,-39,-36,-34,133,-18,-40,-41,]),'ELSE':([19,20,21,22,23,24,25,26,27,28,57,81,102,115,116,117,118,119,120,122,124,127,128,129,130,133,],[-17,-19,-20,-21,-22,-23,-24,-25,-26,-27,-16,-33,-44,-29,-30,-31,-32,-28,-18,-45,-43,-39,132,-36,-34,-40,]),'TO':([63,102,122,],[84,-44,-45,]),'STRING':([64,65,],[85,87,]),'THEN':([111,],[120,]),}
_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 = {'S':([0,],[1,]),'MAIN_ACTION':([0,],[2,]),'DECL':([4,68,92,],[5,91,110,]),'R':([5,8,],[7,12,]),'SUBROUTINE_RULE':([5,8,],[8,8,]),'MAIN_ACTION_C':([7,],[11,]),'ARRAY':([10,16,32,52,],[15,42,62,77,]),'ARRAY_RULE':([10,16,32,52,],[16,16,16,16,]),'B':([11,19,37,114,120,121,132,],[18,57,67,123,124,125,134,]),'STATEMENT':([11,19,37,114,120,121,132,],[19,19,19,19,19,19,19,]),'IF_RULE':([11,19,37,114,120,121,132,],[20,20,20,20,20,20,20,]),'IFELSE_RULE':([11,19,37,114,120,121,132,],[21,21,21,21,21,21,21,]),'WHILE_RULE':([11,19,37,114,120,121,132,],[22,22,22,22,22,22,22,]),'GOSUB_RULE':([11,19,37,114,120,121,132,],[23,23,23,23,23,23,23,]),'FOR_RULE':([11,19,37,114,120,121,132,],[24,24,24,24,24,24,24,]),'PRINT_RULE':([11,19,37,114,120,121,132,],[25,25,25,25,25,25,25,]),'PRINTLN_RULE':([11,19,37,114,120,121,132,],[26,26,26,26,26,26,26,]),'INPUT_RULE':([11,19,37,114,120,121,132,],[27,27,27,27,27,27,27,]),'ASSIGN':([11,19,33,37,114,120,121,132,],[28,28,63,28,28,28,28,28,]),'SUBACTION':([13,],[37,]),'TYPE':([14,41,],[38,69,]),'EXPRESSION':([17,55,58,61,64,65,66,80,84,103,],[43,78,79,82,86,88,89,101,104,113,]),'OR_LEVEL':([17,55,58,61,64,65,66,80,84,103,],[44,44,44,44,44,44,44,44,44,44,]),'AND_LEVEL':([17,55,58,61,64,65,66,71,80,84,103,],[45,45,45,45,45,45,45,93,45,45,45,]),'RELATIONAL_LEVEL':([17,55,58,61,64,65,66,71,72,80,84,103,],[46,46,46,46,46,46,46,46,94,46,46,46,]),'ADDSUB_LEVEL':([17,55,58,61,64,65,66,71,72,73,80,84,103,],[47,47,47,47,47,47,47,47,47,95,47,47,47,]),'MULTDIV_LEVEL':([17,55,58,61,64,65,66,71,72,73,74,80,84,103,],[48,48,48,48,48,48,48,48,48,48,96,48,48,48,]),'NOT_LEVEL':([17,50,55,58,61,64,65,66,71,72,73,74,75,80,84,103,],[49,76,49,49,49,49,49,49,49,49,49,49,97,49,49,49,]),'F':([17,50,55,58,61,64,65,66,71,72,73,74,75,80,84,103,],[51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,]),'WHILE_ACTION':([59,],[80,]),'BOUND_CHECK':([62,77,],[83,98,]),'IF_ACTION':([79,],[100,]),'WHILE_ACTION_JUMP':([101,],[112,]),'FOR_ACTION':([104,],[114,]),'ELSE_ACTION':([124,],[128,]),'ELSE_RULE':([128,],[131,]),}
_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' -> S","S'",1,None,None,None),
('S -> MAIN_ACTION PROGRAM START DECL R MAIN_ACTION_C B FINISH','S',8,'p_S','TA.py',110),
('MAIN_ACTION_C -> <empty>','MAIN_ACTION_C',0,'p_MAIN_ACTION_C','TA.py',116),
('MAIN_ACTION -> <empty>','MAIN_ACTION',0,'p_MAIN_ACTION','TA.py',123),
('R -> SUBROUTINE_RULE R','R',2,'p_R','TA.py',130),
('R -> <empty>','R',0,'p_R','TA.py',131),
('SUBROUTINE_RULE -> SUBROUTINE ID SUBACTION B RETURN','SUBROUTINE_RULE',5,'p_SUBROURINTE_RULE','TA.py',136),
('SUBACTION -> <empty>','SUBACTION',0,'p_SUBACTION','TA.py',146),
('DECL -> DIM ID AS TYPE SEMICOLON DECL','DECL',6,'p_DECL','TA.py',154),
('DECL -> DIM ID ARRAY AS TYPE SEMICOLON DECL','DECL',7,'p_DECL','TA.py',155),
('DECL -> <empty>','DECL',0,'p_DECL','TA.py',156),
('ARRAY -> ARRAY_RULE ARRAY','ARRAY',2,'p_ARRAY','TA.py',171),
('ARRAY -> ARRAY_RULE','ARRAY',1,'p_ARRAY','TA.py',172),
('ARRAY_RULE -> LBRACKET EXPRESSION RBRACKET','ARRAY_RULE',3,'p_ARRAY_RULE','TA.py',181),
('TYPE -> INT','TYPE',1,'p_TYPE','TA.py',187),
('TYPE -> FLOAT','TYPE',1,'p_TYPE','TA.py',188),
('B -> STATEMENT B','B',2,'p_B','TA.py',194),
('B -> STATEMENT','B',1,'p_B','TA.py',195),
('B -> <empty>','B',0,'p_B','TA.py',196),
('STATEMENT -> IF_RULE','STATEMENT',1,'p_STATEMENT','TA.py',201),
('STATEMENT -> IFELSE_RULE','STATEMENT',1,'p_STATEMENT','TA.py',202),
('STATEMENT -> WHILE_RULE','STATEMENT',1,'p_STATEMENT','TA.py',203),
('STATEMENT -> GOSUB_RULE','STATEMENT',1,'p_STATEMENT','TA.py',204),
('STATEMENT -> FOR_RULE','STATEMENT',1,'p_STATEMENT','TA.py',205),
('STATEMENT -> PRINT_RULE','STATEMENT',1,'p_STATEMENT','TA.py',206),
('STATEMENT -> PRINTLN_RULE','STATEMENT',1,'p_STATEMENT','TA.py',207),
('STATEMENT -> INPUT_RULE','STATEMENT',1,'p_STATEMENT','TA.py',208),
('STATEMENT -> ASSIGN','STATEMENT',1,'p_STATEMENT','TA.py',209),
('INPUT_RULE -> INPUT LPAREN EXPRESSION RPAREN SEMICOLON','INPUT_RULE',5,'p_INPUT_RULE','TA.py',214),
('PRINT_RULE -> PRINT LPAREN STRING RPAREN SEMICOLON','PRINT_RULE',5,'p_PRINT_RULE','TA.py',234),
('PRINT_RULE -> PRINT LPAREN EXPRESSION RPAREN SEMICOLON','PRINT_RULE',5,'p_PRINT_RULE','TA.py',235),
('PRINTLN_RULE -> PRINTLN LPAREN STRING RPAREN SEMICOLON','PRINTLN_RULE',5,'p_PRINTLN_RULE','TA.py',242),
('PRINTLN_RULE -> PRINTLN LPAREN EXPRESSION RPAREN SEMICOLON','PRINTLN_RULE',5,'p_PRINTLN_RULE','TA.py',243),
('GOSUB_RULE -> GOSUB ID SEMICOLON','GOSUB_RULE',3,'p_GOSUB_RULE','TA.py',250),
('FOR_RULE -> FOR ASSIGN TO EXPRESSION FOR_ACTION B NEXT ID','FOR_RULE',8,'p_FOR_RULE','TA.py',262),
('FOR_ACTION -> <empty>','FOR_ACTION',0,'p_FOR_ACTION','TA.py',275),
('WHILE_RULE -> WHILE LPAREN WHILE_ACTION EXPRESSION WHILE_ACTION_JUMP RPAREN B END','WHILE_RULE',8,'p_WHILE_RULE','TA.py',287),
('WHILE_ACTION -> <empty>','WHILE_ACTION',0,'p_WHILE_ACTION','TA.py',299),
('WHILE_ACTION_JUMP -> <empty>','WHILE_ACTION_JUMP',0,'p_WHILE_ACTION_JUMP','TA.py',306),
('IF_RULE -> IF LPAREN EXPRESSION IF_ACTION RPAREN THEN B END','IF_RULE',8,'p_IF_RULE','TA.py',315),
('IFELSE_RULE -> IF LPAREN EXPRESSION IF_ACTION RPAREN THEN B ELSE_ACTION ELSE_RULE END','IFELSE_RULE',10,'p_IFELSE_RULE','TA.py',324),
('ELSE_RULE -> ELSE B','ELSE_RULE',2,'p_ELSE_RULE','TA.py',333),
('IF_ACTION -> <empty>','IF_ACTION',0,'p_IF_ACTION','TA.py',339),
('ELSE_ACTION -> <empty>','ELSE_ACTION',0,'p_ELSE_ACTION','TA.py',347),
('ASSIGN -> ID EQUALS EXPRESSION SEMICOLON','ASSIGN',4,'p_ASSIGN','TA.py',359),
('ASSIGN -> ID ARRAY BOUND_CHECK EQUALS EXPRESSION SEMICOLON','ASSIGN',6,'p_ASSIGN','TA.py',360),
('BOUND_CHECK -> <empty>','BOUND_CHECK',0,'p_BOUND_CHECK','TA.py',384),
('EXPRESSION -> OR_LEVEL','EXPRESSION',1,'p_EXPRESSION','TA.py',392),
('OR_LEVEL -> OR_LEVEL OR AND_LEVEL','OR_LEVEL',3,'p_OR_LEVEL','TA.py',399),
('OR_LEVEL -> AND_LEVEL','OR_LEVEL',1,'p_OR_LEVEL','TA.py',400),
('AND_LEVEL -> AND_LEVEL AND RELATIONAL_LEVEL','AND_LEVEL',3,'p_AND_LEVEL','TA.py',411),
('AND_LEVEL -> RELATIONAL_LEVEL','AND_LEVEL',1,'p_AND_LEVEL','TA.py',412),
('RELATIONAL_LEVEL -> RELATIONAL_LEVEL RELATIONAL ADDSUB_LEVEL','RELATIONAL_LEVEL',3,'p_RELATIONAL_LEVEL','TA.py',423),
('RELATIONAL_LEVEL -> ADDSUB_LEVEL','RELATIONAL_LEVEL',1,'p_RELATIONAL_LEVEL','TA.py',424),
('ADDSUB_LEVEL -> ADDSUB_LEVEL ADDSUB MULTDIV_LEVEL','ADDSUB_LEVEL',3,'p_ADDSUB_LEVEL','TA.py',446),
('ADDSUB_LEVEL -> MULTDIV_LEVEL','ADDSUB_LEVEL',1,'p_ADDSUB_LEVEL','TA.py',447),
('MULTDIV_LEVEL -> MULTDIV_LEVEL MULTDIV NOT_LEVEL','MULTDIV_LEVEL',3,'p_MULTDIV_LEVEL','TA.py',461),
('MULTDIV_LEVEL -> NOT_LEVEL','MULTDIV_LEVEL',1,'p_MULTDIV_LEVEL','TA.py',462),
('NOT_LEVEL -> NOT NOT_LEVEL','NOT_LEVEL',2,'p_NOT_LEVEL','TA.py',481),
('NOT_LEVEL -> F','NOT_LEVEL',1,'p_NOT_LEVEL','TA.py',482),
('F -> ID','F',1,'p_F','TA.py',494),
('F -> ID ARRAY BOUND_CHECK','F',3,'p_F','TA.py',495),
('F -> FNUMBER','F',1,'p_F','TA.py',496),
('F -> NUMBER','F',1,'p_F','TA.py',497),
('F -> LPAREN EXPRESSION RPAREN','F',3,'p_F','TA.py',498),
]