public void checkQuery(String query) throws WindowingException
{
Windowing2Lexer lexer;
CommonTokenStream tokens;
Windowing2Parser parser = null;
@SuppressWarnings("unused")
CommonTree t;
// CommonTreeNodeStream nodes;
String err;
try
{
lexer = new Windowing2Lexer(new ANTLRStringStream(query));
tokens = new CommonTokenStream(lexer);
parser = new Windowing2Parser(tokens);
parser.setTreeAdaptor(TranslateUtils.adaptor);
t = (CommonTree) parser.query().getTree();
err = parser.getWindowingParseErrors();
if ( err != null )
{
throw new WindowingException(err);
}
}
catch(Throwable te)
{
err = parser.getWindowingParseErrors();
if ( err != null )
{
throw new WindowingException(err);
}
throw new WindowingException("Parse Error:" + te.toString(), te);