Editor generator for ANTLR grammars?
Asked Answered
T

2

9

I'm using ANTLR for creating a new general purpose programming language and I'm quite happy with it.

Due to the fact that I would like to provide good tools for ease the development of programs written with my language I'm starting to thinking on realising a editor for that language through a proper Eclipse plugin.

Is there any tools/project that allow you to have a fully-fledged editor (with syntax highlighting, code completion, etc.). I know that Xtext allow you to do this in automatic, what about ANTLR?

I've seen this mail to the ANTLR mailing list but it has no answers

Template answered 12/4, 2011 at 8:55 Comment(2)
Xtext uses ANTLR under the hoodBiforked
I know that. What I'm asking is if exists any tool that starting from a ANTLR grammar allows you to generate a editor plugin for eclipse (like what is doina Xtext). Is anything like that existing for ANTLR or not?Template
A
5

I'd give Xtext a try. It does not provide all the features of Antlr on the grammar level, but the framework offers great infrastructure components such as a tight integration with the Eclipse modeling components and the Eclipse UI.

Aqueduct answered 27/4, 2011 at 20:26 Comment(2)
many thanks. I will do it for sure. It seems that my grammar is not so complex, so translating it in Xtext will be no so troublesome. However it seems that no automated support for doing the same job starting from an ANTLR grammar exists.Template
It is hardly possible to transform an Antlr grammar to Xtext automatically. The Xtext grammar contains more information such as the mapping of concrete syntax elements to type-safe abstract syntax elements. Those cannot be extracted / inferred from a plain Antlr grammar. However, pasting your grammar into a newly created Xtext grammar and solving the automatically identified issues is usually not too painful.Aqueduct
S
3

Monticore almost seems to do what you (and I) hope for. In their Message Sequence Chart example there is an Eclipse Editor, it is an Eclipse Sample project. I am currently looking into it. Monticore is based upon antlr and the grammar looks quite similar to ANTLRs.

Shumway answered 6/9, 2012 at 6:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.