lilypond-user
[Top][All Lists]
Advanced

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

Re: syntax highlighting in the doc, call for testers


From: Federico Bruni
Subject: Re: syntax highlighting in the doc, call for testers
Date: Mon, 02 Jan 2012 19:02:02 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111105 Thunderbird/8.0

Hi Harm,

thanks for your feedback.
Your example let me notice that I forgot that R (upper case) is a note as well, so I've updated the note_duration regexp.

Il 02/01/2012 15:58, Thomas Morley ha scritto:
I tested a file with a large scheme-definition.
In the attached file you may notice some inconsequences:

1. The scheme-functions of "IR 4. Scheme functions" aren't
high-lighted consistent:
     ly:grob? isn't colored and "ly:" never.

2. In #(define (center-note-column grob) (let* ...
     Some of the defined variables are colored some not.

Sory, that I can't do more than testing.


Scheme is the hardest part.
I don't have a solution for it. The problem is the conflict between single and multiline blocks. I must put the multiline regexp before the single line regexp, because the first has precedence. But I also need to distinguish them: they cannot have the same start delimiter.

Single line blocks can be:

\once \override Tie #'staff-position = #3.5
tempoWholesPerMinute = #(ly:make-moment 120 4)
tagline = \markup { \override #'(box-padding . 1.0) }

Start: #' or #(
End: ) or end of line

In your example the multiline blocks start with #( so the single line regexp applies. I might define #( as a multiline start delimiter, but then the single line instance (see tempoWholesPerMinute above) would break everything.

Also, tracking the end of that big block is not easy at all.

I think I've covered the most frequent and basic uses of scheme inside a lilypond file. Large scheme definitions are quite difficult for me.
If any regexp guru has a good idea, please share it here.


HTH,
   Harm

P.S. Great work so far!

Thanks!



reply via email to

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