lexer: Allow whitespace before comments

This commit is contained in:
Michael Stapelberg 2009-09-27 17:00:37 +02:00
parent 9b1699f4c4
commit c2a42dd503
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@
%%
<BIND_A2WS_COND>[^\n]+ { BEGIN(INITIAL); yylval.string = strdup(yytext); return STR; }
^#[^\n]* { return TOKCOMMENT; }
^[ \t]*#[^\n]* { return TOKCOMMENT; }
<COLOR_COND>[0-9a-fA-F]+ { yylval.string = strdup(yytext); return HEX; }
[0-9]+ { yylval.number = atoi(yytext); return NUMBER; }
bind { BEGIN(BIND_COND); return TOKBIND; }