bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with debugging apparent error in parser


From: Carl D. Sorensen
Subject: Help with debugging apparent error in parser
Date: Thu, 7 Aug 2008 19:54:18 -0600

Dear LilyPond team,

As I developed the transposable fretboards, I have apparently run into an
error in the parser.

When \chordmode is done, it apparently leaves the parser in a fragile state.

Let me show some code:

%%%%%%%  Begin code

myDisplayMusic =
#(define-music-function (parser location music)
  (ly:music?)
  (display-scheme-music music)
  (make-music 'SequentialMusic 'void #t))


%\myDisplayMusic <c e g>  % Expression 1 -- no problem
\myDisplayMusic \chordmode{c}  % Expression 2  -- causes error

m = \relative c' { c d e}

\context Staff {
  \m
}

%%%%%%%% End code

If Expression 1 in the above code is uncommented, and expression 2 is
commented, the code compiles normally.

If Expression 1 is commented, and Expression 2 is uncommented, there is a
parse error:

parseerror.ly:14:0: error: syntax error, unexpected CHORD_MODIFIER

m = \relative c' { c d e}
parseerror.ly:17:2: error: unknown escaped string: `\m'

  \m
parseerror.ly:17:2: error: syntax error, unexpected STRING

  \m
parseerror.ly:16:0: error: errors found, ignoring music expression

\context Staff {



Even if Expression 1 is uncommented and follows Expression 2, I get the same
error.  It appears that the parser somehow gets stuck using chordmode
parsing.

I have no idea how to debug this problem.  Any suggestions?  Or can anybody
fix this?

Thanks,

Carl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]