From MAILER-DAEMON Sun Mar 04 13:30:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S4GCD-0007zW-9Y
	for mharc-help-source-highlight@gnu.org; Sun, 04 Mar 2012 13:30:13 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42339)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S4GCA-0007z2-08
	for help-source-highlight@gnu.org; Sun, 04 Mar 2012 13:30:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S4GC6-00032W-9E
	for help-source-highlight@gnu.org; Sun, 04 Mar 2012 13:30:09 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:40216)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S4GC5-0002y9-T4
	for help-source-highlight@gnu.org; Sun, 04 Mar 2012 13:30:06 -0500
Received: by eaal1 with SMTP id l1so1220296eaa.0
	for <help-source-highlight@gnu.org>;
	Sun, 04 Mar 2012 10:30:03 -0800 (PST)
Received-SPF: pass (google.com: domain of fedelogy@gmail.com designates
	10.213.6.203 as permitted sender) client-ip=10.213.6.203; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of fedelogy@gmail.com
	designates 10.213.6.203 as permitted sender)
	smtp.mail=fedelogy@gmail.com;
	dkim=pass header.i=fedelogy@gmail.com
Received: from mr.google.com ([10.213.6.203])
	by 10.213.6.203 with SMTP id a11mr1553531eba.154.1330885803193
	(num_hops = 1); Sun, 04 Mar 2012 10:30:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type; bh=eom82SdFNmxVL4u1HDS7NEm8jdG5o0/xKhOulcx8h/w=;
	b=ZU5DFzdw40T5k53BvZELpfxP9P+dyE2K+K1bIQt27FAnO/9MA1EctvNMIyZniuSNSW
	0ejDXwvbGd0tCScHqlvkOhmtZVZ7xoePlpwM7JNceMvCd/R2zEei8guHXN6Ujq6zpsK8
	/inJ1UXCNtZHSoyZ4P/m180AjjBu9lpwMjQ3U6Na4HFIWoskoCri4aJl28zzCUPrWfw6
	n/7nABYvwnUgCi7oosqiYqoGj8MGpIimFmXvjtQl6uPqXqMvpfaFdFIH1h66K3tFVDS9
	PkdklDF2kUVGw5f7XAVG4gwToROZPAwDJwc0cEBVF7DJjB3AlOwES7++Q/80Z7SDiv/H
	ewTw==
Received: by 10.213.6.203 with SMTP id a11mr1184169eba.154.1330885803067;
	Sun, 04 Mar 2012 10:30:03 -0800 (PST)
Received: from [192.168.1.130] (2-231-9-43.ip204.fastwebnet.it. [2.231.9.43])
	by mx.google.com with ESMTPS id d54sm5272786eei.9.2012.03.04.10.30.01
	(version=SSLv3 cipher=OTHER); Sun, 04 Mar 2012 10:30:02 -0800 (PST)
Message-ID: <4F53B69D.5080506@gmail.com>
Date: Sun, 04 Mar 2012 19:38:21 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: help-source-highlight@gnu.org
Content-Type: multipart/mixed; boundary="------------030506000005030504070803"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Subject: [Help-source-highlight] LilyPond language files completed
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 18:30:12 -0000

This is a multi-part message in MIME format.
--------------030506000005030504070803
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

find attached the files for the LilyPond language.
It's not perfect but it's a good start.

I didn't make a Git patch, including the changes needed in Makefile.am 
and lang.map
But I can do it, if you want me to.

BTW, I can't understand why Git "complains" about this "No newline at 
end of file":

-tml = tml.lang
\ No newline at end of file
+tml = tml.lang
+ly = lilypond.lang

I've googled a bit but I couldn't find any good answer.

Cheers,
Federico

--------------030506000005030504070803
Content-Type: text/plain;
 name="lilypond.lang"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="lilypond.lang"

# LilyPond v2.16.0

string delim "\"" "\"" multiline

comment delim "%{" "%}" multiline nested
comment start "%"

# Scheme
environment scheme delim '#\'?\(' ")" multiline nested begin
  string delim "\"" "\"" multiline
  comment start ";"
  environment scheme delim "(" ")" multiline nested begin
    string delim "\"" "\"" multiline
    comment start ";"
  end
end

vardef SCHEME_VALUE = '##(t|f)', '#{1,2}\'?[[:alnum:]\.:+-]+'
scheme_value = $SCHEME_VALUE


# Symbols
vardef CBRACKET = "{|}|<<|>>"
cbracket = $CBRACKET

symbol = "(|)|~|^|_"
dynamic = '\\(<|>|!|f{1,5}|p{1,5}|m(f|p)|fp|(r|s)fz|s(f|p){1,2})(?!\w)'

