use of org.antlr.works.grammar.engine.GrammarEngineImpl in project antlrworks by antlr.
the class Console method processSyntaxDiagram.
private void processSyntaxDiagram(ProcessSyntaxDiagramDelegate delegate) throws Exception {
GrammarEngine engine = new GrammarEngineImpl(new EngineDelegate());
GrammarSyntaxEngine syntaxEngine = engine.getSyntaxEngine();
syntaxEngine.setDelegate(new SyntaxDelegate());
syntaxEngine.processSyntax();
engine.parserCompleted();
SDGenerator gen = new SDGenerator(engine);
delegate.beginProcess();
for (String name : engine.getRuleNames()) {
delegate.processRule(name, gen);
}
delegate.endProcess();
}
Aggregations