如何创建一个自定义Eclipse语法荧光笔 [英] How can I create a custom Eclipse Syntax Highlighter

查看:124
本文介绍了如何创建一个自定义Eclipse语法荧光笔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为一种新的语言开发编译器。我认为能够在语法感知环境中证明其发展是很整洁的。该语言具有相当多的自定义关键字,其结构与常用语言(如Java或C / C ++)显着不同。



如何开发自定义语法蚀?我看到一些插件的引用,但是文档对于初学者的需求来说还不够彻底。



我有一个语法/ RE用于我的语言作为相关关键字的列表。

解决方案

Eclipse框架使用相当复杂的文档模型来进行语法着色(他们称之为着色,不是突出显示),它并不像其他编辑那么简单。



如果你真的想尝试和混淆,你可能想要阅读以下从Eclipse插件开发人员指南



(以上链接现在已经死了。这可能是一个类似的文档。)


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

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.

I have a grammar/REs for my language, as well as lists of relevant keywords.

解决方案

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.

If you really want to try and mess with it, you may want to read the following from the Eclipse plug-in developer guide.

(The above link is now dead. This may be a similar document or this.)

这篇关于如何创建一个自定义Eclipse语法荧光笔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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