Humans can survive on grass longer than if you had nothing to eat, but grass, along with most other plants can’t sustain a human for very long without other nutrients in the diet.
This excludes legumes.
It is because humans can’t digest plant matter very well, and we only get one chance after we swallow it. Plants go in, get digested as much as possible, and the roughage pushes through.
One of the reasons grass is good food for cows, horses, guinea pigs, and other animals is that they have a system of re-digesting the stuff.
Cows regurgitate grass, ruminate, and swallow again, giving the grass extra chances to break down. Instead of regurgitation, a guinea pig actually has a pouch near the anus where poop is stored.
When the poop still contains undigested and valuable food particles, the guinea pig chews on the poop a while, swallows, and lets it all digest again.
Considering these alternatives, it seems us humans have made out pretty well.
Please don’t go out and try and eat some grass. It’s just not sanitary.