As this thread suggested
https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00193.html

there is an issue with the parser when a symbol-list? predicate is used as a function argument and ly:parser-include-string in that function. As it turned out the problem is reproducible with very little effort, as you can see with the attached two files.

Obviously the symbol-list? predicate doesn't play well with ly:parser-include-string.

Some observations:

- it is not related to the \include command
as you can see from the two alternative strings passed to ly:parser-include-string - The error messages are very different depending on what comes after the function call - Obviously the problem is in determining when the symbol-list? is completed, i.e. in the look-ahead - In the (more complex) original context there are even other error messages. - when there is any Scheme expression (the #(display "") in the example, but a #(define foo 'bar) works just the same) parsing works properly but LilyPond statements cause the parser to fail
\version "2.19.18"

testDotListInclude =
#(define-void-function (parser location path)(symbol-list?)
   (ly:parser-include-string parser
     "\\include \"included.ily\""))
%     "#(ly:message \"\nThis message is done with ly:parser-include-string\n\n\")"))


\testDotListInclude path.to.whatever
% Use a proper list notation and everything is OK
%\testDotListInclude #'(path to whatever)

% Uncomment the following line and everything is OK
%#(display "")

% Uncomment any of the following (when the above is commented out)
% to get different (weird) errors
\markup "Anything"
%\relative c' { c }
%\transpose c e { c d e }
\version "2.19.18"

#(ly:message "This is from the included file")
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to