Why split lexing and parsing into two separate phases?
I usually love Laurence's posts. However, one thing he said in this one is wrong in my experience.<p>> Since some parsing approaches such as recursive descent parsing unify these phases, why do lex and yacc split them apart?<p>I have written two recursive descent parsers for one small, but production quality compiler. I am in the middle of writing another two, which will also be production quality and much bigger. And I have written various small parsers.<p>I always use recursive descent, and I <i>always</i> split the lexing and parsing phases.<p>Now, I fully acknowledge that my experience could be an outlier, but I believe the benefits of lexing are so big that most recursive descent parsers have separate lexers.