Switch over create_doc to a parser generated by leg.