V0.9: Add missing semi-colons in parser rules.

Also add null actions to prevent older versions of bison failing due
to type clashes, plus a few minor spelling/formatting fixes.
This commit is contained in:
Martin Whitaker 2012-08-01 22:44:33 +01:00 committed by Stephen Williams
parent db3b1d9bf0
commit 693574107b
3 changed files with 17 additions and 4 deletions

View File

@ -839,8 +839,9 @@ config_rule_statement
;
opt_config
: /* The use clause takse an optional :config. */
: /* The use clause takes an optional :config. */
| ':' K_config
;
lib_cell_id
: IDENTIFIER
@ -853,6 +854,7 @@ list_of_libraries
: /* A NULL library means use the parents cell library. */
| list_of_libraries IDENTIFIER
{ delete[] $2; }
;
drive_strength
: '(' dr_strength0 ',' dr_strength1 ')'
@ -2532,7 +2534,7 @@ automatic_opt
| { $$ = false;}
;
generate_if : K_if '(' expression ')' { pform_start_generate_if(@1, $3); }
generate_if : K_if '(' expression ')' { pform_start_generate_if(@1, $3); } ;
generate_case_items
: generate_case_items generate_case_item
@ -3052,6 +3054,7 @@ range_opt
dimensions_opt
: { $$ = 0; }
| dimensions { $$ = $1; }
;
dimensions
: '[' expression ':' expression ']'
@ -3070,6 +3073,7 @@ dimensions
tmp->push_back(index);
$$ = tmp;
}
;
/* This is used to express the return type of a function. */
function_range_or_type_opt
@ -4343,7 +4347,6 @@ task_port_decl_list
yyerror(@2, "error: ';' is an invalid port declaration "
"separator.");
}
;
;
udp_body

View File

@ -126,7 +126,7 @@ vendor
sdf_parse_path, @2.first_line, $3);
free($3);
}
;
;
program_name
: '(' K_PROGRAM QSTRING ')'
@ -291,11 +291,15 @@ tchk_def
port_tchk
: port_instance
{ }
/* This must only be an edge. For now we just accept everything. */
| cond_edge_start port_instance ')'
{ }
/* These must only be a cond. For now we just accept everything. */
| cond_edge_start timing_check_condition port_spec ')'
{ }
| cond_edge_start QSTRING timing_check_condition port_spec ')'
{ }
;
cond_edge_start
@ -316,9 +320,13 @@ cond_edge_identifier
timing_check_condition
: port_interconnect
{ }
| '~' port_interconnect
{ }
| '!' port_interconnect
{ }
| port_interconnect equality_operator scalar_constant
{ }
;
equality_operator

View File

@ -136,6 +136,7 @@ header_line
footer_lines
: K_file_names T_NUMBER ';' { file_names.reserve($2); }
name_strings
;
name_strings
: T_STRING ';'
@ -883,6 +884,7 @@ symbol_access
{ $$ = vpip_make_PV($3, $5, $7); }
| K_PV '<' T_SYMBOL ',' T_NUMBER T_NUMBER ',' T_NUMBER '>'
{ $$ = vpip_make_PV($3, $5, $6, $8); }
;
/* functor operands can only be a list of symbols. */
symbols