Poison

IntelliJ Idea Plugin for ANTLR v4

The ANTLR Preview window is based on a grammar interpreter, not on the actual generated parser. This means that things like actions and predicates will not be evaluated during live preview, because the interpreter is language agnostic.

For the same reasons, if your parser and/or lexer classes extend a custom implementation of the base parser/lexer classes, your custom code will not be run during live preview.

Reference

GitHub - antlr/intellij-plugin-v4: An IntelliJ plugin for ANTLR v4