[cfe-dev] Lookahead vs. Tentative Parsing

David Blaikie dblaikie at gmail.com
Tue Jul 5 21:22:14 PDT 2011

> Since C++ lambda expressions and Objective-C message expressions can
> each start with the same two tokens (l_square followed by identifier),
> it can take a lookahead of three tokens to differentiate the two cases.

I'm playing around with implementing this myself. But why would you need a
lookahead when these only appear in distinct languages? Currently there's a
"if objective C, start parsing a message" I was just going to add an "if
C++, start parsing a lambda" after that.

Are you working on this too?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110705/5ce943e2/attachment.html>

More information about the cfe-dev mailing list