From MAILER-DAEMON Mon Jan 02 06:04:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhfhF-00055j-P4
	for mharc-help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:04:53 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38269)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RhfhD-00055c-Jz
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:04:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RhfhC-0003Q6-CT
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:04:51 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:43130)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RhfhC-0003O4-6p
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:04:50 -0500
Received: by eekc41 with SMTP id c41so16468021eek.0
	for <help-source-highlight@gnu.org>;
	Mon, 02 Jan 2012 03:04:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=X+XtD430/XDkfxoCzvrogqllCulxgzEr98MeETVdUt0=;
	b=SPC/b+O+abx/DyRUafBhLz79C63ZmjrzBhsOP4toa7mXNDOmiEy1n/yRP+whaoFzS1
	GjukRff7Vj+BMtenC0VkHOB4zXXwydnHFIF1v+eF54xjqnONSooSLVFr/v80ca4OTH7u
	nFkkQezFsCtMqDNIt9I9f5MNF1Fe7uXP3KI0s=
Received: by 10.14.100.10 with SMTP id y10mr19142206eef.119.1325502289286;
	Mon, 02 Jan 2012 03:04:49 -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
	y12sm188839481eeb.11.2012.01.02.03.04.47
	(version=SSLv3 cipher=OTHER); Mon, 02 Jan 2012 03:04:48 -0800 (PST)
Message-ID: <4F0190ED.1090903@gmail.com>
Date: Mon, 02 Jan 2012 12:11:41 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4EEE0D05.50907@gmail.com> <4EF341B8.8010405@dsi.unifi.it>
	<CAPjDBpq7a_LJMFDoQEt7Hd2MXzZB7x0q73hmGZM1GHoquM=U3Q@mail.gmail.com>
	<4EFD7C17.5020808@dsi.unifi.it>
In-Reply-To: <4EFD7C17.5020808@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 74.125.83.41
Subject: Re: [Help-source-highlight] understanding elements
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: Mon, 02 Jan 2012 11:04:52 -0000

Il 30/12/2011 09:53, Lorenzo Bettini ha scritto:
> Hi
>
> besides the lang (and style file), what I would really need is a test
> file to put into the test suite :)

I think that the best test file is a real file.
Can we use one of Mutopia? All files are in the public domain or CC 
By|By-Sa:
http://www.mutopiaproject.org/legal.html

For example, we may use this one (public domain):
http://www.mutopiaproject.org/ftp/JoplinS/maple/maple.ly

The only costraint is using a file written using the recent stable 
syntax of lilypond (currently, 2.14).

The advanced search allows to find all the files written in a specific 
version:
http://www.mutopiaproject.org/advsearch.html

Let me know if it's ok for you.

Cheers,
Federico


From MAILER-DAEMON Mon Jan 02 06:11:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rhfnt-0005pN-L6
	for mharc-help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:11:45 -0500
Received: from eggs.gnu.org ([140.186.70.92]:52963)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rhfnr-0005pF-Cs
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:11:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rhfnp-0004Uy-Kw
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:11:43 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:48356)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rhfnp-0004UO-7I
	for help-source-highlight@gnu.org; Mon, 02 Jan 2012 06:11:41 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.058, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.44,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q02BBReE015590
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q02BBReE015590
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Mon, 2 Jan 2012 12:11:31 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q02BBReE015590
Message-ID: <4F0190DF.2000701@dsi.unifi.it>
Date: Mon, 02 Jan 2012 12:11:27 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
References: <4EEE0D05.50907@gmail.com> <4EF341B8.8010405@dsi.unifi.it>
	<CAPjDBpq7a_LJMFDoQEt7Hd2MXzZB7x0q73hmGZM1GHoquM=U3Q@mail.gmail.com>
	<4EFD7C17.5020808@dsi.unifi.it> <4F0190ED.1090903@gmail.com>
In-Reply-To: <4F0190ED.1090903@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] understanding elements
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: Mon, 02 Jan 2012 11:11:44 -0000

On 01/02/2012 12:11 PM, Federico Bruni wrote:
> Il 30/12/2011 09:53, Lorenzo Bettini ha scritto:
>> Hi
>>
>> besides the lang (and style file), what I would really need is a test
>> file to put into the test suite :)
>
> I think that the best test file is a real file.
> Can we use one of Mutopia? All files are in the public domain or CC
> By|By-Sa:
> http://www.mutopiaproject.org/legal.html
>
> For example, we may use this one (public domain):
> http://www.mutopiaproject.org/ftp/JoplinS/maple/maple.ly
>
> The only costraint is using a file written using the recent stable
> syntax of lilypond (currently, 2.14).
>
> The advanced search allows to find all the files written in a specific
> version:
> http://www.mutopiaproject.org/advsearch.html
>
> Let me know if it's ok for you.

well, that's quite a long file :)
could you please shorten it so that it includes enough features to 
highlight?

thanks
	Lorenzo


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Wed Jan 18 03:22:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnQmx-0003Sm-Iu
	for mharc-help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:22:35 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41678)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnQms-0003Se-Ck
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:22:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnQmm-00068y-Pa
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:22:30 -0500
Received: from mail-we0-f169.google.com ([74.125.82.169]:49168)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnQmm-00068u-Kw
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:22:24 -0500
Received: by werl4 with SMTP id l4so2734809wer.0
	for <help-source-highlight@gnu.org>;
	Wed, 18 Jan 2012 00:22:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=jwfTcD/2qdrjl281uMTc2KLuwVtctPlpXzzdPrQe9aY=;
	b=GYEsntuF1vctigHswPDsciapP5GgaJ9cZmpl71np80JfXMaOEJROLpCQkx851A6MXB
	gNXvAEQbqMaPmk1dISE8rCy3wjfL57LpjKC/F7IfyvOV9a+dDsyeJOFfM6d4yoAtHcnI
	iTS61HE0uiToYPysn0vuByWcm28NkduJT/A2U=
