(ins)?- atom_to_term( 'a+b', T, _).
T = a+b. %ok
(cmd)?- atom_to_term( 'a.b', T, _).
T = a.b. %ok
(ins)?- atom_to_term( 'a . b', T, _).
T = a. % ???
(cmd)?- atom_to_term( 'a + b', T, _).
T = a+b. % ok
Reading stops at a full stop, which is defined as a .
followed by white space or end-of-file and not immediately preceded by a symbol character. One could argue that atom_to_term/3
should raise a syntax error if not all input is processed.