   }
 
   func addInfix(name:String, _ ifx:Infix<T>) {
-    infixParsers[name] = ifx
-  }
-
-  var next:Infix<T>?
-
-  private func getInfix(stream:CharStream) -> Infix<T>? {
-    if let ifx = next {
-      next = nil
-      return ifx
-    }
-    if let str = opFormat(stream) {
-      return infixParsers[str]
-    }
-    return nil
-  }
-
-  private func putBack(ifx:Infix<T>) -> Void {
-    assert(next == nil, "Expected cache to be empty.")
-    next = ifx
-  }
-
-  private func getPrefix(stream:CharStream) -> Prefix<T>? {
-    return nil
+    infixOps.dict[name] = ifx
   }
 
   private func Term(stream:CharStream) -> T? {

  }
}

class OperatorPrecedence<T> : Parser {
  typealias Target = T
  typealias ParseFunc  = CharStream -> T?

  let opFormat: CharStream -> String?

  var term: ParseFunc?
  private var infixParsers: [String:Infix<T>]

  init(opFormat: CharStream -> String?) {
    self.opFormat = opFormat
    term = nil
    infixParsers = [:]
  }

  func parse(stream:CharStream) -> T? {

    if ass == .Right {
      prec = prec - 1
    }
    while let ifx = infixOps.get(stream) {
      if ifx.prec > prec {
        lft = ifx.parse(self, stream, lft)!
      } else {
        infixOps.putBack(ifx)
        break
      }
    }
