def parseDefinitions(extensionName, src):

    def skipDefinition(extensionName, definition):
        if (extensionName == None):
            return True
        if (definition[0].startswith(extensionName.upper()) and definition[1].isdigit()):
            return False
        if definition[0].startswith(extensionName.upper()):
            return True
        if definition[1].isdigit():
            return True
        return False
    ptrn = '#define\\s+([^\\s]+)\\s+([^\\r\\n]+)'
    matches = re.findall(ptrn, src)
    return [Definition(None, match[0], match[1]) for match in matches if (not skipDefinition(extensionName, match))]
def parseDefinitions(extensionName, src):

    def skipDefinition(extensionName, definition):
        if (extensionName == None):
            return True
        if (definition[0].startswith(extensionName.upper()) and definition[1].isdigit()):
            return False
        if definition[0].startswith(extensionName.upper()):
            return True
        if definition[1].isdigit():
            return True
        return False
    ptrn = '#define\\s+([^\\s]+)\\s+([^\\r\\n]+)'
    matches = re.findall(ptrn, src)
    return [Definition(None, match[0], match[1]) for match in matches if (not skipDefinition(extensionName, match))]