if (isCurrentGroupPatternFirstOfLoop()) { consumingStrategy = currentGroupPattern.getQuantifier().getConsumingStrategy(); } else {
if (isCurrentGroupPatternFirstOfLoop()) { consumingStrategy = currentGroupPattern.getQuantifier().getConsumingStrategy(); } else {
/** * Checks if the given pattern is optional. If the given pattern is the head of a group pattern, * the optional status depends on the group pattern. */ private boolean isPatternOptional(Pattern<T, ?> pattern) { if (headOfGroup(pattern)) { return isCurrentGroupPatternFirstOfLoop() && currentGroupPattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } else { return pattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } }
/** * Checks if the given pattern is optional. If the given pattern is the head of a group pattern, * the optional status depends on the group pattern. */ private boolean isPatternOptional(Pattern<T, ?> pattern) { if (headOfGroup(pattern)) { return isCurrentGroupPatternFirstOfLoop() && currentGroupPattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } else { return pattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } }
if (isCurrentGroupPatternFirstOfLoop()) { consumingStrategy = currentGroupPattern.getQuantifier().getConsumingStrategy(); } else {
/** * Checks if the given pattern is optional. If the given pattern is the head of a group pattern, * the optional status depends on the group pattern. */ private boolean isPatternOptional(Pattern<T, ?> pattern) { if (headOfGroup(pattern)) { return isCurrentGroupPatternFirstOfLoop() && currentGroupPattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } else { return pattern.getQuantifier().hasProperty(Quantifier.QuantifierProperty.OPTIONAL); } }