ANTLR2 与 ANTLR3 [英] ANTLR2 vs ANTLR3

查看:38
本文介绍了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(*),无需指定前瞻
  • 自动回溯,
  • 允许大多数非左递归语法规则

这篇关于ANTLR2 与 ANTLR3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