lilypond-devel
[Top][All Lists]
Advanced

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

Re: pygment regex question


From: Werner LEMBERG
Subject: Re: pygment regex question
Date: Fri, 25 Nov 2022 16:51:57 +0000 (UTC)

> well -3 seems to be matching it, (say in a-3, I'm aware this is a
> fingering/articulation mark, not a duration).  It appears to be an
> attempt to match a signed integer followed by zero or more dots.

The thing is that the regular expressions match both LilyPond and
Scheme syntax.

> It sucks that pygments regexes are context free, though.  This
> should be using regex capturing and be more like
> `[a-g]((?:\d+|\\longa|\\breve)\.*)` or better yet be more like
> `[a-g]((?:2|4|8|16|32|64|128|\\longa|\\breve)\.*)`, it's not like a5
> is a valid token...

 I don't think stuff like `ag` is a problem – it's not the job of
 pygments to validate LilyPond input.


    Werner

reply via email to

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