choice

fun choice(pattern: RuleBuilder<*>.() -> Unit): RuleBuilder<N>

Adds an AlternationElement that matches any one of the specified alternatives.

This is an alias for alternation.

Return

this RuleBuilder for chaining

Parameters

pattern

A lambda defining the alternative elements