29: replace WORD tokens with non-terminals