From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4fd338e56f592cfb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.215.194 with SMTP id hf2mr19914429qab.0.1367621827927; Fri, 03 May 2013 15:57:07 -0700 (PDT) MIME-Version: 1.0 Path: y6ni5623qax.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: LALR parser question Date: Fri, 3 May 2013 17:57:04 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <85sj2aydwi.fsf@stephe-leake.org> <85zjwc8khm.fsf@stephe-leake.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1367621827 20086 69.95.181.76 (3 May 2013 22:57:07 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 3 May 2013 22:57:07 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-05-03T17:57:04-05:00 List-Id: "Stephen Leake" wrote in message news:85zjwc8khm.fsf@stephe-leake.org... ... > I'm fixing OpenToken; I'm asking if the OpenToken behavior for choice 1 > is a bug. You have not directly addressed that, but thanks for letting > me know someone is using LALR in a commercial product! Our grammar goes further than yours as it attempts to insert pragmas at appropriate places. For your purposes, you could globally replace pragma_option by nothing at all and I believe you would get the same results. (I certainly can't see how you would get an additional conflict by removing some syntax.) If you did that, you would get a grammar that looked very similar to the one you originally had as Choice 1. At least that was my thought process. One thing that is very important if to ensure that the empty production only appears in one level of your grammar; if not, you'll end up with a conflict because it won't be possible to tell which empty production to reduce. That's why we have the strangeness of a "program_option". Randy.