                         yield(result)
                     }
                 }
+                
+                trace("evaluate", "terminates")
             }
         }
         

                    yieldScannedInteger()
                    state = .LookingForToken
                }
            }
        }
        

        //
        // All other input characters are ignored.
        //
        // The implementation uses three lazy sequences:
        //
        // - A sequence of characters is lazily produced from a string (simulating I/O)
        // - The scanner reads a sequence of characters to lazily produce a sequence of tokens
        // - The parser reads the sequence of tokens to lazily produce a sequence of results
        
        // If showTraceOutput is true, then generate trace output in the debugger window.
        // This is interesting to verify that the I/O, tokenizing and evaluation are
        // interleaved and running on different threads.
        let showTraceOutput = false
        
        // Queue used to serialize trace output from multiple threads
