Examples of ATNBuilder


Examples of org.antlr.v4.parse.ATNBuilder

    GrammarASTAdaptor adaptor = new GrammarASTAdaptor();
    for (Rule r : rules) {
      // find rule's block
      GrammarAST blk = (GrammarAST)r.ast.getFirstChildWithType(ANTLRParser.BLOCK);
      CommonTreeNodeStream nodes = new CommonTreeNodeStream(adaptor,blk);
      ATNBuilder b = new ATNBuilder(nodes,this);
      try {
        setCurrentRuleName(r.name);
        Handle h = b.ruleBlock(null);
        rule(r.ast, r.name, h);
      }
      catch (RecognitionException re) {
        ErrorManager.fatalInternalError("bad grammar AST structure", re);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.