Received: by 10.216.136.132 with SMTP id w4mr8565660wei.53.1326874943348;
	Wed, 18 Jan 2012 00:22:23 -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
	fv6sm52663506wib.8.2012.01.18.00.22.21 (version=SSLv3 cipher=OTHER);
	Wed, 18 Jan 2012 00:22:22 -0800 (PST)
Message-ID: <4F1682EE.4080203@gmail.com>
Date: Wed, 18 Jan 2012 09:29:34 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4EEE0D05.50907@gmail.com> <4EF341B8.8010405@dsi.unifi.it>
	<CAPjDBpq7a_LJMFDoQEt7Hd2MXzZB7x0q73hmGZM1GHoquM=U3Q@mail.gmail.com>
	<4EFD7C17.5020808@dsi.unifi.it> <4F0190ED.1090903@gmail.com>
	<4F0190DF.2000701@dsi.unifi.it>
In-Reply-To: <4F0190DF.2000701@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; 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] understanding elements
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: Wed, 18 Jan 2012 08:22:34 -0000

Il 02/01/2012 12:11, Lorenzo Bettini ha scritto:
> On 01/02/2012 12:11 PM, Federico Bruni wrote:
>> Il 30/12/2011 09:53, Lorenzo Bettini ha scritto:
>>> Hi
>>>
>>> besides the lang (and style file), what I would really need is a test
>>> file to put into the test suite :)
>>
>> For example, we may use this one (public domain):
>> http://www.mutopiaproject.org/ftp/JoplinS/maple/maple.ly
>>
>>
>> Let me know if it's ok for you.
>
> well, that's quite a long file :)
> could you please shorten it so that it includes enough features to
> highlight?
>

Yes, I'll do.
But I want to do a last try with fixing a regexp which is driving me mad.
It's the only thing which doesn't work well and nobody (on lilypond and 
debian users mailing list) was able to help me so far.
I'll open a thread about it when I have time.

Cheers,
Federico


From MAILER-DAEMON Wed Jan 18 03:24:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnQoy-0003Zs-4q
	for mharc-help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:24:40 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38724)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnQov-0003YQ-H2
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:24:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnQou-0006pC-51
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:24:37 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:57963)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnQot-0006p0-Nn
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:24:36 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.078, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.42,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q0I8ORI0012032
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q0I8ORI0012032
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Wed, 18 Jan 2012 09:24:32 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q0I8ORI0012032
Message-ID: <4F1681BB.6010502@dsi.unifi.it>
Date: Wed, 18 Jan 2012 09:24:27 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
References: <4EEE0D05.50907@gmail.com> <4EF341B8.8010405@dsi.unifi.it>
	<CAPjDBpq7a_LJMFDoQEt7Hd2MXzZB7x0q73hmGZM1GHoquM=U3Q@mail.gmail.com>
	<4EFD7C17.5020808@dsi.unifi.it> <4F0190ED.1090903@gmail.com>
	<4F0190DF.2000701@dsi.unifi.it> <4F1682EE.4080203@gmail.com>
In-Reply-To: <4F1682EE.4080203@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] understanding elements
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: Wed, 18 Jan 2012 08:24:38 -0000

On 18/01/2012 09:29, Federico Bruni wrote:
>
> Yes, I'll do.
> But I want to do a last try with fixing a regexp which is driving me mad.
> It's the only thing which doesn't work well and nobody (on lilypond and
> debian users mailing list) was able to help me so far.
> I'll open a thread about it when I have time.
>

let me know whether I can help with the regexp :)

Lore

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Wed Jan 18 03:47:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnRB8-0005Cz-S4
	for mharc-help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:47:34 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41487)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnRB1-0005CF-RD
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:47:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnRAv-0004Hf-V1
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:47:27 -0500
Received: from mail-ww0-f49.google.com ([74.125.82.49]:43965)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RnRAv-0004HS-LU
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 03:47:21 -0500
Received: by wgbdq13 with SMTP id dq13so2314478wgb.30
	for <help-source-highlight@gnu.org>;
	Wed, 18 Jan 2012 00:47:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type; bh=dbrtk33AYryDpaQttKxVMhW/yGHSBOUloI2kgg4fd1U=;
	b=lUd5d4RSo5bheISa3slvC8OtUtBIbeWOYY7sEJDOW7U+viaxErdsIDKcL+fo0zZine
	XUphrzKs7VTaS80kuoSjayUZjY0R2L4k5VEaZiNP5hWxbj/t0k/w7u9VfXKaRQzJQf4P
	OhGtwWhk+HbNp3szhuQuKBKPV2YeGr2i+sRaY=
Received: by 10.180.96.7 with SMTP id do7mr29800649wib.16.1326876440839;
	Wed, 18 Jan 2012 00:47:20 -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
	fv6sm52862148wib.8.2012.01.18.00.47.19 (version=SSLv3 cipher=OTHER);
	Wed, 18 Jan 2012 00:47:19 -0800 (PST)
Message-ID: <4F1688C7.5050605@gmail.com>
Date: Wed, 18 Jan 2012 09:54:31 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
Content-Type: multipart/mixed; boundary="------------040604080305080206040902"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Subject: [Help-source-highlight] regexp for scheme blocks in lilypond
	language
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: Wed, 18 Jan 2012 08:47:33 -0000

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

Hi,

lilypond files can contain blocks of scheme code in several ways.
The main challenge is handling conflicts between single and multiline 
and especially blocks where the number of parentheses cannot be known in 
advance (there's a way to match balanced parentheses?).

Scheme strings can be single line. 4 examples:

\applyMusic #unfold-repeats \bottom
\Score tempoWholesPerMinute = #(ly:make-moment 120 4)

system-system-spacing #'padding = #8
tagline = \markup { \override #'(box-padding . 1.0) \override 
#'(baseline-skip . 2.7) { "Hello" } }

Strings that should be highlighted:

#unfold-repeats
#(ly:make-moment 120 4)

#'padding
any #'(\.) occurence in that single line


There are also two kinds of scheme blocks (I can match the first not the 
second, because I cannot guess the number of parentheses):

#'((basic-distance . 12)
    (minimum-distance . 6)
    (padding . 1)
    (stretchability . 12))



#(define (naturalize-pitch p)
    (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))))


