I had to add a new state to a lexer.G4 module, but there didn't seem to be any way that I could see to mark it 'inclusive' (i.e. using the rules from the other mode if none are matched in the new mode.) I wound up having to duplicate everything like this:
(original mode)
KEYWORD : 'KEYWORD'
;
(new mode)
XKEYWORD: 'KEYWORD' -> type(KEYWORD);
This did work, but is there an easier way?