# Numbers
specialchar = '(?<!#)-[1-5]\b', '\\[0-9]\b' # strings and fingerings
note_duration = '(?<=[a-zR\',!?>\*])(1|2|4|8|16|32|64|128)(\.+|\b)'
value = '[[:digit:]/]+'

# Markup commands (any \command inside \markup{})
environment markup delim '\\markup\s*\{' "}" multiline nested begin
  # definitions I want to preserve in this environment
  cbracket = $CBRACKET
  string delim "\"" "\"" multiline
  comment delim "%{" "%}" multiline nested
  comment start "%"
  scheme_value = $SCHEME_VALUE
  environment scheme delim '#\'?\(' ")" multiline nested begin
    string delim "\"" "\"" multiline
    comment start ";"
    environment scheme delim "(" ")" multiline nested begin
      string delim "\"" "\"" multiline
      comment start ";"
    end
  end
  # actual definition
  markup_command = '\\[[:alpha:]-]+'

  # needed for nested blocks inside \markup{}
  environment markup delim "{" "}" multiline nested begin
    cbracket = $CBRACKET
    string delim "\"" "\"" multiline
    comment delim "%{" "%}" multiline nested
    comment start "%"
    scheme_value = $SCHEME_VALUE
    environment scheme delim '#\'?\(' ")" multiline nested begin
      string delim "\"" "\"" multiline
      comment start ";"
      environment scheme delim "(" ")" multiline nested begin
        string delim "\"" "\"" multiline
        comment start ";"
      end
    end
    markup_command = '\\[[:alpha:]-]+'
  end
end

lyric_command = '\\(lyricmode|lyrics(to)?)'

# Main commands
preproc = '\\(book(part)?|context|consists|header|include|language|layout',
    'midi|once|override(Property)?|paper|remove(WithTag)?',
    'revert|score|(un)?set|version|with)\b'

# Variables of music functions
variable = '(alto|baritone|bass|french|mezzosoprano|percussion',
    'soprano|subbass|tenor|treble|varbaritone',
    'percent|tremolo|unfold|volta',
    '\\(aeolian|dorian|ionian|lydian|locrian|minor|major|mixolydian|phrygian))\b'

header_variable = 'arranger', 'breakbefore', 'composer', 'copyright', 'date',
    'dedication', 'enteredby', 'filename', 'footer', 'instrument\b', 'lastupdated',
    'maintainer(Email|Web)?', 'meter', 'moreInfo',
    'mutopia(composer|instrument|opus|poet|title)?',
    'opus', 'poet', 'piece', 'source(url)?', 'style', '(sub){0,2}title',
    'tagline', 'texidoc'

# Contexts
# old regexp: '([A-Z][a-z]+){2,}' <-- too greedy, a list is better
context = '\\?(ChoirStaff|ChordNames|CueVoice|Devnull|Drum(Staff|Voice)',
    'Dynamics|FiguredBass|FretBoards|Global|GrandStaff',
    'GregorianTranscription(Staff|Voice)|Lyrics|Mensural(Staff|Voice)',
    'NoteNames|PianoStaff|RhythmicStaff|Score|Staff(Group)?',
    'Tab(Staff|Voice)|Vaticana(Staff|Voice)|Voice)\b'

