SAXGrammarGenerator grammargenerator = new SAXGrammarGenerator();
SourceUtil.toSAX(_grammarSource, grammargenerator, this.manager);
Grammar grammar = grammargenerator.getGrammar();
SyntaxErrorException see = grammar.validate();
if (see!=null)
{
getLogger().error("Grammar is not correct", see);
throw new ProcessingException("Grammar is not correct", see);
}