pcpp.parsetab module

Source code
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'

_lr_method = 'LALR'

_lr_signature = 'leftCPP_COMMAleftCPP_QUESTIONCPP_COLONleftCPP_LOGICALORleftCPP_LOGICALANDleftCPP_BARleftCPP_HATleftCPP_AMPERSANDleftCPP_EQUALITYCPP_INEQUALITYleftCPP_LESSCPP_LESSEQUALCPP_GREATERCPP_GREATEREQUALleftCPP_LSHIFTCPP_RSHIFTleftCPP_PLUSCPP_MINUSleftCPP_STARCPP_FSLASHCPP_PERCENTrightUPLUSUMINUSCPP_EXCLAMATIONCPP_TILDECPP_AMPERSAND CPP_BAR CPP_CHAR CPP_COLON CPP_COMMA CPP_EQUALITY CPP_EXCLAMATION CPP_FSLASH CPP_GREATER CPP_GREATEREQUAL CPP_HAT CPP_ID CPP_INEQUALITY CPP_INTEGER CPP_LESS CPP_LESSEQUAL CPP_LOGICALAND CPP_LOGICALOR CPP_LPAREN CPP_LSHIFT CPP_MINUS CPP_PERCENT CPP_PLUS CPP_QUESTION CPP_RPAREN CPP_RSHIFT CPP_STAR CPP_STRING CPP_TILDEexpression : CPP_INTEGERexpression : CPP_CHAR\n    expression : CPP_STRING\n              | CPP_LESS expression CPP_GREATER\n    expression : CPP_LPAREN expression CPP_RPARENexpression : CPP_PLUS expression %prec UPLUSexpression : CPP_MINUS expression %prec UMINUS\n    expression : CPP_EXCLAMATION expression\n              | CPP_TILDE expression\n    \n    expression : expression CPP_STAR expression\n              | expression CPP_FSLASH expression\n              | expression CPP_PERCENT expression\n              | expression CPP_PLUS expression\n              | expression CPP_MINUS expression\n              | expression CPP_LSHIFT expression\n              | expression CPP_RSHIFT expression\n              | expression CPP_LESS expression\n              | expression CPP_LESSEQUAL expression\n              | expression CPP_GREATER expression\n              | expression CPP_GREATEREQUAL expression\n              | expression CPP_EQUALITY expression\n              | expression CPP_INEQUALITY expression\n              | expression CPP_AMPERSAND expression\n              | expression CPP_HAT expression\n              | expression CPP_BAR expression\n              | expression CPP_LOGICALAND expression\n              | expression CPP_LOGICALOR expression\n              | expression CPP_COMMA expression\n    expression : expression CPP_QUESTION expression CPP_COLON expressionexpression : CPP_ID CPP_LPAREN expression CPP_RPARENexpression : CPP_ID'
    
