]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3401: Parser error with void function in music list
authorDavid Kastrup <dak@gnu.org>
Thu, 6 Jun 2013 13:36:48 +0000 (15:36 +0200)
committerDavid Kastrup <dak@gnu.org>
Wed, 12 Jun 2013 07:55:21 +0000 (09:55 +0200)
commit965be3f44335981497d2fdc63226b990d56804bb
tree3552e285b6d3fed40393383ee3a0cb3d31f10e76
parentb9e0259194919d4d0b605ecbb360acd61ed8861b
Issue 3401: Parser error with void function in music list

Problem code fixed:

test =
   (symbol-list?))

{
  \test Symbol
}

This patch is sort of a so-so fix for the problem: for one thing,
embedded_scm_closed should not have been able to end in a symbol list
in the first place since parsing those requires lookahead for '.'.
The grammar has now been changed to use embedded_scm, and just backs
up in the case a scheme function/identifier returns a markup in lyrics
mode (which can then be assembled with duration and post-events into a
more complex music expression).  If parsing the source for the markup
required lookahead, the same error will be thrown.

But that use case of Scheme functions in Lyrics mode for generating
markups to be turned into lyric events is a lot more exotic than the
one triggering this issue.  The current fix at least results in
predictable behavior outside of using Lyrics mode, and in particular
for uses of define-void-function.
lily/parser.yy