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
파일 보기 프로젝트 열기: antlr/antlr4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
name string

보호된 프로퍼티들

프로퍼티 타입 설명
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