filters and pattern matching for parser

filtering for lexers and for parsers. Want to be able to match any construct found within the stream...will be slow, but so what. parse until exception then rewind input, consume one token, and try again. This is like Andy Tripp's filter idea. Seems like I can translate

this1 -> that 1
this2 -> that 2

to backtracking rule easily.

"<expr>+0" -> "<expr>"
"<expr>*0" -> "0"

converts to

rules returns [String result]
      : =>    expr '+' INT {$INT.text.equals("0")}? {result = $expr.text;}
      | =>    expr '*' INT {$INT.text.equals("0")}? {result = $INT.text;}
      ;

Or, do we have a filter mode that emits tokens?

options{output=tokens;}
rules : expr '+' INT {$INT.text.equals("0")}? -> expr
      | expr '*' INT {$INT.text.equals("0")}? -> INT
      ;