Examples of AstNonTerm


Examples of net.sf.lapg.parser.ast.AstNonTerm

  }

  private void collectNonTerminals() {
    for(AstGrammarPart clause : tree.getRoot().getGrammar()) {
      if(clause instanceof AstNonTerm) {
        AstNonTerm nonterm = (AstNonTerm) clause;
        create(nonterm.getName(), nonterm.getType(), false);
      }
    }
    for(AstGrammarPart clause : tree.getRoot().getGrammar()) {
      if(clause instanceof AstNonTerm) {
        AstNonTerm nonterm = (AstNonTerm) clause;
        addSymbolAnnotations(nonterm.getName(), convert(nonterm.getAnnotations()));
      }
    }
  }
View Full Code Here

Examples of net.sf.lapg.parser.ast.AstNonTerm

  private void collectRules() {
    rules = new ArrayList<LiRule>();
    List<LiSymbolRef> rightPart = new ArrayList<LiSymbolRef>(32);
    for(AstGrammarPart clause : tree.getRoot().getGrammar()) {
      if(clause instanceof AstNonTerm) {
        AstNonTerm nonterm = (AstNonTerm) clause;
        LiSymbol left = symbolsMap.get(nonterm.getName().getName());
        if(left == null) {
          continue; /* error is already reported */
        }
        for(AstRule right : nonterm.getRules()) {
          createRule(left, right, rightPart);
        }
      }
    }
  }
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.