Examples of calcFirstInner()


Examples of org.intellij.grammar.analysis.BnfFirstNextAnalyzer.calcFirstInner()

    THashSet<BnfExpression> first = new THashSet<BnfExpression>();
    BnfFirstNextAnalyzer analyzer = new BnfFirstNextAnalyzer();
    List<BnfExpression> list = choice.getExpressionList();
    for (int i = 0, listSize = list.size() - 1; i < listSize; i++) {
      BnfExpression child = list.get(i);
      Set<String> firstSet = analyzer.asStrings(analyzer.calcFirstInner(child, first, visited));
      if (firstSet.contains(BnfFirstNextAnalyzer.MATCHES_NOTHING)) {
        registerProblem(choice, child, "Branch is unable to match anything due to & or ! conditions", problemsHolder);
      }
      else if (firstSet.contains(BnfFirstNextAnalyzer.MATCHES_EOF)) {
        registerProblem(choice, child, "Branch matches empty input making the rest branches unreachable", problemsHolder);
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.