[antlr-interest] Re: Constructing trees and building forests...

lgcraymer lgc at mail1.jpl.nasa.gov
Thu Jul 29 00:40:18 PDT 2004


It was too unsanitary to jump in earlier, but I'll jump in here.  


--- In antlr-interest at yahoogroups.com, iank at b... wrote:
... 
>   From my point of view, trees are secondary.  Building trees is not
>   that hard.  Writing parsers by hand is.  So the "juice" provided by
>   ANTLR is that it helps with the most difficult part of parser
>   construction.

I think that you'll change your view on trees with ANTLR 3 (or 2.8
when I finally get permission to release--the wheels are grinding much
too slowly).  The issue is not difficulty (I can write repetitive
code, too), it's development time and lack of defects.  My experience
is that I can cut tree and tree grammar development time down to two
hours for a 500 line parser grammar with the aid of the tree
construction and tree grammar generation support.

With output templates, tree construction syntax, and automated tree
grammar generation (as well as Ter's LL(*, restoration of semantic
predicate hoisting, and token stream rewrite engine), the turnaround
time for ANTLR 3 language processors will be much reduced over ANTLR
2--I'll be very disappointed if we get less than a factor of 3
improvement in development time for typical problems.  If the student
that Ter is expecting is as good as he seems on paper, we can add in
workbench support and hopefully get closer to a factor of 10--visual
tools can make a difference.

That said, I also have to point out that one of the goals of ANTLR 3
is rapid backend development for new languages.  That means that the
ANTLR syntax should not be extended too far.  Given the Java and C++
support for hash tables and other indexed data structures (and the
lack in other languages), I do not see any point for adding syntax
support for symbol tables; however, auomatic node class generation and
a "decoration" syntax (setting user-defined fields in AST nodes) has a
low enough implementation cost and high enough return to be
worthwhile.  The idea of embedding a full language into a language
translation system--like Elegant--would get a little too far from the
targeting goals.

>   Of course it's easy for me to say...  Terence, Loring and others are
>   doing all the work.  Those who write the code get to call the
>   shots.  And, as always, I deeply appreciate the work that has gone
>   into ANTLR.

Don't back off so quickly!  We have ambitious enough goals that new
ideas are welcome--they may not be adopted, but they will certainly be
listened to.  In fact, that's why Ter started the thread that spawned
this one ...

--Loring

>   Ian



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list