This is very problematic because this kind of block is placed at the 
beginning of a lilypond file and many snippets in the LilyPond 
documentation have such blocks.
My current lilypond.lang can't handle it and all the highlighting gets 
messed, see:
http://lists.gnu.org/archive/html/lilypond-user/2012-01/msg00013.html

(see also my reply to that email)

I attach also an example file.
Sorry for the confusion, I'm in a hurry.

Thanks in advance for your help,
Federico

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

\version "2.14.2"
% Scheme big block: currently commented out because lilypond.lang
% can't handle it.
%{#(define (naturalize-pitch p)
   (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"
}

\paper {
  top-margin = 15
  bottom-margin = 10
  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{}
}

--------------040604080305080206040902--


From MAILER-DAEMON Wed Jan 18 04:01:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnROj-0007UK-Sg
	for mharc-help-source-highlight@gnu.org; Wed, 18 Jan 2012 04:01:37 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58228)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnROh-0007UE-Jf
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 04:01:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnROd-0001O5-9P
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 04:01:35 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:60617)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RnROd-0001Nv-0d
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 04:01:31 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.079, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.42,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q0I91NBq022548
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q0I91NBq022548
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Wed, 18 Jan 2012 10:01:26 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q0I91NBq022548
Message-ID: <4F168A63.7090209@dsi.unifi.it>
Date: Wed, 18 Jan 2012 10:01:23 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com>
In-Reply-To: <4F1688C7.5050605@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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: Wed, 18 Jan 2012 09:01:36 -0000

On 18/01/2012 09:54, Federico Bruni wrote:
> Hi,
>
> lilypond files can contain blocks of scheme code in several ways.
> The main challenge is handling conflicts between single and multiline
> and especially blocks where the number of parentheses cannot be known in
> advance (there's a way to match balanced parentheses?).

Hi

very quick answer: you can match balanced parenthesis using 'nested' 
(see the documentation);

please let me know whether this way you can solve this issue.

cheers
	Lorenzo


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Wed Jan 18 17:47:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RneIP-0000zL-R2
	for mharc-help-source-highlight@gnu.org; Wed, 18 Jan 2012 17:47:57 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39568)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RneIK-0000ke-Uz
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 17:47:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RneIJ-0003CB-Cy
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 17:47:52 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:62262)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RneIJ-0003C6-4Y
	for help-source-highlight@gnu.org; Wed, 18 Jan 2012 17:47:51 -0500
Received: by eekc13 with SMTP id c13so1437836eek.0
	for <help-source-highlight@gnu.org>;
	Wed, 18 Jan 2012 14:47:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type;
	bh=TjbgNOkAJugR0WDb3CyAXNiF9oE4gEoVVutz0UGHT3Y=;
	b=lQe/Qp51dXoCl5AAyHhqAxlmqtU75ZVvhpyIztHnxX9cCIzaAfSYKtfpB11a5PhWtM
	Gf+EGZuv/7PLjHnWgR+KVvhGdj2RKX2F5Sb2eeB3l84BzH9+aTU6ZTz9xKWXGK43rOMa
	NQFWcfxGXBCveAcK6Oijem458ZUmk4aZkEqrw=
Received: by 10.14.100.10 with SMTP id y10mr803783eef.119.1326926870118;
	Wed, 18 Jan 2012 14:47:50 -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 28sm40176640eed.0.2012.01.18.14.47.48
	(version=SSLv3 cipher=OTHER); Wed, 18 Jan 2012 14:47:49 -0800 (PST)
Message-ID: <4F174DC6.1000003@gmail.com>
Date: Wed, 18 Jan 2012 23:55:02 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
In-Reply-To: <4F168A63.7090209@dsi.unifi.it>
Content-Type: multipart/mixed; boundary="------------080008050604060400000800"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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: Wed, 18 Jan 2012 22:47:56 -0000

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

Il 18/01/2012 10:01, Lorenzo Bettini ha scritto:
> On 18/01/2012 09:54, Federico Bruni wrote:
>> Hi,
>>
>> lilypond files can contain blocks of scheme code in several ways.
>> The main challenge is handling conflicts between single and multiline
>> and especially blocks where the number of parentheses cannot be known in
>> advance (there's a way to match balanced parentheses?).
>
> Hi
>
> very quick answer: you can match balanced parenthesis using 'nested'
> (see the documentation);
>

Thanks, this should be the direction, but it's not so easy.
First, the doc says:

"Note that, in order for a delimited language element to be nested, its 
starting and ending elements must be different"

I may be wrong, but I would add: they also have to be specular.
In my case delimiters are not specular.
Start delimiter: #(
End delimiter: )

I can't consider just parenthesis for two reasons:

- I want to highlight # as well
- ( and ) have also a different meaning (slurs) in lilypond synthax and 
must be highlighted differently

So this doesn't work:
scheme_block delim "(" ")" multiline nested

I wrote this but it doesn't work correctly:

scheme_block delim '(?<!#)\(' '\)' multiline nested

The most external () block is omitted and slurs higlighting is broken 
(see file attached).

What do you recommend to do?

Thanks,
Federico

--------------080008050604060400000800
Content-Type: text/html;
 name="test.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="test.html"

