final Iterator i2 = operatorMap.keySet().iterator();
System.out.println("public static final String[] OPERATOR_STRINGS = {");
while (i2.hasNext()) {
final String headStr = (String) i2.next();
final Operator oper = (Operator) operatorMap.get(headStr);
if (oper == null) {
System.out.println(" \" null-value-in-operator-map \",");
} else {
System.out.println(" \"" + oper.getOperatorString() + "\",");
}
}
System.out.println("};");
final Iterator i3 = operatorMap.keySet().iterator();
System.out.println("public static final Operator[] OPERATORS = {");
while (i3.hasNext()) {
final String headStr = (String) i3.next();
final Operator oper = (Operator) operatorMap.get(headStr);
if (oper instanceof DivideOperator) {
final InfixOperator iOper = (DivideOperator) oper;
String grouping = null;
if (iOper.getGrouping() == InfixOperator.NONE) {
grouping = "InfixOperator.NONE";
} else if (iOper.getGrouping() == InfixOperator.LEFT_ASSOCIATIVE) {
grouping = "InfixOperator.LEFT_ASSOCIATIVE";
} else if (iOper.getGrouping() == InfixOperator.RIGHT_ASSOCIATIVE) {
grouping = "InfixOperator.RIGHT_ASSOCIATIVE";
}
System.out.println(" new DivideOperator(\"" + iOper.getOperatorString() + "\", \"" + iOper.getFunctionName() + "\", "
+ iOper.getPrecedence() + ", " + grouping + "),");
} else if (oper instanceof SubtractOperator) {
final InfixOperator iOper = (SubtractOperator) oper;
String grouping = null;
if (iOper.getGrouping() == InfixOperator.NONE) {
grouping = "InfixOperator.NONE";
} else if (iOper.getGrouping() == InfixOperator.LEFT_ASSOCIATIVE) {
grouping = "InfixOperator.LEFT_ASSOCIATIVE";
} else if (iOper.getGrouping() == InfixOperator.RIGHT_ASSOCIATIVE) {
grouping = "InfixOperator.RIGHT_ASSOCIATIVE";
}
System.out.println(" new SubtractOperator(\"" + iOper.getOperatorString() + "\", \"" + iOper.getFunctionName()
+ "\", " + iOper.getPrecedence() + ", " + grouping + "),");
} else if (oper instanceof InfixOperator) {
final InfixOperator iOper = (InfixOperator) oper;
String grouping = null;
if (iOper.getGrouping() == InfixOperator.NONE) {
grouping = "InfixOperator.NONE";
} else if (iOper.getGrouping() == InfixOperator.LEFT_ASSOCIATIVE) {
grouping = "InfixOperator.LEFT_ASSOCIATIVE";
} else if (iOper.getGrouping() == InfixOperator.RIGHT_ASSOCIATIVE) {
grouping = "InfixOperator.RIGHT_ASSOCIATIVE";
}
System.out.println(" new InfixOperator(\"" + iOper.getOperatorString() + "\", \"" + iOper.getFunctionName() + "\", "
+ iOper.getPrecedence() + ", " + grouping + "),");
} else if (oper instanceof PostfixOperator) {
System.out.println(" new PostfixOperator(\"" + oper.getOperatorString() + "\", \"" + oper.getFunctionName() + "\", "
+ oper.getPrecedence() + "),");
} else if (oper instanceof PreMinusOperator) {
System.out.println(" new PreMinusOperator(\"" + oper.getOperatorString() + "\", \"" + oper.getFunctionName() + "\", "
+ oper.getPrecedence() + "),");
} else if (oper instanceof PrePlusOperator) {
System.out.println(" new PrePlusOperator(\"" + oper.getOperatorString() + "\", \"" + oper.getFunctionName() + "\", "
+ oper.getPrecedence() + "),");
} else if (oper instanceof PrefixOperator) {
System.out.println(" new PrefixOperator(\"" + oper.getOperatorString() + "\", \"" + oper.getFunctionName() + "\", "
+ oper.getPrecedence() + "),");
}
}
System.out.println("};");
} catch (FileNotFoundException e) {