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:
parent
03fd124d5a
commit
cc9e3d1536
|
|
@ -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); }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue