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

Types

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

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

ParserContext
Link copied to clipboard
common
interface ParserContext<T, K : Token<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, K : Token<T>, E, R>(lexer: Lexer<K>, parser: Parser<T, K, E, R>)

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

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

A subclass of Token which holds a String as its value.

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

Indicates that a syntax exception happened.

Token
Link copied to clipboard
common
open class Token<out T>(type: T, section: Section?) : Sectional

Object which represents the output of a lexical analysis and input to parsing.