]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3554: Avoid empty grammar rules using @$ for getting a source location
authorDavid Kastrup <dak@gnu.org>
Sun, 15 Sep 2013 09:01:06 +0000 (11:01 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 15 Sep 2013 09:58:30 +0000 (11:58 +0200)
commit6b79234fbfe9400cac355a7b3d7da90532d82522
tree3ef7bf349a4e019ddaf251453fbac393ab32947d
parentb31d2d00b7693b32197da28de2fdb9e3069d7bbc
Issue 3554: Avoid empty grammar rules using @$ for getting a source location

Several rules use @$ for getting the source position from an empty
rule, but Bison does not even provide a source position for empty
rules.

This patch fixes most cases by letting different non-empty rules
assign the respective source positions.  The case of #{ #} cannot be
fixed in that manner since there is not a single token providing a
source position in the whole production.  Fixing this particular case
would require a different technique.
lily/parser.yy