[cfe-dev] Preprocessor::LookNext

Argiris Kirtzidis akyrtzi at gmail.com
Wed Jul 9 10:17:48 PDT 2008


Chris Lattner wrote:
>
> I like this approach about 10 times better than the other one :) it is 
> very clever and simple!  The good thing about this is that it is an 
> easy thing to measure.  Can you whip up a patch that implements this 
> approach?  I don't think it will have a measurable performance impact 
> on the preprocessor (unlike the other approach).  If so, I would be 
> very happy to commit it and simplify the (existing and future) parser 
> to use it.

The attached "pp-looknext-2.patch" implements Preprocessor::LookNext(), 
and "parser-nexttoken.patch" modifies the parser to use it.

Let me know if they look ok, with no performance impact.


-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parser-nexttoken.patch
Type: text/x-diff
Size: 11079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080709/867ed13d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pp-looknext-2.patch
Type: text/x-diff
Size: 2782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080709/867ed13d/attachment-0001.patch>


More information about the cfe-dev mailing list