-
ANTLR 3.0 released, language design tool (10 messages)
- Posted by: Joseph Ottinger
- Posted on: May 18 2007 08:27 EDT
Terrence Parr has released ANTLR 3.0, a Java parser and code generator under the BSD license, featuring retargetable code generation, new mechanisms for building syntax trees, and a new mechanism for handling lookaheads - instead of having to specify the number of lookaheads, ANTLR 3.0 can look ahead at arbitrary depths. Frank Sommers has an excellent (although short) interview with Terrence Parr on Artima. ANTLR is a good tool to help generate domain-specific languages, since it can emit arbitrary code (Java, C#, C++, etc). ANTLR is one of the two most popular compiler compilers (as they're known) for Java, along with JavaCC. If you've used them, which do you prefer, and why?Threaded Messages (10)
- Re: ANTLR 3.0 released, language design tool by Mark Proctor on May 18 2007 10:23 EDT
- Re: ANTLR 3.0 released, language design tool by Miguel Ping on May 22 2007 06:17 EDT
- ANTLR - My impressions by venkataramana madugundu on February 01 2008 05:47 EST
- ANTLR rocks by Gavin King on May 18 2007 11:44 EDT
- How does it compre to JavaCC? by Behrang Saeedzadeh on May 18 2007 20:20 EDT
- Re: How does it compre to JavaCC? by Mark Proctor on May 18 2007 22:36 EDT
- Re: How does it compre to JavaCC? by ugo landini on May 22 2007 07:06 EDT
- Re: How does it compre to JavaCC? by Mark Proctor on May 18 2007 22:36 EDT
- The Documentation.... by Joe Fawzy on May 19 2007 15:28 EDT
- Re: The Documentation.... by Elijah Epifanov on May 22 2007 10:38 EDT
- Re: ANTLR 3.0 released, language design tool by Richard Burton on May 23 2007 17:12 EDT
-
Re: ANTLR 3.0 released, language design tool[ Go to top ]
- Posted by: Mark Proctor
- Posted on: May 18 2007 10:23 EDT
- in response to Joseph Ottinger
Congratualations Terence, Antlr 3 has been a god send for JBoss Rules allowing us to quickly build very rich grammar for our language; Antlr Works has also proven to be an invaluable tool. Hopefully Antlr 3.0 will encourage more people to write their own domain specific languages now, rather than use xml. Mark Proctor JBoss Rules Lead http://markproctor.com/ -
Re: ANTLR 3.0 released, language design tool[ Go to top ]
- Posted by: Miguel Ping
- Posted on: May 22 2007 06:17 EDT
- in response to Mark Proctor
I've been using antlr for a small project of mine which envolves parsing SQL. SQL is highly ambiguous, but my feeling is that antlr3 provides me with everything i need, and just let me focus with the details of the grammar. Antlrworks also makes a valuable addition to antlr tools, since it provides visualization for grammars, debugging, and syntax coloring. In sum, a great tool, and even greater with antlrworks. -
ANTLR - My impressions[ Go to top ]
- Posted by: venkataramana madugundu
- Posted on: February 01 2008 05:47 EST
- in response to Mark Proctor
Many thanks to Terence for the excellent book on ANTLR. We are porting a fairly decent object oriented language (which is model aware) written in lex/yacc to ANTLR. The first advantage with ANTLR is the debuggability of generated parser for resolving any ambiguities/conflicts etc., The LL grammar lends itself to clear understandability as it is top down (the way humans would parse). Though we are not using ANTLR's tree building capabilities, it has been fairly easy for us to come up with parse actions to hand-build the AST. All the help needed is in the book "The Definitive ANTLR Reference". Do a quick scan and try out sample expression interpreter at http://www.antlr.org/wiki/display/ANTLR3/Expression+evaluator Also check http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required Overall, I would say we are quite indebted to Terence Parr for his excellent work on LL(*) parser generator. Thanks Venkat -
ANTLR rocks[ Go to top ]
- Posted by: Gavin King
- Posted on: May 18 2007 11:44 EDT
- in response to Joseph Ottinger
Same goes for Hibernate. Since Hibernate3, our HQL/JPA-QL implementation was built using ANTLR, and we're very happy with the results. -
How does it compre to JavaCC?[ Go to top ]
- Posted by: Behrang Saeedzadeh
- Posted on: May 18 2007 20:20 EDT
- in response to Joseph Ottinger
How does Antlr compare to JavaCC? What are its pros and cons compared to JavaCC? -
Re: How does it compre to JavaCC?[ Go to top ]
- Posted by: Mark Proctor
- Posted on: May 18 2007 22:36 EDT
- in response to Behrang Saeedzadeh
I find the antlr grammar to be much more readable and easier on the eyes, the AntlrWorks tooling makes development far more productive than editing JavaCC in a text editor. I also think that Antlr 3.0 has now become more powerful in it's parsing capabilities. I've no idea on performance comparisons and Antlr requires a small runtime dependency, which JavaCC does not. -
Re: How does it compre to JavaCC?[ Go to top ]
- Posted by: ugo landini
- Posted on: May 22 2007 07:06 EDT
- in response to Mark Proctor
I find the antlr grammar to be much more readable and easier on the eyes, the AntlrWorks tooling makes development far more productive than editing JavaCC in a text editor. I also think that Antlr 3.0 has now become more powerful in it's parsing capabilities. I've no idea on performance comparisons and Antlr requires a small runtime dependency, which JavaCC does not.
I wrote small interpreters both in javacc and in antlr. Antlr3 is quite superior in my opinion: to effectively use javacc I had to use a visitor AND modify some of the generated classes. In Antlr is really a piece of cake, and you absolutely do not need to modify code. You can do all you need staying in antlr. And don't forget antlrworks! uL -
The Documentation....[ Go to top ]
- Posted by: Joe Fawzy
- Posted on: May 19 2007 15:28 EDT
- in response to Joseph Ottinger
Antlr v2 was excellent at documentation which made me go up to speed with it,but v3 seems to provide the docs as the published pragmatic book (not free ) and no real documentation on the site can anyone tell if this gonna change as i really wanna change to v3 -
Re: The Documentation....[ Go to top ]
- Posted by: Elijah Epifanov
- Posted on: May 22 2007 10:38 EDT
- in response to Joe Fawzy
Pragmatic book rocks.. buy it -
Re: ANTLR 3.0 released, language design tool[ Go to top ]
- Posted by: Richard Burton
- Posted on: May 23 2007 17:12 EDT
- in response to Joseph Ottinger
I recently purchased the book after reading this posting and found it *well* worth my money. Not only is this book well structured, but easy to read. If you're looking to create a DSL or custom scripting language, this book is a must. Good job on the book and excellent job on ANTLR. It's about time someone wrote a book on ANTLR or JavaCC! Now I can't wait until we have one on Mule! Best Regards, Richard L. Burton III