CharacterInputStream

A CharacterInputStream provides the characters for a Lexer

Since

0.1.0

See also

Inheritors

Properties

Link copied to clipboard
abstract val content: CharArray

Returns the chars of the CharacterInputStream

Link copied to clipboard
abstract val position: Int

Returns the actual position of the CharacterInputStream

Link copied to clipboard

Returns the actual position-maker of the CharacterInputStream

Link copied to clipboard
abstract val source: CharacterSource

Returns the source of the CharacterInputStream

Functions

Link copied to clipboard
abstract fun actual(): Char

Returns the actual character (the same as returned by .next when used before)

Link copied to clipboard
abstract fun has(number: Int): Boolean

Checks if the CharacterInputStream has a given number of characters left

Link copied to clipboard
abstract operator fun hasNext(): Boolean

Checks if the CharacterInputStream has a next character left

Link copied to clipboard
abstract operator fun next(): Char

Returns the next character and continues to the next token

Link copied to clipboard
abstract fun peek(): Char

Gives back the next character without skipping

abstract fun peek(num: Int): Char

Gives back a character of the CharacterInputStream (relative to the actual position)

abstract fun peek(from: Int, to: Int): String

Gives back a part of the CharacterInputStream as string (relative to the actual position)

Link copied to clipboard
abstract fun skip()

Skips the next character

abstract fun skip(number: Int)

Skips a given number of characters