return new SyntaxErrorException("No productions are defined");
if (_productionlist.getProductionList(_ssymbol).getSize() <= 0)
return new SyntaxErrorException("Start symbol is not set");
SymbolList symbols = getSymbols();
SymbolList tsymbols = symbols.getTerminalSymbols();
SymbolList ntsymbols = symbols.getNonTerminalSymbols();
int i;
// Test, if all terminal symbol are well defined
for (i = 0; i < tsymbols.getSymbolCount(); i++)
if (!_tokenlist.contains(tsymbols.getSymbol(i)))
return new SyntaxErrorException(_tokenlist + "\n" + _productionlist
+ "Terminal symbol \""
+ tsymbols.getSymbol(i)
+ "\" is not defined through a token");
// Test, if all non terminal symbol are well defined
for (i = 0; i < ntsymbols.getSymbolCount(); i++)
if (!_productionlist.contains(ntsymbols.getSymbol(i)))
return new SyntaxErrorException(_productionlist
+ "Nonterminal symbol \""
+ ntsymbols.getSymbol(i)
+ "\" is not defined through a production");
return null;
}