compatibility of the C++0x spec and LL(k) LR(k)


I guess this is more of a standards question- but I am curious to what
extent the new grammar is compatible with these standard subsets of
CFG's (and perhaps which portions of the grammar may be compatible).



C++ is a context-sensitive language that is neither LL(k) nor LR(k). C++0x is arguable "more context-sensitive" than C++98/03, due to the addition of the context-sensitive keywords "final" and "override".

However, please note that general compiler questions like this are off-topic for the Clang mailing list.

  - Doug

Thanks Doug. I apologize if this is slightly off-topic- but my
motivation in this case is to try to understand the context of the
clang C++ parser design (if you knew where to find some of the
relevant materials for this I would appreciate it- though perhaps you
could send this to me directly if this place is inappropriate).

Clang uses a hand-written recursive-descent parser, because it is easy to maintain, is efficient, handles multiple dialects very well, and provides excellent error recovery. You can go check out the source code in lib/Parse… it's surprisingly easy to read (and modify) the parser code.

  - Doug