def parse_scalar(scalar_data, version):
try:<EOL><INDENT>return hs_scalar[version].parseString(scalar_data, parseAll=True)[<NUM_LIT:0>]<EOL><DEDENT>except pp.ParseException as pe:<EOL><INDENT>raise ZincParseException(<EOL>'<STR_LIT>' % reformat_exception(pe),<EOL>scalar_data, <NUM_LIT:1>, pe.col)<EOL><DEDENT>except:<EOL><INDENT>LOG.debug('<STR_LIT>',<EOL>scalar_data, version)<EOL><DEDENT>
Parse a Project Haystack scalar in ZINC format.