From b376115e15bf1860364d069e09d070bbd646f142 Mon Sep 17 00:00:00 2001 From: Pawel Szostek Date: Tue, 5 Jul 2011 15:58:26 +0200 Subject: [PATCH] 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. --- vhdlpp/parse.y | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 6a51ffea4..c61b3d984 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -1375,12 +1375,14 @@ selected_names_use sequence_of_statements : sequence_of_statements sequential_statement { std::list*tmp = $1; - tmp->push_back($2); + if($2) + tmp->push_back($2); $$ = tmp; } | sequential_statement { std::list*tmp = new std::list; - tmp->push_back($1); + 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; } ;