How can I create a custom Eclipse Syntax Highlighter

后端 未结 5 1754
猫巷女王i
猫巷女王i 2020-11-30 04:08

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 q

5条回答
  •  长情又很酷
    2020-11-30 04:34

    Sounds like you are dealing with a DSL (Domain Specific Language). What you are looking for sounds exactly like XText. Here's an extract from the page:

    Xtext is a framework/tool for development of external textual DSLs. Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse Text Editor from that.

    Also, check out this video which is an interview with one of the people behind it. I'm sure you'll take it from here :-)

    You may also want to check out this plugin. Not exactly what you are looking for, but could be a nice start.

提交回复
热议问题