This is my grammar.g4:
FOO: 'x';
BAR: 'y'
{ /* here! */ };
I want tokens BAR and FOO to be emitted when the input contains y. What should I write in the here! part? Please, don't suggest to rewrite the grammar, this is just a test sample, my real case is much more complex.