Package com.github.adriantodt.tartar.api.dsl

Types

CharPredicate
Link copied to clipboard
common
fun interface CharPredicate

Represents a predicate (boolean-valued function) of one Char-valued argument.

GrammarConfig
Link copied to clipboard
common
typealias GrammarConfig<T, E> = GrammarDSL<T, E>.() -> Unit

Function which receives a LexerDSL as its receiver.

GrammarDSL
Link copied to clipboard
common
interface GrammarDSL<T, E>

A builder of com.github.adriantodt.tartar.api.parser.Grammar, as a domain-specific language (DSL).

InfixFunction
Link copied to clipboard
common
typealias InfixFunction<T, E> = ParserContext<T, E>.(E, token: Token<T>) -> E

Function used by GrammarDSL to configure a com.github.adriantodt.tartar.api.parser.InfixParselet in a functional way.

LexerConfig
Link copied to clipboard
common
typealias LexerConfig<T> = LexerDSL<T>.() -> Unit

Function which receives a LexerDSL as its receiver.

LexerDSL
Link copied to clipboard
common
interface LexerDSL<T>

A builder of Lexers, as a domain-specific language (DSL).

MatchFunction
Link copied to clipboard
common
typealias MatchFunction<T> = LexerContext<T>.(char: Char) -> Unit

Function which receives a LexerContext as its receiver and a matched Char as its parameter.

ParserFunction
Link copied to clipboard
common
typealias ParserFunction<T, E, R> = ParserContext<T, E>.() -> R

Function which receives a ParserContext as its receiver, and returns a result.

PrefixFunction
Link copied to clipboard
common
typealias PrefixFunction<T, E> = ParserContext<T, E>.(token: Token<T>) -> E

Function used by GrammarDSL to configure a com.github.adriantodt.tartar.api.parser.PrefixParselet in a functional way.