_lr_action_items = {'CPP_ID':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,]),'CPP_LSHIFT':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,18,-8,-6,18,-7,18,-9,18,-5,-4,-15,18,18,18,18,-12,18,18,18,-13,18,-11,18,18,-14,-10,18,18,18,-16,-30,18,]),'CPP_STRING':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,]),'CPP_LESSEQUAL':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,19,-8,-6,19,-7,19,-9,19,-5,-4,-15,-18,-20,19,19,-12,19,19,19,-13,19,-11,19,19,-14,-10,19,-19,-17,-16,-30,19,]),'CPP_GREATEREQUAL':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,20,-8,-6,20,-7,20,-9,20,-5,-4,-15,-18,-20,20,20,-12,20,20,20,-13,20,-11,20,20,-14,-10,20,-19,-17,-16,-30,20,]),'CPP_LOGICALOR':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,21,-8,-6,21,-7,21,-9,21,-5,-4,-15,-18,-20,-27,-26,-12,-23,21,-25,-13,-22,-11,-21,-24,-14,-10,21,-19,-17,-16,-30,21,]),'CPP_LOGICALAND':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,22,-8,-6,22,-7,22,-9,22,-5,-4,-15,-18,-20,22,-26,-12,-23,22,-25,-13,-22,-11,-21,-24,-14,-10,22,-19,-17,-16,-30,22,]),'CPP_EXCLAMATION':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,]),'CPP_PERCENT':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,23,-8,-6,23,-7,23,-9,23,-5,-4,23,23,23,23,23,-12,23,23,23,23,23,-11,23,23,23,-10,23,23,23,23,-30,23,]),'CPP_AMPERSAND':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,24,-8,-6,24,-7,24,-9,24,-5,-4,-15,-18,-20,24,24,-12,-23,24,24,-13,-22,-11,-21,24,-14,-10,24,-19,-17,-16,-30,24,]),'CPP_QUESTION':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,25,-8,-6,25,-7,25,-9,25,-5,-4,-15,-18,-20,-27,-26,-12,-23,25,-25,-13,-22,-11,-21,-24,-14,-10,25,-19,-17,-16,-30,-29,]),'CPP_BAR':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,26,-8,-6,26,-7,26,-9,26,-5,-4,-15,-18,-20,26,26,-12,-23,26,-25,-13,-22,-11,-21,-24,-14,-10,26,-19,-17,-16,-30,26,]),'$end':([1,2,5,7,10,13,14,16,38,40,41,42,43,44,45,46,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,64,],[-31,-3,-2,-1,0,-8,-6,-7,-9,-5,-4,-15,-18,-20,-27,-26,-12,-23,-25,-13,-22,-11,-21,-24,-14,-10,-28,-19,-17,-16,-30,-29,]),'CPP_PLUS':([0,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,],[4,-31,-3,4,4,-2,4,-1,4,4,27,4,4,-8,-6,27,-7,27,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,-9,27,-5,4,27,27,27,27,27,-12,27,27,27,-13,27,-11,27,27,-14,-10,27,27,27,27,-30,4,27,]),'CPP_INEQUALITY':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,28,-8,-6,28,-7,28,-9,28,-5,-4,-15,-18,-20,28,28,-12,28,28,28,-13,-22,-11,-21,28,-14,-10,28,-19,-17,-16,-30,28,]),'CPP_CHAR':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,]),'CPP_LPAREN':([0,1,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[6,12,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,]),'CPP_FSLASH':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,29,-8,-6,29,-7,29,-9,29,-5,-4,29,29,29,29,29,-12,29,29,29,29,29,-11,29,29,29,-10,29,29,29,29,-30,29,]),'CPP_INTEGER':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,]),'CPP_HAT':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,31,-8,-6,31,-7,31,-9,31,-5,-4,-15,-18,-20,31,31,-12,-23,31,31,-13,-22,-11,-21,-24,-14,-10,31,-19,-17,-16,-30,31,]),'CPP_EQUALITY':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,30,-8,-6,30,-7,30,-9,30,-5,-4,-15,-18,-20,30,30,-12,30,30,30,-13,-22,-11,-21,30,-14,-10,30,-19,-17,-16,-30,30,]),'CPP_MINUS':([0,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,],[8,-31,-3,8,8,-2,8,-1,8,8,32,8,8,-8,-6,32,-7,32,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,-9,32,-5,8,32,32,32,32,32,-12,32,32,32,-13,32,-11,32,32,-14,-10,32,32,32,32,-30,8,32,]),'CPP_STAR':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,33,-8,-6,33,-7,33,-9,33,-5,-4,33,33,33,33,33,-12,33,33,33,33,33,-11,33,33,33,-10,33,33,33,33,-30,33,]),'CPP_COMMA':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,34,-8,-6,34,-7,34,-9,34,-5,-4,-15,-18,-20,-27,-26,-12,-23,34,-25,-13,-22,-11,-21,-24,-14,-10,-28,-19,-17,-16,-30,-29,]),'CPP_GREATER':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,35,-8,-6,35,-7,41,-9,35,-5,-4,-15,-18,-20,35,35,-12,35,35,35,-13,35,-11,35,35,-14,-10,35,-19,-17,-16,-30,35,]),'CPP_RSHIFT':([1,2,5,7,10,13,14,15,16,17,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,64,],[-31,-3,-2,-1,37,-8,-6,37,-7,37,-9,37,-5,-4,-15,37,37,37,37,-12,37,37,37,-13,37,-11,37,37,-14,-10,37,37,37,-16,-30,37,]),'CPP_LESS':([0,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,],[9,-31,-3,9,9,-2,9,-1,9,9,36,9,9,-8,-6,36,-7,36,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,-9,36,-5,-4,-15,-18,-20,36,36,-12,36,36,36,-13,36,-11,36,36,-14,-10,36,-19,-17,-16,-30,9,36,]),'CPP_COLON':([1,2,5,7,13,14,16,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,],[-31,-3,-2,-1,-8,-6,-7,-9,-5,-4,-15,-18,-20,-27,-26,-12,-23,63,-25,-13,-22,-11,-21,-24,-14,-10,-28,-19,-17,-16,-30,-29,]),'CPP_TILDE':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,]),'CPP_RPAREN':([1,2,5,7,13,14,15,16,38,39,40,41,42,43,44,45,46,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,64,],[-31,-3,-2,-1,-8,-6,40,-7,-9,62,-5,-4,-15,-18,-20,-27,-26,-12,-23,-25,-13,-22,-11,-21,-24,-14,-10,-28,-19,-17,-16,-30,-29,]),}

