|
On Apr 10, 2007, at 4:43 PM, Andy Stark wrote:
One thing: if your grammar is written in such a way that it only needs limited lookahead (the C parser uses two lexical symbols) you would not really need packrat parsing, because a simple backtracking parser will already perform in linear time. The downside of using backtracking parsers is that your semantic actions must be reversible, so you need to store even more backtracking information, which is pretty much equivalent memory-wise to storing the AST. That will not work too well on a Lego Mindstorms embedded system with limited memory. Gé -- Gé Weijers |