Change the datashape parser to use the shared parse_util

Some refactoring during working in this part of the code.