38 lines
1.6 KiB
Python
38 lines
1.6 KiB
Python
|
|
||
|
# parsetab.py
|
||
|
# This file is automatically generated. Do not edit.
|
||
|
# pylint: disable=W,C,R
|
||
|
_tabversion = '3.10'
|
||
|
|
||
|
_lr_method = 'LALR'
|
||
|
|
||
|
_lr_signature = 'COLOR KIND MATERIAL NUMBER OPERATE SIZEcommand : operate NUMBER articlearticle : attribute articleattribute : COLORattribute : MATERIALattribute : SIZEarticle : KINDoperate : OPERATE'
|
||
|
|
||
|
_lr_action_items = {'OPERATE':([0,],[3,]),'$end':([1,5,7,11,],[0,-1,-6,-2,]),'NUMBER':([2,3,],[4,-7,]),'KIND':([4,6,8,9,10,],[7,7,-3,-4,-5,]),'COLOR':([4,6,8,9,10,],[8,8,-3,-4,-5,]),'MATERIAL':([4,6,8,9,10,],[9,9,-3,-4,-5,]),'SIZE':([4,6,8,9,10,],[10,10,-3,-4,-5,]),}
|
||
|
|
||
|
_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 = {'command':([0,],[1,]),'operate':([0,],[2,]),'article':([4,6,],[5,11,]),'attribute':([4,6,],[6,6,]),}
|
||
|
|
||
|
_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' -> command","S'",1,None,None,None),
|
||
|
('command -> operate NUMBER article','command',3,'p_command','yacc.py',6),
|
||
|
('article -> attribute article','article',2,'p_article_attribute','yacc.py',22),
|
||
|
('attribute -> COLOR','attribute',1,'p_attribute_color','yacc.py',27),
|
||
|
('attribute -> MATERIAL','attribute',1,'p_attribute_material','yacc.py',32),
|
||
|
('attribute -> SIZE','attribute',1,'p_attribute_size','yacc.py',37),
|
||
|
('article -> KIND','article',1,'p_article_kind','yacc.py',42),
|
||
|
('operate -> OPERATE','operate',1,'p_operate','yacc.py',46),
|
||
|
]
|