def parse_gerber_value(value, format=(2, 5), zero_suppression='trailing'):
    """ Convert gerber/excellon formatted string to floating-point number

    .. note::
        Format and zero suppression are configurable. Note that the Excellon
        and Gerber formats use opposite terminology with respect to leading
        and trailing zeros. The Gerber format specifies which zeros are
        suppressed, while the Excellon format specifies which zeros are
        included. This function uses the Gerber-file convention, so an
        Excellon file in LZ (leading zeros) mode would use
        `zero_suppression='trailing'`


    Parameters
    ----------
    value : string
        A Gerber/Excellon-formatted string representing a numerical value.

    format :  tuple (int,int)
        Gerber/Excellon precision format expressed as a tuple containing:
        (number of integer-part digits, number of decimal-part digits)

    zero_suppression : string
        Zero-suppression mode. May be 'leading', 'trailing' or 'none'

    Returns
    -------
    value : float
        The specified value as a floating-point number.

    """
    if '.' in value:
        return float(value)
    integer_digits, decimal_digits = format
    MAX_DIGITS = integer_digits + decimal_digits
    if MAX_DIGITS > 13 or integer_digits > 6 or decimal_digits > 7:
        raise ValueError('Parser only supports precision up to 6:7 format')
    value = value.lstrip('+')
    negative = '-' in value
    if negative:
        value = value.lstrip('-')
    missing_digits = MAX_DIGITS - len(value)
    if zero_suppression == 'trailing':
        digits = list(value + '0' * missing_digits)
    elif zero_suppression == 'leading':
        digits = list('0' * missing_digits + value)
    else:
        digits = list(value)
    result = float(''.join(digits[:integer_digits] + ['.'] + digits[
        integer_digits:]))
    return -result if negative else result
