parse text into an array of tokens or array of arrays
