"Keith OHara" <k-ohara5...@oco.net> writes: >>>> so it can take *optional* arguments, >>> I have not yet learned to use David's new facility for optional arguments... >> >> Please report the parts of the documentation you find hard to >> understand. Optional arguments are quite easy to use: if reading the >> documentation gives you a headache, there is something wrong with it. > > The new docs are clear, mostly it took me some time to re-learn > everything in "Extending" up to your addition. (I have done no > extending myself beyond adapting other people's Lisp-in-Lilypond.) > > It would be good to warn people that optional arguments must come > immediately before an argument that will be read in LilyPond syntax, > so that the parser knows which argument is missing.
That's not exactly true: optional arguments can be _skipped_ only when the following actual non-optional argument looks differently to the parser. Scheme arguments currently look all the same to the parser: letting the parser _call_ the actual predicate for deciding how to parse on is hard. It must not have made any irreversible decisions at that point of time. And what Bison's LALR(1) parser algorithm considers irreversible is a bit tricky. I'll take a look whether just implementing this predicate-based backtracking for optional-Scheme-before-Scheme is feasible on the current code base: in the long run, I'll make this much more reliable. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel