|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.syntax.lexer.LexerBase
org.codehaus.groovy.syntax.lexer.GroovyLexerBase
org.codehaus.groovy.syntax.lexer.GroovyExpressionLexer
Lexes Groovy, counting braces. Considers itself at end of stream when the } count exceeds the { count.
Field Summary | |
protected int |
balance
|
protected boolean |
delimited
|
protected boolean |
finished
|
Fields inherited from class org.codehaus.groovy.syntax.lexer.GroovyLexerBase |
gstringLexer, stringLexer |
Fields inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
delegate, source, startColumn, startLine |
Constructor Summary | |
GroovyExpressionLexer()
|
Method Summary | |
char |
consume()
Eats a character from the input stream. |
void |
delegate(Lexer to)
Delegates our duties to another Lexer. |
void |
delimit(boolean delimited)
Turns delimiting on or off. |
protected void |
finish()
Stops the lexer stream. |
boolean |
isDelimited()
Returns true if the lexer is applying its delimiter policy. |
boolean |
isFinished()
Returns true if the lexer stream is dry. |
char |
la(int k)
Returns the next k th character, without consuming any. |
Token |
nextToken()
Finds and returns (and consumes) the next token from the underlying stream. |
protected void |
restart()
Restarts the lexer stream after a finish()
and some intevening act (like a new source). |
void |
undelegate()
Retakes responsibility for our duties. |
Methods inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
getColumn, getDelegate, getLine, getSource, getStartColumn, getStartLine, isDelegated, isExternallySourced, la, mark, readEOL, readEOL, reset, setSource, symbol, symbol, tokenizeEOL, undelegatedNextToken, unexpected, unexpected, unexpected, unsetSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean delimited
protected boolean finished
protected int balance
Constructor Detail |
public GroovyExpressionLexer()
Method Detail |
public Token nextToken() throws ReadException, LexerException
nextToken
in interface Lexer
nextToken
in class GroovyLexerBase
ReadException
LexerException
public void delimit(boolean delimited)
la()
and consume()
. However, once the delimiter has been
reached, this routine should have no effect.
delimit
in interface Delimiter
public boolean isDelimited()
isDelimited
in interface Delimiter
public boolean isFinished()
isFinished
in interface Delimiter
protected void restart()
finish()
and some intevening act (like a new source).
protected void finish()
public void delegate(Lexer to)
delegate
in interface Lexer
delegate
in class LexerBase
public void undelegate()
undelegate
in interface Lexer
undelegate
in class LexerBase
public char la(int k) throws LexerException, ReadException
k
th character, without consuming any.
la
in interface Lexer
la
in class LexerBase
LexerException
ReadException
public char consume() throws LexerException, ReadException
consume
in interface Lexer
consume
in class LexerBase
LexerException
ReadException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |