ParserImpl

class ParserImpl<T, E, R>(grammar: Grammar<T, E>, block: Closure<ParserContext<T, E>, R>) : Parser<T, E, R>

Types

ContextImpl
Link copied to clipboard
common
inner class ContextImpl(source: List<Token<T>>, grammar: Grammar<T, E>) : ParserContext<T, E>

Functions

parse
Link copied to clipboard
common
open override fun parse(tokens: List<Token<T>>): R
Parses tokens with this pratt-parser and returns the computed result.
open fun parse(source: Source, lexer: Lexer<Token<T>>): R
Parses tokens from a source, using a specified lexer, with this pratt-parser, and returns the computed result.

Properties

grammar
Link copied to clipboard
common
open override val grammar: Grammar<T, E>
The Grammar of this pratt-parser.