of

fun <I : Any, U : Any> of(input: Collection<I>, userContext: U, index: Int = 0): ParserInput<I, U>

Creates a ParserInput from a Collection, converting it to a List internally.

Parameters

input

the token sequence to parse.

userContext

an arbitrary value made available to parsers throughout the parse without being consumed. Use Unit when no context is required.

index

the starting position within input; defaults to 0.