CharRange

open class CharRange(val range: CharRange, name: String? = null) : AbstractLexeme<Token.Generic>

A Lexeme that matches any character within a specified range. Matches produced by this Lexeme always have a length of 1.

Constructors

Link copied to clipboard
constructor(start: Char, endInclusive: Char)

Creates a CharRange Lexeme from explicit start and end characters.

constructor(range: CharRange, name: String? = null)

Properties

Link copied to clipboard
open override val defaultFactory: (CharSequence) -> Token.Generic

A default Token factory that creates new instances of T for matches of this Lexeme, given the CharSequence which captures the Token (equal to Token.value).

Link copied to clipboard
open override val name: String?

An optional name for this Lexeme

Link copied to clipboard

The character range to match

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
override fun match(): LexemeMatch<Token.Generic>?
Link copied to clipboard
open override fun toString(): String