Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editor generator for ANTLR grammars?

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

like image 752
the_dark_destructor Avatar asked Apr 12 '11 08:04

the_dark_destructor


People also ask

What does ANTLR generate?

ANTLR can generate lexers, parsers, tree parsers, and combined lexer-parsers. Parsers can automatically generate parse trees or abstract syntax trees, which can be further processed with tree parsers. ANTLR provides a single consistent notation for specifying lexers, parsers, and tree parsers.

Is ANTLR used in industry?

ANTLR is widely used, with over 1000 registered industrial and academic users in 37 countries. It has been ported to many popular systems such as the PC, Macintosh, and a variety of UNIX platforms; a commercial C++ front-end has been developed as a result of one of our industrial collaborations.

What language is ANTLR?

What is ANTLR? ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. Terence Parr is a tech lead at Google and until 2022 was a professor of data science / computer science at Univ.

Is ANTLR context free?

The input to ANTLR is a context-free grammar augmented with syntactic [14] and semantic predicates and embedded actions.


2 Answers

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.

like image 155
Sebastian Zarnekow Avatar answered Sep 19 '22 20:09

Sebastian Zarnekow


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.

like image 26
dschulten Avatar answered Sep 20 '22 20:09

dschulten