Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uunet!allegra!alice!pereira
From: pereira@alta.research.att.com (Fernando Pereira)
Subject: Re: Prolog syntax
In-Reply-To: jensk@hpbbn.bbn.hp.com's message of Tue, 2 May 1995 10:31:52 GMT
X-Nntp-Posting-Host: alta.research.att.com
Message-ID: <PEREIRA.95May3235508@alta.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Reply-To: pereira@research.att.com
Organization: AT&T Bell Laboratories
References: <3nc9bb$6nu@newsserv.cs.sunysb.edu> <D7y595.2s0@hpbbrd.bbn.hp.com>
Date: Thu, 4 May 1995 03:55:08 GMT
Lines: 31

In article <D7y595.2s0@hpbbrd.bbn.hp.com> jensk@hpbbn.bbn.hp.com (Jens Kilian) writes:
   On the other hand, the ISO standard allows operators as operands of terms
   in functional notation and as list elements, without restriction:

	   f(:-, :-)		[:-, :- | :-]

   Are these legal in Edinburgh Prolog?
Yes, but their legality arises from the fact that atoms with operator
properties only assume those properties when they can actually get
arguments matching the properties. In those examples, :- does not have
arguments available, to it behaves as a vanilla atom, exactly as * in

	* + *

As for 

	+ * +

the left + uses its fx property to take * as its argument, but then
the remaining + (which gets +(*) as its left argument) lacks a right
argument to satisfy its yfx property (the fx property not being
relevant for it).
--
Fernando Pereira
2B-441, AT&T Bell Laboratories
600 Mountain Ave, PO Box 636
Murray Hill, NJ 07974-0636
pereira@research.att.com
1-908-582-3980


