Package org.antlr.v4

Examples of org.antlr.v4.Tool.loadGrammar()


  }

  /** convenience method for Tool.loadGrammar() */
  public static Grammar load(String fileName) {
    Tool antlr = new Tool();
    return antlr.loadGrammar(fileName);
  }

  /** Return list of imported grammars from root down to our parent.
     *  Order is [root, ..., this.parent].  (us not included).
     */
 
View Full Code Here


    String combinedGrammarFileName = null;
    String lexerGrammarFileName = null;
    String parserGrammarFileName = null;

    // load to examine it
    Grammar g = antlr.loadGrammar(grammarFileName);

    // examine's Grammar AST from v4 itself;
    // hence use ANTLRParser.X not ANTLRv4Parser from this plugin
    switch (g.getType()) {
      case ANTLRParser.PARSER:
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.