MCPcopy Create free account
hub / github.com/apache/pig / tokenize

Method tokenize

test/org/apache/pig/parser/ParserTestingUtils.java:32–39  ·  view source on GitHub ↗
(String query)

Source from the content-addressed store, hash-verified

30
31public class ParserTestingUtils {
32 public static CommonTokenStream tokenize(String query) throws IOException, ParsingFailureException {
33 CharStream input = new QueryParserStringStream( query, null );
34 QueryLexer lexer = new QueryLexer( input );
35 CommonTokenStream tokens = new CommonTokenStream( lexer );
36 if( 0 < lexer.getNumberOfSyntaxErrors() )
37 throw new ParsingFailureException( QueryLexer.class );
38 return tokens;
39 }
40
41 public static Tree parse(String query) throws IOException, RecognitionException, ParsingFailureException {
42 CommonTokenStream tokens = tokenize( query );

Callers 2

parseMethod · 0.95
tokenizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected