Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2146

Re: Why do some versions of bison require {} here?

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From Kaz Kylheku <157-073-9834@kylheku.com>
Newsgroups comp.compilers
Subject Re: Why do some versions of bison require {} here?
Date Fri, 4 Jan 2019 03:02:33 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 18
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <19-01-004@comp.compilers> (permalink)
References <19-01-001@comp.compilers> <19-01-003@comp.compilers>
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="5583"; mail-complaints-to="abuse@iecc.com"
Keywords yacc, debug
Posted-Date 05 Jan 2019 09:07:56 EST
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:2146

Show key headers only | View raw


On 2019-01-03, Philipp Klaus Krause <pkk@spth.de> wrote:
> Am 01.01.19 um 10:55 schrieb Philipp Klaus Krause:
>> [Adding the empty action forces bison to reduce the rule rather than just
>> shifting and saving state for later.  I couldn't guess why that would matter
>> in this case.  Are there precedence rules?  With your change does the grammar compile
>> cleanly or does it have conflicts? -John]
>>
>
> Well, for me (but I don't see the problem without the {} on my system -
> GNU bison 3.2.2 on Debian GNU/Linux), both with and without {}, when using
> LANG=C bison -W -y -d SDCC.y
> I get 7 warning about "empty rule without %empty", but no other
> warnings. The people reporting issues seem to be using GNU bison on
> Microsoft Windows.

Another thing to look at: does it make any difference the generated .c and .h
files. (And if so, what is the difference in the y.output produced by
the -v option).

Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Why do some versions of bison require {} here? Philipp Klaus Krause <pkk@spth.de> - 2019-01-01 10:55 +0100
  Re: Why do some versions of bison require {} here? Kaz Kylheku <157-073-9834@kylheku.com> - 2019-01-02 19:29 +0000
  Re: Why do some versions of bison require {} here? Philipp Klaus Krause <pkk@spth.de> - 2019-01-03 09:15 +0100
    Re: Why do some versions of bison require {} here? Kaz Kylheku <157-073-9834@kylheku.com> - 2019-01-04 03:02 +0000

csiph-web