def is_function_pointer_stack(stack):
    """Count how many non-nested paranthesis are in the stack.  Useful for determining if a stack is a function pointer"""
    paren_depth = 0
    paren_count = 0
    star_after_first_paren = False
    last_e = None
    for e in stack:
        if e == '(':
            paren_depth += 1
        elif e == ')' and paren_depth > 0:
            paren_depth -= 1
            if paren_depth == 0:
                paren_count += 1
        elif e == '*' and last_e == '(' and paren_count == 0 and paren_depth == 1:
            star_after_first_paren = True
        last_e = e
    if star_after_first_paren and paren_count == 2:
        return True
    else:
        return False
