From 78a321925f2a4f54e71368bd6814e90bdd201671 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 5 Apr 2015 10:54:56 -0400 Subject: [PATCH] Add Parser useProtected argument to aid runtime, Verilog-Perl bug899. --- src/V3PreLex.l | 6 +++--- test_regress/t/t_preproc.out | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/V3PreLex.l b/src/V3PreLex.l index bd20b398d..8a740aec0 100644 --- a/src/V3PreLex.l +++ b/src/V3PreLex.l @@ -124,16 +124,16 @@ drop [\032] /* Protected blocks */ "`protected" { yy_push_state(PRTMODE); yymore(); } <> { linenoInc(); yyerrorf("EOF in `protected"); yyleng=0; yyterminate(); } -{crnl} { linenoInc(); yymore(); } +{crnl} { linenoInc(); return VP_TEXT; } . { yymore(); } -"`endprotected" { yy_pop_state(); return (VP_TEXT); } +"`endprotected" { yy_pop_state(); return VP_TEXT; } /* Pass-through include <> filenames */ <> { linenoInc(); yyerrorf("EOF in unterminated include filename"); yyleng=0; yyterminate(); } {crnl} { linenoInc(); yyerrorf("Unterminated include filename"); BEGIN(INITIAL); } [^\>\\] { yymore(); } {backslash}. { yymore(); } -[\>] { yy_pop_state(); return (VP_STRING); } +[\>] { yy_pop_state(); return VP_STRING; } /* Reading definition formal parenthesis (or not) to begin formal arguments */ /* Note '(' must IMMEDIATELY follow definition name */ diff --git a/test_regress/t/t_preproc.out b/test_regress/t/t_preproc.out index 7e0bddfd2..af36178c0 100644 --- a/test_regress/t/t_preproc.out +++ b/test_regress/t/t_preproc.out @@ -263,8 +263,8 @@ module prot(); `protected I!#r#e6<_Q{{E2+]I3<[3s)1@D|'E''i!O?]jD>Jo_![Cl) #nj1]p,3^1~,="E@QZB\T)eU\pC#C|7=\$J$##A[@-@{Qk] +`line 159 "t/t_preproc.v" 0 `endprotected -`line 160 "t/t_preproc.v" 0 endmodule