John 14:26: Is the grammatical evidence ambiguous, does it support "he", or does it support "it"?
A useful tool is http://biblehub.com/interlinear/john/14-26.htm, which show most of the grammatical data on a single page.
The helper (Paraklētos, N-NMS is grammatically masculine) is the subject
The [Holy] Spirit (Pneuma, N-NNS neuter) is (appositional?) clause
He [will teach] (ekeinos, DPro-NMS masculine) pronoun following long explanatory clause
"ekeinos" follows grammatical gender of "parakletos"
(not evidence of actual gender; grammatical requirement)
"parakletos" is a noun. Normally nouns have fixed gender, leaving no choice. In this case, it was originally an adjective. Grammatically, it could have been changed to "paraklete" which would make it neuter and require the pronoun "ekeine" which is neuter also.
"parakletos" is appropriate for an advocate or an attorney. It may be (?) rare in either neuter or feminine form, since attorneys are assumed to be male. It only exists in masculine form in the Bible.
At this point, we might want to ask what kind of a writer John was. He might have created the neuter word if he wanted imply that the Holy Spirit was not a person, similar to coining a new word in English. Or he might have used the word he knew, since the rules of grammar would not require personhood even when the masculine was used.
On balance, it seems there is a slight hint from the grammar that the Holy Spirit is a person, but it is far from definitive.