How Clang handles the type / variable name ambiguity of C/C++ http://t.co/b5t3M0rV8Z -- avoids the lexer hack in a clever way.
miniblog.
Related Posts
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position.
Parsing shell scripts is hard. Here's a fun ambiguity:
We think of assemblers as being a simple mapping of mnemonics to opcodes, but there is ambiguity sometimes: