[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optional function argument semantics: taste poll

From: Werner LEMBERG
Subject: Re: Optional function argument semantics: taste poll
Date: Fri, 04 Nov 2011 16:54:30 +0100 (CET)

> Basically, I have two choices:

a, b, and c :-)

> a) don't try to match, optional fractions are not accepted in wide
>    form.
> b) when a predicate does not match an INTEGER x, I check whether it
>    matches (cons x 1), and if it does, I continue parsing on the
>    assumption that a fraction is likely to occur.  If this
>    assumption is wrong, I get a syntax error since x can't be backed
>    up once I looked at the next lookahead token and discovered it is
>    not /.
> c) let fraction? as well as Lilypond interpret integers as x/1 when
>    required.

I prefer a).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]