tokenStream and TokenStreamImpl implementation