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.? >> >> Technically impossible. At the time an \override is parsed, the >> valid set of contexts has not been established. > > OK. And the interpretation of the just parsed data (this is, checking > the validity of contexts, properties, etc.) can't be delayed, right?
Context validity can't be checked at that point of time. The system of available properties, however, is more or less considered static, so the basic consistency checks for overriding existing/non-existing properties are being done while parsing. However, I consider it a bad idea to use "insider" knowledge for parsing an override (meaning skip ahead until finding a word declared as a grob property and split the input backwards from there) since it means that understanding the input requires knowing _all_ prospective properties, whether it is a human, a LilyPond importer, a syntax highlighter, a cross referencing tool or LilyPond itself that is trying to interpret the input. >> 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. > > Interesting. My knowledge here is very limited. Mine isn't. Educating people about the details takes a lot of time, and it is time that only has a payoff if their ultimate goal is actually working in that area rather than just satisfying their sense of being taken seriously. The problem is that there is an unlimited supply of people with helpful suggestions, and if they come and go without having acquired enough working knowledge to actually make a difference, or even if they stay without working on connecting the dots to a degree where their contributions become more focused, the net balance makes them feel more important and me feeling more futile, with no new work being accomplished, and the value of the actually accomplished work being slighted or dismissed. >> So let's just assume I have heard of compilers. Give me a bit of >> credit here. > > I don't doubt your capabilities. I only refer to error messages which > I've seen while working with C++ code. At a climbers' weekend, I answered a call from my ex, afterwards explaining apologizingly that I was sort of her support person for LaTeX problems while she was doing her dissertation. One of the climbers (who I met there for the first time) pitched in with "Oh, I know someone who could do this better". This piqued my interest and I asked for his name, being reasonably sure that I'd have heard of him, likely met him in person already if this was the case. Turned out that his qualification was that he had written something akin to a dissertation using LaTeX himself. My ex could probably have run circles around him, and she was doing Romance studies. Now this incident was more amusing than anything else. What I am getting at that it is taking enough effort and energy to work and discuss on an item-per-item basis and bringing the discussion partners up to scratch on that. I don't actually have the means to address "I feel sure others manage to do a better job under circumstances I consider the same" in any meaningful manner: there are too many technical details involved to address that. The net result is the impression that I am seen as doing a subpar job, making LilyPond worse than necessary either through incompetence or obstinacy. Whether this impression is one I get myself, or other people interested in LilyPond: I doubt that it serves as a motivator. So I would prefer if we tried discussing LilyPond as a system in its own right rather than using sweeping comparisons with systems that are actually quite dissimilar. I just have a better chance of not tearing out my hairs completely in vain then, and they are a limited resource. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel