tags:

views:

266

answers:

1
+2  Q: 

ANTLR2 vs ANTLR3

Have you used either of these or both? Which do you prefer, and for what reason?

For example, I learned v2 recently and am probably going to stick with it because of the high performance implementation provided by the netbeans team (yeah, I'm stuck with java). In this case would there be any compelling reason to switch?

+2  A: 

To find what's changed between v2 and v3 check out this link: http://www.antlr.org/wiki/pages/viewpage.action?pageId=719

I should note that we still use 2.7.6 with C++ where I work and we don't really feel the need to upgrade right now.

We did use v3.0 when we did a C# port of our language because we found a few bugs that were fixed in 3.0 and weren't back ported to 2.7.6

To summarize the changes:

  • Auto LL(*), no need to specify the lookahead
  • Auto-backtracking,
  • allows most non-left recursive grammer rules
chollida
Nice link, that LL(*) lexer looks appealing
Ellery Newcomer