🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #561

Re: canonical syntax

#561
From: Lee Naish
Date: Sat, 09 Dec 1989 04:21
26 lines
1672 bytes
In article <MATSC.89Dec8125828@vishnu.sics.se> matsc@sics.se (Mats Carlsson) writes:
> prefix operators
>with precedence > 999 must be parenthesized *in the canonical syntax*
>when they occur in compound terms, as in
>
>	p((public)).

In the NU-Prolog parser parentheses are not needed in this context,
which is certainly an advantage for canonical IO.  Unfortunately, some
input which "standard" parsers can handle is not accepted by NU-Prolog.
The main reason for the nonstandard parser is so we can have prefix
binary operators (for quantifiers).

>The canonical syntax would become independent of op declarations if
>the two (**) rules and the constraint on @var{atom} not being a prefix
>operator were deleted.  Would this measure make it more difficult to
>parse or cause any other bad effects?

Not being an expert in parsing (or Prolog syntax) I don't know
what bad effects there might be (possible ambiguity?).  However, the
grammar modifications suggested by Mats don't correspond to what
NU-Prolog is able to parse.  "not ?- ." causes an error, for example,
even though it is unambiguous.  By adopting Mats' scheme more
unambiguous, currently unparsable terms could be parsed.

	lee
Technical Details
Message-ID: <2899@munnari.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!lee
References: <MATSC.89Dec8125828@vishnu.sics.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!lee
From: lee@munnari.oz.au (Lee Naish)
Newsgroups: comp.lang.prolog
Subject: Re: canonical syntax
Message-ID: <2899@munnari.oz.au>
Date: 9 Dec 89 04:21:43 GMT
References: <MATSC.89Dec8125828@vishnu.sics.se>
Sender: news@cs.mu.oz.au
Reply-To: lee@munmurra.UUCP (Lee Naish)
Distribution: comp
Organization: Comp Sci, University of Melbourne
Lines: 26