From: Tobias Platen Date: Fri, 24 Jan 2020 18:37:48 +0000 (+0100) Subject: always_comb: handle if/else blocks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a89a301c79bfc4678306153ca9ce09d3495d5e33;p=sv2nmigen.git always_comb: handle if/else blocks --- diff --git a/absyn.py b/absyn.py index ecd3846..413e513 100644 --- a/absyn.py +++ b/absyn.py @@ -43,6 +43,16 @@ class Assignment: self.op = op self.right = right + def debugInfo(self): + return "Assignment:"+str(self.left) + " "+str(self.op)+" "+str(self.right) + + +class CondStatement: + def __init__(self, cond, ifpart, elsepart): + self.cond = cond + self.ifpart = ifpart + self.elsepart = elsepart + class Absyn: def __init__(self, outputfn): @@ -51,6 +61,7 @@ class Absyn: self.assign = [] self.ports = [] self.wires = [] + self.comb = [] def open(self): if(self.outputfile is None): @@ -69,6 +80,9 @@ class Absyn: def assign3(self, left, op, right): return Assignment(left, op, right) + def cond_statement3(self, cond, ifpart, elsepart): + return CondStatement(cond, ifpart, elsepart) + def indent(self, count): if(indent_debug): return Leaf(token.INDENT, '>>> '*count) @@ -110,6 +124,45 @@ class Absyn: stmts.children.append(self.nl()) return stmts + def do_assign(self, a, stmts, indent): + stmts.children.append(self.indent(indent)) + stmts.children.append(Leaf(token.STRING, "m.d.comb += ")) + if(self.isPort(a.left)): + stmts.children.append(Leaf(token.STRING, "self.")) + stmts.children.append(Leaf(token.STRING, a.left)) + stmts.children.append(Leaf(token.STRING, ".eq(")) + if(self.isPort(a.right)): + stmts.children.append(Leaf(token.STRING, "self.")) + stmts.children.append(Leaf(token.STRING, a.right)) + stmts.children.append(Leaf(token.STRING, ")")) + stmts.children.append(self.nl()) + + def do_ifblock(self, c, stmts, indent): + stmts.children.append(self.indent(indent)) + stmts.children.append(Leaf(token.STRING, "with m.If(")) + if(self.isPort(c.cond)): + stmts.children.append(Leaf(token.STRING, "self.")) + stmts.children.append(Leaf(token.STRING, c.cond)) + stmts.children.append(Leaf(token.STRING, "):")) + stmts.children.append(self.nl()) + + for c1 in c.ifpart.statements: + if(type(c1) == Assignment): + self.do_assign(c1, stmts, indent+1) + else: + self.do_ifblock(c1, stmts, indent+1) + + if(c.elsepart): + stmts.children.append(self.indent(indent)) + stmts.children.append(Leaf(token.STRING, "with m.Else():")) + stmts.children.append(self.nl()) + + for c1 in c.elsepart.statements: + if(type(c1) == Assignment): + self.do_assign(c1, stmts, indent+1) + else: + self.do_ifblock(c1, stmts, indent+1) + def elaborateFunc(self): params = [Leaf(token.LPAR, '('), Leaf( token.NAME, "self, platform=None"), Leaf(token.RPAR, ')')] @@ -136,19 +189,16 @@ class Absyn: stmts.children.append(Leaf(token.STRING, ")")) stmts.children.append(self.nl()) + # refactor: assignments non cond for a in self.assign: - stmts.children.append(self.indent(2)) - # m.d.sync += self.left.eq(right) - stmts.children.append(Leaf(token.STRING, "m.d.comb += ")) - if(self.isPort(a.left)): - stmts.children.append(Leaf(token.STRING, "self.")) - stmts.children.append(Leaf(token.STRING, a.left)) - stmts.children.append(Leaf(token.STRING, ".eq(")) - if(self.isPort(a.right)): - stmts.children.append(Leaf(token.STRING, "self.")) - stmts.children.append(Leaf(token.STRING, a.right)) - stmts.children.append(Leaf(token.STRING, ")")) - stmts.children.append(self.nl()) + self.do_assign(a, stmts) + + for c in self.comb: + print("comb", c) + if(type(c) == Assignment): + self.do_assign(c, stmts, 2) + else: + self.do_ifblock(c, stmts, 2) stmts.children.append(self.indent(2)) stmts.children.append(Leaf(token.STRING, "return m")) @@ -199,8 +249,8 @@ class Absyn: def cont_assign_1(self, p): self.assign += [Assignment(p[1], p[2], p[3])] + # cond assigmments and other nested blocks def always_comb(self, p3, p1): print("always_comb") slist = p3[6] - for s in slist.statements: - self.assign += [s] + self.comb += slist.statements diff --git a/examples/always_comb.sv b/examples/always_comb.sv index aa4975d..2b57ac1 100644 --- a/examples/always_comb.sv +++ b/examples/always_comb.sv @@ -12,6 +12,10 @@ always_comb begin : HIT_CHECK cache_coherent_if = 1; end else begin cache_coherent_else = 0; + if(cond2) out_addr = 1; + if(cond3) begin + out_addr = 2; + end end end diff --git a/parse_sv.py b/parse_sv.py index 427f399..2591398 100644 --- a/parse_sv.py +++ b/parse_sv.py @@ -27,7 +27,7 @@ from lib2to3.pygram import python_symbols as syms yacc1_debug = 0 yacc2_debug = 0 -parse_debug = 0 +parse_debug = 1 #from parse_tokens import tokens @@ -116,13 +116,6 @@ class StatementList: self.statements += [s] -class PAssign: - def __init__(self, l, op, r): - self.l = l - self.op = op - self.r = r - - # -------------- RULES ---------------- () @@ -148,7 +141,6 @@ def p_source_text_2(p): def p__embed0_source_text(p): '''_embed0_source_text : ''' - # { pform_set_scope_timescale(yyloc); } () @@ -167,7 +159,6 @@ def p_assignment_pattern_1(p): if(parse_debug): print('assignment_pattern_1', list(p)) - # { PEAssignPattern*tmp = new PEAssignPattern(*p[2]); # FILE_NAME(tmp, @1); # delete p[2]; @@ -181,7 +172,6 @@ def p_assignment_pattern_2(p): if(parse_debug): print('assignment_pattern_2', list(p)) - # { PEAssignPattern*tmp = new PEAssignPattern; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -212,7 +202,6 @@ def p_class_declaration_1(p): if(parse_debug): print('class_declaration_1', list(p)) - # { // Wrap up the class. # if (p[11] && p[4] && p[4]->name != p[11]) { # yyerror(@11, "error: Class end label doesn't match class name."); @@ -225,7 +214,6 @@ def p_class_declaration_1(p): def p__embed0_class_declaration(p): '''_embed0_class_declaration : ''' - # { pform_start_class_declaration(@2, p[4], p[5].type, p[5].exprs, p[3]); } () @@ -233,7 +221,6 @@ def p__embed0_class_declaration(p): def p__embed1_class_declaration(p): '''_embed1_class_declaration : ''' - # { // Process a class. # pform_end_class_declaration(@9); # } @@ -263,7 +250,6 @@ def p_class_identifier_1(p): if(parse_debug): print('class_identifier_1', list(p)) - # { // Create a synthetic typedef for the class name so that the # // lexor detects the name as a type. # perm_string name = lex_strings.make(p[1]); @@ -281,7 +267,6 @@ def p_class_identifier_2(p): if(parse_debug): print('class_identifier_2', list(p)) - # { class_type_t*tmp = dynamic_cast(p[1].type); # if (tmp == 0) { # yyerror(@1, "Type name \"%s\"is not a predeclared class name.", p[1].text); @@ -297,7 +282,6 @@ def p_class_declaration_endlabel_opt_1(p): if(parse_debug): print('class_declaration_endlabel_opt_1', list(p)) - # { class_type_t*tmp = dynamic_cast (p[2].type); # if (tmp == 0) { # yyerror(@2, "error: class declaration endlabel \"%s\" is not a class name\n", p[2].text); @@ -325,7 +309,6 @@ def p_class_declaration_endlabel_opt_3(p): if(parse_debug): print('class_declaration_endlabel_opt_3', list(p)) - # { p[0] = None } () @@ -335,7 +318,6 @@ def p_class_declaration_extends_opt_1(p): if(parse_debug): print('class_declaration_extends_opt_1', list(p)) - # { p[0].type = p[2].type; # p[0].exprs= 0; # delete[]p[2].text; @@ -348,7 +330,6 @@ def p_class_declaration_extends_opt_2(p): if(parse_debug): print('class_declaration_extends_opt_2', list(p)) - # { p[0].type = p[2].type; # p[0].exprs = p[4]; # delete[]p[2].text; @@ -361,7 +342,6 @@ def p_class_declaration_extends_opt_3(p): if(parse_debug): print('class_declaration_extends_opt_3', list(p)) - # { p[0].type = 0; p[0].exprs = 0; } () @@ -407,7 +387,6 @@ def p_class_item_1(p): if(parse_debug): print('class_item_1', list(p)) - # { current_function->set_ports(p[6]); # pform_set_constructor_return(current_function); # pform_set_this_class(@3, current_function); @@ -423,7 +402,6 @@ def p_class_item_2(p): if(parse_debug): print('class_item_2', list(p)) - # { pform_class_property(@2, p[1], p[2], p[3]); } () @@ -433,7 +411,6 @@ def p_class_item_3(p): if(parse_debug): print('class_item_3', list(p)) - # { pform_class_property(@1, p[2] | property_qualifier_t::make_const(), p[3], p[4]); } () @@ -443,7 +420,6 @@ def p_class_item_4(p): if(parse_debug): print('class_item_4', list(p)) - # { /* The task_declaration rule puts this into the class */ } () @@ -453,7 +429,6 @@ def p_class_item_5(p): if(parse_debug): print('class_item_5', list(p)) - # { /* The function_declaration rule puts this into the class */ } () @@ -463,7 +438,6 @@ def p_class_item_6(p): if(parse_debug): print('class_item_6', list(p)) - # { yyerror(@1, "sorry: External constructors are not yet supported."); } () @@ -473,7 +447,6 @@ def p_class_item_7(p): if(parse_debug): print('class_item_7', list(p)) - # { yyerror(@1, "sorry: External constructors are not yet supported."); } () @@ -483,7 +456,6 @@ def p_class_item_8(p): if(parse_debug): print('class_item_8', list(p)) - # { yyerror(@1, "sorry: External methods are not yet supported."); # delete[] p[5]; # } @@ -495,7 +467,6 @@ def p_class_item_9(p): if(parse_debug): print('class_item_9', list(p)) - # { yyerror(@1, "sorry: External methods are not yet supported."); # delete[] p[5]; # } @@ -507,7 +478,6 @@ def p_class_item_10(p): if(parse_debug): print('class_item_10', list(p)) - # { yyerror(@1, "sorry: External methods are not yet supported."); # delete[] p[4]; # } @@ -519,7 +489,6 @@ def p_class_item_11(p): if(parse_debug): print('class_item_11', list(p)) - # { yyerror(@1, "sorry: External methods are not yet supported."); # delete[] p[4]; # } @@ -540,7 +509,6 @@ def p_class_item_13(p): if(parse_debug): print('class_item_13', list(p)) - # { yyerror(@3, "error: Errors in variable names after data type."); # yyerrok; # } @@ -552,7 +520,6 @@ def p_class_item_14(p): if(parse_debug): print('class_item_14', list(p)) - # { yyerror(@3, "error: %s doesn't name a type.", p[2]); # yyerrok; # } @@ -564,7 +531,6 @@ def p_class_item_15(p): if(parse_debug): print('class_item_15', list(p)) - # { yyerror(@1, "error: I give up on this class constructor declaration."); # yyerrok; # } @@ -576,7 +542,6 @@ def p_class_item_16(p): if(parse_debug): print('class_item_16', list(p)) - # { yyerror(@2, "error: invalid class item."); # yyerrok; # } @@ -586,7 +551,6 @@ def p_class_item_16(p): def p__embed0_class_item(p): '''_embed0_class_item : ''' - # { assert(current_function==0); # current_function = pform_push_constructor_scope(@3); # } @@ -598,7 +562,6 @@ def p_class_item_qualifier_1(p): if(parse_debug): print('class_item_qualifier_1', list(p)) - # { p[0] = property_qualifier_t::make_static(); } () @@ -608,7 +571,6 @@ def p_class_item_qualifier_2(p): if(parse_debug): print('class_item_qualifier_2', list(p)) - # { p[0] = property_qualifier_t::make_protected(); } () @@ -618,7 +580,6 @@ def p_class_item_qualifier_3(p): if(parse_debug): print('class_item_qualifier_3', list(p)) - # { p[0] = property_qualifier_t::make_local(); } () @@ -628,7 +589,6 @@ def p_class_item_qualifier_list_1(p): if(parse_debug): print('class_item_qualifier_list_1', list(p)) - # { p[0] = p[1] | p[2]; } () @@ -658,7 +618,6 @@ def p_class_item_qualifier_opt_2(p): if(parse_debug): print('class_item_qualifier_opt_2', list(p)) - # { p[0] = property_qualifier_t::make_none(); } () @@ -668,7 +627,6 @@ def p_class_new_1(p): if(parse_debug): print('class_new_1', list(p)) - # { list*expr_list = p[3]; # strip_tail_items(expr_list); # PENewClass*tmp = new PENewClass(*expr_list); @@ -684,7 +642,6 @@ def p_class_new_2(p): if(parse_debug): print('class_new_2', list(p)) - # { PEIdent*tmpi = new PEIdent(*p[2]); # FILE_NAME(tmpi, @2); # PENewCopy*tmp = new PENewCopy(tmpi); @@ -700,7 +657,6 @@ def p_class_new_3(p): if(parse_debug): print('class_new_3', list(p)) - # { PENewClass*tmp = new PENewClass; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -713,7 +669,6 @@ def p_concurrent_assertion_item_1(p): if(parse_debug): print('concurrent_assertion_item_1', list(p)) - # { /* */ # if (gn_assertions_flag) { # yyerror(@2, "sorry: concurrent_assertion_item not supported." @@ -728,7 +683,6 @@ def p_concurrent_assertion_item_2(p): if(parse_debug): print('concurrent_assertion_item_2', list(p)) - # { yyerrok; # yyerror(@2, "error: Error in property_spec of concurrent assertion item."); # } @@ -785,7 +739,6 @@ def p_constraint_declaration_1(p): if(parse_debug): print('constraint_declaration_1', list(p)) - # { yyerror(@2, "sorry: Constraint declarations not supported."); } () @@ -795,7 +748,6 @@ def p_constraint_declaration_2(p): if(parse_debug): print('constraint_declaration_2', list(p)) - # { yyerror(@4, "error: Errors in the constraint block item list."); } () @@ -877,7 +829,6 @@ def p_constraint_prototype_1(p): if(parse_debug): print('constraint_prototype_1', list(p)) - # { yyerror(@2, "sorry: Constraint prototypes not supported."); } () @@ -905,7 +856,6 @@ def p_data_declaration_1(p): if(parse_debug): print('data_declaration_1', list(p)) - # { data_type_t*data_type = p[2]; # if (data_type == 0) { # data_type = new vector_type_t(IVL_VT_LOGIC, false, 0); @@ -930,7 +880,6 @@ def p_data_type_1(p): dt.reg_flag = reg_flag p[0] = dt - # { ivl_variable_type_t use_vtype = p[1]; # bool reg_flag = false; # if (use_vtype == IVL_VT_NO_TYPE) { @@ -951,7 +900,6 @@ def p_data_type_2(p): print('data_type_2', list(p)) p[0] = p[1] - # { real_type_t*tmp = new real_type_t(p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -965,7 +913,6 @@ def p_data_type_3(p): print('data_type_3', list(p)) p[0] = p[1] - # { if (!p[1]->packed_flag) { # yyerror(@1, "sorry: Unpacked structs not supported."); # } @@ -989,7 +936,6 @@ def p_data_type_5(p): if(parse_debug): print('data_type_5', list(p)) - # { atom2_type_t*tmp = new atom2_type_t(p[1], p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1002,7 +948,6 @@ def p_data_type_6(p): if(parse_debug): print('data_type_6', list(p)) - # { list*pd = make_range_from_width(integer_width); # vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, p[2], pd); # tmp->reg_flag = true; @@ -1017,7 +962,6 @@ def p_data_type_7(p): if(parse_debug): print('data_type_7', list(p)) - # { list*pd = make_range_from_width(64); # vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, false, pd); # tmp->reg_flag = !gn_system_verilog(); @@ -1031,7 +975,6 @@ def p_data_type_8(p): if(parse_debug): print('data_type_8', list(p)) - # { if (p[2]) { # parray_type_t*tmp = new parray_type_t(p[1].type, p[2]); # FILE_NAME(tmp, @1); @@ -1047,7 +990,6 @@ def p_data_type_9(p): if(parse_debug): print('data_type_9', list(p)) - # { lex_in_package_scope(0); # p[0] = p[4].type; # delete[]p[4].text; @@ -1060,7 +1002,6 @@ def p_data_type_10(p): if(parse_debug): print('data_type_10', list(p)) - # { string_type_t*tmp = new string_type_t; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1071,7 +1012,6 @@ def p_data_type_10(p): def p__embed0_data_type(p): '''_embed0_data_type : ''' - # { lex_in_package_scope(p[1]); } () @@ -1091,7 +1031,6 @@ def p_data_type_or_implicit_2(p): if(parse_debug): print('data_type_or_implicit_2', list(p)) - # { vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, p[1], p[2]); # tmp->implicit_flag = true; # FILE_NAME(tmp, @1); @@ -1106,7 +1045,6 @@ def p_data_type_or_implicit_3(p): print('data_type_or_implicit_3', list(p)) p[0] = list(p) - # { vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, false, p[1]); # tmp->implicit_flag = true; # FILE_NAME(tmp, @1); @@ -1120,7 +1058,6 @@ def p_data_type_or_implicit_4(p): if(parse_debug > 2): print('data_type_or_implicit_4', list(p)) - # { p[0] = None } () @@ -1140,7 +1077,6 @@ def p_data_type_or_implicit_or_void_2(p): if(parse_debug): print('data_type_or_implicit_or_void_2', list(p)) - # { void_type_t*tmp = new void_type_t; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1216,7 +1152,6 @@ def p_description_8(p): if(parse_debug): print('description_8', list(p)) - # { perm_string tmp3 = lex_strings.make(p[3]); # pform_set_type_attrib(tmp3, p[5], p[7]); # delete[] p[3]; @@ -1266,7 +1201,6 @@ def p_dynamic_array_new_1(p): if(parse_debug): print('dynamic_array_new_1', list(p)) - # { p[0] = new PENewArray(p[3], 0); # FILE_NAME(p[0], @1); # } @@ -1278,7 +1212,6 @@ def p_dynamic_array_new_2(p): if(parse_debug): print('dynamic_array_new_2', list(p)) - # { p[0] = new PENewArray(p[3], p[6]); # FILE_NAME(p[0], @1); # } @@ -1290,7 +1223,6 @@ def p_for_step_1(p): if(parse_debug): print('for_step_1', list(p)) - # { PAssign*tmp = new PAssign(p[1],p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1303,7 +1235,6 @@ def p_for_step_2(p): if(parse_debug): print('for_step_2', list(p)) - # { p[0] = pform_compressed_assign_from_inc_dec(@1, p[1]); } () @@ -1323,7 +1254,6 @@ def p_function_declaration_1(p): if(parse_debug): print('function_declaration_1', list(p)) - # { // Last step: check any closing name. # if (p[11]) { # if (strcmp(p[4],p[11]) != 0) { @@ -1346,7 +1276,6 @@ def p_function_declaration_2(p): if(parse_debug): print('function_declaration_2', list(p)) - # { // Last step: check any closing name. # if (p[14]) { # if (strcmp(p[4],p[14]) != 0) { @@ -1369,7 +1298,6 @@ def p_function_declaration_3(p): if(parse_debug): print('function_declaration_3', list(p)) - # { // Last step: check any closing name. # if (p[8]) { # if (strcmp(p[4],p[8]) != 0) { @@ -1389,7 +1317,6 @@ def p_function_declaration_3(p): def p__embed0_function_declaration(p): '''_embed0_function_declaration : ''' - # { assert(current_function == 0); # current_function = pform_push_function_scope(@1, p[4], p[2]); # } @@ -1399,7 +1326,6 @@ def p__embed0_function_declaration(p): def p__embed1_function_declaration(p): '''_embed1_function_declaration : ''' - # { current_function->set_ports(p[7]); # current_function->set_return(p[3]); # current_function_set_statement(p[8]? @8 : @4, p[8]); @@ -1413,7 +1339,6 @@ def p__embed1_function_declaration(p): def p__embed2_function_declaration(p): '''_embed2_function_declaration : ''' - # { assert(current_function == 0); # current_function = pform_push_function_scope(@1, p[4], p[2]); # } @@ -1423,7 +1348,6 @@ def p__embed2_function_declaration(p): def p__embed3_function_declaration(p): '''_embed3_function_declaration : ''' - # { current_function->set_ports(p[7]); # current_function->set_return(p[3]); # current_function_set_statement(p[11]? @11 : @4, p[11]); @@ -1440,7 +1364,6 @@ def p__embed3_function_declaration(p): def p__embed4_function_declaration(p): '''_embed4_function_declaration : ''' - # { /* */ # if (current_function) { # pform_pop_scope(); @@ -1478,7 +1401,6 @@ def p_implicit_class_handle_1(p): if(parse_debug): print('implicit_class_handle_1', list(p)) - # { p[0] = pform_create_this(); } () @@ -1488,7 +1410,6 @@ def p_implicit_class_handle_2(p): if(parse_debug): print('implicit_class_handle_2', list(p)) - # { p[0] = pform_create_super(); } () @@ -1498,7 +1419,6 @@ def p_inc_or_dec_expression_1(p): if(parse_debug): print('inc_or_dec_expression_1', list(p)) - # { PEUnary*tmp = new PEUnary('I', p[2]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -1511,7 +1431,6 @@ def p_inc_or_dec_expression_2(p): if(parse_debug): print('inc_or_dec_expression_2', list(p)) - # { PEUnary*tmp = new PEUnary('i', p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1524,7 +1443,6 @@ def p_inc_or_dec_expression_3(p): if(parse_debug): print('inc_or_dec_expression_3', list(p)) - # { PEUnary*tmp = new PEUnary('D', p[2]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -1537,7 +1455,6 @@ def p_inc_or_dec_expression_4(p): if(parse_debug): print('inc_or_dec_expression_4', list(p)) - # { PEUnary*tmp = new PEUnary('d', p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1550,7 +1467,6 @@ def p_inside_expression_1(p): if(parse_debug): print('inside_expression_1', list(p)) - # { yyerror(@2, "sorry: \"inside\" expressions not supported yet."); # p[0] = None # } @@ -1592,7 +1508,6 @@ def p_integer_vector_type_4(p): if(parse_debug): print('integer_vector_type_4', list(p)) - # { p[0] = IVL_VT_BOOL; } () @@ -1602,7 +1517,6 @@ def p_join_keyword_1(p): if(parse_debug): print('join_keyword_1', list(p)) - # { p[0] = PBlock::BL_PAR; } () @@ -1612,7 +1526,6 @@ def p_join_keyword_2(p): if(parse_debug): print('join_keyword_2', list(p)) - # { p[0] = PBlock::BL_JOIN_NONE; } () @@ -1622,7 +1535,6 @@ def p_join_keyword_3(p): if(parse_debug): print('join_keyword_3', list(p)) - # { p[0] = PBlock::BL_JOIN_ANY; } () @@ -1632,7 +1544,6 @@ def p_jump_statement_1(p): if(parse_debug): print('jump_statement_1', list(p)) - # { yyerror(@1, "sorry: break statements not supported."); # p[0] = None # } @@ -1644,7 +1555,6 @@ def p_jump_statement_2(p): if(parse_debug): print('jump_statement_2', list(p)) - # { PReturn*tmp = new PReturn(0); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1657,7 +1567,6 @@ def p_jump_statement_3(p): if(parse_debug): print('jump_statement_3', list(p)) - # { PReturn*tmp = new PReturn(p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1670,7 +1579,6 @@ def p_lifetime_1(p): if(parse_debug): print('lifetime_1', list(p)) - # { p[0] = LexicalScope::AUTOMATIC; } () @@ -1680,7 +1588,6 @@ def p_lifetime_2(p): if(parse_debug): print('lifetime_2', list(p)) - # { p[0] = LexicalScope::STATIC; } () @@ -1700,7 +1607,6 @@ def p_lifetime_opt_2(p): if(parse_debug > 2): print('lifetime_opt_2', list(p)) - # { p[0] = LexicalScope::INHERITED; } () @@ -1710,7 +1616,6 @@ def p_loop_statement_1(p): if(parse_debug): print('loop_statement_1', list(p)) - # { PForStatement*tmp = new PForStatement(p[3], p[5], p[7], p[9], p[11]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1723,7 +1628,6 @@ def p_loop_statement_2(p): if(parse_debug): print('loop_statement_2', list(p)) - # { pform_name_t tmp_hident; # tmp_hident.push_back(name_component_t(lex_strings.make(p[4]))); # @@ -1750,7 +1654,6 @@ def p_loop_statement_3(p): if(parse_debug): print('loop_statement_3', list(p)) - # { PForever*tmp = new PForever(p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1763,7 +1666,6 @@ def p_loop_statement_4(p): if(parse_debug): print('loop_statement_4', list(p)) - # { PRepeat*tmp = new PRepeat(p[3], p[5]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1776,7 +1678,6 @@ def p_loop_statement_5(p): if(parse_debug): print('loop_statement_5', list(p)) - # { PWhile*tmp = new PWhile(p[3], p[5]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1789,7 +1690,6 @@ def p_loop_statement_6(p): if(parse_debug): print('loop_statement_6', list(p)) - # { PDoWhile*tmp = new PDoWhile(p[5], p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -1802,7 +1702,6 @@ def p_loop_statement_7(p): if(parse_debug): print('loop_statement_7', list(p)) - # { PForeach*tmp_for = pform_make_foreach(@1, p[3], p[5], p[9]); # # pform_pop_scope(); @@ -1821,7 +1720,6 @@ def p_loop_statement_8(p): if(parse_debug): print('loop_statement_8', list(p)) - # { p[0] = None # yyerror(@1, "error: Error in for loop step assignment."); # } @@ -1833,7 +1731,6 @@ def p_loop_statement_9(p): if(parse_debug): print('loop_statement_9', list(p)) - # { p[0] = None # yyerror(@1, "error: Error in for loop condition expression."); # } @@ -1845,7 +1742,6 @@ def p_loop_statement_10(p): if(parse_debug): print('loop_statement_10', list(p)) - # { p[0] = None # yyerror(@1, "error: Incomprehensible for loop."); # } @@ -1857,7 +1753,6 @@ def p_loop_statement_11(p): if(parse_debug): print('loop_statement_11', list(p)) - # { p[0] = None # yyerror(@1, "error: Error in while loop condition."); # } @@ -1869,7 +1764,6 @@ def p_loop_statement_12(p): if(parse_debug): print('loop_statement_12', list(p)) - # { p[0] = None # yyerror(@1, "error: Error in do/while loop condition."); # } @@ -1881,7 +1775,6 @@ def p_loop_statement_13(p): if(parse_debug): print('loop_statement_13', list(p)) - # { p[0] = None # yyerror(@4, "error: Errors in foreach loop variables list."); # } @@ -1891,7 +1784,6 @@ def p_loop_statement_13(p): def p__embed0_loop_statement(p): '''_embed0_loop_statement : ''' - # { static unsigned for_counter = 0; # char for_block_name [64]; # snif(parse_debug): printf(for_block_name, sizeof for_block_name, "$ivl_for_loop%u", for_counter); @@ -1912,7 +1804,6 @@ def p__embed0_loop_statement(p): def p__embed1_loop_statement(p): '''_embed1_loop_statement : ''' - # { static unsigned foreach_counter = 0; # char for_block_name[64]; # snif(parse_debug): printf(for_block_name, sizeof for_block_name, "$ivl_foreach%u", foreach_counter); @@ -1932,7 +1823,6 @@ def p_list_of_variable_decl_assignments_1(p): if(parse_debug): print('list_of_variable_decl_assignments_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # p[0] = tmp; @@ -1945,7 +1835,6 @@ def p_list_of_variable_decl_assignments_2(p): if(parse_debug): print('list_of_variable_decl_assignments_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -1958,7 +1847,6 @@ def p_variable_decl_assignment_1(p): if(parse_debug): print('variable_decl_assignment_1', list(p)) - # { decl_assignment_t*tmp = new decl_assignment_t; # tmp->name = lex_strings.make(p[1]); # if (p[2]) { @@ -1976,7 +1864,6 @@ def p_variable_decl_assignment_2(p): if(parse_debug): print('variable_decl_assignment_2', list(p)) - # { decl_assignment_t*tmp = new decl_assignment_t; # tmp->name = lex_strings.make(p[1]); # tmp->expr .reset(p[3]); @@ -1991,7 +1878,6 @@ def p_variable_decl_assignment_3(p): if(parse_debug): print('variable_decl_assignment_3', list(p)) - # { decl_assignment_t*tmp = new decl_assignment_t; # tmp->name = lex_strings.make(p[1]); # PENewClass*expr = new PENewClass; @@ -2008,7 +1894,6 @@ def p_loop_variables_1(p): if(parse_debug): print('loop_variables_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[3])); # delete[]p[3]; @@ -2022,7 +1907,6 @@ def p_loop_variables_2(p): if(parse_debug): print('loop_variables_2', list(p)) - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[1])); # delete[]p[1]; @@ -2079,7 +1963,6 @@ def p_modport_declaration_1(p): def p__embed0_modport_declaration(p): '''_embed0_modport_declaration : ''' - # { if (!pform_in_interface()) # yyerror(@1, "error: modport declarations are only allowed " # "in interfaces."); @@ -2110,7 +1993,6 @@ def p_modport_item_1(p): if(parse_debug): print('modport_item_1', list(p)) - # { pform_end_modport_item(@1); } () @@ -2118,7 +2000,6 @@ def p_modport_item_1(p): def p__embed0_modport_item(p): '''_embed0_modport_item : ''' - # { pform_start_modport_item(@1, p[1]); } () @@ -2146,7 +2027,6 @@ def p_modport_ports_list_3(p): if(parse_debug): print('modport_ports_list_3', list(p)) - # { if (last_modport_port.type == MP_SIMPLE) { # pform_add_modport_port(@3, last_modport_port.direction, # p[3]->name, p[3]->parm); @@ -2163,7 +2043,6 @@ def p_modport_ports_list_4(p): if(parse_debug): print('modport_ports_list_4', list(p)) - # { if (last_modport_port.type != MP_TF) # yyerror(@3, "error: task/function declaration not allowed here."); # } @@ -2175,7 +2054,6 @@ def p_modport_ports_list_5(p): if(parse_debug): print('modport_ports_list_5', list(p)) - # { if (last_modport_port.type == MP_SIMPLE) { # pform_add_modport_port(@3, last_modport_port.direction, # lex_strings.make(p[3]), 0); @@ -2192,7 +2070,6 @@ def p_modport_ports_list_6(p): if(parse_debug): print('modport_ports_list_6', list(p)) - # { yyerror(@2, "error: NULL port declarations are not allowed"); } () @@ -2202,7 +2079,6 @@ def p_modport_ports_declaration_1(p): if(parse_debug): print('modport_ports_declaration_1', list(p)) - # { last_modport_port.type = MP_SIMPLE; # last_modport_port.direction = p[2]; # pform_add_modport_port(@3, p[2], lex_strings.make(p[3]), 0); @@ -2217,7 +2093,6 @@ def p_modport_ports_declaration_2(p): if(parse_debug): print('modport_ports_declaration_2', list(p)) - # { last_modport_port.type = MP_SIMPLE; # last_modport_port.direction = p[2]; # pform_add_modport_port(@3, p[2], p[3]->name, p[3]->parm); @@ -2232,7 +2107,6 @@ def p_modport_ports_declaration_3(p): if(parse_debug): print('modport_ports_declaration_3', list(p)) - # { last_modport_port.type = MP_TF; # last_modport_port.is_import = p[2]; # yyerror(@3, "sorry: modport task/function ports are not yet supported."); @@ -2247,7 +2121,6 @@ def p_modport_ports_declaration_4(p): if(parse_debug): print('modport_ports_declaration_4', list(p)) - # { last_modport_port.type = MP_TF; # last_modport_port.is_import = p[2]; # yyerror(@3, "sorry: modport task/function ports are not yet supported."); @@ -2261,7 +2134,6 @@ def p_modport_ports_declaration_5(p): if(parse_debug): print('modport_ports_declaration_5', list(p)) - # { last_modport_port.type = MP_CLOCKING; # last_modport_port.direction = NetNet::NOT_A_PORT; # yyerror(@3, "sorry: modport clocking declaration is not yet supported."); @@ -2276,7 +2148,6 @@ def p_modport_simple_port_1(p): if(parse_debug): print('modport_simple_port_1', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = p[4]; @@ -2327,7 +2198,6 @@ def p_non_integer_type_1(p): if(parse_debug): print('non_integer_type_1', list(p)) - # { p[0] = real_type_t::REAL; } () @@ -2337,7 +2207,6 @@ def p_non_integer_type_2(p): if(parse_debug): print('non_integer_type_2', list(p)) - # { p[0] = real_type_t::REAL; } () @@ -2347,7 +2216,6 @@ def p_non_integer_type_3(p): if(parse_debug): print('non_integer_type_3', list(p)) - # { p[0] = real_type_t::SHORTREAL; } () @@ -2357,7 +2225,6 @@ def p_number_1(p): if(parse_debug): print('number_1', list(p)) - # { p[0] = p[1]; based_size = 0;} () @@ -2369,7 +2236,6 @@ def p_number_2(p): num = Leaf(token.NUMBER, "%s" % (p[1])) p[0] = num - # { p[0] = p[1]; based_size = 0;} () @@ -2381,7 +2247,6 @@ def p_number_3(p): num = Leaf(token.NUMBER, "%s:%s" % (p[1], p[2])) p[0] = num - # { p[0] = pform_verinum_with_size(p[1],p[2], @2.text, @2.first_line); # based_size = 0; } () @@ -2392,7 +2257,6 @@ def p_number_4(p): if(parse_debug): print('number_4', list(p)) - # { p[0] = p[1]; based_size = 0;} () @@ -2402,7 +2266,6 @@ def p_number_5(p): if(parse_debug): print('number_5', list(p)) - # { yyerror(@1, "error: Unbased SystemVerilog literal cannot have " # "a size."); # p[0] = p[1]; based_size = 0;} @@ -2432,7 +2295,6 @@ def p_package_declaration_1(p): if(parse_debug): print('package_declaration_1', list(p)) - # { pform_end_package_declaration(@1); # // If an end label is present make sure it match the package name. # if (p[10]) { @@ -2449,7 +2311,6 @@ def p_package_declaration_1(p): def p__embed0_package_declaration(p): '''_embed0_package_declaration : ''' - # { pform_start_package_declaration(@1, p[3], p[2]); } () @@ -2457,7 +2318,6 @@ def p__embed0_package_declaration(p): def p__embed1_package_declaration(p): '''_embed1_package_declaration : ''' - # { pform_set_scope_timescale(@1); } () @@ -2503,7 +2363,6 @@ def p_package_import_declaration_1(p): if(parse_debug): print('package_import_declaration_1', list(p)) - # { } () @@ -2513,7 +2372,6 @@ def p_package_import_item_1(p): if(parse_debug): print('package_import_item_1', list(p)) - # { pform_package_import(@2, p[1], p[3]); # delete[]p[3]; # } @@ -2525,7 +2383,6 @@ def p_package_import_item_2(p): if(parse_debug): print('package_import_item_2', list(p)) - # { pform_package_import(@2, p[1], 0); # } () @@ -2662,7 +2519,6 @@ def p_port_direction_1(p): if(parse_debug): print('port_direction_1', list(p)) - # { p[0] = NetNet::PINPUT; } () @@ -2672,7 +2528,6 @@ def p_port_direction_2(p): if(parse_debug): print('port_direction_2', list(p)) - # { p[0] = NetNet::POUTPUT; } () @@ -2682,7 +2537,6 @@ def p_port_direction_3(p): if(parse_debug): print('port_direction_3', list(p)) - # { p[0] = NetNet::PINOUT; } () @@ -2692,7 +2546,6 @@ def p_port_direction_4(p): if(parse_debug): print('port_direction_4', list(p)) - # { p[0] = NetNet::PREF; # if (!gn_system_verilog()) { # yyerror(@1, "error: Reference ports (ref) require SystemVerilog."); @@ -2717,7 +2570,6 @@ def p_port_direction_opt_2(p): if(parse_debug): print('port_direction_opt_2', list(p)) - # { p[0] = NetNet::PIMPLICIT; } () @@ -2736,7 +2588,6 @@ def p_procedural_assertion_statement_1(p): if(parse_debug): print('procedural_assertion_statement_1', list(p)) - # { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); # p[0] = None # } @@ -2748,7 +2599,6 @@ def p_procedural_assertion_statement_2(p): if(parse_debug): print('procedural_assertion_statement_2', list(p)) - # { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); # p[0] = None # } @@ -2760,7 +2610,6 @@ def p_procedural_assertion_statement_3(p): if(parse_debug): print('procedural_assertion_statement_3', list(p)) - # { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); # p[0] = None # } @@ -2800,7 +2649,6 @@ def p_property_qualifier_opt_2(p): if(parse_debug): print('property_qualifier_opt_2', list(p)) - # { p[0] = property_qualifier_t::make_none(); } () @@ -2810,7 +2658,6 @@ def p_property_qualifier_list_1(p): if(parse_debug): print('property_qualifier_list_1', list(p)) - # { p[0] = p[1] | p[2]; } () @@ -2857,7 +2704,6 @@ def p_random_qualifier_1(p): if(parse_debug): print('random_qualifier_1', list(p)) - # { p[0] = property_qualifier_t::make_rand(); } () @@ -2867,7 +2713,6 @@ def p_random_qualifier_2(p): if(parse_debug): print('random_qualifier_2', list(p)) - # { p[0] = property_qualifier_t::make_randc(); } () @@ -2915,7 +2760,6 @@ def p_simple_type_or_string_1(p): if(parse_debug): print('simple_type_or_string_1', list(p)) - # { ivl_variable_type_t use_vtype = p[1]; # bool reg_flag = false; # if (use_vtype == IVL_VT_NO_TYPE) { @@ -2935,7 +2779,6 @@ def p_simple_type_or_string_2(p): if(parse_debug): print('simple_type_or_string_2', list(p)) - # { real_type_t*tmp = new real_type_t(p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -2948,7 +2791,6 @@ def p_simple_type_or_string_3(p): if(parse_debug): print('simple_type_or_string_3', list(p)) - # { atom2_type_t*tmp = new atom2_type_t(p[1], true); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -2961,7 +2803,6 @@ def p_simple_type_or_string_4(p): if(parse_debug): print('simple_type_or_string_4', list(p)) - # { list*pd = make_range_from_width(integer_width); # vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, true, pd); # tmp->reg_flag = true; @@ -2976,7 +2817,6 @@ def p_simple_type_or_string_5(p): if(parse_debug): print('simple_type_or_string_5', list(p)) - # { list*pd = make_range_from_width(64); # vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, false, pd); # tmp->reg_flag = !gn_system_verilog(); @@ -2990,7 +2830,6 @@ def p_simple_type_or_string_6(p): if(parse_debug): print('simple_type_or_string_6', list(p)) - # { p[0] = p[1].type; # delete[]p[1].text; # } @@ -3002,7 +2841,6 @@ def p_simple_type_or_string_7(p): if(parse_debug): print('simple_type_or_string_7', list(p)) - # { lex_in_package_scope(0); # p[0] = p[4].type; # delete[]p[4].text; @@ -3015,7 +2853,6 @@ def p_simple_type_or_string_8(p): if(parse_debug): print('simple_type_or_string_8', list(p)) - # { string_type_t*tmp = new string_type_t; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -3026,7 +2863,6 @@ def p_simple_type_or_string_8(p): def p__embed0_simple_type_or_string(p): '''_embed0_simple_type_or_string : ''' - # { lex_in_package_scope(p[1]); } () @@ -3039,6 +2875,7 @@ def p_statement_1(p): # { pform_bind_attributes(p[2]->attributes, p[1]); p[0] = p[2] + # } () @@ -3060,7 +2897,6 @@ def p_statement_or_null_2(p): raise(Exception("p_statement_or_null_2")) - # { p[0] = None } () @@ -3115,7 +2951,6 @@ def p_streaming_concatenation_1(p): if(parse_debug): print('streaming_concatenation_1', list(p)) - # { /* streaming concatenation is a SystemVerilog thing. */ # if (gn_system_verilog()) { # yyerror(@2, "sorry: Streaming concatenation not supported."); @@ -3133,7 +2968,6 @@ def p_task_declaration_1(p): if(parse_debug): print('task_declaration_1', list(p)) - # { // Last step: check any closing name. This is done late so # // that the parser can look ahead to detect the present # // endlabel_opt but still have the pform_endmodule() called @@ -3159,7 +2993,6 @@ def p_task_declaration_2(p): if(parse_debug): print('task_declaration_2', list(p)) - # { // Last step: check any closing name. This is done late so # // that the parser can look ahead to detect the present # // endlabel_opt but still have the pform_endmodule() called @@ -3185,7 +3018,6 @@ def p_task_declaration_3(p): if(parse_debug): print('task_declaration_3', list(p)) - # { // Last step: check any closing name. This is done late so # // that the parser can look ahead to detect the present # // endlabel_opt but still have the pform_endmodule() called @@ -3211,7 +3043,6 @@ def p_task_declaration_4(p): if(parse_debug): print('task_declaration_4', list(p)) - # { // Last step: check any closing name. This is done late so # // that the parser can look ahead to detect the present # // endlabel_opt but still have the pform_endmodule() called @@ -3235,7 +3066,6 @@ def p_task_declaration_4(p): def p__embed0_task_declaration(p): '''_embed0_task_declaration : ''' - # { assert(current_task == 0); # current_task = pform_push_task_scope(@1, p[3], p[2]); # } @@ -3245,7 +3075,6 @@ def p__embed0_task_declaration(p): def p__embed1_task_declaration(p): '''_embed1_task_declaration : ''' - # { current_task->set_ports(p[6]); # current_task_set_statement(@3, p[7]); # pform_set_this_class(@3, current_task); @@ -3262,7 +3091,6 @@ def p__embed1_task_declaration(p): def p__embed2_task_declaration(p): '''_embed2_task_declaration : ''' - # { assert(current_task == 0); # current_task = pform_push_task_scope(@1, p[3], p[2]); # } @@ -3272,7 +3100,6 @@ def p__embed2_task_declaration(p): def p__embed3_task_declaration(p): '''_embed3_task_declaration : ''' - # { current_task->set_ports(p[6]); # current_task_set_statement(@3, p[10]); # pform_set_this_class(@3, current_task); @@ -3286,7 +3113,6 @@ def p__embed3_task_declaration(p): def p__embed4_task_declaration(p): '''_embed4_task_declaration : ''' - # { assert(current_task == 0); # current_task = pform_push_task_scope(@1, p[3], p[2]); # } @@ -3296,7 +3122,6 @@ def p__embed4_task_declaration(p): def p__embed5_task_declaration(p): '''_embed5_task_declaration : ''' - # { current_task->set_ports(0); # current_task_set_statement(@3, p[9]); # pform_set_this_class(@3, current_task); @@ -3317,7 +3142,6 @@ def p__embed5_task_declaration(p): def p__embed6_task_declaration(p): '''_embed6_task_declaration : ''' - # { # if (current_task) { # pform_pop_scope(); @@ -3332,7 +3156,6 @@ def p_tf_port_declaration_1(p): if(parse_debug): print('tf_port_declaration_1', list(p)) - # { vector*tmp = pform_make_task_ports(@1, p[1], # p[2] ? IVL_VT_LOGIC : # IVL_VT_NO_TYPE, @@ -3347,7 +3170,6 @@ def p_tf_port_declaration_2(p): if(parse_debug): print('tf_port_declaration_2', list(p)) - # { list*range_stub = make_range_from_width(integer_width); # vector*tmp = pform_make_task_ports(@1, p[1], IVL_VT_LOGIC, true, # range_stub, p[3], true); @@ -3361,7 +3183,6 @@ def p_tf_port_declaration_3(p): if(parse_debug): print('tf_port_declaration_3', list(p)) - # { list*range_stub = make_range_from_width(64); # vector*tmp = pform_make_task_ports(@1, p[1], IVL_VT_LOGIC, false, # range_stub, p[3]); @@ -3375,7 +3196,6 @@ def p_tf_port_declaration_4(p): if(parse_debug): print('tf_port_declaration_4', list(p)) - # { vector*tmp = pform_make_task_ports(@1, p[1], IVL_VT_REAL, true, # 0, p[3]); # p[0] = tmp; @@ -3388,7 +3208,6 @@ def p_tf_port_declaration_5(p): if(parse_debug): print('tf_port_declaration_5', list(p)) - # { vector*tmp = pform_make_task_ports(@1, p[1], IVL_VT_STRING, true, # 0, p[3]); # p[0] = tmp; @@ -3401,7 +3220,6 @@ def p_tf_port_item_1(p): if(parse_debug): print('tf_port_item_1', list(p)) - # { vector*tmp; # NetNet::PortType use_port_type = p[1]; # if ((use_port_type == NetNet::PIMPLICIT) && (gn_system_verilog() || (p[2] == 0))) @@ -3454,7 +3272,6 @@ def p_tf_port_item_2(p): if(parse_debug): print('tf_port_item_2', list(p)) - # { yyerror(@3, "error: Error in task/function port item after port name %s.", p[3]); # yyerrok; # p[0] = None @@ -3467,7 +3284,6 @@ def p_tf_port_item_expr_opt_1(p): if(parse_debug): print('tf_port_item_expr_opt_1', list(p)) - # { if (! gn_system_verilog()) { # yyerror(@1, "error: Task/function default arguments require " # "SystemVerilog."); @@ -3482,7 +3298,6 @@ def p_tf_port_item_expr_opt_2(p): if(parse_debug): print('tf_port_item_expr_opt_2', list(p)) - # { p[0] = None } () @@ -3500,7 +3315,6 @@ def p_tf_port_list_1(p): def p__embed0_tf_port_list(p): '''_embed0_tf_port_list : ''' - # { port_declaration_context.port_type = gn_system_verilog() ? NetNet::PINPUT : NetNet::PIMPLICIT; # port_declaration_context.data_type = 0; # } @@ -3512,7 +3326,6 @@ def p_tf_port_item_list_1(p): if(parse_debug): print('tf_port_item_list_1', list(p)) - # { vector*tmp; # if (p[1] && p[3]) { # size_t s1 = p[1]->size(); @@ -3546,7 +3359,6 @@ def p_tf_port_item_list_3(p): if(parse_debug): print('tf_port_item_list_3', list(p)) - # { yyerror(@2, "error: Syntax error in task/function port declaration."); # p[0] = p[3]; # } @@ -3558,7 +3370,6 @@ def p_tf_port_item_list_4(p): if(parse_debug): print('tf_port_item_list_4', list(p)) - # { yyerror(@2, "error: NULL port declarations are not allowed."); # p[0] = p[1]; # } @@ -3570,7 +3381,6 @@ def p_tf_port_item_list_5(p): if(parse_debug): print('tf_port_item_list_5', list(p)) - # { yyerror(@2, "error: ';' is an invalid port declaration separator."); # p[0] = p[1]; # } @@ -3582,7 +3392,6 @@ def p_timeunits_declaration_1(p): if(parse_debug): print('timeunits_declaration_1', list(p)) - # { pform_set_timeunit(p[2], allow_timeunit_decl); } () @@ -3592,7 +3401,6 @@ def p_timeunits_declaration_2(p): if(parse_debug): print('timeunits_declaration_2', list(p)) - # { bool initial_decl = allow_timeunit_decl && allow_timeprec_decl; # pform_set_timeunit(p[2], initial_decl); # pform_set_timeprec(p[4], initial_decl); @@ -3605,7 +3413,6 @@ def p_timeunits_declaration_3(p): if(parse_debug): print('timeunits_declaration_3', list(p)) - # { pform_set_timeprec(p[2], allow_timeprec_decl); } () @@ -3642,7 +3449,6 @@ def p_value_range_1(p): if(parse_debug): print('value_range_1', list(p)) - # { } () @@ -3652,7 +3458,6 @@ def p_value_range_2(p): if(parse_debug): print('value_range_2', list(p)) - # { } () @@ -3686,7 +3491,6 @@ def p_variable_dimension_2(p): if(parse_debug): print('variable_dimension_2', list(p)) - # { // SystemVerilog canonical range # if (!gn_system_verilog()) { # warn_count += 1; @@ -3708,7 +3512,6 @@ def p_variable_dimension_3(p): if(parse_debug): print('variable_dimension_3', list(p)) - # { list *tmp = new list; # pform_range_t index (0,0); # tmp->push_back(index); @@ -3722,7 +3525,6 @@ def p_variable_dimension_4(p): if(parse_debug): print('variable_dimension_4', list(p)) - # { // SystemVerilog queue # list *tmp = new list; # pform_range_t index (new PENull,0); @@ -3740,7 +3542,6 @@ def p_variable_lifetime_1(p): if(parse_debug): print('variable_lifetime_1', list(p)) - # { if (!gn_system_verilog()) { # yyerror(@1, "error: overriding the default variable lifetime " # "requires SystemVerilog."); @@ -3768,7 +3569,6 @@ def p_attribute_list_opt_2(p): if(parse_debug > 2): print('attribute_list_opt_2', list(p)) - # { p[0] = None } () @@ -3778,7 +3578,6 @@ def p_attribute_instance_list_1(p): if(parse_debug): print('attribute_instance_list_1', list(p)) - # { p[0] = None } () @@ -3808,7 +3607,6 @@ def p_attribute_instance_list_4(p): if(parse_debug): print('attribute_instance_list_4', list(p)) - # { list*tmp = p[1]; # if (tmp) { # tmp->splice(tmp->end(), *p[3]); @@ -3824,7 +3622,6 @@ def p_attribute_list_1(p): if(parse_debug): print('attribute_list_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(*p[3]); # delete p[3]; @@ -3838,7 +3635,6 @@ def p_attribute_list_2(p): if(parse_debug): print('attribute_list_2', list(p)) - # { list*tmp = new list; # tmp->push_back(*p[1]); # delete p[1]; @@ -3852,7 +3648,6 @@ def p_attribute_1(p): if(parse_debug): print('attribute_1', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[1]); # tmp->parm = 0; @@ -3867,7 +3662,6 @@ def p_attribute_2(p): if(parse_debug): print('attribute_2', list(p)) - # { PExpr*tmp = p[3]; # named_pexpr_t*tmp2 = new named_pexpr_t; # tmp2->name = lex_strings.make(p[1]); @@ -3883,7 +3677,6 @@ def p_block_item_decl_1(p): if(parse_debug): print('block_item_decl_1', list(p)) - # { if (p[1]) pform_set_data_type(@1, p[1], p[2], NetNet::REG, attributes_in_context); # } () @@ -3894,7 +3687,6 @@ def p_block_item_decl_2(p): if(parse_debug): print('block_item_decl_2', list(p)) - # { if (p[2]) pform_set_data_type(@2, p[2], p[3], NetNet::REG, attributes_in_context); # var_lifetime = LexicalScope::INHERITED; # } @@ -3906,7 +3698,6 @@ def p_block_item_decl_3(p): if(parse_debug): print('block_item_decl_3', list(p)) - # { if (p[2]) pform_set_data_type(@2, p[2], p[3], NetNet::REG, attributes_in_context); # } () @@ -3917,7 +3708,6 @@ def p_block_item_decl_4(p): if(parse_debug): print('block_item_decl_4', list(p)) - # { if (p[3]) pform_set_data_type(@3, p[3], p[4], NetNet::REG, attributes_in_context); # var_lifetime = LexicalScope::INHERITED; # } @@ -3929,7 +3719,6 @@ def p_block_item_decl_5(p): if(parse_debug): print('block_item_decl_5', list(p)) - # { if (p[2]) pform_make_events(p[2], @1.text, @1.first_line); # } () @@ -3967,7 +3756,6 @@ def p_block_item_decl_9(p): if(parse_debug): print('block_item_decl_9', list(p)) - # { yyerror(@1, "error: syntax error in integer variable list."); # yyerrok; # } @@ -3979,7 +3767,6 @@ def p_block_item_decl_10(p): if(parse_debug): print('block_item_decl_10', list(p)) - # { yyerror(@1, "error: syntax error in time variable list."); # yyerrok; # } @@ -3991,7 +3778,6 @@ def p_block_item_decl_11(p): if(parse_debug): print('block_item_decl_11', list(p)) - # { yyerror(@1, "error: syntax error in parameter list."); # yyerrok; # } @@ -4003,7 +3789,6 @@ def p_block_item_decl_12(p): if(parse_debug): print('block_item_decl_12', list(p)) - # { yyerror(@1, "error: syntax error localparam list."); # yyerrok; # } @@ -4053,7 +3838,6 @@ def p_type_declaration_1(p): if(parse_debug): print('type_declaration_1', list(p)) - # { perm_string name = lex_strings.make(p[3]); # pform_set_typedef(name, p[2], p[4]); # delete[]p[3]; @@ -4066,7 +3850,6 @@ def p_type_declaration_2(p): if(parse_debug): print('type_declaration_2', list(p)) - # { perm_string name = lex_strings.make(p[3].text); # if (pform_test_type_identifier_local(name)) { # yyerror(@3, "error: Typedef identifier \"%s\" is already a type name.", p[3].text); @@ -4084,7 +3867,6 @@ def p_type_declaration_3(p): if(parse_debug): print('type_declaration_3', list(p)) - # { // Create a synthetic typedef for the class name so that the # // lexor detects the name as a type. # perm_string name = lex_strings.make(p[3]); @@ -4101,7 +3883,6 @@ def p_type_declaration_4(p): if(parse_debug): print('type_declaration_4', list(p)) - # { yyerror(@1, "sorry: Enum forward declarations not supported yet."); } () @@ -4111,7 +3892,6 @@ def p_type_declaration_5(p): if(parse_debug): print('type_declaration_5', list(p)) - # { yyerror(@1, "sorry: Struct forward declarations not supported yet."); } () @@ -4121,7 +3901,6 @@ def p_type_declaration_6(p): if(parse_debug): print('type_declaration_6', list(p)) - # { yyerror(@1, "sorry: Union forward declarations not supported yet."); } () @@ -4131,7 +3910,6 @@ def p_type_declaration_7(p): if(parse_debug): print('type_declaration_7', list(p)) - # { // Create a synthetic typedef for the class name so that the # // lexor detects the name as a type. # perm_string name = lex_strings.make(p[2]); @@ -4148,7 +3926,6 @@ def p_type_declaration_8(p): if(parse_debug): print('type_declaration_8', list(p)) - # { yyerror(@2, "error: Syntax error in typedef clause."); # yyerrok; # } @@ -4160,7 +3937,6 @@ def p_enum_data_type_1(p): if(parse_debug): print('enum_data_type_1', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[3]); @@ -4178,7 +3954,6 @@ def p_enum_data_type_2(p): if(parse_debug): print('enum_data_type_2', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[5]); @@ -4196,7 +3971,6 @@ def p_enum_data_type_3(p): if(parse_debug): print('enum_data_type_3', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[5]); @@ -4214,7 +3988,6 @@ def p_enum_data_type_4(p): if(parse_debug): print('enum_data_type_4', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[6]); @@ -4232,7 +4005,6 @@ def p_enum_data_type_5(p): if(parse_debug): print('enum_data_type_5', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[6]); @@ -4250,7 +4022,6 @@ def p_enum_data_type_6(p): if(parse_debug): print('enum_data_type_6', list(p)) - # { enum_type_t*enum_type = new enum_type_t; # FILE_NAME(enum_type, @1); # enum_type->names .reset(p[6]); @@ -4268,7 +4039,6 @@ def p_enum_name_list_1(p): if(parse_debug): print('enum_name_list_1', list(p)) - # { p[0] = p[1]; # } () @@ -4279,7 +4049,6 @@ def p_enum_name_list_2(p): if(parse_debug): print('enum_name_list_2', list(p)) - # { list*lst = p[1]; # lst->splice(lst->end(), *p[3]); # delete p[3]; @@ -4293,7 +4062,6 @@ def p_pos_neg_number_1(p): if(parse_debug): print('pos_neg_number_1', list(p)) - # { p[0] = p[1]; # } () @@ -4304,7 +4072,6 @@ def p_pos_neg_number_2(p): if(parse_debug): print('pos_neg_number_2', list(p)) - # { verinum tmp = -(*(p[2])); # *(p[2]) = tmp; # p[0] = p[2]; @@ -4317,7 +4084,6 @@ def p_enum_name_1(p): if(parse_debug): print('enum_name_1', list(p)) - # { perm_string name = lex_strings.make(p[1]); # delete[]p[1]; # p[0] = make_named_number(name); @@ -4330,7 +4096,6 @@ def p_enum_name_2(p): if(parse_debug): print('enum_name_2', list(p)) - # { perm_string name = lex_strings.make(p[1]); # long count = check_enum_seq_value(@1, p[3], false); # delete[]p[1]; @@ -4345,7 +4110,6 @@ def p_enum_name_3(p): if(parse_debug): print('enum_name_3', list(p)) - # { perm_string name = lex_strings.make(p[1]); # p[0] = make_named_numbers(name, check_enum_seq_value(@1, p[3], true), # check_enum_seq_value(@1, p[5], true)); @@ -4361,7 +4125,6 @@ def p_enum_name_4(p): if(parse_debug): print('enum_name_4', list(p)) - # { perm_string name = lex_strings.make(p[1]); # delete[]p[1]; # p[0] = make_named_number(name, p[3]); @@ -4374,7 +4137,6 @@ def p_enum_name_5(p): if(parse_debug): print('enum_name_5', list(p)) - # { perm_string name = lex_strings.make(p[1]); # long count = check_enum_seq_value(@1, p[3], false); # p[0] = make_named_numbers(name, 0, count-1, p[6]); @@ -4389,7 +4151,6 @@ def p_enum_name_6(p): if(parse_debug): print('enum_name_6', list(p)) - # { perm_string name = lex_strings.make(p[1]); # p[0] = make_named_numbers(name, check_enum_seq_value(@1, p[3], true), # check_enum_seq_value(@1, p[5], true), p[8]); @@ -4405,7 +4166,6 @@ def p_struct_data_type_1(p): if(parse_debug): print('struct_data_type_1', list(p)) - # { struct_type_t*tmp = new struct_type_t; # FILE_NAME(tmp, @1); # tmp->packed_flag = p[2]; @@ -4421,7 +4181,6 @@ def p_struct_data_type_2(p): if(parse_debug): print('struct_data_type_2', list(p)) - # { struct_type_t*tmp = new struct_type_t; # FILE_NAME(tmp, @1); # tmp->packed_flag = p[2]; @@ -4437,7 +4196,6 @@ def p_struct_data_type_3(p): if(parse_debug): print('struct_data_type_3', list(p)) - # { yyerror(@3, "error: Errors in struct member list."); # yyerrok; # struct_type_t*tmp = new struct_type_t; @@ -4454,7 +4212,6 @@ def p_struct_data_type_4(p): if(parse_debug): print('struct_data_type_4', list(p)) - # { yyerror(@3, "error: Errors in union member list."); # yyerrok; # struct_type_t*tmp = new struct_type_t; @@ -4471,7 +4228,6 @@ def p_struct_union_member_list_1(p): if(parse_debug): print('struct_union_member_list_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[2]); # p[0] = tmp; @@ -4484,7 +4240,6 @@ def p_struct_union_member_list_2(p): if(parse_debug): print('struct_union_member_list_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # p[0] = tmp; @@ -4497,7 +4252,6 @@ def p_struct_union_member_1(p): if(parse_debug): print('struct_union_member_1', list(p)) - # { struct_member_t*tmp = new struct_member_t; # FILE_NAME(tmp, @2); # tmp->type .reset(p[2]); @@ -4512,7 +4266,6 @@ def p_struct_union_member_2(p): if(parse_debug): print('struct_union_member_2', list(p)) - # { yyerror(@2, "Error in struct/union member."); # yyerrok; # p[0] = None @@ -4525,7 +4278,6 @@ def p_case_item_1(p): if(parse_debug): print('case_item_1', list(p)) - # { PCase::Item*tmp = new PCase::Item; # tmp->expr = *p[1]; # tmp->stat = p[3]; @@ -4540,7 +4292,6 @@ def p_case_item_2(p): if(parse_debug): print('case_item_2', list(p)) - # { PCase::Item*tmp = new PCase::Item; # tmp->stat = p[3]; # p[0] = tmp; @@ -4553,7 +4304,6 @@ def p_case_item_3(p): if(parse_debug): print('case_item_3', list(p)) - # { PCase::Item*tmp = new PCase::Item; # tmp->stat = p[2]; # p[0] = tmp; @@ -4566,7 +4316,6 @@ def p_case_item_4(p): if(parse_debug): print('case_item_4', list(p)) - # { yyerror(@2, "error: Incomprehensible case expression."); # yyerrok; # } @@ -4578,7 +4327,6 @@ def p_case_items_1(p): if(parse_debug): print('case_items_1', list(p)) - # { svector*tmp; # tmp = new svector(*p[1], p[2]); # delete p[1]; @@ -4592,7 +4340,6 @@ def p_case_items_2(p): if(parse_debug): print('case_items_2', list(p)) - # { svector*tmp = new svector(1); # (*tmp)[0] = p[1]; # p[0] = tmp; @@ -4650,7 +4397,6 @@ def p_defparam_assign_1(p): if(parse_debug): print('defparam_assign_1', list(p)) - # { pform_set_defparam(*p[1], p[3]); # delete p[1]; # } @@ -4671,7 +4417,6 @@ def p_defparam_assign_list_2(p): if(parse_debug): print('defparam_assign_list_2', list(p)) - # { yyerror(@1, "error: defparam may not include a range."); # delete p[1]; # } @@ -4692,7 +4437,6 @@ def p_delay1_1(p): if(parse_debug): print('delay1_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[2]); # p[0] = tmp; @@ -4705,7 +4449,6 @@ def p_delay1_2(p): if(parse_debug): print('delay1_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # p[0] = tmp; @@ -4718,7 +4461,6 @@ def p_delay3_1(p): if(parse_debug): print('delay3_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[2]); # p[0] = tmp; @@ -4731,7 +4473,6 @@ def p_delay3_2(p): if(parse_debug): print('delay3_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # p[0] = tmp; @@ -4744,7 +4485,6 @@ def p_delay3_3(p): if(parse_debug): print('delay3_3', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # tmp->push_back(p[5]); @@ -4758,7 +4498,6 @@ def p_delay3_4(p): if(parse_debug): print('delay3_4', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # tmp->push_back(p[5]); @@ -4783,7 +4522,6 @@ def p_delay3_opt_2(p): if(parse_debug > 2): print('delay3_opt_2', list(p)) - # { p[0] = None } () @@ -4793,7 +4531,6 @@ def p_delay_value_list_1(p): if(parse_debug): print('delay_value_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # p[0] = tmp; @@ -4806,7 +4543,6 @@ def p_delay_value_list_2(p): if(parse_debug): print('delay_value_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -4819,7 +4555,6 @@ def p_delay_value_1(p): if(parse_debug): print('delay_value_1', list(p)) - # { PExpr*tmp = p[1]; # p[0] = tmp; # } @@ -4831,7 +4566,6 @@ def p_delay_value_2(p): if(parse_debug): print('delay_value_2', list(p)) - # { p[0] = pform_select_mtm_expr(p[1], p[3], p[5]); } () @@ -4841,7 +4575,6 @@ def p_delay_value_simple_1(p): if(parse_debug): print('delay_value_simple_1', list(p)) - # { verinum*tmp = p[1]; # if (tmp == 0) { # yyerror(@1, "internal error: delay."); @@ -4860,7 +4593,6 @@ def p_delay_value_simple_2(p): if(parse_debug): print('delay_value_simple_2', list(p)) - # { verireal*tmp = p[1]; # if (tmp == 0) { # yyerror(@1, "internal error: delay."); @@ -4878,7 +4610,6 @@ def p_delay_value_simple_3(p): if(parse_debug): print('delay_value_simple_3', list(p)) - # { PEIdent*tmp = new PEIdent(lex_strings.make(p[1])); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -4892,7 +4623,6 @@ def p_delay_value_simple_4(p): if(parse_debug): print('delay_value_simple_4', list(p)) - # { int unit; # # based_size = 0; @@ -4935,7 +4665,6 @@ def p_discipline_declaration_1(p): if(parse_debug): print('discipline_declaration_1', list(p)) - # { pform_end_discipline(@1); delete[] p[2]; } () @@ -4943,7 +4672,6 @@ def p_discipline_declaration_1(p): def p__embed0_discipline_declaration(p): '''_embed0_discipline_declaration : ''' - # { pform_start_discipline(p[2]); } () @@ -4971,7 +4699,6 @@ def p_discipline_item_1(p): if(parse_debug): print('discipline_item_1', list(p)) - # { pform_discipline_domain(@1, IVL_DIS_DISCRETE); } () @@ -4981,7 +4708,6 @@ def p_discipline_item_2(p): if(parse_debug): print('discipline_item_2', list(p)) - # { pform_discipline_domain(@1, IVL_DIS_CONTINUOUS); } () @@ -4991,7 +4717,6 @@ def p_discipline_item_3(p): if(parse_debug): print('discipline_item_3', list(p)) - # { pform_discipline_potential(@1, p[2]); delete[] p[2]; } () @@ -5001,7 +4726,6 @@ def p_discipline_item_4(p): if(parse_debug): print('discipline_item_4', list(p)) - # { pform_discipline_flow(@1, p[2]); delete[] p[2]; } () @@ -5011,7 +4735,6 @@ def p_nature_declaration_1(p): if(parse_debug): print('nature_declaration_1', list(p)) - # { pform_end_nature(@1); delete[] p[2]; } () @@ -5019,7 +4742,6 @@ def p_nature_declaration_1(p): def p__embed0_nature_declaration(p): '''_embed0_nature_declaration : ''' - # { pform_start_nature(p[2]); } () @@ -5047,7 +4769,6 @@ def p_nature_item_1(p): if(parse_debug): print('nature_item_1', list(p)) - # { delete[] p[3]; } () @@ -5066,7 +4787,6 @@ def p_nature_item_3(p): if(parse_debug): print('nature_item_3', list(p)) - # { pform_nature_access(@1, p[3]); delete[] p[3]; } () @@ -5076,7 +4796,6 @@ def p_nature_item_4(p): if(parse_debug): print('nature_item_4', list(p)) - # { delete[] p[3]; } () @@ -5086,7 +4805,6 @@ def p_nature_item_5(p): if(parse_debug): print('nature_item_5', list(p)) - # { delete[] p[3]; } () @@ -5096,7 +4814,6 @@ def p_config_declaration_1(p): if(parse_debug): print('config_declaration_1', list(p)) - # { cerr << @1 << ": sorry: config declarations are not supported and " # "will be skipped." << endl; # delete[] p[2]; @@ -5154,7 +4871,6 @@ def p_config_rule_statement_2(p): if(parse_debug): print('config_rule_statement_2', list(p)) - # { delete p[2]; } () @@ -5164,7 +4880,6 @@ def p_config_rule_statement_3(p): if(parse_debug): print('config_rule_statement_3', list(p)) - # { delete p[2]; } () @@ -5210,7 +4925,6 @@ def p_lib_cell_id_1(p): if(parse_debug): print('lib_cell_id_1', list(p)) - # { delete[] p[1]; } () @@ -5220,7 +4934,6 @@ def p_lib_cell_id_2(p): if(parse_debug): print('lib_cell_id_2', list(p)) - # { delete[] p[1]; delete[] p[3]; } () @@ -5239,7 +4952,6 @@ def p_list_of_libraries_2(p): if(parse_debug): print('list_of_libraries_2', list(p)) - # { delete[] p[2]; } () @@ -5249,7 +4961,6 @@ def p_drive_strength_1(p): if(parse_debug): print('drive_strength_1', list(p)) - # { p[0].str0 = p[2].str0; # p[0].str1 = p[4].str1; # } @@ -5261,7 +4972,6 @@ def p_drive_strength_2(p): if(parse_debug): print('drive_strength_2', list(p)) - # { p[0].str0 = p[4].str0; # p[0].str1 = p[2].str1; # } @@ -5273,7 +4983,6 @@ def p_drive_strength_3(p): if(parse_debug): print('drive_strength_3', list(p)) - # { p[0].str0 = p[2].str0; # p[0].str1 = IVL_DR_HiZ; # } @@ -5285,7 +4994,6 @@ def p_drive_strength_4(p): if(parse_debug): print('drive_strength_4', list(p)) - # { p[0].str0 = IVL_DR_HiZ; # p[0].str1 = p[2].str1; # } @@ -5297,7 +5005,6 @@ def p_drive_strength_5(p): if(parse_debug): print('drive_strength_5', list(p)) - # { p[0].str0 = p[4].str0; # p[0].str1 = IVL_DR_HiZ; # } @@ -5309,7 +5016,6 @@ def p_drive_strength_6(p): if(parse_debug): print('drive_strength_6', list(p)) - # { p[0].str0 = IVL_DR_HiZ; # p[0].str1 = p[4].str1; # } @@ -5331,7 +5037,6 @@ def p_drive_strength_opt_2(p): if(parse_debug > 2): print('drive_strength_opt_2', list(p)) - # { p[0].str0 = IVL_DR_STRONG; p[0].str1 = IVL_DR_STRONG; } () @@ -5341,7 +5046,6 @@ def p_dr_strength0_1(p): if(parse_debug): print('dr_strength0_1', list(p)) - # { p[0].str0 = IVL_DR_SUPPLY; } () @@ -5351,7 +5055,6 @@ def p_dr_strength0_2(p): if(parse_debug): print('dr_strength0_2', list(p)) - # { p[0].str0 = IVL_DR_STRONG; } () @@ -5361,7 +5064,6 @@ def p_dr_strength0_3(p): if(parse_debug): print('dr_strength0_3', list(p)) - # { p[0].str0 = IVL_DR_PULL; } () @@ -5371,7 +5073,6 @@ def p_dr_strength0_4(p): if(parse_debug): print('dr_strength0_4', list(p)) - # { p[0].str0 = IVL_DR_WEAK; } () @@ -5381,7 +5082,6 @@ def p_dr_strength1_1(p): if(parse_debug): print('dr_strength1_1', list(p)) - # { p[0].str1 = IVL_DR_SUPPLY; } () @@ -5391,7 +5091,6 @@ def p_dr_strength1_2(p): if(parse_debug): print('dr_strength1_2', list(p)) - # { p[0].str1 = IVL_DR_STRONG; } () @@ -5401,7 +5100,6 @@ def p_dr_strength1_3(p): if(parse_debug): print('dr_strength1_3', list(p)) - # { p[0].str1 = IVL_DR_PULL; } () @@ -5411,7 +5109,6 @@ def p_dr_strength1_4(p): if(parse_debug): print('dr_strength1_4', list(p)) - # { p[0].str1 = IVL_DR_WEAK; } () @@ -5439,7 +5136,6 @@ def p_event_control_1(p): if(parse_debug): print('event_control_1', list(p)) - # { PEIdent*tmpi = new PEIdent(*p[2]); # PEEvent*tmpe = new PEEvent(PEEvent::ANYEDGE, tmpi); # PEventStatement*tmps = new PEventStatement(tmpe); @@ -5455,7 +5151,6 @@ def p_event_control_2(p): if(parse_debug): print('event_control_2', list(p)) - # { PEventStatement*tmp = new PEventStatement(*p[3]); # FILE_NAME(tmp, @1); # delete p[3]; @@ -5469,7 +5164,6 @@ def p_event_control_3(p): if(parse_debug): print('event_control_3', list(p)) - # { yyerror(@1, "error: Malformed event control expression."); # p[0] = None # } @@ -5491,7 +5185,6 @@ def p_event_expression_list_2(p): if(parse_debug): print('event_expression_list_2', list(p)) - # { svector*tmp = new svector(*p[1], *p[3]); # delete p[1]; # delete p[3]; @@ -5505,7 +5198,6 @@ def p_event_expression_list_3(p): if(parse_debug): print('event_expression_list_3', list(p)) - # { svector*tmp = new svector(*p[1], *p[3]); # delete p[1]; # delete p[3]; @@ -5519,7 +5211,6 @@ def p_event_expression_1(p): if(parse_debug): print('event_expression_1', list(p)) - # { PEEvent*tmp = new PEEvent(PEEvent::POSEDGE, p[2]); # FILE_NAME(tmp, @1); # svector*tl = new svector(1); @@ -5534,7 +5225,6 @@ def p_event_expression_2(p): if(parse_debug): print('event_expression_2', list(p)) - # { PEEvent*tmp = new PEEvent(PEEvent::NEGEDGE, p[2]); # FILE_NAME(tmp, @1); # svector*tl = new svector(1); @@ -5549,7 +5239,6 @@ def p_event_expression_3(p): if(parse_debug): print('event_expression_3', list(p)) - # { PEEvent*tmp = new PEEvent(PEEvent::ANYEDGE, p[1]); # FILE_NAME(tmp, @1); # svector*tl = new svector(1); @@ -5564,7 +5253,6 @@ def p_branch_probe_expression_1(p): if(parse_debug): print('branch_probe_expression_1', list(p)) - # { p[0] = pform_make_branch_probe_expression(@1, p[1], p[3], p[5]); } () @@ -5574,7 +5262,6 @@ def p_branch_probe_expression_2(p): if(parse_debug): print('branch_probe_expression_2', list(p)) - # { p[0] = pform_make_branch_probe_expression(@1, p[1], p[3]); } () @@ -5643,7 +5330,6 @@ def p_expression_5(p): p[0] = PEUnary(Leaf(token.MINUS, '-'), p[3]) - # { PEUnary*tmp = new PEUnary('-', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5658,7 +5344,6 @@ def p_expression_6(p): p[0] = PEUnary(Leaf(token.TILDE, '~'), p[3]) - # { PEUnary*tmp = new PEUnary('~', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5673,7 +5358,6 @@ def p_expression_7(p): p[0] = PEUnary(Leaf(token.AMPER, '&'), p[3]) - # { PEUnary*tmp = new PEUnary('&', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5688,7 +5372,6 @@ def p_expression_8(p): p[0] = PEUnary(Leaf(token.STRING, '!'), p[3]) - # { PEUnary*tmp = new PEUnary('!', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5703,7 +5386,6 @@ def p_expression_9(p): p[0] = PEUnary(Leaf(token.STRING, '|'), p[3]) - # { PEUnary*tmp = new PEUnary('|', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5718,7 +5400,6 @@ def p_expression_10(p): p[0] = PEUnary(Leaf(token.STRING, '^'), p[3]) - # { PEUnary*tmp = new PEUnary('^', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5731,7 +5412,6 @@ def p_expression_11(p): if(parse_debug): print('expression_11', list(p)) - # { yyerror(@1, "error: '~' '&' is not a valid expression. " # "Please use operator '~&' instead."); # p[0] = None @@ -5744,7 +5424,6 @@ def p_expression_12(p): if(parse_debug): print('expression_12', list(p)) - # { yyerror(@1, "error: '~' '|' is not a valid expression. " # "Please use operator '~|' instead."); # p[0] = None @@ -5757,7 +5436,6 @@ def p_expression_13(p): if(parse_debug): print('expression_13', list(p)) - # { yyerror(@1, "error: '~' '^' is not a valid expression. " # "Please use operator '~^' instead."); # p[0] = None @@ -5772,7 +5450,6 @@ def p_expression_14(p): p[0] = PEUnary(Leaf(token.STRING, 'K_NAND'), p[3]) - # { PEUnary*tmp = new PEUnary('A', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5787,7 +5464,6 @@ def p_expression_15(p): p[0] = PEUnary(Leaf(token.STRING, 'K_NOR'), p[3]) - # { PEUnary*tmp = new PEUnary('N', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5802,7 +5478,6 @@ def p_expression_16(p): p[0] = PEUnary(Leaf(token.STRING, 'K_NXOR'), p[3]) - # { PEUnary*tmp = new PEUnary('X', p[3]); # FILE_NAME(tmp, @3); # p[0] = tmp; @@ -5815,7 +5490,6 @@ def p_expression_17(p): if(parse_debug): print('expression_17', list(p)) - # { yyerror(@1, "error: Operand of unary ! " # "is not a primary expression."); # p[0] = None @@ -5828,7 +5502,6 @@ def p_expression_18(p): if(parse_debug): print('expression_18', list(p)) - # { yyerror(@1, "error: Operand of reduction ^ " # "is not a primary expression."); # p[0] = None @@ -5843,7 +5516,6 @@ def p_expression_19(p): p[0] = PEBinary(Leaf(token.STRING, '^'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('^', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5858,7 +5530,6 @@ def p_expression_20(p): p[0] = PEBinary(Leaf(token.STRING, '**'), p[1], p[4]) - # { PEBinary*tmp = new PEBPower('p', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5873,7 +5544,6 @@ def p_expression_21(p): p[0] = PEBinary(Leaf(token.STRING, '*'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('*', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5888,7 +5558,6 @@ def p_expression_22(p): p[0] = PEBinary(Leaf(token.STRING, '/'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('/', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5903,7 +5572,6 @@ def p_expression_23(p): p[0] = PEBinary(Leaf(token.STRING, '%'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('%', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5947,7 +5615,6 @@ def p_expression_26(p): p[0] = PEBinary(Leaf(token.AMPER, '&'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('&', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5962,6 +5629,7 @@ def p_expression_27(p): p[0] = PEBinary(Leaf(token.VBAR, '|'), p[1], p[4]) + # { PEBinary*tmp = new PEBinary('|', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5976,7 +5644,6 @@ def p_expression_28(p): p[0] = PEBinary(Leaf(token.STRING, '~&'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('A', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -5991,7 +5658,6 @@ def p_expression_29(p): p[0] = PEBinary(Leaf(token.STRING, '~|'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('O', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6006,7 +5672,6 @@ def p_expression_30(p): p[0] = PEBinary(Leaf(token.STRING, 'K_XNOR'), p[1], p[4]) - # { PEBinary*tmp = new PEBinary('X', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6021,7 +5686,6 @@ def p_expression_31(p): p[0] = PEBinary(Leaf(token.STRING, '<'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('<', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6036,7 +5700,6 @@ def p_expression_32(p): p[0] = PEBinary(Leaf(token.STRING, '>'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('>', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6051,7 +5714,6 @@ def p_expression_33(p): p[0] = PEBinary(Leaf(token.STRING, 'K_LS'), p[1], p[4]) - # { PEBinary*tmp = new PEBShift('l', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6066,7 +5728,6 @@ def p_expression_34(p): p[0] = PEBinary(Leaf(token.STRING, 'K_RS'), p[1], p[4]) - # { PEBinary*tmp = new PEBShift('r', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6081,7 +5742,6 @@ def p_expression_35(p): p[0] = PEBinary(Leaf(token.STRING, 'K_RSS'), p[1], p[4]) - # { PEBinary*tmp = new PEBShift('R', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6096,7 +5756,6 @@ def p_expression_36(p): p[0] = PEBinary(Leaf(token.STRING, '=='), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('e', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6111,7 +5770,6 @@ def p_expression_37(p): p[0] = PEBinary(Leaf(token.STRING, 'K_CEQ'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('E', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6126,7 +5784,6 @@ def p_expression_38(p): p[0] = PEBinary(Leaf(token.STRING, 'K_WEQ'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('w', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6141,7 +5798,6 @@ def p_expression_39(p): p[0] = PEBinary(Leaf(token.STRING, '<='), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('L', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6156,7 +5812,6 @@ def p_expression_40(p): p[0] = PEBinary(Leaf(token.STRING, '>='), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('G', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6171,7 +5826,6 @@ def p_expression_41(p): p[0] = PEBinary(Leaf(token.STRING, '!='), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('n', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6186,7 +5840,6 @@ def p_expression_42(p): p[0] = PEBinary(Leaf(token.STRING, 'K_CNE'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('N', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6201,7 +5854,6 @@ def p_expression_43(p): p[0] = PEBinary(Leaf(token.STRING, 'K_WNE'), p[1], p[4]) - # { PEBinary*tmp = new PEBComp('W', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6216,7 +5868,6 @@ def p_expression_44(p): p[0] = PEBinary(Leaf(token.STRING, '||'), p[1], p[4]) - # { PEBinary*tmp = new PEBLogic('o', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6231,7 +5882,6 @@ def p_expression_45(p): p[0] = PEBinary(Leaf(token.STRING, '&&'), p[1], p[4]) - # { PEBinary*tmp = new PEBLogic('a', p[1], p[4]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6247,7 +5897,6 @@ def p_expression_46(p): p[0] = Node(syms.atom, [p[1], Leaf(token.STRING, ' ? '), p[4], Leaf(token.STRING, ' : '), p[6]]) - # { PETernary*tmp = new PETernary(p[1], p[4], p[6]); # FILE_NAME(tmp, @2); # p[0] = tmp; @@ -6270,7 +5919,6 @@ def p_expr_mintypmax_2(p): if(parse_debug): print('expr_mintypmax_2', list(p)) - # { switch (min_typ_max_flag) { # case MIN: # p[0] = p[1]; @@ -6313,7 +5961,6 @@ def p_expression_list_with_nuls_1(p): if(parse_debug): print('expression_list_with_nuls_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -6326,7 +5973,6 @@ def p_expression_list_with_nuls_2(p): if(parse_debug): print('expression_list_with_nuls_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # p[0] = tmp; @@ -6339,7 +5985,6 @@ def p_expression_list_with_nuls_3(p): if(parse_debug): print('expression_list_with_nuls_3', list(p)) - # { list*tmp = new list; # tmp->push_back(0); # p[0] = tmp; @@ -6352,7 +5997,6 @@ def p_expression_list_with_nuls_4(p): if(parse_debug): print('expression_list_with_nuls_4', list(p)) - # { list*tmp = p[1]; # tmp->push_back(0); # p[0] = tmp; @@ -6365,7 +6009,6 @@ def p_expression_list_proper_1(p): if(parse_debug): print('expression_list_proper_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -6378,7 +6021,6 @@ def p_expression_list_proper_2(p): if(parse_debug): print('expression_list_proper_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # p[0] = tmp; @@ -6402,7 +6044,6 @@ def p_expr_primary_or_typename_2(p): print('expr_primary_or_typename_2', list(p)) p[0] = p[1] - # { PETypename*tmp = new PETypename(p[1].type); # FILE_NAME(tmp,@1); # p[0] = tmp; @@ -6417,7 +6058,6 @@ def p_expr_primary_1(p): print('expr_primary_1', list(p)) p[0] = p[1] - # { assert(p[1]); # PENumber*tmp = new PENumber(p[1]); # FILE_NAME(tmp, @1); @@ -6431,7 +6071,6 @@ def p_expr_primary_2(p): if(parse_debug): print('expr_primary_2', list(p)) - # { PEFNumber*tmp = new PEFNumber(p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -6444,7 +6083,6 @@ def p_expr_primary_3(p): if(parse_debug): print('expr_primary_3', list(p)) - # { PEString*tmp = new PEString(p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -6457,7 +6095,6 @@ def p_expr_primary_4(p): if(parse_debug): print('expr_primary_4', list(p)) - # { int unit; # # based_size = 0; @@ -6481,7 +6118,6 @@ def p_expr_primary_5(p): if(parse_debug): print('expr_primary_5', list(p)) - # { perm_string tn = lex_strings.make(p[1]); # PECallFunction*tmp = new PECallFunction(tn); # FILE_NAME(tmp, @1); @@ -6497,7 +6133,6 @@ def p_expr_primary_6(p): print('expr_primary_6', list(p)) p[0] = p[1] - # { PEIdent*tmp = pform_new_ident(*p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -6511,7 +6146,6 @@ def p_expr_primary_7(p): if(parse_debug): print('expr_primary_7', list(p)) - # { p[0] = pform_package_ident(@2, p[1], p[3]); # delete p[3]; # } @@ -6523,7 +6157,6 @@ def p_expr_primary_8(p): if(parse_debug): print('expr_primary_8', list(p)) - # { list*expr_list = p[3]; # strip_tail_items(expr_list); # PECallFunction*tmp = pform_make_call_function(@1, *p[1], *expr_list); @@ -6538,7 +6171,6 @@ def p_expr_primary_9(p): if(parse_debug): print('expr_primary_9', list(p)) - # { pform_name_t*t_name = p[1]; # while (! p[3]->empty()) { # t_name->push_back(p[3]->front()); @@ -6559,7 +6191,6 @@ def p_expr_primary_10(p): if(parse_debug): print('expr_primary_10', list(p)) - # { perm_string tn = lex_strings.make(p[1]); # PECallFunction*tmp = new PECallFunction(tn, *p[3]); # FILE_NAME(tmp, @1); @@ -6574,7 +6205,6 @@ def p_expr_primary_11(p): if(parse_debug): print('expr_primary_11', list(p)) - # { perm_string use_name = lex_strings.make(p[3]); # PECallFunction*tmp = new PECallFunction(p[1], use_name, *p[5]); # FILE_NAME(tmp, @3); @@ -6589,7 +6219,6 @@ def p_expr_primary_12(p): if(parse_debug): print('expr_primary_12', list(p)) - # { perm_string tn = lex_strings.make(p[1]); # const vectorempty; # PECallFunction*tmp = new PECallFunction(tn, empty); @@ -6608,7 +6237,6 @@ def p_expr_primary_13(p): if(parse_debug): print('expr_primary_13', list(p)) - # { PEIdent*tmp = new PEIdent(*p[1]); # FILE_NAME(tmp,@1); # delete p[1]; @@ -6622,7 +6250,6 @@ def p_expr_primary_14(p): if(parse_debug): print('expr_primary_14', list(p)) - # { pform_name_t*t_name = p[1]; # while (! p[3]->empty()) { # t_name->push_back(p[3]->front()); @@ -6642,7 +6269,6 @@ def p_expr_primary_15(p): if(parse_debug): print('expr_primary_15', list(p)) - # { perm_string tn = perm_string::literal("$acos"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6656,7 +6282,6 @@ def p_expr_primary_16(p): if(parse_debug): print('expr_primary_16', list(p)) - # { perm_string tn = perm_string::literal("$acosh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6670,7 +6295,6 @@ def p_expr_primary_17(p): if(parse_debug): print('expr_primary_17', list(p)) - # { perm_string tn = perm_string::literal("$asin"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6684,7 +6308,6 @@ def p_expr_primary_18(p): if(parse_debug): print('expr_primary_18', list(p)) - # { perm_string tn = perm_string::literal("$asinh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6698,7 +6321,6 @@ def p_expr_primary_19(p): if(parse_debug): print('expr_primary_19', list(p)) - # { perm_string tn = perm_string::literal("$atan"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6712,7 +6334,6 @@ def p_expr_primary_20(p): if(parse_debug): print('expr_primary_20', list(p)) - # { perm_string tn = perm_string::literal("$atanh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6726,7 +6347,6 @@ def p_expr_primary_21(p): if(parse_debug): print('expr_primary_21', list(p)) - # { perm_string tn = perm_string::literal("$atan2"); # PECallFunction*tmp = make_call_function(tn, p[3], p[5]); # FILE_NAME(tmp,@1); @@ -6740,7 +6360,6 @@ def p_expr_primary_22(p): if(parse_debug): print('expr_primary_22', list(p)) - # { perm_string tn = perm_string::literal("$ceil"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6754,7 +6373,6 @@ def p_expr_primary_23(p): if(parse_debug): print('expr_primary_23', list(p)) - # { perm_string tn = perm_string::literal("$cos"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6768,7 +6386,6 @@ def p_expr_primary_24(p): if(parse_debug): print('expr_primary_24', list(p)) - # { perm_string tn = perm_string::literal("$cosh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6782,7 +6399,6 @@ def p_expr_primary_25(p): if(parse_debug): print('expr_primary_25', list(p)) - # { perm_string tn = perm_string::literal("$exp"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6796,7 +6412,6 @@ def p_expr_primary_26(p): if(parse_debug): print('expr_primary_26', list(p)) - # { perm_string tn = perm_string::literal("$floor"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6810,7 +6425,6 @@ def p_expr_primary_27(p): if(parse_debug): print('expr_primary_27', list(p)) - # { perm_string tn = perm_string::literal("$hypot"); # PECallFunction*tmp = make_call_function(tn, p[3], p[5]); # FILE_NAME(tmp,@1); @@ -6824,7 +6438,6 @@ def p_expr_primary_28(p): if(parse_debug): print('expr_primary_28', list(p)) - # { perm_string tn = perm_string::literal("$ln"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6838,7 +6451,6 @@ def p_expr_primary_29(p): if(parse_debug): print('expr_primary_29', list(p)) - # { perm_string tn = perm_string::literal("$log10"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6852,7 +6464,6 @@ def p_expr_primary_30(p): if(parse_debug): print('expr_primary_30', list(p)) - # { perm_string tn = perm_string::literal("$pow"); # PECallFunction*tmp = make_call_function(tn, p[3], p[5]); # FILE_NAME(tmp,@1); @@ -6866,7 +6477,6 @@ def p_expr_primary_31(p): if(parse_debug): print('expr_primary_31', list(p)) - # { perm_string tn = perm_string::literal("$sin"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6880,7 +6490,6 @@ def p_expr_primary_32(p): if(parse_debug): print('expr_primary_32', list(p)) - # { perm_string tn = perm_string::literal("$sinh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6894,7 +6503,6 @@ def p_expr_primary_33(p): if(parse_debug): print('expr_primary_33', list(p)) - # { perm_string tn = perm_string::literal("$sqrt"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6908,7 +6516,6 @@ def p_expr_primary_34(p): if(parse_debug): print('expr_primary_34', list(p)) - # { perm_string tn = perm_string::literal("$tan"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6922,7 +6529,6 @@ def p_expr_primary_35(p): if(parse_debug): print('expr_primary_35', list(p)) - # { perm_string tn = perm_string::literal("$tanh"); # PECallFunction*tmp = make_call_function(tn, p[3]); # FILE_NAME(tmp,@1); @@ -6936,7 +6542,6 @@ def p_expr_primary_36(p): if(parse_debug): print('expr_primary_36', list(p)) - # { PEUnary*tmp = new PEUnary('m', p[3]); # FILE_NAME(tmp,@1); # p[0] = tmp; @@ -6949,7 +6554,6 @@ def p_expr_primary_37(p): if(parse_debug): print('expr_primary_37', list(p)) - # { PEBinary*tmp = new PEBinary('M', p[3], p[5]); # FILE_NAME(tmp,@1); # p[0] = tmp; @@ -6962,7 +6566,6 @@ def p_expr_primary_38(p): if(parse_debug): print('expr_primary_38', list(p)) - # { PEBinary*tmp = new PEBinary('m', p[3], p[5]); # FILE_NAME(tmp,@1); # p[0] = tmp; @@ -6985,7 +6588,6 @@ def p_expr_primary_40(p): if(parse_debug): print('expr_primary_40', list(p)) - # { PEConcat*tmp = new PEConcat(*p[2]); # FILE_NAME(tmp, @1); # delete p[2]; @@ -6999,7 +6601,6 @@ def p_expr_primary_41(p): if(parse_debug): print('expr_primary_41', list(p)) - # { PExpr*rep = p[2]; # PEConcat*tmp = new PEConcat(*p[4], rep); # FILE_NAME(tmp, @1); @@ -7014,7 +6615,6 @@ def p_expr_primary_42(p): if(parse_debug): print('expr_primary_42', list(p)) - # { PExpr*rep = p[2]; # PEConcat*tmp = new PEConcat(*p[4], rep); # FILE_NAME(tmp, @1); @@ -7032,7 +6632,6 @@ def p_expr_primary_43(p): if(parse_debug): print('expr_primary_43', list(p)) - # { // This is the empty queue syntax. # if (gn_system_verilog()) { # list empty_list; @@ -7052,7 +6651,6 @@ def p_expr_primary_44(p): if(parse_debug): print('expr_primary_44', list(p)) - # { PExpr*base = p[4]; # if (gn_system_verilog()) { # PECastSize*tmp = new PECastSize(p[1], base); @@ -7071,7 +6669,6 @@ def p_expr_primary_45(p): if(parse_debug): print('expr_primary_45', list(p)) - # { PExpr*base = p[4]; # if (gn_system_verilog()) { # PECastType*tmp = new PECastType(p[1], base); @@ -7110,7 +6707,6 @@ def p_expr_primary_48(p): if(parse_debug): print('expr_primary_48', list(p)) - # { PENull*tmp = new PENull; # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -7133,7 +6729,6 @@ def p_function_item_list_opt_2(p): if(parse_debug): print('function_item_list_opt_2', list(p)) - # { p[0] = None } () @@ -7153,7 +6748,6 @@ def p_function_item_list_2(p): if(parse_debug): print('function_item_list_2', list(p)) - # { /* */ # if (p[1] && p[2]) { # vector*tmp = p[1]; @@ -7187,7 +6781,6 @@ def p_function_item_2(p): if(parse_debug): print('function_item_2', list(p)) - # { p[0] = None } () @@ -7197,7 +6790,6 @@ def p_gate_instance_1(p): if(parse_debug): print('gate_instance_1', list(p)) - # { lgate*tmp = new lgate; # tmp->name = p[1]; # tmp->parms = p[3]; @@ -7214,7 +6806,6 @@ def p_gate_instance_2(p): if(parse_debug): print('gate_instance_2', list(p)) - # { lgate*tmp = new lgate; # list*rng = p[2]; # tmp->name = p[1]; @@ -7236,7 +6827,6 @@ def p_gate_instance_3(p): if(parse_debug): print('gate_instance_3', list(p)) - # { lgate*tmp = new lgate; # tmp->name = ""; # tmp->parms = p[2]; @@ -7252,7 +6842,6 @@ def p_gate_instance_4(p): if(parse_debug): print('gate_instance_4', list(p)) - # { lgate*tmp = new lgate; # list*rng = p[2]; # tmp->name = p[1]; @@ -7275,7 +6864,6 @@ def p_gate_instance_5(p): if(parse_debug): print('gate_instance_5', list(p)) - # { lgate*tmp = new lgate; # tmp->name = p[1]; # tmp->parms = 0; @@ -7293,7 +6881,6 @@ def p_gate_instance_6(p): if(parse_debug): print('gate_instance_6', list(p)) - # { lgate*tmp = new lgate; # list*rng = p[2]; # tmp->name = p[1]; @@ -7316,7 +6903,6 @@ def p_gate_instance_7(p): if(parse_debug): print('gate_instance_7', list(p)) - # { lgate*tmp = new lgate; # tmp->name = p[1]; # tmp->parms = 0; @@ -7336,7 +6922,6 @@ def p_gate_instance_8(p): if(parse_debug): print('gate_instance_8', list(p)) - # { lgate*tmp = new lgate; # tmp->name = p[1]; # tmp->parms = 0; @@ -7356,7 +6941,6 @@ def p_gate_instance_list_1(p): if(parse_debug): print('gate_instance_list_1', list(p)) - # { svector*tmp1 = p[1]; # lgate*tmp2 = p[3]; # svector*out = new svector (*tmp1, *tmp2); @@ -7372,7 +6956,6 @@ def p_gate_instance_list_2(p): if(parse_debug): print('gate_instance_list_2', list(p)) - # { svector*tmp = new svector(1); # (*tmp)[0] = *p[1]; # delete p[1]; @@ -7386,7 +6969,6 @@ def p_gatetype_1(p): if(parse_debug): print('gatetype_1', list(p)) - # { p[0] = PGBuiltin::AND; } () @@ -7396,7 +6978,6 @@ def p_gatetype_2(p): if(parse_debug): print('gatetype_2', list(p)) - # { p[0] = PGBuiltin::NAND; } () @@ -7406,7 +6987,6 @@ def p_gatetype_3(p): if(parse_debug): print('gatetype_3', list(p)) - # { p[0] = PGBuiltin::OR; } () @@ -7416,7 +6996,6 @@ def p_gatetype_4(p): if(parse_debug): print('gatetype_4', list(p)) - # { p[0] = PGBuiltin::NOR; } () @@ -7426,7 +7005,6 @@ def p_gatetype_5(p): if(parse_debug): print('gatetype_5', list(p)) - # { p[0] = PGBuiltin::XOR; } () @@ -7436,7 +7014,6 @@ def p_gatetype_6(p): if(parse_debug): print('gatetype_6', list(p)) - # { p[0] = PGBuiltin::XNOR; } () @@ -7446,7 +7023,6 @@ def p_gatetype_7(p): if(parse_debug): print('gatetype_7', list(p)) - # { p[0] = PGBuiltin::BUF; } () @@ -7456,7 +7032,6 @@ def p_gatetype_8(p): if(parse_debug): print('gatetype_8', list(p)) - # { p[0] = PGBuiltin::BUFIF0; } () @@ -7466,7 +7041,6 @@ def p_gatetype_9(p): if(parse_debug): print('gatetype_9', list(p)) - # { p[0] = PGBuiltin::BUFIF1; } () @@ -7476,7 +7050,6 @@ def p_gatetype_10(p): if(parse_debug): print('gatetype_10', list(p)) - # { p[0] = PGBuiltin::NOT; } () @@ -7486,7 +7059,6 @@ def p_gatetype_11(p): if(parse_debug): print('gatetype_11', list(p)) - # { p[0] = PGBuiltin::NOTIF0; } () @@ -7496,7 +7068,6 @@ def p_gatetype_12(p): if(parse_debug): print('gatetype_12', list(p)) - # { p[0] = PGBuiltin::NOTIF1; } () @@ -7506,7 +7077,6 @@ def p_switchtype_1(p): if(parse_debug): print('switchtype_1', list(p)) - # { p[0] = PGBuiltin::NMOS; } () @@ -7516,7 +7086,6 @@ def p_switchtype_2(p): if(parse_debug): print('switchtype_2', list(p)) - # { p[0] = PGBuiltin::RNMOS; } () @@ -7526,7 +7095,6 @@ def p_switchtype_3(p): if(parse_debug): print('switchtype_3', list(p)) - # { p[0] = PGBuiltin::PMOS; } () @@ -7536,7 +7104,6 @@ def p_switchtype_4(p): if(parse_debug): print('switchtype_4', list(p)) - # { p[0] = PGBuiltin::RPMOS; } () @@ -7546,7 +7113,6 @@ def p_switchtype_5(p): if(parse_debug): print('switchtype_5', list(p)) - # { p[0] = PGBuiltin::CMOS; } () @@ -7556,7 +7122,6 @@ def p_switchtype_6(p): if(parse_debug): print('switchtype_6', list(p)) - # { p[0] = PGBuiltin::RCMOS; } () @@ -7566,7 +7131,6 @@ def p_switchtype_7(p): if(parse_debug): print('switchtype_7', list(p)) - # { p[0] = PGBuiltin::TRAN; } () @@ -7576,7 +7140,6 @@ def p_switchtype_8(p): if(parse_debug): print('switchtype_8', list(p)) - # { p[0] = PGBuiltin::RTRAN; } () @@ -7586,7 +7149,6 @@ def p_switchtype_9(p): if(parse_debug): print('switchtype_9', list(p)) - # { p[0] = PGBuiltin::TRANIF0; } () @@ -7596,7 +7158,6 @@ def p_switchtype_10(p): if(parse_debug): print('switchtype_10', list(p)) - # { p[0] = PGBuiltin::TRANIF1; } () @@ -7606,7 +7167,6 @@ def p_switchtype_11(p): if(parse_debug): print('switchtype_11', list(p)) - # { p[0] = PGBuiltin::RTRANIF0; } () @@ -7616,7 +7176,6 @@ def p_switchtype_12(p): if(parse_debug): print('switchtype_12', list(p)) - # { p[0] = PGBuiltin::RTRANIF1; } () @@ -7628,7 +7187,6 @@ def p_hierarchy_identifier_1(p): lpvalue = Leaf(token.NAME, p[1]) p[0] = lpvalue - # { p[0] = new pform_name_t; # p[0]->push_back(name_component_t(lex_strings.make(p[1]))); # delete[]p[1]; @@ -7641,7 +7199,6 @@ def p_hierarchy_identifier_2(p): if(parse_debug): print('hierarchy_identifier_2', list(p)) - # { pform_name_t * tmp = p[1]; # tmp->push_back(name_component_t(lex_strings.make(p[3]))); # delete[]p[3]; @@ -7655,7 +7212,6 @@ def p_hierarchy_identifier_3(p): if(parse_debug): print('hierarchy_identifier_3', list(p)) - # { pform_name_t * tmp = p[1]; # name_component_t&tail = tmp->back(); # index_component_t itmp; @@ -7672,7 +7228,6 @@ def p_hierarchy_identifier_4(p): if(parse_debug): print('hierarchy_identifier_4', list(p)) - # { pform_name_t * tmp = p[1]; # name_component_t&tail = tmp->back(); # if (! gn_system_verilog()) { @@ -7694,7 +7249,6 @@ def p_hierarchy_identifier_5(p): if(parse_debug): print('hierarchy_identifier_5', list(p)) - # { pform_name_t * tmp = p[1]; # name_component_t&tail = tmp->back(); # index_component_t itmp; @@ -7712,7 +7266,6 @@ def p_hierarchy_identifier_6(p): if(parse_debug): print('hierarchy_identifier_6', list(p)) - # { pform_name_t * tmp = p[1]; # name_component_t&tail = tmp->back(); # index_component_t itmp; @@ -7730,7 +7283,6 @@ def p_hierarchy_identifier_7(p): if(parse_debug): print('hierarchy_identifier_7', list(p)) - # { pform_name_t * tmp = p[1]; # name_component_t&tail = tmp->back(); # index_component_t itmp; @@ -7748,7 +7300,6 @@ def p_list_of_identifiers_1(p): if(parse_debug): print('list_of_identifiers_1', list(p)) - # { p[0] = list_from_identifier(p[1]); } () @@ -7758,7 +7309,6 @@ def p_list_of_identifiers_2(p): if(parse_debug): print('list_of_identifiers_2', list(p)) - # { p[0] = list_from_identifier(p[1], p[3]); } () @@ -7768,7 +7318,6 @@ def p_list_of_port_identifiers_1(p): if(parse_debug): print('list_of_port_identifiers_1', list(p)) - # { p[0] = make_port_list(p[1], p[2], 0); } () @@ -7778,7 +7327,6 @@ def p_list_of_port_identifiers_2(p): if(parse_debug): print('list_of_port_identifiers_2', list(p)) - # { p[0] = make_port_list(p[1], p[3], p[4], 0); } () @@ -7788,7 +7336,6 @@ def p_list_of_variable_port_identifiers_1(p): if(parse_debug): print('list_of_variable_port_identifiers_1', list(p)) - # { p[0] = make_port_list(p[1], p[2], 0); } () @@ -7798,7 +7345,6 @@ def p_list_of_variable_port_identifiers_2(p): if(parse_debug): print('list_of_variable_port_identifiers_2', list(p)) - # { p[0] = make_port_list(p[1], p[2], p[4]); } () @@ -7808,7 +7354,6 @@ def p_list_of_variable_port_identifiers_3(p): if(parse_debug): print('list_of_variable_port_identifiers_3', list(p)) - # { p[0] = make_port_list(p[1], p[3], p[4], 0); } () @@ -7818,7 +7363,6 @@ def p_list_of_variable_port_identifiers_4(p): if(parse_debug): print('list_of_variable_port_identifiers_4', list(p)) - # { p[0] = make_port_list(p[1], p[3], p[4], p[6]); } () @@ -7828,7 +7372,6 @@ def p_list_of_ports_1(p): if(parse_debug): print('list_of_ports_1', list(p)) - # { vector*tmp # = new vector(1); # (*tmp)[0] = p[1]; @@ -7842,7 +7385,6 @@ def p_list_of_ports_2(p): if(parse_debug): print('list_of_ports_2', list(p)) - # { vector*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -7856,7 +7398,6 @@ def p_list_of_port_declarations_1(p): print('list_of_port_declarations_1', list(p)) p[0] = [p[1]] - # { vector*tmp # = new vector(1); # (*tmp)[0] = p[1]; @@ -7874,7 +7415,6 @@ def p_list_of_port_declarations_2(p): p[1].append(p[3]) p[0] = p[1] - # { vector*tmp = p[1]; # tmp->push_back(p[3]); # p[0] = tmp; @@ -7887,7 +7427,6 @@ def p_list_of_port_declarations_3(p): if(parse_debug): print('list_of_port_declarations_3', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[3]); # ptmp = pform_module_port_reference(name, @3.text, @@ -7913,7 +7452,6 @@ def p_list_of_port_declarations_4(p): if(parse_debug): print('list_of_port_declarations_4', list(p)) - # { # yyerror(@2, "error: NULL port declarations are not " # "allowed."); @@ -7926,7 +7464,6 @@ def p_list_of_port_declarations_5(p): if(parse_debug): print('list_of_port_declarations_5', list(p)) - # { # yyerror(@2, "error: ';' is an invalid port declaration " # "separator."); @@ -7941,7 +7478,6 @@ def p_port_declaration_1(p): comment, dt, name = p[2], p[4], p[5] p[0] = absyn.port_decl(comment, dt, name) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[5]); # data_type_t*use_type = p[4]; @@ -7962,7 +7498,6 @@ def p_port_declaration_2(p): if(parse_debug): print('port_declaration_2', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[4]); # ptmp = pform_module_port_reference(name, @2.text, @@ -7985,7 +7520,6 @@ def p_port_declaration_3(p): if(parse_debug): print('port_declaration_3', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[5]); # ptmp = pform_module_port_reference(name, @2.text, @2.first_line); @@ -8008,7 +7542,6 @@ def p_port_declaration_4(p): if(parse_debug): print('port_declaration_4', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[4]); # ptmp = pform_module_port_reference(name, @2.text, @@ -8033,7 +7566,6 @@ def p_port_declaration_5(p): comment, dt, name = p[2], p[4], p[5] p[0] = absyn.port_decl(comment, dt, name) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[5]); # data_type_t*use_dtype = p[4]; @@ -8077,7 +7609,6 @@ def p_port_declaration_6(p): if(parse_debug): print('port_declaration_6', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[4]); # ptmp = pform_module_port_reference(name, @2.text, @@ -8100,7 +7631,6 @@ def p_port_declaration_7(p): if(parse_debug): print('port_declaration_7', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[5]); # NetNet::Type use_type = p[3]; @@ -8213,7 +7743,6 @@ def p_atom2_type_1(p): if(parse_debug): print('atom2_type_1', list(p)) - # { p[0] = 8; } () @@ -8223,7 +7752,6 @@ def p_atom2_type_2(p): if(parse_debug): print('atom2_type_2', list(p)) - # { p[0] = 16; } () @@ -8233,7 +7761,6 @@ def p_atom2_type_3(p): if(parse_debug): print('atom2_type_3', list(p)) - # { p[0] = 32; } () @@ -8243,7 +7770,6 @@ def p_atom2_type_4(p): if(parse_debug): print('atom2_type_4', list(p)) - # { p[0] = 64; } () @@ -8254,7 +7780,6 @@ def p_lpvalue_1(p): print('lpvalue_1', list(p)) p[0] = p[1] - # { PEIdent*tmp = pform_new_ident(*p[1]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -8268,7 +7793,6 @@ def p_lpvalue_2(p): if(parse_debug): print('lpvalue_2', list(p)) - # { pform_name_t*t_name = p[1]; # while (!p[3]->empty()) { # t_name->push_back(p[3]->front()); @@ -8288,7 +7812,6 @@ def p_lpvalue_3(p): if(parse_debug): print('lpvalue_3', list(p)) - # { PEConcat*tmp = new PEConcat(*p[2]); # FILE_NAME(tmp, @1); # delete p[2]; @@ -8302,7 +7825,6 @@ def p_lpvalue_4(p): if(parse_debug): print('lpvalue_4', list(p)) - # { yyerror(@1, "sorry: streaming concatenation not supported in l-values."); # p[0] = None # } @@ -8315,7 +7837,6 @@ def p_cont_assign_1(p): print('cont_assign_1', list(p)) absyn.cont_assign_1(p) - # { list*tmp = new list; # tmp->push_back(p[1]); # tmp->push_back(p[3]); @@ -8329,7 +7850,6 @@ def p_cont_assign_list_1(p): if(parse_debug): print('cont_assign_list_1', list(p)) - # { list*tmp = p[1]; # tmp->splice(tmp->end(), *p[3]); # delete p[3]; @@ -8362,7 +7882,6 @@ def p_module_1(p): def p__embed0_module(p): '''_embed0_module : ''' - # { pform_startmodule(@2, p[4], p[2]==K_program, p[2]==K_interface, p[3], p[1]); } () @@ -8370,7 +7889,6 @@ def p__embed0_module(p): def p__embed1_module(p): '''_embed1_module : ''' - # { pform_module_set_ports(p[8]); } () @@ -8378,7 +7896,6 @@ def p__embed1_module(p): def p__embed2_module(p): '''_embed2_module : ''' - # { pform_set_scope_timescale(@2); } () @@ -8386,7 +7903,6 @@ def p__embed2_module(p): def p__embed3_module(p): '''_embed3_module : ''' - # { Module::UCDriveType ucd; # // The lexor detected `unconnected_drive directives and # // marked what it found in the uc_drive variable. Use that @@ -8430,7 +7946,6 @@ def p_module_start_1(p): if(parse_debug > 1): print('module_start_1', list(p)) - # { p[0] = K_module; } () @@ -8440,7 +7955,6 @@ def p_module_start_2(p): if(parse_debug): print('module_start_2', list(p)) - # { p[0] = K_module; } () @@ -8450,7 +7964,6 @@ def p_module_start_3(p): if(parse_debug): print('module_start_3', list(p)) - # { p[0] = K_program; } () @@ -8460,7 +7973,6 @@ def p_module_start_4(p): if(parse_debug): print('module_start_4', list(p)) - # { p[0] = K_interface; } () @@ -8470,7 +7982,6 @@ def p_module_end_1(p): if(parse_debug > 2): print('module_end_1', list(p)) - # { p[0] = K_module; } () @@ -8480,7 +7991,6 @@ def p_module_end_2(p): if(parse_debug): print('module_end_2', list(p)) - # { p[0] = K_program; } () @@ -8490,7 +8000,6 @@ def p_module_end_3(p): if(parse_debug): print('module_end_3', list(p)) - # { p[0] = K_interface; } () @@ -8510,7 +8019,6 @@ def p_endlabel_opt_2(p): if(parse_debug > 2): print('endlabel_opt_2', list(p)) - # { p[0] = None } () @@ -8520,7 +8028,6 @@ def p_module_attribute_foreign_1(p): if(parse_debug): print('module_attribute_foreign_1', list(p)) - # { p[0] = None } () @@ -8530,7 +8037,6 @@ def p_module_attribute_foreign_2(p): if(parse_debug > 2): print('module_attribute_foreign_2', list(p)) - # { p[0] = None } () @@ -8560,7 +8066,6 @@ def p_module_port_list_opt_3(p): if(parse_debug): print('module_port_list_opt_3', list(p)) - # { p[0] = None } () @@ -8570,7 +8075,6 @@ def p_module_port_list_opt_4(p): if(parse_debug): print('module_port_list_opt_4', list(p)) - # { yyerror(@2, "Errors in port declarations."); # yyerrok; # p[0] = None @@ -8648,7 +8152,6 @@ def p_module_item_2(p): p[0] = absyn.module_item_2(p[2], p[3], p[5]) #p[0] = ["module_item_2"]+list(p) - # { data_type_t*data_type = p[3]; # if (data_type == 0) { # data_type = new vector_type_t(IVL_VT_LOGIC, false, 0); @@ -8669,7 +8172,6 @@ def p_module_item_3(p): if(parse_debug): print('module_item_3', list(p)) - # { real_type_t*tmpt = new real_type_t(real_type_t::REAL); # pform_set_data_type(@2, tmpt, p[4], NetNet::WIRE, p[1]); # if (p[3] != 0) { @@ -8686,7 +8188,6 @@ def p_module_item_4(p): if(parse_debug): print('module_item_4', list(p)) - # { real_type_t*tmpt = new real_type_t(real_type_t::REAL); # pform_set_data_type(@2, tmpt, p[3], NetNet::WIRE, p[1]); # delete p[1]; @@ -8699,7 +8200,6 @@ def p_module_item_5(p): if(parse_debug): print('module_item_5', list(p)) - # { data_type_t*data_type = p[3]; # if (data_type == 0) { # data_type = new vector_type_t(IVL_VT_LOGIC, false, 0); @@ -8720,7 +8220,6 @@ def p_module_item_6(p): if(parse_debug): print('module_item_6', list(p)) - # { data_type_t*data_type = p[3]; # if (data_type == 0) { # data_type = new vector_type_t(IVL_VT_LOGIC, false, 0); @@ -8741,7 +8240,6 @@ def p_module_item_7(p): if(parse_debug): print('module_item_7', list(p)) - # { real_type_t*data_type = new real_type_t(real_type_t::REAL); # pform_makewire(@2, 0, str_strength, p[3], NetNet::WIRE, data_type); # if (p[1]) { @@ -8758,7 +8256,6 @@ def p_module_item_8(p): if(parse_debug): print('module_item_8', list(p)) - # { yyerror(@1, "sorry: trireg nets not supported."); # delete p[3]; # delete p[4]; @@ -8771,7 +8268,6 @@ def p_module_item_9(p): if(parse_debug): print('module_item_9', list(p)) - # { pform_module_define_port(@2, p[5], p[2], p[3], p[4], p[1]); } () @@ -8781,7 +8277,6 @@ def p_module_item_10(p): if(parse_debug): print('module_item_10', list(p)) - # { real_type_t*real_type = new real_type_t(real_type_t::REAL); # pform_module_define_port(@2, p[4], p[2], NetNet::WIRE, real_type, p[1]); # } @@ -8793,7 +8288,6 @@ def p_module_item_11(p): if(parse_debug): print('module_item_11', list(p)) - # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE; # if (vector_type_t*dtype = dynamic_cast (p[3])) { # if (dtype->implicit_flag) @@ -8812,7 +8306,6 @@ def p_module_item_12(p): if(parse_debug): print('module_item_12', list(p)) - # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE; # if (vector_type_t*dtype = dynamic_cast (p[3])) { # if (dtype->implicit_flag) @@ -8831,7 +8324,6 @@ def p_module_item_13(p): if(parse_debug): print('module_item_13', list(p)) - # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE; # if (vector_type_t*dtype = dynamic_cast (p[3])) { # if (dtype->implicit_flag) @@ -8866,7 +8358,6 @@ def p_module_item_14(p): if(parse_debug): print('module_item_14', list(p)) - # { yyerror(@2, "error: Invalid variable list in port declaration."); # if (p[1]) delete p[1]; # if (p[4]) delete p[4]; @@ -8880,7 +8371,6 @@ def p_module_item_15(p): if(parse_debug): print('module_item_15', list(p)) - # { yyerror(@2, "error: Invalid variable list in port declaration."); # if (p[1]) delete p[1]; # if (p[3]) delete p[3]; @@ -8894,7 +8384,6 @@ def p_module_item_16(p): if(parse_debug): print('module_item_16', list(p)) - # { yyerror(@2, "error: Invalid variable list in port declaration."); # if (p[1]) delete p[1]; # if (p[3]) delete p[3]; @@ -8908,7 +8397,6 @@ def p_module_item_17(p): if(parse_debug): print('module_item_17', list(p)) - # { yyerror(@2, "error: Invalid variable list in port declaration."); # if (p[1]) delete p[1]; # if (p[3]) delete p[3]; @@ -8922,7 +8410,6 @@ def p_module_item_18(p): if(parse_debug): print('module_item_18', list(p)) - # { pform_attach_discipline(@1, p[1], p[2]); } () @@ -8932,7 +8419,6 @@ def p_module_item_19(p): if(parse_debug): print('module_item_19', list(p)) - # { delete attributes_in_context; # attributes_in_context = 0; # } @@ -8953,7 +8439,6 @@ def p_module_item_21(p): if(parse_debug): print('module_item_21', list(p)) - # { pform_makegates(@2, p[2], str_strength, 0, p[3], p[1]); } () @@ -8963,7 +8448,6 @@ def p_module_item_22(p): if(parse_debug): print('module_item_22', list(p)) - # { pform_makegates(@2, p[2], str_strength, p[3], p[4], p[1]); } () @@ -8973,7 +8457,6 @@ def p_module_item_23(p): if(parse_debug): print('module_item_23', list(p)) - # { pform_makegates(@2, p[2], p[3], 0, p[4], p[1]); } () @@ -8983,7 +8466,6 @@ def p_module_item_24(p): if(parse_debug): print('module_item_24', list(p)) - # { pform_makegates(@2, p[2], p[3], p[4], p[5], p[1]); } () @@ -8993,7 +8475,6 @@ def p_module_item_25(p): if(parse_debug): print('module_item_25', list(p)) - # { pform_makegates(@2, p[2], str_strength, 0, p[3], p[1]); } () @@ -9003,7 +8484,6 @@ def p_module_item_26(p): if(parse_debug): print('module_item_26', list(p)) - # { pform_makegates(@2, p[2], str_strength, p[3], p[4], p[1]); } () @@ -9013,7 +8493,6 @@ def p_module_item_27(p): if(parse_debug): print('module_item_27', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLUP, pull_strength, 0, p[2], 0); } () @@ -9023,7 +8502,6 @@ def p_module_item_28(p): if(parse_debug): print('module_item_28', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLDOWN, pull_strength, 0, p[2], 0); } () @@ -9033,7 +8511,6 @@ def p_module_item_29(p): if(parse_debug): print('module_item_29', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLUP, p[3], 0, p[5], 0); } () @@ -9043,7 +8520,6 @@ def p_module_item_30(p): if(parse_debug): print('module_item_30', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLUP, p[3], 0, p[7], 0); } () @@ -9053,7 +8529,6 @@ def p_module_item_31(p): if(parse_debug): print('module_item_31', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLUP, p[5], 0, p[7], 0); } () @@ -9063,7 +8538,6 @@ def p_module_item_32(p): if(parse_debug): print('module_item_32', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[3], 0, p[5], 0); } () @@ -9073,7 +8547,6 @@ def p_module_item_33(p): if(parse_debug): print('module_item_33', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[5], 0, p[7], 0); } () @@ -9083,7 +8556,6 @@ def p_module_item_34(p): if(parse_debug): print('module_item_34', list(p)) - # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[3], 0, p[7], 0); } () @@ -9093,7 +8565,6 @@ def p_module_item_35(p): if(parse_debug): print('module_item_35', list(p)) - # { perm_string tmp1 = lex_strings.make(p[2]); # pform_make_modgates(@2, tmp1, p[3], p[4], p[1]); # delete[]p[2]; @@ -9106,7 +8577,6 @@ def p_module_item_36(p): if(parse_debug): print('module_item_36', list(p)) - # { yyerror(@2, "error: Invalid module instantiation"); # delete[]p[2]; # if (p[1]) delete p[1]; @@ -9119,7 +8589,6 @@ def p_module_item_37(p): if(parse_debug > 2): print('module_item_37', list(p)) - # { pform_make_pgassign_list(p[4], p[3], p[2], @1.text, @1.first_line); } () @@ -9129,7 +8598,6 @@ def p_module_item_38(p): if(parse_debug): print('module_item_38', list(p)) - # { PProcess*tmp = pform_make_behavior(IVL_PR_ALWAYS, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9143,7 +8611,6 @@ def p_module_item_39(p): absyn.always_comb(p[3], p[1]) - # { PProcess*tmp = pform_make_behavior(IVL_PR_ALWAYS_COMB, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9155,7 +8622,6 @@ def p_module_item_40(p): if(parse_debug): print('module_item_40', list(p)) - # { PProcess*tmp = pform_make_behavior(IVL_PR_ALWAYS_FF, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9167,7 +8633,6 @@ def p_module_item_41(p): if(parse_debug): print('module_item_41', list(p)) - # { PProcess*tmp = pform_make_behavior(IVL_PR_ALWAYS_LATCH, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9179,7 +8644,6 @@ def p_module_item_42(p): if(parse_debug): print('module_item_42', list(p)) - # { PProcess*tmp = pform_make_behavior(IVL_PR_INITIAL, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9191,7 +8655,6 @@ def p_module_item_43(p): if(parse_debug): print('module_item_43', list(p)) - # { PProcess*tmp = pform_make_behavior(IVL_PR_FINAL, p[3], p[1]); # FILE_NAME(tmp, @2); # } @@ -9203,7 +8666,6 @@ def p_module_item_44(p): if(parse_debug): print('module_item_44', list(p)) - # { pform_make_analog_behavior(@2, IVL_PR_ALWAYS, p[3]); } () @@ -9258,7 +8720,6 @@ def p_module_item_50(p): if(parse_debug): print('module_item_50', list(p)) - # { // Test for bad nesting. I understand it, but it is illegal. # if (pform_parent_generate()) { # cerr << @1 << ": error: Generate/endgenerate regions cannot nest." << endl; @@ -9275,7 +8736,6 @@ def p_module_item_51(p): if(parse_debug): print('module_item_51', list(p)) - # { pform_genvars(@1, p[2]); } () @@ -9285,7 +8745,6 @@ def p_module_item_52(p): if(parse_debug): print('module_item_52', list(p)) - # { pform_endgenerate(); } () @@ -9295,7 +8754,6 @@ def p_module_item_53(p): if(parse_debug): print('module_item_53', list(p)) - # { pform_endgenerate(); } () @@ -9305,7 +8763,6 @@ def p_module_item_54(p): if(parse_debug): print('module_item_54', list(p)) - # { pform_endgenerate(); } () @@ -9315,7 +8772,6 @@ def p_module_item_55(p): if(parse_debug): print('module_item_55', list(p)) - # { pform_endgenerate(); } () @@ -9361,7 +8817,6 @@ def p_module_item_60(p): if(parse_debug): print('module_item_60', list(p)) - # { yyerror(@1, "error: syntax error in specify block"); # yyerrok; # } @@ -9373,7 +8828,6 @@ def p_module_item_61(p): if(parse_debug): print('module_item_61', list(p)) - # { yyerror(@2, "error: invalid module item."); # yyerrok; # } @@ -9385,7 +8839,6 @@ def p_module_item_62(p): if(parse_debug): print('module_item_62', list(p)) - # { yyerror(@1, "error: syntax error in left side " # "of continuous assignment."); # yyerrok; @@ -9398,7 +8851,6 @@ def p_module_item_63(p): if(parse_debug): print('module_item_63', list(p)) - # { yyerror(@1, "error: syntax error in " # "continuous assignment"); # yyerrok; @@ -9411,7 +8863,6 @@ def p_module_item_64(p): if(parse_debug): print('module_item_64', list(p)) - # { yyerror(@1, "error: I give up on this " # "function definition."); # if (p[4]) { @@ -9431,7 +8882,6 @@ def p_module_item_65(p): if(parse_debug): print('module_item_65', list(p)) - # { perm_string tmp3 = lex_strings.make(p[3]); # perm_string tmp5 = lex_strings.make(p[5]); # pform_set_attrib(tmp3, tmp5, p[7]); @@ -9446,7 +8896,6 @@ def p_module_item_66(p): if(parse_debug): print('module_item_66', list(p)) - # { yyerror(@1, "error: Malformed $attribute parameter list."); } () @@ -9454,7 +8903,6 @@ def p_module_item_66(p): def p__embed0_module_item(p): '''_embed0_module_item : ''' - # { attributes_in_context = p[1]; } () @@ -9462,7 +8910,6 @@ def p__embed0_module_item(p): def p__embed1_module_item(p): '''_embed1_module_item : ''' - # { if (pform_in_interface()) # yyerror(@1, "error: Parameter overrides are not allowed " # "in interfaces."); @@ -9473,7 +8920,6 @@ def p__embed1_module_item(p): def p__embed2_module_item(p): '''_embed2_module_item : ''' - # { pform_start_generate_for(@1, p[3], p[5], p[7], p[9], p[11]); } () @@ -9481,7 +8927,6 @@ def p__embed2_module_item(p): def p__embed3_module_item(p): '''_embed3_module_item : ''' - # { pform_start_generate_else(@1); } () @@ -9489,7 +8934,6 @@ def p__embed3_module_item(p): def p__embed4_module_item(p): '''_embed4_module_item : ''' - # { pform_start_generate_case(@1, p[3]); } () @@ -9497,7 +8941,6 @@ def p__embed4_module_item(p): def p__embed5_module_item(p): '''_embed5_module_item : ''' - # { if (pform_in_interface()) # yyerror(@1, "error: specparam declarations are not allowed " # "in interfaces."); @@ -9508,7 +8951,6 @@ def p__embed5_module_item(p): def p__embed6_module_item(p): '''_embed6_module_item : ''' - # { if (pform_in_interface()) # yyerror(@1, "error: specify blocks are not allowed " # "in interfaces."); @@ -9557,7 +8999,6 @@ def p_generate_if_1(p): if(parse_debug): print('generate_if_1', list(p)) - # { pform_start_generate_if(@1, p[3]); } () @@ -9585,7 +9026,6 @@ def p_generate_case_item_1(p): if(parse_debug): print('generate_case_item_1', list(p)) - # { pform_endgenerate(); } () @@ -9595,7 +9035,6 @@ def p_generate_case_item_2(p): if(parse_debug): print('generate_case_item_2', list(p)) - # { pform_endgenerate(); } () @@ -9603,7 +9042,6 @@ def p_generate_case_item_2(p): def p__embed0_generate_case_item(p): '''_embed0_generate_case_item : ''' - # { pform_generate_case_item(@1, p[1]); } () @@ -9611,7 +9049,6 @@ def p__embed0_generate_case_item(p): def p__embed1_generate_case_item(p): '''_embed1_generate_case_item : ''' - # { pform_generate_case_item(@1, 0); } () @@ -9630,7 +9067,6 @@ def p_generate_item_2(p): if(parse_debug): print('generate_item_2', list(p)) - # { /* Detect and warn about anachronistic begin/end use */ # if (generation_flag > GN_VER2001 && warn_anachronisms) { # warn_count += 1; @@ -9645,7 +9081,6 @@ def p_generate_item_3(p): if(parse_debug): print('generate_item_3', list(p)) - # { /* Detect and warn about anachronistic named begin/end use */ # if (generation_flag > GN_VER2001 && warn_anachronisms) { # warn_count += 1; @@ -9659,7 +9094,6 @@ def p_generate_item_3(p): def p__embed0_generate_item(p): '''_embed0_generate_item : ''' - # { # pform_start_generate_nblock(@1, p[3]); # } @@ -9725,7 +9159,6 @@ def p_generate_block_3(p): if(parse_debug): print('generate_block_3', list(p)) - # { pform_generate_block_name(p[3]); # if (p[6]) { # if (strcmp(p[3],p[6]) != 0) { @@ -9766,7 +9199,6 @@ def p_net_decl_assign_1(p): if(parse_debug): print('net_decl_assign_1', list(p)) - # { net_decl_assign_t*tmp = new net_decl_assign_t; # tmp->next = tmp; # tmp->name = lex_strings.make(p[1]); @@ -9782,7 +9214,6 @@ def p_net_decl_assigns_1(p): if(parse_debug): print('net_decl_assigns_1', list(p)) - # { net_decl_assign_t*tmp = p[1]; # p[3]->next = tmp->next; # tmp->next = p[3]; @@ -9796,7 +9227,6 @@ def p_net_decl_assigns_2(p): if(parse_debug): print('net_decl_assigns_2', list(p)) - # { p[0] = p[1]; # } () @@ -9807,7 +9237,6 @@ def p_bit_logic_1(p): if(parse_debug): print('bit_logic_1', list(p)) - # { p[0] = IVL_VT_LOGIC; } () @@ -9817,7 +9246,6 @@ def p_bit_logic_2(p): if(parse_debug): print('bit_logic_2', list(p)) - # { p[0] = IVL_VT_BOOL; /* Icarus misc */} () @@ -9827,7 +9255,6 @@ def p_bit_logic_3(p): if(parse_debug): print('bit_logic_3', list(p)) - # { p[0] = IVL_VT_BOOL; /* IEEE1800 / IEEE1364-2009 */} () @@ -9846,7 +9273,6 @@ def p_bit_logic_opt_2(p): if(parse_debug): print('bit_logic_opt_2', list(p)) - # { p[0] = IVL_VT_NO_TYPE; } () @@ -9867,7 +9293,6 @@ def p_net_type_2(p): if(parse_debug): print('net_type_2', list(p)) - # { p[0] = NetNet::TRI; } () @@ -9877,7 +9302,6 @@ def p_net_type_3(p): if(parse_debug): print('net_type_3', list(p)) - # { p[0] = NetNet::TRI1; } () @@ -9887,7 +9311,6 @@ def p_net_type_4(p): if(parse_debug): print('net_type_4', list(p)) - # { p[0] = NetNet::SUPPLY0; } () @@ -9897,7 +9320,6 @@ def p_net_type_5(p): if(parse_debug): print('net_type_5', list(p)) - # { p[0] = NetNet::WAND; } () @@ -9907,7 +9329,6 @@ def p_net_type_6(p): if(parse_debug): print('net_type_6', list(p)) - # { p[0] = NetNet::TRIAND; } () @@ -9917,7 +9338,6 @@ def p_net_type_7(p): if(parse_debug): print('net_type_7', list(p)) - # { p[0] = NetNet::TRI0; } () @@ -9927,7 +9347,6 @@ def p_net_type_8(p): if(parse_debug): print('net_type_8', list(p)) - # { p[0] = NetNet::SUPPLY1; } () @@ -9937,7 +9356,6 @@ def p_net_type_9(p): if(parse_debug): print('net_type_9', list(p)) - # { p[0] = NetNet::WOR; } () @@ -9947,7 +9365,6 @@ def p_net_type_10(p): if(parse_debug): print('net_type_10', list(p)) - # { p[0] = NetNet::TRIOR; } () @@ -9957,7 +9374,6 @@ def p_net_type_11(p): if(parse_debug): print('net_type_11', list(p)) - # { p[0] = NetNet::UNRESOLVED_WIRE; # cerr << @1.text << ":" << @1.first_line << ": warning: " # "'wone' is deprecated, please use 'uwire' " @@ -9971,7 +9387,6 @@ def p_net_type_12(p): if(parse_debug): print('net_type_12', list(p)) - # { p[0] = NetNet::UNRESOLVED_WIRE; } () @@ -9981,7 +9396,6 @@ def p_param_type_1(p): if(parse_debug): print('param_type_1', list(p)) - # { param_active_range = p[3]; # param_active_signed = p[2]; # if ((p[1] == IVL_VT_NO_TYPE) && (p[3] != 0)) @@ -9997,7 +9411,6 @@ def p_param_type_2(p): if(parse_debug): print('param_type_2', list(p)) - # { param_active_range = make_range_from_width(integer_width); # param_active_signed = true; # param_active_type = IVL_VT_LOGIC; @@ -10010,7 +9423,6 @@ def p_param_type_3(p): if(parse_debug): print('param_type_3', list(p)) - # { param_active_range = make_range_from_width(64); # param_active_signed = false; # param_active_type = IVL_VT_LOGIC; @@ -10023,7 +9435,6 @@ def p_param_type_4(p): if(parse_debug): print('param_type_4', list(p)) - # { param_active_range = 0; # param_active_signed = true; # param_active_type = IVL_VT_REAL; @@ -10036,7 +9447,6 @@ def p_param_type_5(p): if(parse_debug): print('param_type_5', list(p)) - # { param_active_range = make_range_from_width(p[1]); # param_active_signed = true; # param_active_type = IVL_VT_BOOL; @@ -10049,7 +9459,6 @@ def p_param_type_6(p): if(parse_debug): print('param_type_6', list(p)) - # { pform_set_param_from_type(@1, p[1].type, p[1].text, param_active_range, # param_active_signed, param_active_type); # delete[]p[1].text; @@ -10101,7 +9510,6 @@ def p_parameter_assign_1(p): expr = Node(syms.tfpdef, [tpname, Leaf(token.EQUAL, p[2]), p[3]]) p[0] = expr - # { PExpr*tmp = p[3]; # pform_set_parameter(@1, lex_strings.make(p[1]), param_active_type, # param_active_signed, param_active_range, tmp, p[4]); @@ -10115,7 +9523,6 @@ def p_localparam_assign_1(p): if(parse_debug): print('localparam_assign_1', list(p)) - # { PExpr*tmp = p[3]; # pform_set_localparam(@1, lex_strings.make(p[1]), param_active_type, # param_active_signed, param_active_range, tmp); @@ -10139,7 +9546,6 @@ def p_parameter_value_ranges_opt_2(p): if(parse_debug): print('parameter_value_ranges_opt_2', list(p)) - # { p[0] = None } () @@ -10149,7 +9555,6 @@ def p_parameter_value_ranges_1(p): if(parse_debug): print('parameter_value_ranges_1', list(p)) - # { p[0] = p[2]; p[0]->next = p[1]; } () @@ -10159,7 +9564,6 @@ def p_parameter_value_ranges_2(p): if(parse_debug): print('parameter_value_ranges_2', list(p)) - # { p[0] = p[1]; p[0]->next = 0; } () @@ -10169,7 +9573,6 @@ def p_parameter_value_range_1(p): if(parse_debug): print('parameter_value_range_1', list(p)) - # { p[0] = pform_parameter_value_range(p[1], false, p[3], false, p[5]); } () @@ -10179,7 +9582,6 @@ def p_parameter_value_range_2(p): if(parse_debug): print('parameter_value_range_2', list(p)) - # { p[0] = pform_parameter_value_range(p[1], false, p[3], true, p[5]); } () @@ -10189,7 +9591,6 @@ def p_parameter_value_range_3(p): if(parse_debug): print('parameter_value_range_3', list(p)) - # { p[0] = pform_parameter_value_range(p[1], true, p[3], false, p[5]); } () @@ -10199,7 +9600,6 @@ def p_parameter_value_range_4(p): if(parse_debug): print('parameter_value_range_4', list(p)) - # { p[0] = pform_parameter_value_range(p[1], true, p[3], true, p[5]); } () @@ -10209,7 +9609,6 @@ def p_parameter_value_range_5(p): if(parse_debug): print('parameter_value_range_5', list(p)) - # { p[0] = pform_parameter_value_range(true, false, p[2], false, p[2]); } () @@ -10229,7 +9628,6 @@ def p_value_range_expression_2(p): if(parse_debug): print('value_range_expression_2', list(p)) - # { p[0] = None } () @@ -10239,7 +9637,6 @@ def p_value_range_expression_3(p): if(parse_debug): print('value_range_expression_3', list(p)) - # { p[0] = None } () @@ -10249,7 +9646,6 @@ def p_value_range_expression_4(p): if(parse_debug): print('value_range_expression_4', list(p)) - # { p[0] = None } () @@ -10279,7 +9675,6 @@ def p_parameter_value_opt_1(p): if(parse_debug): print('parameter_value_opt_1', list(p)) - # { struct parmvalue_t*tmp = new struct parmvalue_t; # tmp->by_order = p[3]; # tmp->by_name = 0; @@ -10293,7 +9688,6 @@ def p_parameter_value_opt_2(p): if(parse_debug): print('parameter_value_opt_2', list(p)) - # { struct parmvalue_t*tmp = new struct parmvalue_t; # tmp->by_order = 0; # tmp->by_name = p[3]; @@ -10307,7 +9701,6 @@ def p_parameter_value_opt_3(p): if(parse_debug): print('parameter_value_opt_3', list(p)) - # { assert(p[2]); # PENumber*tmp = new PENumber(p[2]); # FILE_NAME(tmp, @1); @@ -10327,7 +9720,6 @@ def p_parameter_value_opt_4(p): if(parse_debug): print('parameter_value_opt_4', list(p)) - # { assert(p[2]); # PEFNumber*tmp = new PEFNumber(p[2]); # FILE_NAME(tmp, @1); @@ -10346,7 +9738,6 @@ def p_parameter_value_opt_5(p): if(parse_debug): print('parameter_value_opt_5', list(p)) - # { yyerror(@1, "error: syntax error in parameter value " # "assignment list."); # p[0] = None @@ -10359,7 +9750,6 @@ def p_parameter_value_opt_6(p): if(parse_debug): print('parameter_value_opt_6', list(p)) - # { p[0] = None } () @@ -10369,7 +9759,6 @@ def p_parameter_value_byname_1(p): if(parse_debug): print('parameter_value_byname_1', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = p[4]; @@ -10384,7 +9773,6 @@ def p_parameter_value_byname_2(p): if(parse_debug): print('parameter_value_byname_2', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = 0; @@ -10399,7 +9787,6 @@ def p_parameter_value_byname_list_1(p): if(parse_debug): print('parameter_value_byname_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(*p[1]); # delete p[1]; @@ -10413,7 +9800,6 @@ def p_parameter_value_byname_list_2(p): if(parse_debug): print('parameter_value_byname_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(*p[3]); # delete p[3]; @@ -10437,7 +9823,6 @@ def p_port_2(p): if(parse_debug): print('port_2', list(p)) - # { Module::port_t*tmp = p[4]; # tmp->name = lex_strings.make(p[2]); # delete[]p[2]; @@ -10451,7 +9836,6 @@ def p_port_3(p): if(parse_debug): print('port_3', list(p)) - # { Module::port_t*tmp = p[2]; # tmp->name = perm_string(); # p[0] = tmp; @@ -10464,7 +9848,6 @@ def p_port_4(p): if(parse_debug): print('port_4', list(p)) - # { Module::port_t*tmp = p[5]; # tmp->name = lex_strings.make(p[2]); # delete[]p[2]; @@ -10488,7 +9871,6 @@ def p_port_opt_2(p): if(parse_debug): print('port_opt_2', list(p)) - # { p[0] = None } () @@ -10498,7 +9880,6 @@ def p_port_name_1(p): if(parse_debug): print('port_name_1', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = p[4]; @@ -10513,7 +9894,6 @@ def p_port_name_2(p): if(parse_debug): print('port_name_2', list(p)) - # { yyerror(@3, "error: invalid port connection expression."); # named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); @@ -10529,7 +9909,6 @@ def p_port_name_3(p): if(parse_debug): print('port_name_3', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = 0; @@ -10544,7 +9923,6 @@ def p_port_name_4(p): if(parse_debug): print('port_name_4', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make(p[2]); # tmp->parm = new PEIdent(lex_strings.make(p[2]), true); @@ -10560,7 +9938,6 @@ def p_port_name_5(p): if(parse_debug): print('port_name_5', list(p)) - # { named_pexpr_t*tmp = new named_pexpr_t; # tmp->name = lex_strings.make("*"); # tmp->parm = 0; @@ -10574,7 +9951,6 @@ def p_port_name_list_1(p): if(parse_debug): print('port_name_list_1', list(p)) - # { list*tmp = p[1]; # tmp->push_back(*p[3]); # delete p[3]; @@ -10588,7 +9964,6 @@ def p_port_name_list_2(p): if(parse_debug): print('port_name_list_2', list(p)) - # { list*tmp = new list; # tmp->push_back(*p[1]); # delete p[1]; @@ -10602,7 +9977,6 @@ def p_port_reference_1(p): if(parse_debug): print('port_reference_1', list(p)) - # { Module::port_t*ptmp; # perm_string name = lex_strings.make(p[1]); # ptmp = pform_module_port_reference(name, @1.text, @1.first_line); @@ -10617,7 +9991,6 @@ def p_port_reference_2(p): if(parse_debug): print('port_reference_2', list(p)) - # { index_component_t itmp; # itmp.sel = index_component_t::SEL_PART; # itmp.msb = p[3]; @@ -10647,7 +10020,6 @@ def p_port_reference_3(p): if(parse_debug): print('port_reference_3', list(p)) - # { index_component_t itmp; # itmp.sel = index_component_t::SEL_BIT; # itmp.msb = p[3]; @@ -10676,7 +10048,6 @@ def p_port_reference_4(p): if(parse_debug): print('port_reference_4', list(p)) - # { yyerror(@1, "error: invalid port bit select"); # Module::port_t*ptmp = new Module::port_t; # PEIdent*wtmp = new PEIdent(lex_strings.make(p[1])); @@ -10704,7 +10075,6 @@ def p_port_reference_list_2(p): if(parse_debug): print('port_reference_list_2', list(p)) - # { Module::port_t*tmp = p[1]; # append(tmp->expr, p[3]->expr); # delete p[3]; @@ -10718,7 +10088,6 @@ def p_dimensions_opt_1(p): if(parse_debug > 2): print('dimensions_opt_1', list(p)) - # { p[0] = None } () @@ -10748,7 +10117,6 @@ def p_dimensions_2(p): if(parse_debug): print('dimensions_2', list(p)) - # { list *tmp = p[1]; # if (p[2]) { # tmp->splice(tmp->end(), *p[2]); @@ -10764,7 +10132,6 @@ def p_register_variable_1(p): if(parse_debug): print('register_variable_1', list(p)) - # { perm_string name = lex_strings.make(p[1]); # pform_makewire(@1, name, NetNet::REG, # NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0); @@ -10779,7 +10146,6 @@ def p_register_variable_2(p): if(parse_debug): print('register_variable_2', list(p)) - # { if (pform_peek_scope()->var_init_needs_explicit_lifetime() # && (var_lifetime == LexicalScope::INHERITED)) { # cerr << @3 << ": warning: Static variable initialization requires " @@ -10801,7 +10167,6 @@ def p_register_variable_list_1(p): if(parse_debug): print('register_variable_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[1])); # p[0] = tmp; @@ -10815,7 +10180,6 @@ def p_register_variable_list_2(p): if(parse_debug): print('register_variable_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[3])); # p[0] = tmp; @@ -10837,6 +10201,7 @@ def p_net_variable_1(p): # pform_set_reg_idx(name, p[2]); p[0] = [p[1], p[2]] + # } () @@ -10847,7 +10212,6 @@ def p_net_variable_list_1(p): print('net_variable_list_1', list(p)) p[0] = [p[1]] - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[1])); # p[0] = tmp; @@ -10862,7 +10226,6 @@ def p_net_variable_list_2(p): print('net_variable_list_2', list(p)) p[0] = p[1]+[p[3]] - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[3])); # p[0] = tmp; @@ -10876,7 +10239,6 @@ def p_event_variable_1(p): if(parse_debug): print('event_variable_1', list(p)) - # { if (p[2]) { # yyerror(@2, "sorry: event arrays are not supported."); # delete p[2]; @@ -10891,7 +10253,6 @@ def p_event_variable_list_1(p): if(parse_debug): print('event_variable_list_1', list(p)) - # { p[0] = list_from_identifier(p[1]); } () @@ -10901,7 +10262,6 @@ def p_event_variable_list_2(p): if(parse_debug): print('event_variable_list_2', list(p)) - # { p[0] = list_from_identifier(p[1], p[3]); } () @@ -10920,7 +10280,6 @@ def p_specify_item_2(p): if(parse_debug): print('specify_item_2', list(p)) - # { pform_module_specify_path(p[1]); # } () @@ -10931,7 +10290,6 @@ def p_specify_item_3(p): if(parse_debug): print('specify_item_3', list(p)) - # { pform_module_specify_path(p[1]); # } () @@ -10942,7 +10300,6 @@ def p_specify_item_4(p): if(parse_debug): print('specify_item_4', list(p)) - # { PSpecPath*tmp = p[5]; # if (tmp) { # tmp->conditional = true; @@ -10958,7 +10315,6 @@ def p_specify_item_5(p): if(parse_debug): print('specify_item_5', list(p)) - # { PSpecPath*tmp = p[5]; # if (tmp) { # tmp->conditional = true; @@ -10974,7 +10330,6 @@ def p_specify_item_6(p): if(parse_debug): print('specify_item_6', list(p)) - # { PSpecPath*tmp = p[2]; # if (tmp) { # tmp->conditional = true; @@ -10990,7 +10345,6 @@ def p_specify_item_7(p): if(parse_debug): print('specify_item_7', list(p)) - # { yyerror(@1, "Sorry: ifnone with an edge-sensitive path is " # "not supported."); # yyerrok; @@ -11003,7 +10357,6 @@ def p_specify_item_8(p): if(parse_debug): print('specify_item_8', list(p)) - # { delete p[7]; # delete p[9]; # } @@ -11015,7 +10368,6 @@ def p_specify_item_9(p): if(parse_debug): print('specify_item_9', list(p)) - # { delete p[7]; # } () @@ -11026,7 +10378,6 @@ def p_specify_item_10(p): if(parse_debug): print('specify_item_10', list(p)) - # { delete p[7]; # delete p[9]; # } @@ -11038,7 +10389,6 @@ def p_specify_item_11(p): if(parse_debug): print('specify_item_11', list(p)) - # { delete p[5]; # } () @@ -11049,7 +10399,6 @@ def p_specify_item_12(p): if(parse_debug): print('specify_item_12', list(p)) - # { delete p[7]; # } () @@ -11060,7 +10409,6 @@ def p_specify_item_13(p): if(parse_debug): print('specify_item_13', list(p)) - # { delete p[7]; # delete p[9]; # } @@ -11072,7 +10420,6 @@ def p_specify_item_14(p): if(parse_debug): print('specify_item_14', list(p)) - # { delete p[7]; # } () @@ -11083,7 +10430,6 @@ def p_specify_item_15(p): if(parse_debug): print('specify_item_15', list(p)) - # { delete p[7]; # } () @@ -11094,7 +10440,6 @@ def p_specify_item_16(p): if(parse_debug): print('specify_item_16', list(p)) - # { delete p[7]; # delete p[9]; # } @@ -11106,7 +10451,6 @@ def p_specify_item_17(p): if(parse_debug): print('specify_item_17', list(p)) - # { delete p[7]; # } () @@ -11117,7 +10461,6 @@ def p_specify_item_18(p): if(parse_debug): print('specify_item_18', list(p)) - # { delete p[7]; # } () @@ -11128,7 +10471,6 @@ def p_specify_item_19(p): if(parse_debug): print('specify_item_19', list(p)) - # { delete p[5]; # delete p[7]; # } @@ -11140,7 +10482,6 @@ def p_specify_item_20(p): if(parse_debug): print('specify_item_20', list(p)) - # { delete p[5]; # } () @@ -11151,7 +10492,6 @@ def p_specify_item_21(p): if(parse_debug): print('specify_item_21', list(p)) - # { delete p[2]; # } () @@ -11162,7 +10502,6 @@ def p_specify_item_22(p): if(parse_debug): print('specify_item_22', list(p)) - # { delete p[2]; # } () @@ -11173,7 +10512,6 @@ def p_specify_item_23(p): if(parse_debug): print('specify_item_23', list(p)) - # { delete p[2]; # } () @@ -11184,7 +10522,6 @@ def p_specify_item_24(p): if(parse_debug): print('specify_item_24', list(p)) - # { delete p[2]; # } () @@ -11213,7 +10550,6 @@ def p_specify_item_list_opt_1(p): if(parse_debug): print('specify_item_list_opt_1', list(p)) - # { } () @@ -11223,7 +10559,6 @@ def p_specify_item_list_opt_2(p): if(parse_debug): print('specify_item_list_opt_2', list(p)) - # { } () @@ -11233,7 +10568,6 @@ def p_specify_edge_path_decl_1(p): if(parse_debug): print('specify_edge_path_decl_1', list(p)) - # { p[0] = pform_assign_path_delay(p[1], p[4]); } () @@ -11243,7 +10577,6 @@ def p_specify_edge_path_decl_2(p): if(parse_debug): print('specify_edge_path_decl_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # p[0] = pform_assign_path_delay(p[1], tmp); @@ -11276,7 +10609,6 @@ def p_specify_edge_path_1(p): if(parse_debug): print('specify_edge_path_1', list(p)) - # { int edge_flag = 0; # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[2], p[3], false, p[6], p[8]); } () @@ -11287,7 +10619,6 @@ def p_specify_edge_path_2(p): if(parse_debug): print('specify_edge_path_2', list(p)) - # { int edge_flag = p[2]? 1 : -1; # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[3], p[4], false, p[7], p[9]);} () @@ -11298,7 +10629,6 @@ def p_specify_edge_path_3(p): if(parse_debug): print('specify_edge_path_3', list(p)) - # { int edge_flag = 0; # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[2], p[3], true, p[6], p[8]); } () @@ -11309,7 +10639,6 @@ def p_specify_edge_path_4(p): if(parse_debug): print('specify_edge_path_4', list(p)) - # { int edge_flag = p[2]? 1 : -1; # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[3], p[4], true, p[7], p[9]); } () @@ -11347,7 +10676,6 @@ def p_specify_simple_path_decl_1(p): if(parse_debug): print('specify_simple_path_decl_1', list(p)) - # { p[0] = pform_assign_path_delay(p[1], p[4]); } () @@ -11357,7 +10685,6 @@ def p_specify_simple_path_decl_2(p): if(parse_debug): print('specify_simple_path_decl_2', list(p)) - # { list*tmp = new list; # tmp->push_back(p[3]); # p[0] = pform_assign_path_delay(p[1], tmp); @@ -11370,7 +10697,6 @@ def p_specify_simple_path_decl_3(p): if(parse_debug): print('specify_simple_path_decl_3', list(p)) - # { yyerror(@3, "Syntax error in delay value list."); # yyerrok; # p[0] = None @@ -11383,7 +10709,6 @@ def p_specify_simple_path_1(p): if(parse_debug): print('specify_simple_path_1', list(p)) - # { p[0] = pform_make_specify_path(@1, p[2], p[3], false, p[5]); } () @@ -11393,7 +10718,6 @@ def p_specify_simple_path_2(p): if(parse_debug): print('specify_simple_path_2', list(p)) - # { p[0] = pform_make_specify_path(@1, p[2], p[3], true, p[5]); } () @@ -11403,7 +10727,6 @@ def p_specify_simple_path_3(p): if(parse_debug): print('specify_simple_path_3', list(p)) - # { yyerror(@1, "Invalid simple path"); # yyerrok; # } @@ -11415,7 +10738,6 @@ def p_specify_path_identifiers_1(p): if(parse_debug): print('specify_path_identifiers_1', list(p)) - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[1])); # p[0] = tmp; @@ -11429,7 +10751,6 @@ def p_specify_path_identifiers_2(p): if(parse_debug): print('specify_path_identifiers_2', list(p)) - # { if (gn_specify_blocks_flag) { # yywarn(@4, "Bit selects are not currently supported " # "in path declarations. The declaration " @@ -11448,7 +10769,6 @@ def p_specify_path_identifiers_3(p): if(parse_debug): print('specify_path_identifiers_3', list(p)) - # { if (gn_specify_blocks_flag) { # yywarn(@4, "Part selects are not currently supported " # "in path declarations. The declaration " @@ -11467,7 +10787,6 @@ def p_specify_path_identifiers_4(p): if(parse_debug): print('specify_path_identifiers_4', list(p)) - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[3])); # p[0] = tmp; @@ -11481,7 +10800,6 @@ def p_specify_path_identifiers_5(p): if(parse_debug): print('specify_path_identifiers_5', list(p)) - # { if (gn_specify_blocks_flag) { # yywarn(@4, "Bit selects are not currently supported " # "in path declarations. The declaration " @@ -11500,7 +10818,6 @@ def p_specify_path_identifiers_6(p): if(parse_debug): print('specify_path_identifiers_6', list(p)) - # { if (gn_specify_blocks_flag) { # yywarn(@4, "Part selects are not currently supported " # "in path declarations. The declaration " @@ -11519,7 +10836,6 @@ def p_specparam_1(p): if(parse_debug): print('specparam_1', list(p)) - # { PExpr*tmp = p[3]; # pform_set_specparam(@1, lex_strings.make(p[1]), # param_active_range, tmp); @@ -11533,7 +10849,6 @@ def p_specparam_2(p): if(parse_debug): print('specparam_2', list(p)) - # { PExpr*tmp = 0; # switch (min_typ_max_flag) { # case MIN: @@ -11580,7 +10895,6 @@ def p_specparam_3(p): if(parse_debug): print('specparam_3', list(p)) - # { delete[]p[1]; # delete p[3]; # } @@ -11592,7 +10906,6 @@ def p_specparam_4(p): if(parse_debug): print('specparam_4', list(p)) - # { delete[]p[1]; # delete p[4]; # delete p[6]; @@ -11632,7 +10945,6 @@ def p_specparam_decl_2(p): if(parse_debug): print('specparam_decl_2', list(p)) - # { param_active_range = 0; } () @@ -11640,7 +10952,6 @@ def p_specparam_decl_2(p): def p__embed0_specparam_decl(p): '''_embed0_specparam_decl : ''' - # { param_active_range = p[1]; } () @@ -11650,7 +10961,6 @@ def p_spec_polarity_1(p): if(parse_debug): print('spec_polarity_1', list(p)) - # { p[0] = '+'; } () @@ -11660,7 +10970,6 @@ def p_spec_polarity_2(p): if(parse_debug): print('spec_polarity_2', list(p)) - # { p[0] = '-'; } () @@ -11670,7 +10979,6 @@ def p_spec_polarity_3(p): if(parse_debug): print('spec_polarity_3', list(p)) - # { p[0] = None } () @@ -11680,7 +10988,6 @@ def p_spec_reference_event_1(p): if(parse_debug): print('spec_reference_event_1', list(p)) - # { delete p[2]; } () @@ -11690,7 +10997,6 @@ def p_spec_reference_event_2(p): if(parse_debug): print('spec_reference_event_2', list(p)) - # { delete p[2]; } () @@ -11700,7 +11006,6 @@ def p_spec_reference_event_3(p): if(parse_debug): print('spec_reference_event_3', list(p)) - # { delete p[2]; # delete p[4]; # } @@ -11712,7 +11017,6 @@ def p_spec_reference_event_4(p): if(parse_debug): print('spec_reference_event_4', list(p)) - # { delete p[2]; # delete p[4]; # } @@ -11724,7 +11028,6 @@ def p_spec_reference_event_5(p): if(parse_debug): print('spec_reference_event_5', list(p)) - # { delete p[5]; } () @@ -11734,7 +11037,6 @@ def p_spec_reference_event_6(p): if(parse_debug): print('spec_reference_event_6', list(p)) - # { delete p[5]; # delete p[7]; # } @@ -11746,7 +11048,6 @@ def p_spec_reference_event_7(p): if(parse_debug): print('spec_reference_event_7', list(p)) - # { delete p[1]; # delete p[3]; # } @@ -11758,7 +11059,6 @@ def p_spec_reference_event_8(p): if(parse_debug): print('spec_reference_event_8', list(p)) - # { delete p[1]; } () @@ -11786,7 +11086,6 @@ def p_spec_notifier_opt_1(p): if(parse_debug): print('spec_notifier_opt_1', list(p)) - # { } () @@ -11796,7 +11095,6 @@ def p_spec_notifier_opt_2(p): if(parse_debug): print('spec_notifier_opt_2', list(p)) - # { } () @@ -11806,7 +11104,6 @@ def p_spec_notifier_1(p): if(parse_debug): print('spec_notifier_1', list(p)) - # { args_after_notifier = 0; } () @@ -11816,7 +11113,6 @@ def p_spec_notifier_2(p): if(parse_debug): print('spec_notifier_2', list(p)) - # { args_after_notifier = 0; delete p[2]; } () @@ -11826,7 +11122,6 @@ def p_spec_notifier_3(p): if(parse_debug): print('spec_notifier_3', list(p)) - # { args_after_notifier += 1; } () @@ -11836,7 +11131,6 @@ def p_spec_notifier_4(p): if(parse_debug): print('spec_notifier_4', list(p)) - # { args_after_notifier += 1; # if (args_after_notifier >= 3) { # cerr << @3 << ": warning: timing checks are not supported " @@ -11852,7 +11146,6 @@ def p_spec_notifier_5(p): if(parse_debug): print('spec_notifier_5', list(p)) - # { args_after_notifier = 0; delete[]p[1]; } () @@ -11862,7 +11155,6 @@ def p_statement_item_1(p): if(parse_debug): print('statement_item_1', list(p)) - # { PCAssign*tmp = new PCAssign(p[2], p[4]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11875,7 +11167,6 @@ def p_statement_item_2(p): if(parse_debug): print('statement_item_2', list(p)) - # { PDeassign*tmp = new PDeassign(p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11888,7 +11179,6 @@ def p_statement_item_3(p): if(parse_debug): print('statement_item_3', list(p)) - # { PForce*tmp = new PForce(p[2], p[4]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11901,7 +11191,6 @@ def p_statement_item_4(p): if(parse_debug): print('statement_item_4', list(p)) - # { PRelease*tmp = new PRelease(p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11914,7 +11203,6 @@ def p_statement_item_5(p): if(parse_debug): print('statement_item_5', list(p)) - # { PBlock*tmp = new PBlock(PBlock::BL_SEQ); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11927,6 +11215,13 @@ def p_statement_item_6(p): if(parse_debug): print('statement_item_6', list(p)) + tmp = None + if(p[3]): + throw(Exception("assert(! current_block_stack.empty());")) + else: + tmp = p[5] + + p[0] = tmp # { PBlock*tmp; # if (p[3]) { @@ -11952,7 +11247,6 @@ def p_statement_item_7(p): p[0] = list(p) - # { pform_pop_scope(); # assert(! current_block_stack.empty()); # PBlock*tmp = current_block_stack.top(); @@ -11980,7 +11274,6 @@ def p_statement_item_8(p): if(parse_debug): print('statement_item_8', list(p)) - # { PBlock*tmp = new PBlock(p[2]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -11993,7 +11286,6 @@ def p_statement_item_9(p): if(parse_debug): print('statement_item_9', list(p)) - # { PBlock*tmp; # if (p[3]) { # pform_pop_scope(); @@ -12017,7 +11309,6 @@ def p_statement_item_10(p): if(parse_debug): print('statement_item_10', list(p)) - # { pform_pop_scope(); # assert(! current_block_stack.empty()); # PBlock*tmp = current_block_stack.top(); @@ -12046,7 +11337,6 @@ def p_statement_item_11(p): if(parse_debug): print('statement_item_11', list(p)) - # { PDisable*tmp = new PDisable(*p[2]); # FILE_NAME(tmp, @1); # delete p[2]; @@ -12060,7 +11350,6 @@ def p_statement_item_12(p): if(parse_debug): print('statement_item_12', list(p)) - # { pform_name_t tmp_name; # PDisable*tmp = new PDisable(tmp_name); # FILE_NAME(tmp, @1); @@ -12074,7 +11363,6 @@ def p_statement_item_13(p): if(parse_debug): print('statement_item_13', list(p)) - # { PTrigger*tmp = new PTrigger(*p[2]); # FILE_NAME(tmp, @1); # delete p[2]; @@ -12118,7 +11406,6 @@ def p_statement_item_17(p): if(parse_debug): print('statement_item_17', list(p)) - # { PCase*tmp = new PCase(NetCase::EQ, p[3], p[5]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12131,7 +11418,6 @@ def p_statement_item_18(p): if(parse_debug): print('statement_item_18', list(p)) - # { PCase*tmp = new PCase(NetCase::EQX, p[3], p[5]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12144,7 +11430,6 @@ def p_statement_item_19(p): if(parse_debug): print('statement_item_19', list(p)) - # { PCase*tmp = new PCase(NetCase::EQZ, p[3], p[5]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12157,7 +11442,6 @@ def p_statement_item_20(p): if(parse_debug): print('statement_item_20', list(p)) - # { yyerrok; } () @@ -12167,7 +11451,6 @@ def p_statement_item_21(p): if(parse_debug): print('statement_item_21', list(p)) - # { yyerrok; } () @@ -12177,7 +11460,6 @@ def p_statement_item_22(p): if(parse_debug): print('statement_item_22', list(p)) - # { yyerrok; } () @@ -12187,7 +11469,6 @@ def p_statement_item_23(p): if(parse_debug): print('statement_item_23', list(p)) - # { PCondit*tmp = new PCondit(p[3], p[5], 0); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12200,6 +11481,8 @@ def p_statement_item_24(p): if(parse_debug): print('statement_item_24', list(p)) + p[0] = absyn.cond_statement3(p[3], p[5], p[7]) + # { PCondit*tmp = new PCondit(p[3], p[5], p[7]); # FILE_NAME(tmp, @1); @@ -12213,7 +11496,6 @@ def p_statement_item_25(p): if(parse_debug): print('statement_item_25', list(p)) - # { yyerror(@1, "error: Malformed conditional expression."); # p[0] = p[5]; # } @@ -12225,7 +11507,6 @@ def p_statement_item_26(p): if(parse_debug): print('statement_item_26', list(p)) - # { yyerror(@1, "error: Malformed conditional expression."); # p[0] = p[5]; # } @@ -12247,7 +11528,6 @@ def p_statement_item_28(p): if(parse_debug): print('statement_item_28', list(p)) - # { p[0] = pform_compressed_assign_from_inc_dec(@1, p[1]); } () @@ -12257,7 +11537,6 @@ def p_statement_item_29(p): if(parse_debug): print('statement_item_29', list(p)) - # { PExpr*del = p[1]->front(); # assert(p[1]->size() == 1); # delete p[1]; @@ -12273,7 +11552,6 @@ def p_statement_item_30(p): if(parse_debug): print('statement_item_30', list(p)) - # { PEventStatement*tmp = p[1]; # if (tmp == 0) { # yyerror(@1, "error: Invalid event control."); @@ -12291,7 +11569,6 @@ def p_statement_item_31(p): if(parse_debug): print('statement_item_31', list(p)) - # { PEventStatement*tmp = new PEventStatement; # FILE_NAME(tmp, @1); # tmp->set_statement(p[3]); @@ -12305,7 +11582,6 @@ def p_statement_item_32(p): if(parse_debug): print('statement_item_32', list(p)) - # { PEventStatement*tmp = new PEventStatement; # FILE_NAME(tmp, @1); # tmp->set_statement(p[5]); @@ -12333,7 +11609,6 @@ def p_statement_item_33(p): """ p[0] = absyn.assign3(p[1], p[2], p[3]) - # { PAssign*tmp = new PAssign(p[1],p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12346,7 +11621,6 @@ def p_statement_item_34(p): if(parse_debug): print('statement_item_34', list(p)) - # { yyerror(@2, "Syntax in assignment statement l-value."); # yyerrok; # p[0] = new PNoop; @@ -12359,7 +11633,6 @@ def p_statement_item_35(p): if(parse_debug): print('statement_item_35', list(p)) - # { PAssignNB*tmp = new PAssignNB(p[1],p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12372,7 +11645,6 @@ def p_statement_item_36(p): if(parse_debug): print('statement_item_36', list(p)) - # { yyerror(@2, "Syntax in assignment statement l-value."); # yyerrok; # p[0] = new PNoop; @@ -12385,7 +11657,6 @@ def p_statement_item_37(p): if(parse_debug): print('statement_item_37', list(p)) - # { PExpr*del = p[3]->front(); p[3]->pop_front(); # assert(p[3]->empty()); # PAssign*tmp = new PAssign(p[1],del,p[4]); @@ -12400,7 +11671,6 @@ def p_statement_item_38(p): if(parse_debug): print('statement_item_38', list(p)) - # { PExpr*del = p[3]->front(); p[3]->pop_front(); # assert(p[3]->empty()); # PAssignNB*tmp = new PAssignNB(p[1],del,p[4]); @@ -12415,7 +11685,6 @@ def p_statement_item_39(p): if(parse_debug): print('statement_item_39', list(p)) - # { PAssign*tmp = new PAssign(p[1],0,p[3],p[4]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12428,7 +11697,6 @@ def p_statement_item_40(p): if(parse_debug): print('statement_item_40', list(p)) - # { PAssign*tmp = new PAssign(p[1],p[5],p[7],p[8]); # FILE_NAME(tmp,@1); # tmp->set_lineno(@1.first_line); @@ -12442,7 +11710,6 @@ def p_statement_item_41(p): if(parse_debug): print('statement_item_41', list(p)) - # { PAssignNB*tmp = new PAssignNB(p[1],0,p[3],p[4]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12455,7 +11722,6 @@ def p_statement_item_42(p): if(parse_debug): print('statement_item_42', list(p)) - # { PAssignNB*tmp = new PAssignNB(p[1],p[5],p[7],p[8]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12468,7 +11734,6 @@ def p_statement_item_43(p): if(parse_debug): print('statement_item_43', list(p)) - # { PAssign*tmp = new PAssign(p[1],p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12481,7 +11746,6 @@ def p_statement_item_44(p): if(parse_debug): print('statement_item_44', list(p)) - # { PAssign*tmp = new PAssign(p[1],p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12494,7 +11758,6 @@ def p_statement_item_45(p): if(parse_debug): print('statement_item_45', list(p)) - # { PEventStatement*tmp; # PEEvent*etmp = new PEEvent(PEEvent::POSITIVE, p[3]); # tmp = new PEventStatement(etmp); @@ -12510,7 +11773,6 @@ def p_statement_item_46(p): if(parse_debug): print('statement_item_46', list(p)) - # { PEventStatement*tmp = new PEventStatement((PEEvent*)0); # FILE_NAME(tmp,@1); # p[0] = tmp; @@ -12523,7 +11785,6 @@ def p_statement_item_47(p): if(parse_debug): print('statement_item_47', list(p)) - # { PCallTask*tmp = new PCallTask(lex_strings.make(p[1]), *p[3]); # FILE_NAME(tmp,@1); # delete[]p[1]; @@ -12538,7 +11799,6 @@ def p_statement_item_48(p): if(parse_debug): print('statement_item_48', list(p)) - # { listpt; # PCallTask*tmp = new PCallTask(lex_strings.make(p[1]), pt); # FILE_NAME(tmp,@1); @@ -12553,7 +11813,6 @@ def p_statement_item_49(p): if(parse_debug): print('statement_item_49', list(p)) - # { PCallTask*tmp = pform_make_call_task(@1, *p[1], *p[3]); # delete p[1]; # delete p[3]; @@ -12567,7 +11826,6 @@ def p_statement_item_50(p): if(parse_debug): print('statement_item_50', list(p)) - # { /* ....randomize with { } */ # if (p[1] && peek_tail_name(*p[1]) == "randomize") { # if (!gn_system_verilog()) @@ -12591,7 +11849,6 @@ def p_statement_item_51(p): if(parse_debug): print('statement_item_51', list(p)) - # { pform_name_t*t_name = p[1]; # while (! p[3]->empty()) { # t_name->push_back(p[3]->front()); @@ -12612,7 +11869,6 @@ def p_statement_item_52(p): if(parse_debug): print('statement_item_52', list(p)) - # { listpt; # PCallTask*tmp = pform_make_call_task(@1, *p[1], pt); # delete p[1]; @@ -12626,7 +11882,6 @@ def p_statement_item_53(p): if(parse_debug): print('statement_item_53', list(p)) - # { PChainConstructor*tmp = new PChainConstructor(*p[5]); # FILE_NAME(tmp, @3); # delete p[1]; @@ -12640,7 +11895,6 @@ def p_statement_item_54(p): if(parse_debug): print('statement_item_54', list(p)) - # { yyerror(@3, "error: Syntax error in task arguments."); # listpt; # PCallTask*tmp = pform_make_call_task(@1, *p[1], pt); @@ -12655,7 +11909,6 @@ def p_statement_item_55(p): if(parse_debug): print('statement_item_55', list(p)) - # { yyerror(@2, "error: malformed statement"); # yyerrok; # p[0] = new PNoop; @@ -12666,7 +11919,6 @@ def p_statement_item_55(p): def p__embed0_statement_item(p): '''_embed0_statement_item : ''' - # { PBlock*tmp = pform_push_block_scope(0, PBlock::BL_SEQ); # FILE_NAME(tmp, @1); # current_block_stack.push(tmp); @@ -12677,7 +11929,6 @@ def p__embed0_statement_item(p): def p__embed1_statement_item(p): '''_embed1_statement_item : ''' - # { if (p[3]) { # if (! gn_system_verilog()) { # yyerror("error: Variable declaration in unnamed block " @@ -12698,7 +11949,6 @@ def p__embed1_statement_item(p): def p__embed2_statement_item(p): '''_embed2_statement_item : ''' - # { PBlock*tmp = pform_push_block_scope(p[3], PBlock::BL_SEQ); # FILE_NAME(tmp, @1); # current_block_stack.push(tmp); @@ -12709,7 +11959,6 @@ def p__embed2_statement_item(p): def p__embed3_statement_item(p): '''_embed3_statement_item : ''' - # { PBlock*tmp = pform_push_block_scope(0, PBlock::BL_PAR); # FILE_NAME(tmp, @1); # current_block_stack.push(tmp); @@ -12720,7 +11969,6 @@ def p__embed3_statement_item(p): def p__embed4_statement_item(p): '''_embed4_statement_item : ''' - # { if (p[3]) { # if (! gn_system_verilog()) { # yyerror("error: Variable declaration in unnamed block " @@ -12741,7 +11989,6 @@ def p__embed4_statement_item(p): def p__embed5_statement_item(p): '''_embed5_statement_item : ''' - # { PBlock*tmp = pform_push_block_scope(p[3], PBlock::BL_PAR); # FILE_NAME(tmp, @1); # current_block_stack.push(tmp); @@ -12754,7 +12001,6 @@ def p_compressed_statement_1(p): if(parse_debug): print('compressed_statement_1', list(p)) - # { PAssign*tmp = new PAssign(p[1], '+', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12767,7 +12013,6 @@ def p_compressed_statement_2(p): if(parse_debug): print('compressed_statement_2', list(p)) - # { PAssign*tmp = new PAssign(p[1], '-', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12780,7 +12025,6 @@ def p_compressed_statement_3(p): if(parse_debug): print('compressed_statement_3', list(p)) - # { PAssign*tmp = new PAssign(p[1], '*', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12793,7 +12037,6 @@ def p_compressed_statement_4(p): if(parse_debug): print('compressed_statement_4', list(p)) - # { PAssign*tmp = new PAssign(p[1], '/', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12806,7 +12049,6 @@ def p_compressed_statement_5(p): if(parse_debug): print('compressed_statement_5', list(p)) - # { PAssign*tmp = new PAssign(p[1], '%', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12819,7 +12061,6 @@ def p_compressed_statement_6(p): if(parse_debug): print('compressed_statement_6', list(p)) - # { PAssign*tmp = new PAssign(p[1], '&', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12832,7 +12073,6 @@ def p_compressed_statement_7(p): if(parse_debug): print('compressed_statement_7', list(p)) - # { PAssign*tmp = new PAssign(p[1], '|', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12845,7 +12085,6 @@ def p_compressed_statement_8(p): if(parse_debug): print('compressed_statement_8', list(p)) - # { PAssign*tmp = new PAssign(p[1], '^', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12858,7 +12097,6 @@ def p_compressed_statement_9(p): if(parse_debug): print('compressed_statement_9', list(p)) - # { PAssign *tmp = new PAssign(p[1], 'l', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12871,7 +12109,6 @@ def p_compressed_statement_10(p): if(parse_debug): print('compressed_statement_10', list(p)) - # { PAssign*tmp = new PAssign(p[1], 'r', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12884,7 +12121,6 @@ def p_compressed_statement_11(p): if(parse_debug): print('compressed_statement_11', list(p)) - # { PAssign *tmp = new PAssign(p[1], 'R', p[3]); # FILE_NAME(tmp, @1); # p[0] = tmp; @@ -12907,7 +12143,6 @@ def p_statement_or_null_list_opt_2(p): if(parse_debug): print('statement_or_null_list_opt_2', list(p)) - # { p[0] = None } () @@ -12925,6 +12160,7 @@ def p_statement_or_null_list_1(p): tmp.add_statement(p[2]) p[0] = tmp + # { vector*tmp = p[1]; # if (p[2]) tmp->push_back(p[2]); # p[0] = tmp; @@ -12942,7 +12178,6 @@ def p_statement_or_null_list_2(p): tmp.add_statement(p[1]) p[0] = tmp - # { vector*tmp = new vector(0); # if (p[1]) tmp->push_back(p[1]); # p[0] = tmp; @@ -12955,7 +12190,6 @@ def p_analog_statement_1(p): if(parse_debug): print('analog_statement_1', list(p)) - # { p[0] = pform_contribution_statement(@2, p[1], p[3]); } () @@ -12965,7 +12199,6 @@ def p_task_item_1(p): if(parse_debug): print('task_item_1', list(p)) - # { p[0] = new vector(0); } () @@ -12985,7 +12218,6 @@ def p_task_item_list_1(p): if(parse_debug): print('task_item_list_1', list(p)) - # { vector*tmp = p[1]; # size_t s1 = tmp->size(); # tmp->resize(s1 + p[2]->size()); @@ -13022,7 +12254,6 @@ def p_task_item_list_opt_2(p): if(parse_debug): print('task_item_list_opt_2', list(p)) - # { p[0] = None } () @@ -13042,7 +12273,6 @@ def p_tf_port_list_opt_2(p): if(parse_debug): print('tf_port_list_opt_2', list(p)) - # { p[0] = None } () @@ -13052,7 +12282,6 @@ def p_udp_body_1(p): if(parse_debug): print('udp_body_1', list(p)) - # { lex_end_table(); # p[0] = p[2]; # } @@ -13064,7 +12293,6 @@ def p_udp_body_2(p): if(parse_debug): print('udp_body_2', list(p)) - # { lex_end_table(); # yyerror(@1, "error: Empty UDP table."); # p[0] = None @@ -13077,7 +12305,6 @@ def p_udp_body_3(p): if(parse_debug): print('udp_body_3', list(p)) - # { lex_end_table(); # yyerror(@2, "Errors in UDP table"); # yyerrok; @@ -13109,7 +12336,6 @@ def p_udp_comb_entry_1(p): if(parse_debug): print('udp_comb_entry_1', list(p)) - # { char*tmp = new char[strlen(p[1])+3]; # strcpy(tmp, p[1]); # char*tp = tmp+strlen(tmp); @@ -13127,7 +12353,6 @@ def p_udp_comb_entry_list_1(p): if(parse_debug): print('udp_comb_entry_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # delete[]p[1]; @@ -13141,7 +12366,6 @@ def p_udp_comb_entry_list_2(p): if(parse_debug): print('udp_comb_entry_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[2]); # delete[]p[2]; @@ -13155,7 +12379,6 @@ def p_udp_sequ_entry_list_1(p): if(parse_debug): print('udp_sequ_entry_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(p[1]); # delete[]p[1]; @@ -13169,7 +12392,6 @@ def p_udp_sequ_entry_list_2(p): if(parse_debug): print('udp_sequ_entry_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(p[2]); # delete[]p[2]; @@ -13183,7 +12405,6 @@ def p_udp_sequ_entry_1(p): if(parse_debug): print('udp_sequ_entry_1', list(p)) - # { char*tmp = new char[strlen(p[1])+5]; # strcpy(tmp, p[1]); # char*tp = tmp+strlen(tmp); @@ -13202,7 +12423,6 @@ def p_udp_initial_1(p): if(parse_debug): print('udp_initial_1', list(p)) - # { PExpr*etmp = new PENumber(p[4]); # PEIdent*itmp = new PEIdent(lex_strings.make(p[2])); # PAssign*atmp = new PAssign(itmp, etmp); @@ -13228,7 +12448,6 @@ def p_udp_init_opt_2(p): if(parse_debug): print('udp_init_opt_2', list(p)) - # { p[0] = None } () @@ -13238,7 +12457,6 @@ def p_udp_input_list_1(p): if(parse_debug): print('udp_input_list_1', list(p)) - # { char*tmp = new char[2]; # tmp[0] = p[1]; # tmp[1] = 0; @@ -13252,7 +12470,6 @@ def p_udp_input_list_2(p): if(parse_debug): print('udp_input_list_2', list(p)) - # { char*tmp = new char[strlen(p[1])+2]; # strcpy(tmp, p[1]); # char*tp = tmp+strlen(tmp); @@ -13269,7 +12486,6 @@ def p_udp_input_sym_1(p): if(parse_debug): print('udp_input_sym_1', list(p)) - # { p[0] = '0'; } () @@ -13279,7 +12495,6 @@ def p_udp_input_sym_2(p): if(parse_debug): print('udp_input_sym_2', list(p)) - # { p[0] = '1'; } () @@ -13289,7 +12504,6 @@ def p_udp_input_sym_3(p): if(parse_debug): print('udp_input_sym_3', list(p)) - # { p[0] = 'x'; } () @@ -13299,7 +12513,6 @@ def p_udp_input_sym_4(p): if(parse_debug): print('udp_input_sym_4', list(p)) - # { p[0] = '?'; } () @@ -13309,7 +12522,6 @@ def p_udp_input_sym_5(p): if(parse_debug): print('udp_input_sym_5', list(p)) - # { p[0] = 'b'; } () @@ -13319,7 +12531,6 @@ def p_udp_input_sym_6(p): if(parse_debug): print('udp_input_sym_6', list(p)) - # { p[0] = '*'; } () @@ -13329,7 +12540,6 @@ def p_udp_input_sym_7(p): if(parse_debug): print('udp_input_sym_7', list(p)) - # { p[0] = '%'; } () @@ -13339,7 +12549,6 @@ def p_udp_input_sym_8(p): if(parse_debug): print('udp_input_sym_8', list(p)) - # { p[0] = 'f'; } () @@ -13349,7 +12558,6 @@ def p_udp_input_sym_9(p): if(parse_debug): print('udp_input_sym_9', list(p)) - # { p[0] = 'F'; } () @@ -13359,7 +12567,6 @@ def p_udp_input_sym_10(p): if(parse_debug): print('udp_input_sym_10', list(p)) - # { p[0] = 'l'; } () @@ -13369,7 +12576,6 @@ def p_udp_input_sym_11(p): if(parse_debug): print('udp_input_sym_11', list(p)) - # { p[0] = 'h'; } () @@ -13379,7 +12585,6 @@ def p_udp_input_sym_12(p): if(parse_debug): print('udp_input_sym_12', list(p)) - # { p[0] = 'B'; } () @@ -13389,7 +12594,6 @@ def p_udp_input_sym_13(p): if(parse_debug): print('udp_input_sym_13', list(p)) - # { p[0] = 'r'; } () @@ -13399,7 +12603,6 @@ def p_udp_input_sym_14(p): if(parse_debug): print('udp_input_sym_14', list(p)) - # { p[0] = 'R'; } () @@ -13409,7 +12612,6 @@ def p_udp_input_sym_15(p): if(parse_debug): print('udp_input_sym_15', list(p)) - # { p[0] = 'M'; } () @@ -13419,7 +12621,6 @@ def p_udp_input_sym_16(p): if(parse_debug): print('udp_input_sym_16', list(p)) - # { p[0] = 'n'; } () @@ -13429,7 +12630,6 @@ def p_udp_input_sym_17(p): if(parse_debug): print('udp_input_sym_17', list(p)) - # { p[0] = 'N'; } () @@ -13439,7 +12639,6 @@ def p_udp_input_sym_18(p): if(parse_debug): print('udp_input_sym_18', list(p)) - # { p[0] = 'p'; } () @@ -13449,7 +12648,6 @@ def p_udp_input_sym_19(p): if(parse_debug): print('udp_input_sym_19', list(p)) - # { p[0] = 'P'; } () @@ -13459,7 +12657,6 @@ def p_udp_input_sym_20(p): if(parse_debug): print('udp_input_sym_20', list(p)) - # { p[0] = 'Q'; } () @@ -13469,7 +12666,6 @@ def p_udp_input_sym_21(p): if(parse_debug): print('udp_input_sym_21', list(p)) - # { p[0] = 'q'; } () @@ -13479,7 +12675,6 @@ def p_udp_input_sym_22(p): if(parse_debug): print('udp_input_sym_22', list(p)) - # { p[0] = '_'; } () @@ -13489,7 +12684,6 @@ def p_udp_input_sym_23(p): if(parse_debug): print('udp_input_sym_23', list(p)) - # { p[0] = '+'; } () @@ -13499,7 +12693,6 @@ def p_udp_input_sym_24(p): if(parse_debug): print('udp_input_sym_24', list(p)) - # { yyerror(@1, "internal error: Input digits parse as decimal number!"); p[0] = '0'; } () @@ -13509,7 +12702,6 @@ def p_udp_output_sym_1(p): if(parse_debug): print('udp_output_sym_1', list(p)) - # { p[0] = '0'; } () @@ -13519,7 +12711,6 @@ def p_udp_output_sym_2(p): if(parse_debug): print('udp_output_sym_2', list(p)) - # { p[0] = '1'; } () @@ -13529,7 +12720,6 @@ def p_udp_output_sym_3(p): if(parse_debug): print('udp_output_sym_3', list(p)) - # { p[0] = 'x'; } () @@ -13539,7 +12729,6 @@ def p_udp_output_sym_4(p): if(parse_debug): print('udp_output_sym_4', list(p)) - # { p[0] = '-'; } () @@ -13549,7 +12738,6 @@ def p_udp_output_sym_5(p): if(parse_debug): print('udp_output_sym_5', list(p)) - # { yyerror(@1, "internal error: Output digits parse as decimal number!"); p[0] = '0'; } () @@ -13559,7 +12747,6 @@ def p_udp_port_decl_1(p): if(parse_debug): print('udp_port_decl_1', list(p)) - # { p[0] = pform_make_udp_input_ports(p[2]); } () @@ -13569,7 +12756,6 @@ def p_udp_port_decl_2(p): if(parse_debug): print('udp_port_decl_2', list(p)) - # { perm_string pname = lex_strings.make(p[2]); # PWire*pp = new PWire(pname, NetNet::IMPLICIT, NetNet::POUTPUT, IVL_VT_LOGIC); # vector*tmp = new vector(1); @@ -13585,7 +12771,6 @@ def p_udp_port_decl_3(p): if(parse_debug): print('udp_port_decl_3', list(p)) - # { perm_string pname = lex_strings.make(p[2]); # PWire*pp = new PWire(pname, NetNet::REG, NetNet::PIMPLICIT, IVL_VT_LOGIC); # vector*tmp = new vector(1); @@ -13601,7 +12786,6 @@ def p_udp_port_decl_4(p): if(parse_debug): print('udp_port_decl_4', list(p)) - # { perm_string pname = lex_strings.make(p[3]); # PWire*pp = new PWire(pname, NetNet::REG, NetNet::POUTPUT, IVL_VT_LOGIC); # vector*tmp = new vector(1); @@ -13627,7 +12811,6 @@ def p_udp_port_decls_2(p): if(parse_debug): print('udp_port_decls_2', list(p)) - # { vector*tmp = p[1]; # size_t s1 = p[1]->size(); # tmp->resize(s1+p[2]->size()); @@ -13644,7 +12827,6 @@ def p_udp_port_list_1(p): if(parse_debug): print('udp_port_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[1])); # delete[]p[1]; @@ -13658,7 +12840,6 @@ def p_udp_port_list_2(p): if(parse_debug): print('udp_port_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[3])); # delete[]p[3]; @@ -13702,7 +12883,6 @@ def p_udp_initial_expr_opt_2(p): if(parse_debug): print('udp_initial_expr_opt_2', list(p)) - # { p[0] = None } () @@ -13712,7 +12892,6 @@ def p_udp_input_declaration_list_1(p): if(parse_debug): print('udp_input_declaration_list_1', list(p)) - # { list*tmp = new list; # tmp->push_back(lex_strings.make(p[2])); # p[0] = tmp; @@ -13726,7 +12905,6 @@ def p_udp_input_declaration_list_2(p): if(parse_debug): print('udp_input_declaration_list_2', list(p)) - # { list*tmp = p[1]; # tmp->push_back(lex_strings.make(p[4])); # p[0] = tmp; @@ -13740,7 +12918,6 @@ def p_udp_primitive_1(p): if(parse_debug): print('udp_primitive_1', list(p)) - # { perm_string tmp2 = lex_strings.make(p[2]); # pform_make_udp(tmp2, p[4], p[7], p[9], p[8], # @2.text, @2.first_line); @@ -13765,7 +12942,6 @@ def p_udp_primitive_2(p): if(parse_debug): print('udp_primitive_2', list(p)) - # { perm_string tmp2 = lex_strings.make(p[2]); # perm_string tmp6 = lex_strings.make(p[6]); # pform_make_udp(tmp2, p[5], tmp6, p[7], p[9], p[12],