def parse_filerange(filerange):
    """
    Parse strings like this:
        210-214
        215
        216,217
        218-221,223-225
    and produce a list of integers corresponding to the range expressed
    in the string.

    :param filerange: String representing a range of integers.
    :type filerange: str
    :rtype: list of int
    """
    filenumbers = []
    ranges = filerange.split(',')
    for range_limits in ranges:
        boundaries = range_limits.split('-')
        if len(boundaries) == 1:
            filenumbers.append(int(boundaries[0]))
        elif len(boundaries) == 2:
            number = int(boundaries[0])
            while number <= int(boundaries[1]):
                filenumbers.append(number)
                number += 1
        else:
            raise RuntimeError

    return filenumbers