Repair gramatics