The parser does not have the ability to change the operation of the lexer. Although initiated by the parser, The lexer will process the entire input stream before the parser begins its evaluation of the parser rules.
You may be looking for lexer 'modes', aka lexical modes.