Reorganized code. 

AST should be with the SemanticAnalyzer class.
Symbol table should be built alongside the AST.