Aaron Hill <lilyp...@hillvisions.com> writes:

> On 2021-11-13 11:50 am, Carl Sorensen wrote:
>> I'm not sure it is worth the work to get semantically correct, but
>> semantically, \time 4/4 should not be a fraction of two integers; it
>> should be a pair of a count and a duration.
>
> Currently, the lexer consumes the number/number pattern as the token
> FRACTION.  And FRACTION gets used in a few places within the parser
> proper.  (Duration scaling is one example.)  Perhaps the lexer is too
> greedy and should not attempt to tokenize the fraction.  Deferring the
> work to the parser could enable more generalized fraction-like
> constructs such as number/duration, but I am unsure the cost.
>
> David, do you know any reasons why FRACTION is a token and not a
> parser rule?

Wagonloads of lookahead?

-- 
David Kastrup

Reply via email to