choice

fun <S : Any, A : Any> choice(parsers: List<Parser<S, A>>): Parser<S, A>

Creates a parser that matches any one of the given parsers.

Return

A parser that matches any one of the given parsers.

Parameters

parsers

The list of parsers to choose from.