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]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.