| org.antlr.runtime.CharStream
All known Subclasses: org.antlr.runtime.ANTLRStringStream,
CharStream | public interface CharStream extends IntStream(Code) | | A source of characters for an ANTLR lexer
|
Field Summary | |
final public static int | EOF |
EOF | final public static int EOF(Code) | | |
LT | public int LT(int i)(Code) | | 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.
|
getCharPositionInLine | int getCharPositionInLine()(Code) | | The index of the character relative to the beginning of the line 0..n-1
|
getLine | int getLine()(Code) | | ANTLR tracks the line information automatically
|
setCharPositionInLine | void setCharPositionInLine(int pos)(Code) | | |
setLine | void setLine(int line)(Code) | | Because this stream can rewind, we need to be able to reset the line
|
substring | public String substring(int start, int stop)(Code) | | 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.
|
|
|