       }
       //p([stream.currentTokenString, status.tokenizer]);
       //p(status.stored);
-      fn(type: tt)
+      if let t = tt {
+        try fn(type: t)
+      } else {
+        throw CommonLexerError.TokenType
+      }
       stream.startIndex = stream.currentIndex
     }
     //p(status.indent);
   }
 
-  func parseTokenStrings(fn: (type: TokenType?, string: String?) -> Void) {
-    parse() { tt in
-      return fn(type: tt, string: self.stream.currentTokenString)
+  func parseTokenStrings(fn: (type: TokenType, string: String) throws -> Void)
+      throws {
+    try parse() { tt in
+      if let s = self.stream.currentTokenString {
+        return try fn(type: tt, string: s)
+      } else {
+        throw CommonLexerError.String
+      }
     }
   }
 
-  func parse(fn: (type: TokenType?) -> Void) {
+  func parse(fn: (type: TokenType) throws -> Void) throws {
     let len = stream.bytes.count
     var ninc = 0
     var haveNewLine = false

          tt = next(t)
          if tt == nil {
            if let dt = defaultTokenizer {
              tt = next(dt)
            }
          }

    return nil
  }

  func parseLine(fn: (type: TokenType) throws -> Void) throws {
    lineCount += 1
    while !stream.isEol {
      var tt: TokenType?
