sjm.parse.tokens
Class QuoteState
java.lang.Object
|
+--sjm.parse.tokens.TokenizerState
|
+--sjm.parse.tokens.QuoteState
- public class QuoteState
- extends TokenizerState
A quoteState returns a quoted string token from a reader.
This state will collect characters until it sees a match
to the character that the tokenizer used to switch to
this state. For example, if a tokenizer uses a double-
quote character to enter this state, then
nextToken() will search for another double-quote
until it finds one or finds the end of the reader.
|
Field Summary |
protected char[] |
charbuf
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
charbuf
protected char[] charbuf
QuoteState
public QuoteState()
checkBufLength
protected void checkBufLength(int i)
nextToken
public Token nextToken(java.io.PushbackReader r,
int cin,
Tokenizer t)
throws java.io.IOException
- Return a quoted string token from a reader. This method
will collect characters until it sees a match to the
character that the tokenizer used to switch to this
state.
- Overrides:
- nextToken in class TokenizerState
- Returns:
- a quoted string token from a reader