<!-- Generator: GNU source-highlight 3.1.5
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">\version</font></b> <font color="#C20F0F">"2.14.2"</font>
<i><font color="#808080">% Scheme big block: currently commented out because lilypond.lang</font></i>
<i><font color="#808080">% can't handle it.</font></i>
#<b><font color="#CC33CC">(</font></b>define <font color="#A04900">(naturalize-pitch p)</font>
   <font color="#A04900">(let ((o (ly:pitch-octave p))</font>
<font color="#A04900">         (a (* 4 (ly:pitch-alteration p)))</font>
<font color="#A04900">         ;; alteration, a, in quarter tone steps,</font>
<font color="#A04900">         ;; for historical reasons</font>
<font color="#A04900">         (n (ly:pitch-notename p)))</font>
<font color="#A04900">     (cond</font>
<font color="#A04900">      ((and (&gt; a 1) (or (eq? n 6) (eq? n 2)))</font>
<font color="#A04900">       (set! a (- a 2))</font>
<font color="#A04900">       (set! n (+ n 1)))</font>
<font color="#A04900">      ((and (&lt; a -1) (or (eq? n 0) (eq? n 3)))</font>
<font color="#A04900">       (set! a (+ a 2))</font>
<font color="#A04900">       (set! n (- n 1))))</font>
<font color="#A04900">     (cond</font>
<font color="#A04900">      ((&gt; a 2) (set! a (- a 4)) (set! n (+ n 1)))</font>
<font color="#A04900">      ((&lt; a -2) (set! a (+ a 4)) (set! n (- n 1))))</font>
<font color="#A04900">     (if (&lt; n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))</font>
<font color="#A04900">     (if (&gt; n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))</font>
<font color="#A04900">     (ly:make-pitch o n (/ a 4)))</font><b><font color="#CC33CC">)</font></b>
<i><font color="#808080">%}</font></i>
<b><font color="#000000">\header</font></b> <b><font color="#000000">{</font></b>
  <font color="#0000FF">title</font> = <font color="#C20F0F">"Maple Leaf Rag"</font>
  <font color="#0000FF">composer</font> = <font color="#C20F0F">"Scott Joplin"</font>
  <font color="#0000FF">piece</font> = <font color="#C20F0F">"Tempo di marcia"</font>
<b><font color="#000000">}</font></b>

<b><font color="#000000">\paper</font></b> <b><font color="#000000">{</font></b>
  <font color="#0000FF">top-margin</font> = <font color="#808000">15</font>
  <font color="#0000FF">bottom-margin</font> = <font color="#808000">10</font>
  <font color="#0000FF">system-system-spacing</font> #'padding = #<font color="#808000">8</font>
  <font color="#0000FF">score-system-spacing</font> =
    #'<font color="#A04900">((basic-distance . 12)</font>
<font color="#A04900">       (minimum-distance . 6)</font>
<font color="#A04900">       (padding . 1)</font>
<font color="#A04900">       (stretchability . 12))</font>
<b><font color="#000000">}</font></b>

top =  <b><font color="#0000C0">\relative</font></b> c' <b><font color="#000000">{</font></b>
 <b><font color="#000000">\override</font></b> <font color="#CC33CC">TextScript</font>   #'padding = #<font color="#808000">2</font>
 
 <b><font color="#0000C0">\key</font></b> as <font color="#0000FF">\major</font>
 <b><font color="#0000C0">\time</font></b> <font color="#808000">2</font>/<font color="#808000">4</font>
 <b><font color="#0000C0">\clef</font></b> <font color="#0000FF">treble</font>
 <b><font color="#0000C0">\partial</font></b> <font color="#808000">8</font>
 r<font color="#008080">8</font> <font color="#FF6600">\f</font> |
 <b><font color="#0000C0">\repeat</font></b> <font color="#0000FF">volta</font> <font color="#808000">2</font> <b><font color="#000000">{</font></b>
  r<font color="#008080">16</font> as' &lt;es' es,&gt; as, c &lt;es es,&gt;<font color="#008080">8</font> g,<font color="#008080">16</font> |
  &lt;es' es,&gt;<font color="#008080">16</font> g, bes &lt;es es,&gt; <b><font color="#CC33CC">~</font></b> &lt;es es,&gt;<font color="#008080">4</font> |
  r<font color="#008080">16</font> as, &lt;es' es,&gt; as, c &lt;es es,&gt;<font color="#008080">8</font> g,<font color="#008080">16</font> |
  &lt;es' es,&gt;<font color="#008080">16</font> g, bes &lt;es es,&gt; <b><font color="#CC33CC">~</font></b> &lt;es es,&gt;<font color="#008080">8</font> r<font color="#008080">16</font> &lt;es es,&gt; |
  r<font color="#008080">16</font> as, ces &lt;fes fes,&gt; r<font color="#008080">16</font> &lt;es es,&gt; r<font color="#008080">16</font> &lt;es es,&gt; |
  r<font color="#008080">16</font> as, ces &lt;fes fes,&gt; r<font color="#008080">16</font> &lt;es es,&gt; r<font color="#008080">8</font> |
  <b><font color="#0000C0">\change</font></b> <b><font color="#CC33CC">Staff</font></b> = <font color="#C20F0F">"down"</font>
   <b><font color="#0000C0">\stemUp</font></b> r<font color="#008080">16</font><b><font color="#CC33CC">^</font></b><font color="#FF6600">\p</font> as,,,-<font color="#A04900">( ces as'-)</font> r as-<font color="#A04900">( ces as'-)</font> <b><font color="#0000C0">\stemNeutral</font></b> |
  <b><font color="#0000C0">\change</font></b> <b><font color="#CC33CC">Staff</font></b> = <font color="#C20F0F">"up"</font>
  r<font color="#008080">16</font> as-<font color="#A04900">( ces as'-)</font> r as-<font color="#A04900">( ces as'-)</font> |
  <b><font color="#000000">}</font></b>
<b><font color="#000000">}</font></b>

