# 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.


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

_lr_method = 'LALR'

_lr_signature = 'CLOSE_BRACKET CLOSE_PAREN DIMENSIONLESS DIVISION FLOAT INT OPEN_BRACKET OPEN_PAREN PRODUCT UNIT X\n            main : factor combined_units\n                 | combined_units\n                 | DIMENSIONLESS\n                 | OPEN_BRACKET combined_units CLOSE_BRACKET\n                 | OPEN_BRACKET DIMENSIONLESS CLOSE_BRACKET\n                 | factor\n            \n            combined_units : product_of_units\n                           | division_of_units\n            \n            product_of_units : unit_expression PRODUCT combined_units\n                             | unit_expression\n            \n            division_of_units : DIVISION unit_expression\n                              | combined_units DIVISION unit_expression\n            \n            unit_expression : unit_with_power\n                            | OPEN_PAREN combined_units CLOSE_PAREN\n            \n            factor : FLOAT X INT INT\n                   | INT X INT INT\n                   | INT INT\n                   | INT\n                   | FLOAT\n            \n            unit_with_power : UNIT INT\n                            | UNIT\n            '
    
_lr_action_items = {'DIMENSIONLESS':([0,5,],[4,18,]),'OPEN_BRACKET':([0,],[5,]),'FLOAT':([0,],[6,]),'INT':([0,7,14,19,21,29,30,],[7,20,25,29,30,33,34,]),'DIVISION':([0,2,3,5,6,7,8,9,10,12,13,14,15,17,20,22,23,24,25,26,31,32,33,34,],[11,11,16,11,-19,-18,-7,-8,-10,-13,11,-21,16,16,-17,11,-11,16,-20,-12,16,-14,-15,-16,]),'OPEN_PAREN':([0,2,5,6,7,11,13,16,20,22,33,34,],[13,13,13,-19,-18,13,13,13,-17,13,-15,-16,]),'UNIT':([0,2,5,6,7,11,13,16,20,22,33,34,],[14,14,14,-19,-18,14,14,14,-17,14,-15,-16,]),'$end':([1,2,3,4,6,7,8,9,10,12,14,15,20,23,25,26,27,28,31,32,33,34,],[0,-6,-2,-3,-19,-18,-7,-8,-10,-13,-21,-1,-17,-11,-20,-12,-4,-5,-9,-14,-15,-16,]),'X':([6,7,],[19,21,]),'CLOSE_BRACKET':([8,9,10,12,14,17,18,23,25,26,31,32,],[-7,-8,-10,-13,-21,27,28,-11,-20,-12,-9,-14,]),'CLOSE_PAREN':([8,9,10,12,14,23,24,25,26,31,32,],[-7,-8,-10,-13,-21,-11,32,-20,-12,-9,-14,]),'PRODUCT':([10,12,14,25,32,],[22,-13,-21,-20,-14,]),}

_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,]),'factor':([0,],[2,]),'combined_units':([0,2,5,13,22,],[3,15,17,24,31,]),'product_of_units':([0,2,5,13,22,],[8,8,8,8,8,]),'division_of_units':([0,2,5,13,22,],[9,9,9,9,9,]),'unit_expression':([0,2,5,11,13,16,22,],[10,10,10,23,10,26,10,]),'unit_with_power':([0,2,5,11,13,16,22,],[12,12,12,12,12,12,12,]),}

_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 -> factor combined_units','main',2,'p_main','cds.py',131),
  ('main -> combined_units','main',1,'p_main','cds.py',132),
  ('main -> DIMENSIONLESS','main',1,'p_main','cds.py',133),
  ('main -> OPEN_BRACKET combined_units CLOSE_BRACKET','main',3,'p_main','cds.py',134),
  ('main -> OPEN_BRACKET DIMENSIONLESS CLOSE_BRACKET','main',3,'p_main','cds.py',135),
  ('main -> factor','main',1,'p_main','cds.py',136),
  ('combined_units -> product_of_units','combined_units',1,'p_combined_units','cds.py',149),
  ('combined_units -> division_of_units','combined_units',1,'p_combined_units','cds.py',150),
  ('product_of_units -> unit_expression PRODUCT combined_units','product_of_units',3,'p_product_of_units','cds.py',156),
  ('product_of_units -> unit_expression','product_of_units',1,'p_product_of_units','cds.py',157),
  ('division_of_units -> DIVISION unit_expression','division_of_units',2,'p_division_of_units','cds.py',166),
  ('division_of_units -> combined_units DIVISION unit_expression','division_of_units',3,'p_division_of_units','cds.py',167),
  ('unit_expression -> unit_with_power','unit_expression',1,'p_unit_expression','cds.py',176),
  ('unit_expression -> OPEN_PAREN combined_units CLOSE_PAREN','unit_expression',3,'p_unit_expression','cds.py',177),
  ('factor -> FLOAT X INT INT','factor',4,'p_factor','cds.py',186),
  ('factor -> INT X INT INT','factor',4,'p_factor','cds.py',187),
  ('factor -> INT INT','factor',2,'p_factor','cds.py',188),
  ('factor -> INT','factor',1,'p_factor','cds.py',189),
  ('factor -> FLOAT','factor',1,'p_factor','cds.py',190),
  ('unit_with_power -> UNIT INT','unit_with_power',2,'p_unit_with_power','cds.py',206),
  ('unit_with_power -> UNIT','unit_with_power',1,'p_unit_with_power','cds.py',207),
]
