Package org.antlr.grammar.v3

Examples of org.antlr.grammar.v3.ANTLRParser.rule()


    ANTLRLexer lexer = new ANTLRLexer(new ANTLRStringStream(ruleText));
    ANTLRParser parser = ANTLRParser.createParser(new CommonTokenStream(lexer));
    parser.setGrammar(this);
    parser.setGrammarType(this.type);
    try {
      ANTLRParser.rule_return result = parser.rule();
      return result.getTree();
    }
    catch (Exception e) {
      ErrorManager.error(ErrorManager.MSG_ERROR_CREATING_ARTIFICIAL_RULE,
                 e);
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.