read line to atomic list in prolog
I need to read any line (from user_input) into an atomic list, e.g.: Example line, which contains any ASCII chars. into: [Example,'line,',which,contains,any,ASCII,'chars.'] what I've got so far: read_line_to_codes(user_input, Input), atom_codes(IA,Input), atomic_list_concat(AlistI,' ',IA). but that only works w/ single words, because of atom_codes. read/2 also complains about spaces, so is there any way to do this? oh and maybe then splitting at comma into 2d-lists, appending the dot/exclamationmark/questionmark, e.g.: [[Example,line],[which,contains,any,ASCII,chars],'.'] btw: that's SWI