# Layout objects
layout_object = 'Accidental(Cautionary|Placement|Suggestion)?',
    'Ambitus(Accidental|Line|NoteHead)?', 'Arpeggio', 'BalloonTextItem',
    'Bar(Line|Number)?', 'BassFigure(Alignment(Positioning)?|Bracket|Continuation|Line)?',
    'Beam', 'BendAfter', 'Break(AlignGroup|Alignment)?', 'BreathingSign',
    'ChordName', 'Clef', 'Cluster(Spanner(Beacon)?)', 'CombineTextScript',
    'Cue(Clef|EndClef)?', 'Custos', 'Dot(Column|s)?',
    'Double(PercentRepeat(Counter)?|RepeatSlash)?',
    'Dynamic(LineSpanner|Text|TextSpanner)?\b', 'Episema', 'Fingering', 'Flag',
    'Footnote(Item|Spanner)', 'FretBoard', 'Glissando', 'GraceSpacing',
    'Grid(Line|Point)', 'Hairpin', 'HorizontalBracket',
    'Instrument(Name|Switch)', 'Key(Cancellation|Signature)',
    'Laissez(VibrerTie(Column)?)', 'LedgerLineSpanner',
    'LeftEdge', 'LigatureBracket',
    'Lyric(Extender|Hyphen|Space|Text)', 'MeasureGrouping',
    'MelodyItem', 'MensuralLigature', 'MetronomeMark',
    'MultiMeasureRest(Number|Text)?', 'NonMusicalPaperColumn',
    'Note(Collision|Column|Head|Name|Spacing)', 'OctavateEight',
    'OttavaBracket', 'PaperColumn', 'ParenthesesItem',
    'Percent(Repeat(Counter)?)', 'PhrasingSlur', 'PianoPedalBracket',
    'RehearsalMark', 'Repeat(Slash|Tie(Column)?)', 'Rest(Collision)?',
    'Script(Column|Row)?', 'Slur', 'Sostenuto(Pedal(LineSpanner)?)',
    'SpacingSpanner', 'SpanBar', 'Staff(Grouper|Spacing|Symbol)',
    'StanzaNumber', 'Stem(Tremolo)?', 'StringNumber', 'StrokeFinger',
    'SustainPedal(LineSpanner)?',
    'System(StartBar|StartBrace|StartBracket|StartSquare)?',
    'TabNoteHead', 'Text(Script|Spanner)', 'Tie(Column)?', 'TimeSignature',
    'TrillPitch(Accidental|Group|Head)', 'TrillSpanner',
    'Tuplet(Bracket|Number)', 'UnaCordaPedal(LineSpanner)?',
    'VaticanaLigature', 'Vertical(Alignment|AxisGroup)', 'VoiceFollower',
    'VoltaBracket(Spanner)?'

# Context properties
context_property = '\b[a-z]+([A-Z]+[a-z]+)+',
                   'ottavation|output|stanza|timing|tonic'

# Layout properties
layout_property = '\b[a-z]+(-[a-z]+)+', 'indent'

# All the other commands (including variables defined by users).
# It must be at the end, otherwise the other \command definitions are overwritten.
function = '\\[[:alpha:]-]+'


--------------030506000005030504070803
Content-Type: text/plain;
 name="lilypond.style"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="lilypond.style"

symbol "#C000C0" b ;
cbracket, preproc black b ;
dynamic "#FF8000" b ;

string "#C20F0F" ;
scheme, scheme_value "#A04900" ;
comment gray i ;

note_duration teal ;
value "#808000" ;
specialchar "#FF8000" ;

function "#0000C0" b ;
markup_command "#008000" ;
lyric_command "#006000" b ;

header_variable, variable blue ;
context "#C000C0" b ;
layout_object "#C000C0" ;
context_property, layout_property blue ;


--------------030506000005030504070803
Content-Type: text/x-lilypond;
 name="test.ly"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="test.ly"

\version "2.14.2"

