Re: Validity check for lilypond files

2018-11-03 Thread David Kastrup
Noeck  writes:

> Hi,
>
> is there a way to check the validity of a .ly file?
>
> I am thinking of a syntax check – so basically if the parser/lexer can
> read it. It should (a) be quick and (b) not produce any output (could be
> deleted as a last resort).
>
> Is there something in python-ly that does that? It looks like the
> Frescobaldi auto-engraving only runs if the input is valid.
>
> I guess to check everything, I would have to run lilypond on it and see
> if there are any warnings or errors. But I am willing to have less
> coverage if I can get the result faster.
>
> Thanks in advance for any hints.

You could just turn all of LilyPond's processing hooks for various
syntactic elements into do-nothings in your own init file and then read
the various inputs.  That should be rather fast.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Validity check for lilypond files

2018-11-03 Thread Noeck
Hi,

is there a way to check the validity of a .ly file?

I am thinking of a syntax check – so basically if the parser/lexer can
read it. It should (a) be quick and (b) not produce any output (could be
deleted as a last resort).

Is there something in python-ly that does that? It looks like the
Frescobaldi auto-engraving only runs if the input is valid.

I guess to check everything, I would have to run lilypond on it and see
if there are any warnings or errors. But I am willing to have less
coverage if I can get the result faster.

Thanks in advance for any hints.

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user