|
|||||||||||
| 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 | |
private boolean |
boundary
|
private char[] |
buf
|
private int |
charsInBuffer
|
private CharStream |
charStream
|
private int[] |
charWidth
|
protected int |
column
|
private int |
cur
|
private boolean |
eosRead
|
private boolean |
escapeLookahead
|
private char |
escapeLookaheadChar
|
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. |
private void |
fillBuffer()
Fills the lookahead buffer from the 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 kth 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 |
private CharStream charStream
protected int line
protected int column
private final char[] buf
private final int[] charWidth
private int cur
private int charsInBuffer
private boolean eosRead
private boolean escapeLookahead
private char escapeLookaheadChar
private boolean boundary
| 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 LexersetSource in class LexerBasepublic void unsetSource()
unsetSource in interface LexerunsetSource in class LexerBasepublic int getLine()
getLine in interface LexergetLine in class LexerBasepublic int getColumn()
getColumn in interface LexergetColumn in class LexerBase
public char la(int k)
throws LexerException,
ReadException
kth character, without consuming any.
la in interface Lexerla in class LexerBaseLexerException
ReadException
public char consume()
throws LexerException,
ReadException
consume in interface Lexerconsume in class LexerBaseLexerException
ReadException
private void fillBuffer()
throws ReadException,
LexerException
ReadException
LexerException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||