Public Member Functions | |
def | getCharPositionInLine |
def | getLine |
def | LT |
def | setCharPositionInLine |
def | setLine |
def | substring |
Static Public Attributes | |
int | EOF = 1 |
@brief A source of characters for an ANTLR lexer. This is an abstract class that must be implemented by a subclass.
Definition at line 182 of file streams.py.
The index of the character relative to the beginning of the line 0..n-1
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 231 of file streams.py.
ANTLR tracks the line information automatically
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 217 of file streams.py.
def rve_interface_gen.antlr3.streams.CharStream.LT | ( | self, | |
i | |||
) |
Get the ith character of lookahead. This is the same usually as LA(i). This will be used for labels in the generated lexer code. I'd prefer to return a char here type-wise, but it's probably better to be 32-bit clean and be consistent with LA.
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 206 of file streams.py.
def rve_interface_gen.antlr3.streams.CharStream.setCharPositionInLine | ( | self, | |
pos | |||
) |
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 239 of file streams.py.
def rve_interface_gen.antlr3.streams.CharStream.setLine | ( | self, | |
line | |||
) |
Because this stream can rewind, we need to be able to reset the line
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 223 of file streams.py.
def rve_interface_gen.antlr3.streams.CharStream.substring | ( | self, | |
start, | |||
stop | |||
) |
For infinite streams, you don't need this; primarily I'm providing a useful interface for action code. Just make sure actions don't use this on streams that don't support it.
Reimplemented in rve_interface_gen.antlr3.streams.ANTLRStringStream.
Definition at line 196 of file streams.py.
int rve_interface_gen::antlr3::streams.CharStream::EOF = 1 [static] |
Definition at line 193 of file streams.py.