compiler construction - What do people mean when they say C++ has "undecidable grammar"? -
What people say when people say this? What are the effects for programmers and compilers? It is related to the fact that C ++ has a template system that means (theoretically).
Its side effect is that some explicitly valid C ++ programs can not be compiled; The compiler will not be able to decide whether the program is valid or if the compiler can decide the validity of all programs, then he will be able to solve it.
Note that it has nothing to do with the ambiguity of C ++ grammar. Edit
Edit: Josh Hobrin has stated in the comments below and with an excellent example, which is a per -se tree for C ++ The construction is indeed inadequate due to the absence of grammar, it is impossible to separate syntax analysis from semantic analysis, and since the meaning analysis is inconclusive, syntax analysis is there.
See also (links from Josh's post):
Comments
Post a Comment