| Package | org.antlr.runtime |
| Class | public class ANTLRStringStream |
| Implements | CharStream |
| Subclasses | ANTLRFileStream |
| Property | Defined by | ||
|---|---|---|---|
| charPositionInLine : int | ANTLRStringStream | ||
| index : int [read-only] Return the current input symbol index 0..n where n indicates the
last symbol has been read.
| ANTLRStringStream | ||
| line : int | ANTLRStringStream | ||
| size : int [read-only]
| ANTLRStringStream | ||
| sourceName : String | ANTLRStringStream | ||
| Property | Defined by | ||
|---|---|---|---|
| _charPositionInLine : int = 0 The index of the character relative to the beginning of the line 0..n-1
| ANTLRStringStream | ||
| data : String The data being scanned
| ANTLRStringStream | ||
| lastMarker : int Track the last mark() call result value for use in rewind().
| ANTLRStringStream | ||
| _line : int = 1 line number 1..n within the input
| ANTLRStringStream | ||
| _lineDelimiter : String | ANTLRStringStream | ||
| markDepth : int = 0 tracks how deep mark() calls are nested
| ANTLRStringStream | ||
| markers : Array A list of CharStreamState objects that tracks the stream state
values line, charPositionInLine, and p that can change as you
move through the input stream.
| ANTLRStringStream | ||
| n : int How many characters are actually in the buffer
| ANTLRStringStream | ||
| p : int = 0 0..n-1 index into string of next char
| ANTLRStringStream | ||
| _sourceName : String | ANTLRStringStream | ||
| Method | Defined by | ||
|---|---|---|---|
|
ANTLRStringStream(input:String = null, lineDelimiter:String = "
")
Copy data in string to a local char array
| ANTLRStringStream | ||
|
consume():void
| ANTLRStringStream | ||
|
LA(i:int):int
| ANTLRStringStream | ||
|
LT(i:int):int
| ANTLRStringStream | ||
|
mark():int
| ANTLRStringStream | ||
|
release(marker:int):void
| ANTLRStringStream | ||
|
reset():void
Reset the stream so that it's in the same state it was
when the object was created xceptthe data array is not
touched.
| ANTLRStringStream | ||
|
rewind():void
| ANTLRStringStream | ||
|
rewindTo(m:int):void
| ANTLRStringStream | ||
|
seek(index:int):void
consume() ahead until p==index; can't just set p=index as we must
update line and charPositionInLine.
| ANTLRStringStream | ||
|
substring(start:int, stop:int):String
| ANTLRStringStream | ||
| _charPositionInLine | property |
protected var _charPositionInLine:int = 0The index of the character relative to the beginning of the line 0..n-1
| charPositionInLine | property |
charPositionInLine:int [read-write]Implementation
public function get charPositionInLine():int
public function set charPositionInLine(value:int):void
| data | property |
protected var data:StringThe data being scanned
| index | property |
index:int [read-only]Return the current input symbol index 0..n where n indicates the last symbol has been read. The index is the index of char to be returned from LA(1).
Implementation public function get index():int
| lastMarker | property |
protected var lastMarker:intTrack the last mark() call result value for use in rewind().
| _line | property |
protected var _line:int = 1line number 1..n within the input
| line | property |
line:int [read-write]Implementation
public function get line():int
public function set line(value:int):void
| _lineDelimiter | property |
protected var _lineDelimiter:String
| markDepth | property |
protected var markDepth:int = 0tracks how deep mark() calls are nested
| markers | property |
protected var markers:ArrayA list of CharStreamState objects that tracks the stream state values line, charPositionInLine, and p that can change as you move through the input stream. Indexed from 1..markDepth. A null is kept
| n | property |
protected var n:intHow many characters are actually in the buffer
| p | property |
protected var p:int = 00..n-1 index into string of next char
| size | property |
size:int [read-only]Implementation
public function get size():int
| _sourceName | property |
protected var _sourceName:String
| sourceName | property |
sourceName:String [read-write]Implementation
public function get sourceName():String
public function set sourceName(value:String):void
| ANTLRStringStream | () | constructor |
public function ANTLRStringStream(input:String = null, lineDelimiter:String = "
")Copy data in string to a local char array
Parametersinput:String (default = null) |
|
lineDelimiter:String (default = "
") |
| consume | () | method |
public function consume():void
| LA | () | method |
public function LA(i:int):intParameters
i:int |
int |
| LT | () | method |
public function LT(i:int):intParameters
i:int |
int |
| mark | () | method |
public function mark():int
Returns
int |
| release | () | method |
public function release(marker:int):voidParameters
marker:int |
| reset | () | method |
public function reset():voidReset the stream so that it's in the same state it was when the object was created xceptthe data array is not touched.
| rewind | () | method |
public function rewind():void
| rewindTo | () | method |
public function rewindTo(m:int):voidParameters
m:int |
| seek | () | method |
public function seek(index:int):voidconsume() ahead until p==index; can't just set p=index as we must update line and charPositionInLine.
Parametersindex:int |
| substring | () | method |
public function substring(start:int, stop:int):StringParameters
start:int |
|
stop:int |
String |