[antlr-interest] "finally" blocks

Terence Parr parrt at cs.usfca.edu
Mon Jan 17 14:56:41 PST 2005


On Jan 17, 2005, at 2:41 PM, Bryan Ewbank wrote:

> "finally" can be implemented in C the same way the "exceptions" can be
> - without setjmp/longjmp, but with control flow such as a dummy
> do{...}while(0) statement, and a following switch to manage
> exceptions.
>
> No big deal (he says, not having to implement it :-)

LOL

Heh, cool idea.  How does this make sure nobody does a "return" in the 
middle of the code though w/o doing the finally bit?

Thanks,
Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





More information about the antlr-interest mailing list