Examples of BnfRule


Examples of org.intellij.grammar.psi.BnfRule

    final Set<BnfRule> rules = new THashSet<BnfRule>();
    GrammarUtil.processChildrenDummyAware(file, new Processor<PsiElement>() {
      @Override
      public boolean process(PsiElement psiElement) {
        String name = psiElement instanceof BnfRule ? ((BnfRule)psiElement).getName() : null;
        BnfRule rule = name == null? null : bnfFile.getRule(name);
        if (name != null && rule != psiElement) {
          rules.add(rule);
          rules.add((BnfRule)psiElement);
        }
        return true;
      }
    });
    for (BnfRule rule : rules) {
      problemsHolder.registerProblem(rule.getId(), "'" + rule.getName() + "' rule is defined more than once");
    }
  }
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.