Generalize the notion of a parser