[parser] clean up boilerplate