How to create AST with ANTLR4?
问题 I\'ve been searching A LOT about this and I couldn\'t find anything useful that REALLY helps me build an AST. I already know that ANTLR4 doesn\'t build AST like ANTLR3 used to do. Everyone say: \"Hey, use visitors!\", but I couldn\'t find any example or more detailed explanation on HOW can I do this... I have a grammar must like C, but with every commands written in Portuguese (portuga programming language). I can easily generate the parse tree using ANTLR4. My question is: What I need to do