Related articles |
---|
Dangling else borneq@nborneq.nospam.pl (borneq) (2006-02-19) |
Re: Dangling else haberg@math.su.se (2006-02-19) |
Re: Dangling else wyrmwif@tsoft.org (SM Ryan) (2006-02-24) |
Re: Dangling else rsc@swtch.com (Russ Cox) (2006-02-24) |
Re: Dangling else rsc@swtch.com (Russ Cox) (2006-02-24) |
Re: Dangling else wyrmwif@tsoft.org (SM Ryan) (2006-03-05) |
Re: Dangling else wyrmwif@tsoft.org (SM Ryan) (2006-03-05) |
Re: Dangling else jvorbrueggen-not@mediasec.de (=?ISO-8859-1?Q?Jan_Vorbr=FCggen?=) (2006-03-05) |
Re: Dangling else henry@spsystems.net (2006-03-05) |
[16 later articles] |
From: | SM Ryan <wyrmwif@tsoft.org> |
Newsgroups: | comp.compilers |
Date: | 24 Feb 2006 09:37:27 -0500 |
Organization: | Quick STOP Groceries |
References: | 06-02-136 |
Keywords: | parse, syntax |
Posted-Date: | 24 Feb 2006 09:37:27 EST |
# But - how resolve conflict depends on operator precedence and left/right
# association? In nice site:htm:
# http://lambda.uta.edu/cse5317/notes/node21.html we have:
I have a silly suggestion--avoid the whole problem. The dangling-else
syntax problem was solved over 40 years ago. But apparently the one
time exercise of adding the extra productions is too burdensome, so
we must instead use ever more complicated rules for parser generators.
The first language with CF grammar specified, Algol-60, managed to
to show how to parse expressions according to precedence and
associativity by simply writing the rules a particular way. But again
this is too burdensome; instead it is better to add all these
obscure %xyzzy directives to parser generators.
Oh, god, pride of man
broken in the dust again.
--
SM Ryan http://www.rawbw.com/~wyrmwif/
A bunch of savages in this town.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.