If this were in NJ, your neighbor could be charged with several crimes, including Trespass, Possession of a Weapon (the rock), and Possession of the Weapon for an Unlawful Purpose. Since your son picked up the pipe after they advanced on him, this could be deemed self defense,although there is typically a duty to retreat if possible.
There are several excellent lawyers who practice criminal law in CA who list here on Avvo.com (two that immediately come to mind are Mr. Kaman and Mr. Dane). I suggest you look them and the other CA criminal defense lawyers up and check out how they answer questions like these, select the ones that you consider the best fit, and call them for a consultation. Good luck.
This information is offered for educational purposes only. It is not intended as legal advice and you should not rely upon it to decide how to resolve this issue. No Attorney-Client relationship is intended or established by this response. You are faced with a situation where you need to consult with an experienced defense lawyer admitted to practice law in your State before you make any decisions as to how to resolve this issue.
You have no duty to retreat in california. You have every right to defend yourself on your property and even pursue the aggressor and make sure that the danger has ceased. But, your use of self defense must be reasonable under the circumstances and not excessive.