

Public Member Functions | |
| def | substring |
| For infinite streams, you don't need this; primarily I'm providing a useful interface for action code. | |
| def | LT |
| Get the ith character of lookahead. | |
| def | getLine |
| ANTLR tracks the line information automatically. | |
| def | setLine |
| Because this stream can rewind, we need to be able to reset the line. | |
| def | getCharPositionInLine |
| The index of the character relative to the beginning of the line 0. | |
| def | setCharPositionInLine |
Static Public Attributes | |
| int | EOF = 1 |
This is an abstract class that must be implemented by a subclass.
Definition at line 1124 of file antlr3.py.
| def antlr3.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 antlr3.ANTLRStringStream.
| def antlr3.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 antlr3.ANTLRStringStream.
| def antlr3.CharStream.getLine | ( | self | ) |
| def antlr3.CharStream.setLine | ( | self, | ||
| line | ||||
| ) |
Because this stream can rewind, we need to be able to reset the line.
Reimplemented in antlr3.ANTLRStringStream.
| def antlr3.CharStream.getCharPositionInLine | ( | self | ) |
The index of the character relative to the beginning of the line 0.
.n-1
Reimplemented in antlr3.ANTLRStringStream.
| def antlr3.CharStream.setCharPositionInLine | ( | self, | ||
| pos | ||||
| ) |
int antlr3.CharStream.EOF = 1 [static] |
1.5.5