The Tau-Prolog spec, unfortunate concering Le Dot, writes:
For simplicity, the terminal symbols comma and dot in the
grammar denote atom symbols (see Table 1) whose values
are ‘,’ and ‘.’, respectively.
That statement by Tau-Prolog is not 100% correct. First of all
comma and dot cannot be used as atoms, as the syntactic
category atom from Table 1 would indicate. atoms can be Prolog
terms in itself, but comma and dot cannot:
?- X = , .
ERROR: Syntax error: Operand expected, unquoted comma or bar found
?- X = . .
ERROR: Syntax error: Unbalanced operator
Second comma is from the synactic category called punctuation,
and dot is its own synactic category, called the terminal period.
Both syntactic categories are not nicely covered in Table 1.
Punctuation is a small number of characters that can only written
alone, like ,
,;
, etc.. this explains why ,,
is not recognized.
Terminal period is a period .
followed by layout \n
,
, etc..
or line comment starting with %
:
/* ISO 6.4.8 Other tokens , the ISO core standard literally says:
An end char shall be followed by a layout character or a %. */
terminal_period = "." (layout | line_comment).
/* ISO 6.5.3 Solo characters, I have only listed those
that can appear as operators and added period */
punctuation = "," | ";" | "|" | "!" | "."
There are two dots now, the terminal period and the non-terminal
period from punctuation. Which caused the ISO commitee some
headache and some Corrigenda, especially quoting during writing
and since period is not a solo character, we find for example ..
in
CLP(FD). Subsequently thirdly the grammar should say that
comma and non-terminal period can nevertheles be used as an
operator. Usually only infix or postfix, but not prefix operator:
?- read(X).
|: (A,B).
X = (_, _).
?- read(X).
|: (A.B).
X = _._.