
# py.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'

_lr_method = 'LALR'

_lr_signature = 'ra\xf6\x14\xc9 -j\xee\xc8\xc6\x85\x06\xa1/\x8a'
    
_lr_action_items = {'STAR':([5,],[16,]),'HELP':([0,],[2,]),'NUMBER':([29,36,38,65,78,79,83,84,102,107,],[53,62,62,62,53,96,100,101,62,113,]),'LIMIT':([61,62,63,64,66,114,],[83,-19,-20,-21,83,83,]),'GROUP':([42,43,75,76,87,88,89,91,92,93,98,99,109,111,112,118,],[-48,-49,-53,-54,-51,-52,-56,-57,-55,-50,104,-44,-58,-46,-45,-47,]),'STREAMLIMIT':([61,62,63,64,66,100,114,],[84,-19,-20,-21,84,107,84,]),'DATA':([5,30,],[21,21,]),'BY':([104,],[110,]),'SELECT':([0,],[5,]),'SET':([0,],[1,]),'RPAREN':([11,13,15,28,29,42,43,49,50,51,52,53,54,55,56,62,63,64,74,75,76,78,80,87,88,89,91,92,93,95,96,97,103,108,109,],[-27,-31,-26,50,-32,-48,-49,-28,-30,-33,-31,-36,-35,-39,80,-19,-20,-21,93,-53,-54,-32,-29,-51,-52,-56,-57,-55,-50,-34,-37,-38,109,114,-58,]),'DISTINCT':([5,],[17,]),'EQ':([7,41,52,],[25,73,79,]),'OPSEP':([11,13,50,52,80,],[27,-31,-30,-31,-29,]),'TO':([11,13,14,15,49,50,80,],[-27,-31,30,-26,-28,-30,-29,]),'COMMA':([11,13,15,18,42,43,47,49,50,51,52,53,54,55,62,63,64,75,76,80,85,87,88,89,91,92,93,96,97,98,99,109,111,112,118,],[-27,-31,-26,33,-48,-49,77,-28,-30,78,-31,-36,-35,-39,-19,-20,-21,-53,-54,-29,102,-51,-52,-56,-57,-55,-50,-37,-38,105,-44,-58,-46,-45,-47,]),'TILDE':([41,],[72,]),'APPLY':([0,],[3,]),'$end':([2,4,9,10,16,18,19,22,31,32,40,42,43,48,58,59,60,67,75,76,87,88,89,91,92,93,98,99,109,111,112,115,118,],[-8,0,-9,-7,-13,-40,-2,-12,-14,-15,-5,-48,-49,-6,-41,-1,-3,-4,-53,-54,-51,-52,-56,-57,-55,-50,-10,-44,-58,-46,-45,-11,-47,]),'TAGS':([17,],[32,]),'AS':([42,43,75,76,87,88,89,91,92,93,99,109,111,],[-48,-49,-53,-54,-51,-52,-56,-57,-55,-50,106,-58,116,]),'LPAREN':([3,12,13,24,26,27,29,34,35,37,39,44,45,52,68,69,71,78,81,90,105,],[12,12,29,44,44,12,12,44,44,65,44,44,44,29,44,44,90,12,44,44,44,]),'IN':([21,41,],[37,71,]),'HAS':([24,26,34,35,39,44,45,68,69,81,90,105,],[46,46,46,46,46,46,46,46,46,46,46,46,]),'WHERE':([6,8,16,18,19,20,22,23,31,32,47,57,58,61,62,63,64,66,82,86,94,100,101,113,114,117,],[24,26,-13,-40,34,35,-12,39,-14,-15,-42,81,-41,-22,-19,-20,-21,-22,-18,-17,-43,-23,-24,-25,-22,-16,]),'BEFORE':([21,],[38,]),'AND':([40,42,43,48,59,60,67,74,75,76,87,88,89,91,92,93,99,103,109,111,],[68,-48,-49,68,68,68,68,68,-53,-54,-51,-52,-56,-57,-55,-50,68,68,-58,68,]),'LIKE':([41,],[70,]),'LVALUE':([1,2,3,5,6,12,17,24,26,27,29,33,34,35,39,44,45,46,68,69,77,78,81,90,105,106,110,116,],[7,9,13,18,18,13,31,41,41,13,52,18,41,41,41,41,41,76,41,41,7,52,41,41,41,112,18,118,]),'AFTER':([21,],[36,]),'QSTRING':([25,29,36,38,65,70,72,73,78,79,102,],[47,54,63,63,63,89,91,92,54,97,63,]),'NOT':([24,26,34,35,39,44,45,68,69,81,90,105,],[45,45,45,45,45,45,45,45,45,45,45,45,]),'NOW':([36,38,65,102,],[64,64,64,64,]),'OR':([40,42,43,48,59,60,67,74,75,76,87,88,89,91,92,93,99,103,109,111,],[69,-48,-49,69,69,69,69,69,-53,-54,69,-52,-56,-57,-55,-50,69,69,-58,69,]),'DELETE':([0,],[6,]),}

_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 = {'timeref':([36,38,65,102,],[61,66,85,108,]),'statement_as_list':([81,],[98,]),'call_argument':([29,78,],[51,51,]),'apply_statement':([3,],[10,]),'set_list':([1,77,],[8,94,]),'statement_unary':([24,26,34,35,39,44,45,68,69,81,90,105,],[42,42,42,42,42,42,42,42,42,42,42,42,]),'apply_operator':([3,12,27,29,78,],[11,28,11,11,11,]),'selector':([5,],[19,]),'data_clause':([5,30,],[20,57,]),'limit':([61,66,114,],[82,86,117,]),'statement_binary':([24,26,34,35,39,44,45,68,69,81,90,105,],[43,43,43,43,43,43,43,43,43,43,43,43,]),'statement':([24,26,34,35,39,44,45,68,69,81,90,105,],[40,48,59,60,67,74,75,87,88,99,103,111,]),'query':([0,],[4,]),'tag_list':([5,6,33,110,],[22,23,58,115,]),'arg_list':([29,78,],[56,95,]),'operator_list':([3,29,78,],[14,55,55,]),'priv_operator_list':([3,27,29,78,],[15,49,15,15,]),}

_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' -> query","S'",1,None,None,None),
  ('query -> SELECT selector WHERE statement','query',4,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',199),
  ('query -> SELECT selector','query',2,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',200),
  ('query -> SELECT data_clause WHERE statement','query',4,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',201),
  ('query -> DELETE tag_list WHERE statement','query',4,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',202),
  ('query -> DELETE WHERE statement','query',3,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',203),
  ('query -> SET set_list WHERE statement','query',4,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',204),
  ('query -> APPLY apply_statement','query',2,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',205),
  ('query -> HELP','query',1,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',206),
  ('query -> HELP LVALUE','query',2,'p_query','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',207),
  ('apply_statement -> operator_list TO data_clause WHERE statement_as_list','apply_statement',5,'p_apply_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',267),
  ('apply_statement -> operator_list TO data_clause WHERE statement_as_list GROUP BY tag_list','apply_statement',8,'p_apply_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',268),
  ('selector -> tag_list','selector',1,'p_selector','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',299),
  ('selector -> STAR','selector',1,'p_selector','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',300),
  ('selector -> DISTINCT LVALUE','selector',2,'p_selector','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',301),
  ('selector -> DISTINCT TAGS','selector',2,'p_selector','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',302),
  ('data_clause -> DATA IN LPAREN timeref COMMA timeref RPAREN limit','data_clause',8,'p_data_clause','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',317),
  ('data_clause -> DATA BEFORE timeref limit','data_clause',4,'p_data_clause','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',318),
  ('data_clause -> DATA AFTER timeref limit','data_clause',4,'p_data_clause','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',319),
  ('timeref -> NUMBER','timeref',1,'p_timeref','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',359),
  ('timeref -> QSTRING','timeref',1,'p_timeref','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',360),
  ('timeref -> NOW','timeref',1,'p_timeref','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',361),
  ('limit -> <empty>','limit',0,'p_limit','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',372),
  ('limit -> LIMIT NUMBER','limit',2,'p_limit','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',373),
  ('limit -> STREAMLIMIT NUMBER','limit',2,'p_limit','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',374),
  ('limit -> LIMIT NUMBER STREAMLIMIT NUMBER','limit',4,'p_limit','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',375),
  ('operator_list -> priv_operator_list','operator_list',1,'p_operator_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',388),
  ('priv_operator_list -> apply_operator','priv_operator_list',1,'p_priv_operator_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',396),
  ('priv_operator_list -> apply_operator OPSEP priv_operator_list','priv_operator_list',3,'p_priv_operator_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',397),
  ('apply_operator -> LVALUE LPAREN arg_list RPAREN','apply_operator',4,'p_apply_operator','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',406),
  ('apply_operator -> LPAREN apply_operator RPAREN','apply_operator',3,'p_apply_operator','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',407),
  ('apply_operator -> LVALUE','apply_operator',1,'p_apply_operator','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',408),
  ('arg_list -> <empty>','arg_list',0,'p_arg_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',421),
  ('arg_list -> call_argument','arg_list',1,'p_arg_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',422),
  ('arg_list -> call_argument COMMA arg_list','arg_list',3,'p_arg_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',423),
  ('call_argument -> QSTRING','call_argument',1,'p_call_argument','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',442),
  ('call_argument -> NUMBER','call_argument',1,'p_call_argument','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',443),
  ('call_argument -> LVALUE EQ NUMBER','call_argument',3,'p_call_argument','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',444),
  ('call_argument -> LVALUE EQ QSTRING','call_argument',3,'p_call_argument','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',445),
  ('call_argument -> operator_list','call_argument',1,'p_call_argument','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',446),
  ('tag_list -> LVALUE','tag_list',1,'p_tag_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',455),
  ('tag_list -> LVALUE COMMA tag_list','tag_list',3,'p_tag_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',456),
  ('set_list -> LVALUE EQ QSTRING','set_list',3,'p_set_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',464),
  ('set_list -> LVALUE EQ QSTRING COMMA set_list','set_list',5,'p_set_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',465),
  ('statement_as_list -> statement','statement_as_list',1,'p_statement_as_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',472),
  ('statement_as_list -> statement AS LVALUE','statement_as_list',3,'p_statement_as_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',473),
  ('statement_as_list -> statement_as_list COMMA statement','statement_as_list',3,'p_statement_as_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',474),
  ('statement_as_list -> statement_as_list COMMA statement AS LVALUE','statement_as_list',5,'p_statement_as_list','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',475),
  ('statement -> statement_unary','statement',1,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',497),
  ('statement -> statement_binary','statement',1,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',498),
  ('statement -> LPAREN statement RPAREN','statement',3,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',499),
  ('statement -> statement AND statement','statement',3,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',500),
  ('statement -> statement OR statement','statement',3,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',501),
  ('statement -> NOT statement','statement',2,'p_statement','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',502),
  ('statement_unary -> HAS LVALUE','statement_unary',2,'p_statement_unary','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',516),
  ('statement_binary -> LVALUE EQ QSTRING','statement_binary',3,'p_statement_binary','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',522),
  ('statement_binary -> LVALUE LIKE QSTRING','statement_binary',3,'p_statement_binary','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',523),
  ('statement_binary -> LVALUE TILDE QSTRING','statement_binary',3,'p_statement_binary','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',524),
  ('statement_binary -> LVALUE IN LPAREN statement RPAREN','statement_binary',5,'p_statement_binary','/Users/stevedh/src/svn/code/smap2/smap-data/python/smap/archiver/queryparse.py',525),
]
