If/else statements in ANTLR using listeners
问题 I\'m creating a simple programming language for a school project. I\'m using ANTLR 4 to generate a lexer and a parser from my grammar. Until now, I have been using ANTLRs listener pattern to apply the actual functionality of the programming language. Now I would like to implement if/else statements but I\'m not sure that these can actually be implemented when using the listener pattern as ANTLR decides in which order to traverse the parse tree when using listeners and I imagine that the