Grammar

data class Grammar<T, K : Token<T>, E>(prefix: Map<T, PrefixParselet<T, K, E>>, infix: Map<T, InfixParselet<T, K, E>>)

A grammar for pratt-parsers.

Author

An Tran

Parameters

T

The grammar's token type.

E

The grammar's expression result.

prefix

A map of prefix parsers for each token type.

infix

A map of prefix parsers for each token type.

Constructors

Grammar
Link copied to clipboard
common
fun <T, K : Token<T>, E> Grammar(prefix: Map<T, PrefixParselet<T, K, E>>, infix: Map<T, InfixParselet<T, K, E>>)

Types

Companion
Link copied to clipboard
common
object Companion

Properties

infix
Link copied to clipboard
common
val infix: Map<T, InfixParselet<T, K, E>>
prefix
Link copied to clipboard
common
val prefix: Map<T, PrefixParselet<T, K, E>>