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

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

问题描述

我已经使用 ANTLRv3IDE 插件在 Eclipse 中使用 ANTLR 有一段时间了.虽然它并不完美,也有点过时,但它的工作做得相当不错.

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.

现在我想为我正在创建的另一个 DSL 切换到 ANTLRv4.但是,Eclipse 支持似乎非常薄弱.我决定试用 ANTLRWorks,它是一个 NetBeans 插件,但我无法安装它(它似乎被锁定到特定的过时版本(201302132200,而我有更新的东西,仍然是 7.3,如文档所说)依赖项).

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).

那么,问题是:有没有人设置任何 Java IDE(最好是 Eclipse,但如果支持对其他东西有好处,我可能会被说服切换)以与 ANTLR 集成?使用集成,我的意思是:在保存/键盘快捷方式和语法着色(至少)上生成代码.代码完成和其他功能当然很好,但我现在可以没有它们.

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.

我很了解 Xtext 并且我在一些项目中使用它取得了巨大的成功,但不幸的是它不适合这里的需求(不需要 IDE 支持,需要我自己的不基于 ECore 的 DSL 模型等).

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).

我知道 ANTLRWorks 可以在没有 Java IDE 的情况下作为独立应用程序运行,但我认为这是最后的解决方案,因为以这种方式工作非常麻烦(在应用程序之间切换、文件不同步、没有 VCS支持等).我尝试了另一种方式:将 Java 部分安装到 ANTLRworks(它本身是一个 NetBeans 发行版)中,但结果并不好(似乎基本项目支持等已从 ANTLRworks 中剥离出来).

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 Eclipse 插件在这里:

Antlr4 plugin for Eclipse is here:

https://github.com/jknack/antlr4ide

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

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