|
|||||||||||
| 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.TextLexerBase
A base class for Lexers that process embedded text.
| Field Summary | |
protected boolean |
delimited
|
protected boolean |
finished
|
| Fields inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
delegate, source, startColumn, startLine |
| Constructor Summary | |
TextLexerBase()
|
|
| Method Summary | |
char |
consume()
Eats a character from the input stream. |
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 kth character, without consuming any. |
protected void |
restart()
Restarts the lexer stream after a finish()
and some intevening act (like a new source). |
| Methods inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
delegate, getColumn, getDelegate, getLine, getSource, getStartColumn, getStartLine, isDelegated, isExternallySourced, la, mark, nextToken, readEOL, readEOL, reset, setSource, symbol, symbol, tokenizeEOL, undelegate, 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
| Constructor Detail |
public TextLexerBase()
| Method Detail |
public void delimit(boolean delimited)
la()
and consume(). However, once the delimiter has been
reached, this routine should have no effect.
delimit in interface Delimiterpublic boolean isDelimited()
isDelimited in interface Delimiterpublic boolean isFinished()
isFinished in interface Delimiterprotected void restart()
finish()
and some intevening act (like a new source).
protected void finish()
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
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||