-
Notifications
You must be signed in to change notification settings - Fork 0
/
parsetab.py
37 lines (30 loc) · 2.08 KB
/
parsetab.py
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
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'AT COMMA DOLLAR_SIGN EQUALS IDENTIFIER LBRACE NEWLINE RBRACE SEMICOLON STRINGprogram : hash_table\n | program NEWLINEhash_table : DOLLAR_SIGN IDENTIFIER EQUALS AT LBRACE hash_entries RBRACE SEMICOLONhash_entries : hash_entry COMMA hash_entry\n | hash_entries NEWLINEhash_entry : IDENTIFIER EQUALS STRING\n | IDENTIFIER'
_lr_action_items = {'DOLLAR_SIGN':([0,],[3,]),'$end':([1,2,4,17,],[0,-1,-2,-3,]),'NEWLINE':([1,2,4,9,10,14,16,17,18,],[4,-1,-2,-7,14,-5,-6,-3,-4,]),'IDENTIFIER':([3,8,15,],[5,9,9,]),'EQUALS':([5,9,],[6,12,]),'AT':([6,],[7,]),'LBRACE':([7,],[8,]),'COMMA':([9,11,16,],[-7,15,-6,]),'RBRACE':([9,10,14,16,18,],[-7,13,-5,-6,-4,]),'STRING':([12,],[16,]),'SEMICOLON':([13,],[17,]),}
_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 = {'program':([0,],[1,]),'hash_table':([0,],[2,]),'hash_entries':([8,],[10,]),'hash_entry':([8,15,],[11,18,]),}
_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' -> program","S'",1,None,None,None),
('program -> hash_table','program',1,'p_program','HashTable.py',36),
('program -> program NEWLINE','program',2,'p_program','HashTable.py',37),
('hash_table -> DOLLAR_SIGN IDENTIFIER EQUALS AT LBRACE hash_entries RBRACE SEMICOLON','hash_table',8,'p_hash_table','HashTable.py',40),
('hash_entries -> hash_entry COMMA hash_entry','hash_entries',3,'p_hash_entries','HashTable.py',45),
('hash_entries -> hash_entries NEWLINE','hash_entries',2,'p_hash_entries','HashTable.py',46),
('hash_entry -> IDENTIFIER EQUALS STRING','hash_entry',3,'p_hash_entry','HashTable.py',49),
('hash_entry -> IDENTIFIER','hash_entry',1,'p_hash_entry','HashTable.py',50),
]