Article View: comp.std.c
Article #3470Re: Multi-level break and elimination of GOTO
From: Paul Long
Date: Fri, 10 Nov 1995 21:01
Date: Fri, 10 Nov 1995 21:01
24 lines
1517 bytes
1517 bytes
Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
[snip]
>Writing it as:
>
>do outer
>{
>} while ()
>
>seems to be most consistent with the other constructs.
It's hard to parse. As an experiment, awhile back I added Andrew's
label to a YACC grammar for Standard C. YACC reported an ambiguity
with a label after the "do." I believe it had something to do with
YACC not having enough lookahead. For example, the grammar could
probably be expressed with an LALR(2) YACC.
As I've said before, though, I don't think labeled loops should be
added to C.
--
Paul Long 45:29:14N 122:48:09W
plong@perf.com http://www.teleport.com/~pciwww/
"Where time or intelligence are lacking, a goto may do the job."
- M.E. Hopkins, "A Case for the GOTO," 1972.
Technical Details
Message-ID:
<480eio$2uf@news0.rain.rg.net>Path:
arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenetReferences:
<43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!usenet.eel.ufl.edu!pacifier!rainrgnews0!usenet From: Paul Long <plong@perf.com> Newsgroups: comp.std.c,comp.lang.c Subject: Re: Multi-level break and elimination of GOTO Date: 10 Nov 1995 21:01:12 GMT Organization: Performance Computing Incorporated Message-ID: <480eio$2uf@news0.rain.rg.net> References: <43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> NNTP-Posting-Host: yosemite.perf.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.1 sun4c) X-URL: news:815950407snz@genesis.demon.co.uk