Closed hurricup closed 1 year ago
IIRC, it should already be using a relative path which should be stable. The current version is 1.8.2 -- does it happen with that as well?
Unfortunately I can't check, because we are using patched version of jflex. Could you please point me to the piece of code responsible for that? I tried to look yesterday, but couldn't find it :(
Does it use same slashes on windows/non-windows?
The code is this here https://github.com/jflex-de/jflex/blob/eb81a2960238c29b5ea91f38895359982e31b668/jflex/src/main/java/jflex/generator/Emitter.java#L407-L414
which is called in emitHeader
:
https://github.com/jflex-de/jflex/blob/eb81a2960238c29b5ea91f38895359982e31b668/jflex/src/main/java/jflex/generator/Emitter.java#L416-L421
In 1.7.0, emitHeader
isn't in its own function yet, but if you search for generated by
in Emitter.java
you should find it. If you're using a patched version anyway, you could just delete that line that emits the source file name.
Thank you!!!
I'll leave this open as possible enhancement, because we probably still get different versions of the path in current versions depending on the platform the lexer was generated on.
Closing this, because in 1.8.2 JFlex does already normalise the path to slashes, i.e. the output should not depend on the host OS.
This is really annoying when you generate on different machines/oses and your resulting class is under VCS. Path is already changing.
I'm talking about