lilypond-devel
[Top][All Lists]
Advanced

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

Re: convert-ly rules: word boundaries


From: Graham Percival
Subject: Re: convert-ly rules: word boundaries
Date: Wed, 8 Jul 2009 16:12:05 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jul 08, 2009 at 11:14:08AM -0600, Carl D. Sorensen wrote:
> On 7/8/09 8:41 AM, "John Mandereau" <address@hidden> wrote:
> 
> > 009/7/7 Graham Percival <address@hidden>:
> >> I'd just like to fix that one area, plus any new items.
> > 
> > I'm not sure what you mean; do you expect somebody to quickly add word
> > boundaries in all rules in the near future, without checking details
> > exposed in this thread, at the risk of breaking working rules?
> 
> I don't think that's what Graham means.  The only reason to go back would be
> if we find that some rules are broken (which we found for a specific case;
> but the same mechanism would apply to lots of rules.

That actually _is_ what I meant, but I guess I can give that up.
It's just that python/convertrules.py lines 2774-2787 really bug
me.  They should *all* be "match a \\oldCommand and replace with
\\newCommand, with complete word boundary matching", but only the
first line is done as that.

But you're right that it's not actually worth changing any
previous rules.  I'll go back to ignoring convertrules.py.

> I think he means that it would be nice to have a function defined in
> convert-ly that would allow us to make a robust substitution of
> 
> \oldCommandName -> \newCommandName
> 
> without having to 
> 
> a) handle escaping the \
> b) write a proper check to make sure we only get \oldCommandName and not
> \oldCommandNameWithAddedWords
> 
> Such a function would ease the writing of *new* rules, which is what I think
> Graham's main emphasis is.

Yes, that's my *sensible* emphasis.  :)

Cheers,
- Graham




reply via email to

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