On Sun, 7 Jan 2007, Erik Sandberg wrote: > BTW, one of the biggest problems (IMHO) in the lilypond language is that > we can't extend the parser to accept durations as parameters to music > functions: \foo c 4. is ambiguous; it's unclear whether the 4. is the > c's duration, or if it's a separate argument.
It's probably unfortunate that the choice was made to tolerate spaces in things like c 4. ~ but I'm sure that that cannot be undone at this point. Increasing the number of different argument types for music functions would almost certainly be extremely useful for users, who, judging from this mailing list, seem to have an unlimited imagination when it comes to wanting to be able to extend LP syntax. Since recognizing a duration expression is purely a notational problem (in the sense that a notation has to be found that will be unambiguous for the parser), it might be worth asking for people's ideas. The things I can think of offhand are the following -- \foo c (4.) % no good -- confusion with slurs \foo c \nul 4. % \nul would be a sort of syntactic "breath mark" \foo c \ 4. % \ -- same idea as \nul (short, but maybe risky?) \foo c \\ 4. % \\ -- same as \nul \foo c =4. % = prefixed to any expression: "this is separate item" -- Tom _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user