问题描述
我一直在为一种新语言开发编译器.我认为能够在语法感知环境中展示它的开发会很好.该语言有不少自定义关键字,其结构与Java或C/C++等常见语言有很大不同.
I've been developing a compiler for a new language. I thought it would be neat to be able to demonstrate its development in a syntax aware environment. The language has quite a few custom keywords, and its structure is significantly different than common languages such as Java or C/C++.
如何为 Eclipse 开发自定义语法高亮?我看过一些对一些插件的引用,但文档对于我初学者的需求来说不够全面.
How can I develop a custom syntax highligher for Eclipse? I've seen some references to a few plugins, but the documentation is not thorough enough for my beginner's needs.
我有我的语言的语法/RE,以及相关关键字的列表.
I have a grammar/REs for my language, as well as lists of relevant keywords.
推荐答案
Eclipse 框架使用一个相当复杂的文档模型来做语法着色(他们称之为着色,不是高亮),它不像其他的那么简单编辑.
The Eclipse framework uses a fairly complex document model to do syntax coloring (they call it coloring, not highlighting), it is not as simple as it is in other editors.
如果您真的想尝试并弄乱它,您可能需要阅读 Eclipse 插件开发者指南中的以下内容.
If you really want to try and mess with it, you may want to read the following from the Eclipse plug-in developer guide.
(上面的链接现在已经失效了.这可能是一个类似的文件或这个.)
这篇关于如何创建自定义 Eclipse 语法荧光笔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)