ANTLR和Eclipse(或任何体面的IDE) [英] ANTLR and Eclipse (or any decent IDE)

查看:264
本文介绍了ANTLR和Eclipse(或任何体面的IDE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用ANTLR与Eclipse一段时间使用ANTLRv3IDE插件。虽然它不是完美的,有点过时,它的工作相当不错。



现在我正在寻找转换为ANTLRv4为我正在创建的另一个DSL。然而,Eclipse支持似乎非常薄。我决定试用ANTLRWorks,这是一个NetBeans插件,但是我无法安装它(似乎被锁定到特定的日期版本(201302132200,而我有更新的东西,依然是7.3)依赖关系) / p>

所以问题是:有没有人设置任何 Java IDE(最好是Eclipse,但是如果支持对于某些东西有帮助,我可以说服切换否则)与ANTLR进行整合?使用集成,我的意思是:代码生成在保存/键盘快捷方式和语法着色(至少)。代码完成和其他功能当然很好,但现在我可以没有他们生活。



我非常了解Xtext,我已经取得了很大的成功对于一些项目,但不幸的是它不符合这里的需求(不需要IDE支持,需要我自己的DSL模型不基于ECore等)。



我知道ANTLRWorks可以在没有Java IDE的情况下作为独立应用运行,但是我认为是最后的解决方案,因为这样做非常麻烦(在应用程序,文件不同步之间切换,没有VCS支持等)。我尝试了其他方式:将Java部件安装到ANTLRworks(本身是NetBeans发行版)中,但并没有结束(似乎基本的项目支持等从ANTLRworks中删除)。

解决方案

Eclipse的Antlr4插件在这里:



https://github.com/jknack/antlr4ide


I have been using ANTLR with Eclipse for some time using the ANTLRv3IDE plugin. While it is not perfect, and a bit outdated, it does its job reasonably well.

Now I am looking to switch to ANTLRv4 for another DSL that I am creating. However, Eclipse support seems to be extremely thin. I decided to try out ANTLRWorks, which is a NetBeans plugin, but I could not get it to install (it seems to be locked to specific dated versions (201302132200 while I have something newer, still 7.3 as docs say) of dependencies).

So, the question: Has anyone set up any Java IDE (preferably Eclipse, but I could be persuaded to switch if support is good for something else) to integrate with ANTLR? With integrate, I mean: code generate on save/keyboard shortcut and syntax coloring (at the very least). Code completion and other features are of course nice to have, but I could live without them for now.

I am well aware of Xtext and I have had great success using it for some projects, but unfortunately it does not fit the needs here (need no IDE support, need my own DSL model not based on ECore, etc).

I know ANTLRWorks can be run as a standalone application without a Java IDE, but that I consider to be a last-resort solution as it is extremely cumbersome to work this way (switch between application, files out of sync, no VCS support etc). I tried the other way around: to install the Java parts into ANTLRworks (which itself is a NetBeans distro), but it did not end well (it seems basic project support etc was stripped out of ANTLRworks).

解决方案

Antlr4 plugin for Eclipse is here:

https://github.com/jknack/antlr4ide

这篇关于ANTLR和Eclipse(或任何体面的IDE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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