1
2# parsetab.py
3# This file is automatically generated. Do not edit.
4# pylint: disable=W,C,R
5_tabversion = '3.10'
6
7_lr_method = 'LALR'
8
9_lr_signature = 'leftPLUSMINUSleftTIMESDIVIDErightUMINUSDIVIDE EQUALS LPAREN MINUS NAME NUMBER PLUS RPAREN TIMESexpression : expression PLUS expression\n                  | expression MINUS expression\n                  | expression TIMES expression\n                  | expression DIVIDE expressionstatement : NAME EQUALS expressionstatement : expressionexpression : MINUS expression %prec UMINUSexpression : LPAREN expression RPARENexpression : NUMBERexpression : NAME'
10
11_lr_action_items = {'PLUS':([3,4,5,6,7,12,13,14,15,16,],[-10,8,-9,-7,8,-8,-1,-2,-4,-3,]),'MINUS':([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,],[1,1,1,-10,9,-9,-7,9,1,1,1,1,-8,-1,-2,-4,-3,]),'NUMBER':([0,1,2,8,9,10,11,],[5,5,5,5,5,5,5,]),'LPAREN':([0,1,2,8,9,10,11,],[2,2,2,2,2,2,2,]),'NAME':([0,1,2,8,9,10,11,],[3,3,3,3,3,3,3,]),'TIMES':([3,4,5,6,7,12,13,14,15,16,],[-10,11,-9,-7,11,-8,11,11,-4,-3,]),'$end':([3,4,5,6,12,13,14,15,16,],[-10,0,-9,-7,-8,-1,-2,-4,-3,]),'RPAREN':([3,5,6,7,12,13,14,15,16,],[-10,-9,-7,12,-8,-1,-2,-4,-3,]),'DIVIDE':([3,4,5,6,7,12,13,14,15,16,],[-10,10,-9,-7,10,-8,10,10,-4,-3,]),}
12
13_lr_action = {}
14for _k, _v in _lr_action_items.items():
15   for _x,_y in zip(_v[0],_v[1]):
16      if not _x in _lr_action:  _lr_action[_x] = {}
17      _lr_action[_x][_k] = _y
18del _lr_action_items
19
20_lr_goto_items = {'expression':([0,1,2,8,9,10,11,],[4,6,7,13,14,15,16,]),}
21
22_lr_goto = {}
23for _k, _v in _lr_goto_items.items():
24   for _x, _y in zip(_v[0], _v[1]):
25       if not _x in _lr_goto: _lr_goto[_x] = {}
26       _lr_goto[_x][_k] = _y
27del _lr_goto_items
28_lr_productions = [
29  ("S' -> expression","S'",1,None,None,None),
30  ('expression -> expression PLUS expression','expression',3,'p_expression_binop','expression.py',4),
31  ('expression -> expression MINUS expression','expression',3,'p_expression_binop','expression.py',5),
32  ('expression -> expression TIMES expression','expression',3,'p_expression_binop','expression.py',6),
33  ('expression -> expression DIVIDE expression','expression',3,'p_expression_binop','expression.py',7),
34  ('statement -> NAME EQUALS expression','statement',3,'p_statement_assign','statement.py',4),
35  ('statement -> expression','statement',1,'p_statement_expr','statement.py',8),
36  ('expression -> MINUS expression','expression',2,'p_expression_uminus','expression.py',14),
37  ('expression -> LPAREN expression RPAREN','expression',3,'p_expression_group','expression.py',18),
38  ('expression -> NUMBER','expression',1,'p_expression_number','expression.py',22),
39  ('expression -> NAME','expression',1,'p_expression_name','expression.py',26),
40]
41