Dscanner - It exists

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Aug 1 14:19:13 PDT 2012


On 8/1/12 5:09 PM, deadalnix wrote:
> Le 01/08/2012 19:58, Brian Schott a écrit :
>> On Wednesday, 1 August 2012 at 17:36:16 UTC, Walter Bright wrote:
>>>
>>> I suggest proposing the D lexer as an addition to Phobos. But if that
>>> is done, its interface would need to accept a range as input, and its
>>> output should be a range of tokens.
>>
>> It used to be range-based, but the performance was terrible. The
>> inability to use slicing on a forward-range of characters and the
>> gigantic block on KCachegrind labeled "std.utf.decode" were the reasons
>> that I chose this approach. I wish I had saved the measurements on
>> this....
>
> Maybe a RandomAccessRange could do the trick ?

I think the best way here is to define a BufferedRange that takes any 
other range and supplies a buffer for it (with the appropriate 
primitives) in a native array.

Andrei



More information about the Digitalmars-d-announce mailing list