Be a bit more tolerant about line directives.
This commit is contained in:
parent
cc70e683c7
commit
70a459a112
|
@ -22,10 +22,12 @@ extern char *filename;
|
||||||
if (c=='\n') lineno++;
|
if (c=='\n') lineno++;
|
||||||
} while (c!='/');
|
} while (c!='/');
|
||||||
}
|
}
|
||||||
^\#[ \t]+[0-9]+[ \t]+\".*\"$ {
|
^\#(line)?[ \t]*[0-9]+[ \t]+\".*\".*$ {
|
||||||
int ind,ind2;
|
int ind,ind2;
|
||||||
lineno=atoi(yytext+1)-1;
|
for (ind=0; yytext[ind] < '0' || yytext[ind]>'9'; ind++)
|
||||||
for(ind=0;yytext[ind]!='"';ind++)
|
;
|
||||||
|
lineno=atoi(&yytext[ind])-1;
|
||||||
|
for(;yytext[ind]!='"';ind++)
|
||||||
;
|
;
|
||||||
for(ind2=ind+1;yytext[ind2]!='"';ind2++)
|
for(ind2=ind+1;yytext[ind2]!='"';ind2++)
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue