|
|||||||||||
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
org.codehaus.groovy.syntax.lexer.HereDocLexer
A Lexer for processing here docs. It reads a line at a time from the underlying stream (leaving the EOL for the next read), then offers that data for users.
Field Summary | |
protected int |
consumed
|
protected java.lang.String |
data
|
protected boolean |
last
|
protected java.lang.String |
marker
|
protected boolean |
onmargin
|
Fields inherited from class org.codehaus.groovy.syntax.lexer.TextLexerBase |
delimited, finished |
Fields inherited from class org.codehaus.groovy.syntax.lexer.LexerBase |
delegate, source, startColumn, startLine |
Constructor Summary | |
HereDocLexer(java.lang.String marker)
Initializes the lexer to read up to (and including) the marker on a line by itself. |
Method Summary | |
char |
consume()
Eats a character from the input stream. |
void |
delimit(boolean delimit)
Sets delimiting on. |
char |
la(int k)
Returns the next k th character, without consuming any. |
protected void |
refill()
Reads the next line from the underlying stream. |
void |
setSource(Lexer source)
Sets the source lexer and sets the lexer running. |
void |
unsetSource()
Unsets the source lexer. |
Methods inherited from class org.codehaus.groovy.syntax.lexer.TextLexerBase |
finish, isDelimited, isFinished, restart |
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, 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 java.lang.String marker
protected boolean onmargin
protected java.lang.String data
protected int consumed
protected boolean last
Constructor Detail |
public HereDocLexer(java.lang.String marker)
Method Detail |
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 void delimit(boolean delimit)
delimit
in interface Delimiter
delimit
in class TextLexerBase
public char la(int k) throws LexerException, ReadException
k
th character, without consuming any.
la
in interface Lexer
la
in class TextLexerBase
LexerException
ReadException
public char consume() throws LexerException, ReadException
consume
in interface Lexer
consume
in class TextLexerBase
LexerException
ReadException
protected void refill() throws LexerException, ReadException
LexerException
ReadException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |