Modifying Token Stream

I am attempting to write a FrontendAction that modifies certain tokens before passing them on to be parsed.

Particularly I want to replace an identifier followed by a comment with particular content with a string literal.

Does anyone know of an example where something similar is done? I find plenty of documentation on writing FrontendActions that deal with the AST, but I am not finding much documentation on dealing with tokens before generating an AST.