ANTLR2 与 ANTLR3

ANTLR2 与 ANTLR3

问题描述:

您是否使用过其中一种或两种?您更喜欢哪个,原因是什么?

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

例如,我最近学习了 v2,并且可能会因为 netbeans 团队提供的高性能实现而坚持使用它(是的,我坚持使用 java).在这种情况下,是否有任何令人信服的理由进行转换?

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?

要了解 v2 和 v3 之间的变化,请查看此链接:http://www.antlr.org/wiki/pages/viewpage.action?pageId=719

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

我应该注意到,我们仍然在我工作的地方使用 2.7.6 和 C++,我们现在并不觉得有必要升级.

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.

当我们对我们的语言进行 C# 移植时,我们确实使用了 v3.0,因为我们发现了一些在 3.0 中修复的错误并且没有移植到 2.7.6

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

总结变化:

  • Auto LL(*),无需指定前瞻
  • 自动回溯,
  • 允许大多数非左递归语法规则