D Parser in D
Martin Nowak
dawg at dawgfoto.de
Sat Nov 26 16:14:37 PST 2011
On Sun, 27 Nov 2011 00:05:31 +0100, Trass3r <un at known.com> wrote:
>>> Is there a D parser written in D? - C strings kill me.
>> It's annoying to write one as long as the buffered input range with
>> infinite lookahead problem is not solved by the std library.
>
> What do you need infinite lookahead for?
No need to discuss this in detail, but IMHO the main benefit of infinite
lookahead
is that it allows to build a generic parser for forward ranges.
If you have only input ranges you need to handle buffering within the
parser.
Of course it's opportune to simply read in a complete source file as
string given their
typically limited size. It also has the benefit of avoiding additional
string copying.
More information about the Digitalmars-d
mailing list