(String query, String source)
| 209 | } |
| 210 | |
| 211 | static CommonTokenStream tokenize(String query, String source) |
| 212 | throws ParserException { |
| 213 | CharStream input; |
| 214 | try { |
| 215 | input = new QueryParserStringStream(query, source); |
| 216 | } catch (IOException ex) { |
| 217 | throw new ParserException("Unexpected IOException: " |
| 218 | + ex.getMessage()); |
| 219 | } |
| 220 | QueryLexer lexer = new QueryLexer(input); |
| 221 | CommonTokenStream tokens = new CommonTokenStream(lexer); |
| 222 | checkError(lexer); |
| 223 | return tokens; |
| 224 | } |
| 225 | |
| 226 | private static void checkError(BaseRecognizer recognizer) |
| 227 | throws ParserException { |
no test coverage detected