fully functional parser