Partially fix comment handling in preprocessor directives.

Multi-line /* */ comments are still broken.  I think this will wait to
be fixed until we have a real preprocessor.
This commit is contained in:
Ian Romanick 2010-04-07 13:43:52 -07:00
parent 77cce649c9
commit 62f62ca3b3

View file

@ -61,6 +61,7 @@
^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; }
^[ \t]*#[ \t]*line { BEGIN PP; return LINE; }
^[ \t]*#[ \t]*pragma { BEGIN PP; return PRAGMA; }
<PP>\/\/[^\n]* { }
<PP>: return COLON;
<PP>[_a-zA-Z][_a-zA-Z0-9]* {
yylval->identifier = strdup(yytext);