Skip to content

Commit

Permalink
fix: antlr#4128 - Prevent generating escape sequences when Windows di…
Browse files Browse the repository at this point in the history
…rectories start with a u

Signed-off-by: Jim.Idle <[email protected]>
  • Loading branch information
jimidle authored and parrt committed May 31, 2023
1 parent 628602d commit 5d7b514
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/src/org/antlr/v4/codegen/model/OutputFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
grammarFileName = g.fileName.replace("\\", "/"); // Prevent a path with windows delim and u breaking Java pre-parser on comments
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
Expand Down

0 comments on commit 5d7b514

Please sign in to comment.