dont't use a callback pas an opaque state instead.
parser is an opaque type