zeroOrMore

fun <T> EvalPE<T>.zeroOrMore(): EvalPE<List<T>>

Repeat parsing expression 0 or more times.

Samples

import io.kpeg.pe.Symbol.Rule
fun main() { 
   //sampleStart 
   //        - OK
// a      - OK
// aaa    - OK
// aaaaaa - OK

char('a')         // EvalPE<Char>
    .zeroOrMore() // EvalPE<List<Char>> 
   //sampleEnd
}

Sources

JVM source
Link copied to clipboard