![Stack Overflow](http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png)
Every time I write a simple lexer and parser, I stumble upon the same question: how should the lexer and the parser communicate? I see four different approaches:
The lexer eagerly converts the entire input string into a vector of tokens. Once this is done, the vector is fed to the parser which ...