bottom =  <b><font color="#0000C0">\relative</font></b> c <b><font color="#000000">{</font></b>
 <b><font color="#0000C0">\key</font></b> as <font color="#0000FF">\major</font>
 <b><font color="#0000C0">\time</font></b> <font color="#808000">2</font>/<font color="#808000">4</font>
 <b><font color="#0000C0">\clef</font></b> <font color="#0000FF">bass</font>
 <b><font color="#0000C0">\partial</font></b> <font color="#808000">8</font>
 &lt;es es,&gt;<font color="#008080">8</font> |
 <b><font color="#0000C0">\repeat</font></b> <font color="#0000FF">volta</font> <font color="#808000">2</font> <b><font color="#000000">{</font></b>
  &lt;as as,&gt; &lt;c as es&gt; &lt;c as es&gt; &lt;a a,&gt; |
  &lt;bes bes,&gt; &lt;des g, es&gt; &lt;des g, es&gt; &lt;es, es,&gt; |
  &lt;as as,&gt; &lt;c as es&gt; &lt;c as es&gt; &lt;a a,&gt; |
  &lt;bes bes,&gt; &lt;des g, es&gt; &lt;des g, es&gt; &lt;es, es,&gt; |
  &lt;fes fes,&gt;<font color="#008080">4</font> &lt;es es,&gt;<font color="#008080">8</font> &lt;es es,&gt; |
  &lt;fes fes,&gt;<font color="#008080">4</font> &lt;es es,&gt;<font color="#008080">8</font> r |
  <b><font color="#0000C0">\stemDown</font></b> as,, r as' r <b><font color="#0000C0">\stemNeutral</font></b> |
  as' r as' r <b><font color="#0000C0">\clef</font></b> <font color="#0000FF">treble</font> |
  <b><font color="#000000">}</font></b>
<b><font color="#000000">}</font></b>

<b><font color="#000000">\score</font></b> <b><font color="#000000">{</font></b>
  <b><font color="#000000">\context</font></b> <b><font color="#CC33CC">PianoStaff</font></b> &lt;&lt;
  <b><font color="#000000">\context</font></b> <b><font color="#CC33CC">Staff</font></b> = <font color="#C20F0F">"up"</font>
   <b><font color="#0000C0">\applyMusic</font></b> #<font color="#0000FF">unfold-repeats</font> <b><font color="#0000C0">\top</font></b> 
  <b><font color="#000000">\context</font></b> <b><font color="#CC33CC">Staff</font></b> = <font color="#C20F0F">"down"</font>
   <b><font color="#0000C0">\applyMusic</font></b> #<font color="#0000FF">unfold-repeats</font> <b><font color="#0000C0">\bottom</font></b>
 &gt;&gt;
 
  <b><font color="#000000">\midi</font></b> <b><font color="#000000">{</font></b>
    <b><font color="#000000">\context</font></b> <b><font color="#000000">{</font></b>
      <b><font color="#CC33CC">\Score</font></b> <font color="#0000FF">tempoWholesPerMinute</font> = #<b><font color="#CC33CC">(</font></b>ly:<font color="#0000FF">make-moment</font> <font color="#808000">120</font> <font color="#808000">4</font><b><font color="#CC33CC">)</font></b>
    <b><font color="#000000">}</font></b>
    <b><font color="#000000">\context</font></b> <b><font color="#000000">{</font></b>
      <b><font color="#CC33CC">\Voice</font></b>
      <b><font color="#000000">\remove</font></b> Dynamic<b><font color="#CC33CC">_</font></b>performer
    <b><font color="#000000">}</font></b>
  <b><font color="#000000">}</font></b>
  <b><font color="#000000">\layout</font></b><b><font color="#000000">{}</font></b>
<b><font color="#000000">}</font></b>
</tt></pre>

--------------080008050604060400000800--


From MAILER-DAEMON Sat Jan 21 09:25:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RobsN-000135-4z
	for mharc-help-source-highlight@gnu.org; Sat, 21 Jan 2012 09:25:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:34512)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RobsK-0000zG-2U
	for help-source-highlight@gnu.org; Sat, 21 Jan 2012 09:25:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RobsI-0000xB-8x
	for help-source-highlight@gnu.org; Sat, 21 Jan 2012 09:24:59 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:62464)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RobsH-0000vu-U0
	for help-source-highlight@gnu.org; Sat, 21 Jan 2012 09:24:58 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.088, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.41,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q0LEOeRg011224
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q0LEOeRg011224
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Sat, 21 Jan 2012 15:24:44 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q0LEOeRg011224
Message-ID: <4F1ACAA8.2050002@dsi.unifi.it>
Date: Sat, 21 Jan 2012 15:24:40 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com>
In-Reply-To: <4F174DC6.1000003@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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: Sat, 21 Jan 2012 14:25:01 -0000

On 01/18/2012 11:55 PM, Federico Bruni wrote:
> Il 18/01/2012 10:01, Lorenzo Bettini ha scritto:
>> On 18/01/2012 09:54, Federico Bruni wrote:
>>> Hi,
>>>
>>> lilypond files can contain blocks of scheme code in several ways.
>>> The main challenge is handling conflicts between single and multiline
>>> and especially blocks where the number of parentheses cannot be known in
>>> advance (there's a way to match balanced parentheses?).
>>
>> Hi
>>
>> very quick answer: you can match balanced parenthesis using 'nested'
>> (see the documentation);
>>
>
> Thanks, this should be the direction, but it's not so easy.
> First, the doc says:
>
> "Note that, in order for a delimited language element to be nested, its
> starting and ending elements must be different"
>
> I may be wrong, but I would add: they also have to be specular.
> In my case delimiters are not specular.

no, that's not requested :)
note that end delimiter may refer to start delimiter (using the regex 
syntax for referring the matched part of another expression); this is 
the case for lua.lang where nested comments can have different syntax 
and the delimiter has to match the starting delimiter and refers to it 
(with this respect, source-highlight is pretty powerful, but I may be 
biased ;)

> Start delimiter: #(
> End delimiter: )
>
> I can't consider just parenthesis for two reasons:
>
> - I want to highlight # as well
> - ( and ) have also a different meaning (slurs) in lilypond synthax and
> must be highlighted differently
>
> So this doesn't work:
> scheme_block delim "(" ")" multiline nested
>
> I wrote this but it doesn't work correctly:
>
> scheme_block delim '(?<!#)\(' '\)' multiline nested
>
> The most external () block is omitted and slurs higlighting is broken
> (see file attached).
>
> What do you recommend to do?

