doc cleanup
move parser setup function to local scope

it's only used in the parser initialization