flex
flex copied to clipboard
If default rule matches '\n', yylineno isn't updated.
`%option yylineno
/* Shut up gcc -O2 -Wall */ %option noinput nounput noyywrap
%% . /* Ignore */ %% int main() { yylex(); printf("%d lines\n", yylineno); }`
When run on it's own source, it reports "1 lines".