diff options
author | David Kastrup <dak@gnu.org> | 2016-07-04 10:08:41 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-07-11 08:12:20 +0200 |
commit | 7d7589bdf70cb227b032220bae87eda2045ccc8e (patch) | |
tree | f25be2e9568cb6ce0b605ae4251f8ad4772af3ca | |
parent | 9a7a86622af9ce0a8f36e0a6c1e08d8a54dd8e3c (diff) |
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.
-rw-r--r-- | lily/parser.yy | 8 |
1 files changed, 2 insertions, 6 deletions
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 |