4 ms·
>> Any programming language that is massively adopted is context free? > Statically typed languages require semantic analysis and symbol table lookups, so they
by pasquinelli 6y ago
>> Any programming language that is massively adopted is context free?
> Statically typed languages require semantic analysis and symbol table lookups, so they are out.
Isn't that the typechecker, not the parser?
- tom_mellior 6y agoDepends 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.