What would an AST (abstract syntax tree) for an object-oriented programming language look like?
AST is an abstraction of the CST (concrete syntax tree, or, parse tree). The concrete syntax tree is the tree resulting from the productions (in the grammar) used to parse the file. So your AST is basically derived from your grammar definition, but has for transformed Exp / | \ / | \ * Ident … Read more