C# Class Spring.Expressions.Parser.antlr.InputBuffer

Represents a stream of characters fed to the lexer from that can be rewound via mark()/rewind() methods.

A dynamic array is used to buffer up all the input characters. Normally, "k" characters are stored in the buffer. More characters may be stored during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. Consumption of characters is deferred. In other words, reading the next character is not done by conume(), but deferred until needed by LA or LT.

Show file Open project: spring-projects/spring-net Class Usage Examples

Protected Properties

Property Type Description
markerOffset int
nMarkers int
numToConsume int
queue System.Collections.ArrayList

Public Methods

Method Description
InputBuffer ( )
LA ( int i ) : char
commit ( ) : void
consume ( ) : char
fill ( int amount ) : void
getLAChars ( ) : string
getMarkedChars ( ) : string
isMarked ( ) : bool
mark ( ) : int
reset ( ) : void
rewind ( int mark ) : void

Protected Methods

Method Description
syncConsume ( ) : void

Method Details

InputBuffer() public method

public InputBuffer ( )

LA() public method

public LA ( int i ) : char
i int
return char

commit() public method

public commit ( ) : void
return void

consume() public method

public consume ( ) : char
return char

fill() public abstract method

public abstract fill ( int amount ) : void
amount int
return void

getLAChars() public method

public getLAChars ( ) : string
return string

getMarkedChars() public method

public getMarkedChars ( ) : string
return string

isMarked() public method

public isMarked ( ) : bool
return bool

mark() public method

public mark ( ) : int
return int

reset() public method

public reset ( ) : void
return void

rewind() public method

public rewind ( int mark ) : void
mark int
return void

syncConsume() protected method

protected syncConsume ( ) : void
return void

Property Details

markerOffset protected property

protected int markerOffset
return int

nMarkers protected property

protected int nMarkers
return int

numToConsume protected property

protected int numToConsume
return int

queue protected property

protected System.Collections.ArrayList queue
return System.Collections.ArrayList