pass the parser to the callbacks