2 ms·
D was originally designed to require only one token lookahead, but it turns out to get the aesthetic I wanted, that arbitrary lookup was needed. That turned out
by WalterBright 1y ago
D was originally designed to require only one token lookahead, but it turns out to get the aesthetic I wanted, that arbitrary lookup was needed. That turned out to be very handy when adapting it to compile C code.
Much of the parser code, if you compare the code with the BNF grammar, is a 1:1 correspondence. Super easy to do.