News for hackers. Stuff that matters.
Re:Proving that C++'s grammar is undecidable by rowanG077 on Tuesday April 28, 2020 @06:58PM (#23013145)
This doesn't prove C++'s grammar is undeciable. Template expansion is seperate from parsing. Besides you can do the same thing in any language that can do Turing complete compile time programming.
Re:Proving that C++'s grammar is undecidable by Kranar on Wednesday April 29, 2020 @11:33AM (#23020422)
Template expansion is not separate from parsing in C++. That's the very thing this article explicitly demonstrates. A program will end up being parsed in two different ways depending on the solution to an instance of Post's Correspondence Problem. In one solution a declaration of x parses into a variable, in another solution a declaration of x parses into a function. Which of those two parse trees is actually correct? That question is not decidable and hence C++'s grammar is undecidable.
Re:Proving that C++'s grammar is undecidable by rowanG077 on Friday May 01, 2020 @04:26AM (#23040134)
You are right! I didn't realize this.