# Licensed under a 3-clause BSD style license - see LICENSE.rst

# This file was automatically generated from ply. To re-generate this file,
# remove it from this folder, then build astropy and run the tests in-place:
#
#   python setup.py build_ext --inplace
#   pytest astropy/units
#
# You can then commit the changes to this file.


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

_lr_method = 'LALR'

_lr_signature = 'CLOSE_PAREN DIVISION FLOAT FUNCNAME INT LIT10 OPEN_PAREN POWER STAR UNIT UNKNOWN WHITESPACE\n            main : UNKNOWN\n                 | complete_expression\n                 | scale_factor complete_expression\n                 | scale_factor WHITESPACE complete_expression\n            \n            complete_expression : unit_expression\n                                | product_of_units\n                                | division_of_units\n            \n            product_of_units : complete_expression product unit_expression\n            \n            division_of_units : DIVISION unit_expression\n                              | complete_expression DIVISION unit_expression\n            \n            unit_expression : UNIT\n                            | function\n                            | UNIT POWER numeric_power\n                            | UNIT OPEN_PAREN complete_expression CLOSE_PAREN\n                            | OPEN_PAREN complete_expression CLOSE_PAREN\n                            | UNIT OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power\n                            | OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power\n            \n            function : FUNCNAME OPEN_PAREN complete_expression CLOSE_PAREN\n                     | FUNCNAME OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power\n            \n            scale_factor : LIT10 POWER numeric_power\n                         | LIT10\n                         | number\n                         | number POWER numeric_power\n            \n            product : WHITESPACE\n                    | STAR\n                    | WHITESPACE STAR\n                    | WHITESPACE STAR WHITESPACE\n                    | STAR WHITESPACE\n            \n            numeric_power : number\n                          | OPEN_PAREN number CLOSE_PAREN\n                          | OPEN_PAREN INT DIVISION INT CLOSE_PAREN\n            \n            number : INT\n                   | FLOAT\n            '
    
_lr_action_items = {'UNKNOWN':([0,],[2,]),'LIT10':([0,],[8,]),'UNIT':([0,4,8,9,12,13,14,15,17,18,19,20,22,26,29,32,33,35,36,38,43,49,57,],[10,10,-21,-22,10,10,-32,-33,10,10,-24,-25,10,10,10,-26,-28,-20,-29,-23,-27,-30,-31,]),'OPEN_PAREN':([0,4,8,9,10,12,13,14,15,16,17,18,19,20,22,23,24,25,26,29,32,33,35,36,38,43,47,49,51,53,57,],[12,12,-21,-22,26,12,12,-32,-33,29,12,12,-24,-25,12,37,37,37,12,12,-26,-28,-20,-29,-23,-27,37,-30,37,37,-31,]),'DIVISION':([0,3,4,5,6,7,8,9,10,11,12,14,15,21,22,26,27,28,29,30,31,34,35,36,38,39,40,41,42,45,46,48,49,52,55,56,57,],[13,18,13,-5,-6,-7,-21,-22,-11,-12,13,-32,-33,18,13,13,18,-9,13,-8,-10,18,-20,-29,-23,-13,18,-15,18,50,-14,-18,-30,-17,-16,-19,-31,]),'INT':([0,23,24,25,37,47,50,51,53,],[14,14,14,14,45,14,54,14,14,]),'FLOAT':([0,23,24,25,37,47,51,53,],[15,15,15,15,15,15,15,15,]),'FUNCNAME':([0,4,8,9,12,13,14,15,17,18,19,20,22,26,29,32,33,35,36,38,43,49,57,],[16,16,-21,-22,16,16,-32,-33,16,16,-24,-25,16,16,16,-26,-28,-20,-29,-23,-27,-30,-31,]),'$end':([1,2,3,5,6,7,10,11,14,15,21,28,30,31,34,36,39,41,46,48,49,52,55,56,57,],[0,-1,-2,-5,-6,-7,-11,-12,-32,-33,-3,-9,-8,-10,-4,-29,-13,-15,-14,-18,-30,-17,-16,-19,-31,]),'WHITESPACE':([3,4,5,6,7,8,9,10,11,14,15,20,21,27,28,30,31,32,34,35,36,38,39,40,41,42,46,48,49,52,55,56,57,],[19,22,-5,-6,-7,-21,-22,-11,-12,-32,-33,33,19,19,-9,-8,-10,43,19,-20,-29,-23,-13,19,-15,19,-14,-18,-30,-17,-16,-19,-31,]),'STAR':([3,5,6,7,10,11,14,15,19,21,27,28,30,31,34,36,39,40,41,42,46,48,49,52,55,56,57,],[20,-5,-6,-7,-11,-12,-32,-33,32,20,20,-9,-8,-10,20,-29,-13,20,-15,20,-14,-18,-30,-17,-16,-19,-31,]),'CLOSE_PAREN':([5,6,7,10,11,14,15,27,28,30,31,36,39,40,41,42,44,45,46,48,49,52,54,55,56,57,],[-5,-6,-7,-11,-12,-32,-33,41,-9,-8,-10,-29,-13,46,-15,48,49,-32,-14,-18,-30,-17,57,-16,-19,-31,]),'POWER':([8,9,10,14,15,41,46,48,],[23,24,25,-32,-33,47,51,53,]),}

