|
|||||||||||
| 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
|
protected String |
delimiter
|
protected boolean |
emptyString
|
protected char |
watchFor
|
| 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(int k)
Returns the next kth 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, la, 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 String delimiter
protected char watchFor
protected boolean allowGStrings
protected boolean emptyString
| Constructor Detail |
public StringLexer()
| Method Detail |
public void allowGStrings(boolean allow)
public Token undelegatedNextToken()
throws ReadException,
LexerException
undelegatedNextToken in class LexerBaseReadException
LexerExceptionpublic void delimit(boolean delimit)
delimit in interface Delimiterdelimit in class TextLexerBasepublic void setSource(Lexer source)
setSource in interface LexersetSource in class LexerBasepublic void unsetSource()
unsetSource in interface LexerunsetSource in class LexerBase
public char la(int k)
throws LexerException,
ReadException
kth character, without consuming any.
la in interface Lexerla in class TextLexerBaseLexerException
ReadException
public char consume()
throws LexerException,
ReadException
consume in interface Lexerconsume in class TextLexerBaseLexerException
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 | ||||||||||