std.d.lexer: pre-voting review / discussion
Michel Fortin
michel.fortin at michelf.ca
Wed Sep 11 15:09:55 PDT 2013
On 2013-09-11 18:49:44 +0000, Walter Bright <newshound2 at digitalmars.com> said:
> 6. No clue how lookahead works with this. Parsing D requires arbitrary
> lookahead.
Since this is a forward range, you can save() it at one location and
continue parsing, and then restart parsing from the savepoint.
https://github.com/Hackerpilot/phobos/blob/master/std/d/lexer.d#L2324
This also means that the underlying range used as input to the lexer
must be a forward range that you can save() too.
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list