converted tokens to rules; took out detailed <ws> handling