Re: How to handle operator of undefined associativity

Stephen Horne <sh006d3592@blueyonder.co.uk>
Fri, 07 May 2010 16:18:56 +0100

          From comp.compilers

Related articles
[3 earlier articles]
Re: How to handle operator of undefined associativity cr88192@hotmail.com (BGB / cr88192) (2010-05-01)
Re: How to handle operator of undefined associativity cfc@shell01.TheWorld.com (Chris F Clark) (2010-05-02)
Re: How to handle operator of undefined associativity gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-05-03)
Re: How to handle operator of undefined associativity cr88192@hotmail.com (BGB / cr88192) (2010-05-05)
Re: How to handle operator of undefined associativity gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-05-05)
Re: How to handle operator of undefined associativity cfc@shell01.TheWorld.com (Chris F Clark) (2010-05-06)
Re: How to handle operator of undefined associativity sh006d3592@blueyonder.co.uk (Stephen Horne) (2010-05-07)
Re: How to handle operator of undefined associativity pat@jantar.org (Patryk Zadarnowski) (2010-05-10)
Re: How to handle operator of undefined associativity alex.colvin@valley.net (mac) (2010-05-12)
Re: How to handle operator of undefined associativity gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-05-12)
| List of all articles for this month |
From: Stephen Horne <sh006d3592@blueyonder.co.uk>
Newsgroups: comp.compilers
Date: Fri, 07 May 2010 16:18:56 +0100
Organization: virginmedia.com
References: 10-04-073 10-05-017
Keywords: parse, design
Posted-Date: 09 May 2010 12:23:11 EDT

On Sun, 02 May 2010 15:58:06 -0400, Chris F Clark
<cfc@shell01.TheWorld.com> wrote:


>Associativity is a concept of binary operators, unary operators do not
>have (or need) associativity. They always associate inner-most to
>outer-most.


Hmmm...


In the expression "not not x", you might first evaluate "not not" -
presumably giving the identity operation - then apply the identity to
"x". That is, the "not" operator might be semantically a first-class
functional value.


Then again, is this the application of a unary operator, or of an
implicit binary operator? Despite superficial appearances, maybe the
latter - depends whether the word "not" is a grammatically a keyword
in a rule or a value identifier, I suppose, which may be independent
of the semantics.


Not really a real-world issue, I suspect.
[There are languages in which you can invent operators by composing existing
operators, but they have their own issues. -John]



Post a followup to this message

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