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

Method parseSchema

src/org/apache/pig/parser/QueryParserDriver.java:88–106  ·  view source on GitHub ↗
(CommonTokenStream tokens)

Source from the content-addressed store, hash-verified

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 );

Callers 1

parseSchemaMethod · 0.95

Calls 6

createParserMethod · 0.95
checkErrorMethod · 0.95
tokenizeMethod · 0.95
schemaMethod · 0.45
getErrorMessageMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected