C# Class 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.
Inheritance: ICharStream
Afficher le fichier Open project: antlr/antlr4 Class Usage Examples

Méthodes publiques

Свойство Type Description
name string

Protected Properties

Свойство Type Description
data char[]
n int
p int

Méthodes publiques

Méthode Description
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

Method Details

AntlrInputStream() public méthode

public AntlrInputStream ( ) : System
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( Stream input ) : System
input Stream
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( Stream input, int initialSize ) : System
input Stream
initialSize int
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( Stream input, int initialSize, int readChunkSize ) : System
input Stream
initialSize int
readChunkSize int
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( TextReader r ) : System
r System.IO.TextReader
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( TextReader r, int initialSize ) : System
r System.IO.TextReader
initialSize int
Résultat System

AntlrInputStream() public méthode

public AntlrInputStream ( TextReader r, int initialSize, int readChunkSize ) : System
r System.IO.TextReader
initialSize int
readChunkSize int
Résultat System

AntlrInputStream() public méthode

This is the preferred constructor for strings as no data is copied
public AntlrInputStream ( char data, int numberOfActualCharsInArray ) : System
data char
numberOfActualCharsInArray int
Résultat System

AntlrInputStream() public méthode

Copy data in string to a local char array
public AntlrInputStream ( string input ) : System
input string
Résultat System

Consume() public méthode

public Consume ( ) : void
Résultat void

GetText() public méthode

public GetText ( Interval interval ) : string
interval Antlr4.Runtime.Misc.Interval
Résultat string

LA() public méthode

public LA ( int i ) : int
i int
Résultat int

Load() public méthode

public Load ( TextReader r, int size, int readChunkSize ) : void
r System.IO.TextReader
size int
readChunkSize int
Résultat void

Lt() public méthode

public Lt ( int i ) : int
i int
Résultat int

Mark() public méthode

mark/release do nothing; we have entire buffer
public Mark ( ) : int
Résultat int

Release() public méthode

public Release ( int marker ) : void
marker int
Résultat void

Reset() public méthode

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
Résultat void

Seek() public méthode

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
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Property Details

data protected_oe property

The data being scanned
protected char[] data
Résultat char[]

n protected_oe property

How many characters are actually in the buffer
protected int n
Résultat int

name public_oe property

What is name or source of this char stream?
public string name
Résultat string

p protected_oe property

0..n-1 index into string of next char
protected int p
Résultat int