in reply to Translating from one programming language to another automated
Yacc based grammars don't backtrack (or backtrack at most one token). By looking ahead just a single token, they can decide which rule to apply, and then they do not have to try another rule, even if the choosen rule turned out to lead to a mismatch. Subclasses of the class of context free grammars, like LL(k), LR(k), LALR(k), etc can decide which rule is needed by looking ahead a fixed number of tokens.
Another thing to consider is that Parse::RecDescent does not have a tokenizer. It generaters combined lexer/parsers.
Conclusion, Parse::RecDescent will very likely do the job. But it might not give the performance you are seeking. I've never worked with Parse::YAPP, so I will not comment on it.
Abigail
|
|---|