def p_class_declaration_endlabel_opt_2(p):
'''class_declaration_endlabel_opt : ':' IDENTIFIER '''
print('class_declaration_endlabel_opt_2', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_class_declaration_endlabel_opt_3(p):
'''class_declaration_endlabel_opt : '''
def p_class_item_qualifier_list_2(p):
'''class_item_qualifier_list : class_item_qualifier '''
print('class_item_qualifier_list_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_class_item_qualifier_opt_1(p):
'''class_item_qualifier_opt : class_item_qualifier_list '''
print('class_item_qualifier_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_class_item_qualifier_opt_2(p):
'''class_item_qualifier_opt : '''
def p_data_type_4(p):
'''data_type : enum_data_type '''
print('data_type_4', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_data_type_5(p):
'''data_type : atom2_type signed_unsigned_opt '''
def p_data_type_or_implicit_1(p):
'''data_type_or_implicit : data_type '''
print('data_type_or_implicit_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_data_type_or_implicit_2(p):
'''data_type_or_implicit : signing dimensions_opt '''
def p_data_type_or_implicit_or_void_1(p):
'''data_type_or_implicit_or_void : data_type_or_implicit '''
print('data_type_or_implicit_or_void_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_data_type_or_implicit_or_void_2(p):
'''data_type_or_implicit_or_void : K_void '''
def p_for_step_3(p):
'''for_step : compressed_statement '''
print('for_step_3', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_function_declaration_1(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 '''
def p_lifetime_opt_1(p):
'''lifetime_opt : lifetime '''
print('lifetime_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_lifetime_opt_2(p):
'''lifetime_opt : '''
def p_number_2(p):
'''number : DEC_NUMBER '''
print('number_2', list(p))
+ num = Leaf(token.NUMBER, "%s" % (p[1]))
+ p[0] = num
# { $$ = $1; based_size = 0;}
()
def p_number_3(p):
def p_port_direction_opt_1(p):
'''port_direction_opt : port_direction '''
print('port_direction_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_port_direction_opt_2(p):
'''port_direction_opt : '''
def p_property_qualifier_opt_1(p):
'''property_qualifier_opt : property_qualifier_list '''
print('property_qualifier_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_property_qualifier_opt_2(p):
'''property_qualifier_opt : '''
def p_property_qualifier_list_2(p):
'''property_qualifier_list : property_qualifier '''
print('property_qualifier_list_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_property_spec_1(p):
'''property_spec : clocking_event_opt property_spec_disable_iff_opt property_expr '''
def p_statement_or_null_1(p):
'''statement_or_null : statement '''
print('statement_or_null_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_or_null_2(p):
'''statement_or_null : attribute_list_opt ';' '''
def p_tf_port_list_1(p):
'''tf_port_list : _embed0_tf_port_list tf_port_item_list '''
print('tf_port_list_1', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p__embed0_tf_port_list(p):
'''_embed0_tf_port_list : '''
def p_tf_port_item_list_2(p):
'''tf_port_item_list : tf_port_item '''
print('tf_port_item_list_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_tf_port_item_list_3(p):
'''tf_port_item_list : error ',' tf_port_item '''
def p_attribute_list_opt_1(p):
'''attribute_list_opt : attribute_instance_list '''
print('attribute_list_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_attribute_list_opt_2(p):
'''attribute_list_opt : '''
def p_attribute_instance_list_2(p):
'''attribute_instance_list : K_PSTAR attribute_list K_STARP '''
print('attribute_instance_list_2', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_attribute_instance_list_3(p):
'''attribute_instance_list : attribute_instance_list K_PSTAR K_STARP '''
print('attribute_instance_list_3', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_attribute_instance_list_4(p):
'''attribute_instance_list : attribute_instance_list K_PSTAR attribute_list K_STARP '''
def p_delay3_opt_1(p):
'''delay3_opt : delay3 '''
print('delay3_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_delay3_opt_2(p):
'''delay3_opt : '''
def p_drive_strength_opt_1(p):
'''drive_strength_opt : drive_strength '''
print('drive_strength_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_drive_strength_opt_2(p):
'''drive_strength_opt : '''
def p_event_expression_list_1(p):
'''event_expression_list : event_expression '''
print('event_expression_list_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_event_expression_list_2(p):
'''event_expression_list : event_expression_list K_or event_expression '''
'''expression : expr_primary_or_typename '''
print('expression_1', list(p))
p[0] = p[1]
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expression_2(p):
'''expression : inc_or_dec_expression '''
print('expression_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expression_3(p):
'''expression : inside_expression '''
print('expression_3', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expression_4(p):
'''expression : '+' attribute_list_opt expr_primary %prec UNARY_PREC '''
def p_expr_mintypmax_1(p):
'''expr_mintypmax : expression '''
print('expr_mintypmax_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expr_mintypmax_2(p):
'''expr_mintypmax : expression ':' expression ':' expression '''
def p_expr_primary_39(p):
'''expr_primary : '(' expr_mintypmax ')' '''
print('expr_primary_39', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_expr_primary_40(p):
'''expr_primary : '{' expression_list_proper '}' '''
def p_expr_primary_46(p):
'''expr_primary : assignment_pattern '''
print('expr_primary_46', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expr_primary_47(p):
'''expr_primary : streaming_concatenation '''
print('expr_primary_47', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_expr_primary_48(p):
'''expr_primary : K_null '''
def p_function_item_list_opt_1(p):
'''function_item_list_opt : function_item_list '''
print('function_item_list_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_function_item_list_opt_2(p):
'''function_item_list_opt : '''
def p_function_item_list_1(p):
'''function_item_list : function_item '''
print('function_item_list_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_function_item_list_2(p):
'''function_item_list : function_item_list function_item '''
def p_function_item_1(p):
'''function_item : tf_port_declaration '''
print('function_item_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_function_item_2(p):
'''function_item : block_item_decl '''
def p_net_type_opt_1(p):
'''net_type_opt : net_type '''
print('net_type_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_net_type_opt_2(p):
'''net_type_opt : '''
def p_cont_assign_list_2(p):
'''cont_assign_list : cont_assign '''
print('cont_assign_list_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_module_1(p):
'''module : attribute_list_opt module_start lifetime_opt IDENTIFIER _embed0_module module_package_import_list_opt module_parameter_port_list_opt module_port_list_opt module_attribute_foreign ';' _embed1_module timeunits_declaration_opt _embed2_module module_item_list_opt module_end _embed3_module endlabel_opt '''
def p_endlabel_opt_1(p):
'''endlabel_opt : ':' IDENTIFIER '''
print('endlabel_opt_1', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_endlabel_opt_2(p):
'''endlabel_opt : '''
def p_module_port_list_opt_1(p):
'''module_port_list_opt : '(' list_of_ports ')' '''
print('module_port_list_opt_1', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_module_port_list_opt_2(p):
'''module_port_list_opt : '(' list_of_port_declarations ')' '''
print('module_port_list_opt_2', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_module_port_list_opt_3(p):
'''module_port_list_opt : '''
def p_module_parameter_port_list_opt_2(p):
'''module_parameter_port_list_opt : '#' '(' module_parameter_port_list ')' '''
print('module_parameter_port_list_opt_2', list(p))
+ p[0] = p[2]
()
def p_module_parameter_port_list_1(p):
'''module_parameter_port_list : K_parameter param_type parameter_assign '''
print('module_parameter_port_list_1', list(p))
+ p[0] = [p[3]]
()
def p_module_parameter_port_list_2(p):
'''module_parameter_port_list : module_parameter_port_list ',' parameter_assign '''
print('module_parameter_port_list_2', list(p))
+ p[0] = p[1].append(p[3])
()
def p_module_parameter_port_list_3(p):
'''module_parameter_port_list : module_parameter_port_list ',' K_parameter param_type parameter_assign '''
print('module_parameter_port_list_3', list(p))
+ p[1].append(p[5])
+ p[0] = p[1]
()
def p_module_item_1(p):
'''module_item : module '''
def p_parameter_assign_1(p):
'''parameter_assign : IDENTIFIER '=' expression parameter_value_ranges_opt '''
print('parameter_assign_1', list(p))
+ 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);
def p_parameter_value_ranges_opt_1(p):
'''parameter_value_ranges_opt : parameter_value_ranges '''
print('parameter_value_ranges_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_parameter_value_ranges_opt_2(p):
'''parameter_value_ranges_opt : '''
def p_value_range_expression_1(p):
'''value_range_expression : expression '''
print('value_range_expression_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_value_range_expression_2(p):
'''value_range_expression : K_inf '''
def p_port_1(p):
'''port : port_reference '''
print('port_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_port_2(p):
'''port : '.' IDENTIFIER '(' port_reference ')' '''
def p_port_opt_1(p):
'''port_opt : port '''
print('port_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_port_opt_2(p):
'''port_opt : '''
def p_port_reference_list_1(p):
'''port_reference_list : port_reference '''
print('port_reference_list_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_port_reference_list_2(p):
'''port_reference_list : port_reference_list ',' port_reference '''
def p_dimensions_opt_2(p):
'''dimensions_opt : dimensions '''
print('dimensions_opt_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_dimensions_1(p):
'''dimensions : variable_dimension '''
print('dimensions_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_dimensions_2(p):
'''dimensions : dimensions variable_dimension '''
def p_statement_item_14(p):
'''statement_item : procedural_assertion_statement '''
print('statement_item_14', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_item_15(p):
'''statement_item : loop_statement '''
print('statement_item_15', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_item_16(p):
'''statement_item : jump_statement '''
print('statement_item_16', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_item_17(p):
'''statement_item : K_case '(' expression ')' case_items K_endcase '''
def p_statement_item_27(p):
'''statement_item : compressed_statement ';' '''
print('statement_item_27', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_item_28(p):
'''statement_item : inc_or_dec_expression ';' '''
def p_statement_or_null_list_opt_1(p):
'''statement_or_null_list_opt : statement_or_null_list '''
print('statement_or_null_list_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_statement_or_null_list_opt_2(p):
'''statement_or_null_list_opt : '''
def p_task_item_2(p):
'''task_item : tf_port_declaration '''
print('task_item_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_task_item_list_1(p):
'''task_item_list : task_item_list task_item '''
def p_task_item_list_2(p):
'''task_item_list : task_item '''
print('task_item_list_2', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_task_item_list_opt_1(p):
'''task_item_list_opt : task_item_list '''
print('task_item_list_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_task_item_list_opt_2(p):
'''task_item_list_opt : '''
def p_tf_port_list_opt_1(p):
'''tf_port_list_opt : tf_port_list '''
print('tf_port_list_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_tf_port_list_opt_2(p):
'''tf_port_list_opt : '''
def p_udp_init_opt_1(p):
'''udp_init_opt : udp_initial '''
print('udp_init_opt_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_udp_init_opt_2(p):
'''udp_init_opt : '''
def p_udp_port_decls_1(p):
'''udp_port_decls : udp_port_decl '''
print('udp_port_decls_1', list(p))
- # { $$ = $1; }
+ p[0] = p[1]
()
def p_udp_port_decls_2(p):
'''udp_port_decls : udp_port_decls udp_port_decl '''
def p_udp_initial_expr_opt_1(p):
'''udp_initial_expr_opt : '=' expression '''
print('udp_initial_expr_opt_1', list(p))
- # { $$ = $2; }
+ p[0] = p[2]
()
def p_udp_initial_expr_opt_2(p):
'''udp_initial_expr_opt : '''