lilypond-devel
[Top][All Lists]
Advanced

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

Re: another pygment formatting glitch


From: Jean Abou Samra
Subject: Re: another pygment formatting glitch
Date: Sat, 29 Oct 2022 15:36:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 29/10/2022 à 15:02, Werner LEMBERG a écrit :
Just curious: Wouldn't be Wilbert's 'parce' library (used for the code
highlighter in Frescobaldi) a more sophisticated alternative?



Originally, I wanted to have LilyPond support in Pygments
because it is used in Sphinx and MkDocs as well as on
Wikipedia. Then doing the syntax highlighting in our documentation
using Pygments was just easier for me because I already knew
how to use Pygments for that.

Using parce would be possible too. However,

- Frescobaldi does *not* use it yet. It is the *planned*
  successor of python-ly but the transition has not happened
  as of today. I'm not sure how stable Wilbert considers it.
  Its (quite complex) parsing logic is not widely tested.

  We could also use python-ly, which is currently being
  used in Frescobaldi, but it is slated to be eventually
  replaced by parce and therefore not a good solution on
  the long term.

- The way Pygments parses the input is inherently more
  robust to future syntax changes in LilyPond, because it
  recognizes very fundamental syntax only.

- LilyPond builtins in Pygments are autogenerated and can
  easily be updated; that is not the case in parce.







reply via email to

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