In ANTLRWorks, you can't. You can add an issue for this on the issue tracker: https://github.com/sharwell/antlrworks2/issues
Note that ANTLR 4 was designed so you no longer need to use user-defined arguments and/or return values in your grammar. Instead of returning a List<MT940Record>
like you described above, you should use a listener or visitor after the parse is complete to compute the necessary result.