SimpleCharStream

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).

Constructors

Link copied to clipboard
constructor(dstream: Provider, startline: Int, startcolumn: Int, buffersize: Int)
Constructor.
constructor(dstream: Provider, startline: Int, startcolumn: Int)
Constructor.
constructor(dstream: Provider)
Constructor.

Properties

Link copied to clipboard
val DEFAULT_BUF_SIZE: Int = 4096
Default buffer size if nothing is specified

Functions

Link copied to clipboard
fun adjustBeginLineColumn(nNewLine: Int, newCol: Int)
Method to adjust line and column numbers for the start of a token.
Link copied to clipboard
open fun backup(nAmount: Int)
abstract fun backup(amount: Int)
Backs up the input stream by amount steps.
Link copied to clipboard
open fun beginToken(): Char
Link copied to clipboard
open fun done()
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
Link copied to clipboard
open fun getBeginColumn(): Int
Link copied to clipboard
open fun getBeginLine(): Int
Link copied to clipboard
open fun getEndColumn(): Int
Link copied to clipboard
open fun getEndLine(): Int
Link copied to clipboard
open fun getImage(): String
Link copied to clipboard
open fun getSuffix(len: Int): Array<Char>
abstract fun getSuffix(len: Int): Array<Char>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun readChar(): Char
Get the next character from the selected input.
Link copied to clipboard
fun reInit(nStartLine: Int, nStartColumn: Int, nBufferSize: Int)
open fun reInit(dstream: Provider)
open fun reInit(dstream: Provider, startline: Int, startcolumn: Int)
open fun reInit(dstream: Provider, startline: Int, startcolumn: Int, buffersize: Int)
Reinitialise.
Link copied to clipboard
fun setTabSize(nTabSize: Int)
abstract fun setTabSize(i: Int)
Set the tab size to use.
Link copied to clipboard
fun setTrackLineColumn(bTrackLineColumn: Boolean)
abstract fun setTrackLineColumn(trackLineColumn: Boolean)
Enable or disable line number and column number tracking.