ANTLR 3.0 released, language design tool

Discussions

News: ANTLR 3.0 released, language design tool

  1. 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?
  2. 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/
  3. 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.
  4. ANTLR - My impressions[ Go to top ]

    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
  5. ANTLR rocks[ Go to top ]

    Same goes for Hibernate. Since Hibernate3, our HQL/JPA-QL implementation was built using ANTLR, and we're very happy with the results.
  6. How does Antlr compare to JavaCC? What are its pros and cons compared to JavaCC?
  7. 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.
  8. 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
  9. The Documentation....[ Go to top ]

    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
  10. Re: The Documentation....[ Go to top ]

    Pragmatic book rocks.. buy it
  11. 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