org.jsesoft.jpp
Class SingleLineCommentState

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

public class SingleLineCommentState
extends State

Scans a single line comment from the reader.

Version:
1.0
Author:
JSESoft

Field Summary
(package private)  char[] buffer
          The character buffer.
protected  boolean shouldIgnore
          Whether or not to ignore white spaces.
 
Constructor Summary
SingleLineCommentState()
           
SingleLineCommentState(boolean shouldIgnore)
           
 
Method Summary
protected  void checkBuffer(int size)
          Increase buffer size if necessary.
 Token nextToken(java.io.PushbackReader reader, int first, Tokenizer tokenizer)
          Scans traditional comment from reader.
protected  java.lang.String prefix()
           
 void setShouldIgnore(boolean value)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shouldIgnore

protected boolean shouldIgnore
Whether or not to ignore white spaces.

buffer

char[] buffer
The character buffer.
Constructor Detail

SingleLineCommentState

public SingleLineCommentState()

SingleLineCommentState

public SingleLineCommentState(boolean shouldIgnore)
Method Detail

nextToken

public Token nextToken(java.io.PushbackReader reader,
                       int first,
                       Tokenizer tokenizer)
                throws java.io.IOException
Scans traditional comment 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

setShouldIgnore

public void setShouldIgnore(boolean value)

prefix

protected java.lang.String prefix()