(CommonTokenStream tokens)
| 86 | } |
| 87 | |
| 88 | private static Tree parseSchema(CommonTokenStream tokens) throws ParserException { |
| 89 | QueryParser parser = QueryParserUtils.createParser(tokens); |
| 90 | |
| 91 | schema_return result = null; |
| 92 | try { |
| 93 | result = parser.schema(); |
| 94 | } catch (RecognitionException e) { |
| 95 | String msg = parser.getErrorHeader(e) + " " |
| 96 | + parser.getErrorMessage(e, parser.getTokenNames()); |
| 97 | throw new ParserException(msg); |
| 98 | } catch(RuntimeException ex) { |
| 99 | throw new ParserException( ex.getMessage() ); |
| 100 | } |
| 101 | |
| 102 | Tree ast = (Tree)result.getTree(); |
| 103 | checkError( parser ); |
| 104 | |
| 105 | return ast; |
| 106 | } |
| 107 | |
| 108 | public LogicalSchema parseSchema(String input) throws ParserException { |
| 109 | CommonTokenStream tokenStream = tokenize( input, null ); |
no test coverage detected