Learning grammar with a divide-and-concur neural network