passes grammer test.
"Green ideas sleep furiously." Passes grammar test.
As it should. Grammar doesn't check that the sentence makes sense. I can say "$hit loves cake." That doesn't make sense, but the grammar is correct. In the sentence above, 'green' is used as an adjective to modifiy 'ideas'. Ideas can't sleep, but that is not a grammar mistake. This sentence is in the exact same form as "Lovely children sleep calmly."
Try this out in Word: "Me am going to the store." It passes!
"Green ideas sleep furiously.
passes grammer[sic] test."
That's because the grammar in that sentence is absolutely correct. The sentence makes no sense, of course, but that's not what a computer grammar checker is for.
Grammar has little to do with sense. Your exemplar might well be used as a line in a poem, even though it appears to be nonsensical.
However, gramatically, it is just fine.