"(Buffalo buffalo) [buffalo] (Buffalo buffalo)" I get, where () = NP and  = VP.
But I really do not see how to fit the extra three "buffalos" in there and still make it comprehensible to any native speaker of English. So the claim that the full eight-buffalo sentence is "grammatical" seems to me to be wrong: if something is not comprehensible to any native speaker, it is not grammatical--for grammar was made to illuminate what we find comprehensible and what we do not. Grammar is our servant, not our master.
So the claim is:
The first "Buffalo buffalo" is the subject of the sentence: buffalo from Buffalo.
The second and third "Buffalo buffalos" are a noun--more buffalo from Buffalo--and verb phrase--these Buffalo buffalo in fact buffalo (in the manner of Buffalo) the first Buffalo buffalo.
Then the fourth "Buffalo buffalo" is the verb of the sentence: it describes what the first Buffalo buffalo do--they buffalo (in the manner of Buffalo) others.
What others do they buffalo (in the manner of Buffalo)? Buffalo buffalo, of course...
Can we get from ten to twelve buffalos somehow?