Gregory Bourassa wrote:
John,
They are used in Definite Clause Grammar (DCG) clauses to enclose a Prolog expression (term) which will not be translated by the grammar translation. As you may know, the DCG clauses are translated into plain Prolog clauses which take care of handling the lists of input tokens over which the grammar will be applied. This saves you writing the list-handling part of things, which can be boring and error-prone. The terms enclosed in curly brackets are included in these translated clauses, but without change. You generally use them to state logical relations about things in the grammar.
Aha! Thank you Gregory. What a brilliant explanation!
John O'Gorman
Regards.
Gregory Bourassa
On Nov 04, "John O'Gorman" <john.ogorman(a)zombie.co.nz> wrote:
Hi people
Can anyone tell me the meaning of {} in prolog. Claudi Marcus has examples of terms within curly braces in her book. Also Prolog: The Standard has then in its syntax diagrams.
But I cannot find any explanation of their meaning.
John O'Gorman
Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
Archived messages: <a href='http://www.clip.dia.fi.upm.es/Mail/ciao-
users/'>http://www.clip.dia.fi.upm.es/Mail/ciao-users/</a>
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------