[antlr-interest] syntactic predicates and exceptions

Nigel Sheridan-Smith nbsherid at secsme.org.au
Thu Oct 20 21:59:48 PDT 2005


> -----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.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf

__try/__finally and __try/__except are definitely Microsoft extensions to C:

http://msdn.microsoft.com/library/en-us/vccelng/htm/key_s-z_4.asp
http://msdn.microsoft.com/library/en-us/vccelng/htm/key_s-z_5.asp

MS Windows also has its own exception handling mechanism, independent of the
source code language. 

http://msdn.microsoft.com/library/en-us/debug/base/raiseexception.asp

Nigel

--
Nigel Sheridan-Smith
PhD research student

Faculty of Engineering
University of Technology, Sydney
Phone: 02 9514 7946
Fax: 02 9514 2435



More information about the antlr-interest mailing list