repeated
Repeat parsing expression an arbitrary number of times in the specified range.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// a - FAIL
// aaa - OK
// aaaa - OK
// aaaaa - OK
// aaaaaa - FAIL
char('a') // EvalPE<Char>
.repeated(range = 3u..5u) // EvalPE<List<Char>>
//sampleEnd
}
Repeat parsing expression from the min to the max numbers of times.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// a - OK
// aa - OK
// aaa - FAIL
char('a') // EvalPE<Char>
.repeated(min = 1u, max = 2u) // EvalPE<List<Char>>
//sampleEnd
}