Finalized factorization of repeated code in ParserSubwords.