from lib2to3.pgen2 import token
from lib2to3.pygram import python_symbols as syms
-yacc1_debug = 1
-yacc2_debug = 1
+yacc1_debug = 0
+yacc2_debug = 0
parse_debug = 1
# FILE_NAME(tmp, @2);
# p[0] = tmp;
# }
- p[0] = Node(syms.atom, [p[1], Leaf(token.MINUS, '-'), p[4]])
+ try:
+ p[0] = Node(syms.atom, [p[1], Leaf(token.MINUS, '-'), p[4]])
+ except:
+ p[0] = "bad input in p_expression_25"
()
'''module_item : attribute_list_opt net_type data_type_or_implicit delay3_opt net_variable_list ';' '''
if(parse_debug):
print('module_item_2', list(p))
+
+ p[0] = ["module_item_2"]+list(p)
# { data_type_t*data_type = p[3];
# if (data_type == 0) {
def p_net_type_1(p):
'''net_type : K_wire '''
- if(parse_debug):
+ if(parse_debug>2):
print('net_type_1', list(p))
- # { p[0] = NetNet::WIRE; }
+ p[0] = "wire"
()
def p_net_variable_1(p):
'''net_variable : IDENTIFIER dimensions_opt '''
- if(parse_debug):
+ if(parse_debug>2):
print('net_variable_1', list(p))
-
+
+ p[0]= ('net_variable_1', list(p))
+
# { perm_string name = lex_strings.make(p[1]);
# pform_makewire(@1, name, NetNet::IMPLICIT,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# pform_set_reg_idx(name, p[2]);
- # p[0] = p[1];
+ #p[0] = [p[1],p[2]]
# }
()
def p_net_variable_list_1(p):
'''net_variable_list : net_variable '''
- if(parse_debug):
+ if(parse_debug>2):
print('net_variable_list_1', list(p))
+ p[0] = ('net_variable_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# tmp->push_back(lex_strings.make(p[1]));
def p_net_variable_list_2(p):
'''net_variable_list : net_variable_list ',' net_variable '''
- if(parse_debug):
+ if(parse_debug>2):
print('net_variable_list_2', list(p))
+ p[0] = ('net_variable_list_2', list(p))
# { list<perm_string>*tmp = p[1];
# tmp->push_back(lex_strings.make(p[3]));