reading data from a file

jm <>
Thu Dec 3 05:00:21 CET 2009

I have a file of erlang terms with comments of the form,

%% comment
  {string(), {atom(), atom() | integer}}

For example,
%% comment
%% another comment
  {"Some text", {some, none}},
  {"More text", {more, 1}}

as I thought this wold be easy to read in as many of the data files used 
with OTP have similar formats, eg emake files. Now I'm searching for a 
convenient function to road this in. I seem to be missing something. 
I've found io:scan_erl_exprs/3 but this seems a little low level. Is 
there a higher level call which will convert this text into a matching 
data structure (quick and dirty is fine)? Is there better way to do this 
that is not quick and dirty, and would be safer for publicly submitted 

thanks in advance,

More information about the erlang-questions mailing list