Parse text into an array of tokens or array of arrays