[antlr-interest] Re: Summary of ANTLR Issues

Ric Klaren klaren at cs.utwente.nl
Fri Jul 11 04:56:15 PDT 2003


Hi,

On Thu, Jul 10, 2003 at 11:30:28PM -0000, lgcraymer wrote:
> Comments below.

Thanks!

> ....  This would probably mean that
> code would be generated for AST operations which might not be used;
> since they would mostly be get/set operators, they would be inline
> methods and cost nothing when not used.

I was more referencing to the cost of creating/deleting objects for
the construction of the AST. Anything not going through memory management
routines is a win.

> > Will the new codegenerator lose the (ab)use of exceptions for parsing ?
> > This eats cycles, and makes the binaries bigger in C++ mode. (And somewhat
> > prevents targetting old C)
>
> I don't know.  My guess is that Ter's template stuff will make it
> easier to write code generators, so this might become a target
> language issue.  [Right now, the XXXCodeGenerator.java files are so
> awful that you can't even consider such a paradigm shift for a target
> language.]  Exceptions are pretty natural for Java, but a late
> addition to C++.

Well in java it will be/is expensive as well (as someone pointed out
recently) AFAIK exception handling is expensive no matter how smart it is
implemented. Not sure how java will compare to C++ on this, will be mostly
implementation dependent. 

Actually the use of exceptions was the only thing I didn't really like
about antlr when switching to it from the cocktail toolbox. If we mimick
the codegen of cocktails ell LL(1) parser generator then we don't need to
use exceptions (other than for real parse errors).

> It will still be awhile.  I'm hoping that this will end up as an open
> source project with Ter as gatekeeper--with good design specs, the
> gatekeeper approach is a good way to take advantage of volunteer labor
> and still maintain consistency as to quality and appearance of
> developed code.

Looking at the past one 'gatekeeper' might not be enough. I agree that
having a set bunch of people guard the consistency/quality of the code is a
good idea (tm).

> Ter's still wrestling with the dilemma of "I want to write it myself so
> that ANTLR does not become a gawdawful mess" versus "I really don't have
> the time".  That's not an easy decision to make.

Sure isn't :/

> If we do go the open development route, we might see something by the
> middle of next year or earlier.

End of next year then ;)

How about grammar inheritance btw ?

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
 'And this 'rebooting' business? Give it a good kicking, do you?' 'Oh, no,
  of course, we ... that is ... well, yes, in fact,' said Ponder. 'Adrian
    goes round the back and ... er ... prods it with his foot. But in a
     technical way,' he added. --- From: Hogfather by Terry Pratchett.


 

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




More information about the antlr-interest mailing list