Werner LEMBERG <w...@gnu.org> writes: > On the other hand: Wouldn't it be possible to make LilyPond simply > walk over all possible combinations to find out whether, say, > > foo.bar > > is a context followed by a property, or a property followed by a > sub-property, etc.? Is this too expensive? Or is this technically > impossible?
Technically impossible. At the time an \override is parsed, the valid set of contexts has not been established. It may be different depending on the global context that is ultimately employed. For example, there is no GregorianTranscriptionVoice in Midi. The user may decide to define a few new context types in a \layout block coming later in file. And so on. > AFAIK, compilers do something similar, warning about ambiguities. It is one of the sad facets of communication that the mood-deteriorating effects of unintentional satire are quite similar to that of the real deal. LilyPond's parser is written with Bison, a standard parser generator normally used for writing that part of a compiler that would deal with syntax. LilyPond's free-form language stretches the capabilities of Bison beyond what it has been designed for. So let's just assume I have heard of compilers. Give me a bit of credit here. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel