Implement body-terminated-by-EOF semantic