public void combinations() { checkPattern(!hasProperty(QuantifierProperty.SINGLE), "Combinations not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "Combinations already applied!"); innerConsumingStrategy = ConsumingStrategy.SKIP_TILL_ANY; }
public void optional() { checkPattern(!hasProperty(QuantifierProperty.OPTIONAL), "Optional already applied!"); checkPattern(!(consumingStrategy == ConsumingStrategy.NOT_NEXT || consumingStrategy == ConsumingStrategy.NOT_FOLLOW), "NOT pattern cannot be optional"); properties.add(Quantifier.QuantifierProperty.OPTIONAL); }
public void greedy() { checkPattern(!(innerConsumingStrategy == ConsumingStrategy.SKIP_TILL_ANY), "Option not applicable to FollowedByAny pattern"); checkPattern(!hasProperty(Quantifier.QuantifierProperty.SINGLE), "Option not applicable to singleton quantifier"); properties.add(QuantifierProperty.GREEDY); }
public void consecutive() { checkPattern(hasProperty(QuantifierProperty.LOOPING) || hasProperty(QuantifierProperty.TIMES), "Consecutive not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "Consecutive already applied!"); innerConsumingStrategy = ConsumingStrategy.STRICT; }
public void combinations() { checkPattern(!hasProperty(QuantifierProperty.SINGLE), "Combinations not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "Combinations already applied!"); innerConsumingStrategy = ConsumingStrategy.SKIP_TILL_ANY; }
public void combinations() { checkPattern(!hasProperty(QuantifierProperty.SINGLE), "Combinations not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "You can apply apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "Combinations already applied!"); innerConsumingStrategy = ConsumingStrategy.SKIP_TILL_ANY; }
public void combinations() { checkPattern(!hasProperty(QuantifierProperty.SINGLE), "Combinations not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "Combinations already applied!"); innerConsumingStrategy = ConsumingStrategy.SKIP_TILL_ANY; }
public void optional() { checkPattern(!hasProperty(QuantifierProperty.OPTIONAL), "Optional already applied!"); checkPattern(!(consumingStrategy == ConsumingStrategy.NOT_NEXT || consumingStrategy == ConsumingStrategy.NOT_FOLLOW), "NOT pattern cannot be optional"); properties.add(Quantifier.QuantifierProperty.OPTIONAL); }
public void greedy() { checkPattern(!(innerConsumingStrategy == ConsumingStrategy.SKIP_TILL_ANY), "Option not applicable to FollowedByAny pattern"); checkPattern(!hasProperty(Quantifier.QuantifierProperty.SINGLE), "Option not applicable to singleton quantifier"); properties.add(QuantifierProperty.GREEDY); }
public void optional() { checkPattern(!hasProperty(QuantifierProperty.OPTIONAL), "Optional already applied!"); checkPattern(!(consumingStrategy == ConsumingStrategy.NOT_NEXT || consumingStrategy == ConsumingStrategy.NOT_FOLLOW), "NOT pattern cannot be optional"); properties.add(Quantifier.QuantifierProperty.OPTIONAL); }
public void greedy() { checkPattern(!(innerConsumingStrategy == ConsumingStrategy.SKIP_TILL_ANY), "Option not applicable to FollowedByAny pattern"); checkPattern(!hasProperty(Quantifier.QuantifierProperty.SINGLE), "Option not applicable to singleton quantifier"); properties.add(QuantifierProperty.GREEDY); }
public void optional() { checkPattern(!hasProperty(QuantifierProperty.OPTIONAL), "Optional already applied!"); checkPattern(!(consumingStrategy == ConsumingStrategy.NOT_NEXT || consumingStrategy == ConsumingStrategy.NOT_FOLLOW), "NOT pattern cannot be optional"); properties.add(Quantifier.QuantifierProperty.OPTIONAL); }
public void consecutive() { checkPattern(hasProperty(QuantifierProperty.LOOPING) || hasProperty(QuantifierProperty.TIMES), "Combinations not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "You can apply apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "Combinations already applied!"); innerConsumingStrategy = ConsumingStrategy.STRICT; }
public void consecutive() { checkPattern(hasProperty(QuantifierProperty.LOOPING) || hasProperty(QuantifierProperty.TIMES), "Consecutive not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "Consecutive already applied!"); innerConsumingStrategy = ConsumingStrategy.STRICT; }
public void consecutive() { checkPattern(hasProperty(QuantifierProperty.LOOPING) || hasProperty(QuantifierProperty.TIMES), "Consecutive not applicable to " + this + "!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.SKIP_TILL_ANY, "You can apply either combinations or consecutive, not both!"); checkPattern(innerConsumingStrategy != ConsumingStrategy.STRICT, "Consecutive already applied!"); innerConsumingStrategy = ConsumingStrategy.STRICT; }