[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pygment regex question
From: |
Jean Abou Samra |
Subject: |
Re: pygment regex question |
Date: |
Fri, 25 Nov 2022 17:54:41 +0100 |
> Le 25 nov. 2022 à 17:16, Luca Fascione <l.fascione@gmail.com> a écrit :
> 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.
>
> It sucks that pygments regexes are context free, though.
? What do you mean by context-free? I assume you are not using it in the CS
sense of context-free grammars and languages?
> 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...
Sorry, I don’t understand your remark. Why would the regex above not work in
Pygments and what problem would this regex solve?
- Re: pygment regex question, (continued)
- Re: pygment regex question, Lukas-Fabian Moser, 2022/11/26
- Re: pygment regex question, David Kastrup, 2022/11/26
- Color variables/symbols (was: pygment regex question), Lukas-Fabian Moser, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Lukas-Fabian Moser, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Luca Fascione, 2022/11/26
- Re: Color variables/symbols, Werner LEMBERG, 2022/11/26
- Re: Color variables/symbols, Luca Fascione, 2022/11/26
- Re: Color variables/symbols (was: pygment regex question), Lukas-Fabian Moser, 2022/11/26
Re: pygment regex question,
Jean Abou Samra <=