@brief A source of characters for an ANTLR lexer.
This is an abstract class that must be implemented by a subclass.
|
|
substring(self,
start,
stop)
For infinite streams, you don't need this; primarily I'm providing a
useful interface for action code. |
|
|
|
|
LT(self,
i)
Get the ith character of lookahead. |
|
|
|
|
getLine(self)
ANTLR tracks the line information automatically |
|
|
|
|
setLine(self,
line)
Because this stream can rewind, we need to be able to reset the line |
|
|
|
|
getCharPositionInLine(self)
The index of the character relative to the beginning of the line
0..n-1 |
|
|
|
|
| setCharPositionInLine(self,
pos) |
|
|
|
Inherited from IntStream:
LA,
consume,
getSourceName,
index,
mark,
release,
rewind,
seek,
size
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__init__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|