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:
Stephen Williams 2008-10-04 20:35:22 -07:00
parent 03fd124d5a
commit cc9e3d1536
1 changed files with 2 additions and 2 deletions

View File

@ -124,8 +124,8 @@ S [afpnumkKMGT]
/* The contents of C-style comments are ignored, like white space. */
"/*" { comment_enter = YY_START; BEGIN(CCOMMENT); }
<CCOMMENT>. { yymore(); }
<CCOMMENT>\n { yylloc.first_line += 1; yymore(); }
<CCOMMENT>. { ; }
<CCOMMENT>\n { yylloc.first_line += 1; }
<CCOMMENT>"*/" { BEGIN(comment_enter); }