Syntactic Matching of Pedestrian Trajectories for Behavioral Analysis