or

infix fun <S, A> Parser<S, A>.or(other: Parser<S, A>): Parser<S, A>

Combines two parsers, trying the first parser and if it fails, trying the second parser.

A.K.A <|>

Return

A parser that tries the first parser and if it fails, tries the second parser.

Parameters

other

The second parser to try if the first parser fails.