|
|||||||||||
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.GroovyLexer
Identifies and returns tokens from a source text. nextToken()
is the primary entry point. This is the primary lexer for the Groovy language.
It can delegate operations, but will not accept being delegated to.
Field Summary | |
protected int |
column
|
protected int |
line
|
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 | |
GroovyLexer(CharStream charStream)
Initializes the Lexer from an opened CharStream . |
Method Summary | |
char |
consume()
Eats a character from the input stream. |
CharStream |
getCharStream()
Returns the underlying CharStream . |
int |
getColumn()
Returns the current column within that line. |
int |
getLine()
Returns the current line number. |
char |
la(int k)
Returns the next k th character, without consuming any. |
void |
setSource(Lexer source)
Refuses to set a source. |
void |
unsetSource()
Similarly refuses to clear a source. |
Methods inherited from class org.codehaus.groovy.syntax.lexer.GroovyLexerBase |
nextToken |
Methods inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
delegate, getDelegate, getSource, getStartColumn, getStartLine, isDelegated, isExternallySourced, la, mark, readEOL, readEOL, reset, symbol, symbol, tokenizeEOL, undelegate, undelegatedNextToken, unexpected, unexpected, unexpected |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int line
protected int column
Constructor Detail |
public GroovyLexer(CharStream charStream)
Lexer
from an opened CharStream
.
Method Detail |
public CharStream getCharStream()
CharStream
.
public void setSource(Lexer source)
setSource
in interface Lexer
setSource
in class LexerBase
public void unsetSource()
unsetSource
in interface Lexer
unsetSource
in class LexerBase
public int getLine()
getLine
in interface Lexer
getLine
in class LexerBase
public int getColumn()
getColumn
in interface Lexer
getColumn
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 |