Lexical ambiguities in Prolog

Hello.
I am not using Prolog per se but I am comparing different languages designs focusing on parsing and grammar. For example, I noticed that the dot symbol ‘.’ has several purposes in Prolog, to mark the end of a fact or rule, to separate parts of float numbers, to form lists, and possibly others.

Does it lead to lexical ambiguities and do you stumble upon them in practice if at all? If so do you have practical tricks to avoid the ambiguities?

Have you studied the computer science topic of parsing? The basics of it might help in understanding the issue.

AFAIK, the dot symbol, despite having multiple uses, is well defined and does not lead to ambiguity.

1 Like