问题描述
我目前的项目着重于高级规范的代码生成。更具体地说,开发人员编写高级规范并编译解析它们并生成Java代码。对于解析器,我使用ANTLR语法和代码生成我已经使用StringTemplateFiles。
为了提供良好的编辑器支持(语法高亮度和着色),我已经使用了xText。
现在,真正的问题来了 - 我如何将xText编辑器支持与ANTLR解析器和代码生成器集成?我想为开发人员提供不错的eclipse插件。
我应该坚持使用xText并尝试解决集成问题吗?/我应该只使用ANTLR和StringTemplateFiles,并尝试创建Eclipse插件(我不知道 - 我该怎么做)?
其他替代建议也受到欢迎。
除了eclipse插件,Xtext还可以通过xtend生成Antlr解析器并支持基于模板的生成 - 为什么不专门使用它? / p>
My current project is focusing on code generation from High-level specification. More specifically, developers write high-level specifications and compiler parses them and generates Java code. For parser, I have used ANTLR grammar and for code generation I have used StringTemplateFiles.
For providing nice editor support (with syntax high lighting & coloring), I have used xText.
Now, the real problem comes - how can I integrate xText editor support with ANTLR parser and code generator? I want to provide nice eclipse plugin to developers.
Should I stick with xText and try to solve integration problem?/ Should I use only ANTLR and StringTemplateFiles and try to create Eclipse plugin out of it (I do not know - how can I do this)?
Other alternative suggestions are also welcomed.
Xtext generates Antlr parser and support template based generation via xtend in addition to the eclipse plugin - why not use it exclusively?
这篇关于ANTLR和Xtext集成开发插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!