Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!rutgers!ucla-cs!zen!ucbvax!decvax!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.compilers Subject: Re: Yacc poll summary (long) Message-ID: <710@ima.ISC.COM> Date: Mon, 14-Sep-87 12:00:33 EDT Article-I.D.: ima.710 Posted: Mon Sep 14 12:00:33 1987 Date-Received: Sun, 20-Sep-87 03:06:49 EDT Sender: johnl@ima.ISC.COM Reply-To: Pedz Thing Organization: Digital Lynx, Inc; Dallas, TX Lines: 25 Approved: compilers@ima.UUCP In-Reply-To: <707@ima.ISC.COM> I was mis-quoted in the Yacc poll and would like to clarify. In the example, a) statement : IF ( blah ) statement | IF ( blah ) stateement ELSE statement b) statement : IF ( blah ) thing thing : statement | statement ELSE statement version a does NOT produce a conflict while version b DOES. (This assumes that ELSE has been declared as the lowest precedence operator and has left associtivity.) This is opposite of that the article said. This indicates that the construct can be resolved intelegently if the conflict from version b is looked upon more as a macro substitution rather than a significant production. I do not know why this does not happen in the first place since all of the information about the precedence, etc is carried along. In terms of pratical problems, version b is often desirable to reduce code size and the amount of repeated code. -- Perry Smith a.k.a. (Pedz Thing) pedz@bobkat or {ti-csl,infotel}!pollux!bobkat!pedz -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request