Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If default rule matches '\n', yylineno isn't updated. #397

Open
vonbrand opened this issue Oct 17, 2018 · 0 comments · May be fixed by #526
Open

If default rule matches '\n', yylineno isn't updated. #397

vonbrand opened this issue Oct 17, 2018 · 0 comments · May be fixed by #526
Milestone

Comments

@vonbrand
Copy link

`%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".

@westes westes added this to the 2.6.6 milestone Oct 22, 2018
@ggujjula ggujjula linked a pull request May 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants