From 5a1a5a7d97585284fb5978cc37a039fd581776c5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 11 Jun 2008 13:09:36 -0400 Subject: [PATCH] Ignore "// verilator" comments alone on endif lines. --- Changes | 2 ++ src/verilog.l | 1 + test_regress/t/t_extend.v | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f5ddc54b2..f6011349c 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix compile errors under Fedora 9, GCC 4.3.0. [by Jeremy Bennett] +**** Ignore "// verilator" comments alone on endif lines. [Rodney Sinclair] + * Verilator 3.664 2008/05/08 **** Fix missing file in kit. diff --git a/src/verilog.l b/src/verilog.l index bdeaa3f52..9047c3c4c 100644 --- a/src/verilog.l +++ b/src/verilog.l @@ -529,6 +529,7 @@ escid \\[^ \t\f\r\n]+ /* Converted from //{cmt}verilator ...{cmt} by preprocessor */ { + "/*verilator"{ws}*"*/" {} /* Ignore empty comments, may be `endif // verilator */ "/*verilator clock_enable*/" {yylval.fileline = CRELINE(); return yVL_CLOCK_ENABLE;} "/*verilator coverage_block_off*/" {yylval.fileline = CRELINE(); return yVL_COVER_OFF;} "/*verilator full_case*/" {yylval.fileline = CRELINE(); return yVL_FULL_CASE;} diff --git a/test_regress/t/t_extend.v b/test_regress/t/t_extend.v index 738ba779a..6ddf1a985 100644 --- a/test_regress/t/t_extend.v +++ b/test_regress/t/t_extend.v @@ -71,7 +71,8 @@ module t (/*AUTOARG*/ printf("In systemc_dtor\n"); printf("*-* All Finished *-*\n"); `verilog -`endif +// Test verilator comment after a endif +`endif // verilator endmodule