[antlr-interest] syntactic predicates and exceptions

Sohail Somani sohail at taggedtype.net
Thu Oct 20 22:07:26 PDT 2005


On Fri, 2005-21-10 at 14:59 +1000, Nigel Sheridan-Smith wrote:
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Sohail Somani
> > Sent: Friday, 21 October 2005 1:39 PM
> > To: Gerrit E.G. Hobbelt
> > Cc: ANTLR Interest
> > Subject: Re: [antlr-interest] syntactic predicates and exceptions
> > 
> > On Fri, 2005-21-10 at 02:02 +0200, Gerrit E.G. Hobbelt wrote:
> > > From: "Terence Parr" <parrt at cs.usfca.edu>
> > > > in that error clause. :(  I suppose try/finally is the answer.  What
> > > > about C++?  Gotos?
> > >
> > > Can't quote chapter and verse, but the latest ISO C/C++ standards define
> > > try/finally (Microsoft: __try/__finally). 
> > 
> > I don't think this is standard  at all. You might be thinking about C++
> > extensions that Microsoft has proposed for ISO. This is distinct from
> > the C++ standard.
> > 
> 
> Searching for 'try', 'finally' and 'catch' in the latest standard (2004)
> leads to zip. Searching for 'except' only pulls up information about
> floating-point exceptions.

In a nutshell, finally is only needed for garbage collected languages.
You want to release resources after you leave scope, use a destructor.



More information about the antlr-interest mailing list