Fix parsing of always @(*)

git-svn-id: file://localhost/svn/verilator/trunk/verilator@987 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder 2008-02-14 02:08:10 +00:00
parent 4977a5e1d9
commit 98fff6a4ce
4 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Avoid creating obj_dir with --lint-only. [Ding Xiaoliang]
**** Fix parsing of always @(*). [Patricio Kaplan]
* Verilator 3.656 2008/01/18
**** Wide VL_CONST_W_#X functions are now made automatically. [Bernard Deadman]

View File

@ -701,7 +701,7 @@ escid \\[^ \t\f\r\n]+
/************************************************************************/
/* Attributes */
<V95,V01,V05,S05>{
"(*" { yymore(); yy_push_state(ATTRMODE); }
"(*"/{ws}*[^)] { yymore(); yy_push_state(ATTRMODE); } // Doesn't match (*)
}
/************************************************************************/

View File

@ -838,7 +838,7 @@ eventControlE: /* empty */ { $$ = NULL; }
// IEEE: event_control
eventControl: '@' '(' senList ')' { $$ = new AstSenTree($1,$3); }
| '@' senitemVar { $$ = new AstSenTree($1,$2); } /* For events only */
| '@' '(' '*' ')' { $$ = NULL; $2->v3error("Use @*. always @ (*) to be depreciated in Verilog 2005.\n"); }
| '@' '(' '*' ')' { $$ = NULL; } /* Verilog 2001 */
| '@' '*' { $$ = NULL; } /* Verilog 2001 */
;

View File

@ -1,4 +1,4 @@
// $Id:$
// $Id$
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
@ -14,7 +14,7 @@ module t (/*AUTOARG*/
reg [31:0] a, b, c;
always @ (/*AS*/a or b) begin
always @ (*) begin // Test Verilog 2001 (*)
// verilator lint_off COMBDLY
c <= a | b;
// verilator lint_on COMBDLY