Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ANTLR2 vs ANTLR3

Tags:

antlr

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?

like image 928
Ellery Newcomer Avatar asked Feb 01 '26 08:02

Ellery Newcomer


1 Answers

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
like image 90
chollida Avatar answered Feb 03 '26 09:02

chollida



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!