mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
Comments should be tossed by the lexor.
It is silly to use yymore() to collect even more of the comment so that it can be tossed at the tail end of the comment processing. So don't.
This commit is contained in:
@@ -124,8 +124,8 @@ S [afpnumkKMGT]
|
|||||||
/* The contents of C-style comments are ignored, like white space. */
|
/* The contents of C-style comments are ignored, like white space. */
|
||||||
|
|
||||||
"/*" { comment_enter = YY_START; BEGIN(CCOMMENT); }
|
"/*" { comment_enter = YY_START; BEGIN(CCOMMENT); }
|
||||||
<CCOMMENT>. { yymore(); }
|
<CCOMMENT>. { ; }
|
||||||
<CCOMMENT>\n { yylloc.first_line += 1; yymore(); }
|
<CCOMMENT>\n { yylloc.first_line += 1; }
|
||||||
<CCOMMENT>"*/" { BEGIN(comment_enter); }
|
<CCOMMENT>"*/" { BEGIN(comment_enter); }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user