Article View: comp.std.c
Article #3490Re: Multi-level break and elimination of GOTO
From: Andrew Dunbar
Date: Tue, 14 Nov 1995 00:39
Date: Tue, 14 Nov 1995 00:39
37 lines
1316 bytes
1316 bytes
Paul Long (plong@perf.com) wrote:
: 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.
:
do outer
{
} while ()
Can't be parsed (easily anyway)
do
{
} while outer ()
or
do
{
} outer while ()
can be
Andrew Dunbar
GPSoftware
Technical Details
Message-ID:
<488oge$bfb@news.mel.aone.net.au>Path:
arc1-ca.pugleaf.net!news.mel.aone.net.au!not-for-mailReferences:
<43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> <480eio$2uf@news0.rain.rg.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mel.aone.net.au!not-for-mail From: andrewd@agnus.livewire.com.au (Andrew Dunbar) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Multi-level break and elimination of GOTO Followup-To: comp.std.c,comp.lang.c Date: 14 Nov 1995 00:39:42 GMT Organization: Livewire Communications Message-ID: <488oge$bfb@news.mel.aone.net.au> References: <43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> <480eio$2uf@news0.rain.rg.net> NNTP-Posting-Host: agnus.livewire.com.au X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]