             }
         }
         
-        // Returns sequence of tokens read from character sequence
+        func characterSequenceFromString(string: String) -> SequenceOf<Character> {
+            trace("characterSequenceFromString", "create character sequence")
+            return SequenceOf(string.generate())
+        }
+        
+        // Returns sequence of tokens scanned from character sequence
         func tokenize(characters: SequenceOf<Character>) -> SequenceOf<Token> {
-            enum State {
+            enum ScannerState {
                 case LookingForToken
                 case ScanningInteger
             }
             
-            return lazySequence { yield in
-                var state = State.LookingForToken
+            return lazySequence { _yield in
+                
+                func yield(token: Token) {
+                    trace("tokenize", "yield(\(token))")
+                    _yield(token)
+                }
+                
+                var state = ScannerState.LookingForToken
                 var scannedIntegerDigits = ""
                 
                 func yieldScannedInteger() {

        }
    }
    
    func testTokenizeAndParse() {
        
        // This is a simple Reverse Polish Notation (RPN) calculator.
        //


        // Use TestData.txt resource from test bundle
        let testBundle = NSBundle(forClass: KJYieldTests.self)
        let testDataPath = testBundle.pathForResource("TestData", ofType: "txt")
        
        let lines = getLinesFromUTF8EncodedTextFileAtPath(testDataPath)
        var lineNumber = 0
