Re: operator priorities, was Dangling else (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
14 Mar 2006 00:49:29 -0500

          From comp.compilers

Related articles
Re: Dangling else (SM Ryan) (2006-02-24)
Re: Dangling else (Russ Cox) (2006-02-24)
Re: Dangling else (2006-03-05)
Re: Dangling else (Marco van de Voort) (2006-03-11)
Re: operator priorities, was Dangling else (2006-03-14)
| List of all articles for this month |

From: (=?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 <> writes:

> On 2006-03-05, Henry Spencer <> 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.


Post a followup to this message

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