Re:The naked truth about writing a programming language (2014)
by tom_mellior on Sunday May 03, 2020 @08:04AM
(#23058501)
Depends on what level you're thinking of: "Pure" grammar or "well-formed programs acceptable to the compiler". C++ does have a context-free grammar (it's in the standard), and also a lot of additional constraints on what constitutes a well-formed programs (this includes type checking). Since we're discussing a claim that "C++ is famously not a context free grammar", we must be thinking of the latter notion and include the type system in our considerations. In which case, we must consider the entire frontend as a whole.
> Statically typed languages require semantic analysis and symbol table lookups, so they are out.
Isn't that the typechecker, not the parser?