| java.lang.Object com.ibm.icu.text.TransliteratorParser
TransliteratorParser | class TransliteratorParser (Code) | | |
Method Summary | |
char | generateStandInFor(Object obj) Generate and return a stand-in for a new UnicodeMatcher or UnicodeReplacer. | char | getDotStandIn() Return the stand-in for the dot set. | public char | getSegmentStandin(int seg) Return the standin for segment seg (1-based). | public void | parse(String rules, int direction) Parse a set of rules. | public void | parse(ResourceReader rules, int direction) Parse a set of rules. | void | parseRules(RuleBody ruleArray, int dir) Parse an array of zero or more rules. | static boolean | resemblesPragma(String rule, int pos, int limit) Return true if the given rule looks like a pragma. | final static int | ruleEnd(String rule, int start, int limit) | public void | setSegmentObject(int seg, StringMatcher obj) Set the object for segment seg (1-based). | final static void | syntaxError(String msg, String rule, int start) Throw an exception indicating a syntax error. |
compoundFilter | public UnicodeSet compoundFilter(Code) | | PUBLIC data member containing the parsed compound filter, if any.
|
dataVector | public Vector dataVector(Code) | | PUBLIC data member.
A Vector of RuleBasedTransliterator.Data objects, one for each discrete group
of rules in the rule set
|
idBlockVector | public Vector idBlockVector(Code) | | PUBLIC data member.
A Vector of Strings containing all of the ID blocks in the rule set
|
TransliteratorParser | public TransliteratorParser()(Code) | | Constructor.
|
generateStandInFor | char generateStandInFor(Object obj)(Code) | | Generate and return a stand-in for a new UnicodeMatcher or UnicodeReplacer.
Store the object.
|
getDotStandIn | char getDotStandIn()(Code) | | Return the stand-in for the dot set. It is allocated the first
time and reused thereafter.
|
getSegmentStandin | public char getSegmentStandin(int seg)(Code) | | Return the standin for segment seg (1-based).
|
parse | public void parse(String rules, int direction)(Code) | | Parse a set of rules. After the parse completes, examine the public
data members for results.
|
parse | public void parse(ResourceReader rules, int direction)(Code) | | Parse a set of rules. After the parse completes, examine the public
data members for results.
|
parseRules | void parseRules(RuleBody ruleArray, int dir)(Code) | | Parse an array of zero or more rules. The strings in the array are
treated as if they were concatenated together, with rule terminators
inserted between array elements if not present already.
Any previous rules are discarded. Typically this method is called exactly
once, during construction.
The member this.data will be set to null if there are no rules.
exception: IllegalArgumentException - if there is a syntax error in therules |
resemblesPragma | static boolean resemblesPragma(String rule, int pos, int limit)(Code) | | Return true if the given rule looks like a pragma.
Parameters: pos - offset to the first non-whitespace characterof the rule. Parameters: limit - pointer past the last character of the rule. |
ruleEnd | final static int ruleEnd(String rule, int start, int limit)(Code) | | |
setSegmentObject | public void setSegmentObject(int seg, StringMatcher obj)(Code) | | Set the object for segment seg (1-based).
|
syntaxError | final static void syntaxError(String msg, String rule, int start)(Code) | | Throw an exception indicating a syntax error. Search the rule string
for the probable end of the rule. Of course, if the error is that
the end of rule marker is missing, then the rule end will not be found.
In any case the rule start will be correctly reported.
Parameters: msg - error description Parameters: rule - pattern string Parameters: start - position of first character of current rule |
|
|