]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4917: Remove some set_location calls from parser
authorDavid Kastrup <dak@gnu.org>
Mon, 4 Jul 2016 08:08:41 +0000 (10:08 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 11 Jul 2016 06:12:20 +0000 (08:12 +0200)
Older versions of Bison (current is 3.0.4) had problems assigning
location data to rules with empty production, possibly related to the
definition of YYLLOCA_DEFAULT when N is zero.

This lead to several workarounds in the code base.  A number of them
dropped through the floor in the course of refactoring without
apparent problem, and the original problem does not appear to be
reproducible with the current versions of Bison.

This removes the remaining instances.  Should the original problem
reoccur at some point of time (or with some versions of Bison), it
would be noticeable as bad point-and-click messages and/or error
messages with bad location data.

lily/parser.yy

index 2accdb1eb75613256ab9012ac3b3cf7cb92717ca..159786b93c1dbc13268e72140f1cf7a485996177 100644 (file)
@@ -2942,15 +2942,11 @@ event_chord:
                }
        } %prec ':'
        | CHORD_REPETITION optional_notemode_duration post_events {
-               Input i;
-               i.set_location (@1, @3);
-               $$ = MAKE_SYNTAX (repetition_chord, i,
+               $$ = MAKE_SYNTAX (repetition_chord, @$,
                                  $2, scm_reverse_x ($3, SCM_EOL));
        } %prec ':'
        | MULTI_MEASURE_REST optional_notemode_duration post_events {
-               Input i;
-               i.set_location (@1, @3);
-               $$ = MAKE_SYNTAX (multi_measure_rest, i, $2,
+               $$ = MAKE_SYNTAX (multi_measure_rest, @$, $2,
                                  scm_reverse_x ($3, SCM_EOL));
        } %prec ':'
        | tempo_event