char
Parsing expression that represents any character that satisfies the b lambda.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// 'a' - OK
// 'F' - OK
// 'ы' - OK
// 'ñ' - OK
// '2' - FAIL
char { it.isLetter() } // EvalPE<Char>
//sampleEnd
}
Parsing expression that represents the character c.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// 'a' - OK
// 'A' - FAIL
// 'f' - FAIL
char('a') // EvalPE<Char>
//sampleEnd
}
Parsing expression that represents any character in the char range r.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// 'a' - OK
// 'A' - FAIL
// 'f' - OK
char('a'..'f') // EvalPE<Char>
//sampleEnd
}
Parsing expression that represents any character from the firstC, secondC, or otherCs characters.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// 'a' - OK
// 'A' - FAIL
// 'f' - OK
// 'e' - FAIL
char('a', 'b', 'f') // EvalPE<Char>
//sampleEnd
}