net.sf.bddbddb
Class Solver.MyReader

java.lang.Object
  extended by net.sf.bddbddb.Solver.MyReader
Enclosing class:
Solver

public static class Solver.MyReader
extends java.lang.Object

A LineNumberReader that can nest through multiple included files.

Version:
$Id: Solver.java 628 2005-09-27 23:10:31Z joewhaley $
Author:
John Whaley

Constructor Summary
Solver.MyReader(java.io.LineNumberReader r)
          Construct a new reader from the given line number reader.
 
Method Summary
 void close()
          Close all of the readers we have open.
 int getLineNumber()
          Return the line number in the current reader.
 java.lang.String readLine()
          Read a line.
 void registerReader(java.io.LineNumberReader r)
          Register a new reader, pushing the current one on the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Solver.MyReader

public Solver.MyReader(java.io.LineNumberReader r)
Construct a new reader from the given line number reader.

Parameters:
r - reader
Method Detail

registerReader

public void registerReader(java.io.LineNumberReader r)
Register a new reader, pushing the current one on the stack.

Parameters:
r - reader to register

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Read a line. If the current reader is empty, we pop one off the stack. If it is empty and the stack is empty, returns null.

Returns:
the line that was read
Throws:
java.io.IOException

getLineNumber

public int getLineNumber()
Return the line number in the current reader.

Returns:
line number

close

public void close()
           throws java.io.IOException
Close all of the readers we have open.

Throws:
java.io.IOException


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.