Abstract. This proof of concept study examines the possibility of specifying the construction of programs using a Particle Swarm algorithm, and represents a new form of automatic programming based on Social Learning, Social Programming or Swarm Programming. Each individual particle represents choices of program construction rules, where these rules are specified using a Backus-Naur Form grammar. The results demonstrate that it is possible to generate programs using the Grammatical Swarm technique.