#(define (naturalize-pitch p)
  "Strings should be read"
   (let ((o (ly:pitch-octave p))
         (a (* 4 (ly:pitch-alteration p)))
         ;; alteration, a, in quarter tone steps,
         ;; for historical reasons
         (n (ly:pitch-notename p)))
     (cond
      ((and (> a 1) (or (eq? n 6) (eq? n 2)))
       (set! a (- a 2))
       (set! n (+ n 1)))
      ((and (< a -1) (or (eq? n 0) (eq? n 3)))
       (set! a (+ a 2))
       (set! n (- n 1))))
     (cond
      ((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
      ((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
     (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
     (if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))
     (ly:make-pitch o n (/ a 4))))

\header {
  title = "Maple Leaf Rag"
  composer = "Scott Joplin"
  piece = "Tempo di marcia"
  tagline =
    \markup {
      \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box
      \center-column {
        \small \line { Sheet music from \with-url #"http://www.MutopiaProject.org"
          \line { \teeny www. \hspace #-0.5 MutopiaProject \hspace #-0.5 \teeny .org \hspace #0.5 } 
        }
      }
    }
}

\paper {
  top-margin = 15
  ragged-right = ##t
  system-system-spacing #'padding = #8
  score-system-spacing =
    #'((basic-distance . 12)
       (minimum-distance . 6)
       (padding . 1)
       (stretchability . 12))
}

top =  \relative c' {
 \override TextScript   #'padding = #2
 
 \key as \major
 \time 2/4
 \clef treble
 \partial 8
 r8 \f |
 \repeat volta 2 {
  r16 as' <es' es,> as, c <es es,>8 g,16 |
  <es' es,>16 g, bes <es es,> ~ <es es,>4 |
  r16 as, <es' es,> as, c <es es,>8 g,16 |
  <es' es,>16 g, bes <es es,> ~ <es es,>8 r16 <es es,> |
  r16 as, ces <fes fes,> r16 <es es,> r16 <es es,> |
  r16 as, ces <fes fes,> r16 <es es,> r8 |
  \change Staff = "down"
   \stemUp r16^\p as,,,-( ces as'-) r as-( ces as'-) \stemNeutral |
  \change Staff = "up"
  r16 as-( ces as'-) r as-( ces as'-) |
  }
}

bottom =  \relative c {
 \key as \major
 \time 2/4
 \clef bass
 \partial 8
 <es es,>8 |
 \repeat volta 2 {
  <as as,> <c as es> <c as es> <a a,> |
  <bes bes,> <des g, es> <des g, es> <es, es,> |
  <as as,> <c as es> <c as es> <a a,> |
  <bes bes,> <des g, es> <des g, es> <es, es,> |
  <fes fes,>4 <es es,>8 <es es,> |
  <fes fes,>4 <es es,>8 r |
  \stemDown as,, r as' r \stemNeutral |
  as' r as' r \clef treble |
  }
}

\score {
  \context PianoStaff <<
  \context Staff = "up"
   \applyMusic #unfold-repeats \top 
  \context Staff = "down"
   \applyMusic #unfold-repeats \bottom
 >>
 
  \midi {
    \context {
      \Score tempoWholesPerMinute = #(ly:make-moment 120 4)
    }
    \context {
      \Voice
      \remove Dynamic_performer
    }
  }
  \layout{}
}


--------------030506000005030504070803--


From MAILER-DAEMON Sun Mar 18 10:56:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1S9HWe-0002ka-LD
	for mharc-help-source-highlight@gnu.org; Sun, 18 Mar 2012 10:56:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43227)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S9HWc-0002jf-7O
	for help-source-highlight@gnu.org; Sun, 18 Mar 2012 10:56:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S9HWa-00061M-9h
	for help-source-highlight@gnu.org; Sun, 18 Mar 2012 10:56:01 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:40783)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1S9HWa-00061D-17
	for help-source-highlight@gnu.org; Sun, 18 Mar 2012 10:56:00 -0400
Received: by werj55 with SMTP id j55so6712379wer.0
	for <help-source-highlight@gnu.org>;
	Sun, 18 Mar 2012 07:55:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=XLvHVkg9wW35LIqondLDcASzXrLdmQRuZHdLuBqYyc8=;
	b=oejcHnLNkx0BLSr+1Lk5/hQzX0t/NoOl/MUYZyPa7B2QVfOclfTvEgR6Lt2+OYb5cG
	eaBvxXkeA46+RGWlEDKQjOS2E8p0zaE6B0MP8YpYpt8c5U46PU66q9yEyZgTJzSdvIM3
	CMGeozuJiodQhq13KicYdvW/NQQaE1CLkU62kM0e1Kh4VNhUzu/Hbfs166++oYuNsPYP
	MkW9uXe4aHvLmHiqJ4WZiPmF/P4ulJ9H1+94Nd6un6DN2MlAn3xWsTgkEBcb072mWu3K
	QPlFaYumOYwQbmJ/fymPOW7VseMomQOMLM4QDhfvUy0y80JLvH7W6H0h1Mnc3Ps4Cq5A
	eoyw==
Received: by 10.216.134.2 with SMTP id r2mr5404816wei.31.1332082556993;
	Sun, 18 Mar 2012 07:55:56 -0700 (PDT)
Received: from [192.168.1.130] (2-231-9-43.ip204.fastwebnet.it. [2.231.9.43])
	by mx.google.com with ESMTPS id
	gp8sm17307719wib.5.2012.03.18.07.55.55 (version=SSLv3 cipher=OTHER);
	Sun, 18 Mar 2012 07:55:56 -0700 (PDT)
Message-ID: <4F65F981.2070903@gmail.com>
Date: Sun, 18 Mar 2012 16:04:33 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:11.0) Gecko/20120312 Thunderbird/11.0
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F53B69D.5080506@gmail.com>
In-Reply-To: <4F53B69D.5080506@gmail.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Subject: Re: [Help-source-highlight] LilyPond language files completed
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Mar 2012 14:56:03 -0000

Lorenzo, I guess that you are busy, but.. I'm waiting for your comments :-)

Thanks!

Il 04/03/2012 19:38, Federico Bruni ha scritto:
> Hi,
>
> find attached the files for the LilyPond language.
> It's not perfect but it's a good start.
>
> I didn't make a Git patch, including the changes needed in Makefile.am
> and lang.map
> But I can do it, if you want me to.
>
> BTW, I can't understand why Git "complains" about this "No newline at
> end of file":
>
> -tml = tml.lang
> \ No newline at end of file
> +tml = tml.lang
> +ly = lilypond.lang
>
> I've googled a bit but I couldn't find any good answer.
>
> Cheers,
> Federico