you can (but I haven't tested it) have an 'environment/state' which uses 
'start' that matches '#' followed by '(' (but '(' is not consumed, using 
lookahead) and inside this environment have the 'delim' environment... 
this will let you highlight # differently...

hope to hear from you soon
cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Sun Jan 22 06:13:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RovMY-0006D5-GI
	for mharc-help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:13:30 -0500
Received: from eggs.gnu.org ([140.186.70.92]:48135)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RovMV-0006Cv-SH
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:13:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RovMU-0004Fx-Nr
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:13:27 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:47964)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1RovMU-0004Fs-IE
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:13:26 -0500
Received: by eekc13 with SMTP id c13so759705eek.0
	for <help-source-highlight@gnu.org>;
	Sun, 22 Jan 2012 03:13:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=5ZJvK89pGGWMCd7dhiDXx4Nm11MhLPquecEtMiwuDIA=;
	b=G6qGnzXmwlyXFG6zH7DhfTyTsdFEt+dJonxxox2/Ku2luD+Tv1pvopTSyarJYqk1FX
	IrqtJACSBUlvyS5o4mPRgXLx3cASxG7WOfy3UcON8mihA8g4+NhiAvyhilvTe+m0aZlA
	Rdh5mXz/cbSudmT64Q665lkCX0zXeopWXv3AY=
Received: by 10.213.26.81 with SMTP id d17mr867860ebc.115.1327230805743;
	Sun, 22 Jan 2012 03:13:25 -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
	c16sm38446284eei.1.2012.01.22.03.13.24 (version=SSLv3 cipher=OTHER);
	Sun, 22 Jan 2012 03:13:25 -0800 (PST)
Message-ID: <4F1BF109.2030102@gmail.com>
Date: Sun, 22 Jan 2012 12:20:41 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
In-Reply-To: <4F1ACAA8.2050002@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; 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.83.41
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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, 22 Jan 2012 11:13:28 -0000

Il 21/01/2012 15:24, Lorenzo Bettini ha scritto:
>> Thanks, this should be the direction, but it's not so easy.
>> First, the doc says:
>>
>> "Note that, in order for a delimited language element to be nested, its
>> starting and ending elements must be different"
>>
>> I may be wrong, but I would add: they also have to be specular.
>> In my case delimiters are not specular.
>
> no, that's not requested :)
> note that end delimiter may refer to start delimiter (using the regex
> syntax for referring the matched part of another expression); this is
> the case for lua.lang where nested comments can have different syntax
> and the delimiter has to match the starting delimiter and refers to it
> (with this respect, source-highlight is pretty powerful, but I may be
> biased ;)

thanks, but I'm still far away from understanding

can you give me some pointer/keyword which can help me understanding the 
following regexp (in particular, I can't understand (=*) and @{1})?

environment comment delim `--\[(=*)\[` "]" + @{1} + "]" multiline nested 
begin
   include "url.lang"
   environment comment delim "[[" "]]" multiline nested begin
         include "url.lang"
   end
end


From MAILER-DAEMON Sun Jan 22 06:22:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RovVB-00074C-N8
	for mharc-help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:22:25 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41835)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RovV9-000746-Sd
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:22:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RovV8-0005C2-8I
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:22:23 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:33515)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1RovV7-0005Bv-V6
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 06:22:22 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.092, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.41,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q0MBMG0g007089
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q0MBMG0g007089
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Sun, 22 Jan 2012 12:22:18 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q0MBMG0g007089
Message-ID: <4F1BF168.9050103@dsi.unifi.it>
Date: Sun, 22 Jan 2012 12:22:16 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
	<4F1BF109.2030102@gmail.com>
In-Reply-To: <4F1BF109.2030102@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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, 22 Jan 2012 11:22:24 -0000

