parser: call `onparserinit` when resetting