refactor ragel for recursive term parsint