Package com.github.adriantodt.tartar.api.parser

Types

Parser
Link copied to clipboard
common
interface Parser<T, E, R>

Reads tokens from a list and parses it with a pratt-parser.

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

A parsing context, created by a Parser.parse call, which exposes an interface for pratt-parsing.

SourceParser
Link copied to clipboard
common
data class SourceParser<T, E, R>(lexer: Lexer<Token<T>>, parser: Parser<T, E, R>)

Reads characters from a Source with a lexer, parsing the resulting tokens with a pratt-parser.

SyntaxException
Link copied to clipboard
common
open class SyntaxException(message: String, position: Section) : RuntimeException

Indicates that a syntax exception happened.

Token
Link copied to clipboard
common
data class Token<T>(type: T, value: String, section: Section) : Sectional

A Parser token.