Add Parser useProtected argument to aid runtime, Verilog-Perl bug899.

This commit is contained in:
Wilson Snyder 2015-04-05 10:54:56 -04:00
parent 643572595e
commit 78a321925f
2 changed files with 4 additions and 4 deletions

View File

@ -124,16 +124,16 @@ drop [\032]
/* Protected blocks */
<INITIAL>"`protected" { yy_push_state(PRTMODE); yymore(); }
<PRTMODE><<EOF>> { linenoInc(); yyerrorf("EOF in `protected"); yyleng=0; yyterminate(); }
<PRTMODE>{crnl} { linenoInc(); yymore(); }
<PRTMODE>{crnl} { linenoInc(); return VP_TEXT; }
<PRTMODE>. { yymore(); }
<PRTMODE>"`endprotected" { yy_pop_state(); return (VP_TEXT); }
<PRTMODE>"`endprotected" { yy_pop_state(); return VP_TEXT; }
/* Pass-through include <> filenames */
<INCMODE><<EOF>> { linenoInc(); yyerrorf("EOF in unterminated include filename"); yyleng=0; yyterminate(); }
<INCMODE>{crnl} { linenoInc(); yyerrorf("Unterminated include filename"); BEGIN(INITIAL); }
<INCMODE>[^\>\\] { yymore(); }
<INCMODE>{backslash}. { yymore(); }
<INCMODE>[\>] { yy_pop_state(); return (VP_STRING); }
<INCMODE>[\>] { yy_pop_state(); return VP_STRING; }
/* Reading definition formal parenthesis (or not) to begin formal arguments */
/* Note '(' must IMMEDIATELY follow definition name */

View File

@ -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