开发者

Grammar editor utility for context-free grammars in Java

Is there any Grammar editor utilit开发者_如何学编程y for context-free grammars developed in Java?


The one I know about would be XText.
Might be a bit over-kill:

Xtext is a framework for development of programming languages and domain specific languages (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.

The DSL editor looks like:

alt text http://www.eclipse.org/Xtext/documentation/latest/images/getting-started-grammar.png

Allowing you to play with the language you just defined:

alt text http://www.eclipse.org/Xtext/documentation/latest/images/getting-started-editor.png


ANTLRWorks the GUI development environment for ANTLR is quite nice. I've used it with ease in the past.

http://www.antlr.org/works/index.html


I also found that:

http://ozark.hendrix.edu/~burch/proj/grammar/


If you prefer compiler built into your app without generating any source files, take a look at Parboiled: https://github.com/sirthias/parboiled

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