On 2013-09-11 18:49:44 +0000, Walter Bright <newshou...@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.for...@michelf.ca
http://michelf.ca

Reply via email to