Python grammar being rewritten. Half-way through