Re: regexp for scheme blocks in lilypond language

Federico Bruni <[email protected]> Sun, 22 Jan 2012 13:46:42 +0100
Newsgroups gmane.comp.gnu.source-highlight.general
Message-ID <[email protected]>
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