MCPcopy Create free account
hub / github.com/cschanck/single-file-java / timesOf

Method timesOf

src/main/java/org/sfj/PegLegParser.java:847–850  ·  view source on GitHub ↗

Rule with matches only if matches set of rules between min and max times. Greedy, but stops at max. @param min min times to match @param max max times to match @param objs rules/string literals/char literals/execs @return rule

(int min, int max, Object... objs)

Source from the content-addressed store, hash-verified

845 * @return rule
846 */
847 public ParentRule timesOf(int min, int max, Object... objs) {
848 if (min < 0 || max < 0 || max < min) { throw error("illegal min/max for timesof [" + min + "/" + max + "]"); }
849 return new ParentRule(() -> innerTimesOf("timesOf(" + min + "-" + max + ")", min, max, objs));
850 }
851
852 /**
853 * Rule with matches only if matches set of rules exactly many times.

Callers

nothing calls this directly

Calls 2

errorMethod · 0.95
innerTimesOfMethod · 0.95

Tested by

no test coverage detected