• Generic Binary Condition Algorithm (Control Flow) Hi, I am failing to implement an algorithm for a generic branching algorithm (control flow) since over 2 years now. • Even ChatGPT can not solve this problem. • This seems to be an unsolveable task I guess. • So maybe one can give support here. • Let’s assume you have an CSharpSyntaxTree AST (managed C++). • The condition for an “IfStatementSyntax” or “ForStatementSyntax” is represented here by nested “BinaryExpressionSyntax” and “ParenthesizedExpressionSyntax” objects.

Article Summaries:

  • Hi, I am failing to implement an algorithm for a generic branching algorithm (control flow) since over 2 years now. Even ChatGPT can not solve this problem. This seems to be an unsolveable task I guess. So maybe one can give support here. Let’s assume you have an CSharpSyntaxTree AST (managed C++). The condition for an “IfStatementSyntax” or “ForStatementSyntax” is represented here by nested “BinaryExpressionSyntax” and “ParenthesizedExpressionSyntax” objects. Really easy so far. But now you want to translate this into an Clang AST. So you need something like an recursive algorithm to resolve

Sources: