Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Dmitry A. Kazakov" Newsgroups: comp.compilers Subject: Re: precedences vs. hierarchy Date: Mon, 6 Jun 2016 17:08:10 +0200 Organization: Aioe.org NNTP Server Lines: 17 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-06-004@comp.compilers> References: <16-06-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="23601"; mail-complaints-to="abuse@iecc.com" Keywords: parse Posted-Date: 07 Jun 2016 10:54:04 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1710 On 06/06/2016 09:08, Andreas Schramm wrote: > for specifying the syntax of operator expressions > with multiple levels of precedences, > there are essentially two approaches: > (i) by precedence and associativity declarations, and > (ii) by a hierarchy of non-terminals. (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. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de