]> git.donarmstrong.com Git - lilypond.git/commit
parser.yy: Allow numbers, fractions and \default as arguments.
authorDavid Kastrup <dak@gnu.org>
Thu, 27 Oct 2011 00:22:45 +0000 (02:22 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 8 Nov 2011 21:56:53 +0000 (22:56 +0100)
commit7cbd260dc9264e878fee893c5b26d820d6a89cf8
tree1c2007d8b4628b30aa73ba30cc582487fd966677
parent4d3a8ac41c2a1e87e063301d386d2c69db7c54af
parser.yy: Allow numbers, fractions and \default as arguments.

Common parts of function_arglist and function_arglist_closed are
also factored out in order to avoid premature parser decisions.

In closed music expressions (mostly in the context of optional
arguments), numbers with units (3\cm) and "wide" fractions (3 / 4) are
not recognized, but if the respective number is backed up because of
a false predicate, they can still be used in that manner in a
mandatory argument.

As a consequence of moving most of the optional argument checking into
predicates, the operator priority system could be vastly simplified.

\default can be used to force the rest of an optional argument block
to get skipped.  It is the only way to skip optional arguments if they
are not followed by a mandatory argument, since otherwise a skipped
value could not be interpreted anywhere else in the argument list.
lily/parser.yy