On 01/22/2012 12:20 PM, Federico Bruni wrote:
> Il 21/01/2012 15:24, Lorenzo Bettini ha scritto:
>>> Thanks, this should be the direction, but it's not so easy.
>>> First, the doc says:
>>>
>>> "Note that, in order for a delimited language element to be nested, its
>>> starting and ending elements must be different"
>>>
>>> I may be wrong, but I would add: they also have to be specular.
>>> In my case delimiters are not specular.
>>
>> no, that's not requested :)
>> note that end delimiter may refer to start delimiter (using the regex
>> syntax for referring the matched part of another expression); this is
>> the case for lua.lang where nested comments can have different syntax
>> and the delimiter has to match the starting delimiter and refers to it
>> (with this respect, source-highlight is pretty powerful, but I may be
>> biased ;)
>
> thanks, but I'm still far away from understanding
>
> can you give me some pointer/keyword which can help me understanding the
> following regexp (in particular, I can't understand (=*) and @{1})?
>
> environment comment delim `--\[(=*)\[` "]" + @{1} + "]" multiline nested
> begin
> include "url.lang"
> environment comment delim "[[" "]]" multiline nested begin
> include "url.lang"
> end
> end

it says that the starting delimiter is

`--\[(=*)\[`

while the end delimiter is

"]" + @{1} + "]"

(please have a look at the documentation to understand the difference 
among ", ', ` )

the starting delimiter searches for elements of the shape

--[[, --[=[, --[==[

etc. ( (=*) is just a regular expression that matches any multiple 
occurrence of =, even none)

the end delimiter uses the feature I was talking about

"]" + @{1} + "]"

in particular @{1} refers to the first grouped matched string of the 
start delimiter, i.e., in this example (=*)  (as I said, take a look at 
the implementation concerning ` ` which keeps grouped regular expressions).

This means that if the starting delimiter matched --[[ then the end 
delimiter will try to match ]] ; if the starting delimiter matched --[=[ 
then the end delimiter will try to match ]=] ; if the starting delimiter 
matched --[==[ then the end delimiter will try to match ]==] ; and so on...

pretty powerful, isn't it? O:)

The inner

environment comment delim "[[" "]]" multiline nested begin
         include "url.lang"
   end

will try to match only comments [[ ]] because, if I remember correctly, 
in Lua inside a comment --[[ ]] you can only have [[ ]] comments...

is that clearer now?

cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Sun Jan 22 07:39:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rowhn-0007BI-5c
	for mharc-help-source-highlight@gnu.org; Sun, 22 Jan 2012 07:39:31 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41252)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rowhl-0007B8-9b
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 07:39:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rowhk-0005N2-8a
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 07:39:29 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:44939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rowhj-0005Mj-Nv
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 07:39:28 -0500
Received: by eaai11 with SMTP id i11so75225eaa.0
	for <help-source-highlight@gnu.org>;
	Sun, 22 Jan 2012 04:39:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=U2Q9iIFipRfM6AWTvXdwliPVl+P1Caz3ZD3uEVXGHeQ=;
	b=eX4iDy1ILNWGz6kEg+GhIJFV/JGJFwfCreTbY93iRkw6OkwspxUKts3DZ5I26o5w7m
	aV6/1dyONvBGP4AddVu6XWSjx32z6kEmDXB9nxghKLbFuE9sYR4J0PPZK1Fz+7mG3DUD
	gS6Dwj5jE9t4ZovFnlw7FucqmAo9g4nLn6Y7k=
Received: by 10.213.2.67 with SMTP id 3mr877658ebi.114.1327235966442;
	Sun, 22 Jan 2012 04:39:26 -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
	x43sm39264282eef.8.2012.01.22.04.39.24 (version=SSLv3 cipher=OTHER);
	Sun, 22 Jan 2012 04:39:25 -0800 (PST)
Message-ID: <4F1C0532.5030208@gmail.com>
Date: Sun, 22 Jan 2012 13:46:42 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
	<4F1BF109.2030102@gmail.com> <4F1BF168.9050103@dsi.unifi.it>
In-Reply-To: <4F1BF168.9050103@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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, 22 Jan 2012 12:39:30 -0000

Il 22/01/2012 12:22, Lorenzo Bettini ha scritto:
> etc. ( (=*) is just a regular expression that matches any multiple
> occurrence of =, even none)
>
> the end delimiter uses the feature I was talking about
>
> "]" + @{1} + "]"
>
> in particular @{1} refers to the first grouped matched string of the
> start delimiter, i.e., in this example (=*)

In this sense I said that it's "specular": it's the same character.
In my case the character is different: ( in first group, ) in second group.

However, I'm surprised to see that the following works fine:

environment scheme_block delim `#\((\(*)` @{1} + ")" multiline nested begin
   environment scheme_block delim "(" ")" multiline nested begin
     include "url.lang"
   end
end

I'm surprised because @{1} refers to (, while ) should be used instead.
What I'm missing?

I think I'll send final files tonight or tomorrow. I'm quite satisfied now.

Thanks,
Federico


From MAILER-DAEMON Sun Jan 22 08:44:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Roxj4-0000o5-QJ
	for mharc-help-source-highlight@gnu.org; Sun, 22 Jan 2012 08:44:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43897)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Roxj2-0000nz-3M
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 08:44:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Roxj0-0005TG-Ke
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 08:44:52 -0500
Received: from mail-ey0-f169.google.com ([209.85.215.169]:60766)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Roxj0-0005Si-Fe
	for help-source-highlight@gnu.org; Sun, 22 Jan 2012 08:44:50 -0500
Received: by eaai11 with SMTP id i11so89143eaa.0
	for <help-source-highlight@gnu.org>;
	Sun, 22 Jan 2012 05:44:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=Vldj3F+h1W8iUTbmIo1pBnd4Cv2sLHb5kSy0gw1sxFM=;
	b=VQJwP76NvLVsw9Db1BCF0j+8oOc/xGWmIM9uffwMj9N3UpZU51CVgCVMgheGHKfkb1
	8KV7/hp+h1bcQfrjDbjwadsbjfKjBwKP+8uayiAZO1npJLGF6Qer0I6ltrynCMZHH2eo
	bKWmoXCsF32xD4nM5FOrjGhlVV54jb/kn7OgU=
Received: by 10.213.28.83 with SMTP id l19mr943042ebc.50.1327239889557;
	Sun, 22 Jan 2012 05:44:49 -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 x4sm40023181eeb.4.2012.01.22.05.44.47
	(version=SSLv3 cipher=OTHER); Sun, 22 Jan 2012 05:44:47 -0800 (PST)
Message-ID: <4F1C1484.4090003@gmail.com>
Date: Sun, 22 Jan 2012 14:52:04 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
	<4F1BF109.2030102@gmail.com> <4F1BF168.9050103@dsi.unifi.it>
	<4F1C0532.5030208@gmail.com>
In-Reply-To: <4F1C0532.5030208@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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, 22 Jan 2012 13:44:53 -0000

Another small problem I cannot understand.
The block can have also an optional ' before the brackets, like in this 
example:

#'((basic-distance . 12)
    (minimum-distance . 6)
    (padding . 1)
    (stretchability . 12)))

% checker


I've added '? to the regexp I pasted before:

environment scheme_block delim `#'?\((\(*)` @{1} + ")" multiline nested 
begin
   environment scheme_block delim "(" ")" multiline nested begin
     include "url.lang"
   end
end

The first delimiter works fine, but the highlight goes over the end 
delimiter and the "% checker" string is highlighted as well, while it 
shouldn't.

I guess I'm doing something stupid, but I can't see it.
Thanks for your help, it's almost done :)


From MAILER-DAEMON Tue Jan 31 04:16:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rs9op-0007Gs-Lg
	for mharc-help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:16:03 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35188)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rs9on-0007Ga-7X
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:16:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rs9ol-0000kV-UB
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:16:01 -0500
Received: from mail-we0-f169.google.com ([74.125.82.169]:40750)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <fedelogy@gmail.com>) id 1Rs9ol-0000kN-PJ
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:15:59 -0500
Received: by wera13 with SMTP id a13so4839364wer.0
	for <help-source-highlight@gnu.org>;
	Tue, 31 Jan 2012 01:15:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=9akqLeQRCTI5f1TeOPF/fLDexbGRf+8Pz22L2VB+Q9Q=;
	b=vh37NIVV0qnp6FWO/EHcf5AwqH96ZnTLm2I+FdGCBfPqSRavhavkKkoBiyNJYPjVUC
	g55cSb5jjG9rBCMcWI0rwHEnsBTBueunDWBF7Z0a5Rg1oWnSLSEbaNqIhPknCpgCCO3G
	OpjHBh2XZ3ozT6OLJxfUvZeQ27TEPVmT6mMCw=
Received: by 10.216.131.78 with SMTP id l56mr689390wei.56.1328001358697;
	Tue, 31 Jan 2012 01:15:58 -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
	eq5sm61150495wib.2.2012.01.31.01.15.56 (version=SSLv3 cipher=OTHER);
	Tue, 31 Jan 2012 01:15:57 -0800 (PST)
Message-ID: <4F27B312.9090809@gmail.com>
Date: Tue, 31 Jan 2012 10:23:30 +0100
From: Federico Bruni <fedelogy@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
	<4F1BF109.2030102@gmail.com> <4F1BF168.9050103@dsi.unifi.it>
	<4F1C0532.5030208@gmail.com> <4F1C1484.4090003@gmail.com>
In-Reply-To: <4F1C1484.4090003@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; 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] regexp for scheme blocks in lilypond
 language
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: Tue, 31 Jan 2012 09:16:02 -0000

Can anyone help on it?
It's the last fix before submitting the files.

This is the regexp:

environment scheme_block delim `#'?\((\(*)` @{1} + ")" multiline nested 
begin
   environment scheme_block delim "(" ")" multiline nested begin
     include "url.lang"
   end
end

Thanks,
Federico

Il 22/01/2012 14:52, Federico Bruni ha scritto:
> Another small problem I cannot understand.
> The block can have also an optional ' before the brackets, like in this
> example:
>
> #'((basic-distance . 12)
> (minimum-distance . 6)
> (padding . 1)
> (stretchability . 12)))
>
> % checker
>
>
> I've added '? to the regexp I pasted before:
>
> environment scheme_block delim `#'?\((\(*)` @{1} + ")" multiline nested
> begin
> environment scheme_block delim "(" ")" multiline nested begin
> include "url.lang"
> end
> end
>
> The first delimiter works fine, but the highlight goes over the end
> delimiter and the "% checker" string is highlighted as well, while it
> shouldn't.
>
> I guess I'm doing something stupid, but I can't see it.
> Thanks for your help, it's almost done :)



