ant private-javadocs runs without warnings; cleaned up some

as-yet-unused code.
This commit is contained in:
dchandler 2003-04-13 01:46:20 +00:00
parent 644c0d3801
commit 6636d03a41
9 changed files with 158 additions and 145 deletions

View file

@ -18,6 +18,8 @@ Contributor(s): ______________________________________.
package org.thdl.tib.text.tshegbar;
import org.thdl.util.ThdlDebug;
/** DLC FIXMEDOC */
class TransitionInstruction implements UnicodeReadingStateMachineConstants {
@ -25,19 +27,19 @@ class TransitionInstruction implements UnicodeReadingStateMachineConstants {
TransitionInstruction(int nextState, int action) {
super();
assert(action == ACTION_CONTINUES_GRAPHEME_CLUSTER
|| action == ACTION_BEGINS_NEW_GRAPHEME_CLUSTER
|| action == ACTION_PREPEND_WITH_0F68);
ThdlDebug.verify(action == ACTION_CONTINUES_GRAPHEME_CLUSTER
|| action == ACTION_BEGINS_NEW_GRAPHEME_CLUSTER
|| action == ACTION_PREPEND_WITH_0F68); // DLC FIXME: assert this.
assert(nextState == STATE_START
|| nextState == STATE_READY
|| nextState == STATE_DIGIT
|| nextState == STATE_STACKING
|| nextState == STATE_STACKPLUSACHUNG
|| nextState == STATE_PARTIALMARK);
ThdlDebug.verify(nextState == STATE_START
|| nextState == STATE_READY
|| nextState == STATE_DIGIT
|| nextState == STATE_STACKING
|| nextState == STATE_STACKPLUSACHUNG
|| nextState == STATE_PARTIALMARK); // DLC FIXME: assert this.
// we start in the start state, but we can never return to it.
assert(nextState != STATE_START);
ThdlDebug.verify(nextState != STATE_START); // DLC FIXME: assert this.
this.nextState = nextState;
this.action = action;
@ -55,4 +57,60 @@ class TransitionInstruction implements UnicodeReadingStateMachineConstants {
int getAction() { return action; }
int getNextState() { return nextState; }
/** Returns the codepoint class for cp, e.g. {@link
* UnicodeReadingStateMachineConstants#CC_SJC}.
* @param cp a Unicode codepoint, which MUST be nondecomposable
* if it is in the Tibetan range but can be from outside the
* Tibetan range of Unicode */
static int getCCForCP(char cp) {
ThdlDebug.verify(getNFTHDL(cp) == null); // DLC FIXME: assert this
if ('\u0F82' == cp) {
return CC_0F82;
} else if ('\u0F8A' == cp) {
return CC_0F8A;
} else if ('\u0F39' == cp) {
return CC_0F39;
} else if ('\u0F71' == cp) {
return CC_SUBSCRIBED_ACHUNG;
} else if ('\u0F40' <= cp && cp <= '\u0F6A') {
ThdlDebug.verify(cp != '\u0F48'); // DLC FIXME: assert this
return CC_CON;
} else if ('\u0F90' <= cp && cp <= '\u0FBC') {
ThdlDebug.verify(cp != '\u0F98'); // DLC FIXME: assert this
return CC_SJC;
} else if ('\u0F20' <= cp && cp <= '\u0F33') {
return CC_DIGIT;
} else if (/* DLC NOW do these combine ONLY with digits, or do CC_CM just NOT combine with digits? */
'\u0F3E' == cp
|| '\u0F3F' == cp
|| '\u0F18' == cp
|| '\u0F19' == cp) {
return CC_MCWD;
} else if ('\u0FC6' == cp
|| '\u0F87' == cp
|| '\u0F86' == cp
|| '\u0F84' == cp
|| '\u0F83' == cp
|| '\u0F82' == cp
|| '\u0F7F' == cp
|| '\u0F7E' == cp
|| '\u0F37' == cp /* DLC NOW NORMALIZATION OF 0F10, 11 to 0F0F ??? */
|| '\u0F35' == cp) {
return CC_CM;
} else if ('\u0F72' == cp
|| '\u0F74' == cp
|| '\u0F7A' == cp
|| '\u0F7B' == cp
|| '\u0F7C' == cp
|| '\u0F7D' == cp
|| '\u0F80' == cp) {
// DLC what about U+0F84 ??? CC_V or CC_CM ?
return CC_V;
} else {
return CC_SIN;
}
}
}