Open
Description
My .g4 files are in src/main/antlr4/path/to/my/unbelievable/package
.
Antlr generates the desired .java files, and adds a comment at the beginning to point out that these files have been automatically generated:
// Generated from path\to\my\unbelievable\package\MyLexer.g4 by ANTLR 4.13.0
As per Java Language Specification, §3.3: "Unicode escapes are recognized in comments and character literals before tokenization." so when it sees the \u
of my\unbelievable\package
...
illegal unicode escape(errors(1): 1:34-1:36)
Invalid unicodeJava(1610612992)
and a purely decorative comment prevents compilation.
Proposed solution
Use /
instead of \
// Generated from path/to/my/unbelievable./package/MyLexer.g4 by ANTLR 4.13.0
Metadata
Metadata
Assignees
Labels
No labels