Package-level declarations
Contains the lexer, scanner and some utilities such as a filter base class and some common regular expressions.
Types
Link copied to clipboard
Link copied to clipboard
open class Lexer<T>(input: String, types: Pair<Regex, (String) -> T?>, textNormalization: (T, String) -> String = { _, s -> s }, offset: Token<T>? = null) : Iterator<Token<T>>
Splits the input string into tokens, exposed as token iterator. The type parameter indicates the token type; typically an enum consisting of values such as IDENTIFIER, NUMBER etc.
Link copied to clipboard
Exception type for parsing errors containing a reference to the current token.
Link copied to clipboard
object RegularExpressions
A set of regular expressions that might be useful for parsing.