|
|||||||||||
| 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 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, 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 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()
throws LexerException,
ReadException
LexerBase
la in interface Lexerla in class LexerBaseLexerException
ReadException
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 | ||||||||||