Path: utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!goedel.top.cis.syr.edu!mitanu From: mitanu@goedel.top.cis.syr.edu (Mitanu Paul) Newsgroups: comp.lang.prolog Subject: Question about operators Message-ID: <1991Feb13.123619.23855@rodan.acs.syr.edu> Date: 13 Feb 91 17:57:03 GMT References: <12166@darkstar.ucsc.edu> <4764@goanna.cs.rmit.oz.au> Reply-To: mitanu@top.cis.syr.edu (Mitanu Paul) Organization: CIS Dept., Syracuse University Lines: 35 Hi, I came across this problem. The following operators are defined: :- op(500, fx, +). :- op(500, yfx, +). :- op(200, xfy, ^). :- op(550, xf, !). :- op(550, xfx, !). The query ?- X = (a+b!). produces the following error: ** Syntax error: ** X=(a+b! ** here ** ) Similarly, the query "X=(a^b!)" gives a syntax error at the same location. Why? I guess that it is because of two op declarations for !, since I don't get the error when the op(550,xfx,!) declaration is removed. Does the parser get confused when confronted with such operators? Both C-prolog and Quintus prolog produce this error. Please reply by e-mail. Thank you. -- Mitanu (mitanu@top.cis.syr.edu)