Package org.antlr.v4.unicode
Class UnicodeDataTemplateController
java.lang.Object
org.antlr.v4.unicode.UnicodeDataTemplateController
StringTemplate controller used to generate parameters to feed
to
unicodedata.st to code-generate UnicodeData.java,
used by the tool for Unicode property escapes like \\p\{Lu\}.
Uses ICU to iterate over Unicode character categories, properties,
and script codes, as well as aliases for those codes.
This class exists in its own Maven module to avoid adding a
dependency from the tool onto the (large) ICU runtime.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddEmojiPresentationPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) private static voidaddIntervalForCategory(Map<String, IntervalSet> categoryMap, String categoryName, int start, int finish) private static voidaddIntPropertyAliases(int property, String namePrefix, Map<String, String> propertyAliases) private static voidaddIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges) private static voidprivate static voidaddPropertyAliases(Map<String, String> propertyAliases, String propertyName, int property) private static voidaddTR35ExtendedPictographicPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) private static voidaddUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) private static voidaddUnicodeBinaryPropertyCodesToNames(Map<String, String> propertyAliases) private static voidaddUnicodeBlocksToNames(Map<String, String> propertyAliases) private static voidaddUnicodeCategoryCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) private static voidaddUnicodeCategoryCodesToNames(Map<String, String> propertyAliases) private static voidaddUnicodeIntPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) private static voidaddUnicodeIntPropertyCodesToNames(Map<String, String> propertyAliases) private static voidaddUnicodeScriptCodesToNames(Map<String, String> propertyAliases) private static voidaddUnicodeSetToIntervalSet(com.ibm.icu.text.UnicodeSet unicodeSet, IntervalSet intervalSet) convertToRawArray(IntervalSet intervalSet) private static StringgetShortPropertyName(int property)
-
Constructor Details
-
UnicodeDataTemplateController
public UnicodeDataTemplateController()
-
-
Method Details
-
addIntervalForCategory
private static void addIntervalForCategory(Map<String, IntervalSet> categoryMap, String categoryName, int start, int finish) -
addPropertyAliases
-
addPropertyAlias
-
getProperties
-
convertToRawArray
-
getShortPropertyName
-
addUnicodeCategoryCodesToCodePointRanges
private static void addUnicodeCategoryCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) -
addUnicodeCategoryCodesToNames
-
addUnicodeBinaryPropertyCodesToCodePointRanges
private static void addUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) -
addUnicodeBinaryPropertyCodesToNames
-
addIntPropertyRanges
private static void addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges) -
addUnicodeSetToIntervalSet
private static void addUnicodeSetToIntervalSet(com.ibm.icu.text.UnicodeSet unicodeSet, IntervalSet intervalSet) -
addUnicodeIntPropertyCodesToCodePointRanges
private static void addUnicodeIntPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) -
addTR35ExtendedPictographicPropertyCodesToCodePointRanges
private static void addTR35ExtendedPictographicPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) -
addEmojiPresentationPropertyCodesToCodePointRanges
private static void addEmojiPresentationPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) -
addIntPropertyAliases
-
addUnicodeScriptCodesToNames
-
addUnicodeBlocksToNames
-
addUnicodeIntPropertyCodesToNames
-