def get_vars(ast):
    """
    @brief      Exctract every free variables from AST.
    
    @param      ast   The ast
    
    @return     The variables.
    """
    
    var_list = []
    def r_get_var(ast):
        typ = ast[0]
        if typ == 'value':
            return
        elif typ == 'symb':
            if ast[1] not in var_list:
                var_list.append(ast[1])
        elif typ == 'non':
            r_get_var(ast[1])
        else:
            r_get_var(ast[1])
            r_get_var(ast[2])

    r_get_var(ast)
    return var_list