*
* @param pattern the production pattern
*/
public void addProductionConstant(ProductionPattern pattern) {
String constant;
JavaVariable var;
int modifiers;
if (pattern.isSynthetic()) {
constant = "SUBPRODUCTION_" + constantId;
modifiers = JavaVariable.PRIVATE + JavaVariable.STATIC +
JavaVariable.FINAL;
var = new JavaVariable(modifiers,
"int",
constant,
String.valueOf(constantId + 3000));
var.addComment(new JavaComment(PRODUCTION_COMMENT));
cls.addVariable(var);
constantNames.put(new Integer(pattern.getId()), constant);
constantId++;
}
}