-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsetab.py
111 lines (104 loc) · 16.2 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '\x106\xde\xfa\xbe\xb0\xfa\xd1k=]\x0bW\x82\xddC'
_lr_action_items = {'FORMAT':([3,60,76,81,105,129,130,146,150,],[26,78,78,-53,-48,78,-56,-57,-54,]),'DEFAULT':([39,60,76,81,105,129,130,146,150,],[49,79,79,-53,-48,79,-56,-57,-54,]),'LBRACKET':([75,91,96,121,125,127,139,],[96,96,96,96,96,96,96,]),'CODELIT':([18,25,29,33,34,35,37,43,75,88,91,96,121,125,127,139,],[38,41,44,-19,-18,-17,47,55,99,115,99,99,99,99,99,99,]),'INTLIT':([60,61,75,76,81,91,96,105,109,111,121,125,127,129,130,139,146,150,],[83,84,100,83,-53,100,100,-48,132,135,100,100,100,83,-56,100,-57,-54,]),'DEF':([0,2,4,6,7,8,9,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,134,136,151,],[3,-4,-7,-11,-6,-8,-15,-14,3,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,-26,-33,-25,]),'STRLIT':([60,75,76,81,91,96,105,109,121,125,127,129,130,139,146,150,],[80,93,80,-53,93,93,-48,133,93,93,93,80,-56,93,-57,-54,]),'RPAREN':([54,64,65,67,68,69,70,71,72,75,89,93,94,95,97,98,99,100,101,102,103,113,114,116,117,119,120,121,137,138,140,141,142,144,],[-82,-35,88,-42,-37,-36,-43,-41,-38,-82,-46,-76,-69,-71,-66,-67,-77,-75,-74,-68,128,-34,-39,-40,-44,-45,-74,-82,148,-78,-70,-65,-72,-73,]),'SEMI':([32,33,34,35,36,38,41,44,47,55,62,63,110,112,115,128,131,147,148,],[45,-19,-18,-17,46,48,53,56,57,73,85,-28,134,-29,136,-63,146,151,-64,]),'LESS':([52,],[61,]),'DECODE':([0,1,2,4,6,7,8,9,10,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,108,134,136,151,],[-82,22,-4,-7,-11,-6,-8,-15,-2,-14,-3,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,22,-26,-33,-25,]),'OPERAND_TYPES':([3,],[29,]),'COMMA':([54,64,68,70,71,72,75,79,80,82,83,93,94,95,96,97,98,99,100,101,102,114,117,119,120,121,122,123,124,132,133,138,140,141,142,144,149,],[-82,87,-37,-43,90,-38,-82,-58,-60,109,-59,-76,-69,-71,-82,125,126,-77,-75,-74,-68,-39,-44,-45,-74,-82,139,-79,-81,-61,-62,-78,-70,126,-72,-73,-80,]),'DOT':([63,],[86,]),'COLON':([79,80,82,83,84,132,133,],[-58,-60,108,-59,111,-61,-62,]),'$end':([5,21,23,105,],[0,-47,-1,-48,]),'RBRACE':([76,77,81,104,105,130,145,146,150,],[-51,105,-53,-52,-48,-56,150,-57,-54,]),'EXEC':([14,15,],[33,33,]),'ASTERISK':([54,87,90,],[66,66,66,]),'NAMESPACE':([0,2,4,6,7,8,9,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,134,136,151,],[13,-4,-7,-11,-6,-8,-15,-14,13,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,-26,-33,-25,]),'EQUALS':([72,101,114,118,143,],[91,127,91,91,127,]),'CPPDIRECTIVE':([60,76,81,105,129,130,146,150,],[81,81,-53,-48,81,-56,-57,-54,]),'BITFIELD':([3,24,28,30,],[-82,40,-30,-31,]),'HEADER':([14,15,],[34,34,]),'DBLCOLON':([59,],[74,]),'SPLIT':([0,2,4,6,7,8,9,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,134,136,151,],[14,-4,-7,-11,-6,-8,-15,-14,14,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,-26,-33,-25,]),'LPAREN':([42,59,92,],[54,75,121,]),'ID':([13,22,26,27,40,49,52,54,66,74,75,78,86,87,90,91,96,108,121,125,126,127,139,],[32,39,42,43,52,59,63,72,89,92,101,107,63,114,118,120,120,59,101,101,143,120,120,]),'GREATER':([84,135,],[110,147,]),'LBRACE':([39,50,51,58,106,107,128,148,],[-82,-49,60,-50,129,-55,-63,-64,]),'OPERANDS':([3,],[25,]),'SIGNED':([3,],[28,]),'LET':([0,2,4,6,7,8,9,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,134,136,151,],[18,-4,-7,-11,-6,-8,-15,-14,18,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,-26,-33,-25,]),'TEMPLATE':([3,],[27,]),'DECODER':([14,15,],[35,35,]),'OUTPUT':([0,2,4,6,7,8,9,11,12,16,17,19,20,31,45,46,48,53,56,57,73,85,134,136,151,],[15,-4,-7,-11,-6,-8,-15,-14,15,-12,-9,-13,-10,-5,-20,-16,-22,-24,-23,-21,-32,-27,-26,-33,-25,]),'RBRACKET':([93,96,99,100,120,122,123,124,138,149,],[-76,-82,-77,-75,-74,138,-79,-81,-78,-80,]),}
_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 = {'list_expr':([96,],[122,]),'decode_block':([1,108,],[21,130,]),'param_list':([54,],[65,]),'case_list':([60,76,129,],[82,82,82,]),'opt_defs_and_outputs':([0,],[1,]),'def_or_output':([0,12,],[2,31,]),'push_format_id':([78,],[106,]),'keyword_arg_list':([75,121,125,],[98,98,141,]),'keyword_param':([54,87,90,],[70,70,117,]),'def_format':([0,12,],[4,4,]),'positional_arg_list':([75,121,],[97,97,]),'specification':([0,],[5,]),'def_operand_types':([0,12,],[6,6,]),'excess_args_param':([54,87,90,],[67,67,116,]),'name_decl':([0,12,],[7,7,]),'def_bitfield':([0,12,],[8,8,]),'split':([0,12,],[9,9,]),'keyword_param_list':([54,87,],[71,71,]),'opt_default':([39,],[51,]),'arg_list':([75,121,],[103,137,]),'opt_signed':([3,],[24,]),'decode_stmt_list':([60,76,129,],[77,104,145,]),'global_let':([0,12,],[11,11,]),'positional_param_list':([54,],[64,]),'defs_and_outputs':([0,],[12,]),'keyword_arg':([75,121,125,126,],[95,95,95,142,]),'inst':([49,108,],[58,131,]),'output':([0,12,],[19,19,]),'nonpositional_param_list':([54,87,],[69,113,]),'def_operands':([0,12,],[16,16,]),'expr':([75,91,96,121,125,127,139,],[94,119,123,94,140,144,149,]),'id_with_dot':([52,86,],[62,112,]),'decode_stmt':([60,76,129,],[76,76,76,]),'def_bitfield_struct':([0,12,],[17,17,]),'top_level_decode_block':([1,],[23,]),'empty':([0,3,39,54,75,96,121,],[10,30,50,68,102,124,102,]),'output_type':([14,15,],[36,37,]),'def_template':([0,12,],[20,20,]),}
_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' -> specification","S'",1,None,None,None),
('specification -> opt_defs_and_outputs top_level_decode_block','specification',2,'p_specification','/home/weilong/gem5-dram/src/arch/isa_parser.py',1601),
('opt_defs_and_outputs -> empty','opt_defs_and_outputs',1,'p_opt_defs_and_outputs_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1619),
('opt_defs_and_outputs -> defs_and_outputs','opt_defs_and_outputs',1,'p_opt_defs_and_outputs_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1622),
('defs_and_outputs -> def_or_output','defs_and_outputs',1,'p_defs_and_outputs_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1625),
('defs_and_outputs -> defs_and_outputs def_or_output','defs_and_outputs',2,'p_defs_and_outputs_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1628),
('def_or_output -> name_decl','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1633),
('def_or_output -> def_format','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1634),
('def_or_output -> def_bitfield','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1635),
('def_or_output -> def_bitfield_struct','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1636),
('def_or_output -> def_template','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1637),
('def_or_output -> def_operand_types','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1638),
('def_or_output -> def_operands','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1639),
('def_or_output -> output','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1640),
('def_or_output -> global_let','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1641),
('def_or_output -> split','def_or_output',1,'p_def_or_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1642),
('split -> SPLIT output_type SEMI','split',3,'p_split','/home/weilong/gem5-dram/src/arch/isa_parser.py',1659),
('output_type -> DECODER','output_type',1,'p_output_type','/home/weilong/gem5-dram/src/arch/isa_parser.py',1665),
('output_type -> HEADER','output_type',1,'p_output_type','/home/weilong/gem5-dram/src/arch/isa_parser.py',1666),
('output_type -> EXEC','output_type',1,'p_output_type','/home/weilong/gem5-dram/src/arch/isa_parser.py',1667),
('name_decl -> NAMESPACE ID SEMI','name_decl',3,'p_name_decl','/home/weilong/gem5-dram/src/arch/isa_parser.py',1672),
('output -> OUTPUT output_type CODELIT SEMI','output',4,'p_output','/home/weilong/gem5-dram/src/arch/isa_parser.py',1692),
('global_let -> LET CODELIT SEMI','global_let',3,'p_global_let','/home/weilong/gem5-dram/src/arch/isa_parser.py',1701),
('def_operand_types -> DEF OPERAND_TYPES CODELIT SEMI','def_operand_types',4,'p_def_operand_types','/home/weilong/gem5-dram/src/arch/isa_parser.py',1740),
('def_operands -> DEF OPERANDS CODELIT SEMI','def_operands',4,'p_def_operands','/home/weilong/gem5-dram/src/arch/isa_parser.py',1752),
('def_bitfield -> DEF opt_signed BITFIELD ID LESS INTLIT COLON INTLIT GREATER SEMI','def_bitfield',10,'p_def_bitfield_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1767),
('def_bitfield -> DEF opt_signed BITFIELD ID LESS INTLIT GREATER SEMI','def_bitfield',8,'p_def_bitfield_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1776),
('def_bitfield_struct -> DEF opt_signed BITFIELD ID id_with_dot SEMI','def_bitfield_struct',6,'p_def_bitfield_struct','/home/weilong/gem5-dram/src/arch/isa_parser.py',1785),
('id_with_dot -> ID','id_with_dot',1,'p_id_with_dot_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1793),
('id_with_dot -> ID DOT id_with_dot','id_with_dot',3,'p_id_with_dot_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1797),
('opt_signed -> SIGNED','opt_signed',1,'p_opt_signed_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1801),
('opt_signed -> empty','opt_signed',1,'p_opt_signed_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1805),
('def_template -> DEF TEMPLATE ID CODELIT SEMI','def_template',5,'p_def_template','/home/weilong/gem5-dram/src/arch/isa_parser.py',1809),
('def_format -> DEF FORMAT ID LPAREN param_list RPAREN CODELIT SEMI','def_format',8,'p_def_format','/home/weilong/gem5-dram/src/arch/isa_parser.py',1817),
('param_list -> positional_param_list COMMA nonpositional_param_list','param_list',3,'p_param_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1836),
('param_list -> positional_param_list','param_list',1,'p_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1840),
('param_list -> nonpositional_param_list','param_list',1,'p_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1841),
('positional_param_list -> empty','positional_param_list',1,'p_positional_param_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1845),
('positional_param_list -> ID','positional_param_list',1,'p_positional_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1849),
('positional_param_list -> positional_param_list COMMA ID','positional_param_list',3,'p_positional_param_list_2','/home/weilong/gem5-dram/src/arch/isa_parser.py',1853),
('nonpositional_param_list -> keyword_param_list COMMA excess_args_param','nonpositional_param_list',3,'p_nonpositional_param_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1857),
('nonpositional_param_list -> keyword_param_list','nonpositional_param_list',1,'p_nonpositional_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1861),
('nonpositional_param_list -> excess_args_param','nonpositional_param_list',1,'p_nonpositional_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1862),
('keyword_param_list -> keyword_param','keyword_param_list',1,'p_keyword_param_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1866),
('keyword_param_list -> keyword_param_list COMMA keyword_param','keyword_param_list',3,'p_keyword_param_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1870),
('keyword_param -> ID EQUALS expr','keyword_param',3,'p_keyword_param','/home/weilong/gem5-dram/src/arch/isa_parser.py',1874),
('excess_args_param -> ASTERISK ID','excess_args_param',2,'p_excess_args_param','/home/weilong/gem5-dram/src/arch/isa_parser.py',1878),
('top_level_decode_block -> decode_block','top_level_decode_block',1,'p_top_level_decode_block','/home/weilong/gem5-dram/src/arch/isa_parser.py',1891),
('decode_block -> DECODE ID opt_default LBRACE decode_stmt_list RBRACE','decode_block',6,'p_decode_block','/home/weilong/gem5-dram/src/arch/isa_parser.py',1903),
('opt_default -> empty','opt_default',1,'p_opt_default_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1918),
('opt_default -> DEFAULT inst','opt_default',2,'p_opt_default_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1926),
('decode_stmt_list -> decode_stmt','decode_stmt_list',1,'p_decode_stmt_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',1935),
('decode_stmt_list -> decode_stmt decode_stmt_list','decode_stmt_list',2,'p_decode_stmt_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',1939),
('decode_stmt -> CPPDIRECTIVE','decode_stmt',1,'p_decode_stmt_cpp','/home/weilong/gem5-dram/src/arch/isa_parser.py',1962),
('decode_stmt -> FORMAT push_format_id LBRACE decode_stmt_list RBRACE','decode_stmt',5,'p_decode_stmt_format','/home/weilong/gem5-dram/src/arch/isa_parser.py',1971),
('push_format_id -> ID','push_format_id',1,'p_push_format_id','/home/weilong/gem5-dram/src/arch/isa_parser.py',1983),
('decode_stmt -> case_list COLON decode_block','decode_stmt',3,'p_decode_stmt_decode','/home/weilong/gem5-dram/src/arch/isa_parser.py',1993),
('decode_stmt -> case_list COLON inst SEMI','decode_stmt',4,'p_decode_stmt_inst','/home/weilong/gem5-dram/src/arch/isa_parser.py',2004),
('case_list -> DEFAULT','case_list',1,'p_case_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2016),
('case_list -> INTLIT','case_list',1,'p_case_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2029),
('case_list -> STRLIT','case_list',1,'p_case_list_2','/home/weilong/gem5-dram/src/arch/isa_parser.py',2033),
('case_list -> case_list COMMA INTLIT','case_list',3,'p_case_list_3','/home/weilong/gem5-dram/src/arch/isa_parser.py',2037),
('case_list -> case_list COMMA STRLIT','case_list',3,'p_case_list_4','/home/weilong/gem5-dram/src/arch/isa_parser.py',2042),
('inst -> ID LPAREN arg_list RPAREN','inst',4,'p_inst_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2050),
('inst -> ID DBLCOLON ID LPAREN arg_list RPAREN','inst',6,'p_inst_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2064),
('arg_list -> positional_arg_list COMMA keyword_arg_list','arg_list',3,'p_arg_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2079),
('arg_list -> positional_arg_list','arg_list',1,'p_arg_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2083),
('arg_list -> keyword_arg_list','arg_list',1,'p_arg_list_2','/home/weilong/gem5-dram/src/arch/isa_parser.py',2087),
('positional_arg_list -> empty','positional_arg_list',1,'p_positional_arg_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2091),
('positional_arg_list -> expr','positional_arg_list',1,'p_positional_arg_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2095),
('positional_arg_list -> positional_arg_list COMMA expr','positional_arg_list',3,'p_positional_arg_list_2','/home/weilong/gem5-dram/src/arch/isa_parser.py',2099),
('keyword_arg_list -> keyword_arg','keyword_arg_list',1,'p_keyword_arg_list_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2103),
('keyword_arg_list -> keyword_arg_list COMMA keyword_arg','keyword_arg_list',3,'p_keyword_arg_list_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2107),
('keyword_arg -> ID EQUALS expr','keyword_arg',3,'p_keyword_arg','/home/weilong/gem5-dram/src/arch/isa_parser.py',2112),
('expr -> ID','expr',1,'p_expr_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2127),
('expr -> INTLIT','expr',1,'p_expr_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2128),
('expr -> STRLIT','expr',1,'p_expr_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2129),
('expr -> CODELIT','expr',1,'p_expr_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2130),
('expr -> LBRACKET list_expr RBRACKET','expr',3,'p_expr_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2134),
('list_expr -> expr','list_expr',1,'p_list_expr_0','/home/weilong/gem5-dram/src/arch/isa_parser.py',2138),
('list_expr -> list_expr COMMA expr','list_expr',3,'p_list_expr_1','/home/weilong/gem5-dram/src/arch/isa_parser.py',2142),
('list_expr -> empty','list_expr',1,'p_list_expr_2','/home/weilong/gem5-dram/src/arch/isa_parser.py',2146),
('empty -> <empty>','empty',0,'p_empty','/home/weilong/gem5-dram/src/arch/isa_parser.py',2153),
]