[cfe-dev] decl/expr ambiguity

Argiris Kirtzidis akyrtzi at gmail.com
Sun Aug 24 18:13:42 PDT 2008

Doug Gregor wrote:
> There are also places in C++ where we have to determine whether we're
> looking at a type or an expression (e.g., in sizeof(blah)).

Can you be more specific? The way I see it, you can skip through when 
expressions are expected without affecting the disambiguation process.
Are you talking about non-type template arguments ? I think in these 
cases common parsing methods can be used by both a pre-parser and normal 

> All that said, it might not matter so much whether we pre-parse now or
> not. As those trickier parsing bits for types go into the parser, they
> could probably be abstracted out to be useful for both the
> pre-parser(s?) and the parser, to eliminate unnecessary code/coding
> duplication.

Certainly! Resolving scope qualifiers and instantiating classes can be 


More information about the cfe-dev mailing list