formulaVisited
Class Factory

java.lang.Object
  extended by formulaVisited.Factory

public class Factory
extends java.lang.Object

A factory for creating formulas from a reader. The specific Formula subclass that is returned depends on what the reader reads. Because the factory is stateless, all its methods are static. True and false are represented by 1 and 0; variables are strings of letters and digits beginnig with a lowercase letter; the negation operator is '~'; conjunctions are in () with '&' as the infix operator; and disjunctions are in [] with '|' as the infix operator.


Constructor Summary
Factory()
           
 
Method Summary
static Formula factory(java.io.PushbackReader _in)
          Reads a character stream and returns the formula corresponding to it, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factory

public Factory()
Method Detail

factory

public static Formula factory(java.io.PushbackReader _in)
                       throws java.io.IOException
Reads a character stream and returns the formula corresponding to it, if any.

Parameters:
_in - A pushback reader for the stream.
Throws:
java.io.IOException - If the stream operations do.
java.lang.RuntimeException - If there is a syntax error in the character stream.