add event-init/event-finit impl in parser