ANTLR2 vs ANTLR3

和自甴很熟 提交于 2019-12-10 17:54:52

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/633224/antlr2-vs-antlr3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!