From john.ogorman@zombie.co.nz Tue Nov 5 11:42:19 2002 From: John O'Gorman To: ciao-users@cliplab.org Subject: Re: curly braces Date: Tue, 05 Nov 2002 11:42:12 +0100 Message-ID: <15815.41092.190197.846556@salmon.ls.fi.upm.es> In-Reply-To: <200211041605.gA4G5I7r016352@webmail2.magma.ca> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1269173823174384728==" --===============1269173823174384728== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Gregory Bourassa wrote: >=20 > John, >=20 > 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 >=20 > Regards. >=20 > Gregory Bourassa >=20 > On Nov 04, "John O'Gorman" 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 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > Message: Address: Action: > > help majordomo(a)clip.dia.fi.upm.es Info. on useful com= mands > > subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this l= ist > > unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from th= is list > > ciao-users(a)clip.dia.fi.upm.es Send message to list > > -------------------------------------------------------------------------= ---- > > Archived messages: users/'>http://www.clip.dia.fi.upm.es/Mail/ciao-users/ > > -------------------------------------------------------------------------= ---- > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D 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 l= ist ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ ----------------------------------------------------------------------------- --===============1269173823174384728==--