Building Tags from the AST produced by ANTLR