def parseKeyValueData(astr):
    "Parses a string of the form:\n        'keyword1=value11, value12,...; keyword2=value21, value22; keyword3=; keyword4; ...'\n    returning an opscore.RO.Alg.OrderedDict of the form:\n        {keyword1:(value11, value12,...), keyword2:(value21, value22, ...),\n         keyword3: (), keyword4: (), ...}\n\n    Inputs:\n    - astr: the string to parse, of the form:\n        keyword1=value11, value12,...; keyword2=value21, value22...\n    where:\n    - keyword is a keyword; it must start with a letter or underscore\n        and may contain those characters or digits thereafter.\n    - value is the value of the keyword, one of:\n        an integer\n        a floating point number\n        a string delimited by a pair of single or double quotes\n            any enclosed characters identical to the delimiter\n            should be escaped by doubling or preceding with a backslash\n    - Each keyword may have zero or more comma-separated values;\n        if it has zero values then the equals sign may be omitted.\n\n    Returns dataDict, an opscore.RO.Alg.OrderedDict of keyword: valueTuple entries,\n    one for each keyword. Details:\n    - The keywords are given in the order they were specified in the message.\n    - If the keyword has no values, valueTuple is ()\n    - If the keyword has one value, valueTuple is (value,)\n    "
    dataDict = opscore.RO.Alg.OrderedDict()
    if (astr == ''):
        return dataDict
    nextInd = 0
    while (nextInd is not None):
        (keyword, nextInd) = getKeyword(astr, nextInd)
        (valueTuple, nextInd) = getValues(astr, nextInd)
        dataDict[keyword] = valueTuple
    return dataDict
Parses a string of the form:
    'keyword1=value11, value12,...; keyword2=value21, value22; keyword3=; keyword4; ...'
returning an opscore.RO.Alg.OrderedDict of the form:
    {keyword1:(value11, value12,...), keyword2:(value21, value22, ...),
     keyword3: (), keyword4: (), ...}

Inputs:
- astr: the string to parse, of the form:
    keyword1=value11, value12,...; keyword2=value21, value22...
where:
- keyword is a keyword; it must start with a letter or underscore
    and may contain those characters or digits thereafter.
- value is the value of the keyword, one of:
    an integer
    a floating point number
    a string delimited by a pair of single or double quotes
        any enclosed characters identical to the delimiter
        should be escaped by doubling or preceding with a backslash
- Each keyword may have zero or more comma-separated values;
    if it has zero values then the equals sign may be omitted.

Returns dataDict, an opscore.RO.Alg.OrderedDict of keyword: valueTuple entries,
one for each keyword. Details:
- The keywords are given in the order they were specified in the message.
- If the keyword has no values, valueTuple is ()
- If the keyword has one value, valueTuple is (value,)
def parseKeyValueData(astr):
    "Parses a string of the form:\n        'keyword1=value11, value12,...; keyword2=value21, value22; keyword3=; keyword4; ...'\n    returning an opscore.RO.Alg.OrderedDict of the form:\n        {keyword1:(value11, value12,...), keyword2:(value21, value22, ...),\n         keyword3: (), keyword4: (), ...}\n\n    Inputs:\n    - astr: the string to parse, of the form:\n        keyword1=value11, value12,...; keyword2=value21, value22...\n    where:\n    - keyword is a keyword; it must start with a letter or underscore\n        and may contain those characters or digits thereafter.\n    - value is the value of the keyword, one of:\n        an integer\n        a floating point number\n        a string delimited by a pair of single or double quotes\n            any enclosed characters identical to the delimiter\n            should be escaped by doubling or preceding with a backslash\n    - Each keyword may have zero or more comma-separated values;\n        if it has zero values then the equals sign may be omitted.\n\n    Returns dataDict, an opscore.RO.Alg.OrderedDict of keyword: valueTuple entries,\n    one for each keyword. Details:\n    - The keywords are given in the order they were specified in the message.\n    - If the keyword has no values, valueTuple is ()\n    - If the keyword has one value, valueTuple is (value,)\n    "
    dataDict = opscore.RO.Alg.OrderedDict()
    if (astr == ):
        return dataDict
    nextInd = 0
    while (nextInd is not None):
        (keyword, nextInd) = getKeyword(astr, nextInd)
        (valueTuple, nextInd) = getValues(astr, nextInd)
        dataDict[keyword] = valueTuple
    return dataDict