一、
string_to_term(String) ->
case erl_scan:string(String++".") of
{ok, Tokens, _} ->
case erl_parse:parse_term(Tokens) of
{ok, Term} -> Term;
_Err -> undefined
end;
_Error ->
undefined
end.