diff --git a/Changes b/Changes index 421129339..877a19082 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Add error message when modules have duplicate names. [Stefan Thiede] +**** Allow defines terminated in EOF, though against spec. [Stefan Thiede] + **** Fix "always @ ((a) or (b))" syntax error. [by Niranjan Prabhu] **** Fix "output reg name=expr;" syntax error. [Martin Scharrer] diff --git a/src/V3PreLex.l b/src/V3PreLex.l index 3fd0953c3..c6edff507 100644 --- a/src/V3PreLex.l +++ b/src/V3PreLex.l @@ -126,7 +126,7 @@ psl [p]sl "/*" { yy_push_state(CMTMODE); yymore(); } "//"[^\n\r]* { return (VP_COMMENT);} {drop} { } -<> { linenoInc(); yyerror("EOF (missing return?) in define value"); yyleng=0; yyterminate(); } +<> { linenoInc(); yy_pop_state(); yytext="\n"; yyleng=1; return (VP_DEFVALUE); } /* Technically illegal, but people complained */ {crnl} { linenoInc(); yy_pop_state(); yytext="\n"; yyleng=1; return (VP_DEFVALUE); } [\\]{crnl} { linenoInc(); appendDefValue("\n",1); } /* Include return so can maintain output line count */ [^\/\*\n\r\\]+ |