InfixParselet

interface InfixParselet<T, E>

A interface for infix-based parsing, with support to precedence.

Author

An Tran

Parameters

T

The grammar's token type.

E

The grammar's expression result.

Functions

parse
Link copied to clipboard
common
abstract fun parse(ctx: ParserContext<T, E>, left: E, token: Token<T>): E

This infix parser's parsing implementation.

Properties

precedence
Link copied to clipboard
common
abstract val precedence: Int

This infix parser's precedence.