If he used it in a robbery pretending it was a weapon, I would be okay with shooting him or with prosecuting armed robbery (if the armed robbery statute specifically included look-alike weapons). What I object to is the imprecise reading of any law.
Oh, but the statute defined firearm to include bb guns. The court was only carrying out the letter of the law. The court would be failing in its duty if it did otherwise.