How to construct an abstract syntax tree
Well, first off, the grammar is used to construct a parse tree from an expression. So if you already have a parse tree, you don’t need the grammar. Depending on how much work your parser does, the resulting tree that is formed from parsing an expression could already be an abstract syntax tree. Or it … Read more