|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.syntax.lexer.Lexer
Identifies and returns tokens from a source text. nextToken()
is the primary entry point.
Constructor Summary | |
Lexer(CharStream charStream)
Initializes the Lexer from an opened CharStream . |
Method Summary | |
protected char |
consume()
Eats a character from the input stream. |
protected void |
eol()
Handles end-of-line processing. |
CharStream |
getCharStream()
Returns the underlying CharStream . |
protected int |
getStartColumn()
Returns the starting column of the current token. |
protected int |
getStartLine()
Returns the starting line of the current token. |
protected char |
la()
Returns the next character, without consuming it. |
protected char |
la(int k)
Returns the next k th character, without consuming any. |
protected void |
mark()
Saves information about the current position, for tracking token extents. |
Token |
nextToken()
Finds and returns (and consumes) the next token from the underlying stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Lexer(CharStream charStream)
Lexer
from an opened CharStream
.
Method Detail |
public CharStream getCharStream()
CharStream
.
public Token nextToken() throws ReadException, LexerException
ReadException
LexerException
protected void eol()
protected void mark()
protected int getStartLine()
protected int getStartColumn()
protected char la() throws UnexpectedCharacterException, ReadException
UnexpectedCharacterException
ReadException
protected char la(int k) throws UnexpectedCharacterException, ReadException
k
th character, without consuming any.
UnexpectedCharacterException
ReadException
protected char consume() throws UnexpectedCharacterException, ReadException
UnexpectedCharacterException
ReadException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |