-
Notifications
You must be signed in to change notification settings - Fork 120
Indicate the lex source file in the header of the java source #371
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
Conversation
Emit in the header of the generated java source the path of the lex file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slightly problematic (I think I had this in early versions of JFlex), because it can leave machine-local paths in the generated sources (like /home/xyz/src/blah/), which is usually no problem, but some people really don't like to reveal those details.
We could make it configurable, i.e. add an option to turn it off.
|
I agree, this shouldn't include the working directory. |
This allows to invoke mvn from anywhere and always emit the same header. e.g. ``` // DO NOT EDIT // Generated by JFlex 1.7.1-SNAPSHOT // source: src/main/jflex/lcalc.flex ```
returns: |
|
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, this looks good in terms of path, let's merge it. If someone doesn't like it we can still add an option then.
Initial commit b9fa958 Author: Régis Décamps <[email protected]> Date: Fri Sep 28 11:58:35 2018 +0200 Indicate the lex source file in the header of the java source (#371) * Indicate in the source lexFile in the header of the java source - Emit in the header of the generated java source the path of the lex file. - Do not show the working directory, only the relative path to the working directory. * Set the source directory in the jflex-maven-plugin e.g. ``` // DO NOT EDIT // Generated by JFlex 1.7.1-SNAPSHOT // source: src/main/jflex/lcalc.flex ```
A better header is emitted since jflex-de#371 commit b9fa958
|
Follow-up in #397 |
A better header is emitted since jflex-de#371 commit b9fa958
Initial commit 3936f66 Author: Régis Décamps <[email protected]> Date: Sun Sep 30 18:25:06 2018 +0200 Remove duplicate "This class is generated by JFlex" (#397) A better header is emitted since #371 commit b9fa958
Emit in the header of the generated java source the path of the lex file.