diff options
author | Andrius Merkys <andrius.merkys@gmail.com> | 2018-11-23 05:11:21 -0500 |
---|---|---|
committer | Andrius Merkys <andrius.merkys@gmail.com> | 2018-11-23 05:11:21 -0500 |
commit | c4ee4797aaf879bed5005c65d0831f23edc46f3a (patch) | |
tree | 6f4a93a188e0af3ff1feeb58eee470ca7cd77eb8 | |
parent | 8ad7e4cde2e61fd919829a2a60ca01a43a217d26 (diff) |
Adding a patch to fix string template input file tool/resources/org/antlr/v4/tool/templates/unicodedata.st.
-rw-r--r-- | debian/patches/fix-unicodedata.st.patch | 21 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/debian/patches/fix-unicodedata.st.patch b/debian/patches/fix-unicodedata.st.patch new file mode 100644 index 0000000..4e9ed4c --- /dev/null +++ b/debian/patches/fix-unicodedata.st.patch @@ -0,0 +1,21 @@ +--- a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st ++++ b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st +@@ -14,15 +14,15 @@ + * Code-generated utility class mapping Unicode properties to Unicode code point ranges. + */ + public abstract class UnicodeData { +- private static final Map\<String, IntervalSet\> propertyCodePointRanges = new HashMap\<\>(<length(propertyCodePointRanges)>); +- private static final Map\<String, String\> propertyAliases = new HashMap\<\>(<length(propertyAliases)>); ++ private static final Map\<String, IntervalSet> propertyCodePointRanges = new HashMap\<>(<length(propertyCodePointRanges)>); ++ private static final Map\<String, String> propertyAliases = new HashMap\<>(<length(propertyAliases)>); + + // Work around Java 64k bytecode method limit by splitting up static + // initialization into one method per Unicode property + + <propertyCodePointRanges.keys:{ k | // Unicode code points with property "<k>" + static private void addProperty<i>() { +- List\<Interval\> intervals = Arrays.asList( ++ List\<Interval> intervals = Arrays.asList( + <propertyCodePointRanges.(k).intervals:{ interval | Interval.of(<interval.a>, <interval.b>)}; separator=",\n"> + ); + IntervalSet codePointRanges = new IntervalSet(intervals); diff --git a/debian/patches/series b/debian/patches/series index 25053f0..dce1a8f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 02-ignore-modules.patch +fix-unicodedata.st.patch |