would it be better to expose a protected parse() method here rather than passing the parser itself?