Add parser support for VHDL's null statements

Handle null statements in sequences of statements.
If a null is encountered, it is omitted and not
added to the list of statements.
This commit is contained in:
Pawel Szostek 2011-07-05 15:58:26 +02:00 committed by Stephen Williams
parent ad31eaaea8
commit b376115e15
1 changed files with 5 additions and 2 deletions

View File

@ -1375,11 +1375,13 @@ selected_names_use
sequence_of_statements
: sequence_of_statements sequential_statement
{ std::list<SequentialStmt*>*tmp = $1;
if($2)
tmp->push_back($2);
$$ = tmp;
}
| sequential_statement
{ std::list<SequentialStmt*>*tmp = new std::list<SequentialStmt*>;
if($1)
tmp->push_back($1);
$$ = tmp;
}
@ -1390,6 +1392,7 @@ sequential_statement
| signal_assignment_statement { $$ = $1; }
| case_statement { $$ = $1; }
| procedure_call_statement { $$ = $1; }
| K_null ';' { $$ = 0; }
;
shift_expression : simple_expression { $$ = $1; } ;