MCPcopy Create free account
hub / github.com/antlr/codebuff / tokenize

Method tokenize

src/org/antlr/codebuff/Tool.java:256–264  ·  view source on GitHub ↗
(String doc, Class<? extends Lexer> lexerClass)

Source from the content-addressed store, hash-verified

254 }
255
256 public static CodeBuffTokenStream tokenize(String doc, Class<? extends Lexer> lexerClass)
257 throws Exception {
258 ANTLRInputStream input = new ANTLRInputStream(doc);
259 Lexer lexer = getLexer(lexerClass, input);
260
261 CodeBuffTokenStream tokens = new CodeBuffTokenStream(lexer);
262 tokens.fill();
263 return tokens;
264 }
265
266 public static Parser getParser(Class<? extends Parser> parserClass, CommonTokenStream tokens) throws NoSuchMethodException, InstantiationException, IllegalAccessException, java.lang.reflect.InvocationTargetException {
267 Constructor<? extends Parser> parserCtor =

Callers 4

mainMethod · 0.95
docDiffMethod · 0.95
showMethod · 0.95
getWSEditDistanceMethod · 0.80

Calls 1

getLexerMethod · 0.95

Tested by

no test coverage detected