Re: operator priorities, was Dangling else

torbenm@app-4.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
14 Mar 2006 00:49:29 -0500

          From comp.compilers

Related articles
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 henry@spsystems.net (2006-03-05)
Re: Dangling else marcov@stack.nl (Marco van de Voort) (2006-03-11)
Re: operator priorities, was Dangling else torbenm@app-4.diku.dk (2006-03-14)
| List of all articles for this month |
From: torbenm@app-4.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
Newsgroups: comp.compilers
Date: 14 Mar 2006 00:49:29 -0500
Organization: Department of Computer Science, University of Copenhagen
References: 06-02-154 06-02-168 06-03-008 06-03-023
Keywords: parse
Posted-Date: 14 Mar 2006 00:49:29 EST

Marco van de Voort <marcov@stack.nl> writes:


> On 2006-03-05, Henry Spencer <henry@spsystems.net> wrote:
> >
> > Bear in mind, though, that attempts to reduce the number of levels have
> > often been found equally unsatisfactory. Pascal tried, and the result was
> > counterintuitive cases where certain parentheses, which everyone agrees
> > ought to be redundant, are in fact necessary.
>
> Could you give examples here? Are you refering to the experimental
> notations for exponentiation 2^(-1) in some dialects ?


I think Henry is referring to AND and OR having the same precedences
as * and +, so "x<y AND y<z" would be parsed as "x<(y AND y)<x", which
would be a parse error as "<" is non-associative.


                Torben


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.