How to build parse tree?
问题 Have found C++ BNF and there next lines selection-statement: if ( condition ) statement if ( condition ) statement else statement Now trying to write parser. Need to build parse tree. On input i have BNF and source file. But i'm stucked in how i can point my parser what if condition evaluated to true, then it need to execute first statement otherwise else block? Thanks. 回答1: Conditional statements have a simple recursive structure. The corresponding recursive descent parser has a similarly