I have a question about the Interpreter Pattern. I think that pattern is good and flexible. But according to information from some websites, it is said the g++ compiler and microsoft visual c++ compiler are all hand written recursive descent parser. But I think Interpreter Pattern is the most natural way to implement a recursive descent parser. I meet with the problem when I was reading source code of Lua 5.1. So I guess neither g++ or microsoft c++ compiler uses Interpreter Pattern as an approach to implement.
Besides, in a web page( http://www.vincehuston.org/dp/interpreter.html ) I saw this "The pattern doesn't address parsing. When the grammar is very complex, other techniques (such as a parser) are more appropriate." I don't understand why Interpreter Pattern is not capable of complex grammar. Please help me understand if you have any clue of this.
Btw, I don't understand why they use recursive descent parser other than Yacc to generate a parser. Yacc doesn't have to trace back during parsing and yacc can do some optimization to state switch table of parser.