i'm using Antlr4 and trying to add a global token in lexer.g4 so i can use it inside any mode
//Lexer.g4
TEST: 'test'->pushMode(testMode);
mode testMode;
PRE: 'pre';
POST: 'post'->popMode;
//Parser.g4
testStatement: TEST PRE TEST POST;
i can't use TEST inside the testMode because it has been defined outside the mode. any solution to define this token so it can be global and i can use it inside any mode ?!