org.hecl
Class ParseState

java.lang.Object
  extended by org.hecl.ParseState

public class ParseState
extends java.lang.Object

The ParseState class is the state of the current parse.

Version:
1.0
Author:
David N. Welton

Field Summary
 boolean eoc
           
 boolean eof
           
 int len
           
 int lineno
           
 
Constructor Summary
ParseState(java.lang.String in)
          Creates a new ParseState instance.
 
Method Summary
 boolean done()
          The done method returns true if either the end-of-command or end-of-file condition is true.
 char nextchar()
          nextchar returns the next character, keeping track of end-of-command and end-of-file conditions.
 void remaining()
          The remaining method is for debugging purposes, and prints to standard output the remaining text.
 void rewind()
          The rewind method "rewinds" the input by one character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

len

public int len

lineno

public int lineno

eof

public boolean eof

eoc

public boolean eoc
Constructor Detail

ParseState

public ParseState(java.lang.String in)
Creates a new ParseState instance.

Parameters:
in - a String value
Method Detail

nextchar

public char nextchar()
nextchar returns the next character, keeping track of end-of-command and end-of-file conditions.

Returns:
a char value

done

public boolean done()
The done method returns true if either the end-of-command or end-of-file condition is true.

Returns:
a boolean value

remaining

public void remaining()
The remaining method is for debugging purposes, and prints to standard output the remaining text.


rewind

public void rewind()
The rewind method "rewinds" the input by one character.