Parser

interface Parser

Functions

buildFor
Link copied to clipboard
common
abstract fun buildFor(goalRuleName: String, automatonKind: AutomatonKind)
It is not necessary to call this method, but doing so will speed up future calls to parse as it will build the internal caches for the parser,
expectedAt
Link copied to clipboard
common
abstract fun expectedAt(goalRuleName: String, inputText: String, position: Int, automatonKind: AutomatonKind): Set<RuntimeRule>
list of non-terminal or terminal runtime rules expected at the position
expectedTerminalsAt
Link copied to clipboard
common
abstract fun expectedTerminalsAt(goalRuleName: String, inputText: String, position: Int, automatonKind: AutomatonKind): Set<RuntimeRule>
interrupt
Link copied to clipboard
common
abstract fun interrupt(message: String)
parse
Link copied to clipboard
common
abstract fun parse(goalRuleName: String, inputText: String, automatonKind: AutomatonKind): SharedPackedParseTree
parse the inputText starting with the given grammar rule and return the shared packed parse Tree.
scan
Link copied to clipboard
common
abstract fun scan(inputText: String, includeSkipRules: Boolean = false): List<SPPTLeaf>
using the terminals (literals and patterns) from the grammar, scan the input text and return a list of "tokens" leaves.

Inheritors

ScanOnDemandParser
Link copied to clipboard