title: read line to atomic list in prolog
body: <p>I need to read any line (from user_input) into an atomic list, e.g.:</p>
  
  <pre><code>Example line, which contains any ASCII chars.
  </code></pre>
  
  <p>into:</p>
  
  <pre><code>[Example,'line,',which,contains,any,ASCII,'chars.']
  </code></pre>
  
  <p>what I've got so far:</p>
  
  <pre><code>read_line_to_codes(user_input, Input),
  atom_codes(IA,Input),
  atomic_list_concat(AlistI,' ',IA).
  </code></pre>
  
  <p>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?</p>
  
  <p>oh and maybe then splitting at comma into 2d-lists, appending the dot/exclamationmark/questionmark, e.g.:</p>
  
  <pre><code>[[Example,line],[which,contains,any,ASCII,chars],'.']
  </code></pre>
  
  <p>btw: that's SWI-prolog.</p>
  
  <p>EDIT: found the solution:</p>
  
  <pre><code>read_line_to_codes(user_input, Input),
  string_to_atom(Input,IA),
  atomic_list_concat(AlistI,' ',IA),
  </code></pre>
  
  <p>can't answer my own question because i don't have 100 reputation :-/</p>