接口 CharStream
-
-
字段概要
字段 修饰符和类型 字段 说明 static int
EOF
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 int
getCharPositionInLine()
The index of the character relative to the beginning of the line 0..n-1int
getLine()
ANTLR tracks the line information automaticallyint
LT(int i)
Get the ith character of lookahead.void
setCharPositionInLine(int pos)
void
setLine(int line)
Because this stream can rewind, we need to be able to reset the linejava.lang.String
substring(int start, int stop)
For infinite streams, you don't need this; primarily I'm providing a useful interface for action code.
-
-
-
字段详细资料
-
EOF
static final int EOF
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
substring
java.lang.String substring(int start, int 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.
-
LT
int LT(int 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.
-
getLine
int getLine()
ANTLR tracks the line information automatically
-
setLine
void setLine(int line)
Because this stream can rewind, we need to be able to reset the line
-
setCharPositionInLine
void setCharPositionInLine(int pos)
-
getCharPositionInLine
int getCharPositionInLine()
The index of the character relative to the beginning of the line 0..n-1
-
-