// for case h/o
State rAbbrState = new NamedState("RULEOUT_ABBR");
State wAbbrState = new NamedState("WITHOUT_ABBR");
State fslashState = new NamedState("FORWARD_SLASH");
State ntEndState = new NonTerminalEndState("NON TERMINAL END");
endState.setEndStateFlag(true);
ntEndState.setEndStateFlag(true);
Machine m = new Machine(startState);
State regModalState = new NamedState("REG_MODAL");
State negPartState = new NamedState("NEG_PART");
State negVerbState = new NamedState("NEG_VERB");
State negCollocState = new NamedState("NEG_COLLOC");
State negColPartState = new NamedState("NEG_COLPART");
State negColMultiPartState = new NamedState("NEG_COLMULTIPART");
State negColSecondPartState = new NamedState("NEG_COL2NDPART");
Condition regModalC = new TextSetCondition(iv_modalVerbsSet, false);
Condition negPartC = new TextSetCondition(iv_negParticlesSet, false);
Condition regVerbC = new TextSetCondition(iv_regVerbsSet, false);
Condition negVerbC = new TextSetCondition(iv_negVerbsSet, false);
Condition negDetC = new TextSetCondition(iv_negDeterminersSet, false);
Condition negCollocC = new TextSetCondition(iv_negCollocSet, false);
Condition negColPartC = new TextSetCondition(iv_negColPartSet, false);
Condition neg1of3PartC = new TextSetCondition(iv_negCol1of3PartSet, false);
Condition neg2of3PartC = new TextSetCondition(iv_negCol2of3PartSet, false);
Condition notCollocC = new NegateCondition(negCollocC);
startState.addTransition(negVerbC, negVerbState);
startState.addTransition(neg1of3PartC, negColMultiPartState);
startState.addTransition(negCollocC, negCollocState); //rule
startState.addTransition(
new DisjoinCondition(regModalC, regVerbC),
regModalState); // start with a modal
startState.addTransition(
new DisjoinCondition(negPartC, negDetC),
negPartState);
startState
.addTransition(new TextValueCondition("r", false), rAbbrState);
startState
.addTransition(new TextValueCondition("w", false), wAbbrState);
startState.addTransition(new AnyCondition(), startState);
negColMultiPartState.addTransition(neg2of3PartC, negColSecondPartState);
negColMultiPartState.addTransition(negColPartC, negCollocState);
negColMultiPartState.addTransition(new AnyCondition(), startState);
negColSecondPartState.addTransition(new TextSetCondition(iv_negColAnyOf3PartSet, false), negCollocState);
negColSecondPartState.addTransition(negColPartC, negCollocState);
negColSecondPartState.addTransition(new AnyCondition(), startState);
regModalState.addTransition(negCollocC, negCollocState);
negCollocState.addTransition(negColPartC, negColPartState); //out
negColPartState.addTransition(new AnyCondition(), ntEndState);
negCollocState.addTransition(new AnyCondition(), startState);
regModalState.addTransition(
new DisjoinCondition(negPartC, negDetC),
negPartState);
regModalState.addTransition(new AnyCondition(), anyState);
anyState.addTransition(
new DisjoinCondition(negPartC, negDetC),
negPartState);
anyState.addTransition(new AnyCondition(), startState);
rAbbrState.addTransition(
new TextValueCondition("/", false),
fslashState);
rAbbrState.addTransition(new AnyCondition(), startState);
wAbbrState.addTransition(
new TextValueCondition("/", false),
fslashState);
wAbbrState.addTransition(new AnyCondition(), startState);
fslashState.addTransition(new TextValueCondition("o", false), endState);
fslashState.addTransition(new AnyCondition(), startState);
negPartState.addTransition(notCollocC, ntEndState);
negVerbState.addTransition(notCollocC, ntEndState);
negPartState.addTransition(new AnyCondition(), startState);
// negVerbState.addTransition(new AnyCondition(), startState);
negPartState.addTransition(new AnyCondition(), ntEndState);
negVerbState.addTransition(new AnyCondition(), ntEndState);
ntEndState.addTransition(new AnyCondition(), startState);
return m;
}