🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #270

Re: Bootstrapping precedence grammars.

#270
From: Jiyang Xu
Date: Fri, 04 Aug 1989 08:21
19 lines
1444 bytes
In article <3635@csd4.milw.wisc.edu>, markh@csd4.milw.wisc.edu (Mark William Hopkins) writes:
>    Can Prolog's read(X) predicate be defined using only the character
> predicates for I/O?  In other words, does Prolog have the capacity to
> bootstrap its own precedence grammar, using the operator declarations
> made by the op predicate?

Certainly you can, as defined in the famous O'Keefe's reader, which
is also used in SB-Prolog and possibly many other Prologs.
                                                                      
>                          op(Prec, Type, Rator)
>
> cannot be used in the mode
> 
> 			 op(OUTPUT, OUTPUT, INPUT),
                                                                   
There is another predicate "current_op/3" for this purpose.
The predicate is implemented in most Prolog systems.
                                                                      
                                                                   
Technical Details
Message-ID: <752@ecrcvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!unido!ecrcvax!jiyang
References: <3635@csd4.milw.wisc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!unido!ecrcvax!jiyang
From: jiyang@ecrcvax.UUCP (Jiyang Xu)
Newsgroups: comp.lang.prolog
Subject: Re: Bootstrapping precedence grammars.
Summary: Implement read(X) in Prolog
Message-ID: <752@ecrcvax.UUCP>
Date: 4 Aug 89 08:21:23 GMT
References: <3635@csd4.milw.wisc.edu>
Organization: ECRC, Munich 81, West Germany
Lines: 19