_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 = {'main':([0,],[1,]),'complete_expression':([0,4,12,22,26,29,],[3,21,27,34,40,42,]),'scale_factor':([0,],[4,]),'unit_expression':([0,4,12,13,17,18,22,26,29,],[5,5,5,28,30,31,5,5,5,]),'product_of_units':([0,4,12,22,26,29,],[6,6,6,6,6,6,]),'division_of_units':([0,4,12,22,26,29,],[7,7,7,7,7,7,]),'number':([0,23,24,25,37,47,51,53,],[9,36,36,36,44,36,36,36,]),'function':([0,4,12,13,17,18,22,26,29,],[11,11,11,11,11,11,11,11,11,]),'product':([3,21,27,34,40,42,],[17,17,17,17,17,17,]),'numeric_power':([23,24,25,47,51,53,],[35,38,39,52,55,56,]),}

_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' -> main","S'",1,None,None,None),
  ('main -> UNKNOWN','main',1,'p_main','ogip.py',158),
  ('main -> complete_expression','main',1,'p_main','ogip.py',159),
  ('main -> scale_factor complete_expression','main',2,'p_main','ogip.py',160),
  ('main -> scale_factor WHITESPACE complete_expression','main',3,'p_main','ogip.py',161),
  ('complete_expression -> unit_expression','complete_expression',1,'p_complete_expression','ogip.py',171),
  ('complete_expression -> product_of_units','complete_expression',1,'p_complete_expression','ogip.py',172),
  ('complete_expression -> division_of_units','complete_expression',1,'p_complete_expression','ogip.py',173),
  ('product_of_units -> complete_expression product unit_expression','product_of_units',3,'p_product_of_units','ogip.py',181),
  ('division_of_units -> DIVISION unit_expression','division_of_units',2,'p_division_of_units','ogip.py',187),
  ('division_of_units -> complete_expression DIVISION unit_expression','division_of_units',3,'p_division_of_units','ogip.py',188),
  ('unit_expression -> UNIT','unit_expression',1,'p_unit_expression','ogip.py',198),
  ('unit_expression -> function','unit_expression',1,'p_unit_expression','ogip.py',199),
  ('unit_expression -> UNIT POWER numeric_power','unit_expression',3,'p_unit_expression','ogip.py',200),
  ('unit_expression -> UNIT OPEN_PAREN complete_expression CLOSE_PAREN','unit_expression',4,'p_unit_expression','ogip.py',201),
  ('unit_expression -> OPEN_PAREN complete_expression CLOSE_PAREN','unit_expression',3,'p_unit_expression','ogip.py',202),
  ('unit_expression -> UNIT OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power','unit_expression',6,'p_unit_expression','ogip.py',203),
  ('unit_expression -> OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power','unit_expression',5,'p_unit_expression','ogip.py',204),
  ('function -> FUNCNAME OPEN_PAREN complete_expression CLOSE_PAREN','function',4,'p_function','ogip.py',233),
  ('function -> FUNCNAME OPEN_PAREN complete_expression CLOSE_PAREN POWER numeric_power','function',6,'p_function','ogip.py',234),
  ('scale_factor -> LIT10 POWER numeric_power','scale_factor',3,'p_scale_factor','ogip.py',249),
  ('scale_factor -> LIT10','scale_factor',1,'p_scale_factor','ogip.py',250),
  ('scale_factor -> number','scale_factor',1,'p_scale_factor','ogip.py',251),
  ('scale_factor -> number POWER numeric_power','scale_factor',3,'p_scale_factor','ogip.py',252),
  ('product -> WHITESPACE','product',1,'p_product','ogip.py',267),
  ('product -> STAR','product',1,'p_product','ogip.py',268),
  ('product -> WHITESPACE STAR','product',2,'p_product','ogip.py',269),
  ('product -> WHITESPACE STAR WHITESPACE','product',3,'p_product','ogip.py',270),
  ('product -> STAR WHITESPACE','product',2,'p_product','ogip.py',271),
  ('numeric_power -> number','numeric_power',1,'p_numeric_power','ogip.py',276),
  ('numeric_power -> OPEN_PAREN number CLOSE_PAREN','numeric_power',3,'p_numeric_power','ogip.py',277),
  ('numeric_power -> OPEN_PAREN INT DIVISION INT CLOSE_PAREN','numeric_power',5,'p_numeric_power','ogip.py',278),
  ('number -> INT','number',1,'p_number','ogip.py',296),
  ('number -> FLOAT','number',1,'p_number','ogip.py',297),
]
