Re: [GSoC] Proposal: Modular LilyPond Parser (C++)

Werner LEMBERG <[email protected]> Fri, 05 Jun 2026 21:56:56 +0000
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <[email protected]>
>> Maintenance seems incredibly easy to me when it comes to adding new
>> commands or limited syntax changes.  [...]
>
> It appears to me that you are proposing to replace an intentionally
> flexible (and therefore complex) lexer with a simplified lexer that
> will not have the same flexibility.
> 
> The flexibility in LilyPond is one of its greatest assets -- it
> allows the engraving of music that wasn't explicitly planned for
> (AFAICT) in the original design; but because of the flexibility
> inherent in the lexer the types of music to be engraved can be
> readily expanded.
> 
> I do not believe there will be a lot of support in the LilyPond
> community for decreasing the flexibility of the lexer.

IMHO it really depends on what you want to do.  For example, an
extremely fast highlighter for LilyPond source code that does a good
job in, say, 99% of all normal use-cases might be preferable to a very
slow one that is always correct.


    Werner