code reorg

give state .process the same signature as advanceTo
inline Parser setup function