use of com.progress.xref.EmptyCrossReference in project sonar-openedge by Riverside-Software.
the class C3Test method genericTest.
private void genericTest(String filename, boolean c3) throws IOException {
try (InputStream input = Files.newInputStream(Paths.get(filename))) {
ABLLexer lexer = new ABLLexer(session, ByteSource.wrap(ByteStreams.toByteArray(input)), filename, false);
CommonTokenStream tokStream = new CommonTokenStream(lexer);
Proparse parser = new Proparse(tokStream);
if (c3)
parser.initialize(session, new EmptyCrossReference(), true);
else
parser.initialize(session, new EmptyCrossReference());
parser.setErrorHandler(new ProparseErrorStrategy(false, false, false));
parser.getInterpreter().setPredictionMode(PredictionMode.LL);
parser.program();
}
}
Aggregations