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.> Since some parsing approaches such as recursive descent parsing unify these phases, why do lex and yacc split them apart?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.I always use recursive descent, and I always split the lexing and parsing phases.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.