Re: precedences vs. hierarchy

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Tue, 7 Jun 2016 22:53:56 +0200

          From comp.compilers

Related articles
precedences vs. hierarchy bassobajo@gmail.com (Andreas Schramm) (2016-06-06)
Re: precedences vs. hierarchy mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2016-06-06)
Re: precedences vs. hierarchy gneuner2@comcast.net (George Neuner) (2016-06-06)
Re: precedences vs. hierarchy federation2005@netzero.com (2016-06-06)
precedences vs. hierarchy slkpg4@gmail.com (SLK Mail) (2016-06-07)
Re: precedences vs. hierarchy 545-066-4921@kylheku.com (Kaz Kylheku) (2016-06-07)
Re: precedences vs. hierarchy mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2016-06-07)
Re: precedences vs. hierarchy anton@mips.complang.tuwien.ac.at (2016-06-08)
| List of all articles for this month |
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: Tue, 7 Jun 2016 22:53:56 +0200
Organization: Aioe.org NNTP Server
References: 16-06-001 16-06-004 16-06-008
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="5675"; mail-complaints-to="abuse@iecc.com"
Keywords: parse
Posted-Date: 07 Jun 2016 17:19:37 EDT

On 2016-06-07 17:35, Kaz Kylheku wrote:


>> (iii) By only precedence, which I prefer. Associativity is not needed if
>> operator precedence is split into the left and right ones. That allows
>> to express any associativity, unary operators included.
>
> What?
>
> You need the concept of associativity to tell whether
> A + B + C is (A + B) + C or A + (B + C).


No [explicit] associativity needed. You have left and right operator's
precedence instead. If you want


        A + B + C |= (A + B) + C


you do +'s left precedence L and right precedence R > L. E.g. 1,2. If
you wanted A + (B + C). You would use 2,1.


The idea is that the ordering depends the operator's side.


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Post a followup to this message

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