/** Clear all stopwords from this stopword list object. * @since 1.1.0 */ public void clear() { stopWords.clear(); }
/** Clear all stopwords from this stopword list object. * @since 1.1.0 */ public void clear() { stopWords.clear(); }
public void clear() { vertsList.clear (); verts.clear(); }
public void clear() { vertsList.clear (); verts.clear(); }
public void clear() { vertsList.clear (); verts.clear(); }
@Override public Void visitChoice(@NotNull BnfChoice o) { checkChoice(o, set); for (BnfExpression e : set) { BnfUnreachableChoiceBranchInspection.registerProblem( o, e, "Duplicate choice branch", holder, new BnfRemoveExpressionFix()); } set.clear(); return null; } };
private static void checkChoice(BnfChoice choice, ProblemsHolder problemsHolder) { Set<BnfExpression> visited = new THashSet<>(); THashSet<BnfExpression> first = new THashSet<>(); BnfFirstNextAnalyzer analyzer = new BnfFirstNextAnalyzer().setPredicateLookAhead(true); List<BnfExpression> list = choice.getExpressionList(); for (int i = 0, listSize = list.size() - 1; i < listSize; i++) { BnfExpression child = list.get(i); Set<BnfExpression> firstSet = analyzer.calcFirstInner(child, first, visited); if (firstSet.contains(BnfFirstNextAnalyzer.BNF_MATCHES_NOTHING)) { registerProblem(choice, child, "Branch is unable to match anything due to & or ! conditions", problemsHolder); } else if (firstSet.contains(BnfFirstNextAnalyzer.BNF_MATCHES_EOF)) { registerProblem(choice, child, "Branch matches empty input making the rest branches unreachable", problemsHolder); break; } first.clear(); visited.clear(); } }