[antlr-interest] Why doesn't ANTLRException inherit from std::exception?

Ric Klaren klaren at cs.utwente.nl
Thu Mar 11 08:14:04 PST 2004


Hi,

On Thu, Mar 11, 2004 at 03:51:40PM -0000, Magnar Nedland wrote:
> I just upgraded from antlr-2.7.1 to 2.7.2.
> Is there a reason why ANTLRException no longer inherits from
> std::exception? By using a standard interface the surrounding
> environment has a much easier time coping with the exceptions.

Because we can't mirror the signature of the what method for all antlr
exceptions. If I recall right this got a problem with some newer gcc
release I'm not 100% sure.

> Also, I think that the fact that you now have to instantiate an
> ASTFactory for your parser explicitly should be mentioned somewhere.

Should be some mention of it in the 2.7.2 docs/cpp-runtime.html. Although I
clarified it a bit since then.

> Ideally the constructor should require it by reference, so a legal
> ASTFactory is guaranteed.

Good point.

You might want to check out the 2.7.3 prereleases they're already superior
to 2.7.2 in bugs fixed etc. and various config problems.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  Chaos is found in greatest abundance wherever order is being sought.
  --- Terry Pratchet



 
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