Indicate the lex source file in the header of the java source#371
Merged
regisd merged 6 commits intojflex-de:masterfrom Sep 28, 2018
Merged
Indicate the lex source file in the header of the java source#371regisd merged 6 commits intojflex-de:masterfrom
regisd merged 6 commits intojflex-de:masterfrom
Conversation
Emit in the header of the generated java source the path of the lex file.
lsf37
reviewed
Sep 25, 2018
Member
lsf37
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
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 ```
Member
Author
returns: |
Member
Author
|
PTAL |
lsf37
approved these changes
Sep 28, 2018
Member
lsf37
left a comment
There was a problem hiding this comment.
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.
regisd
pushed a commit
that referenced
this pull request
Sep 28, 2018
Initial commit b9fa958 Author: Régis Décamps <regisd@google.com> 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 ```
regisd
added a commit
to regisd/jflex
that referenced
this pull request
Sep 30, 2018
A better header is emitted since jflex-de#371 commit b9fa958
Member
Author
|
Follow-up in #397 |
regisd
added a commit
to regisd/jflex
that referenced
this pull request
Sep 30, 2018
A better header is emitted since jflex-de#371 commit b9fa958
regisd
added a commit
that referenced
this pull request
Sep 30, 2018
regisd
pushed a commit
that referenced
this pull request
Sep 30, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Emit in the header of the generated java source the path of the lex file.