State monthShortTextState = new NamedState("MONTH_SHORT_TEXT");
State dayNumState = new NamedState("DAY_NUM");
State commaState = new NamedState("COMMA");
State periodState = new NamedState("PERIOD");
Condition monthFullTextCondition = new WordSetCondition(
iv_monthFullNameSet, false);
Condition monthShortTextCondition = new WordSetCondition(
iv_monthShortNameSet, false);
Condition dayNumCondition = new IntegerRangeCondition(MIN_DAY, MAX_DAY);
Condition periodCondition = new PunctuationValueCondition('.');
Condition yearNumCondition = new IntegerRangeCondition(MIN_YEAR,
MAX_YEAR);
Condition commaCondition = new PunctuationValueCondition(',');
// condition for not being a comma or year number
Condition notCommaNotYearNumCondition = new CombineCondition(
new NegateCondition(commaCondition), new NegateCondition(
yearNumCondition));
// condition for being a year num and not a day num
Condition yearNotDayNumCondition = new CombineCondition(
yearNumCondition, new NegateCondition(dayNumCondition));
startState.addTransition(monthFullTextCondition, monthFullTextState);
startState.addTransition(monthShortTextCondition, monthShortTextState);
startState.addTransition(new AnyCondition(), startState);