oursland.parse
Class BaseTokenizer

java.lang.Object
  extended by oursland.parse.BaseTokenizer
Direct Known Subclasses:
LispTokenizer

public abstract class BaseTokenizer
extends java.lang.Object

Provides look-ahead capability to aid in tokenizer implementations.

Author:
oursland

Field Summary
private  IntegerRingBuffer buf
           
private  java.io.InputStream in
           
 
Constructor Summary
BaseTokenizer(java.io.InputStream in)
           
 
Method Summary
protected  void consume(char c)
           
abstract  boolean hasNextToken()
           
abstract  java.lang.String nextToken()
           
protected  char peek(int n)
           
protected  int peekNoEOF(int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

private java.io.InputStream in

buf

private IntegerRingBuffer buf
Constructor Detail

BaseTokenizer

public BaseTokenizer(java.io.InputStream in)
Method Detail

hasNextToken

public abstract boolean hasNextToken()
                              throws java.io.IOException
Throws:
java.io.IOException

nextToken

public abstract java.lang.String nextToken()
                                    throws java.io.IOException
Throws:
java.io.IOException

consume

protected void consume(char c)
                throws java.io.IOException
Throws:
java.io.IOException

peek

protected char peek(int n)
             throws java.io.IOException
Throws:
java.io.IOException

peekNoEOF

protected int peekNoEOF(int n)
                 throws java.io.IOException
Throws:
java.io.IOException