def p_assignment_pattern_1(p):
'''assignment_pattern : K_LP expression_list_proper '}' '''
print('assignment_pattern_1', list(p))
def p_assignment_pattern_1(p):
'''assignment_pattern : K_LP expression_list_proper '}' '''
print('assignment_pattern_1', list(p))
print('assignment_pattern_2', list(p))
# { PEAssignPattern*tmp = new PEAssignPattern;
# FILE_NAME(tmp, @1);
print('assignment_pattern_2', list(p))
# { PEAssignPattern*tmp = new PEAssignPattern;
# FILE_NAME(tmp, @1);
'''class_declaration : K_virtual_opt K_class lifetime_opt class_identifier class_declaration_extends_opt ';' _embed0_class_declaration class_items_opt K_endclass _embed1_class_declaration class_declaration_endlabel_opt '''
print('class_declaration_1', list(p))
# { // Wrap up the class.
'''class_declaration : K_virtual_opt K_class lifetime_opt class_identifier class_declaration_extends_opt ';' _embed0_class_declaration class_items_opt K_endclass _embed1_class_declaration class_declaration_endlabel_opt '''
print('class_declaration_1', list(p))
# { // Wrap up the class.
- # { pform_start_class_declaration(@2, $4, $5.type, $5.exprs, $3); }
+ # { pform_start_class_declaration(@2, p[4], p[5].type, p[5].exprs, p[3]); }
print('class_identifier_1', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
print('class_identifier_1', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @1);
# pform_set_typedef(name, tmp, NULL);
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @1);
# pform_set_typedef(name, tmp, NULL);
# }
()
def p_class_identifier_2(p):
'''class_identifier : TYPE_IDENTIFIER '''
print('class_identifier_2', list(p))
# }
()
def p_class_identifier_2(p):
'''class_identifier : TYPE_IDENTIFIER '''
print('class_identifier_2', list(p))
# }
()
def p_class_declaration_endlabel_opt_1(p):
'''class_declaration_endlabel_opt : ':' TYPE_IDENTIFIER '''
print('class_declaration_endlabel_opt_1', list(p))
# }
()
def p_class_declaration_endlabel_opt_1(p):
'''class_declaration_endlabel_opt : ':' TYPE_IDENTIFIER '''
print('class_declaration_endlabel_opt_1', list(p))
def p_class_declaration_extends_opt_1(p):
'''class_declaration_extends_opt : K_extends TYPE_IDENTIFIER '''
print('class_declaration_extends_opt_1', list(p))
def p_class_declaration_extends_opt_1(p):
'''class_declaration_extends_opt : K_extends TYPE_IDENTIFIER '''
print('class_declaration_extends_opt_1', list(p))
# }
()
def p_class_declaration_extends_opt_2(p):
'''class_declaration_extends_opt : K_extends TYPE_IDENTIFIER '(' expression_list_with_nuls ')' '''
print('class_declaration_extends_opt_2', list(p))
# }
()
def p_class_declaration_extends_opt_2(p):
'''class_declaration_extends_opt : K_extends TYPE_IDENTIFIER '(' expression_list_with_nuls ')' '''
print('class_declaration_extends_opt_2', list(p))
# }
()
def p_class_declaration_extends_opt_3(p):
'''class_declaration_extends_opt : '''
print('class_declaration_extends_opt_3', list(p))
# }
()
def p_class_declaration_extends_opt_3(p):
'''class_declaration_extends_opt : '''
print('class_declaration_extends_opt_3', list(p))
def p_class_item_1(p):
'''class_item : method_qualifier_opt K_function K_new _embed0_class_item '(' tf_port_list_opt ')' ';' function_item_list_opt statement_or_null_list_opt K_endfunction endnew_opt '''
print('class_item_1', list(p))
def p_class_item_1(p):
'''class_item : method_qualifier_opt K_function K_new _embed0_class_item '(' tf_port_list_opt ')' ';' function_item_list_opt statement_or_null_list_opt K_endfunction endnew_opt '''
print('class_item_1', list(p))
# pform_set_constructor_return(current_function);
# pform_set_this_class(@3, current_function);
# pform_set_constructor_return(current_function);
# pform_set_this_class(@3, current_function);
def p_class_item_2(p):
'''class_item : property_qualifier_opt data_type list_of_variable_decl_assignments ';' '''
print('class_item_2', list(p))
def p_class_item_2(p):
'''class_item : property_qualifier_opt data_type list_of_variable_decl_assignments ';' '''
print('class_item_2', list(p))
- # { pform_class_property(@2, $1, $2, $3); }
+ # { pform_class_property(@2, p[1], p[2], p[3]); }
()
def p_class_item_3(p):
'''class_item : K_const class_item_qualifier_opt data_type list_of_variable_decl_assignments ';' '''
print('class_item_3', list(p))
()
def p_class_item_3(p):
'''class_item : K_const class_item_qualifier_opt data_type list_of_variable_decl_assignments ';' '''
print('class_item_3', list(p))
- # { pform_class_property(@1, $2 | property_qualifier_t::make_const(), $3, $4); }
+ # { pform_class_property(@1, p[2] | property_qualifier_t::make_const(), p[3], p[4]); }
'''class_item : K_extern method_qualifier_opt K_function data_type_or_implicit_or_void IDENTIFIER ';' '''
print('class_item_8', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
'''class_item : K_extern method_qualifier_opt K_function data_type_or_implicit_or_void IDENTIFIER ';' '''
print('class_item_8', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_9(p):
'''class_item : K_extern method_qualifier_opt K_function data_type_or_implicit_or_void IDENTIFIER '(' tf_port_list_opt ')' ';' '''
print('class_item_9', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_9(p):
'''class_item : K_extern method_qualifier_opt K_function data_type_or_implicit_or_void IDENTIFIER '(' tf_port_list_opt ')' ';' '''
print('class_item_9', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_10(p):
'''class_item : K_extern method_qualifier_opt K_task IDENTIFIER ';' '''
print('class_item_10', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_10(p):
'''class_item : K_extern method_qualifier_opt K_task IDENTIFIER ';' '''
print('class_item_10', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_11(p):
'''class_item : K_extern method_qualifier_opt K_task IDENTIFIER '(' tf_port_list_opt ')' ';' '''
print('class_item_11', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
# }
()
def p_class_item_11(p):
'''class_item : K_extern method_qualifier_opt K_task IDENTIFIER '(' tf_port_list_opt ')' ';' '''
print('class_item_11', list(p))
# { yyerror(@1, "sorry: External methods are not yet supported.");
def p_class_item_14(p):
'''class_item : property_qualifier_opt IDENTIFIER error ';' '''
print('class_item_14', list(p))
def p_class_item_14(p):
'''class_item : property_qualifier_opt IDENTIFIER error ';' '''
print('class_item_14', list(p))
def p_class_item_qualifier_1(p):
'''class_item_qualifier : K_static '''
print('class_item_qualifier_1', list(p))
def p_class_item_qualifier_1(p):
'''class_item_qualifier : K_static '''
print('class_item_qualifier_1', list(p))
()
def p_class_item_qualifier_2(p):
'''class_item_qualifier : K_protected '''
print('class_item_qualifier_2', list(p))
()
def p_class_item_qualifier_2(p):
'''class_item_qualifier : K_protected '''
print('class_item_qualifier_2', list(p))
()
def p_class_item_qualifier_3(p):
'''class_item_qualifier : K_local '''
print('class_item_qualifier_3', list(p))
()
def p_class_item_qualifier_3(p):
'''class_item_qualifier : K_local '''
print('class_item_qualifier_3', list(p))
()
def p_class_item_qualifier_list_1(p):
'''class_item_qualifier_list : class_item_qualifier_list class_item_qualifier '''
print('class_item_qualifier_list_1', list(p))
()
def p_class_item_qualifier_list_1(p):
'''class_item_qualifier_list : class_item_qualifier_list class_item_qualifier '''
print('class_item_qualifier_list_1', list(p))
def p_class_item_qualifier_opt_2(p):
'''class_item_qualifier_opt : '''
print('class_item_qualifier_opt_2', list(p))
def p_class_item_qualifier_opt_2(p):
'''class_item_qualifier_opt : '''
print('class_item_qualifier_opt_2', list(p))
()
def p_class_new_1(p):
'''class_new : K_new '(' expression_list_with_nuls ')' '''
print('class_new_1', list(p))
()
def p_class_new_1(p):
'''class_new : K_new '(' expression_list_with_nuls ')' '''
print('class_new_1', list(p))
# }
()
def p_class_new_2(p):
'''class_new : K_new hierarchy_identifier '''
print('class_new_2', list(p))
# }
()
def p_class_new_2(p):
'''class_new : K_new hierarchy_identifier '''
print('class_new_2', list(p))
print('class_new_3', list(p))
# { PENewClass*tmp = new PENewClass;
# FILE_NAME(tmp, @1);
print('class_new_3', list(p))
# { PENewClass*tmp = new PENewClass;
# FILE_NAME(tmp, @1);
def p_data_declaration_1(p):
'''data_declaration : attribute_list_opt data_type_or_implicit list_of_variable_decl_assignments ';' '''
print('data_declaration_1', list(p))
def p_data_declaration_1(p):
'''data_declaration : attribute_list_opt data_type_or_implicit list_of_variable_decl_assignments ';' '''
print('data_declaration_1', list(p))
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
- # pform_makewire(@2, 0, str_strength, $3, NetNet::IMPLICIT_REG, data_type);
+ # pform_makewire(@2, 0, str_strength, p[3], NetNet::IMPLICIT_REG, data_type);
# }
()
def p_data_type_2(p):
'''data_type : non_integer_type '''
print('data_type_2', list(p))
p[0] = p[1]
# }
()
def p_data_type_2(p):
'''data_type : non_integer_type '''
print('data_type_2', list(p))
p[0] = p[1]
# }
()
def p_data_type_3(p):
'''data_type : struct_data_type '''
print('data_type_3', list(p))
p[0] = p[1]
# }
()
def p_data_type_3(p):
'''data_type : struct_data_type '''
print('data_type_3', list(p))
p[0] = p[1]
def p_data_type_5(p):
'''data_type : atom2_type signed_unsigned_opt '''
print('data_type_5', list(p))
def p_data_type_5(p):
'''data_type : atom2_type signed_unsigned_opt '''
print('data_type_5', list(p))
# }
()
def p_data_type_6(p):
'''data_type : K_integer signed_unsigned_opt '''
print('data_type_6', list(p))
# { list<pform_range_t>*pd = make_range_from_width(integer_width);
# }
()
def p_data_type_6(p):
'''data_type : K_integer signed_unsigned_opt '''
print('data_type_6', list(p))
# { list<pform_range_t>*pd = make_range_from_width(integer_width);
# { list<pform_range_t>*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();
# { list<pform_range_t>*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();
# }
()
def p_data_type_8(p):
'''data_type : TYPE_IDENTIFIER dimensions_opt '''
print('data_type_8', list(p))
# }
()
def p_data_type_8(p):
'''data_type : TYPE_IDENTIFIER dimensions_opt '''
print('data_type_8', list(p))
# }
()
def p_data_type_9(p):
'''data_type : PACKAGE_IDENTIFIER K_SCOPE_RES _embed0_data_type TYPE_IDENTIFIER '''
print('data_type_9', list(p))
# { lex_in_package_scope(0);
# }
()
def p_data_type_9(p):
'''data_type : PACKAGE_IDENTIFIER K_SCOPE_RES _embed0_data_type TYPE_IDENTIFIER '''
print('data_type_9', list(p))
# { lex_in_package_scope(0);
print('data_type_10', list(p))
# { string_type_t*tmp = new string_type_t;
# FILE_NAME(tmp, @1);
print('data_type_10', list(p))
# { string_type_t*tmp = new string_type_t;
# FILE_NAME(tmp, @1);
def p_data_type_or_implicit_2(p):
'''data_type_or_implicit : signing dimensions_opt '''
print('data_type_or_implicit_2', list(p))
def p_data_type_or_implicit_2(p):
'''data_type_or_implicit : signing dimensions_opt '''
print('data_type_or_implicit_2', list(p))
# }
()
def p_data_type_or_implicit_3(p):
'''data_type_or_implicit : dimensions '''
print('data_type_or_implicit_3', list(p))
# }
()
def p_data_type_or_implicit_3(p):
'''data_type_or_implicit : dimensions '''
print('data_type_or_implicit_3', list(p))
print('data_type_or_implicit_or_void_2', list(p))
# { void_type_t*tmp = new void_type_t;
# FILE_NAME(tmp, @1);
print('data_type_or_implicit_or_void_2', list(p))
# { void_type_t*tmp = new void_type_t;
# FILE_NAME(tmp, @1);
def p_description_8(p):
'''description : KK_attribute '(' IDENTIFIER ',' STRING ',' STRING ')' '''
print('description_8', list(p))
def p_description_8(p):
'''description : KK_attribute '(' IDENTIFIER ',' STRING ',' STRING ')' '''
print('description_8', list(p))
- # { perm_string tmp3 = lex_strings.make($3);
- # pform_set_type_attrib(tmp3, $5, $7);
- # delete[] $3;
- # delete[] $5;
+ # { perm_string tmp3 = lex_strings.make(p[3]);
+ # pform_set_type_attrib(tmp3, p[5], p[7]);
+ # delete[] p[3];
+ # delete[] p[5];
def p_dynamic_array_new_1(p):
'''dynamic_array_new : K_new '[' expression ']' '''
print('dynamic_array_new_1', list(p))
def p_dynamic_array_new_1(p):
'''dynamic_array_new : K_new '[' expression ']' '''
print('dynamic_array_new_1', list(p))
# }
()
def p_dynamic_array_new_2(p):
'''dynamic_array_new : K_new '[' expression ']' '(' expression ')' '''
print('dynamic_array_new_2', list(p))
# }
()
def p_dynamic_array_new_2(p):
'''dynamic_array_new : K_new '[' expression ']' '(' expression ')' '''
print('dynamic_array_new_2', list(p))
# }
()
def p_for_step_1(p):
'''for_step : lpvalue '=' expression '''
print('for_step_1', list(p))
# }
()
def p_for_step_1(p):
'''for_step : lpvalue '=' expression '''
print('for_step_1', list(p))
# }
()
def p_for_step_2(p):
'''for_step : inc_or_dec_expression '''
print('for_step_2', list(p))
# }
()
def p_for_step_2(p):
'''for_step : inc_or_dec_expression '''
print('for_step_2', list(p))
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER ';' _embed0_function_declaration function_item_list statement_or_null_list_opt K_endfunction _embed1_function_declaration endlabel_opt '''
print('function_declaration_1', list(p))
# { // Last step: check any closing name.
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER ';' _embed0_function_declaration function_item_list statement_or_null_list_opt K_endfunction _embed1_function_declaration endlabel_opt '''
print('function_declaration_1', list(p))
# { // Last step: check any closing name.
# }
()
def p_function_declaration_2(p):
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER _embed2_function_declaration '(' tf_port_list_opt ')' ';' block_item_decls_opt statement_or_null_list_opt K_endfunction _embed3_function_declaration endlabel_opt '''
print('function_declaration_2', list(p))
# { // Last step: check any closing name.
# }
()
def p_function_declaration_2(p):
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER _embed2_function_declaration '(' tf_port_list_opt ')' ';' block_item_decls_opt statement_or_null_list_opt K_endfunction _embed3_function_declaration endlabel_opt '''
print('function_declaration_2', list(p))
# { // Last step: check any closing name.
# }
()
def p_function_declaration_3(p):
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER error K_endfunction _embed4_function_declaration endlabel_opt '''
print('function_declaration_3', list(p))
# { // Last step: check any closing name.
# }
()
def p_function_declaration_3(p):
'''function_declaration : K_function lifetime_opt data_type_or_implicit_or_void IDENTIFIER error K_endfunction _embed4_function_declaration endlabel_opt '''
print('function_declaration_3', list(p))
# { // Last step: check any closing name.
# yyerror(@8, "error: End label doesn't match function name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Function end labels require "
# "SystemVerilog.");
# }
# yyerror(@8, "error: End label doesn't match function name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Function end labels require "
# "SystemVerilog.");
# }
# }
()
def p__embed0_function_declaration(p):
'''_embed0_function_declaration : '''
# { assert(current_function == 0);
# }
()
def p__embed0_function_declaration(p):
'''_embed0_function_declaration : '''
# { assert(current_function == 0);
- # { current_function->set_ports($7);
- # current_function->set_return($3);
- # current_function_set_statement($8? @8 : @4, $8);
+ # { current_function->set_ports(p[7]);
+ # current_function->set_return(p[3]);
+ # current_function_set_statement(p[8]? @8 : @4, p[8]);
def p__embed2_function_declaration(p):
'''_embed2_function_declaration : '''
# { assert(current_function == 0);
def p__embed2_function_declaration(p):
'''_embed2_function_declaration : '''
# { assert(current_function == 0);
- # { current_function->set_ports($7);
- # current_function->set_return($3);
- # current_function_set_statement($11? @11 : @4, $11);
+ # { current_function->set_ports(p[7]);
+ # current_function->set_return(p[3]);
+ # current_function_set_statement(p[11]? @11 : @4, p[11]);
def p_implicit_class_handle_1(p):
'''implicit_class_handle : K_this '''
print('implicit_class_handle_1', list(p))
def p_implicit_class_handle_1(p):
'''implicit_class_handle : K_this '''
print('implicit_class_handle_1', list(p))
()
def p_implicit_class_handle_2(p):
'''implicit_class_handle : K_super '''
print('implicit_class_handle_2', list(p))
()
def p_implicit_class_handle_2(p):
'''implicit_class_handle : K_super '''
print('implicit_class_handle_2', list(p))
()
def p_inc_or_dec_expression_1(p):
'''inc_or_dec_expression : K_INCR lpvalue %prec UNARY_PREC '''
print('inc_or_dec_expression_1', list(p))
()
def p_inc_or_dec_expression_1(p):
'''inc_or_dec_expression : K_INCR lpvalue %prec UNARY_PREC '''
print('inc_or_dec_expression_1', list(p))
# }
()
def p_inc_or_dec_expression_2(p):
'''inc_or_dec_expression : lpvalue K_INCR %prec UNARY_PREC '''
print('inc_or_dec_expression_2', list(p))
# }
()
def p_inc_or_dec_expression_2(p):
'''inc_or_dec_expression : lpvalue K_INCR %prec UNARY_PREC '''
print('inc_or_dec_expression_2', list(p))
# }
()
def p_inc_or_dec_expression_3(p):
'''inc_or_dec_expression : K_DECR lpvalue %prec UNARY_PREC '''
print('inc_or_dec_expression_3', list(p))
# }
()
def p_inc_or_dec_expression_3(p):
'''inc_or_dec_expression : K_DECR lpvalue %prec UNARY_PREC '''
print('inc_or_dec_expression_3', list(p))
# }
()
def p_inc_or_dec_expression_4(p):
'''inc_or_dec_expression : lpvalue K_DECR %prec UNARY_PREC '''
print('inc_or_dec_expression_4', list(p))
# }
()
def p_inc_or_dec_expression_4(p):
'''inc_or_dec_expression : lpvalue K_DECR %prec UNARY_PREC '''
print('inc_or_dec_expression_4', list(p))
def p_integer_vector_type_4(p):
'''integer_vector_type : K_bool '''
print('integer_vector_type_4', list(p))
def p_integer_vector_type_4(p):
'''integer_vector_type : K_bool '''
print('integer_vector_type_4', list(p))
()
def p_join_keyword_1(p):
'''join_keyword : K_join '''
print('join_keyword_1', list(p))
()
def p_join_keyword_1(p):
'''join_keyword : K_join '''
print('join_keyword_1', list(p))
()
def p_join_keyword_2(p):
'''join_keyword : K_join_none '''
print('join_keyword_2', list(p))
()
def p_join_keyword_2(p):
'''join_keyword : K_join_none '''
print('join_keyword_2', list(p))
()
def p_join_keyword_3(p):
'''join_keyword : K_join_any '''
print('join_keyword_3', list(p))
()
def p_join_keyword_3(p):
'''join_keyword : K_join_any '''
print('join_keyword_3', list(p))
print('jump_statement_2', list(p))
# { PReturn*tmp = new PReturn(0);
# FILE_NAME(tmp, @1);
print('jump_statement_2', list(p))
# { PReturn*tmp = new PReturn(0);
# FILE_NAME(tmp, @1);
# }
()
def p_jump_statement_3(p):
'''jump_statement : K_return expression ';' '''
print('jump_statement_3', list(p))
# }
()
def p_jump_statement_3(p):
'''jump_statement : K_return expression ';' '''
print('jump_statement_3', list(p))
# }
()
def p_lifetime_1(p):
'''lifetime : K_automatic '''
print('lifetime_1', list(p))
# }
()
def p_lifetime_1(p):
'''lifetime : K_automatic '''
print('lifetime_1', list(p))
()
def p_lifetime_2(p):
'''lifetime : K_static '''
print('lifetime_2', list(p))
()
def p_lifetime_2(p):
'''lifetime : K_static '''
print('lifetime_2', list(p))
()
def p_loop_statement_1(p):
'''loop_statement : K_for '(' lpvalue '=' expression ';' expression ';' for_step ')' statement_or_null '''
print('loop_statement_1', list(p))
()
def p_loop_statement_1(p):
'''loop_statement : K_for '(' lpvalue '=' expression ';' expression ';' for_step ')' statement_or_null '''
print('loop_statement_1', list(p))
- # { PForStatement*tmp = new PForStatement($3, $5, $7, $9, $11);
+ # { PForStatement*tmp = new PForStatement(p[3], p[5], p[7], p[9], p[11]);
# }
()
def p_loop_statement_2(p):
'''loop_statement : K_for '(' data_type IDENTIFIER '=' expression ';' expression ';' for_step ')' _embed0_loop_statement statement_or_null '''
print('loop_statement_2', list(p))
# { pform_name_t tmp_hident;
# }
()
def p_loop_statement_2(p):
'''loop_statement : K_for '(' data_type IDENTIFIER '=' expression ';' expression ';' for_step ')' _embed0_loop_statement statement_or_null '''
print('loop_statement_2', list(p))
# { pform_name_t tmp_hident;
#
# PEIdent*tmp_ident = pform_new_ident(tmp_hident);
# FILE_NAME(tmp_ident, @4);
#
#
# PEIdent*tmp_ident = pform_new_ident(tmp_hident);
# FILE_NAME(tmp_ident, @4);
#
- # PForStatement*tmp_for = new PForStatement(tmp_ident, $6, $8, $10, $13);
+ # PForStatement*tmp_for = new PForStatement(tmp_ident, p[6], p[8], p[10], p[13]);
# PBlock*tmp_blk = current_block_stack.top();
# current_block_stack.pop();
# tmp_blk->set_statement(tmp_for_list);
# PBlock*tmp_blk = current_block_stack.top();
# current_block_stack.pop();
# tmp_blk->set_statement(tmp_for_list);
# }
()
def p_loop_statement_3(p):
'''loop_statement : K_forever statement_or_null '''
print('loop_statement_3', list(p))
# }
()
def p_loop_statement_3(p):
'''loop_statement : K_forever statement_or_null '''
print('loop_statement_3', list(p))
# }
()
def p_loop_statement_4(p):
'''loop_statement : K_repeat '(' expression ')' statement_or_null '''
print('loop_statement_4', list(p))
# }
()
def p_loop_statement_4(p):
'''loop_statement : K_repeat '(' expression ')' statement_or_null '''
print('loop_statement_4', list(p))
# }
()
def p_loop_statement_5(p):
'''loop_statement : K_while '(' expression ')' statement_or_null '''
print('loop_statement_5', list(p))
# }
()
def p_loop_statement_5(p):
'''loop_statement : K_while '(' expression ')' statement_or_null '''
print('loop_statement_5', list(p))
# }
()
def p_loop_statement_6(p):
'''loop_statement : K_do statement_or_null K_while '(' expression ')' ';' '''
print('loop_statement_6', list(p))
# }
()
def p_loop_statement_6(p):
'''loop_statement : K_do statement_or_null K_while '(' expression ')' ';' '''
print('loop_statement_6', list(p))
# }
()
def p_loop_statement_7(p):
'''loop_statement : K_foreach '(' IDENTIFIER '[' loop_variables ']' ')' _embed1_loop_statement statement_or_null '''
print('loop_statement_7', list(p))
# }
()
def p_loop_statement_7(p):
'''loop_statement : K_foreach '(' IDENTIFIER '[' loop_variables ']' ')' _embed1_loop_statement statement_or_null '''
print('loop_statement_7', list(p))
- # { PForeach*tmp_for = pform_make_foreach(@1, $3, $5, $9);
+ # { PForeach*tmp_for = pform_make_foreach(@1, p[3], p[5], p[9]);
# PBlock*tmp_blk = current_block_stack.top();
# current_block_stack.pop();
# tmp_blk->set_statement(tmp_for_list);
# PBlock*tmp_blk = current_block_stack.top();
# current_block_stack.pop();
# tmp_blk->set_statement(tmp_for_list);
- # pform_makewire(@4, 0, str_strength, &assign_list, NetNet::REG, $3);
+ # pform_makewire(@4, 0, str_strength, &assign_list, NetNet::REG, p[3]);
# }
()
def p_list_of_variable_decl_assignments_1(p):
'''list_of_variable_decl_assignments : variable_decl_assignment '''
print('list_of_variable_decl_assignments_1', list(p))
# { list<decl_assignment_t*>*tmp = new list<decl_assignment_t*>;
# }
()
def p_list_of_variable_decl_assignments_1(p):
'''list_of_variable_decl_assignments : variable_decl_assignment '''
print('list_of_variable_decl_assignments_1', list(p))
# { list<decl_assignment_t*>*tmp = new list<decl_assignment_t*>;
# }
()
def p_list_of_variable_decl_assignments_2(p):
'''list_of_variable_decl_assignments : list_of_variable_decl_assignments ',' variable_decl_assignment '''
print('list_of_variable_decl_assignments_2', list(p))
# }
()
def p_list_of_variable_decl_assignments_2(p):
'''list_of_variable_decl_assignments : list_of_variable_decl_assignments ',' variable_decl_assignment '''
print('list_of_variable_decl_assignments_2', list(p))
# }
()
def p_variable_decl_assignment_1(p):
'''variable_decl_assignment : IDENTIFIER dimensions_opt '''
print('variable_decl_assignment_1', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_variable_decl_assignment_1(p):
'''variable_decl_assignment : IDENTIFIER dimensions_opt '''
print('variable_decl_assignment_1', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_variable_decl_assignment_2(p):
'''variable_decl_assignment : IDENTIFIER '=' expression '''
print('variable_decl_assignment_2', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_variable_decl_assignment_2(p):
'''variable_decl_assignment : IDENTIFIER '=' expression '''
print('variable_decl_assignment_2', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_variable_decl_assignment_3(p):
'''variable_decl_assignment : IDENTIFIER '=' K_new '(' ')' '''
print('variable_decl_assignment_3', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_variable_decl_assignment_3(p):
'''variable_decl_assignment : IDENTIFIER '=' K_new '(' ')' '''
print('variable_decl_assignment_3', list(p))
# { decl_assignment_t*tmp = new decl_assignment_t;
# }
()
def p_loop_variables_1(p):
'''loop_variables : loop_variables ',' IDENTIFIER '''
print('loop_variables_1', list(p))
# }
()
def p_loop_variables_1(p):
'''loop_variables : loop_variables ',' IDENTIFIER '''
print('loop_variables_1', list(p))
# }
()
def p_loop_variables_2(p):
'''loop_variables : IDENTIFIER '''
print('loop_variables_2', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_loop_variables_2(p):
'''loop_variables : IDENTIFIER '''
print('loop_variables_2', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
print('modport_ports_list_3', list(p))
# { if (last_modport_port.type == MP_SIMPLE) {
# pform_add_modport_port(@3, last_modport_port.direction,
print('modport_ports_list_3', list(p))
# { if (last_modport_port.type == MP_SIMPLE) {
# pform_add_modport_port(@3, last_modport_port.direction,
print('modport_ports_list_5', list(p))
# { if (last_modport_port.type == MP_SIMPLE) {
# pform_add_modport_port(@3, last_modport_port.direction,
print('modport_ports_list_5', list(p))
# { if (last_modport_port.type == MP_SIMPLE) {
# pform_add_modport_port(@3, last_modport_port.direction,
# } else if (last_modport_port.type != MP_TF) {
# yyerror(@3, "error: list of identifiers not allowed here.");
# }
# } else if (last_modport_port.type != MP_TF) {
# yyerror(@3, "error: list of identifiers not allowed here.");
# }
'''modport_ports_declaration : attribute_list_opt port_direction IDENTIFIER '''
print('modport_ports_declaration_1', list(p))
# { last_modport_port.type = MP_SIMPLE;
'''modport_ports_declaration : attribute_list_opt port_direction IDENTIFIER '''
print('modport_ports_declaration_1', list(p))
# { last_modport_port.type = MP_SIMPLE;
- # last_modport_port.direction = $2;
- # pform_add_modport_port(@3, $2, lex_strings.make($3), 0);
- # delete[] $3;
- # delete $1;
+ # last_modport_port.direction = p[2];
+ # pform_add_modport_port(@3, p[2], lex_strings.make(p[3]), 0);
+ # delete[] p[3];
+ # delete p[1];
# }
()
def p_modport_ports_declaration_2(p):
'''modport_ports_declaration : attribute_list_opt port_direction modport_simple_port '''
print('modport_ports_declaration_2', list(p))
# { last_modport_port.type = MP_SIMPLE;
# }
()
def p_modport_ports_declaration_2(p):
'''modport_ports_declaration : attribute_list_opt port_direction modport_simple_port '''
print('modport_ports_declaration_2', list(p))
# { last_modport_port.type = MP_SIMPLE;
- # last_modport_port.direction = $2;
- # pform_add_modport_port(@3, $2, $3->name, $3->parm);
- # delete $3;
- # delete $1;
+ # last_modport_port.direction = p[2];
+ # pform_add_modport_port(@3, p[2], p[3]->name, p[3]->parm);
+ # delete p[3];
+ # delete p[1];
# }
()
def p_modport_ports_declaration_3(p):
'''modport_ports_declaration : attribute_list_opt import_export IDENTIFIER '''
print('modport_ports_declaration_3', list(p))
# { last_modport_port.type = MP_TF;
# }
()
def p_modport_ports_declaration_3(p):
'''modport_ports_declaration : attribute_list_opt import_export IDENTIFIER '''
print('modport_ports_declaration_3', list(p))
# { last_modport_port.type = MP_TF;
# }
()
def p_modport_ports_declaration_4(p):
'''modport_ports_declaration : attribute_list_opt import_export modport_tf_port '''
print('modport_ports_declaration_4', list(p))
# { last_modport_port.type = MP_TF;
# }
()
def p_modport_ports_declaration_4(p):
'''modport_ports_declaration : attribute_list_opt import_export modport_tf_port '''
print('modport_ports_declaration_4', list(p))
# { last_modport_port.type = MP_TF;
# { last_modport_port.type = MP_CLOCKING;
# last_modport_port.direction = NetNet::NOT_A_PORT;
# yyerror(@3, "sorry: modport clocking declaration is not yet supported.");
# { last_modport_port.type = MP_CLOCKING;
# last_modport_port.direction = NetNet::NOT_A_PORT;
# yyerror(@3, "sorry: modport clocking declaration is not yet supported.");
# }
()
def p_modport_simple_port_1(p):
'''modport_simple_port : '.' IDENTIFIER '(' expression ')' '''
print('modport_simple_port_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_modport_simple_port_1(p):
'''modport_simple_port : '.' IDENTIFIER '(' expression ')' '''
print('modport_simple_port_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
def p_non_integer_type_1(p):
'''non_integer_type : K_real '''
print('non_integer_type_1', list(p))
def p_non_integer_type_1(p):
'''non_integer_type : K_real '''
print('non_integer_type_1', list(p))
()
def p_non_integer_type_2(p):
'''non_integer_type : K_realtime '''
print('non_integer_type_2', list(p))
()
def p_non_integer_type_2(p):
'''non_integer_type : K_realtime '''
print('non_integer_type_2', list(p))
()
def p_non_integer_type_3(p):
'''non_integer_type : K_shortreal '''
print('non_integer_type_3', list(p))
()
def p_non_integer_type_3(p):
'''non_integer_type : K_shortreal '''
print('non_integer_type_3', list(p))
()
def p_number_1(p):
'''number : BASED_NUMBER '''
print('number_1', list(p))
()
def p_number_1(p):
'''number : BASED_NUMBER '''
print('number_1', list(p))
()
def p_number_2(p):
'''number : DEC_NUMBER '''
print('number_2', list(p))
num = Leaf(token.NUMBER, "%s" % (p[1]))
p[0] = num
()
def p_number_2(p):
'''number : DEC_NUMBER '''
print('number_2', list(p))
num = Leaf(token.NUMBER, "%s" % (p[1]))
p[0] = num
()
def p_number_3(p):
'''number : DEC_NUMBER BASED_NUMBER '''
print('number_3', list(p))
num = Leaf(token.NUMBER, "%s:%s" % (p[1], p[2]))
p[0] = num
()
def p_number_3(p):
'''number : DEC_NUMBER BASED_NUMBER '''
print('number_3', list(p))
num = Leaf(token.NUMBER, "%s:%s" % (p[1], p[2]))
p[0] = num
- # { $$ = pform_verinum_with_size($1,$2, @2.text, @2.first_line);
+ # { p[0] = pform_verinum_with_size(p[1],p[2], @2.text, @2.first_line);
# based_size = 0; }
()
def p_number_4(p):
'''number : UNBASED_NUMBER '''
print('number_4', list(p))
# based_size = 0; }
()
def p_number_4(p):
'''number : UNBASED_NUMBER '''
print('number_4', list(p))
()
def p_number_5(p):
'''number : DEC_NUMBER UNBASED_NUMBER '''
print('number_5', list(p))
# { yyerror(@1, "error: Unbased SystemVerilog literal cannot have "
# "a size.");
()
def p_number_5(p):
'''number : DEC_NUMBER UNBASED_NUMBER '''
print('number_5', list(p))
# { yyerror(@1, "error: Unbased SystemVerilog literal cannot have "
# "a size.");
()
def p_open_range_list_1(p):
'''open_range_list : open_range_list ',' value_range '''
()
def p_open_range_list_1(p):
'''open_range_list : open_range_list ',' value_range '''
print('package_declaration_1', list(p))
# { pform_end_package_declaration(@1);
# // If an end label is present make sure it match the package name.
print('package_declaration_1', list(p))
# { pform_end_package_declaration(@1);
# // If an end label is present make sure it match the package name.
def p_package_import_item_1(p):
'''package_import_item : PACKAGE_IDENTIFIER K_SCOPE_RES IDENTIFIER '''
print('package_import_item_1', list(p))
def p_package_import_item_1(p):
'''package_import_item : PACKAGE_IDENTIFIER K_SCOPE_RES IDENTIFIER '''
print('package_import_item_1', list(p))
# }
()
def p_package_import_item_2(p):
'''package_import_item : PACKAGE_IDENTIFIER K_SCOPE_RES '*' '''
print('package_import_item_2', list(p))
# }
()
def p_package_import_item_2(p):
'''package_import_item : PACKAGE_IDENTIFIER K_SCOPE_RES '*' '''
print('package_import_item_2', list(p))
def p_port_direction_1(p):
'''port_direction : K_input '''
print('port_direction_1', list(p))
def p_port_direction_1(p):
'''port_direction : K_input '''
print('port_direction_1', list(p))
()
def p_port_direction_2(p):
'''port_direction : K_output '''
print('port_direction_2', list(p))
()
def p_port_direction_2(p):
'''port_direction : K_output '''
print('port_direction_2', list(p))
()
def p_port_direction_3(p):
'''port_direction : K_inout '''
print('port_direction_3', list(p))
()
def p_port_direction_3(p):
'''port_direction : K_inout '''
print('port_direction_3', list(p))
()
def p_port_direction_4(p):
'''port_direction : K_ref '''
print('port_direction_4', list(p))
()
def p_port_direction_4(p):
'''port_direction : K_ref '''
print('port_direction_4', list(p))
# if (!gn_system_verilog()) {
# yyerror(@1, "error: Reference ports (ref) require SystemVerilog.");
# if (!gn_system_verilog()) {
# yyerror(@1, "error: Reference ports (ref) require SystemVerilog.");
def p_port_direction_opt_2(p):
'''port_direction_opt : '''
print('port_direction_opt_2', list(p))
def p_port_direction_opt_2(p):
'''port_direction_opt : '''
print('port_direction_opt_2', list(p))
def p_property_qualifier_opt_2(p):
'''property_qualifier_opt : '''
print('property_qualifier_opt_2', list(p))
def p_property_qualifier_opt_2(p):
'''property_qualifier_opt : '''
print('property_qualifier_opt_2', list(p))
()
def p_property_qualifier_list_1(p):
'''property_qualifier_list : property_qualifier_list property_qualifier '''
print('property_qualifier_list_1', list(p))
()
def p_property_qualifier_list_1(p):
'''property_qualifier_list : property_qualifier_list property_qualifier '''
print('property_qualifier_list_1', list(p))
def p_random_qualifier_1(p):
'''random_qualifier : K_rand '''
print('random_qualifier_1', list(p))
def p_random_qualifier_1(p):
'''random_qualifier : K_rand '''
print('random_qualifier_1', list(p))
()
def p_random_qualifier_2(p):
'''random_qualifier : K_randc '''
print('random_qualifier_2', list(p))
()
def p_random_qualifier_2(p):
'''random_qualifier : K_randc '''
print('random_qualifier_2', list(p))
def p_simple_type_or_string_1(p):
'''simple_type_or_string : integer_vector_type '''
print('simple_type_or_string_1', list(p))
def p_simple_type_or_string_1(p):
'''simple_type_or_string : integer_vector_type '''
print('simple_type_or_string_1', list(p))
# vector_type_t*tmp = new vector_type_t(use_vtype, false, 0);
# tmp->reg_flag = reg_flag;
# FILE_NAME(tmp, @1);
# vector_type_t*tmp = new vector_type_t(use_vtype, false, 0);
# tmp->reg_flag = reg_flag;
# FILE_NAME(tmp, @1);
# }
()
def p_simple_type_or_string_2(p):
'''simple_type_or_string : non_integer_type '''
print('simple_type_or_string_2', list(p))
# }
()
def p_simple_type_or_string_2(p):
'''simple_type_or_string : non_integer_type '''
print('simple_type_or_string_2', list(p))
# }
()
def p_simple_type_or_string_3(p):
'''simple_type_or_string : atom2_type '''
print('simple_type_or_string_3', list(p))
# }
()
def p_simple_type_or_string_3(p):
'''simple_type_or_string : atom2_type '''
print('simple_type_or_string_3', list(p))
# vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, true, pd);
# tmp->reg_flag = true;
# tmp->integer_flag = true;
# vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, true, pd);
# tmp->reg_flag = true;
# tmp->integer_flag = true;
# { list<pform_range_t>*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();
# { list<pform_range_t>*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();
# }
()
def p_simple_type_or_string_6(p):
'''simple_type_or_string : TYPE_IDENTIFIER '''
print('simple_type_or_string_6', list(p))
# }
()
def p_simple_type_or_string_6(p):
'''simple_type_or_string : TYPE_IDENTIFIER '''
print('simple_type_or_string_6', list(p))
# }
()
def p_simple_type_or_string_7(p):
'''simple_type_or_string : PACKAGE_IDENTIFIER K_SCOPE_RES _embed0_simple_type_or_string TYPE_IDENTIFIER '''
print('simple_type_or_string_7', list(p))
# { lex_in_package_scope(0);
# }
()
def p_simple_type_or_string_7(p):
'''simple_type_or_string : PACKAGE_IDENTIFIER K_SCOPE_RES _embed0_simple_type_or_string TYPE_IDENTIFIER '''
print('simple_type_or_string_7', list(p))
# { lex_in_package_scope(0);
print('simple_type_or_string_8', list(p))
# { string_type_t*tmp = new string_type_t;
# FILE_NAME(tmp, @1);
print('simple_type_or_string_8', list(p))
# { string_type_t*tmp = new string_type_t;
# FILE_NAME(tmp, @1);
()
def p_statement_1(p):
'''statement : attribute_list_opt statement_item '''
print('statement_1', list(p))
()
def p_statement_1(p):
'''statement : attribute_list_opt statement_item '''
print('statement_1', list(p))
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# yyerror(@10, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@10, "error: Task end labels require "
# "SystemVerilog.");
# }
# yyerror(@10, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@10, "error: Task end labels require "
# "SystemVerilog.");
# }
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# yyerror(@13, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@13, "error: Task end labels require "
# "SystemVerilog.");
# }
# yyerror(@13, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@13, "error: Task end labels require "
# "SystemVerilog.");
# }
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# yyerror(@12, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@12, "error: Task end labels require "
# "SystemVerilog.");
# }
# yyerror(@12, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@12, "error: Task end labels require "
# "SystemVerilog.");
# }
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# yyerror(@7, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@7, "error: Task end labels require "
# "SystemVerilog.");
# }
# yyerror(@7, "error: End label doesn't match task name");
# }
# if (! gn_system_verilog()) {
# yyerror(@7, "error: Task end labels require "
# "SystemVerilog.");
# }
# }
()
def p__embed0_task_declaration(p):
'''_embed0_task_declaration : '''
# { assert(current_task == 0);
# }
()
def p__embed0_task_declaration(p):
'''_embed0_task_declaration : '''
# { assert(current_task == 0);
- # { current_task->set_ports($6);
- # current_task_set_statement(@3, $7);
+ # { current_task->set_ports(p[6]);
+ # current_task_set_statement(@3, p[7]);
# }
()
def p__embed2_task_declaration(p):
'''_embed2_task_declaration : '''
# { assert(current_task == 0);
# }
()
def p__embed2_task_declaration(p):
'''_embed2_task_declaration : '''
# { assert(current_task == 0);
- # { current_task->set_ports($6);
- # current_task_set_statement(@3, $10);
+ # { current_task->set_ports(p[6]);
+ # current_task_set_statement(@3, p[10]);
# }
()
def p__embed4_task_declaration(p):
'''_embed4_task_declaration : '''
# { assert(current_task == 0);
# }
()
def p__embed4_task_declaration(p):
'''_embed4_task_declaration : '''
# { assert(current_task == 0);
# }
()
def p__embed5_task_declaration(p):
'''_embed5_task_declaration : '''
# { current_task->set_ports(0);
# }
()
def p__embed5_task_declaration(p):
'''_embed5_task_declaration : '''
# { current_task->set_ports(0);
# pform_set_this_class(@3, current_task);
# if (! current_task->method_of()) {
# pform_set_this_class(@3, current_task);
# if (! current_task->method_of()) {
def p_tf_port_declaration_1(p):
'''tf_port_declaration : port_direction K_reg_opt unsigned_signed_opt dimensions_opt list_of_identifiers ';' '''
print('tf_port_declaration_1', list(p))
def p_tf_port_declaration_1(p):
'''tf_port_declaration : port_direction K_reg_opt unsigned_signed_opt dimensions_opt list_of_identifiers ';' '''
print('tf_port_declaration_1', list(p))
- # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1,
- # $2 ? IVL_VT_LOGIC :
+ # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, p[1],
+ # p[2] ? IVL_VT_LOGIC :
# }
()
def p_tf_port_declaration_2(p):
'''tf_port_declaration : port_direction K_integer list_of_identifiers ';' '''
print('tf_port_declaration_2', list(p))
# { list<pform_range_t>*range_stub = make_range_from_width(integer_width);
# }
()
def p_tf_port_declaration_2(p):
'''tf_port_declaration : port_direction K_integer list_of_identifiers ';' '''
print('tf_port_declaration_2', list(p))
# { list<pform_range_t>*range_stub = make_range_from_width(integer_width);
- # vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_LOGIC, true,
- # range_stub, $3, true);
- # $$ = tmp;
+ # vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, p[1], IVL_VT_LOGIC, true,
+ # range_stub, p[3], true);
+ # p[0] = tmp;
# }
()
def p_tf_port_declaration_3(p):
'''tf_port_declaration : port_direction K_time list_of_identifiers ';' '''
print('tf_port_declaration_3', list(p))
# { list<pform_range_t>*range_stub = make_range_from_width(64);
# }
()
def p_tf_port_declaration_3(p):
'''tf_port_declaration : port_direction K_time list_of_identifiers ';' '''
print('tf_port_declaration_3', list(p))
# { list<pform_range_t>*range_stub = make_range_from_width(64);
- # vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_LOGIC, false,
- # range_stub, $3);
- # $$ = tmp;
+ # vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, p[1], IVL_VT_LOGIC, false,
+ # range_stub, p[3]);
+ # p[0] = tmp;
# }
()
def p_tf_port_declaration_4(p):
'''tf_port_declaration : port_direction real_or_realtime list_of_identifiers ';' '''
print('tf_port_declaration_4', list(p))
# }
()
def p_tf_port_declaration_4(p):
'''tf_port_declaration : port_direction real_or_realtime list_of_identifiers ';' '''
print('tf_port_declaration_4', list(p))
- # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_REAL, true,
- # 0, $3);
- # $$ = tmp;
+ # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, p[1], IVL_VT_REAL, true,
+ # 0, p[3]);
+ # p[0] = tmp;
# }
()
def p_tf_port_declaration_5(p):
'''tf_port_declaration : port_direction K_string list_of_identifiers ';' '''
print('tf_port_declaration_5', list(p))
# }
()
def p_tf_port_declaration_5(p):
'''tf_port_declaration : port_direction K_string list_of_identifiers ';' '''
print('tf_port_declaration_5', list(p))
- # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_STRING, true,
- # 0, $3);
- # $$ = tmp;
+ # { vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, p[1], IVL_VT_STRING, true,
+ # 0, p[3]);
+ # p[0] = tmp;
# }
()
def p_tf_port_item_1(p):
'''tf_port_item : port_direction_opt data_type_or_implicit IDENTIFIER dimensions_opt tf_port_item_expr_opt '''
print('tf_port_item_1', list(p))
# { vector<pform_tf_port_t>*tmp;
# }
()
def p_tf_port_item_1(p):
'''tf_port_item : port_direction_opt data_type_or_implicit IDENTIFIER dimensions_opt tf_port_item_expr_opt '''
print('tf_port_item_1', list(p))
# { vector<pform_tf_port_t>*tmp;
- # NetNet::PortType use_port_type = $1;
- # if ((use_port_type == NetNet::PIMPLICIT) && (gn_system_verilog() || ($2 == 0)))
+ # NetNet::PortType use_port_type = p[1];
+ # if ((use_port_type == NetNet::PIMPLICIT) && (gn_system_verilog() || (p[2] == 0)))
- # perm_string name = lex_strings.make($3);
- # list<perm_string>* ilist = list_from_identifier($3);
+ # perm_string name = lex_strings.make(p[3]);
+ # list<perm_string>* ilist = list_from_identifier(p[3]);
#
# if (use_port_type == NetNet::PIMPLICIT) {
# yyerror(@1, "error: missing task/function port direction.");
# use_port_type = NetNet::PINPUT; // for error recovery
# }
#
# if (use_port_type == NetNet::PIMPLICIT) {
# yyerror(@1, "error: missing task/function port direction.");
# use_port_type = NetNet::PINPUT; // for error recovery
# }
# // Detect special case this is an undecorated
# // identifier and we need to get the declaration from
# // left context.
# // Detect special case this is an undecorated
# // identifier and we need to get the declaration from
# // left context.
# yyerror(@4, "internal error: How can there be an unpacked range here?\n");
# }
# tmp = pform_make_task_ports(@3, use_port_type,
# yyerror(@4, "internal error: How can there be an unpacked range here?\n");
# }
# tmp = pform_make_task_ports(@3, use_port_type,
# // indicate the type. Save the type for any right
# // context that may come later.
# port_declaration_context.port_type = use_port_type;
# // indicate the type. Save the type for any right
# // context that may come later.
# port_declaration_context.port_type = use_port_type;
- # port_declaration_context.data_type = $2;
- # tmp = pform_make_task_ports(@3, use_port_type, $2, ilist);
+ # port_declaration_context.data_type = p[2];
+ # tmp = pform_make_task_ports(@3, use_port_type, p[2], ilist);
# }
# }
()
def p_tf_port_item_2(p):
'''tf_port_item : port_direction_opt data_type_or_implicit IDENTIFIER error '''
print('tf_port_item_2', list(p))
# }
# }
()
def p_tf_port_item_2(p):
'''tf_port_item : port_direction_opt data_type_or_implicit IDENTIFIER error '''
print('tf_port_item_2', list(p))
'''tf_port_item_list : tf_port_item_list ',' tf_port_item '''
print('tf_port_item_list_1', list(p))
# { vector<pform_tf_port_t>*tmp;
'''tf_port_item_list : tf_port_item_list ',' tf_port_item '''
print('tf_port_item_list_1', list(p))
# { vector<pform_tf_port_t>*tmp;
- # if ($1 && $3) {
- # size_t s1 = $1->size();
- # tmp = $1;
- # tmp->resize(tmp->size()+$3->size());
- # for (size_t idx = 0 ; idx < $3->size() ; idx += 1)
- # tmp->at(s1+idx) = $3->at(idx);
- # delete $3;
- # } else if ($1) {
- # tmp = $1;
+ # if (p[1] && p[3]) {
+ # size_t s1 = p[1]->size();
+ # tmp = p[1];
+ # tmp->resize(tmp->size()+p[3]->size());
+ # for (size_t idx = 0 ; idx < p[3]->size() ; idx += 1)
+ # tmp->at(s1+idx) = p[3]->at(idx);
+ # delete p[3];
+ # } else if (p[1]) {
+ # tmp = p[1];
'''tf_port_item_list : error ',' tf_port_item '''
print('tf_port_item_list_3', list(p))
# { yyerror(@2, "error: Syntax error in task/function port declaration.");
'''tf_port_item_list : error ',' tf_port_item '''
print('tf_port_item_list_3', list(p))
# { yyerror(@2, "error: Syntax error in task/function port declaration.");
# }
()
def p_tf_port_item_list_4(p):
'''tf_port_item_list : tf_port_item_list ',' '''
print('tf_port_item_list_4', list(p))
# { yyerror(@2, "error: NULL port declarations are not allowed.");
# }
()
def p_tf_port_item_list_4(p):
'''tf_port_item_list : tf_port_item_list ',' '''
print('tf_port_item_list_4', list(p))
# { yyerror(@2, "error: NULL port declarations are not allowed.");
# }
()
def p_tf_port_item_list_5(p):
'''tf_port_item_list : tf_port_item_list ';' '''
print('tf_port_item_list_5', list(p))
# { yyerror(@2, "error: ';' is an invalid port declaration separator.");
# }
()
def p_tf_port_item_list_5(p):
'''tf_port_item_list : tf_port_item_list ';' '''
print('tf_port_item_list_5', list(p))
# { yyerror(@2, "error: ';' is an invalid port declaration separator.");
# }
()
def p_timeunits_declaration_1(p):
'''timeunits_declaration : K_timeunit TIME_LITERAL ';' '''
print('timeunits_declaration_1', list(p))
# }
()
def p_timeunits_declaration_1(p):
'''timeunits_declaration : K_timeunit TIME_LITERAL ';' '''
print('timeunits_declaration_1', list(p))
()
def p_timeunits_declaration_2(p):
'''timeunits_declaration : K_timeunit TIME_LITERAL '/' TIME_LITERAL ';' '''
print('timeunits_declaration_2', list(p))
# { bool initial_decl = allow_timeunit_decl && allow_timeprec_decl;
()
def p_timeunits_declaration_2(p):
'''timeunits_declaration : K_timeunit TIME_LITERAL '/' TIME_LITERAL ';' '''
print('timeunits_declaration_2', list(p))
# { bool initial_decl = allow_timeunit_decl && allow_timeprec_decl;
- # pform_set_timeunit($2, initial_decl);
- # pform_set_timeprec($4, initial_decl);
+ # pform_set_timeunit(p[2], initial_decl);
+ # pform_set_timeprec(p[4], initial_decl);
# }
()
def p_timeunits_declaration_3(p):
'''timeunits_declaration : K_timeprecision TIME_LITERAL ';' '''
print('timeunits_declaration_3', list(p))
# }
()
def p_timeunits_declaration_3(p):
'''timeunits_declaration : K_timeprecision TIME_LITERAL ';' '''
print('timeunits_declaration_3', list(p))
()
def p_timeunits_declaration_opt_1(p):
'''timeunits_declaration_opt : %prec no_timeunits_declaration '''
()
def p_timeunits_declaration_opt_1(p):
'''timeunits_declaration_opt : %prec no_timeunits_declaration '''
'''variable_dimension : '[' expression ':' expression ']' '''
print('variable_dimension_1', list(p))
# { list<pform_range_t> *tmp = new list<pform_range_t>;
'''variable_dimension : '[' expression ':' expression ']' '''
print('variable_dimension_1', list(p))
# { list<pform_range_t> *tmp = new list<pform_range_t>;
# list<pform_range_t> *tmp = new list<pform_range_t>;
# pform_range_t index;
# index.first = new PENumber(new verinum((uint64_t)0, integer_width));
# list<pform_range_t> *tmp = new list<pform_range_t>;
# pform_range_t index;
# index.first = new PENumber(new verinum((uint64_t)0, integer_width));
- # index.second = new PEBinary('-', $2, new PENumber(new verinum((uint64_t)1, integer_width)));
+ # index.second = new PEBinary('-', p[2], new PENumber(new verinum((uint64_t)1, integer_width)));
# { list<pform_range_t> *tmp = new list<pform_range_t>;
# pform_range_t index (0,0);
# tmp->push_back(index);
# { list<pform_range_t> *tmp = new list<pform_range_t>;
# pform_range_t index (0,0);
# tmp->push_back(index);
# { if (!gn_system_verilog()) {
# yyerror(@1, "error: overriding the default variable lifetime "
# "requires SystemVerilog.");
# { if (!gn_system_verilog()) {
# yyerror(@1, "error: overriding the default variable lifetime "
# "requires SystemVerilog.");
# yyerror(@1, "sorry: overriding the default variable lifetime "
# "is not yet supported.");
# }
# yyerror(@1, "sorry: overriding the default variable lifetime "
# "is not yet supported.");
# }
def p_attribute_instance_list_4(p):
'''attribute_instance_list : attribute_instance_list K_PSTAR attribute_list K_STARP '''
print('attribute_instance_list_4', list(p))
def p_attribute_instance_list_4(p):
'''attribute_instance_list : attribute_instance_list K_PSTAR attribute_list K_STARP '''
print('attribute_instance_list_4', list(p))
# }
()
def p_attribute_list_1(p):
'''attribute_list : attribute_list ',' attribute '''
print('attribute_list_1', list(p))
# }
()
def p_attribute_list_1(p):
'''attribute_list : attribute_list ',' attribute '''
print('attribute_list_1', list(p))
# }
()
def p_attribute_list_2(p):
'''attribute_list : attribute '''
print('attribute_list_2', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_attribute_list_2(p):
'''attribute_list : attribute '''
print('attribute_list_2', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_attribute_1(p):
'''attribute : IDENTIFIER '''
print('attribute_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_attribute_1(p):
'''attribute : IDENTIFIER '''
print('attribute_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_attribute_2(p):
'''attribute : IDENTIFIER '=' expression '''
print('attribute_2', list(p))
# }
()
def p_attribute_2(p):
'''attribute : IDENTIFIER '=' expression '''
print('attribute_2', list(p))
# }
()
def p_block_item_decl_1(p):
'''block_item_decl : data_type register_variable_list ';' '''
print('block_item_decl_1', list(p))
# }
()
def p_block_item_decl_1(p):
'''block_item_decl : data_type register_variable_list ';' '''
print('block_item_decl_1', list(p))
- # { if ($1) pform_set_data_type(@1, $1, $2, NetNet::REG, attributes_in_context);
+ # { if (p[1]) pform_set_data_type(@1, p[1], p[2], NetNet::REG, attributes_in_context);
# }
()
def p_block_item_decl_2(p):
'''block_item_decl : variable_lifetime data_type register_variable_list ';' '''
print('block_item_decl_2', list(p))
# }
()
def p_block_item_decl_2(p):
'''block_item_decl : variable_lifetime data_type register_variable_list ';' '''
print('block_item_decl_2', list(p))
- # { if ($2) pform_set_data_type(@2, $2, $3, NetNet::REG, attributes_in_context);
+ # { if (p[2]) pform_set_data_type(@2, p[2], p[3], NetNet::REG, attributes_in_context);
# var_lifetime = LexicalScope::INHERITED;
# }
()
def p_block_item_decl_3(p):
'''block_item_decl : K_reg data_type register_variable_list ';' '''
print('block_item_decl_3', list(p))
# var_lifetime = LexicalScope::INHERITED;
# }
()
def p_block_item_decl_3(p):
'''block_item_decl : K_reg data_type register_variable_list ';' '''
print('block_item_decl_3', list(p))
- # { if ($2) pform_set_data_type(@2, $2, $3, NetNet::REG, attributes_in_context);
+ # { if (p[2]) pform_set_data_type(@2, p[2], p[3], NetNet::REG, attributes_in_context);
# }
()
def p_block_item_decl_4(p):
'''block_item_decl : variable_lifetime K_reg data_type register_variable_list ';' '''
print('block_item_decl_4', list(p))
# }
()
def p_block_item_decl_4(p):
'''block_item_decl : variable_lifetime K_reg data_type register_variable_list ';' '''
print('block_item_decl_4', list(p))
- # { if ($3) pform_set_data_type(@3, $3, $4, NetNet::REG, attributes_in_context);
+ # { if (p[3]) pform_set_data_type(@3, p[3], p[4], NetNet::REG, attributes_in_context);
# var_lifetime = LexicalScope::INHERITED;
# }
()
def p_block_item_decl_5(p):
'''block_item_decl : K_event event_variable_list ';' '''
print('block_item_decl_5', list(p))
# var_lifetime = LexicalScope::INHERITED;
# }
()
def p_block_item_decl_5(p):
'''block_item_decl : K_event event_variable_list ';' '''
print('block_item_decl_5', list(p))
def p_type_declaration_1(p):
'''type_declaration : K_typedef data_type IDENTIFIER dimensions_opt ';' '''
print('type_declaration_1', list(p))
def p_type_declaration_1(p):
'''type_declaration : K_typedef data_type IDENTIFIER dimensions_opt ';' '''
print('type_declaration_1', list(p))
- # { perm_string name = lex_strings.make($3);
- # pform_set_typedef(name, $2, $4);
- # delete[]$3;
+ # { perm_string name = lex_strings.make(p[3]);
+ # pform_set_typedef(name, p[2], p[4]);
+ # delete[]p[3];
# }
()
def p_type_declaration_2(p):
'''type_declaration : K_typedef data_type TYPE_IDENTIFIER ';' '''
print('type_declaration_2', list(p))
# }
()
def p_type_declaration_2(p):
'''type_declaration : K_typedef data_type TYPE_IDENTIFIER ';' '''
print('type_declaration_2', list(p))
print('type_declaration_3', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
print('type_declaration_3', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @3);
# pform_set_typedef(name, tmp, NULL);
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @3);
# pform_set_typedef(name, tmp, NULL);
print('type_declaration_7', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
print('type_declaration_7', list(p))
# { // Create a synthetic typedef for the class name so that the
# // lexor detects the name as a type.
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @2);
# pform_set_typedef(name, tmp, NULL);
# class_type_t*tmp = new class_type_t(name);
# FILE_NAME(tmp, @2);
# pform_set_typedef(name, tmp, NULL);
print('enum_data_type_1', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_1', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
# enum_type->base_type = IVL_VT_BOOL;
# enum_type->signed_flag = true;
# enum_type->integer_flag = false;
# enum_type->range.reset(make_range_from_width(32));
# enum_type->base_type = IVL_VT_BOOL;
# enum_type->signed_flag = true;
# enum_type->integer_flag = false;
# enum_type->range.reset(make_range_from_width(32));
print('enum_data_type_2', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_2', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_3', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_3', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_4', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_4', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_5', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_5', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_6', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
print('enum_data_type_6', list(p))
# { enum_type_t*enum_type = new enum_type_t;
# FILE_NAME(enum_type, @1);
# }
()
def p_enum_name_list_1(p):
'''enum_name_list : enum_name '''
print('enum_name_list_1', list(p))
# }
()
def p_enum_name_list_1(p):
'''enum_name_list : enum_name '''
print('enum_name_list_1', list(p))
# }
()
def p_enum_name_list_2(p):
'''enum_name_list : enum_name_list ',' enum_name '''
print('enum_name_list_2', list(p))
# }
()
def p_enum_name_list_2(p):
'''enum_name_list : enum_name_list ',' enum_name '''
print('enum_name_list_2', list(p))
- # { list<named_pexpr_t>*lst = $1;
- # lst->splice(lst->end(), *$3);
- # delete $3;
- # $$ = lst;
+ # { list<named_pexpr_t>*lst = p[1];
+ # lst->splice(lst->end(), *p[3]);
+ # delete p[3];
+ # p[0] = lst;
# }
()
def p_pos_neg_number_1(p):
'''pos_neg_number : number '''
print('pos_neg_number_1', list(p))
# }
()
def p_pos_neg_number_1(p):
'''pos_neg_number : number '''
print('pos_neg_number_1', list(p))
# }
()
def p_pos_neg_number_2(p):
'''pos_neg_number : '-' number '''
print('pos_neg_number_2', list(p))
# }
()
def p_pos_neg_number_2(p):
'''pos_neg_number : '-' number '''
print('pos_neg_number_2', list(p))
# }
()
def p_enum_name_1(p):
'''enum_name : IDENTIFIER '''
print('enum_name_1', list(p))
# }
()
def p_enum_name_1(p):
'''enum_name : IDENTIFIER '''
print('enum_name_1', list(p))
# }
()
def p_enum_name_2(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ']' '''
print('enum_name_2', list(p))
# }
()
def p_enum_name_2(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ']' '''
print('enum_name_2', list(p))
- # { perm_string name = lex_strings.make($1);
- # long count = check_enum_seq_value(@1, $3, false);
- # delete[]$1;
- # $$ = make_named_numbers(name, 0, count-1);
- # delete $3;
+ # { perm_string name = lex_strings.make(p[1]);
+ # long count = check_enum_seq_value(@1, p[3], false);
+ # delete[]p[1];
+ # p[0] = make_named_numbers(name, 0, count-1);
+ # delete p[3];
# }
()
def p_enum_name_3(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ':' pos_neg_number ']' '''
print('enum_name_3', list(p))
# }
()
def p_enum_name_3(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ':' pos_neg_number ']' '''
print('enum_name_3', list(p))
- # { perm_string name = lex_strings.make($1);
- # $$ = make_named_numbers(name, check_enum_seq_value(@1, $3, true),
- # check_enum_seq_value(@1, $5, true));
- # delete[]$1;
- # delete $3;
- # delete $5;
+ # { 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));
+ # delete[]p[1];
+ # delete p[3];
+ # delete p[5];
# }
()
def p_enum_name_4(p):
'''enum_name : IDENTIFIER '=' expression '''
print('enum_name_4', list(p))
# }
()
def p_enum_name_4(p):
'''enum_name : IDENTIFIER '=' expression '''
print('enum_name_4', list(p))
- # { perm_string name = lex_strings.make($1);
- # delete[]$1;
- # $$ = make_named_number(name, $3);
+ # { perm_string name = lex_strings.make(p[1]);
+ # delete[]p[1];
+ # p[0] = make_named_number(name, p[3]);
# }
()
def p_enum_name_5(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ']' '=' expression '''
print('enum_name_5', list(p))
# }
()
def p_enum_name_5(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ']' '=' expression '''
print('enum_name_5', list(p))
- # { perm_string name = lex_strings.make($1);
- # long count = check_enum_seq_value(@1, $3, false);
- # $$ = make_named_numbers(name, 0, count-1, $6);
- # delete[]$1;
- # delete $3;
+ # { 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]);
+ # delete[]p[1];
+ # delete p[3];
# }
()
def p_enum_name_6(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ':' pos_neg_number ']' '=' expression '''
print('enum_name_6', list(p))
# }
()
def p_enum_name_6(p):
'''enum_name : IDENTIFIER '[' pos_neg_number ':' pos_neg_number ']' '=' expression '''
print('enum_name_6', list(p))
- # { perm_string name = lex_strings.make($1);
- # $$ = make_named_numbers(name, check_enum_seq_value(@1, $3, true),
- # check_enum_seq_value(@1, $5, true), $8);
- # delete[]$1;
- # delete $3;
- # delete $5;
+ # { 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]);
+ # delete[]p[1];
+ # delete p[3];
+ # delete p[5];
print('struct_data_type_1', list(p))
# { struct_type_t*tmp = new struct_type_t;
# FILE_NAME(tmp, @1);
print('struct_data_type_1', list(p))
# { struct_type_t*tmp = new struct_type_t;
# FILE_NAME(tmp, @1);
print('struct_data_type_2', list(p))
# { struct_type_t*tmp = new struct_type_t;
# FILE_NAME(tmp, @1);
print('struct_data_type_2', list(p))
# { struct_type_t*tmp = new struct_type_t;
# FILE_NAME(tmp, @1);
# }
()
def p_struct_union_member_list_1(p):
'''struct_union_member_list : struct_union_member_list struct_union_member '''
print('struct_union_member_list_1', list(p))
# }
()
def p_struct_union_member_list_1(p):
'''struct_union_member_list : struct_union_member_list struct_union_member '''
print('struct_union_member_list_1', list(p))
# }
()
def p_struct_union_member_list_2(p):
'''struct_union_member_list : struct_union_member '''
print('struct_union_member_list_2', list(p))
# { list<struct_member_t*>*tmp = new list<struct_member_t*>;
# }
()
def p_struct_union_member_list_2(p):
'''struct_union_member_list : struct_union_member '''
print('struct_union_member_list_2', list(p))
# { list<struct_member_t*>*tmp = new list<struct_member_t*>;
print('struct_union_member_1', list(p))
# { struct_member_t*tmp = new struct_member_t;
# FILE_NAME(tmp, @2);
print('struct_union_member_1', list(p))
# { struct_member_t*tmp = new struct_member_t;
# FILE_NAME(tmp, @2);
'''case_item : expression_list_proper ':' statement_or_null '''
print('case_item_1', list(p))
# { PCase::Item*tmp = new PCase::Item;
'''case_item : expression_list_proper ':' statement_or_null '''
print('case_item_1', list(p))
# { PCase::Item*tmp = new PCase::Item;
# }
()
def p_case_item_2(p):
'''case_item : K_default ':' statement_or_null '''
print('case_item_2', list(p))
# { PCase::Item*tmp = new PCase::Item;
# }
()
def p_case_item_2(p):
'''case_item : K_default ':' statement_or_null '''
print('case_item_2', list(p))
# { PCase::Item*tmp = new PCase::Item;
# }
()
def p_case_item_3(p):
'''case_item : K_default statement_or_null '''
print('case_item_3', list(p))
# { PCase::Item*tmp = new PCase::Item;
# }
()
def p_case_item_3(p):
'''case_item : K_default statement_or_null '''
print('case_item_3', list(p))
# { PCase::Item*tmp = new PCase::Item;
'''case_items : case_items case_item '''
print('case_items_1', list(p))
# { svector<PCase::Item*>*tmp;
'''case_items : case_items case_item '''
print('case_items_1', list(p))
# { svector<PCase::Item*>*tmp;
# }
()
def p_case_items_2(p):
'''case_items : case_item '''
print('case_items_2', list(p))
# { svector<PCase::Item*>*tmp = new svector<PCase::Item*>(1);
# }
()
def p_case_items_2(p):
'''case_items : case_item '''
print('case_items_2', list(p))
# { svector<PCase::Item*>*tmp = new svector<PCase::Item*>(1);
def p_defparam_assign_1(p):
'''defparam_assign : hierarchy_identifier '=' expression '''
print('defparam_assign_1', list(p))
def p_defparam_assign_1(p):
'''defparam_assign : hierarchy_identifier '=' expression '''
print('defparam_assign_1', list(p))
'''defparam_assign_list : dimensions defparam_assign '''
print('defparam_assign_list_2', list(p))
# { yyerror(@1, "error: defparam may not include a range.");
'''defparam_assign_list : dimensions defparam_assign '''
print('defparam_assign_list_2', list(p))
# { yyerror(@1, "error: defparam may not include a range.");
'''delay1 : '#' delay_value_simple '''
print('delay1_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''delay1 : '#' delay_value_simple '''
print('delay1_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay1_2(p):
'''delay1 : '#' '(' delay_value ')' '''
print('delay1_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay1_2(p):
'''delay1 : '#' '(' delay_value ')' '''
print('delay1_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_1(p):
'''delay3 : '#' delay_value_simple '''
print('delay3_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_1(p):
'''delay3 : '#' delay_value_simple '''
print('delay3_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_2(p):
'''delay3 : '#' '(' delay_value ')' '''
print('delay3_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_2(p):
'''delay3 : '#' '(' delay_value ')' '''
print('delay3_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_3(p):
'''delay3 : '#' '(' delay_value ',' delay_value ')' '''
print('delay3_3', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_3(p):
'''delay3 : '#' '(' delay_value ',' delay_value ')' '''
print('delay3_3', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_4(p):
'''delay3 : '#' '(' delay_value ',' delay_value ',' delay_value ')' '''
print('delay3_4', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay3_4(p):
'''delay3 : '#' '(' delay_value ',' delay_value ',' delay_value ')' '''
print('delay3_4', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''delay_value_list : delay_value '''
print('delay_value_list_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''delay_value_list : delay_value '''
print('delay_value_list_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_delay_value_list_2(p):
'''delay_value_list : delay_value_list ',' delay_value '''
print('delay_value_list_2', list(p))
# }
()
def p_delay_value_list_2(p):
'''delay_value_list : delay_value_list ',' delay_value '''
print('delay_value_list_2', list(p))
# }
()
def p_delay_value_1(p):
'''delay_value : expression '''
print('delay_value_1', list(p))
# }
()
def p_delay_value_1(p):
'''delay_value : expression '''
print('delay_value_1', list(p))
# }
()
def p_delay_value_2(p):
'''delay_value : expression ':' expression ':' expression '''
print('delay_value_2', list(p))
# }
()
def p_delay_value_2(p):
'''delay_value : expression ':' expression ':' expression '''
print('delay_value_2', list(p))
()
def p_delay_value_simple_1(p):
'''delay_value_simple : DEC_NUMBER '''
print('delay_value_simple_1', list(p))
()
def p_delay_value_simple_1(p):
'''delay_value_simple : DEC_NUMBER '''
print('delay_value_simple_1', list(p))
def p_delay_value_simple_2(p):
'''delay_value_simple : REALTIME '''
print('delay_value_simple_2', list(p))
def p_delay_value_simple_2(p):
'''delay_value_simple : REALTIME '''
print('delay_value_simple_2', list(p))
# }
# }
()
def p_delay_value_simple_3(p):
'''delay_value_simple : IDENTIFIER '''
print('delay_value_simple_3', list(p))
# }
# }
()
def p_delay_value_simple_3(p):
'''delay_value_simple : IDENTIFIER '''
print('delay_value_simple_3', list(p))
# yyerror(@1, "internal error: delay.");
# else {
# double p = pow(10.0,
# (double)(unit - pform_get_timeunit()));
# yyerror(@1, "internal error: delay.");
# else {
# double p = pow(10.0,
# (double)(unit - pform_get_timeunit()));
def p_discipline_declaration_1(p):
'''discipline_declaration : K_discipline IDENTIFIER optional_semicolon _embed0_discipline_declaration discipline_items K_enddiscipline '''
print('discipline_declaration_1', list(p))
def p_discipline_declaration_1(p):
'''discipline_declaration : K_discipline IDENTIFIER optional_semicolon _embed0_discipline_declaration discipline_items K_enddiscipline '''
print('discipline_declaration_1', list(p))
def p_discipline_item_3(p):
'''discipline_item : K_potential IDENTIFIER ';' '''
print('discipline_item_3', list(p))
def p_discipline_item_3(p):
'''discipline_item : K_potential IDENTIFIER ';' '''
print('discipline_item_3', list(p))
()
def p_discipline_item_4(p):
'''discipline_item : K_flow IDENTIFIER ';' '''
print('discipline_item_4', list(p))
()
def p_discipline_item_4(p):
'''discipline_item : K_flow IDENTIFIER ';' '''
print('discipline_item_4', list(p))
()
def p_nature_declaration_1(p):
'''nature_declaration : K_nature IDENTIFIER optional_semicolon _embed0_nature_declaration nature_items K_endnature '''
print('nature_declaration_1', list(p))
()
def p_nature_declaration_1(p):
'''nature_declaration : K_nature IDENTIFIER optional_semicolon _embed0_nature_declaration nature_items K_endnature '''
print('nature_declaration_1', list(p))
def p_nature_item_1(p):
'''nature_item : K_units '=' STRING ';' '''
print('nature_item_1', list(p))
def p_nature_item_1(p):
'''nature_item : K_units '=' STRING ';' '''
print('nature_item_1', list(p))
def p_nature_item_3(p):
'''nature_item : K_access '=' IDENTIFIER ';' '''
print('nature_item_3', list(p))
def p_nature_item_3(p):
'''nature_item : K_access '=' IDENTIFIER ';' '''
print('nature_item_3', list(p))
()
def p_nature_item_4(p):
'''nature_item : K_idt_nature '=' IDENTIFIER ';' '''
print('nature_item_4', list(p))
()
def p_nature_item_4(p):
'''nature_item : K_idt_nature '=' IDENTIFIER ';' '''
print('nature_item_4', list(p))
()
def p_nature_item_5(p):
'''nature_item : K_ddt_nature '=' IDENTIFIER ';' '''
print('nature_item_5', list(p))
()
def p_nature_item_5(p):
'''nature_item : K_ddt_nature '=' IDENTIFIER ';' '''
print('nature_item_5', list(p))
()
def p_config_declaration_1(p):
'''config_declaration : K_config IDENTIFIER ';' K_design lib_cell_identifiers ';' list_of_config_rule_statements K_endconfig '''
print('config_declaration_1', list(p))
# { cerr << @1 << ": sorry: config declarations are not supported and "
# "will be skipped." << endl;
()
def p_config_declaration_1(p):
'''config_declaration : K_config IDENTIFIER ';' K_design lib_cell_identifiers ';' list_of_config_rule_statements K_endconfig '''
print('config_declaration_1', list(p))
# { cerr << @1 << ": sorry: config declarations are not supported and "
# "will be skipped." << endl;
def p_config_rule_statement_2(p):
'''config_rule_statement : K_instance hierarchy_identifier K_liblist list_of_libraries ';' '''
print('config_rule_statement_2', list(p))
def p_config_rule_statement_2(p):
'''config_rule_statement : K_instance hierarchy_identifier K_liblist list_of_libraries ';' '''
print('config_rule_statement_2', list(p))
()
def p_config_rule_statement_3(p):
'''config_rule_statement : K_instance hierarchy_identifier K_use lib_cell_id opt_config ';' '''
print('config_rule_statement_3', list(p))
()
def p_config_rule_statement_3(p):
'''config_rule_statement : K_instance hierarchy_identifier K_use lib_cell_id opt_config ';' '''
print('config_rule_statement_3', list(p))
()
def p_config_rule_statement_4(p):
'''config_rule_statement : K_cell lib_cell_id K_liblist list_of_libraries ';' '''
()
def p_config_rule_statement_4(p):
'''config_rule_statement : K_cell lib_cell_id K_liblist list_of_libraries ';' '''
def p_lib_cell_id_1(p):
'''lib_cell_id : IDENTIFIER '''
print('lib_cell_id_1', list(p))
def p_lib_cell_id_1(p):
'''lib_cell_id : IDENTIFIER '''
print('lib_cell_id_1', list(p))
()
def p_lib_cell_id_2(p):
'''lib_cell_id : IDENTIFIER '.' IDENTIFIER '''
print('lib_cell_id_2', list(p))
()
def p_lib_cell_id_2(p):
'''lib_cell_id : IDENTIFIER '.' IDENTIFIER '''
print('lib_cell_id_2', list(p))
def p_list_of_libraries_2(p):
'''list_of_libraries : list_of_libraries IDENTIFIER '''
print('list_of_libraries_2', list(p))
def p_list_of_libraries_2(p):
'''list_of_libraries : list_of_libraries IDENTIFIER '''
print('list_of_libraries_2', list(p))
()
def p_drive_strength_1(p):
'''drive_strength : '(' dr_strength0 ',' dr_strength1 ')' '''
print('drive_strength_1', list(p))
()
def p_drive_strength_1(p):
'''drive_strength : '(' dr_strength0 ',' dr_strength1 ')' '''
print('drive_strength_1', list(p))
# }
()
def p_drive_strength_2(p):
'''drive_strength : '(' dr_strength1 ',' dr_strength0 ')' '''
print('drive_strength_2', list(p))
# }
()
def p_drive_strength_2(p):
'''drive_strength : '(' dr_strength1 ',' dr_strength0 ')' '''
print('drive_strength_2', list(p))
# }
()
def p_drive_strength_3(p):
'''drive_strength : '(' dr_strength0 ',' K_highz1 ')' '''
print('drive_strength_3', list(p))
# }
()
def p_drive_strength_3(p):
'''drive_strength : '(' dr_strength0 ',' K_highz1 ')' '''
print('drive_strength_3', list(p))
# }
()
def p_drive_strength_4(p):
'''drive_strength : '(' dr_strength1 ',' K_highz0 ')' '''
print('drive_strength_4', list(p))
# }
()
def p_drive_strength_4(p):
'''drive_strength : '(' dr_strength1 ',' K_highz0 ')' '''
print('drive_strength_4', list(p))
# }
()
def p_drive_strength_5(p):
'''drive_strength : '(' K_highz1 ',' dr_strength0 ')' '''
print('drive_strength_5', list(p))
# }
()
def p_drive_strength_5(p):
'''drive_strength : '(' K_highz1 ',' dr_strength0 ')' '''
print('drive_strength_5', list(p))
# }
()
def p_drive_strength_6(p):
'''drive_strength : '(' K_highz0 ',' dr_strength1 ')' '''
print('drive_strength_6', list(p))
# }
()
def p_drive_strength_6(p):
'''drive_strength : '(' K_highz0 ',' dr_strength1 ')' '''
print('drive_strength_6', list(p))
def p_drive_strength_opt_2(p):
'''drive_strength_opt : '''
print('drive_strength_opt_2', list(p))
def p_drive_strength_opt_2(p):
'''drive_strength_opt : '''
print('drive_strength_opt_2', list(p))
()
def p_dr_strength0_1(p):
'''dr_strength0 : K_supply0 '''
print('dr_strength0_1', list(p))
()
def p_dr_strength0_1(p):
'''dr_strength0 : K_supply0 '''
print('dr_strength0_1', list(p))
()
def p_dr_strength0_2(p):
'''dr_strength0 : K_strong0 '''
print('dr_strength0_2', list(p))
()
def p_dr_strength0_2(p):
'''dr_strength0 : K_strong0 '''
print('dr_strength0_2', list(p))
()
def p_dr_strength0_3(p):
'''dr_strength0 : K_pull0 '''
print('dr_strength0_3', list(p))
()
def p_dr_strength0_3(p):
'''dr_strength0 : K_pull0 '''
print('dr_strength0_3', list(p))
()
def p_dr_strength0_4(p):
'''dr_strength0 : K_weak0 '''
print('dr_strength0_4', list(p))
()
def p_dr_strength0_4(p):
'''dr_strength0 : K_weak0 '''
print('dr_strength0_4', list(p))
()
def p_dr_strength1_1(p):
'''dr_strength1 : K_supply1 '''
print('dr_strength1_1', list(p))
()
def p_dr_strength1_1(p):
'''dr_strength1 : K_supply1 '''
print('dr_strength1_1', list(p))
()
def p_dr_strength1_2(p):
'''dr_strength1 : K_strong1 '''
print('dr_strength1_2', list(p))
()
def p_dr_strength1_2(p):
'''dr_strength1 : K_strong1 '''
print('dr_strength1_2', list(p))
()
def p_dr_strength1_3(p):
'''dr_strength1 : K_pull1 '''
print('dr_strength1_3', list(p))
()
def p_dr_strength1_3(p):
'''dr_strength1 : K_pull1 '''
print('dr_strength1_3', list(p))
()
def p_dr_strength1_4(p):
'''dr_strength1 : K_weak1 '''
print('dr_strength1_4', list(p))
()
def p_dr_strength1_4(p):
'''dr_strength1 : K_weak1 '''
print('dr_strength1_4', list(p))
def p_event_control_1(p):
'''event_control : '@' hierarchy_identifier '''
print('event_control_1', list(p))
def p_event_control_1(p):
'''event_control : '@' hierarchy_identifier '''
print('event_control_1', list(p))
# PEEvent*tmpe = new PEEvent(PEEvent::ANYEDGE, tmpi);
# PEventStatement*tmps = new PEventStatement(tmpe);
# FILE_NAME(tmps, @1);
# PEEvent*tmpe = new PEEvent(PEEvent::ANYEDGE, tmpi);
# PEventStatement*tmps = new PEventStatement(tmpe);
# FILE_NAME(tmps, @1);
# }
()
def p_event_control_2(p):
'''event_control : '@' '(' event_expression_list ')' '''
print('event_control_2', list(p))
# }
()
def p_event_control_2(p):
'''event_control : '@' '(' event_expression_list ')' '''
print('event_control_2', list(p))
def p_event_expression_list_2(p):
'''event_expression_list : event_expression_list K_or event_expression '''
print('event_expression_list_2', list(p))
def p_event_expression_list_2(p):
'''event_expression_list : event_expression_list K_or event_expression '''
print('event_expression_list_2', list(p))
# }
()
def p_event_expression_list_3(p):
'''event_expression_list : event_expression_list ',' event_expression '''
print('event_expression_list_3', list(p))
# }
()
def p_event_expression_list_3(p):
'''event_expression_list : event_expression_list ',' event_expression '''
print('event_expression_list_3', list(p))
# }
()
def p_event_expression_1(p):
'''event_expression : K_posedge expression '''
print('event_expression_1', list(p))
# }
()
def p_event_expression_1(p):
'''event_expression : K_posedge expression '''
print('event_expression_1', list(p))
# }
()
def p_event_expression_2(p):
'''event_expression : K_negedge expression '''
print('event_expression_2', list(p))
# }
()
def p_event_expression_2(p):
'''event_expression : K_negedge expression '''
print('event_expression_2', list(p))
# }
()
def p_event_expression_3(p):
'''event_expression : expression '''
print('event_expression_3', list(p))
# }
()
def p_event_expression_3(p):
'''event_expression : expression '''
print('event_expression_3', list(p))
# }
()
def p_branch_probe_expression_1(p):
'''branch_probe_expression : IDENTIFIER '(' IDENTIFIER ',' IDENTIFIER ')' '''
print('branch_probe_expression_1', list(p))
# }
()
def p_branch_probe_expression_1(p):
'''branch_probe_expression : IDENTIFIER '(' IDENTIFIER ',' IDENTIFIER ')' '''
print('branch_probe_expression_1', list(p))
- # { $$ = pform_make_branch_probe_expression(@1, $1, $3, $5); }
+ # { p[0] = pform_make_branch_probe_expression(@1, p[1], p[3], p[5]); }
()
def p_branch_probe_expression_2(p):
'''branch_probe_expression : IDENTIFIER '(' IDENTIFIER ')' '''
print('branch_probe_expression_2', list(p))
()
def p_branch_probe_expression_2(p):
'''branch_probe_expression : IDENTIFIER '(' IDENTIFIER ')' '''
print('branch_probe_expression_2', list(p))
def p_expression_5(p):
'''expression : '-' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_5', list(p))
def p_expression_5(p):
'''expression : '-' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_5', list(p))
# }
()
def p_expression_6(p):
'''expression : '~' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_6', list(p))
# }
()
def p_expression_6(p):
'''expression : '~' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_6', list(p))
# }
()
def p_expression_7(p):
'''expression : '&' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_7', list(p))
# }
()
def p_expression_7(p):
'''expression : '&' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_7', list(p))
# }
()
def p_expression_8(p):
'''expression : '!' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_8', list(p))
# }
()
def p_expression_8(p):
'''expression : '!' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_8', list(p))
# }
()
def p_expression_9(p):
'''expression : '|' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_9', list(p))
# }
()
def p_expression_9(p):
'''expression : '|' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_9', list(p))
# }
()
def p_expression_10(p):
'''expression : '^' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_10', list(p))
# }
()
def p_expression_10(p):
'''expression : '^' attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_10', list(p))
def p_expression_14(p):
'''expression : K_NAND attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_14', list(p))
def p_expression_14(p):
'''expression : K_NAND attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_14', list(p))
# }
()
def p_expression_15(p):
'''expression : K_NOR attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_15', list(p))
# }
()
def p_expression_15(p):
'''expression : K_NOR attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_15', list(p))
# }
()
def p_expression_16(p):
'''expression : K_NXOR attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_16', list(p))
# }
()
def p_expression_16(p):
'''expression : K_NXOR attribute_list_opt expr_primary %prec UNARY_PREC '''
print('expression_16', list(p))
def p_expression_19(p):
'''expression : expression '^' attribute_list_opt expression '''
print('expression_19', list(p))
def p_expression_19(p):
'''expression : expression '^' attribute_list_opt expression '''
print('expression_19', list(p))
# }
()
def p_expression_20(p):
'''expression : expression K_POW attribute_list_opt expression '''
print('expression_20', list(p))
# }
()
def p_expression_20(p):
'''expression : expression K_POW attribute_list_opt expression '''
print('expression_20', list(p))
# }
()
def p_expression_21(p):
'''expression : expression '*' attribute_list_opt expression '''
print('expression_21', list(p))
# }
()
def p_expression_21(p):
'''expression : expression '*' attribute_list_opt expression '''
print('expression_21', list(p))
# }
()
def p_expression_22(p):
'''expression : expression '/' attribute_list_opt expression '''
print('expression_22', list(p))
# }
()
def p_expression_22(p):
'''expression : expression '/' attribute_list_opt expression '''
print('expression_22', list(p))
# }
()
def p_expression_23(p):
'''expression : expression '%' attribute_list_opt expression '''
print('expression_23', list(p))
# }
()
def p_expression_23(p):
'''expression : expression '%' attribute_list_opt expression '''
print('expression_23', list(p))
# }
()
def p_expression_24(p):
'''expression : expression '+' attribute_list_opt expression '''
print('expression_24', list(p))
# }
()
def p_expression_24(p):
'''expression : expression '+' attribute_list_opt expression '''
print('expression_24', list(p))
# }
()
def p_expression_25(p):
'''expression : expression '-' attribute_list_opt expression '''
print('expression_25', list(p))
# }
()
def p_expression_25(p):
'''expression : expression '-' attribute_list_opt expression '''
print('expression_25', list(p))
# }
p[0] = Node(syms.atom, [p[1], Leaf(token.MINUS, '-'), p[4]])
()
def p_expression_26(p):
'''expression : expression '&' attribute_list_opt expression '''
print('expression_26', list(p))
# }
p[0] = Node(syms.atom, [p[1], Leaf(token.MINUS, '-'), p[4]])
()
def p_expression_26(p):
'''expression : expression '&' attribute_list_opt expression '''
print('expression_26', list(p))
# }
()
def p_expression_27(p):
'''expression : expression '|' attribute_list_opt expression '''
print('expression_27', list(p))
# }
()
def p_expression_27(p):
'''expression : expression '|' attribute_list_opt expression '''
print('expression_27', list(p))
# }
()
def p_expression_28(p):
'''expression : expression K_NAND attribute_list_opt expression '''
print('expression_28', list(p))
# }
()
def p_expression_28(p):
'''expression : expression K_NAND attribute_list_opt expression '''
print('expression_28', list(p))
# }
()
def p_expression_29(p):
'''expression : expression K_NOR attribute_list_opt expression '''
print('expression_29', list(p))
# }
()
def p_expression_29(p):
'''expression : expression K_NOR attribute_list_opt expression '''
print('expression_29', list(p))
# }
()
def p_expression_30(p):
'''expression : expression K_NXOR attribute_list_opt expression '''
print('expression_30', list(p))
# }
()
def p_expression_30(p):
'''expression : expression K_NXOR attribute_list_opt expression '''
print('expression_30', list(p))
# }
()
def p_expression_31(p):
'''expression : expression '<' attribute_list_opt expression '''
print('expression_31', list(p))
# }
()
def p_expression_31(p):
'''expression : expression '<' attribute_list_opt expression '''
print('expression_31', list(p))
# }
()
def p_expression_32(p):
'''expression : expression '>' attribute_list_opt expression '''
print('expression_32', list(p))
# }
()
def p_expression_32(p):
'''expression : expression '>' attribute_list_opt expression '''
print('expression_32', list(p))
# }
()
def p_expression_33(p):
'''expression : expression K_LS attribute_list_opt expression '''
print('expression_33', list(p))
# }
()
def p_expression_33(p):
'''expression : expression K_LS attribute_list_opt expression '''
print('expression_33', list(p))
# }
()
def p_expression_34(p):
'''expression : expression K_RS attribute_list_opt expression '''
print('expression_34', list(p))
# }
()
def p_expression_34(p):
'''expression : expression K_RS attribute_list_opt expression '''
print('expression_34', list(p))
# }
()
def p_expression_35(p):
'''expression : expression K_RSS attribute_list_opt expression '''
print('expression_35', list(p))
# }
()
def p_expression_35(p):
'''expression : expression K_RSS attribute_list_opt expression '''
print('expression_35', list(p))
# }
()
def p_expression_36(p):
'''expression : expression K_EQ attribute_list_opt expression '''
print('expression_36', list(p))
# }
()
def p_expression_36(p):
'''expression : expression K_EQ attribute_list_opt expression '''
print('expression_36', list(p))
# }
()
def p_expression_37(p):
'''expression : expression K_CEQ attribute_list_opt expression '''
print('expression_37', list(p))
# }
()
def p_expression_37(p):
'''expression : expression K_CEQ attribute_list_opt expression '''
print('expression_37', list(p))
# }
()
def p_expression_38(p):
'''expression : expression K_WEQ attribute_list_opt expression '''
print('expression_38', list(p))
# }
()
def p_expression_38(p):
'''expression : expression K_WEQ attribute_list_opt expression '''
print('expression_38', list(p))
# }
()
def p_expression_39(p):
'''expression : expression K_LE attribute_list_opt expression '''
print('expression_39', list(p))
# }
()
def p_expression_39(p):
'''expression : expression K_LE attribute_list_opt expression '''
print('expression_39', list(p))
# }
()
def p_expression_40(p):
'''expression : expression K_GE attribute_list_opt expression '''
print('expression_40', list(p))
# }
()
def p_expression_40(p):
'''expression : expression K_GE attribute_list_opt expression '''
print('expression_40', list(p))
# }
()
def p_expression_41(p):
'''expression : expression K_NE attribute_list_opt expression '''
print('expression_41', list(p))
# }
()
def p_expression_41(p):
'''expression : expression K_NE attribute_list_opt expression '''
print('expression_41', list(p))
# }
()
def p_expression_42(p):
'''expression : expression K_CNE attribute_list_opt expression '''
print('expression_42', list(p))
# }
()
def p_expression_42(p):
'''expression : expression K_CNE attribute_list_opt expression '''
print('expression_42', list(p))
# }
()
def p_expression_43(p):
'''expression : expression K_WNE attribute_list_opt expression '''
print('expression_43', list(p))
# }
()
def p_expression_43(p):
'''expression : expression K_WNE attribute_list_opt expression '''
print('expression_43', list(p))
# }
()
def p_expression_44(p):
'''expression : expression K_LOR attribute_list_opt expression '''
print('expression_44', list(p))
# }
()
def p_expression_44(p):
'''expression : expression K_LOR attribute_list_opt expression '''
print('expression_44', list(p))
# }
()
def p_expression_45(p):
'''expression : expression K_LAND attribute_list_opt expression '''
print('expression_45', list(p))
# }
()
def p_expression_45(p):
'''expression : expression K_LAND attribute_list_opt expression '''
print('expression_45', list(p))
# }
()
def p_expression_46(p):
'''expression : expression '?' attribute_list_opt expression ':' expression '''
print('expression_46', list(p))
# }
()
def p_expression_46(p):
'''expression : expression '?' attribute_list_opt expression ':' expression '''
print('expression_46', list(p))
print('expr_mintypmax_2', list(p))
# { switch (min_typ_max_flag) {
# case MIN:
print('expr_mintypmax_2', list(p))
# { switch (min_typ_max_flag) {
# case MIN:
def p_expression_list_with_nuls_1(p):
'''expression_list_with_nuls : expression_list_with_nuls ',' expression '''
print('expression_list_with_nuls_1', list(p))
def p_expression_list_with_nuls_1(p):
'''expression_list_with_nuls : expression_list_with_nuls ',' expression '''
print('expression_list_with_nuls_1', list(p))
# }
()
def p_expression_list_with_nuls_2(p):
'''expression_list_with_nuls : expression '''
print('expression_list_with_nuls_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_expression_list_with_nuls_2(p):
'''expression_list_with_nuls : expression '''
print('expression_list_with_nuls_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
print('expression_list_with_nuls_3', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# tmp->push_back(0);
print('expression_list_with_nuls_3', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# tmp->push_back(0);
# }
()
def p_expression_list_with_nuls_4(p):
'''expression_list_with_nuls : expression_list_with_nuls ',' '''
print('expression_list_with_nuls_4', list(p))
# }
()
def p_expression_list_with_nuls_4(p):
'''expression_list_with_nuls : expression_list_with_nuls ',' '''
print('expression_list_with_nuls_4', list(p))
# }
()
def p_expression_list_proper_1(p):
'''expression_list_proper : expression_list_proper ',' expression '''
print('expression_list_proper_1', list(p))
# }
()
def p_expression_list_proper_1(p):
'''expression_list_proper : expression_list_proper ',' expression '''
print('expression_list_proper_1', list(p))
# }
()
def p_expression_list_proper_2(p):
'''expression_list_proper : expression '''
print('expression_list_proper_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_expression_list_proper_2(p):
'''expression_list_proper : expression '''
print('expression_list_proper_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''expr_primary_or_typename : TYPE_IDENTIFIER '''
print('expr_primary_or_typename_2', list(p))
p[0] = p[1]
'''expr_primary_or_typename : TYPE_IDENTIFIER '''
print('expr_primary_or_typename_2', list(p))
p[0] = p[1]
# }
()
def p_expr_primary_1(p):
'''expr_primary : number '''
print('expr_primary_1', list(p))
p[0] = p[1]
# }
()
def p_expr_primary_1(p):
'''expr_primary : number '''
print('expr_primary_1', list(p))
p[0] = p[1]
# }
()
def p_expr_primary_2(p):
'''expr_primary : REALTIME '''
print('expr_primary_2', list(p))
# }
()
def p_expr_primary_2(p):
'''expr_primary : REALTIME '''
print('expr_primary_2', list(p))
# }
()
def p_expr_primary_3(p):
'''expr_primary : STRING '''
print('expr_primary_3', list(p))
# }
()
def p_expr_primary_3(p):
'''expr_primary : STRING '''
print('expr_primary_3', list(p))
# yyerror(@1, "internal error: delay.");
# else {
# double p = pow(10.0, (double)(unit - pform_get_timeunit()));
# yyerror(@1, "internal error: delay.");
# else {
# double p = pow(10.0, (double)(unit - pform_get_timeunit()));
# }
# }
()
def p_expr_primary_5(p):
'''expr_primary : SYSTEM_IDENTIFIER '''
print('expr_primary_5', list(p))
# }
# }
()
def p_expr_primary_5(p):
'''expr_primary : SYSTEM_IDENTIFIER '''
print('expr_primary_5', list(p))
# }
()
def p_expr_primary_6(p):
'''expr_primary : hierarchy_identifier '''
print('expr_primary_6', list(p))
p[0] = p[1]
# }
()
def p_expr_primary_6(p):
'''expr_primary : hierarchy_identifier '''
print('expr_primary_6', list(p))
p[0] = p[1]
# }
()
def p_expr_primary_7(p):
'''expr_primary : PACKAGE_IDENTIFIER K_SCOPE_RES hierarchy_identifier '''
print('expr_primary_7', list(p))
# }
()
def p_expr_primary_7(p):
'''expr_primary : PACKAGE_IDENTIFIER K_SCOPE_RES hierarchy_identifier '''
print('expr_primary_7', list(p))
# }
()
def p_expr_primary_8(p):
'''expr_primary : hierarchy_identifier '(' expression_list_with_nuls ')' '''
print('expr_primary_8', list(p))
# }
()
def p_expr_primary_8(p):
'''expr_primary : hierarchy_identifier '(' expression_list_with_nuls ')' '''
print('expr_primary_8', list(p))
# }
()
def p_expr_primary_9(p):
'''expr_primary : implicit_class_handle '.' hierarchy_identifier '(' expression_list_with_nuls ')' '''
print('expr_primary_9', list(p))
# }
()
def p_expr_primary_9(p):
'''expr_primary : implicit_class_handle '.' hierarchy_identifier '(' expression_list_with_nuls ')' '''
print('expr_primary_9', list(p))
- # { pform_name_t*t_name = $1;
- # while (! $3->empty()) {
- # t_name->push_back($3->front());
- # $3->pop_front();
+ # { pform_name_t*t_name = p[1];
+ # while (! p[3]->empty()) {
+ # t_name->push_back(p[3]->front());
+ # p[3]->pop_front();
# strip_tail_items(expr_list);
# PECallFunction*tmp = pform_make_call_function(@1, *t_name, *expr_list);
# strip_tail_items(expr_list);
# PECallFunction*tmp = pform_make_call_function(@1, *t_name, *expr_list);
# }
()
def p_expr_primary_10(p):
'''expr_primary : SYSTEM_IDENTIFIER '(' expression_list_proper ')' '''
print('expr_primary_10', list(p))
# }
()
def p_expr_primary_10(p):
'''expr_primary : SYSTEM_IDENTIFIER '(' expression_list_proper ')' '''
print('expr_primary_10', list(p))
- # { perm_string tn = lex_strings.make($1);
- # PECallFunction*tmp = new PECallFunction(tn, *$3);
+ # { perm_string tn = lex_strings.make(p[1]);
+ # PECallFunction*tmp = new PECallFunction(tn, *p[3]);
# }
()
def p_expr_primary_11(p):
'''expr_primary : PACKAGE_IDENTIFIER K_SCOPE_RES IDENTIFIER '(' expression_list_proper ')' '''
print('expr_primary_11', list(p))
# }
()
def p_expr_primary_11(p):
'''expr_primary : PACKAGE_IDENTIFIER K_SCOPE_RES IDENTIFIER '(' expression_list_proper ')' '''
print('expr_primary_11', list(p))
- # { perm_string use_name = lex_strings.make($3);
- # PECallFunction*tmp = new PECallFunction($1, use_name, *$5);
+ # { perm_string use_name = lex_strings.make(p[3]);
+ # PECallFunction*tmp = new PECallFunction(p[1], use_name, *p[5]);
# }
()
def p_expr_primary_12(p):
'''expr_primary : SYSTEM_IDENTIFIER '(' ')' '''
print('expr_primary_12', list(p))
# }
()
def p_expr_primary_12(p):
'''expr_primary : SYSTEM_IDENTIFIER '(' ')' '''
print('expr_primary_12', list(p))
# const vector<PExpr*>empty;
# PECallFunction*tmp = new PECallFunction(tn, empty);
# FILE_NAME(tmp, @1);
# const vector<PExpr*>empty;
# PECallFunction*tmp = new PECallFunction(tn, empty);
# FILE_NAME(tmp, @1);
# if (!gn_system_verilog()) {
# yyerror(@1, "error: Empty function argument list requires SystemVerilog.");
# }
# if (!gn_system_verilog()) {
# yyerror(@1, "error: Empty function argument list requires SystemVerilog.");
# }
def p_expr_primary_13(p):
'''expr_primary : implicit_class_handle '''
print('expr_primary_13', list(p))
def p_expr_primary_13(p):
'''expr_primary : implicit_class_handle '''
print('expr_primary_13', list(p))
# }
()
def p_expr_primary_14(p):
'''expr_primary : implicit_class_handle '.' hierarchy_identifier '''
print('expr_primary_14', list(p))
# }
()
def p_expr_primary_14(p):
'''expr_primary : implicit_class_handle '.' hierarchy_identifier '''
print('expr_primary_14', list(p))
- # { pform_name_t*t_name = $1;
- # while (! $3->empty()) {
- # t_name->push_back($3->front());
- # $3->pop_front();
+ # { pform_name_t*t_name = p[1];
+ # while (! p[3]->empty()) {
+ # t_name->push_back(p[3]->front());
+ # p[3]->pop_front();
# }
()
def p_expr_primary_15(p):
'''expr_primary : K_acos '(' expression ')' '''
print('expr_primary_15', list(p))
# { perm_string tn = perm_string::literal("$acos");
# }
()
def p_expr_primary_15(p):
'''expr_primary : K_acos '(' expression ')' '''
print('expr_primary_15', list(p))
# { perm_string tn = perm_string::literal("$acos");
# }
()
def p_expr_primary_16(p):
'''expr_primary : K_acosh '(' expression ')' '''
print('expr_primary_16', list(p))
# { perm_string tn = perm_string::literal("$acosh");
# }
()
def p_expr_primary_16(p):
'''expr_primary : K_acosh '(' expression ')' '''
print('expr_primary_16', list(p))
# { perm_string tn = perm_string::literal("$acosh");
# }
()
def p_expr_primary_17(p):
'''expr_primary : K_asin '(' expression ')' '''
print('expr_primary_17', list(p))
# { perm_string tn = perm_string::literal("$asin");
# }
()
def p_expr_primary_17(p):
'''expr_primary : K_asin '(' expression ')' '''
print('expr_primary_17', list(p))
# { perm_string tn = perm_string::literal("$asin");
# }
()
def p_expr_primary_18(p):
'''expr_primary : K_asinh '(' expression ')' '''
print('expr_primary_18', list(p))
# { perm_string tn = perm_string::literal("$asinh");
# }
()
def p_expr_primary_18(p):
'''expr_primary : K_asinh '(' expression ')' '''
print('expr_primary_18', list(p))
# { perm_string tn = perm_string::literal("$asinh");
# }
()
def p_expr_primary_19(p):
'''expr_primary : K_atan '(' expression ')' '''
print('expr_primary_19', list(p))
# { perm_string tn = perm_string::literal("$atan");
# }
()
def p_expr_primary_19(p):
'''expr_primary : K_atan '(' expression ')' '''
print('expr_primary_19', list(p))
# { perm_string tn = perm_string::literal("$atan");
# }
()
def p_expr_primary_20(p):
'''expr_primary : K_atanh '(' expression ')' '''
print('expr_primary_20', list(p))
# { perm_string tn = perm_string::literal("$atanh");
# }
()
def p_expr_primary_20(p):
'''expr_primary : K_atanh '(' expression ')' '''
print('expr_primary_20', list(p))
# { perm_string tn = perm_string::literal("$atanh");
# }
()
def p_expr_primary_21(p):
'''expr_primary : K_atan2 '(' expression ',' expression ')' '''
print('expr_primary_21', list(p))
# { perm_string tn = perm_string::literal("$atan2");
# }
()
def p_expr_primary_21(p):
'''expr_primary : K_atan2 '(' expression ',' expression ')' '''
print('expr_primary_21', list(p))
# { perm_string tn = perm_string::literal("$atan2");
# }
()
def p_expr_primary_22(p):
'''expr_primary : K_ceil '(' expression ')' '''
print('expr_primary_22', list(p))
# { perm_string tn = perm_string::literal("$ceil");
# }
()
def p_expr_primary_22(p):
'''expr_primary : K_ceil '(' expression ')' '''
print('expr_primary_22', list(p))
# { perm_string tn = perm_string::literal("$ceil");
# }
()
def p_expr_primary_23(p):
'''expr_primary : K_cos '(' expression ')' '''
print('expr_primary_23', list(p))
# { perm_string tn = perm_string::literal("$cos");
# }
()
def p_expr_primary_23(p):
'''expr_primary : K_cos '(' expression ')' '''
print('expr_primary_23', list(p))
# { perm_string tn = perm_string::literal("$cos");
# }
()
def p_expr_primary_24(p):
'''expr_primary : K_cosh '(' expression ')' '''
print('expr_primary_24', list(p))
# { perm_string tn = perm_string::literal("$cosh");
# }
()
def p_expr_primary_24(p):
'''expr_primary : K_cosh '(' expression ')' '''
print('expr_primary_24', list(p))
# { perm_string tn = perm_string::literal("$cosh");
# }
()
def p_expr_primary_25(p):
'''expr_primary : K_exp '(' expression ')' '''
print('expr_primary_25', list(p))
# { perm_string tn = perm_string::literal("$exp");
# }
()
def p_expr_primary_25(p):
'''expr_primary : K_exp '(' expression ')' '''
print('expr_primary_25', list(p))
# { perm_string tn = perm_string::literal("$exp");
# }
()
def p_expr_primary_26(p):
'''expr_primary : K_floor '(' expression ')' '''
print('expr_primary_26', list(p))
# { perm_string tn = perm_string::literal("$floor");
# }
()
def p_expr_primary_26(p):
'''expr_primary : K_floor '(' expression ')' '''
print('expr_primary_26', list(p))
# { perm_string tn = perm_string::literal("$floor");
# }
()
def p_expr_primary_27(p):
'''expr_primary : K_hypot '(' expression ',' expression ')' '''
print('expr_primary_27', list(p))
# { perm_string tn = perm_string::literal("$hypot");
# }
()
def p_expr_primary_27(p):
'''expr_primary : K_hypot '(' expression ',' expression ')' '''
print('expr_primary_27', list(p))
# { perm_string tn = perm_string::literal("$hypot");
# }
()
def p_expr_primary_28(p):
'''expr_primary : K_ln '(' expression ')' '''
print('expr_primary_28', list(p))
# { perm_string tn = perm_string::literal("$ln");
# }
()
def p_expr_primary_28(p):
'''expr_primary : K_ln '(' expression ')' '''
print('expr_primary_28', list(p))
# { perm_string tn = perm_string::literal("$ln");
# }
()
def p_expr_primary_29(p):
'''expr_primary : K_log '(' expression ')' '''
print('expr_primary_29', list(p))
# { perm_string tn = perm_string::literal("$log10");
# }
()
def p_expr_primary_29(p):
'''expr_primary : K_log '(' expression ')' '''
print('expr_primary_29', list(p))
# { perm_string tn = perm_string::literal("$log10");
# }
()
def p_expr_primary_30(p):
'''expr_primary : K_pow '(' expression ',' expression ')' '''
print('expr_primary_30', list(p))
# { perm_string tn = perm_string::literal("$pow");
# }
()
def p_expr_primary_30(p):
'''expr_primary : K_pow '(' expression ',' expression ')' '''
print('expr_primary_30', list(p))
# { perm_string tn = perm_string::literal("$pow");
# }
()
def p_expr_primary_31(p):
'''expr_primary : K_sin '(' expression ')' '''
print('expr_primary_31', list(p))
# { perm_string tn = perm_string::literal("$sin");
# }
()
def p_expr_primary_31(p):
'''expr_primary : K_sin '(' expression ')' '''
print('expr_primary_31', list(p))
# { perm_string tn = perm_string::literal("$sin");
# }
()
def p_expr_primary_32(p):
'''expr_primary : K_sinh '(' expression ')' '''
print('expr_primary_32', list(p))
# { perm_string tn = perm_string::literal("$sinh");
# }
()
def p_expr_primary_32(p):
'''expr_primary : K_sinh '(' expression ')' '''
print('expr_primary_32', list(p))
# { perm_string tn = perm_string::literal("$sinh");
# }
()
def p_expr_primary_33(p):
'''expr_primary : K_sqrt '(' expression ')' '''
print('expr_primary_33', list(p))
# { perm_string tn = perm_string::literal("$sqrt");
# }
()
def p_expr_primary_33(p):
'''expr_primary : K_sqrt '(' expression ')' '''
print('expr_primary_33', list(p))
# { perm_string tn = perm_string::literal("$sqrt");
# }
()
def p_expr_primary_34(p):
'''expr_primary : K_tan '(' expression ')' '''
print('expr_primary_34', list(p))
# { perm_string tn = perm_string::literal("$tan");
# }
()
def p_expr_primary_34(p):
'''expr_primary : K_tan '(' expression ')' '''
print('expr_primary_34', list(p))
# { perm_string tn = perm_string::literal("$tan");
# }
()
def p_expr_primary_35(p):
'''expr_primary : K_tanh '(' expression ')' '''
print('expr_primary_35', list(p))
# { perm_string tn = perm_string::literal("$tanh");
# }
()
def p_expr_primary_35(p):
'''expr_primary : K_tanh '(' expression ')' '''
print('expr_primary_35', list(p))
# { perm_string tn = perm_string::literal("$tanh");
# }
()
def p_expr_primary_36(p):
'''expr_primary : K_abs '(' expression ')' '''
print('expr_primary_36', list(p))
# }
()
def p_expr_primary_36(p):
'''expr_primary : K_abs '(' expression ')' '''
print('expr_primary_36', list(p))
# }
()
def p_expr_primary_37(p):
'''expr_primary : K_max '(' expression ',' expression ')' '''
print('expr_primary_37', list(p))
# }
()
def p_expr_primary_37(p):
'''expr_primary : K_max '(' expression ',' expression ')' '''
print('expr_primary_37', list(p))
# }
()
def p_expr_primary_38(p):
'''expr_primary : K_min '(' expression ',' expression ')' '''
print('expr_primary_38', list(p))
# }
()
def p_expr_primary_38(p):
'''expr_primary : K_min '(' expression ',' expression ')' '''
print('expr_primary_38', list(p))
def p_expr_primary_40(p):
'''expr_primary : '{' expression_list_proper '}' '''
print('expr_primary_40', list(p))
def p_expr_primary_40(p):
'''expr_primary : '{' expression_list_proper '}' '''
print('expr_primary_40', list(p))
# }
()
def p_expr_primary_41(p):
'''expr_primary : '{' expression '{' expression_list_proper '}' '}' '''
print('expr_primary_41', list(p))
# }
()
def p_expr_primary_41(p):
'''expr_primary : '{' expression '{' expression_list_proper '}' '}' '''
print('expr_primary_41', list(p))
# }
()
def p_expr_primary_42(p):
'''expr_primary : '{' expression '{' expression_list_proper '}' error '}' '''
print('expr_primary_42', list(p))
# }
()
def p_expr_primary_42(p):
'''expr_primary : '{' expression '{' expression_list_proper '}' error '}' '''
print('expr_primary_42', list(p))
# yyerror(@5, "error: Syntax error between internal '}' "
# "and closing '}' of repeat concatenation.");
# yyerrok;
# yyerror(@5, "error: Syntax error between internal '}' "
# "and closing '}' of repeat concatenation.");
# yyerrok;
def p_expr_primary_44(p):
'''expr_primary : expr_primary "'" '(' expression ')' '''
print('expr_primary_44', list(p))
def p_expr_primary_44(p):
'''expr_primary : expr_primary "'" '(' expression ')' '''
print('expr_primary_44', list(p))
# }
# }
()
def p_expr_primary_45(p):
'''expr_primary : simple_type_or_string "'" '(' expression ')' '''
print('expr_primary_45', list(p))
# }
# }
()
def p_expr_primary_45(p):
'''expr_primary : simple_type_or_string "'" '(' expression ')' '''
print('expr_primary_45', list(p))
print('expr_primary_48', list(p))
# { PENull*tmp = new PENull;
# FILE_NAME(tmp, @1);
print('expr_primary_48', list(p))
# { PENull*tmp = new PENull;
# FILE_NAME(tmp, @1);
'''function_item_list : function_item_list function_item '''
print('function_item_list_2', list(p))
# { /* */
'''function_item_list : function_item_list function_item '''
print('function_item_list_2', list(p))
# { /* */
- # tmp->resize(s1 + $2->size());
- # for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
- # tmp->at(s1+idx) = $2->at(idx);
- # delete $2;
- # $$ = tmp;
- # } else if ($1) {
- # $$ = $1;
+ # tmp->resize(s1 + p[2]->size());
+ # for (size_t idx = 0 ; idx < p[2]->size() ; idx += 1)
+ # tmp->at(s1+idx) = p[2]->at(idx);
+ # delete p[2];
+ # p[0] = tmp;
+ # } else if (p[1]) {
+ # p[0] = p[1];
'''gate_instance : IDENTIFIER '(' expression_list_with_nuls ')' '''
print('gate_instance_1', list(p))
# { lgate*tmp = new lgate;
'''gate_instance : IDENTIFIER '(' expression_list_with_nuls ')' '''
print('gate_instance_1', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_2(p):
'''gate_instance : IDENTIFIER dimensions '(' expression_list_with_nuls ')' '''
print('gate_instance_2', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_2(p):
'''gate_instance : IDENTIFIER dimensions '(' expression_list_with_nuls ')' '''
print('gate_instance_2', list(p))
# { lgate*tmp = new lgate;
print('gate_instance_3', list(p))
# { lgate*tmp = new lgate;
# tmp->name = "";
print('gate_instance_3', list(p))
# { lgate*tmp = new lgate;
# tmp->name = "";
# }
()
def p_gate_instance_4(p):
'''gate_instance : IDENTIFIER dimensions '''
print('gate_instance_4', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_4(p):
'''gate_instance : IDENTIFIER dimensions '''
print('gate_instance_4', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_5(p):
'''gate_instance : IDENTIFIER '(' port_name_list ')' '''
print('gate_instance_5', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_5(p):
'''gate_instance : IDENTIFIER '(' port_name_list ')' '''
print('gate_instance_5', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_6(p):
'''gate_instance : IDENTIFIER dimensions '(' port_name_list ')' '''
print('gate_instance_6', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_6(p):
'''gate_instance : IDENTIFIER dimensions '(' port_name_list ')' '''
print('gate_instance_6', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_7(p):
'''gate_instance : IDENTIFIER '(' error ')' '''
print('gate_instance_7', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_7(p):
'''gate_instance : IDENTIFIER '(' error ')' '''
print('gate_instance_7', list(p))
# { lgate*tmp = new lgate;
# tmp->parms = 0;
# tmp->parms_by_name = 0;
# tmp->file = @1.text;
# tmp->lineno = @1.first_line;
# yyerror(@2, "error: Syntax error in instance port "
# "expression(s).");
# tmp->parms = 0;
# tmp->parms_by_name = 0;
# tmp->file = @1.text;
# tmp->lineno = @1.first_line;
# yyerror(@2, "error: Syntax error in instance port "
# "expression(s).");
# }
()
def p_gate_instance_8(p):
'''gate_instance : IDENTIFIER dimensions '(' error ')' '''
print('gate_instance_8', list(p))
# { lgate*tmp = new lgate;
# }
()
def p_gate_instance_8(p):
'''gate_instance : IDENTIFIER dimensions '(' error ')' '''
print('gate_instance_8', list(p))
# { lgate*tmp = new lgate;
# tmp->parms = 0;
# tmp->parms_by_name = 0;
# tmp->file = @1.text;
# tmp->lineno = @1.first_line;
# yyerror(@3, "error: Syntax error in instance port "
# "expression(s).");
# tmp->parms = 0;
# tmp->parms_by_name = 0;
# tmp->file = @1.text;
# tmp->lineno = @1.first_line;
# yyerror(@3, "error: Syntax error in instance port "
# "expression(s).");
# }
()
def p_gate_instance_list_1(p):
'''gate_instance_list : gate_instance_list ',' gate_instance '''
print('gate_instance_list_1', list(p))
# }
()
def p_gate_instance_list_1(p):
'''gate_instance_list : gate_instance_list ',' gate_instance '''
print('gate_instance_list_1', list(p))
# }
()
def p_gate_instance_list_2(p):
'''gate_instance_list : gate_instance '''
print('gate_instance_list_2', list(p))
# { svector<lgate>*tmp = new svector<lgate>(1);
# }
()
def p_gate_instance_list_2(p):
'''gate_instance_list : gate_instance '''
print('gate_instance_list_2', list(p))
# { svector<lgate>*tmp = new svector<lgate>(1);
()
def p_gatetype_8(p):
'''gatetype : K_bufif0 '''
print('gatetype_8', list(p))
()
def p_gatetype_8(p):
'''gatetype : K_bufif0 '''
print('gatetype_8', list(p))
()
def p_gatetype_9(p):
'''gatetype : K_bufif1 '''
print('gatetype_9', list(p))
()
def p_gatetype_9(p):
'''gatetype : K_bufif1 '''
print('gatetype_9', list(p))
()
def p_gatetype_11(p):
'''gatetype : K_notif0 '''
print('gatetype_11', list(p))
()
def p_gatetype_11(p):
'''gatetype : K_notif0 '''
print('gatetype_11', list(p))
()
def p_gatetype_12(p):
'''gatetype : K_notif1 '''
print('gatetype_12', list(p))
()
def p_gatetype_12(p):
'''gatetype : K_notif1 '''
print('gatetype_12', list(p))
()
def p_switchtype_1(p):
'''switchtype : K_nmos '''
print('switchtype_1', list(p))
()
def p_switchtype_1(p):
'''switchtype : K_nmos '''
print('switchtype_1', list(p))
()
def p_switchtype_2(p):
'''switchtype : K_rnmos '''
print('switchtype_2', list(p))
()
def p_switchtype_2(p):
'''switchtype : K_rnmos '''
print('switchtype_2', list(p))
()
def p_switchtype_3(p):
'''switchtype : K_pmos '''
print('switchtype_3', list(p))
()
def p_switchtype_3(p):
'''switchtype : K_pmos '''
print('switchtype_3', list(p))
()
def p_switchtype_4(p):
'''switchtype : K_rpmos '''
print('switchtype_4', list(p))
()
def p_switchtype_4(p):
'''switchtype : K_rpmos '''
print('switchtype_4', list(p))
()
def p_switchtype_5(p):
'''switchtype : K_cmos '''
print('switchtype_5', list(p))
()
def p_switchtype_5(p):
'''switchtype : K_cmos '''
print('switchtype_5', list(p))
()
def p_switchtype_6(p):
'''switchtype : K_rcmos '''
print('switchtype_6', list(p))
()
def p_switchtype_6(p):
'''switchtype : K_rcmos '''
print('switchtype_6', list(p))
()
def p_switchtype_7(p):
'''switchtype : K_tran '''
print('switchtype_7', list(p))
()
def p_switchtype_7(p):
'''switchtype : K_tran '''
print('switchtype_7', list(p))
()
def p_switchtype_8(p):
'''switchtype : K_rtran '''
print('switchtype_8', list(p))
()
def p_switchtype_8(p):
'''switchtype : K_rtran '''
print('switchtype_8', list(p))
()
def p_switchtype_9(p):
'''switchtype : K_tranif0 '''
print('switchtype_9', list(p))
()
def p_switchtype_9(p):
'''switchtype : K_tranif0 '''
print('switchtype_9', list(p))
()
def p_switchtype_10(p):
'''switchtype : K_tranif1 '''
print('switchtype_10', list(p))
()
def p_switchtype_10(p):
'''switchtype : K_tranif1 '''
print('switchtype_10', list(p))
()
def p_switchtype_11(p):
'''switchtype : K_rtranif0 '''
print('switchtype_11', list(p))
()
def p_switchtype_11(p):
'''switchtype : K_rtranif0 '''
print('switchtype_11', list(p))
()
def p_switchtype_12(p):
'''switchtype : K_rtranif1 '''
print('switchtype_12', list(p))
()
def p_switchtype_12(p):
'''switchtype : K_rtranif1 '''
print('switchtype_12', list(p))
()
def p_hierarchy_identifier_1(p):
'''hierarchy_identifier : IDENTIFIER '''
print('hierarchy_identifier_1', list(p))
lpvalue = Leaf(token.NAME, p[1])
p[0] = lpvalue
()
def p_hierarchy_identifier_1(p):
'''hierarchy_identifier : IDENTIFIER '''
print('hierarchy_identifier_1', list(p))
lpvalue = Leaf(token.NAME, p[1])
p[0] = lpvalue
# }
()
def p_hierarchy_identifier_2(p):
'''hierarchy_identifier : hierarchy_identifier '.' IDENTIFIER '''
print('hierarchy_identifier_2', list(p))
# }
()
def p_hierarchy_identifier_2(p):
'''hierarchy_identifier : hierarchy_identifier '.' IDENTIFIER '''
print('hierarchy_identifier_2', list(p))
# }
()
def p_hierarchy_identifier_3(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression ']' '''
print('hierarchy_identifier_3', list(p))
# }
()
def p_hierarchy_identifier_3(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression ']' '''
print('hierarchy_identifier_3', list(p))
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_BIT;
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_BIT;
# }
()
def p_hierarchy_identifier_4(p):
'''hierarchy_identifier : hierarchy_identifier '[' '$' ']' '''
print('hierarchy_identifier_4', list(p))
# }
()
def p_hierarchy_identifier_4(p):
'''hierarchy_identifier : hierarchy_identifier '[' '$' ']' '''
print('hierarchy_identifier_4', list(p))
# name_component_t&tail = tmp->back();
# if (! gn_system_verilog()) {
# yyerror(@3, "error: Last element expression ($) "
# name_component_t&tail = tmp->back();
# if (! gn_system_verilog()) {
# yyerror(@3, "error: Last element expression ($) "
# }
()
def p_hierarchy_identifier_5(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression ':' expression ']' '''
print('hierarchy_identifier_5', list(p))
# }
()
def p_hierarchy_identifier_5(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression ':' expression ']' '''
print('hierarchy_identifier_5', list(p))
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_PART;
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_PART;
# }
()
def p_hierarchy_identifier_6(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression K_PO_POS expression ']' '''
print('hierarchy_identifier_6', list(p))
# }
()
def p_hierarchy_identifier_6(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression K_PO_POS expression ']' '''
print('hierarchy_identifier_6', list(p))
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_IDX_UP;
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_IDX_UP;
# }
()
def p_hierarchy_identifier_7(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression K_PO_NEG expression ']' '''
print('hierarchy_identifier_7', list(p))
# }
()
def p_hierarchy_identifier_7(p):
'''hierarchy_identifier : hierarchy_identifier '[' expression K_PO_NEG expression ']' '''
print('hierarchy_identifier_7', list(p))
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_IDX_DO;
# name_component_t&tail = tmp->back();
# index_component_t itmp;
# itmp.sel = index_component_t::SEL_IDX_DO;
# }
()
def p_list_of_identifiers_1(p):
'''list_of_identifiers : IDENTIFIER '''
print('list_of_identifiers_1', list(p))
# }
()
def p_list_of_identifiers_1(p):
'''list_of_identifiers : IDENTIFIER '''
print('list_of_identifiers_1', list(p))
()
def p_list_of_identifiers_2(p):
'''list_of_identifiers : list_of_identifiers ',' IDENTIFIER '''
print('list_of_identifiers_2', list(p))
()
def p_list_of_identifiers_2(p):
'''list_of_identifiers : list_of_identifiers ',' IDENTIFIER '''
print('list_of_identifiers_2', list(p))
()
def p_list_of_port_identifiers_1(p):
'''list_of_port_identifiers : IDENTIFIER dimensions_opt '''
print('list_of_port_identifiers_1', list(p))
()
def p_list_of_port_identifiers_1(p):
'''list_of_port_identifiers : IDENTIFIER dimensions_opt '''
print('list_of_port_identifiers_1', list(p))
()
def p_list_of_port_identifiers_2(p):
'''list_of_port_identifiers : list_of_port_identifiers ',' IDENTIFIER dimensions_opt '''
print('list_of_port_identifiers_2', list(p))
()
def p_list_of_port_identifiers_2(p):
'''list_of_port_identifiers : list_of_port_identifiers ',' IDENTIFIER dimensions_opt '''
print('list_of_port_identifiers_2', list(p))
- # { $$ = make_port_list($1, $3, $4, 0); }
+ # { p[0] = make_port_list(p[1], p[3], p[4], 0); }
()
def p_list_of_variable_port_identifiers_1(p):
'''list_of_variable_port_identifiers : IDENTIFIER dimensions_opt '''
print('list_of_variable_port_identifiers_1', list(p))
()
def p_list_of_variable_port_identifiers_1(p):
'''list_of_variable_port_identifiers : IDENTIFIER dimensions_opt '''
print('list_of_variable_port_identifiers_1', list(p))
()
def p_list_of_variable_port_identifiers_2(p):
'''list_of_variable_port_identifiers : IDENTIFIER dimensions_opt '=' expression '''
print('list_of_variable_port_identifiers_2', list(p))
()
def p_list_of_variable_port_identifiers_2(p):
'''list_of_variable_port_identifiers : IDENTIFIER dimensions_opt '=' expression '''
print('list_of_variable_port_identifiers_2', list(p))
()
def p_list_of_variable_port_identifiers_3(p):
'''list_of_variable_port_identifiers : list_of_variable_port_identifiers ',' IDENTIFIER dimensions_opt '''
print('list_of_variable_port_identifiers_3', list(p))
()
def p_list_of_variable_port_identifiers_3(p):
'''list_of_variable_port_identifiers : list_of_variable_port_identifiers ',' IDENTIFIER dimensions_opt '''
print('list_of_variable_port_identifiers_3', list(p))
- # { $$ = make_port_list($1, $3, $4, 0); }
+ # { p[0] = make_port_list(p[1], p[3], p[4], 0); }
()
def p_list_of_variable_port_identifiers_4(p):
'''list_of_variable_port_identifiers : list_of_variable_port_identifiers ',' IDENTIFIER dimensions_opt '=' expression '''
print('list_of_variable_port_identifiers_4', list(p))
()
def p_list_of_variable_port_identifiers_4(p):
'''list_of_variable_port_identifiers : list_of_variable_port_identifiers ',' IDENTIFIER dimensions_opt '=' expression '''
print('list_of_variable_port_identifiers_4', list(p))
- # { $$ = make_port_list($1, $3, $4, $6); }
+ # { p[0] = make_port_list(p[1], p[3], p[4], p[6]); }
()
def p_list_of_ports_1(p):
'''list_of_ports : port_opt '''
print('list_of_ports_1', list(p))
# { vector<Module::port_t*>*tmp
# = new vector<Module::port_t*>(1);
()
def p_list_of_ports_1(p):
'''list_of_ports : port_opt '''
print('list_of_ports_1', list(p))
# { vector<Module::port_t*>*tmp
# = new vector<Module::port_t*>(1);
# }
()
def p_list_of_ports_2(p):
'''list_of_ports : list_of_ports ',' port_opt '''
print('list_of_ports_2', list(p))
# }
()
def p_list_of_ports_2(p):
'''list_of_ports : list_of_ports ',' port_opt '''
print('list_of_ports_2', list(p))
# }
()
def p_list_of_port_declarations_3(p):
'''list_of_port_declarations : list_of_port_declarations ',' IDENTIFIER '''
print('list_of_port_declarations_3', list(p))
# { Module::port_t*ptmp;
# }
()
def p_list_of_port_declarations_3(p):
'''list_of_port_declarations : list_of_port_declarations ',' IDENTIFIER '''
print('list_of_port_declarations_3', list(p))
# { Module::port_t*ptmp;
# port_declaration_context.port_type,
# port_declaration_context.port_net_type,
# port_declaration_context.data_type, 0);
# port_declaration_context.port_type,
# port_declaration_context.port_net_type,
# port_declaration_context.data_type, 0);
comment, dt, name = p[2], p[4], p[5]
p[0] = port_decl(comment, dt, name)
# { Module::port_t*ptmp;
comment, dt, name = p[2], p[4], p[5]
p[0] = port_decl(comment, dt, name)
# { Module::port_t*ptmp;
- # perm_string name = lex_strings.make($5);
- # data_type_t*use_type = $4;
- # if ($6) use_type = new uarray_type_t(use_type, $6);
+ # perm_string name = lex_strings.make(p[5]);
+ # data_type_t*use_type = p[4];
+ # if (p[6]) use_type = new uarray_type_t(use_type, p[6]);
- # pform_module_define_port(@2, name, NetNet::PINPUT, $3, use_type, $1);
+ # pform_module_define_port(@2, name, NetNet::PINPUT, p[3], use_type, p[1]);
# }
()
def p_port_declaration_2(p):
'''port_declaration : attribute_list_opt K_input K_wreal IDENTIFIER '''
print('port_declaration_2', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_declaration_2(p):
'''port_declaration : attribute_list_opt K_input K_wreal IDENTIFIER '''
print('port_declaration_2', list(p))
# { Module::port_t*ptmp;
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::PINPUT,
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::PINPUT,
# port_declaration_context.port_type = NetNet::PINPUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
# port_declaration_context.port_type = NetNet::PINPUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
# }
()
def p_port_declaration_3(p):
'''port_declaration : attribute_list_opt K_inout net_type_opt data_type_or_implicit IDENTIFIER dimensions_opt '''
print('port_declaration_3', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_declaration_3(p):
'''port_declaration : attribute_list_opt K_inout net_type_opt data_type_or_implicit IDENTIFIER dimensions_opt '''
print('port_declaration_3', list(p))
# { Module::port_t*ptmp;
- # pform_module_define_port(@2, name, NetNet::PINOUT, $3, $4, $1);
+ # pform_module_define_port(@2, name, NetNet::PINOUT, p[3], p[4], p[1]);
# }
()
def p_port_declaration_4(p):
'''port_declaration : attribute_list_opt K_inout K_wreal IDENTIFIER '''
print('port_declaration_4', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_declaration_4(p):
'''port_declaration : attribute_list_opt K_inout K_wreal IDENTIFIER '''
print('port_declaration_4', list(p))
# { Module::port_t*ptmp;
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::PINOUT,
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::PINOUT,
# port_declaration_context.port_type = NetNet::PINOUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
# port_declaration_context.port_type = NetNet::PINOUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
comment, dt, name = p[2], p[4], p[5]
p[0] = port_decl(comment, dt, name)
# { Module::port_t*ptmp;
comment, dt, name = p[2], p[4], p[5]
p[0] = port_decl(comment, dt, name)
# { Module::port_t*ptmp;
- # perm_string name = lex_strings.make($5);
- # data_type_t*use_dtype = $4;
- # if ($6) use_dtype = new uarray_type_t(use_dtype, $6);
- # NetNet::Type use_type = $3;
+ # perm_string name = lex_strings.make(p[5]);
+ # data_type_t*use_dtype = p[4];
+ # if (p[6]) use_dtype = new uarray_type_t(use_dtype, p[6]);
+ # NetNet::Type use_type = p[3];
# if(etype->base_type == IVL_VT_LOGIC)
# use_type = NetNet::IMPLICIT_REG;
# }
# }
# ptmp = pform_module_port_reference(name, @2.text, @2.first_line);
# if(etype->base_type == IVL_VT_LOGIC)
# use_type = NetNet::IMPLICIT_REG;
# }
# }
# ptmp = pform_module_port_reference(name, @2.text, @2.first_line);
- # pform_module_define_port(@2, name, NetNet::POUTPUT, use_type, use_dtype, $1);
+ # pform_module_define_port(@2, name, NetNet::POUTPUT, use_type, use_dtype, p[1]);
# port_declaration_context.port_type = NetNet::POUTPUT;
# port_declaration_context.port_net_type = use_type;
# port_declaration_context.port_type = NetNet::POUTPUT;
# port_declaration_context.port_net_type = use_type;
# }
()
def p_port_declaration_6(p):
'''port_declaration : attribute_list_opt K_output K_wreal IDENTIFIER '''
print('port_declaration_6', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_declaration_6(p):
'''port_declaration : attribute_list_opt K_output K_wreal IDENTIFIER '''
print('port_declaration_6', list(p))
# { Module::port_t*ptmp;
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::POUTPUT,
# ptmp = pform_module_port_reference(name, @2.text,
# @2.first_line);
# real_type_t*real_type = new real_type_t(real_type_t::REAL);
# FILE_NAME(real_type, @3);
# pform_module_define_port(@2, name, NetNet::POUTPUT,
# port_declaration_context.port_type = NetNet::POUTPUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
# port_declaration_context.port_type = NetNet::POUTPUT;
# port_declaration_context.port_net_type = NetNet::WIRE;
# port_declaration_context.data_type = real_type;
# }
()
def p_port_declaration_7(p):
'''port_declaration : attribute_list_opt K_output net_type_opt data_type_or_implicit IDENTIFIER '=' expression '''
print('port_declaration_7', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_declaration_7(p):
'''port_declaration : attribute_list_opt K_output net_type_opt data_type_or_implicit IDENTIFIER '=' expression '''
print('port_declaration_7', list(p))
# { Module::port_t*ptmp;
- # pform_module_define_port(@2, name, NetNet::POUTPUT, use_type, $4, $1);
+ # pform_module_define_port(@2, name, NetNet::POUTPUT, use_type, p[4], p[1]);
# port_declaration_context.port_type = NetNet::PINOUT;
# port_declaration_context.port_net_type = use_type;
# port_declaration_context.port_type = NetNet::PINOUT;
# port_declaration_context.port_net_type = use_type;
def p_atom2_type_1(p):
'''atom2_type : K_byte '''
print('atom2_type_1', list(p))
def p_atom2_type_1(p):
'''atom2_type : K_byte '''
print('atom2_type_1', list(p))
()
def p_atom2_type_2(p):
'''atom2_type : K_shortint '''
print('atom2_type_2', list(p))
()
def p_atom2_type_2(p):
'''atom2_type : K_shortint '''
print('atom2_type_2', list(p))
()
def p_atom2_type_3(p):
'''atom2_type : K_int '''
print('atom2_type_3', list(p))
()
def p_atom2_type_3(p):
'''atom2_type : K_int '''
print('atom2_type_3', list(p))
()
def p_atom2_type_4(p):
'''atom2_type : K_longint '''
print('atom2_type_4', list(p))
()
def p_atom2_type_4(p):
'''atom2_type : K_longint '''
print('atom2_type_4', list(p))
()
def p_lpvalue_1(p):
'''lpvalue : hierarchy_identifier '''
print('lpvalue_1', list(p))
p[0] = p[1]
()
def p_lpvalue_1(p):
'''lpvalue : hierarchy_identifier '''
print('lpvalue_1', list(p))
p[0] = p[1]
# }
()
def p_lpvalue_2(p):
'''lpvalue : implicit_class_handle '.' hierarchy_identifier '''
print('lpvalue_2', list(p))
# }
()
def p_lpvalue_2(p):
'''lpvalue : implicit_class_handle '.' hierarchy_identifier '''
print('lpvalue_2', list(p))
- # { pform_name_t*t_name = $1;
- # while (!$3->empty()) {
- # t_name->push_back($3->front());
- # $3->pop_front();
+ # { pform_name_t*t_name = p[1];
+ # while (!p[3]->empty()) {
+ # t_name->push_back(p[3]->front());
+ # p[3]->pop_front();
# }
()
def p_lpvalue_3(p):
'''lpvalue : '{' expression_list_proper '}' '''
print('lpvalue_3', list(p))
# }
()
def p_lpvalue_3(p):
'''lpvalue : '{' expression_list_proper '}' '''
print('lpvalue_3', list(p))
'''cont_assign : lpvalue '=' expression '''
print('cont_assign_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''cont_assign : lpvalue '=' expression '''
print('cont_assign_1', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
# }
()
def p_cont_assign_list_1(p):
'''cont_assign_list : cont_assign_list ',' cont_assign '''
print('cont_assign_list_1', list(p))
# }
()
def p_cont_assign_list_1(p):
'''cont_assign_list : cont_assign_list ',' cont_assign '''
print('cont_assign_list_1', list(p))
- # { list<PExpr*>*tmp = $1;
- # tmp->splice(tmp->end(), *$3);
- # delete $3;
- # $$ = tmp;
+ # { list<PExpr*>*tmp = p[1];
+ # tmp->splice(tmp->end(), *p[3]);
+ # delete p[3];
+ # p[0] = tmp;
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
# // endlabel_opt but still have the pform_endmodule() called
# // early enough that the lexor can know we are outside the
# // module.
- # { pform_startmodule(@2, $4, $2==K_program, $2==K_interface, $3, $1); }
+ # { pform_startmodule(@2, p[4], p[2]==K_program, p[2]==K_interface, p[3], p[1]); }
# }
()
def p_module_start_1(p):
'''module_start : K_module '''
print('module_start_1', list(p))
# }
()
def p_module_start_1(p):
'''module_start : K_module '''
print('module_start_1', list(p))
()
def p_module_start_2(p):
'''module_start : K_macromodule '''
print('module_start_2', list(p))
()
def p_module_start_2(p):
'''module_start : K_macromodule '''
print('module_start_2', list(p))
()
def p_module_start_3(p):
'''module_start : K_program '''
print('module_start_3', list(p))
()
def p_module_start_3(p):
'''module_start : K_program '''
print('module_start_3', list(p))
()
def p_module_start_4(p):
'''module_start : K_interface '''
print('module_start_4', list(p))
()
def p_module_start_4(p):
'''module_start : K_interface '''
print('module_start_4', list(p))
()
def p_module_end_1(p):
'''module_end : K_endmodule '''
print('module_end_1', list(p))
()
def p_module_end_1(p):
'''module_end : K_endmodule '''
print('module_end_1', list(p))
()
def p_module_end_2(p):
'''module_end : K_endprogram '''
print('module_end_2', list(p))
()
def p_module_end_2(p):
'''module_end : K_endprogram '''
print('module_end_2', list(p))
()
def p_module_end_3(p):
'''module_end : K_endinterface '''
print('module_end_3', list(p))
()
def p_module_end_3(p):
'''module_end : K_endinterface '''
print('module_end_3', list(p))
def p_module_item_2(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit delay3_opt net_variable_list ';' '''
print('module_item_2', list(p))
def p_module_item_2(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit delay3_opt net_variable_list ';' '''
print('module_item_2', list(p))
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
- # pform_set_data_type(@2, data_type, $5, $2, $1);
- # if ($4 != 0) {
+ # pform_set_data_type(@2, data_type, p[5], p[2], p[1]);
+ # if (p[4] != 0) {
# }
()
def p_module_item_3(p):
'''module_item : attribute_list_opt K_wreal delay3 net_variable_list ';' '''
print('module_item_3', list(p))
# { real_type_t*tmpt = new real_type_t(real_type_t::REAL);
# }
()
def p_module_item_3(p):
'''module_item : attribute_list_opt K_wreal delay3 net_variable_list ';' '''
print('module_item_3', list(p))
# { real_type_t*tmpt = new real_type_t(real_type_t::REAL);
- # pform_set_data_type(@2, tmpt, $4, NetNet::WIRE, $1);
- # if ($3 != 0) {
+ # pform_set_data_type(@2, tmpt, p[4], NetNet::WIRE, p[1]);
+ # if (p[3] != 0) {
# }
()
def p_module_item_4(p):
'''module_item : attribute_list_opt K_wreal net_variable_list ';' '''
print('module_item_4', list(p))
# { real_type_t*tmpt = new real_type_t(real_type_t::REAL);
# }
()
def p_module_item_4(p):
'''module_item : attribute_list_opt K_wreal net_variable_list ';' '''
print('module_item_4', list(p))
# { real_type_t*tmpt = new real_type_t(real_type_t::REAL);
- # pform_set_data_type(@2, tmpt, $3, NetNet::WIRE, $1);
- # delete $1;
+ # pform_set_data_type(@2, tmpt, p[3], NetNet::WIRE, p[1]);
+ # delete p[1];
# }
()
def p_module_item_5(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit delay3_opt net_decl_assigns ';' '''
print('module_item_5', list(p))
# }
()
def p_module_item_5(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit delay3_opt net_decl_assigns ';' '''
print('module_item_5', list(p))
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
- # pform_makewire(@2, $4, str_strength, $5, $2, data_type);
- # if ($1) {
+ # pform_makewire(@2, p[4], str_strength, p[5], p[2], data_type);
+ # if (p[1]) {
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
# }
# }
()
def p_module_item_6(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit drive_strength net_decl_assigns ';' '''
print('module_item_6', list(p))
# }
# }
()
def p_module_item_6(p):
'''module_item : attribute_list_opt net_type data_type_or_implicit drive_strength net_decl_assigns ';' '''
print('module_item_6', list(p))
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
# if (data_type == 0) {
# data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
# FILE_NAME(data_type, @2);
# }
- # pform_makewire(@2, 0, $4, $5, $2, data_type);
- # if ($1) {
+ # pform_makewire(@2, 0, p[4], p[5], p[2], data_type);
+ # if (p[1]) {
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
'''module_item : attribute_list_opt K_wreal net_decl_assigns ';' '''
print('module_item_7', list(p))
# { real_type_t*data_type = new real_type_t(real_type_t::REAL);
'''module_item : attribute_list_opt K_wreal net_decl_assigns ';' '''
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, $3, NetNet::WIRE, data_type);
- # if ($1) {
+ # pform_makewire(@2, 0, str_strength, p[3], NetNet::WIRE, data_type);
+ # if (p[1]) {
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
# yywarn(@2, "Attributes are not supported on net declaration "
# "assignments and will be discarded.");
'''module_item : K_trireg charge_strength_opt dimensions_opt delay3_opt list_of_identifiers ';' '''
print('module_item_8', list(p))
# { yyerror(@1, "sorry: trireg nets not supported.");
'''module_item : K_trireg charge_strength_opt dimensions_opt delay3_opt list_of_identifiers ';' '''
print('module_item_8', list(p))
# { yyerror(@1, "sorry: trireg nets not supported.");
# }
()
def p_module_item_9(p):
'''module_item : attribute_list_opt port_direction net_type data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_9', list(p))
# }
()
def p_module_item_9(p):
'''module_item : attribute_list_opt port_direction net_type data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_9', list(p))
- # { pform_module_define_port(@2, $5, $2, $3, $4, $1); }
+ # { pform_module_define_port(@2, p[5], p[2], p[3], p[4], p[1]); }
()
def p_module_item_10(p):
'''module_item : attribute_list_opt port_direction K_wreal list_of_port_identifiers ';' '''
print('module_item_10', list(p))
# { real_type_t*real_type = new real_type_t(real_type_t::REAL);
()
def p_module_item_10(p):
'''module_item : attribute_list_opt port_direction K_wreal list_of_port_identifiers ';' '''
print('module_item_10', list(p))
# { real_type_t*real_type = new real_type_t(real_type_t::REAL);
- # pform_module_define_port(@2, $4, $2, NetNet::WIRE, real_type, $1);
+ # pform_module_define_port(@2, p[4], p[2], NetNet::WIRE, real_type, p[1]);
# }
()
def p_module_item_11(p):
'''module_item : attribute_list_opt K_inout data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_11', list(p))
# }
()
def p_module_item_11(p):
'''module_item : attribute_list_opt K_inout data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_11', list(p))
- # { NetNet::Type use_type = $3 ? NetNet::IMPLICIT : NetNet::NONE;
- # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> ($3)) {
+ # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE;
+ # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> (p[3])) {
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# }
# if (use_type == NetNet::NONE)
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# }
# if (use_type == NetNet::NONE)
- # pform_set_port_type(@2, $4, NetNet::PINOUT, $3, $1);
+ # pform_set_port_type(@2, p[4], NetNet::PINOUT, p[3], p[1]);
- # pform_module_define_port(@2, $4, NetNet::PINOUT, use_type, $3, $1);
+ # pform_module_define_port(@2, p[4], NetNet::PINOUT, use_type, p[3], p[1]);
# }
()
def p_module_item_12(p):
'''module_item : attribute_list_opt K_input data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_12', list(p))
# }
()
def p_module_item_12(p):
'''module_item : attribute_list_opt K_input data_type_or_implicit list_of_port_identifiers ';' '''
print('module_item_12', list(p))
- # { NetNet::Type use_type = $3 ? NetNet::IMPLICIT : NetNet::NONE;
- # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> ($3)) {
+ # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE;
+ # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> (p[3])) {
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# }
# if (use_type == NetNet::NONE)
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# }
# if (use_type == NetNet::NONE)
- # pform_set_port_type(@2, $4, NetNet::PINPUT, $3, $1);
+ # pform_set_port_type(@2, p[4], NetNet::PINPUT, p[3], p[1]);
- # pform_module_define_port(@2, $4, NetNet::PINPUT, use_type, $3, $1);
+ # pform_module_define_port(@2, p[4], NetNet::PINPUT, use_type, p[3], p[1]);
# }
()
def p_module_item_13(p):
'''module_item : attribute_list_opt K_output data_type_or_implicit list_of_variable_port_identifiers ';' '''
print('module_item_13', list(p))
# }
()
def p_module_item_13(p):
'''module_item : attribute_list_opt K_output data_type_or_implicit list_of_variable_port_identifiers ';' '''
print('module_item_13', list(p))
- # { NetNet::Type use_type = $3 ? NetNet::IMPLICIT : NetNet::NONE;
- # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> ($3)) {
+ # { NetNet::Type use_type = p[3] ? NetNet::IMPLICIT : NetNet::NONE;
+ # if (vector_type_t*dtype = dynamic_cast<vector_type_t*> (p[3])) {
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# else if (dtype->reg_flag)
# if (dtype->implicit_flag)
# use_type = NetNet::NONE;
# else if (dtype->reg_flag)
# if(etype->base_type == IVL_VT_LOGIC)
# use_type = NetNet::IMPLICIT_REG;
# }
# if (use_type == NetNet::NONE)
# if(etype->base_type == IVL_VT_LOGIC)
# use_type = NetNet::IMPLICIT_REG;
# }
# if (use_type == NetNet::NONE)
- # pform_set_port_type(@2, $4, NetNet::POUTPUT, $3, $1);
+ # pform_set_port_type(@2, p[4], NetNet::POUTPUT, p[3], p[1]);
- # pform_module_define_port(@2, $4, NetNet::POUTPUT, use_type, $3, $1);
+ # pform_module_define_port(@2, p[4], NetNet::POUTPUT, use_type, p[3], p[1]);
# }
()
def p_module_item_14(p):
'''module_item : attribute_list_opt port_direction net_type data_type_or_implicit error ';' '''
print('module_item_14', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
# }
()
def p_module_item_14(p):
'''module_item : attribute_list_opt port_direction net_type data_type_or_implicit error ';' '''
print('module_item_14', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_inout data_type_or_implicit error ';' '''
print('module_item_15', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_inout data_type_or_implicit error ';' '''
print('module_item_15', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_input data_type_or_implicit error ';' '''
print('module_item_16', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_input data_type_or_implicit error ';' '''
print('module_item_16', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_output data_type_or_implicit error ';' '''
print('module_item_17', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
'''module_item : attribute_list_opt K_output data_type_or_implicit error ';' '''
print('module_item_17', list(p))
# { yyerror(@2, "error: Invalid variable list in port declaration.");
# yyerrok;
# }
()
def p_module_item_18(p):
'''module_item : DISCIPLINE_IDENTIFIER list_of_identifiers ';' '''
print('module_item_18', list(p))
# yyerrok;
# }
()
def p_module_item_18(p):
'''module_item : DISCIPLINE_IDENTIFIER list_of_identifiers ';' '''
print('module_item_18', list(p))
def p_module_item_21(p):
'''module_item : attribute_list_opt gatetype gate_instance_list ';' '''
print('module_item_21', list(p))
def p_module_item_21(p):
'''module_item : attribute_list_opt gatetype gate_instance_list ';' '''
print('module_item_21', list(p))
- # { pform_makegates(@2, $2, str_strength, 0, $3, $1); }
+ # { pform_makegates(@2, p[2], str_strength, 0, p[3], p[1]); }
()
def p_module_item_22(p):
'''module_item : attribute_list_opt gatetype delay3 gate_instance_list ';' '''
print('module_item_22', list(p))
()
def p_module_item_22(p):
'''module_item : attribute_list_opt gatetype delay3 gate_instance_list ';' '''
print('module_item_22', list(p))
- # { pform_makegates(@2, $2, str_strength, $3, $4, $1); }
+ # { pform_makegates(@2, p[2], str_strength, p[3], p[4], p[1]); }
()
def p_module_item_23(p):
'''module_item : attribute_list_opt gatetype drive_strength gate_instance_list ';' '''
print('module_item_23', list(p))
()
def p_module_item_23(p):
'''module_item : attribute_list_opt gatetype drive_strength gate_instance_list ';' '''
print('module_item_23', list(p))
- # { pform_makegates(@2, $2, $3, 0, $4, $1); }
+ # { pform_makegates(@2, p[2], p[3], 0, p[4], p[1]); }
()
def p_module_item_24(p):
'''module_item : attribute_list_opt gatetype drive_strength delay3 gate_instance_list ';' '''
print('module_item_24', list(p))
()
def p_module_item_24(p):
'''module_item : attribute_list_opt gatetype drive_strength delay3 gate_instance_list ';' '''
print('module_item_24', list(p))
- # { pform_makegates(@2, $2, $3, $4, $5, $1); }
+ # { pform_makegates(@2, p[2], p[3], p[4], p[5], p[1]); }
()
def p_module_item_25(p):
'''module_item : attribute_list_opt switchtype gate_instance_list ';' '''
print('module_item_25', list(p))
()
def p_module_item_25(p):
'''module_item : attribute_list_opt switchtype gate_instance_list ';' '''
print('module_item_25', list(p))
- # { pform_makegates(@2, $2, str_strength, 0, $3, $1); }
+ # { pform_makegates(@2, p[2], str_strength, 0, p[3], p[1]); }
()
def p_module_item_26(p):
'''module_item : attribute_list_opt switchtype delay3 gate_instance_list ';' '''
print('module_item_26', list(p))
()
def p_module_item_26(p):
'''module_item : attribute_list_opt switchtype delay3 gate_instance_list ';' '''
print('module_item_26', list(p))
- # { pform_makegates(@2, $2, str_strength, $3, $4, $1); }
+ # { pform_makegates(@2, p[2], str_strength, p[3], p[4], p[1]); }
()
def p_module_item_27(p):
'''module_item : K_pullup gate_instance_list ';' '''
print('module_item_27', list(p))
()
def p_module_item_27(p):
'''module_item : K_pullup gate_instance_list ';' '''
print('module_item_27', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLUP, pull_strength, 0, $2, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLUP, pull_strength, 0, p[2], 0); }
()
def p_module_item_28(p):
'''module_item : K_pulldown gate_instance_list ';' '''
print('module_item_28', list(p))
()
def p_module_item_28(p):
'''module_item : K_pulldown gate_instance_list ';' '''
print('module_item_28', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLDOWN, pull_strength, 0, $2, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLDOWN, pull_strength, 0, p[2], 0); }
()
def p_module_item_29(p):
'''module_item : K_pullup '(' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_29', list(p))
()
def p_module_item_29(p):
'''module_item : K_pullup '(' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_29', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLUP, $3, 0, $5, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLUP, p[3], 0, p[5], 0); }
()
def p_module_item_30(p):
'''module_item : K_pullup '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_30', list(p))
()
def p_module_item_30(p):
'''module_item : K_pullup '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_30', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLUP, $3, 0, $7, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLUP, p[3], 0, p[7], 0); }
()
def p_module_item_31(p):
'''module_item : K_pullup '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_31', list(p))
()
def p_module_item_31(p):
'''module_item : K_pullup '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_31', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLUP, $5, 0, $7, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLUP, p[5], 0, p[7], 0); }
()
def p_module_item_32(p):
'''module_item : K_pulldown '(' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_32', list(p))
()
def p_module_item_32(p):
'''module_item : K_pulldown '(' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_32', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLDOWN, $3, 0, $5, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[3], 0, p[5], 0); }
()
def p_module_item_33(p):
'''module_item : K_pulldown '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_33', list(p))
()
def p_module_item_33(p):
'''module_item : K_pulldown '(' dr_strength1 ',' dr_strength0 ')' gate_instance_list ';' '''
print('module_item_33', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLDOWN, $5, 0, $7, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[5], 0, p[7], 0); }
()
def p_module_item_34(p):
'''module_item : K_pulldown '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_34', list(p))
()
def p_module_item_34(p):
'''module_item : K_pulldown '(' dr_strength0 ',' dr_strength1 ')' gate_instance_list ';' '''
print('module_item_34', list(p))
- # { pform_makegates(@1, PGBuiltin::PULLDOWN, $3, 0, $7, 0); }
+ # { pform_makegates(@1, PGBuiltin::PULLDOWN, p[3], 0, p[7], 0); }
()
def p_module_item_35(p):
'''module_item : attribute_list_opt IDENTIFIER parameter_value_opt gate_instance_list ';' '''
print('module_item_35', list(p))
()
def p_module_item_35(p):
'''module_item : attribute_list_opt IDENTIFIER parameter_value_opt gate_instance_list ';' '''
print('module_item_35', list(p))
- # { perm_string tmp1 = lex_strings.make($2);
- # pform_make_modgates(@2, tmp1, $3, $4, $1);
- # delete[]$2;
+ # { perm_string tmp1 = lex_strings.make(p[2]);
+ # pform_make_modgates(@2, tmp1, p[3], p[4], p[1]);
+ # delete[]p[2];
# }
()
def p_module_item_36(p):
'''module_item : attribute_list_opt IDENTIFIER parameter_value_opt error ';' '''
print('module_item_36', list(p))
# { yyerror(@2, "error: Invalid module instantiation");
# }
()
def p_module_item_36(p):
'''module_item : attribute_list_opt IDENTIFIER parameter_value_opt error ';' '''
print('module_item_36', list(p))
# { yyerror(@2, "error: Invalid module instantiation");
# }
()
def p_module_item_37(p):
'''module_item : K_assign drive_strength_opt delay3_opt cont_assign_list ';' '''
print('module_item_37', list(p))
# }
()
def p_module_item_37(p):
'''module_item : K_assign drive_strength_opt delay3_opt cont_assign_list ';' '''
print('module_item_37', list(p))
- # { pform_make_pgassign_list($4, $3, $2, @1.text, @1.first_line); }
+ # { pform_make_pgassign_list(p[4], p[3], p[2], @1.text, @1.first_line); }
()
def p_module_item_38(p):
'''module_item : attribute_list_opt K_always statement_item '''
print('module_item_38', list(p))
()
def p_module_item_38(p):
'''module_item : attribute_list_opt K_always statement_item '''
print('module_item_38', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_39(p):
'''module_item : attribute_list_opt K_always_comb statement_item '''
print('module_item_39', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_39(p):
'''module_item : attribute_list_opt K_always_comb statement_item '''
print('module_item_39', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_40(p):
'''module_item : attribute_list_opt K_always_ff statement_item '''
print('module_item_40', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_40(p):
'''module_item : attribute_list_opt K_always_ff statement_item '''
print('module_item_40', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_41(p):
'''module_item : attribute_list_opt K_always_latch statement_item '''
print('module_item_41', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_41(p):
'''module_item : attribute_list_opt K_always_latch statement_item '''
print('module_item_41', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_42(p):
'''module_item : attribute_list_opt K_initial statement_item '''
print('module_item_42', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_42(p):
'''module_item : attribute_list_opt K_initial statement_item '''
print('module_item_42', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_43(p):
'''module_item : attribute_list_opt K_final statement_item '''
print('module_item_43', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_43(p):
'''module_item : attribute_list_opt K_final statement_item '''
print('module_item_43', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_44(p):
'''module_item : attribute_list_opt K_analog analog_statement '''
print('module_item_44', list(p))
# FILE_NAME(tmp, @2);
# }
()
def p_module_item_44(p):
'''module_item : attribute_list_opt K_analog analog_statement '''
print('module_item_44', list(p))
def p_module_item_51(p):
'''module_item : K_genvar list_of_identifiers ';' '''
print('module_item_51', list(p))
def p_module_item_51(p):
'''module_item : K_genvar list_of_identifiers ';' '''
print('module_item_51', list(p))
print('module_item_64', list(p))
# { yyerror(@1, "error: I give up on this "
# "function definition.");
print('module_item_64', list(p))
# { yyerror(@1, "error: I give up on this "
# "function definition.");
# if (!gn_system_verilog()) {
# yyerror(@4, "error: Function end names require "
# "SystemVerilog.");
# }
# if (!gn_system_verilog()) {
# yyerror(@4, "error: Function end names require "
# "SystemVerilog.");
# }
def p_module_item_65(p):
'''module_item : KK_attribute '(' IDENTIFIER ',' STRING ',' STRING ')' ';' '''
print('module_item_65', list(p))
def p_module_item_65(p):
'''module_item : KK_attribute '(' IDENTIFIER ',' STRING ',' STRING ')' ';' '''
print('module_item_65', list(p))
- # { perm_string tmp3 = lex_strings.make($3);
- # perm_string tmp5 = lex_strings.make($5);
- # pform_set_attrib(tmp3, tmp5, $7);
- # delete[] $3;
- # delete[] $5;
+ # { perm_string tmp3 = lex_strings.make(p[3]);
+ # perm_string tmp5 = lex_strings.make(p[5]);
+ # pform_set_attrib(tmp3, tmp5, p[7]);
+ # delete[] p[3];
+ # delete[] p[5];
- # { pform_start_generate_for(@1, $3, $5, $7, $9, $11); }
+ # { pform_start_generate_for(@1, p[3], p[5], p[7], p[9], p[11]); }
def p_generate_if_1(p):
'''generate_if : K_if '(' expression ')' '''
print('generate_if_1', list(p))
def p_generate_if_1(p):
'''generate_if : K_if '(' expression ')' '''
print('generate_if_1', list(p))
def p_generate_block_3(p):
'''generate_block : K_begin ':' IDENTIFIER generate_item_list_opt K_end endlabel_opt '''
print('generate_block_3', list(p))
def p_generate_block_3(p):
'''generate_block : K_begin ':' IDENTIFIER generate_item_list_opt K_end endlabel_opt '''
print('generate_block_3', list(p))
- # { pform_generate_block_name($3);
- # if ($6) {
- # if (strcmp($3,$6) != 0) {
+ # { pform_generate_block_name(p[3]);
+ # if (p[6]) {
+ # if (strcmp(p[3],p[6]) != 0) {
print('net_decl_assign_1', list(p))
# { net_decl_assign_t*tmp = new net_decl_assign_t;
# tmp->next = tmp;
print('net_decl_assign_1', list(p))
# { net_decl_assign_t*tmp = new net_decl_assign_t;
# tmp->next = tmp;
# }
()
def p_net_decl_assigns_1(p):
'''net_decl_assigns : net_decl_assigns ',' net_decl_assign '''
print('net_decl_assigns_1', list(p))
# }
()
def p_net_decl_assigns_1(p):
'''net_decl_assigns : net_decl_assigns ',' net_decl_assign '''
print('net_decl_assigns_1', list(p))
# }
()
def p_net_decl_assigns_2(p):
'''net_decl_assigns : net_decl_assign '''
print('net_decl_assigns_2', list(p))
# }
()
def p_net_decl_assigns_2(p):
'''net_decl_assigns : net_decl_assign '''
print('net_decl_assigns_2', list(p))
# }
()
def p_bit_logic_1(p):
'''bit_logic : K_logic '''
print('bit_logic_1', list(p))
# }
()
def p_bit_logic_1(p):
'''bit_logic : K_logic '''
print('bit_logic_1', list(p))
()
def p_bit_logic_2(p):
'''bit_logic : K_bool '''
print('bit_logic_2', list(p))
()
def p_bit_logic_2(p):
'''bit_logic : K_bool '''
print('bit_logic_2', list(p))
def p_bit_logic_opt_2(p):
'''bit_logic_opt : '''
print('bit_logic_opt_2', list(p))
def p_bit_logic_opt_2(p):
'''bit_logic_opt : '''
print('bit_logic_opt_2', list(p))
()
def p_net_type_4(p):
'''net_type : K_supply0 '''
print('net_type_4', list(p))
()
def p_net_type_4(p):
'''net_type : K_supply0 '''
print('net_type_4', list(p))
()
def p_net_type_6(p):
'''net_type : K_triand '''
print('net_type_6', list(p))
()
def p_net_type_6(p):
'''net_type : K_triand '''
print('net_type_6', list(p))
()
def p_net_type_8(p):
'''net_type : K_supply1 '''
print('net_type_8', list(p))
()
def p_net_type_8(p):
'''net_type : K_supply1 '''
print('net_type_8', list(p))
()
def p_net_type_10(p):
'''net_type : K_trior '''
print('net_type_10', list(p))
()
def p_net_type_10(p):
'''net_type : K_trior '''
print('net_type_10', list(p))
# cerr << @1.text << ":" << @1.first_line << ": warning: "
# "'wone' is deprecated, please use 'uwire' "
# "instead." << endl;
# cerr << @1.text << ":" << @1.first_line << ": warning: "
# "'wone' is deprecated, please use 'uwire' "
# "instead." << endl;
def p_net_type_12(p):
'''net_type : K_uwire '''
print('net_type_12', list(p))
def p_net_type_12(p):
'''net_type : K_uwire '''
print('net_type_12', list(p))
()
def p_param_type_1(p):
'''param_type : bit_logic_opt unsigned_signed_opt dimensions_opt '''
print('param_type_1', list(p))
()
def p_param_type_1(p):
'''param_type : bit_logic_opt unsigned_signed_opt dimensions_opt '''
print('param_type_1', list(p))
- # { param_active_range = $3;
- # param_active_signed = $2;
- # if (($1 == IVL_VT_NO_TYPE) && ($3 != 0))
+ # { param_active_range = p[3];
+ # param_active_signed = p[2];
+ # if ((p[1] == IVL_VT_NO_TYPE) && (p[3] != 0))
def p_param_type_5(p):
'''param_type : atom2_type '''
print('param_type_5', list(p))
def p_param_type_5(p):
'''param_type : atom2_type '''
print('param_type_5', list(p))
def p_param_type_6(p):
'''param_type : TYPE_IDENTIFIER '''
print('param_type_6', list(p))
def p_param_type_6(p):
'''param_type : TYPE_IDENTIFIER '''
print('param_type_6', list(p))
- # { pform_set_param_from_type(@1, $1.type, $1.text, param_active_range,
+ # { pform_set_param_from_type(@1, p[1].type, p[1].text, param_active_range,
tpname = Node(syms.tname, [Leaf(token.NAME, p[1])])
expr = Node(syms.tfpdef, [tpname, Leaf(token.EQUAL, p[2]), p[3] ])
p[0] = expr
tpname = Node(syms.tname, [Leaf(token.NAME, p[1])])
expr = Node(syms.tfpdef, [tpname, Leaf(token.EQUAL, p[2]), p[3] ])
p[0] = expr
- # { PExpr*tmp = $3;
- # pform_set_parameter(@1, lex_strings.make($1), param_active_type,
- # param_active_signed, param_active_range, tmp, $4);
- # delete[]$1;
+ # { 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]);
+ # delete[]p[1];
# }
()
def p_localparam_assign_1(p):
'''localparam_assign : IDENTIFIER '=' expression '''
print('localparam_assign_1', list(p))
# }
()
def p_localparam_assign_1(p):
'''localparam_assign : IDENTIFIER '=' expression '''
print('localparam_assign_1', list(p))
- # { PExpr*tmp = $3;
- # pform_set_localparam(@1, lex_strings.make($1), param_active_type,
+ # { PExpr*tmp = p[3];
+ # pform_set_localparam(@1, lex_strings.make(p[1]), param_active_type,
def p_parameter_value_ranges_1(p):
'''parameter_value_ranges : parameter_value_ranges parameter_value_range '''
print('parameter_value_ranges_1', list(p))
def p_parameter_value_ranges_1(p):
'''parameter_value_ranges : parameter_value_ranges parameter_value_range '''
print('parameter_value_ranges_1', list(p))
()
def p_parameter_value_ranges_2(p):
'''parameter_value_ranges : parameter_value_range '''
print('parameter_value_ranges_2', list(p))
()
def p_parameter_value_ranges_2(p):
'''parameter_value_ranges : parameter_value_range '''
print('parameter_value_ranges_2', list(p))
()
def p_parameter_value_range_1(p):
'''parameter_value_range : from_exclude '[' value_range_expression ':' value_range_expression ']' '''
print('parameter_value_range_1', list(p))
()
def p_parameter_value_range_1(p):
'''parameter_value_range : from_exclude '[' value_range_expression ':' value_range_expression ']' '''
print('parameter_value_range_1', list(p))
- # { $$ = pform_parameter_value_range($1, false, $3, false, $5); }
+ # { p[0] = pform_parameter_value_range(p[1], false, p[3], false, p[5]); }
()
def p_parameter_value_range_2(p):
'''parameter_value_range : from_exclude '[' value_range_expression ':' value_range_expression ')' '''
print('parameter_value_range_2', list(p))
()
def p_parameter_value_range_2(p):
'''parameter_value_range : from_exclude '[' value_range_expression ':' value_range_expression ')' '''
print('parameter_value_range_2', list(p))
- # { $$ = pform_parameter_value_range($1, false, $3, true, $5); }
+ # { p[0] = pform_parameter_value_range(p[1], false, p[3], true, p[5]); }
()
def p_parameter_value_range_3(p):
'''parameter_value_range : from_exclude '(' value_range_expression ':' value_range_expression ']' '''
print('parameter_value_range_3', list(p))
()
def p_parameter_value_range_3(p):
'''parameter_value_range : from_exclude '(' value_range_expression ':' value_range_expression ']' '''
print('parameter_value_range_3', list(p))
- # { $$ = pform_parameter_value_range($1, true, $3, false, $5); }
+ # { p[0] = pform_parameter_value_range(p[1], true, p[3], false, p[5]); }
()
def p_parameter_value_range_4(p):
'''parameter_value_range : from_exclude '(' value_range_expression ':' value_range_expression ')' '''
print('parameter_value_range_4', list(p))
()
def p_parameter_value_range_4(p):
'''parameter_value_range : from_exclude '(' value_range_expression ':' value_range_expression ')' '''
print('parameter_value_range_4', list(p))
- # { $$ = pform_parameter_value_range($1, true, $3, true, $5); }
+ # { p[0] = pform_parameter_value_range(p[1], true, p[3], true, p[5]); }
()
def p_parameter_value_range_5(p):
'''parameter_value_range : K_exclude expression '''
print('parameter_value_range_5', list(p))
()
def p_parameter_value_range_5(p):
'''parameter_value_range : K_exclude expression '''
print('parameter_value_range_5', list(p))
- # { $$ = pform_parameter_value_range(true, false, $2, false, $2); }
+ # { p[0] = pform_parameter_value_range(true, false, p[2], false, p[2]); }
'''parameter_value_opt : '#' '(' expression_list_with_nuls ')' '''
print('parameter_value_opt_1', list(p))
# { struct parmvalue_t*tmp = new struct parmvalue_t;
'''parameter_value_opt : '#' '(' expression_list_with_nuls ')' '''
print('parameter_value_opt_1', list(p))
# { struct parmvalue_t*tmp = new struct parmvalue_t;
print('parameter_value_opt_2', list(p))
# { struct parmvalue_t*tmp = new struct parmvalue_t;
# tmp->by_order = 0;
print('parameter_value_opt_2', list(p))
# { struct parmvalue_t*tmp = new struct parmvalue_t;
# tmp->by_order = 0;
# }
()
def p_parameter_value_opt_3(p):
'''parameter_value_opt : '#' DEC_NUMBER '''
print('parameter_value_opt_3', list(p))
# }
()
def p_parameter_value_opt_3(p):
'''parameter_value_opt : '#' DEC_NUMBER '''
print('parameter_value_opt_3', list(p))
# FILE_NAME(tmp, @1);
#
# struct parmvalue_t*lst = new struct parmvalue_t;
# lst->by_order = new list<PExpr*>;
# lst->by_order->push_back(tmp);
# lst->by_name = 0;
# FILE_NAME(tmp, @1);
#
# struct parmvalue_t*lst = new struct parmvalue_t;
# lst->by_order = new list<PExpr*>;
# lst->by_order->push_back(tmp);
# lst->by_name = 0;
# based_size = 0;
# }
()
def p_parameter_value_opt_4(p):
'''parameter_value_opt : '#' REALTIME '''
print('parameter_value_opt_4', list(p))
# based_size = 0;
# }
()
def p_parameter_value_opt_4(p):
'''parameter_value_opt : '#' REALTIME '''
print('parameter_value_opt_4', list(p))
# FILE_NAME(tmp, @1);
#
# struct parmvalue_t*lst = new struct parmvalue_t;
# lst->by_order = new list<PExpr*>;
# lst->by_order->push_back(tmp);
# lst->by_name = 0;
# FILE_NAME(tmp, @1);
#
# struct parmvalue_t*lst = new struct parmvalue_t;
# lst->by_order = new list<PExpr*>;
# lst->by_order->push_back(tmp);
# lst->by_name = 0;
'''parameter_value_byname : '.' IDENTIFIER '(' expression ')' '''
print('parameter_value_byname_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
'''parameter_value_byname : '.' IDENTIFIER '(' expression ')' '''
print('parameter_value_byname_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_parameter_value_byname_2(p):
'''parameter_value_byname : '.' IDENTIFIER '(' ')' '''
print('parameter_value_byname_2', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_parameter_value_byname_2(p):
'''parameter_value_byname : '.' IDENTIFIER '(' ')' '''
print('parameter_value_byname_2', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_parameter_value_byname_list_1(p):
'''parameter_value_byname_list : parameter_value_byname '''
print('parameter_value_byname_list_1', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_parameter_value_byname_list_1(p):
'''parameter_value_byname_list : parameter_value_byname '''
print('parameter_value_byname_list_1', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_parameter_value_byname_list_2(p):
'''parameter_value_byname_list : parameter_value_byname_list ',' parameter_value_byname '''
print('parameter_value_byname_list_2', list(p))
# }
()
def p_parameter_value_byname_list_2(p):
'''parameter_value_byname_list : parameter_value_byname_list ',' parameter_value_byname '''
print('parameter_value_byname_list_2', list(p))
'''port_name : '.' IDENTIFIER '(' expression ')' '''
print('port_name_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
'''port_name : '.' IDENTIFIER '(' expression ')' '''
print('port_name_1', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
print('port_name_2', list(p))
# { yyerror(@3, "error: invalid port connection expression.");
# named_pexpr_t*tmp = new named_pexpr_t;
print('port_name_2', list(p))
# { yyerror(@3, "error: invalid port connection expression.");
# named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_port_name_3(p):
'''port_name : '.' IDENTIFIER '(' ')' '''
print('port_name_3', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_port_name_3(p):
'''port_name : '.' IDENTIFIER '(' ')' '''
print('port_name_3', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_port_name_4(p):
'''port_name : '.' IDENTIFIER '''
print('port_name_4', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
# }
()
def p_port_name_4(p):
'''port_name : '.' IDENTIFIER '''
print('port_name_4', list(p))
# { named_pexpr_t*tmp = new named_pexpr_t;
- # tmp->name = lex_strings.make($2);
- # tmp->parm = new PEIdent(lex_strings.make($2), true);
+ # tmp->name = lex_strings.make(p[2]);
+ # tmp->parm = new PEIdent(lex_strings.make(p[2]), true);
# }
()
def p_port_name_list_1(p):
'''port_name_list : port_name_list ',' port_name '''
print('port_name_list_1', list(p))
# }
()
def p_port_name_list_1(p):
'''port_name_list : port_name_list ',' port_name '''
print('port_name_list_1', list(p))
# }
()
def p_port_name_list_2(p):
'''port_name_list : port_name '''
print('port_name_list_2', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_port_name_list_2(p):
'''port_name_list : port_name '''
print('port_name_list_2', list(p))
# { list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
# }
()
def p_port_reference_1(p):
'''port_reference : IDENTIFIER '''
print('port_reference_1', list(p))
# { Module::port_t*ptmp;
# }
()
def p_port_reference_1(p):
'''port_reference : IDENTIFIER '''
print('port_reference_1', list(p))
# { Module::port_t*ptmp;
print('port_reference_2', list(p))
# { index_component_t itmp;
# itmp.sel = index_component_t::SEL_PART;
print('port_reference_2', list(p))
# { index_component_t itmp;
# itmp.sel = index_component_t::SEL_PART;
print('port_reference_3', list(p))
# { index_component_t itmp;
# itmp.sel = index_component_t::SEL_BIT;
print('port_reference_3', list(p))
# { index_component_t itmp;
# itmp.sel = index_component_t::SEL_BIT;
# Module::port_t*ptmp = new Module::port_t;
# ptmp->name = perm_string();
# ptmp->expr.push_back(tmp);
# Module::port_t*ptmp = new Module::port_t;
# ptmp->name = perm_string();
# ptmp->expr.push_back(tmp);
print('port_reference_4', list(p))
# { yyerror(@1, "error: invalid port bit select");
# Module::port_t*ptmp = new Module::port_t;
print('port_reference_4', list(p))
# { yyerror(@1, "error: invalid port bit select");
# Module::port_t*ptmp = new Module::port_t;
def p_port_reference_list_2(p):
'''port_reference_list : port_reference_list ',' port_reference '''
print('port_reference_list_2', list(p))
def p_port_reference_list_2(p):
'''port_reference_list : port_reference_list ',' port_reference '''
print('port_reference_list_2', list(p))
- # { Module::port_t*tmp = $1;
- # append(tmp->expr, $3->expr);
- # delete $3;
- # $$ = tmp;
+ # { Module::port_t*tmp = p[1];
+ # append(tmp->expr, p[3]->expr);
+ # delete p[3];
+ # p[0] = tmp;
def p_dimensions_2(p):
'''dimensions : dimensions variable_dimension '''
print('dimensions_2', list(p))
def p_dimensions_2(p):
'''dimensions : dimensions variable_dimension '''
print('dimensions_2', list(p))
- # { list<pform_range_t> *tmp = $1;
- # if ($2) {
- # tmp->splice(tmp->end(), *$2);
- # delete $2;
+ # { list<pform_range_t> *tmp = p[1];
+ # if (p[2]) {
+ # tmp->splice(tmp->end(), *p[2]);
+ # delete p[2];
# }
()
def p_register_variable_1(p):
'''register_variable : IDENTIFIER dimensions_opt '''
print('register_variable_1', list(p))
# }
()
def p_register_variable_1(p):
'''register_variable : IDENTIFIER dimensions_opt '''
print('register_variable_1', list(p))
# pform_makewire(@1, name, NetNet::REG,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# pform_makewire(@1, name, NetNet::REG,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# pform_makewire(@1, name, NetNet::REG,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# pform_makewire(@1, name, NetNet::REG,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
- # pform_set_reg_idx(name, $2);
- # pform_make_var_init(@1, name, $4);
- # $$ = $1;
+ # pform_set_reg_idx(name, p[2]);
+ # pform_make_var_init(@1, name, p[4]);
+ # p[0] = p[1];
# }
()
def p_register_variable_list_1(p):
'''register_variable_list : register_variable '''
print('register_variable_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_register_variable_list_1(p):
'''register_variable_list : register_variable '''
print('register_variable_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_register_variable_list_2(p):
'''register_variable_list : register_variable_list ',' register_variable '''
print('register_variable_list_2', list(p))
# }
()
def p_register_variable_list_2(p):
'''register_variable_list : register_variable_list ',' register_variable '''
print('register_variable_list_2', list(p))
# }
()
def p_net_variable_1(p):
'''net_variable : IDENTIFIER dimensions_opt '''
print('net_variable_1', list(p))
# }
()
def p_net_variable_1(p):
'''net_variable : IDENTIFIER dimensions_opt '''
print('net_variable_1', list(p))
# pform_makewire(@1, name, NetNet::IMPLICIT,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# pform_makewire(@1, name, NetNet::IMPLICIT,
# NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
# }
()
def p_net_variable_list_1(p):
'''net_variable_list : net_variable '''
print('net_variable_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_net_variable_list_1(p):
'''net_variable_list : net_variable '''
print('net_variable_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_net_variable_list_2(p):
'''net_variable_list : net_variable_list ',' net_variable '''
print('net_variable_list_2', list(p))
# }
()
def p_net_variable_list_2(p):
'''net_variable_list : net_variable_list ',' net_variable '''
print('net_variable_list_2', list(p))
# }
()
def p_event_variable_1(p):
'''event_variable : IDENTIFIER dimensions_opt '''
print('event_variable_1', list(p))
# }
()
def p_event_variable_1(p):
'''event_variable : IDENTIFIER dimensions_opt '''
print('event_variable_1', list(p))
# }
()
def p_event_variable_list_1(p):
'''event_variable_list : event_variable '''
print('event_variable_list_1', list(p))
# }
()
def p_event_variable_list_1(p):
'''event_variable_list : event_variable '''
print('event_variable_list_1', list(p))
()
def p_event_variable_list_2(p):
'''event_variable_list : event_variable_list ',' event_variable '''
print('event_variable_list_2', list(p))
()
def p_event_variable_list_2(p):
'''event_variable_list : event_variable_list ',' event_variable '''
print('event_variable_list_2', list(p))
def p_specify_item_2(p):
'''specify_item : specify_simple_path_decl ';' '''
print('specify_item_2', list(p))
def p_specify_item_2(p):
'''specify_item : specify_simple_path_decl ';' '''
print('specify_item_2', list(p))
# }
()
def p_specify_item_3(p):
'''specify_item : specify_edge_path_decl ';' '''
print('specify_item_3', list(p))
# }
()
def p_specify_item_3(p):
'''specify_item : specify_edge_path_decl ';' '''
print('specify_item_3', list(p))
# }
()
def p_specify_item_4(p):
'''specify_item : K_if '(' expression ')' specify_simple_path_decl ';' '''
print('specify_item_4', list(p))
# }
()
def p_specify_item_4(p):
'''specify_item : K_if '(' expression ')' specify_simple_path_decl ';' '''
print('specify_item_4', list(p))
def p_specify_item_5(p):
'''specify_item : K_if '(' expression ')' specify_edge_path_decl ';' '''
print('specify_item_5', list(p))
def p_specify_item_5(p):
'''specify_item : K_if '(' expression ')' specify_edge_path_decl ';' '''
print('specify_item_5', list(p))
def p_specify_item_6(p):
'''specify_item : K_ifnone specify_simple_path_decl ';' '''
print('specify_item_6', list(p))
def p_specify_item_6(p):
'''specify_item : K_ifnone specify_simple_path_decl ';' '''
print('specify_item_6', list(p))
def p_specify_item_8(p):
'''specify_item : K_Sfullskew '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_8', list(p))
def p_specify_item_8(p):
'''specify_item : K_Sfullskew '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_8', list(p))
# }
()
def p_specify_item_9(p):
'''specify_item : K_Shold '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_9', list(p))
# }
()
def p_specify_item_9(p):
'''specify_item : K_Shold '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_9', list(p))
# }
()
def p_specify_item_10(p):
'''specify_item : K_Snochange '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_10', list(p))
# }
()
def p_specify_item_10(p):
'''specify_item : K_Snochange '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_10', list(p))
# }
()
def p_specify_item_11(p):
'''specify_item : K_Speriod '(' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_11', list(p))
# }
()
def p_specify_item_11(p):
'''specify_item : K_Speriod '(' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_11', list(p))
# }
()
def p_specify_item_12(p):
'''specify_item : K_Srecovery '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_12', list(p))
# }
()
def p_specify_item_12(p):
'''specify_item : K_Srecovery '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_12', list(p))
# }
()
def p_specify_item_13(p):
'''specify_item : K_Srecrem '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_13', list(p))
# }
()
def p_specify_item_13(p):
'''specify_item : K_Srecrem '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_13', list(p))
# }
()
def p_specify_item_14(p):
'''specify_item : K_Sremoval '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_14', list(p))
# }
()
def p_specify_item_14(p):
'''specify_item : K_Sremoval '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_14', list(p))
# }
()
def p_specify_item_15(p):
'''specify_item : K_Ssetup '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_15', list(p))
# }
()
def p_specify_item_15(p):
'''specify_item : K_Ssetup '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_15', list(p))
# }
()
def p_specify_item_16(p):
'''specify_item : K_Ssetuphold '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_16', list(p))
# }
()
def p_specify_item_16(p):
'''specify_item : K_Ssetuphold '(' spec_reference_event ',' spec_reference_event ',' delay_value ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_16', list(p))
# }
()
def p_specify_item_17(p):
'''specify_item : K_Sskew '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_17', list(p))
# }
()
def p_specify_item_17(p):
'''specify_item : K_Sskew '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_17', list(p))
# }
()
def p_specify_item_18(p):
'''specify_item : K_Stimeskew '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_18', list(p))
# }
()
def p_specify_item_18(p):
'''specify_item : K_Stimeskew '(' spec_reference_event ',' spec_reference_event ',' delay_value spec_notifier_opt ')' ';' '''
print('specify_item_18', list(p))
# }
()
def p_specify_item_19(p):
'''specify_item : K_Swidth '(' spec_reference_event ',' delay_value ',' expression spec_notifier_opt ')' ';' '''
print('specify_item_19', list(p))
# }
()
def p_specify_item_19(p):
'''specify_item : K_Swidth '(' spec_reference_event ',' delay_value ',' expression spec_notifier_opt ')' ';' '''
print('specify_item_19', list(p))
# }
()
def p_specify_item_20(p):
'''specify_item : K_Swidth '(' spec_reference_event ',' delay_value ')' ';' '''
print('specify_item_20', list(p))
# }
()
def p_specify_item_20(p):
'''specify_item : K_Swidth '(' spec_reference_event ',' delay_value ')' ';' '''
print('specify_item_20', list(p))
# }
()
def p_specify_item_21(p):
'''specify_item : K_pulsestyle_onevent specify_path_identifiers ';' '''
print('specify_item_21', list(p))
# }
()
def p_specify_item_21(p):
'''specify_item : K_pulsestyle_onevent specify_path_identifiers ';' '''
print('specify_item_21', list(p))
# }
()
def p_specify_item_22(p):
'''specify_item : K_pulsestyle_ondetect specify_path_identifiers ';' '''
print('specify_item_22', list(p))
# }
()
def p_specify_item_22(p):
'''specify_item : K_pulsestyle_ondetect specify_path_identifiers ';' '''
print('specify_item_22', list(p))
# }
()
def p_specify_item_23(p):
'''specify_item : K_showcancelled specify_path_identifiers ';' '''
print('specify_item_23', list(p))
# }
()
def p_specify_item_23(p):
'''specify_item : K_showcancelled specify_path_identifiers ';' '''
print('specify_item_23', list(p))
# }
()
def p_specify_item_24(p):
'''specify_item : K_noshowcancelled specify_path_identifiers ';' '''
print('specify_item_24', list(p))
# }
()
def p_specify_item_24(p):
'''specify_item : K_noshowcancelled specify_path_identifiers ';' '''
print('specify_item_24', list(p))
def p_specify_edge_path_decl_1(p):
'''specify_edge_path_decl : specify_edge_path '=' '(' delay_value_list ')' '''
print('specify_edge_path_decl_1', list(p))
def p_specify_edge_path_decl_1(p):
'''specify_edge_path_decl : specify_edge_path '=' '(' delay_value_list ')' '''
print('specify_edge_path_decl_1', list(p))
()
def p_specify_edge_path_decl_2(p):
'''specify_edge_path_decl : specify_edge_path '=' delay_value_simple '''
print('specify_edge_path_decl_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
()
def p_specify_edge_path_decl_2(p):
'''specify_edge_path_decl : specify_edge_path '=' delay_value_simple '''
print('specify_edge_path_decl_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
'''specify_edge_path : '(' specify_path_identifiers spec_polarity K_EG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_1', list(p))
# { int edge_flag = 0;
'''specify_edge_path : '(' specify_path_identifiers spec_polarity K_EG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_1', list(p))
# { int edge_flag = 0;
- # $$ = pform_make_specify_edge_path(@1, edge_flag, $2, $3, false, $6, $8); }
+ # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[2], p[3], false, p[6], p[8]); }
()
def p_specify_edge_path_2(p):
'''specify_edge_path : '(' edge_operator specify_path_identifiers spec_polarity K_EG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_2', list(p))
()
def p_specify_edge_path_2(p):
'''specify_edge_path : '(' edge_operator specify_path_identifiers spec_polarity K_EG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_2', list(p))
- # { int edge_flag = $2? 1 : -1;
- # $$ = pform_make_specify_edge_path(@1, edge_flag, $3, $4, false, $7, $9);}
+ # { 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]);}
()
def p_specify_edge_path_3(p):
'''specify_edge_path : '(' specify_path_identifiers spec_polarity K_SG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_3', list(p))
# { int edge_flag = 0;
()
def p_specify_edge_path_3(p):
'''specify_edge_path : '(' specify_path_identifiers spec_polarity K_SG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_3', list(p))
# { int edge_flag = 0;
- # $$ = pform_make_specify_edge_path(@1, edge_flag, $2, $3, true, $6, $8); }
+ # p[0] = pform_make_specify_edge_path(@1, edge_flag, p[2], p[3], true, p[6], p[8]); }
()
def p_specify_edge_path_4(p):
'''specify_edge_path : '(' edge_operator specify_path_identifiers spec_polarity K_SG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_4', list(p))
()
def p_specify_edge_path_4(p):
'''specify_edge_path : '(' edge_operator specify_path_identifiers spec_polarity K_SG '(' specify_path_identifiers polarity_operator expression ')' ')' '''
print('specify_edge_path_4', list(p))
- # { int edge_flag = $2? 1 : -1;
- # $$ = pform_make_specify_edge_path(@1, edge_flag, $3, $4, true, $7, $9); }
+ # { 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]); }
def p_specify_simple_path_decl_1(p):
'''specify_simple_path_decl : specify_simple_path '=' '(' delay_value_list ')' '''
print('specify_simple_path_decl_1', list(p))
def p_specify_simple_path_decl_1(p):
'''specify_simple_path_decl : specify_simple_path '=' '(' delay_value_list ')' '''
print('specify_simple_path_decl_1', list(p))
()
def p_specify_simple_path_decl_2(p):
'''specify_simple_path_decl : specify_simple_path '=' delay_value_simple '''
print('specify_simple_path_decl_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
()
def p_specify_simple_path_decl_2(p):
'''specify_simple_path_decl : specify_simple_path '=' delay_value_simple '''
print('specify_simple_path_decl_2', list(p))
# { list<PExpr*>*tmp = new list<PExpr*>;
def p_specify_simple_path_1(p):
'''specify_simple_path : '(' specify_path_identifiers spec_polarity K_EG specify_path_identifiers ')' '''
print('specify_simple_path_1', list(p))
def p_specify_simple_path_1(p):
'''specify_simple_path : '(' specify_path_identifiers spec_polarity K_EG specify_path_identifiers ')' '''
print('specify_simple_path_1', list(p))
- # { $$ = pform_make_specify_path(@1, $2, $3, false, $5); }
+ # { p[0] = pform_make_specify_path(@1, p[2], p[3], false, p[5]); }
()
def p_specify_simple_path_2(p):
'''specify_simple_path : '(' specify_path_identifiers spec_polarity K_SG specify_path_identifiers ')' '''
print('specify_simple_path_2', list(p))
()
def p_specify_simple_path_2(p):
'''specify_simple_path : '(' specify_path_identifiers spec_polarity K_SG specify_path_identifiers ')' '''
print('specify_simple_path_2', list(p))
- # { $$ = pform_make_specify_path(@1, $2, $3, true, $5); }
+ # { p[0] = pform_make_specify_path(@1, p[2], p[3], true, p[5]); }
'''specify_path_identifiers : IDENTIFIER '''
print('specify_path_identifiers_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
'''specify_path_identifiers : IDENTIFIER '''
print('specify_path_identifiers_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_specify_path_identifiers_4(p):
'''specify_path_identifiers : specify_path_identifiers ',' IDENTIFIER '''
print('specify_path_identifiers_4', list(p))
# }
()
def p_specify_path_identifiers_4(p):
'''specify_path_identifiers : specify_path_identifiers ',' IDENTIFIER '''
print('specify_path_identifiers_4', list(p))
# }
()
def p_specparam_1(p):
'''specparam : IDENTIFIER '=' expression '''
print('specparam_1', list(p))
# }
()
def p_specparam_1(p):
'''specparam : IDENTIFIER '=' expression '''
print('specparam_1', list(p))
# }
()
def p_specparam_3(p):
'''specparam : PATHPULSE_IDENTIFIER '=' expression '''
print('specparam_3', list(p))
# }
()
def p_specparam_3(p):
'''specparam : PATHPULSE_IDENTIFIER '=' expression '''
print('specparam_3', list(p))
# }
()
def p_specparam_4(p):
'''specparam : PATHPULSE_IDENTIFIER '=' '(' expression ',' expression ')' '''
print('specparam_4', list(p))
# }
()
def p_specparam_4(p):
'''specparam : PATHPULSE_IDENTIFIER '=' '(' expression ',' expression ')' '''
print('specparam_4', list(p))
()
def p_spec_polarity_1(p):
'''spec_polarity : '+' '''
print('spec_polarity_1', list(p))
()
def p_spec_polarity_1(p):
'''spec_polarity : '+' '''
print('spec_polarity_1', list(p))
()
def p_spec_polarity_2(p):
'''spec_polarity : '-' '''
print('spec_polarity_2', list(p))
()
def p_spec_polarity_2(p):
'''spec_polarity : '-' '''
print('spec_polarity_2', list(p))
def p_spec_reference_event_1(p):
'''spec_reference_event : K_posedge expression '''
print('spec_reference_event_1', list(p))
def p_spec_reference_event_1(p):
'''spec_reference_event : K_posedge expression '''
print('spec_reference_event_1', list(p))
()
def p_spec_reference_event_2(p):
'''spec_reference_event : K_negedge expression '''
print('spec_reference_event_2', list(p))
()
def p_spec_reference_event_2(p):
'''spec_reference_event : K_negedge expression '''
print('spec_reference_event_2', list(p))
()
def p_spec_reference_event_3(p):
'''spec_reference_event : K_posedge expr_primary K_TAND expression '''
print('spec_reference_event_3', list(p))
()
def p_spec_reference_event_3(p):
'''spec_reference_event : K_posedge expr_primary K_TAND expression '''
print('spec_reference_event_3', list(p))
# }
()
def p_spec_reference_event_4(p):
'''spec_reference_event : K_negedge expr_primary K_TAND expression '''
print('spec_reference_event_4', list(p))
# }
()
def p_spec_reference_event_4(p):
'''spec_reference_event : K_negedge expr_primary K_TAND expression '''
print('spec_reference_event_4', list(p))
# }
()
def p_spec_reference_event_5(p):
'''spec_reference_event : K_edge '[' edge_descriptor_list ']' expr_primary '''
print('spec_reference_event_5', list(p))
# }
()
def p_spec_reference_event_5(p):
'''spec_reference_event : K_edge '[' edge_descriptor_list ']' expr_primary '''
print('spec_reference_event_5', list(p))
()
def p_spec_reference_event_6(p):
'''spec_reference_event : K_edge '[' edge_descriptor_list ']' expr_primary K_TAND expression '''
print('spec_reference_event_6', list(p))
()
def p_spec_reference_event_6(p):
'''spec_reference_event : K_edge '[' edge_descriptor_list ']' expr_primary K_TAND expression '''
print('spec_reference_event_6', list(p))
# }
()
def p_spec_reference_event_7(p):
'''spec_reference_event : expr_primary K_TAND expression '''
print('spec_reference_event_7', list(p))
# }
()
def p_spec_reference_event_7(p):
'''spec_reference_event : expr_primary K_TAND expression '''
print('spec_reference_event_7', list(p))
# }
()
def p_spec_reference_event_8(p):
'''spec_reference_event : expr_primary '''
print('spec_reference_event_8', list(p))
# }
()
def p_spec_reference_event_8(p):
'''spec_reference_event : expr_primary '''
print('spec_reference_event_8', list(p))
()
def p_edge_descriptor_list_1(p):
'''edge_descriptor_list : edge_descriptor_list ',' K_edge_descriptor '''
()
def p_edge_descriptor_list_1(p):
'''edge_descriptor_list : edge_descriptor_list ',' K_edge_descriptor '''
def p_spec_notifier_2(p):
'''spec_notifier : ',' hierarchy_identifier '''
print('spec_notifier_2', list(p))
def p_spec_notifier_2(p):
'''spec_notifier : ',' hierarchy_identifier '''
print('spec_notifier_2', list(p))
()
def p_spec_notifier_3(p):
'''spec_notifier : spec_notifier ',' '''
()
def p_spec_notifier_3(p):
'''spec_notifier : spec_notifier ',' '''
# { args_after_notifier += 1;
# if (args_after_notifier >= 3) {
# cerr << @3 << ": warning: timing checks are not supported "
# { args_after_notifier += 1;
# if (args_after_notifier >= 3) {
# cerr << @3 << ": warning: timing checks are not supported "
()
def p_spec_notifier_5(p):
'''spec_notifier : IDENTIFIER '''
print('spec_notifier_5', list(p))
()
def p_spec_notifier_5(p):
'''spec_notifier : IDENTIFIER '''
print('spec_notifier_5', list(p))
()
def p_statement_item_1(p):
'''statement_item : K_assign lpvalue '=' expression ';' '''
print('statement_item_1', list(p))
()
def p_statement_item_1(p):
'''statement_item : K_assign lpvalue '=' expression ';' '''
print('statement_item_1', list(p))
# }
()
def p_statement_item_2(p):
'''statement_item : K_deassign lpvalue ';' '''
print('statement_item_2', list(p))
# }
()
def p_statement_item_2(p):
'''statement_item : K_deassign lpvalue ';' '''
print('statement_item_2', list(p))
# }
()
def p_statement_item_3(p):
'''statement_item : K_force lpvalue '=' expression ';' '''
print('statement_item_3', list(p))
# }
()
def p_statement_item_3(p):
'''statement_item : K_force lpvalue '=' expression ';' '''
print('statement_item_3', list(p))
# }
()
def p_statement_item_4(p):
'''statement_item : K_release lpvalue ';' '''
print('statement_item_4', list(p))
# }
()
def p_statement_item_4(p):
'''statement_item : K_release lpvalue ';' '''
print('statement_item_4', list(p))
print('statement_item_5', list(p))
# { PBlock*tmp = new PBlock(PBlock::BL_SEQ);
# FILE_NAME(tmp, @1);
print('statement_item_5', list(p))
# { PBlock*tmp = new PBlock(PBlock::BL_SEQ);
# FILE_NAME(tmp, @1);
# }
()
def p_statement_item_6(p):
'''statement_item : K_begin _embed0_statement_item block_item_decls_opt _embed1_statement_item statement_or_null_list K_end '''
print('statement_item_6', list(p))
# { PBlock*tmp;
# }
()
def p_statement_item_6(p):
'''statement_item : K_begin _embed0_statement_item block_item_decls_opt _embed1_statement_item statement_or_null_list K_end '''
print('statement_item_6', list(p))
# { PBlock*tmp;
# assert(! current_block_stack.empty());
# PBlock*tmp = current_block_stack.top();
# current_block_stack.pop();
# assert(! current_block_stack.empty());
# PBlock*tmp = current_block_stack.top();
# current_block_stack.pop();
- # if ($6) tmp->set_statement(*$6);
- # delete $6;
- # if ($8) {
- # if (strcmp($3,$8) != 0) {
+ # if (p[6]) tmp->set_statement(*p[6]);
+ # delete p[6];
+ # if (p[8]) {
+ # if (strcmp(p[3],p[8]) != 0) {
# yyerror(@8, "error: End label doesn't match begin name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Begin end labels require "
# "SystemVerilog.");
# }
# yyerror(@8, "error: End label doesn't match begin name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Begin end labels require "
# "SystemVerilog.");
# }
# }
()
def p_statement_item_8(p):
'''statement_item : K_fork join_keyword '''
print('statement_item_8', list(p))
# }
()
def p_statement_item_8(p):
'''statement_item : K_fork join_keyword '''
print('statement_item_8', list(p))
# }
()
def p_statement_item_9(p):
'''statement_item : K_fork _embed3_statement_item block_item_decls_opt _embed4_statement_item statement_or_null_list join_keyword '''
print('statement_item_9', list(p))
# { PBlock*tmp;
# }
()
def p_statement_item_9(p):
'''statement_item : K_fork _embed3_statement_item block_item_decls_opt _embed4_statement_item statement_or_null_list join_keyword '''
print('statement_item_9', list(p))
# { PBlock*tmp;
# pform_pop_scope();
# assert(! current_block_stack.empty());
# tmp = current_block_stack.top();
# current_block_stack.pop();
# pform_pop_scope();
# assert(! current_block_stack.empty());
# tmp = current_block_stack.top();
# current_block_stack.pop();
# assert(! current_block_stack.empty());
# PBlock*tmp = current_block_stack.top();
# current_block_stack.pop();
# assert(! current_block_stack.empty());
# PBlock*tmp = current_block_stack.top();
# current_block_stack.pop();
- # tmp->set_join_type($7);
- # if ($6) tmp->set_statement(*$6);
- # delete $6;
- # if ($8) {
- # if (strcmp($3,$8) != 0) {
+ # tmp->set_join_type(p[7]);
+ # if (p[6]) tmp->set_statement(*p[6]);
+ # delete p[6];
+ # if (p[8]) {
+ # if (strcmp(p[3],p[8]) != 0) {
# yyerror(@8, "error: End label doesn't match fork name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Fork end labels require "
# "SystemVerilog.");
# }
# yyerror(@8, "error: End label doesn't match fork name");
# }
# if (! gn_system_verilog()) {
# yyerror(@8, "error: Fork end labels require "
# "SystemVerilog.");
# }
# }
()
def p_statement_item_11(p):
'''statement_item : K_disable hierarchy_identifier ';' '''
print('statement_item_11', list(p))
# }
()
def p_statement_item_11(p):
'''statement_item : K_disable hierarchy_identifier ';' '''
print('statement_item_11', list(p))
# }
()
def p_statement_item_13(p):
'''statement_item : K_TRIGGER hierarchy_identifier ';' '''
print('statement_item_13', list(p))
# }
()
def p_statement_item_13(p):
'''statement_item : K_TRIGGER hierarchy_identifier ';' '''
print('statement_item_13', list(p))
def p_statement_item_17(p):
'''statement_item : K_case '(' expression ')' case_items K_endcase '''
print('statement_item_17', list(p))
def p_statement_item_17(p):
'''statement_item : K_case '(' expression ')' case_items K_endcase '''
print('statement_item_17', list(p))
# }
()
def p_statement_item_18(p):
'''statement_item : K_casex '(' expression ')' case_items K_endcase '''
print('statement_item_18', list(p))
# }
()
def p_statement_item_18(p):
'''statement_item : K_casex '(' expression ')' case_items K_endcase '''
print('statement_item_18', list(p))
# }
()
def p_statement_item_19(p):
'''statement_item : K_casez '(' expression ')' case_items K_endcase '''
print('statement_item_19', list(p))
# }
()
def p_statement_item_19(p):
'''statement_item : K_casez '(' expression ')' case_items K_endcase '''
print('statement_item_19', list(p))
def p_statement_item_23(p):
'''statement_item : K_if '(' expression ')' statement_or_null %prec less_than_K_else '''
print('statement_item_23', list(p))
def p_statement_item_23(p):
'''statement_item : K_if '(' expression ')' statement_or_null %prec less_than_K_else '''
print('statement_item_23', list(p))
# }
()
def p_statement_item_24(p):
'''statement_item : K_if '(' expression ')' statement_or_null K_else statement_or_null '''
print('statement_item_24', list(p))
# }
()
def p_statement_item_24(p):
'''statement_item : K_if '(' expression ')' statement_or_null K_else statement_or_null '''
print('statement_item_24', list(p))
# }
()
def p_statement_item_25(p):
'''statement_item : K_if '(' error ')' statement_or_null %prec less_than_K_else '''
print('statement_item_25', list(p))
# { yyerror(@1, "error: Malformed conditional expression.");
# }
()
def p_statement_item_25(p):
'''statement_item : K_if '(' error ')' statement_or_null %prec less_than_K_else '''
print('statement_item_25', list(p))
# { yyerror(@1, "error: Malformed conditional expression.");
# }
()
def p_statement_item_26(p):
'''statement_item : K_if '(' error ')' statement_or_null K_else statement_or_null '''
print('statement_item_26', list(p))
# { yyerror(@1, "error: Malformed conditional expression.");
# }
()
def p_statement_item_26(p):
'''statement_item : K_if '(' error ')' statement_or_null K_else statement_or_null '''
print('statement_item_26', list(p))
# { yyerror(@1, "error: Malformed conditional expression.");
def p_statement_item_28(p):
'''statement_item : inc_or_dec_expression ';' '''
print('statement_item_28', list(p))
def p_statement_item_28(p):
'''statement_item : inc_or_dec_expression ';' '''
print('statement_item_28', list(p))
()
def p_statement_item_29(p):
'''statement_item : delay1 statement_or_null '''
print('statement_item_29', list(p))
()
def p_statement_item_29(p):
'''statement_item : delay1 statement_or_null '''
print('statement_item_29', list(p))
- # { PExpr*del = $1->front();
- # assert($1->size() == 1);
- # delete $1;
- # PDelayStatement*tmp = new PDelayStatement(del, $2);
+ # { PExpr*del = p[1]->front();
+ # assert(p[1]->size() == 1);
+ # delete p[1];
+ # PDelayStatement*tmp = new PDelayStatement(del, p[2]);
# }
()
def p_statement_item_30(p):
'''statement_item : event_control statement_or_null '''
print('statement_item_30', list(p))
# }
()
def p_statement_item_30(p):
'''statement_item : event_control statement_or_null '''
print('statement_item_30', list(p))
print('statement_item_31', list(p))
# { PEventStatement*tmp = new PEventStatement;
# FILE_NAME(tmp, @1);
print('statement_item_31', list(p))
# { PEventStatement*tmp = new PEventStatement;
# FILE_NAME(tmp, @1);
print('statement_item_32', list(p))
# { PEventStatement*tmp = new PEventStatement;
# FILE_NAME(tmp, @1);
print('statement_item_32', list(p))
# { PEventStatement*tmp = new PEventStatement;
# FILE_NAME(tmp, @1);
print ("expr", repr(expr))
print ("expr (python):'%s'" % expr)
p[0] = expr
print ("expr", repr(expr))
print ("expr (python):'%s'" % expr)
p[0] = expr
print('statement_item_34', list(p))
# { yyerror(@2, "Syntax in assignment statement l-value.");
# yyerrok;
print('statement_item_34', list(p))
# { yyerror(@2, "Syntax in assignment statement l-value.");
# yyerrok;
# }
()
def p_statement_item_35(p):
'''statement_item : lpvalue K_LE expression ';' '''
print('statement_item_35', list(p))
# }
()
def p_statement_item_35(p):
'''statement_item : lpvalue K_LE expression ';' '''
print('statement_item_35', list(p))
print('statement_item_36', list(p))
# { yyerror(@2, "Syntax in assignment statement l-value.");
# yyerrok;
print('statement_item_36', list(p))
# { yyerror(@2, "Syntax in assignment statement l-value.");
# yyerrok;
# }
()
def p_statement_item_37(p):
'''statement_item : lpvalue '=' delay1 expression ';' '''
print('statement_item_37', list(p))
# }
()
def p_statement_item_37(p):
'''statement_item : lpvalue '=' delay1 expression ';' '''
print('statement_item_37', list(p))
- # { PExpr*del = $3->front(); $3->pop_front();
- # assert($3->empty());
- # PAssign*tmp = new PAssign($1,del,$4);
+ # { PExpr*del = p[3]->front(); p[3]->pop_front();
+ # assert(p[3]->empty());
+ # PAssign*tmp = new PAssign(p[1],del,p[4]);
# }
()
def p_statement_item_38(p):
'''statement_item : lpvalue K_LE delay1 expression ';' '''
print('statement_item_38', list(p))
# }
()
def p_statement_item_38(p):
'''statement_item : lpvalue K_LE delay1 expression ';' '''
print('statement_item_38', list(p))
- # { PExpr*del = $3->front(); $3->pop_front();
- # assert($3->empty());
- # PAssignNB*tmp = new PAssignNB($1,del,$4);
+ # { PExpr*del = p[3]->front(); p[3]->pop_front();
+ # assert(p[3]->empty());
+ # PAssignNB*tmp = new PAssignNB(p[1],del,p[4]);
# }
()
def p_statement_item_39(p):
'''statement_item : lpvalue '=' event_control expression ';' '''
print('statement_item_39', list(p))
# }
()
def p_statement_item_39(p):
'''statement_item : lpvalue '=' event_control expression ';' '''
print('statement_item_39', list(p))
- # { PAssign*tmp = new PAssign($1,0,$3,$4);
+ # { PAssign*tmp = new PAssign(p[1],0,p[3],p[4]);
# }
()
def p_statement_item_40(p):
'''statement_item : lpvalue '=' K_repeat '(' expression ')' event_control expression ';' '''
print('statement_item_40', list(p))
# }
()
def p_statement_item_40(p):
'''statement_item : lpvalue '=' K_repeat '(' expression ')' event_control expression ';' '''
print('statement_item_40', list(p))
- # { PAssign*tmp = new PAssign($1,$5,$7,$8);
+ # { PAssign*tmp = new PAssign(p[1],p[5],p[7],p[8]);
# }
()
def p_statement_item_41(p):
'''statement_item : lpvalue K_LE event_control expression ';' '''
print('statement_item_41', list(p))
# }
()
def p_statement_item_41(p):
'''statement_item : lpvalue K_LE event_control expression ';' '''
print('statement_item_41', list(p))
- # { PAssignNB*tmp = new PAssignNB($1,0,$3,$4);
+ # { PAssignNB*tmp = new PAssignNB(p[1],0,p[3],p[4]);
# }
()
def p_statement_item_42(p):
'''statement_item : lpvalue K_LE K_repeat '(' expression ')' event_control expression ';' '''
print('statement_item_42', list(p))
# }
()
def p_statement_item_42(p):
'''statement_item : lpvalue K_LE K_repeat '(' expression ')' event_control expression ';' '''
print('statement_item_42', list(p))
- # { PAssignNB*tmp = new PAssignNB($1,$5,$7,$8);
+ # { PAssignNB*tmp = new PAssignNB(p[1],p[5],p[7],p[8]);
# }
()
def p_statement_item_43(p):
'''statement_item : lpvalue '=' dynamic_array_new ';' '''
print('statement_item_43', list(p))
# }
()
def p_statement_item_43(p):
'''statement_item : lpvalue '=' dynamic_array_new ';' '''
print('statement_item_43', list(p))
# }
()
def p_statement_item_44(p):
'''statement_item : lpvalue '=' class_new ';' '''
print('statement_item_44', list(p))
# }
()
def p_statement_item_44(p):
'''statement_item : lpvalue '=' class_new ';' '''
print('statement_item_44', list(p))
# }
()
def p_statement_item_45(p):
'''statement_item : K_wait '(' expression ')' statement_or_null '''
print('statement_item_45', list(p))
# { PEventStatement*tmp;
# }
()
def p_statement_item_45(p):
'''statement_item : K_wait '(' expression ')' statement_or_null '''
print('statement_item_45', list(p))
# { PEventStatement*tmp;
print('statement_item_46', list(p))
# { PEventStatement*tmp = new PEventStatement((PEEvent*)0);
# FILE_NAME(tmp,@1);
print('statement_item_46', list(p))
# { PEventStatement*tmp = new PEventStatement((PEEvent*)0);
# FILE_NAME(tmp,@1);
# }
()
def p_statement_item_47(p):
'''statement_item : SYSTEM_IDENTIFIER '(' expression_list_with_nuls ')' ';' '''
print('statement_item_47', list(p))
# }
()
def p_statement_item_47(p):
'''statement_item : SYSTEM_IDENTIFIER '(' expression_list_with_nuls ')' ';' '''
print('statement_item_47', list(p))
# }
()
def p_statement_item_48(p):
'''statement_item : SYSTEM_IDENTIFIER ';' '''
print('statement_item_48', list(p))
# { list<PExpr*>pt;
# }
()
def p_statement_item_48(p):
'''statement_item : SYSTEM_IDENTIFIER ';' '''
print('statement_item_48', list(p))
# { list<PExpr*>pt;
# }
()
def p_statement_item_49(p):
'''statement_item : hierarchy_identifier '(' expression_list_with_nuls ')' ';' '''
print('statement_item_49', list(p))
# }
()
def p_statement_item_49(p):
'''statement_item : hierarchy_identifier '(' expression_list_with_nuls ')' ';' '''
print('statement_item_49', list(p))
# }
()
def p_statement_item_50(p):
'''statement_item : hierarchy_identifier K_with '{' constraint_block_item_list_opt '}' ';' '''
print('statement_item_50', list(p))
# { /* ....randomize with { <constraints> } */
# }
()
def p_statement_item_50(p):
'''statement_item : hierarchy_identifier K_with '{' constraint_block_item_list_opt '}' ';' '''
print('statement_item_50', list(p))
# { /* ....randomize with { <constraints> } */
# if (!gn_system_verilog())
# yyerror(@2, "error: Randomize with constraint requires SystemVerilog.");
# else
# if (!gn_system_verilog())
# yyerror(@2, "error: Randomize with constraint requires SystemVerilog.");
# else
# }
()
def p_statement_item_51(p):
'''statement_item : implicit_class_handle '.' hierarchy_identifier '(' expression_list_with_nuls ')' ';' '''
print('statement_item_51', list(p))
# }
()
def p_statement_item_51(p):
'''statement_item : implicit_class_handle '.' hierarchy_identifier '(' expression_list_with_nuls ')' ';' '''
print('statement_item_51', list(p))
- # { pform_name_t*t_name = $1;
- # while (! $3->empty()) {
- # t_name->push_back($3->front());
- # $3->pop_front();
+ # { pform_name_t*t_name = p[1];
+ # while (! p[3]->empty()) {
+ # t_name->push_back(p[3]->front());
+ # p[3]->pop_front();
# }
()
def p_statement_item_52(p):
'''statement_item : hierarchy_identifier ';' '''
print('statement_item_52', list(p))
# { list<PExpr*>pt;
# }
()
def p_statement_item_52(p):
'''statement_item : hierarchy_identifier ';' '''
print('statement_item_52', list(p))
# { list<PExpr*>pt;
# }
()
def p_statement_item_53(p):
'''statement_item : implicit_class_handle '.' K_new '(' expression_list_with_nuls ')' ';' '''
print('statement_item_53', list(p))
# }
()
def p_statement_item_53(p):
'''statement_item : implicit_class_handle '.' K_new '(' expression_list_with_nuls ')' ';' '''
print('statement_item_53', list(p))
print('statement_item_54', list(p))
# { yyerror(@3, "error: Syntax error in task arguments.");
# list<PExpr*>pt;
print('statement_item_54', list(p))
# { yyerror(@3, "error: Syntax error in task arguments.");
# list<PExpr*>pt;
print('statement_item_55', list(p))
# { yyerror(@2, "error: malformed statement");
# yyerrok;
print('statement_item_55', list(p))
# { yyerror(@2, "error: malformed statement");
# yyerrok;
# if (! gn_system_verilog()) {
# yyerror("error: Variable declaration in unnamed block "
# "requires SystemVerilog.");
# if (! gn_system_verilog()) {
# yyerror("error: Variable declaration in unnamed block "
# "requires SystemVerilog.");
# if (! gn_system_verilog()) {
# yyerror("error: Variable declaration in unnamed block "
# "requires SystemVerilog.");
# if (! gn_system_verilog()) {
# yyerror("error: Variable declaration in unnamed block "
# "requires SystemVerilog.");
def p_compressed_statement_1(p):
'''compressed_statement : lpvalue K_PLUS_EQ expression '''
print('compressed_statement_1', list(p))
def p_compressed_statement_1(p):
'''compressed_statement : lpvalue K_PLUS_EQ expression '''
print('compressed_statement_1', list(p))
# }
()
def p_compressed_statement_2(p):
'''compressed_statement : lpvalue K_MINUS_EQ expression '''
print('compressed_statement_2', list(p))
# }
()
def p_compressed_statement_2(p):
'''compressed_statement : lpvalue K_MINUS_EQ expression '''
print('compressed_statement_2', list(p))
# }
()
def p_compressed_statement_3(p):
'''compressed_statement : lpvalue K_MUL_EQ expression '''
print('compressed_statement_3', list(p))
# }
()
def p_compressed_statement_3(p):
'''compressed_statement : lpvalue K_MUL_EQ expression '''
print('compressed_statement_3', list(p))
# }
()
def p_compressed_statement_4(p):
'''compressed_statement : lpvalue K_DIV_EQ expression '''
print('compressed_statement_4', list(p))
# }
()
def p_compressed_statement_4(p):
'''compressed_statement : lpvalue K_DIV_EQ expression '''
print('compressed_statement_4', list(p))
# }
()
def p_compressed_statement_5(p):
'''compressed_statement : lpvalue K_MOD_EQ expression '''
print('compressed_statement_5', list(p))
# }
()
def p_compressed_statement_5(p):
'''compressed_statement : lpvalue K_MOD_EQ expression '''
print('compressed_statement_5', list(p))
# }
()
def p_compressed_statement_6(p):
'''compressed_statement : lpvalue K_AND_EQ expression '''
print('compressed_statement_6', list(p))
# }
()
def p_compressed_statement_6(p):
'''compressed_statement : lpvalue K_AND_EQ expression '''
print('compressed_statement_6', list(p))
# }
()
def p_compressed_statement_7(p):
'''compressed_statement : lpvalue K_OR_EQ expression '''
print('compressed_statement_7', list(p))
# }
()
def p_compressed_statement_7(p):
'''compressed_statement : lpvalue K_OR_EQ expression '''
print('compressed_statement_7', list(p))
# }
()
def p_compressed_statement_8(p):
'''compressed_statement : lpvalue K_XOR_EQ expression '''
print('compressed_statement_8', list(p))
# }
()
def p_compressed_statement_8(p):
'''compressed_statement : lpvalue K_XOR_EQ expression '''
print('compressed_statement_8', list(p))
# }
()
def p_compressed_statement_9(p):
'''compressed_statement : lpvalue K_LS_EQ expression '''
print('compressed_statement_9', list(p))
# }
()
def p_compressed_statement_9(p):
'''compressed_statement : lpvalue K_LS_EQ expression '''
print('compressed_statement_9', list(p))
# }
()
def p_compressed_statement_10(p):
'''compressed_statement : lpvalue K_RS_EQ expression '''
print('compressed_statement_10', list(p))
# }
()
def p_compressed_statement_10(p):
'''compressed_statement : lpvalue K_RS_EQ expression '''
print('compressed_statement_10', list(p))
# }
()
def p_compressed_statement_11(p):
'''compressed_statement : lpvalue K_RSS_EQ expression '''
print('compressed_statement_11', list(p))
# }
()
def p_compressed_statement_11(p):
'''compressed_statement : lpvalue K_RSS_EQ expression '''
print('compressed_statement_11', list(p))
def p_statement_or_null_list_1(p):
'''statement_or_null_list : statement_or_null_list statement_or_null '''
print('statement_or_null_list_1', list(p))
def p_statement_or_null_list_1(p):
'''statement_or_null_list : statement_or_null_list statement_or_null '''
print('statement_or_null_list_1', list(p))
# }
()
def p_statement_or_null_list_2(p):
'''statement_or_null_list : statement_or_null '''
print('statement_or_null_list_2', list(p))
# { vector<Statement*>*tmp = new vector<Statement*>(0);
# }
()
def p_statement_or_null_list_2(p):
'''statement_or_null_list : statement_or_null '''
print('statement_or_null_list_2', list(p))
# { vector<Statement*>*tmp = new vector<Statement*>(0);
# }
()
def p_analog_statement_1(p):
'''analog_statement : branch_probe_expression K_CONTRIBUTE expression ';' '''
print('analog_statement_1', list(p))
# }
()
def p_analog_statement_1(p):
'''analog_statement : branch_probe_expression K_CONTRIBUTE expression ';' '''
print('analog_statement_1', list(p))
()
def p_task_item_1(p):
'''task_item : block_item_decl '''
print('task_item_1', list(p))
()
def p_task_item_1(p):
'''task_item : block_item_decl '''
print('task_item_1', list(p))
def p_task_item_list_1(p):
'''task_item_list : task_item_list task_item '''
print('task_item_list_1', list(p))
def p_task_item_list_1(p):
'''task_item_list : task_item_list task_item '''
print('task_item_list_1', list(p))
- # tmp->resize(s1 + $2->size());
- # for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
- # tmp->at(s1 + idx) = $2->at(idx);
- # delete $2;
- # $$ = tmp;
+ # tmp->resize(s1 + p[2]->size());
+ # for (size_t idx = 0 ; idx < p[2]->size() ; idx += 1)
+ # tmp->at(s1 + idx) = p[2]->at(idx);
+ # delete p[2];
+ # p[0] = tmp;
'''udp_body : K_table udp_entry_list K_endtable '''
print('udp_body_1', list(p))
# { lex_end_table();
'''udp_body : K_table udp_entry_list K_endtable '''
print('udp_body_1', list(p))
# { lex_end_table();
def p_udp_comb_entry_1(p):
'''udp_comb_entry : udp_input_list ':' udp_output_sym ';' '''
print('udp_comb_entry_1', list(p))
def p_udp_comb_entry_1(p):
'''udp_comb_entry : udp_input_list ':' udp_output_sym ';' '''
print('udp_comb_entry_1', list(p))
# }
()
def p_udp_comb_entry_list_1(p):
'''udp_comb_entry_list : udp_comb_entry '''
print('udp_comb_entry_list_1', list(p))
# { list<string>*tmp = new list<string>;
# }
()
def p_udp_comb_entry_list_1(p):
'''udp_comb_entry_list : udp_comb_entry '''
print('udp_comb_entry_list_1', list(p))
# { list<string>*tmp = new list<string>;
# }
()
def p_udp_comb_entry_list_2(p):
'''udp_comb_entry_list : udp_comb_entry_list udp_comb_entry '''
print('udp_comb_entry_list_2', list(p))
# }
()
def p_udp_comb_entry_list_2(p):
'''udp_comb_entry_list : udp_comb_entry_list udp_comb_entry '''
print('udp_comb_entry_list_2', list(p))
# }
()
def p_udp_sequ_entry_list_1(p):
'''udp_sequ_entry_list : udp_sequ_entry '''
print('udp_sequ_entry_list_1', list(p))
# { list<string>*tmp = new list<string>;
# }
()
def p_udp_sequ_entry_list_1(p):
'''udp_sequ_entry_list : udp_sequ_entry '''
print('udp_sequ_entry_list_1', list(p))
# { list<string>*tmp = new list<string>;
# }
()
def p_udp_sequ_entry_list_2(p):
'''udp_sequ_entry_list : udp_sequ_entry_list udp_sequ_entry '''
print('udp_sequ_entry_list_2', list(p))
# }
()
def p_udp_sequ_entry_list_2(p):
'''udp_sequ_entry_list : udp_sequ_entry_list udp_sequ_entry '''
print('udp_sequ_entry_list_2', list(p))
# }
()
def p_udp_sequ_entry_1(p):
'''udp_sequ_entry : udp_input_list ':' udp_input_sym ':' udp_output_sym ';' '''
print('udp_sequ_entry_1', list(p))
# }
()
def p_udp_sequ_entry_1(p):
'''udp_sequ_entry : udp_input_list ':' udp_input_sym ':' udp_output_sym ';' '''
print('udp_sequ_entry_1', list(p))
# }
()
def p_udp_initial_1(p):
'''udp_initial : K_initial IDENTIFIER '=' number ';' '''
print('udp_initial_1', list(p))
# }
()
def p_udp_initial_1(p):
'''udp_initial : K_initial IDENTIFIER '=' number ';' '''
print('udp_initial_1', list(p))
'''udp_input_list : udp_input_sym '''
print('udp_input_list_1', list(p))
# { char*tmp = new char[2];
'''udp_input_list : udp_input_sym '''
print('udp_input_list_1', list(p))
# { char*tmp = new char[2];
# }
()
def p_udp_input_list_2(p):
'''udp_input_list : udp_input_list udp_input_sym '''
print('udp_input_list_2', list(p))
# }
()
def p_udp_input_list_2(p):
'''udp_input_list : udp_input_list udp_input_sym '''
print('udp_input_list_2', list(p))
# }
()
def p_udp_input_sym_1(p):
'''udp_input_sym : '0' '''
print('udp_input_sym_1', list(p))
# }
()
def p_udp_input_sym_1(p):
'''udp_input_sym : '0' '''
print('udp_input_sym_1', list(p))
()
def p_udp_input_sym_2(p):
'''udp_input_sym : '1' '''
print('udp_input_sym_2', list(p))
()
def p_udp_input_sym_2(p):
'''udp_input_sym : '1' '''
print('udp_input_sym_2', list(p))
()
def p_udp_input_sym_3(p):
'''udp_input_sym : 'x' '''
print('udp_input_sym_3', list(p))
()
def p_udp_input_sym_3(p):
'''udp_input_sym : 'x' '''
print('udp_input_sym_3', list(p))
()
def p_udp_input_sym_4(p):
'''udp_input_sym : '?' '''
print('udp_input_sym_4', list(p))
()
def p_udp_input_sym_4(p):
'''udp_input_sym : '?' '''
print('udp_input_sym_4', list(p))
()
def p_udp_input_sym_5(p):
'''udp_input_sym : 'b' '''
print('udp_input_sym_5', list(p))
()
def p_udp_input_sym_5(p):
'''udp_input_sym : 'b' '''
print('udp_input_sym_5', list(p))
()
def p_udp_input_sym_6(p):
'''udp_input_sym : '*' '''
print('udp_input_sym_6', list(p))
()
def p_udp_input_sym_6(p):
'''udp_input_sym : '*' '''
print('udp_input_sym_6', list(p))
()
def p_udp_input_sym_7(p):
'''udp_input_sym : '%' '''
print('udp_input_sym_7', list(p))
()
def p_udp_input_sym_7(p):
'''udp_input_sym : '%' '''
print('udp_input_sym_7', list(p))
()
def p_udp_input_sym_8(p):
'''udp_input_sym : 'f' '''
print('udp_input_sym_8', list(p))
()
def p_udp_input_sym_8(p):
'''udp_input_sym : 'f' '''
print('udp_input_sym_8', list(p))
()
def p_udp_input_sym_9(p):
'''udp_input_sym : 'F' '''
print('udp_input_sym_9', list(p))
()
def p_udp_input_sym_9(p):
'''udp_input_sym : 'F' '''
print('udp_input_sym_9', list(p))
()
def p_udp_input_sym_10(p):
'''udp_input_sym : 'l' '''
print('udp_input_sym_10', list(p))
()
def p_udp_input_sym_10(p):
'''udp_input_sym : 'l' '''
print('udp_input_sym_10', list(p))
()
def p_udp_input_sym_11(p):
'''udp_input_sym : 'h' '''
print('udp_input_sym_11', list(p))
()
def p_udp_input_sym_11(p):
'''udp_input_sym : 'h' '''
print('udp_input_sym_11', list(p))
()
def p_udp_input_sym_12(p):
'''udp_input_sym : 'B' '''
print('udp_input_sym_12', list(p))
()
def p_udp_input_sym_12(p):
'''udp_input_sym : 'B' '''
print('udp_input_sym_12', list(p))
()
def p_udp_input_sym_13(p):
'''udp_input_sym : 'r' '''
print('udp_input_sym_13', list(p))
()
def p_udp_input_sym_13(p):
'''udp_input_sym : 'r' '''
print('udp_input_sym_13', list(p))
()
def p_udp_input_sym_14(p):
'''udp_input_sym : 'R' '''
print('udp_input_sym_14', list(p))
()
def p_udp_input_sym_14(p):
'''udp_input_sym : 'R' '''
print('udp_input_sym_14', list(p))
()
def p_udp_input_sym_15(p):
'''udp_input_sym : 'M' '''
print('udp_input_sym_15', list(p))
()
def p_udp_input_sym_15(p):
'''udp_input_sym : 'M' '''
print('udp_input_sym_15', list(p))
()
def p_udp_input_sym_16(p):
'''udp_input_sym : 'n' '''
print('udp_input_sym_16', list(p))
()
def p_udp_input_sym_16(p):
'''udp_input_sym : 'n' '''
print('udp_input_sym_16', list(p))
()
def p_udp_input_sym_17(p):
'''udp_input_sym : 'N' '''
print('udp_input_sym_17', list(p))
()
def p_udp_input_sym_17(p):
'''udp_input_sym : 'N' '''
print('udp_input_sym_17', list(p))
()
def p_udp_input_sym_18(p):
'''udp_input_sym : 'p' '''
print('udp_input_sym_18', list(p))
()
def p_udp_input_sym_18(p):
'''udp_input_sym : 'p' '''
print('udp_input_sym_18', list(p))
()
def p_udp_input_sym_19(p):
'''udp_input_sym : 'P' '''
print('udp_input_sym_19', list(p))
()
def p_udp_input_sym_19(p):
'''udp_input_sym : 'P' '''
print('udp_input_sym_19', list(p))
()
def p_udp_input_sym_20(p):
'''udp_input_sym : 'Q' '''
print('udp_input_sym_20', list(p))
()
def p_udp_input_sym_20(p):
'''udp_input_sym : 'Q' '''
print('udp_input_sym_20', list(p))
()
def p_udp_input_sym_21(p):
'''udp_input_sym : 'q' '''
print('udp_input_sym_21', list(p))
()
def p_udp_input_sym_21(p):
'''udp_input_sym : 'q' '''
print('udp_input_sym_21', list(p))
()
def p_udp_input_sym_22(p):
'''udp_input_sym : '_' '''
print('udp_input_sym_22', list(p))
()
def p_udp_input_sym_22(p):
'''udp_input_sym : '_' '''
print('udp_input_sym_22', list(p))
()
def p_udp_input_sym_23(p):
'''udp_input_sym : '+' '''
print('udp_input_sym_23', list(p))
()
def p_udp_input_sym_23(p):
'''udp_input_sym : '+' '''
print('udp_input_sym_23', list(p))
()
def p_udp_input_sym_24(p):
'''udp_input_sym : DEC_NUMBER '''
print('udp_input_sym_24', list(p))
()
def p_udp_input_sym_24(p):
'''udp_input_sym : DEC_NUMBER '''
print('udp_input_sym_24', list(p))
()
def p_udp_output_sym_1(p):
'''udp_output_sym : '0' '''
print('udp_output_sym_1', list(p))
()
def p_udp_output_sym_1(p):
'''udp_output_sym : '0' '''
print('udp_output_sym_1', list(p))
()
def p_udp_output_sym_2(p):
'''udp_output_sym : '1' '''
print('udp_output_sym_2', list(p))
()
def p_udp_output_sym_2(p):
'''udp_output_sym : '1' '''
print('udp_output_sym_2', list(p))
()
def p_udp_output_sym_3(p):
'''udp_output_sym : 'x' '''
print('udp_output_sym_3', list(p))
()
def p_udp_output_sym_3(p):
'''udp_output_sym : 'x' '''
print('udp_output_sym_3', list(p))
()
def p_udp_output_sym_4(p):
'''udp_output_sym : '-' '''
print('udp_output_sym_4', list(p))
()
def p_udp_output_sym_4(p):
'''udp_output_sym : '-' '''
print('udp_output_sym_4', list(p))
()
def p_udp_output_sym_5(p):
'''udp_output_sym : DEC_NUMBER '''
print('udp_output_sym_5', list(p))
()
def p_udp_output_sym_5(p):
'''udp_output_sym : DEC_NUMBER '''
print('udp_output_sym_5', list(p))
()
def p_udp_port_decl_1(p):
'''udp_port_decl : K_input list_of_identifiers ';' '''
print('udp_port_decl_1', list(p))
()
def p_udp_port_decl_1(p):
'''udp_port_decl : K_input list_of_identifiers ';' '''
print('udp_port_decl_1', list(p))
()
def p_udp_port_decl_2(p):
'''udp_port_decl : K_output IDENTIFIER ';' '''
print('udp_port_decl_2', list(p))
()
def p_udp_port_decl_2(p):
'''udp_port_decl : K_output IDENTIFIER ';' '''
print('udp_port_decl_2', list(p))
# PWire*pp = new PWire(pname, NetNet::IMPLICIT, NetNet::POUTPUT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
# PWire*pp = new PWire(pname, NetNet::IMPLICIT, NetNet::POUTPUT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
# }
()
def p_udp_port_decl_3(p):
'''udp_port_decl : K_reg IDENTIFIER ';' '''
print('udp_port_decl_3', list(p))
# }
()
def p_udp_port_decl_3(p):
'''udp_port_decl : K_reg IDENTIFIER ';' '''
print('udp_port_decl_3', list(p))
# PWire*pp = new PWire(pname, NetNet::REG, NetNet::PIMPLICIT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
# PWire*pp = new PWire(pname, NetNet::REG, NetNet::PIMPLICIT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
# }
()
def p_udp_port_decl_4(p):
'''udp_port_decl : K_reg K_output IDENTIFIER ';' '''
print('udp_port_decl_4', list(p))
# }
()
def p_udp_port_decl_4(p):
'''udp_port_decl : K_reg K_output IDENTIFIER ';' '''
print('udp_port_decl_4', list(p))
# PWire*pp = new PWire(pname, NetNet::REG, NetNet::POUTPUT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
# PWire*pp = new PWire(pname, NetNet::REG, NetNet::POUTPUT, IVL_VT_LOGIC);
# vector<PWire*>*tmp = new vector<PWire*>(1);
# (*tmp)[0] = pp;
def p_udp_port_decls_2(p):
'''udp_port_decls : udp_port_decls udp_port_decl '''
print('udp_port_decls_2', list(p))
def p_udp_port_decls_2(p):
'''udp_port_decls : udp_port_decls udp_port_decl '''
print('udp_port_decls_2', list(p))
- # { vector<PWire*>*tmp = $1;
- # size_t s1 = $1->size();
- # tmp->resize(s1+$2->size());
- # for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
- # tmp->at(s1+idx) = $2->at(idx);
- # $$ = tmp;
- # delete $2;
+ # { vector<PWire*>*tmp = p[1];
+ # size_t s1 = p[1]->size();
+ # tmp->resize(s1+p[2]->size());
+ # for (size_t idx = 0 ; idx < p[2]->size() ; idx += 1)
+ # tmp->at(s1+idx) = p[2]->at(idx);
+ # p[0] = tmp;
+ # delete p[2];
# }
()
def p_udp_port_list_1(p):
'''udp_port_list : IDENTIFIER '''
print('udp_port_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_udp_port_list_1(p):
'''udp_port_list : IDENTIFIER '''
print('udp_port_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_udp_port_list_2(p):
'''udp_port_list : udp_port_list ',' IDENTIFIER '''
print('udp_port_list_2', list(p))
# }
()
def p_udp_port_list_2(p):
'''udp_port_list : udp_port_list ',' IDENTIFIER '''
print('udp_port_list_2', list(p))
'''udp_input_declaration_list : K_input IDENTIFIER '''
print('udp_input_declaration_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
'''udp_input_declaration_list : K_input IDENTIFIER '''
print('udp_input_declaration_list_1', list(p))
# { list<perm_string>*tmp = new list<perm_string>;
# }
()
def p_udp_input_declaration_list_2(p):
'''udp_input_declaration_list : udp_input_declaration_list ',' K_input IDENTIFIER '''
print('udp_input_declaration_list_2', list(p))
# }
()
def p_udp_input_declaration_list_2(p):
'''udp_input_declaration_list : udp_input_declaration_list ',' K_input IDENTIFIER '''
print('udp_input_declaration_list_2', list(p))
# }
()
def p_udp_primitive_1(p):
'''udp_primitive : K_primitive IDENTIFIER '(' udp_port_list ')' ';' udp_port_decls udp_init_opt udp_body K_endprimitive endlabel_opt '''
print('udp_primitive_1', list(p))
# }
()
def p_udp_primitive_1(p):
'''udp_primitive : K_primitive IDENTIFIER '(' udp_port_list ')' ';' udp_port_decls udp_init_opt udp_body K_endprimitive endlabel_opt '''
print('udp_primitive_1', list(p))
- # { perm_string tmp2 = lex_strings.make($2);
- # pform_make_udp(tmp2, $4, $7, $9, $8,
+ # { perm_string tmp2 = lex_strings.make(p[2]);
+ # pform_make_udp(tmp2, p[4], p[7], p[9], p[8],
# yyerror(@11, "error: Primitive end labels "
# "require SystemVerilog.");
# }
# yyerror(@11, "error: Primitive end labels "
# "require SystemVerilog.");
# }
# }
()
def p_udp_primitive_2(p):
'''udp_primitive : K_primitive IDENTIFIER '(' K_output udp_reg_opt IDENTIFIER udp_initial_expr_opt ',' udp_input_declaration_list ')' ';' udp_body K_endprimitive endlabel_opt '''
print('udp_primitive_2', list(p))
# }
()
def p_udp_primitive_2(p):
'''udp_primitive : K_primitive IDENTIFIER '(' K_output udp_reg_opt IDENTIFIER udp_initial_expr_opt ',' udp_input_declaration_list ')' ';' udp_body K_endprimitive endlabel_opt '''
print('udp_primitive_2', list(p))
- # { perm_string tmp2 = lex_strings.make($2);
- # perm_string tmp6 = lex_strings.make($6);
- # pform_make_udp(tmp2, $5, tmp6, $7, $9, $12,
+ # { 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],
# yyerror(@14, "error: Primitive end labels "
# "require SystemVerilog.");
# }
# yyerror(@14, "error: Primitive end labels "
# "require SystemVerilog.");
# }