org.jsesoft.jpp
Class QuotedState

java.lang.Object
  |
  +--org.jsesoft.jpp.State
        |
        +--org.jsesoft.jpp.QuotedState

public class QuotedState
extends State

Scans quoted tokkens from reader

Version:
1.0
Author:
JSESoft

Field Summary
protected  char[] buffer
          The character buffer.
protected  TokenType tokenType
           
 
Constructor Summary
QuotedState()
           
 
Method Summary
protected  void checkBuffer(int size)
          Increase buffer size if necessary.
protected  int escape(java.io.PushbackReader reader, int first, Tokenizer tokenizer)
           
 Token nextToken(java.io.PushbackReader reader, int first, Tokenizer tokenizer)
          Scans a quoted text from reader.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected char[] buffer
The character buffer.

tokenType

protected TokenType tokenType
Constructor Detail

QuotedState

public QuotedState()
Method Detail

nextToken

public Token nextToken(java.io.PushbackReader reader,
                       int first,
                       Tokenizer tokenizer)
                throws java.io.IOException
Scans a quoted text from reader.
Overrides:
nextToken in class State
Parameters:
reader - the reader to read characters from
first - the character starting the token
tokenizer - the tokenizer in duty
Returns:
the next token
Throws:
java.io.IOException - on any problem reading

checkBuffer

protected void checkBuffer(int size)
Increase buffer size if necessary.
Parameters:
size - the required size

escape

protected int escape(java.io.PushbackReader reader,
                     int first,
                     Tokenizer tokenizer)
              throws java.io.IOException