changed grammar so that arrays now take types as well as base types