_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 = {'expression':([0,3,4,6,8,9,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,41,63,],[10,13,14,15,16,17,38,39,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,59,64,]),}

_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' -> expression","S'",1,None,None,None),
  ('expression -> CPP_INTEGER','expression',1,'p_expression_number','evaluator.py',396),
  ('expression -> CPP_CHAR','expression',1,'p_expression_character','evaluator.py',400),
  ('expression -> CPP_STRING','expression',1,'p_expression_string','evaluator.py',405),
  ('expression -> CPP_LESS expression CPP_GREATER','expression',3,'p_expression_string','evaluator.py',406),
  ('expression -> CPP_LPAREN expression CPP_RPAREN','expression',3,'p_expression_group','evaluator.py',411),
  ('expression -> CPP_PLUS expression','expression',2,'p_expression_uplus','evaluator.py',415),
  ('expression -> CPP_MINUS expression','expression',2,'p_expression_uminus','evaluator.py',419),
  ('expression -> CPP_EXCLAMATION expression','expression',2,'p_expression_unop','evaluator.py',424),
  ('expression -> CPP_TILDE expression','expression',2,'p_expression_unop','evaluator.py',425),
  ('expression -> expression CPP_STAR expression','expression',3,'p_expression_binop','evaluator.py',437),
  ('expression -> expression CPP_FSLASH expression','expression',3,'p_expression_binop','evaluator.py',438),
  ('expression -> expression CPP_PERCENT expression','expression',3,'p_expression_binop','evaluator.py',439),
  ('expression -> expression CPP_PLUS expression','expression',3,'p_expression_binop','evaluator.py',440),
  ('expression -> expression CPP_MINUS expression','expression',3,'p_expression_binop','evaluator.py',441),
  ('expression -> expression CPP_LSHIFT expression','expression',3,'p_expression_binop','evaluator.py',442),
  ('expression -> expression CPP_RSHIFT expression','expression',3,'p_expression_binop','evaluator.py',443),
  ('expression -> expression CPP_LESS expression','expression',3,'p_expression_binop','evaluator.py',444),
  ('expression -> expression CPP_LESSEQUAL expression','expression',3,'p_expression_binop','evaluator.py',445),
  ('expression -> expression CPP_GREATER expression','expression',3,'p_expression_binop','evaluator.py',446),
  ('expression -> expression CPP_GREATEREQUAL expression','expression',3,'p_expression_binop','evaluator.py',447),
  ('expression -> expression CPP_EQUALITY expression','expression',3,'p_expression_binop','evaluator.py',448),
  ('expression -> expression CPP_INEQUALITY expression','expression',3,'p_expression_binop','evaluator.py',449),
  ('expression -> expression CPP_AMPERSAND expression','expression',3,'p_expression_binop','evaluator.py',450),
  ('expression -> expression CPP_HAT expression','expression',3,'p_expression_binop','evaluator.py',451),
  ('expression -> expression CPP_BAR expression','expression',3,'p_expression_binop','evaluator.py',452),
  ('expression -> expression CPP_LOGICALAND expression','expression',3,'p_expression_binop','evaluator.py',453),
  ('expression -> expression CPP_LOGICALOR expression','expression',3,'p_expression_binop','evaluator.py',454),
  ('expression -> expression CPP_COMMA expression','expression',3,'p_expression_binop','evaluator.py',455),
  ('expression -> expression CPP_QUESTION expression CPP_COLON expression','expression',5,'p_expression_conditional','evaluator.py',501),
  ('expression -> CPP_ID CPP_LPAREN expression CPP_RPAREN','expression',4,'p_expression_function_call','evaluator.py',513),
  ('expression -> CPP_ID','expression',1,'p_expression_identifier','evaluator.py',520),
]