Re: convert-ly rules: word boundaries

2009-07-08 Thread Graham Percival
On Wed, Jul 08, 2009 at 11:14:08AM -0600, Carl D. Sorensen wrote: > On 7/8/09 8:41 AM, "John Mandereau" wrote: > > > 009/7/7 Graham Percival : > >> 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 > > boundarie

Re: convert-ly rules: word boundaries

2009-07-08 Thread John Mandereau
2009/7/8 Carl D. Sorensen : > Such a function would ease the writing of *new* rules, which is what I think > Graham's main emphasis is. > > I believe that it's clearly *not* worth it to fix old rules; there is *no* > benefit to fixing old rules if they're not breaking.  If they do break, we > can f

Re: convert-ly rules: word boundaries

2009-07-08 Thread Carl D. Sorensen
On 7/8/09 8:41 AM, "John Mandereau" wrote: > 009/7/7 Graham Percival : >> I'm not, but almost all updates are in the form >>  \\oldCommand -> \\newCommand >> >> I suppose that somebody might have tried to speed up convert-ly >> processing by doing >>  \\old -> \\new >> and leaving the "Comman

Re: convert-ly rules: word boundaries

2009-07-08 Thread John Mandereau
009/7/7 Graham Percival : > I'm not, but almost all updates are in the form >  \\oldCommand -> \\newCommand > > I suppose that somebody might have tried to speed up convert-ly > processing by doing >  \\old -> \\new > and leaving the "Command" out (thereby using one rule, instead of > two rules), b

Re: convert-ly rules: word boundaries

2009-07-06 Thread Graham Percival
On Mon, Jul 06, 2009 at 11:14:13PM +0200, John Mandereau wrote: > Le samedi 04 juillet 2009 à 01:58 -0700, Graham Percival a écrit : > > arpeggio* should have \\ as well. Also, they should also be > > matched with full words. In fact, 99% of the convert-ly rules > > need to match a complete word.

Re: convert-ly rules: word boundaries

2009-07-06 Thread John Mandereau
Le samedi 04 juillet 2009 à 01:58 -0700, Graham Percival a écrit : > arpeggio* should have \\ as well. Also, they should also be > matched with full words. In fact, 99% of the convert-ly rules > need to match a complete word. According to Daniel Hulme, > "\\octave\b" would work fine. > > 1) Co

convert-ly rules: word boundaries

2009-07-04 Thread Graham Percival
(cleaning up old emails) This looks sub-optimal: -- def conv (str): str = re.sub (r"\\octave(?![a-zA-Z])", r"\\octaveCheck", str) str = re.sub (r"arpeggioUp", r"arpeggioArrowUp", str) str = re.sub (r"arpeggioDown", r"arpeggioArrowDown", str) ... -- arpeggio* should have \\ as