[Issue 1466] New: Spec claims maximal munch technique always works: not for "1..3"
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Sun Sep 2 15:40:51 PDT 2007
BCS wrote:
> Reply to d-bugmail at puremagic.com,
>
>
>> "The source text is split into tokens using the maximal munch
>> technique, i.e., the lexical analyzer tries to make the longest token
>> it can."
>>
>
> another case:
>
> actual
> !isGood -> ! isGood
> MaxMunch
> !isGood -> !is Good
>
>
I might be wrong, but my guess is that 'is' is always treated as its own entity, so that
'!is' is really ('!' 'is'). Its not a bad practice when one has keyword-operators to do
this, to avoid MM screwing up user's identifiers. But, as I haven't taken any trips
through the DMD frontend source, I might be completely off.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d-bugs
mailing list