-
Notifications
You must be signed in to change notification settings - Fork 537
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
flex --noline outputs a #line directive #55
Comments
tklauser
added a commit
to tklauser/flex
that referenced
this issue
Feb 23, 2016
There are two instances in the code which will print a #line directive to the resulting lexer, regardless of the value of gen_line_dirs. Fix them, so they also respect gen_line_dirs. This fixes issue westes#55. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Closed
As per recent changes to master, this is now resolved. |
eric-s-raymond
added a commit
to eric-s-raymond/flex
that referenced
this issue
Oct 2, 2020
Formerly, Flex's own lexer and the logic for pocessing command-line options both did calls to write M4 conditionals to a buffer that was later dumped into the befinning of the text that m4 expands, before the body of the skel file. This was bad layering. Instead, both these places now set flags in the ctrl structure. Later, (almost) all the generated m4 conditionals are shipped at once. It's "almost" because there are a couple of awkward cases to be cleaned up. Again, this was the part that could be done simply via almost mechanical cut and paste. In generated code, there are some comment diffs because symbols that used to be invisibly set are now visibly set - that is, shown at the beginning of the generated C. westes#55 in the retargeting patch series
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This issue was reported by a Debian user in Bug 729927
The command
flex --noline name.lex
generates the line
#line 3 "lex.yy.c"
This causes some confusion when:
1: line 3 is really line 2, and,
2: when (in order to compile using C++) the file has
been renamed to (something like) lex.yy.cpp causing
error messages to specify file lex.yy.c instead of
lex.yy.cpp (or some other name).
Manoj
The text was updated successfully, but these errors were encountered: