First cut at fuller syntax support and proper building of a groupingSets tree.

Lots of work to do yet.