parser

fun <T> parser(p: ParserState.() -> T): Parser<T>

Create a parser that performs the given parsing computation.

If a sub-parser used within the given parsing computation fails, the entire parser call fails. However, this failure is not atomic, in that any sub-parser that succeeded before the failing sub-parser will still have succeeded. This means that if the failure is caught further up the parsing tree, backtracking will resume from the position just before the failing sub-parser. NOT before the entire parser call.

For atomic parser failure, use atomically instead.