state = STATE_GRAMMAR;
}
else if ((localName.equals(NONTERMINALSYMBOL_ELEMENT)) && (state==STATE_NONTERMINAL))
{
Symbol ntsymbol = (Symbol)stack.pop();
Production production = (Production)stack.peek();
production.getDefinition().addSymbol(ntsymbol);
state = STATE_PRODUCTION;
}
else if ((localName.equals(TERMINALSYMBOL_ELEMENT)) && (state==STATE_TERMINAL))
{
Symbol tsymbol = (Symbol)stack.pop();
Production production = (Production)stack.peek();
production.getDefinition().addSymbol(tsymbol);
state = STATE_PRODUCTION;
}
else if ((localName.equals(ERRORSYMBOL_ELEMENT)) && (state==STATE_ERROR))
{
Symbol error = (Symbol)stack.pop();
Production production = (Production)stack.peek();
production.getDefinition().addSymbol(error);
state = STATE_PRODUCTION;