[antlr-interest] Build Question

Ric Klaren klaren at cs.utwente.nl
Tue Mar 12 07:23:13 PST 2002


Hi,

On Tue, Mar 12, 2002 at 09:47:59AM -0500, Tiller, Michael (M.M.) wrote:
> I was hoping to support both Java and C++ for future development.  It seems
> like this is impractical for the following reasons:
>
> 1) Trying to write a language independent way comment rule that "eats"
> comments doesn't seem possible.

In current antlr you can plainly forget it to write language independent
stuff without reverting to hackery.

> 2) Perhaps for misguided reasons, I'd like to be able to add "child" nodes
> to my AST during tree construction.  It isn't clear to me how that can be
> done in a language neutral way.  It would be nice if ANTLR's tree
> construction shorthand were extended to allow this.

Maybe the fabled new AST construction stuff will make this possible.

> 3) The target language has to be specified in the grammar (couldn't this be
> a command line option?)

You never talked to Ter about commandline options did you ;) There's more
of these things I personally would like to see as commandline options,
#line generation options stuff like that. Antlr is because of this quite
'make' unfriendly.

Also building different configurations without getting dirty is because of
this a problem. I'd love commandline options. Terence refuses (I'm told a
pccts trauma ;) ).

> 4) The difficulties with trying to do grammar inheritance (see below).

> This isn't really criticism (ANTLR is a great tool).  Consider it ideas for
> future releases.  

ANTLR's pretty great, but it isn't perfect..

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
 Why don't we just invite them to dinner and massacre them all when they're
  drunk? You heard the man. There's seven hundred thousand of them. Ah? ..
           So it'd have to be something simple with pasta, then.
                 From: Interesting Times by Terry Pratchet


 

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



More information about the antlr-interest mailing list