[Issue 1466] Spec claims maximal munch technique always works:not for "1..3"
BCS
ao at pathlink.com
Sun Sep 9 14:46:42 PDT 2007
Reply to Jascha,
> d-bugmail at puremagic.com wrote:
>
>> // thinks it's [0 ... 1], no maximal munch taking place
>> assert (Foo[0... 1] == 0);
>> }
> this *is* maximal munch taking place. because of the ".." lexeme,
> float literals are not lexemes. they are context free production rules
> consisting of multiple lexemes. therefore "0." consists of two lexemes
> and "..." wins the max munch over ".".
>
But is it the the correct way to do it? (Not is is doing what the spec says,
but is it doing what it should be designed to do)
More information about the Digitalmars-d-bugs
mailing list