}
private static Tree parseSchema(CommonTokenStream tokens) throws ParserException {
QueryParser parser = QueryParserUtils.createParser(tokens);
field_def_list_return result = null;
try {
result = parser.field_def_list();
} catch (RecognitionException e) {
String msg = parser.getErrorHeader(e) + " "
+ parser.getErrorMessage(e, parser.getTokenNames());
throw new ParserException(msg);
} catch(RuntimeException ex) {
throw new ParserException( ex.getMessage() );
}
Tree ast = (Tree)result.getTree();
checkError( parser );
return ast;
}