From MAILER-DAEMON Tue Jan 31 04:20:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rs9tX-0008GI-IJ
	for mharc-help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:20:55 -0500
Received: from eggs.gnu.org ([140.186.70.92]:35609)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rs9tR-0008FL-8z
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:20:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rs9tM-0001Kc-Of
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:20:49 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:57360)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Rs9tM-0001KK-D8
	for help-source-highlight@gnu.org; Tue, 31 Jan 2012 04:20:44 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-103.105, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.39,
	BAYES_00 -2.60, RCVD_IN_DNSWL_LOW -1.00, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: q0V9KYoi024041
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id q0V9KYoi024041
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Tue, 31 Jan 2012 10:20:38 +0100 (CET)
X-DKIM: OpenDKIM Filter v2.4.1 pianeta.di.unito.it q0V9KYoi024041
Message-ID: <4F27B262.1070503@dsi.unifi.it>
Date: Tue, 31 Jan 2012 10:20:34 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:9.0) Gecko/20111229 Thunderbird/9.0
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4F1688C7.5050605@gmail.com> <4F168A63.7090209@dsi.unifi.it>
	<4F174DC6.1000003@gmail.com> <4F1ACAA8.2050002@dsi.unifi.it>
	<4F1BF109.2030102@gmail.com> <4F1BF168.9050103@dsi.unifi.it>
	<4F1C0532.5030208@gmail.com> <4F1C1484.4090003@gmail.com>
	<4F27B312.9090809@gmail.com>
In-Reply-To: <4F27B312.9090809@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] regexp for scheme blocks in lilypond
 language
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: Tue, 31 Jan 2012 09:20:53 -0000

Sorry, I've been busy these days

`#'?\((\(*)` @{1} + ")"

the @{1} will refer to the grouped expression of the previous matched 
string, i.e., (\(*) which looks wrong to me...

thus, the ending delimiter would try to match

"()"

which looks wrong to me...

again, could you please provide some examples of strings that you need 
to match?

Lorenzo

On 01/31/2012 10:23 AM, Federico Bruni wrote:
> Can anyone help on it?
> It's the last fix before submitting the files.
>
> This is the regexp:
>
> environment scheme_block delim `#'?\((\(*)` @{1} + ")" multiline nested
> begin
> environment scheme_block delim "(" ")" multiline nested begin
> include "url.lang"
> end
> end
>
> Thanks,
> Federico
>
> Il 22/01/2012 14:52, Federico Bruni ha scritto:
>> Another small problem I cannot understand.
>> The block can have also an optional ' before the brackets, like in this
>> example:
>>
>> #'((basic-distance . 12)
>> (minimum-distance . 6)
>> (padding . 1)
>> (stretchability . 12)))
>>
>> % checker
>>
>>
>> I've added '? to the regexp I pasted before:
>>
>> environment scheme_block delim `#'?\((\(*)` @{1} + ")" multiline nested
>> begin
>> environment scheme_block delim "(" ")" multiline nested begin
>> include "url.lang"
>> end
>> end
>>
>> The first delimiter works fine, but the highlight goes over the end
>> delimiter and the "% checker" string is highlighted as well, while it
>> shouldn't.
>>
>> I guess I'm doing something stupid, but I can't see it.
>> Thanks for your help, it's almost done :)
>
>
> _______________________________________________
> Help-source-highlight mailing list
> Help-source-highlight@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-source-highlight


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


