diff options
Diffstat (limited to 'tool/src/org/antlr/v4/codegen/target/Python3Target.java')
-rw-r--r-- | tool/src/org/antlr/v4/codegen/target/Python3Target.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tool/src/org/antlr/v4/codegen/target/Python3Target.java b/tool/src/org/antlr/v4/codegen/target/Python3Target.java index e151ea0..388269a 100644 --- a/tool/src/org/antlr/v4/codegen/target/Python3Target.java +++ b/tool/src/org/antlr/v4/codegen/target/Python3Target.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. + * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ @@ -8,6 +8,7 @@ package org.antlr.v4.codegen.target; import org.antlr.v4.codegen.CodeGenerator; import org.antlr.v4.codegen.Target; +import org.antlr.v4.codegen.UnicodeEscapes; import org.antlr.v4.tool.ast.GrammarAST; import org.stringtemplate.v4.STGroup; import org.stringtemplate.v4.StringRenderer; @@ -55,7 +56,7 @@ public class Python3Target extends Target { @Override public int getSerializedATNSegmentLimit() { // set to something stupid to avoid segmentation - return 2 ^ 31; + return Integer.MAX_VALUE; } @Override @@ -95,7 +96,7 @@ public class Python3Target extends Target { @Override public String getVersion() { - return "4.6"; + return "4.7.1"; } /** Avoid grammar symbols in this set to prevent conflicts in gen'd code. */ @@ -115,5 +116,8 @@ public class Python3Target extends Target { badWords.add("parserRule"); } - + @Override + protected void appendUnicodeEscapedCodePoint(int codePoint, StringBuilder sb) { + UnicodeEscapes.appendPythonStyleEscapedCodePoint(codePoint, sb); + } } |