(p)
function : FUNCTION ID "(" opt_parameter_list ")" "=" expression
function : FUNCTION ID "(" opt_parameter_list ")" "=" expression
function : FUNCTION ID ( opt_parameter_list ) = expression
def p_function(p):
    '''function : FUNCTION ID "(" opt_parameter_list ")" "=" expression
       '''
    params = None
    if p[4] != ")":
        params = p[4]

    p[0] = ScadFunction(p[2], params)
def p_function ( p ) : params = None if p [ 4 ] != ")" : params = p [ 4 ] p [ 0 ] = ScadFunction ( p [ 2 ] , params )