Export to GitHub

lilypond - issue #3488

Patch: lily/parser.yy: Use %pure-parser instead of %pure_parser


Posted on Aug 5, 2013 by Quick Lion

lily/parser.yy: Use %define api.pure instead of %pure_parser

%pure-parser would apparently still be supported by Bison 3.0, but it has been deprecated in Bison 2.6.2 already. It is not quite clear when the original %pure_parser (with underline instead of dash) has become deprecated: Bison 2 supports it still, Bison 3 doesn't.

However, we should probably make sure that GUB is fine with this: I don't know when the api.pure define was established and what Bison version we have in GUB.

http://codereview.appspot.com/12437044

Comment #1

Posted on Aug 5, 2013 by Quick Lion

(No comment was entered for this change.)

Comment #2

Posted on Aug 5, 2013 by Quick Lion

According to NEWS, #define api.pure existed since * Changes in version 2.3b (2008-05-27):

[...]

** The directive "%pure-parser" is now deprecated in favor of:

%define api.pure

which has the same effect except that Bison is more careful to warn about unreasonable usage in the latter case.

At the current point of time, I have no idea whether that covers GUB.

Comment #3

Posted on Aug 5, 2013 by Happy Wombat

Is there an easy way to check, or would we simply find out when I do a GUB build?

Comment #4

Posted on Aug 5, 2013 by Quick Lion

lilypond@googlecode.com writes:

No idea, but maybe somebody else knows.

Comment #5

Posted on Aug 5, 2013 by Happy Giraffe

GUB fetches the Bison 2.3 sources, so that would be too old, assuming that 2.3b was some development version that led to version 2.4 of Bison.

https://github.com/gperciva/gub/blob/master/gub/specs/bison.py

Comment #6

Posted on Aug 5, 2013 by Quick Lion

Cripes. Can we upgrade to 2.5 at least? That's the version in Ubuntu 13.04 so it has seen a lot of exposure for work on LilyPond. I suspect that newer versions would also be ok, but there is probably little incentive to rush here.

I can't imagine much of a problem with the requirements of 2.5 for building. Because of its role in bootstrapping, Bison tends to be pretty careful regarding portability.

Comment #7

Posted on Aug 5, 2013 by Quick Kangaroo

Patchy the autobot says: passes tests.

Comment #8

Posted on Aug 6, 2013 by Quick Lion

Use %pure-parser in order not to be stalled on GUB updates

http://codereview.appspot.com/12437044

Comment #9

Posted on Aug 6, 2013 by Quick Kangaroo

Patchy the autobot says: passes tests.

Comment #10

Posted on Aug 8, 2013 by Quick Kangaroo

Patch on countdown for August 11 - 06:00 GMT

Comment #11

Posted on Aug 11, 2013 by Quick Kangaroo

Patch counted down - please push

Comment #12

Posted on Aug 11, 2013 by Quick Lion

Pushed to staging as commit 2848a5e030f2fe38e4184e25c6b7df5aaad6489d Author: David Kastrup Date: Mon Aug 5 14:19:06 2013 +0200

Issue 3488: lily/parser.yy: Use %pure-parser instead of %pure_parser

While %pure-parser is already deprecated for Bison 3.0, it is still
supported as opposed to %pure_parser which has been removed altogether
in Bison 3.0.  The currently recommended form %define api.pure has
only become available with Bison 2.3b, and there are currently older
versions of Bison in use with LilyPond.  So the followup move of
replacing the already deprecated %pure-parser with %define api.pure is
left for a later point of time.

Silly as it is, the one-line change to %define api.pure will be left for a later time.

Comment #13

Posted on Aug 12, 2013 by Happy Camel

(No comment was entered for this change.)

Status: Verified

Labels:
Type-Maintainability Fixed_2_17_24