[cfe-dev] decl/expr ambiguity

Chris Lattner clattner at apple.com
Mon Aug 25 10:40:32 PDT 2008

On Aug 24, 2008, at 6:48 PM, Hartmut Kaiser wrote:
> I'm not sure if this has been discussed before (I didn't follow the  
> whole
> discussion), so please bear with me if this is repetitive.
> A completely different approach would be to build a parser either  
> for a
> (non-ambiguous) superset of C++ or building a (GLR like) parser  
> generating
> not a single parse tree, but a parse forest covering the ambiguous  
> parts,
> and fixing the non-C++ parts/ambiguities in the resulting parse  
> tree(s)
> afterwards.

Hi Hartmut,

As you guessed, we have explicitly chosen to not use GLR approaches  
due to efficiency concerns.  Parsing a superset of the language might  
be possible, but would probably make the common code significantly  
more complex: it would have to handle the nastiness of decls and exprs  
in one shared parser.


More information about the cfe-dev mailing list