|
|||||||||||
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.StringLexer
A Lexer for processing standard strings.
Field Summary | |
protected boolean |
allowGStrings
|
private char[] |
characters
|
protected java.lang.String |
delimiter
|
protected boolean |
emptyString
|
private int |
lookahead
|
protected char |
watchFor
|
private int[] |
widths
|
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 | |
StringLexer()
|
Method Summary | |
void |
allowGStrings(boolean allow)
If set true, the filter will allow \\ and \$ to pass through unchanged. |
char |
consume()
Eats a character from the input stream. |
void |
delimit(boolean delimit)
Controls delimiter search. |
protected void |
finishUp()
Eats our delimiter from the stream and marks us finished. |
char |
la()
Returns the next character, without consuming it. |
char |
la(int k)
Returns the next k th character, without consuming any. |
void |
setSource(Lexer source)
Sets the source lexer and identifies and consumes the opening delimiter. |
Token |
undelegatedNextToken()
Returns a single STRING, then null. |
void |
unsetSource()
Unsets our source. |
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, mark, nextToken, readEOL, readEOL, reset, symbol, symbol, tokenizeEOL, undelegate, 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 delimiter
protected char watchFor
protected boolean allowGStrings
protected boolean emptyString
private int lookahead
private char[] characters
private int[] widths
Constructor Detail |
public StringLexer()
Method Detail |
public void allowGStrings(boolean allow)
public Token undelegatedNextToken() throws ReadException, LexerException
undelegatedNextToken
in class LexerBase
ReadException
LexerException
public void delimit(boolean delimit)
delimit
in interface Delimiter
delimit
in class TextLexerBase
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 char la() throws LexerException, ReadException
LexerBase
la
in interface Lexer
la
in class LexerBase
LexerException
ReadException
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 finishUp() throws LexerException, ReadException
LexerException
ReadException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |