comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: LALR parser question
Date: Fri, 3 May 2013 17:57:04 -0500
Date: 2013-05-03T17:57:04-05:00	[thread overview]
Message-ID: <km1fc3$jjm$1@munin.nbi.dk> (raw)
In-Reply-To: 85zjwc8khm.fsf@stephe-leake.org

"Stephen Leake" <stephen_leake@stephe-leake.org> 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.







  reply	other threads:[~2013-05-03 22:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 13:37 LALR parser question Stephen Leake
2013-04-28 14:43 ` Dmitry A. Kazakov
2013-04-30  1:19   ` Yannick Duchêne (Hibou57)
2013-04-30  2:03     ` John B. Matthews
2013-04-30  4:11       ` Yannick Duchêne (Hibou57)
2013-04-30 11:55         ` Peter C. Chapin
2013-04-30 13:14           ` john
2013-04-30 14:14             ` Dmitry A. Kazakov
2013-05-01 11:33             ` Peter C. Chapin
2013-04-30 16:06     ` Shark8
2013-04-30 17:15       ` Yannick Duchêne (Hibou57)
2013-04-30 17:51         ` Shark8
2013-04-30 18:52           ` Yannick Duchêne (Hibou57)
2013-05-01 12:31         ` Stephen Leake
2013-05-01 13:57           ` Shark8
2013-04-30 21:18       ` Dmitry A. Kazakov
2013-04-30 22:09         ` Shark8
2013-05-02  1:49 ` Randy Brukardt
2013-05-02  2:39   ` Yannick Duchêne (Hibou57)
2013-05-02 21:57     ` Randy Brukardt
2013-05-06 18:25     ` Oliver Kellogg
2013-05-03  9:45   ` Stephen Leake
2013-05-03 22:57     ` Randy Brukardt [this message]
2013-05-06  9:45     ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox