On Apr 6, 2007, at 8:15 AM, Andy Stark wrote:
The memory use of a recursive descent parser is proportional to the nesting depth of the input, which for typical input is bounded by a small number, and because there's no backtracking the input string does not have to be retained in memory for speed.
It's pretty hard to beat a well-written recursive-descent parser in the efficiency department. A PEG-based parser would use more memory and be quite a bit slower.
I love the simplicity and speed of the current Lua system. Not many systems compile a 2 megabyte source file in 1 second or so.