C# Класс Antlr4.Runtime.AntlrInputStream

Vacuum all input from a Reader/InputStream and then treat it like a char[] buffer.
Vacuum all input from a Reader/InputStream and then treat it like a char[] buffer. Can also pass in a string or char[] to use. If you need encoding, pass in stream/reader with correct encoding.
Наследование: ICharStream
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
name string

Защищенные свойства (Protected)

Свойство Тип Описание
data char[]
n int
p int

Открытые методы

Метод Описание
AntlrInputStream ( ) : System
AntlrInputStream ( Stream input ) : System
AntlrInputStream ( Stream input, int initialSize ) : System
AntlrInputStream ( Stream input, int initialSize, int readChunkSize ) : System
AntlrInputStream ( TextReader r ) : System
AntlrInputStream ( TextReader r, int initialSize ) : System
AntlrInputStream ( TextReader r, int initialSize, int readChunkSize ) : System
AntlrInputStream ( char data, int numberOfActualCharsInArray ) : System

This is the preferred constructor for strings as no data is copied

AntlrInputStream ( string input ) : System

Copy data in string to a local char array

Consume ( ) : void
GetText ( Interval interval ) : string
LA ( int i ) : int
Load ( TextReader r, int size, int readChunkSize ) : void
Lt ( int i ) : int
Mark ( ) : int

mark/release do nothing; we have entire buffer

Release ( int marker ) : void
Reset ( ) : void

Reset the stream so that it's in the same state it was when the object was created *except* the data array is not touched.

Reset the stream so that it's in the same state it was when the object was created *except* the data array is not touched.

Seek ( int index ) : void

consume() ahead until p==index; can't just set p=index as we must update line and charPositionInLine.

consume() ahead until p==index; can't just set p=index as we must update line and charPositionInLine. If we seek backwards, just set p

ToString ( ) : string

Описание методов

AntlrInputStream() публичный метод

public AntlrInputStream ( ) : System
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( Stream input ) : System
input Stream
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( Stream input, int initialSize ) : System
input Stream
initialSize int
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( Stream input, int initialSize, int readChunkSize ) : System
input Stream
initialSize int
readChunkSize int
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( TextReader r ) : System
r System.IO.TextReader
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( TextReader r, int initialSize ) : System
r System.IO.TextReader
initialSize int
Результат System

AntlrInputStream() публичный метод

public AntlrInputStream ( TextReader r, int initialSize, int readChunkSize ) : System
r System.IO.TextReader
initialSize int
readChunkSize int
Результат System

AntlrInputStream() публичный метод

This is the preferred constructor for strings as no data is copied
public AntlrInputStream ( char data, int numberOfActualCharsInArray ) : System
data char
numberOfActualCharsInArray int
Результат System

AntlrInputStream() публичный метод

Copy data in string to a local char array
public AntlrInputStream ( string input ) : System
input string
Результат System

Consume() публичный метод

public Consume ( ) : void
Результат void

GetText() публичный метод

public GetText ( Interval interval ) : string
interval Antlr4.Runtime.Misc.Interval
Результат string

LA() публичный метод

public LA ( int i ) : int
i int
Результат int

Load() публичный метод

public Load ( TextReader r, int size, int readChunkSize ) : void
r System.IO.TextReader
size int
readChunkSize int
Результат void

Lt() публичный метод

public Lt ( int i ) : int
i int
Результат int

Mark() публичный метод

mark/release do nothing; we have entire buffer
public Mark ( ) : int
Результат int

Release() публичный метод

public Release ( int marker ) : void
marker int
Результат void

Reset() публичный метод

Reset the stream so that it's in the same state it was when the object was created *except* the data array is not touched.
Reset the stream so that it's in the same state it was when the object was created *except* the data array is not touched.
public Reset ( ) : void
Результат void

Seek() публичный метод

consume() ahead until p==index; can't just set p=index as we must update line and charPositionInLine.
consume() ahead until p==index; can't just set p=index as we must update line and charPositionInLine. If we seek backwards, just set p
public Seek ( int index ) : void
index int
Результат void

ToString() публичный метод

public ToString ( ) : string
Результат string

Описание свойств

data защищенное свойство

The data being scanned
protected char[] data
Результат char[]

n защищенное свойство

How many characters are actually in the buffer
protected int n
Результат int

name публичное свойство

What is name or source of this char stream?
public string name
Результат string

p защищенное свойство

0..n-1 index into string of next char
protected int p
Результат int