From: David Kastrup Date: Mon, 4 Jul 2016 08:08:41 +0000 (+0200) Subject: Issue 4917: Remove some set_location calls from parser X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7d7589bdf70cb227b032220bae87eda2045ccc8e;p=lilypond.git Issue 4917: Remove some set_location calls from parser 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. --- diff --git a/lily/parser.yy b/lily/parser.yy index 2accdb1eb7..159786b93c 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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