ANTLR2和ANTLR3 [英] ANTLR2 vs ANTLR3

查看:110
本文介绍了ANTLR2和ANTLR3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您使用了这两种还是其中一种?您更喜欢哪个?出于什么原因?

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

例如,我最近学习了v2,由于netbeans团队提供了高性能的实现,所以我可能会坚持使用v2(是的,我坚持使用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.动作?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

总结更改:

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

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

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