def _parse_int(token, default=0):
    """Returns an integer from a string token.
    Returns the default value if the token cannot be converted to int"""
    return int(token) if token.isdigit() else default