🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2675

Anyone tried to speed up dcg's?

#2675
From: Andrew Purshottam
Date: Tue, 12 May 1987 14:16
30 lines
1618 bytes
Has anyone seen anything about techniques for speeding
up the parsing of prolog DCG's? In particular, it
seems to me that one could often put an atom in the
nonterminal's clause head, if one knew (as one often
does, for artificial languages at least), the FIRST+
set for that nonterminal.  (Often this set has only
one element, or a few, and the rule could be repeated
for each).  Thus one would get an "LL(1) with
backtrack" grammar (compiler folks please excuse
oxymoron), which might run a lot faster under prologs
with first arg hashing.

Any pointers/code would be appreciated. Please mail
straight to me, I shall summarize if people are
interested.

Cheers,
	Andy

...!ucbvax!woutput
woutput@ji.berkeley.edu
(cond ((lovep you (quote LISP)) (honk)) (t (return ())))


Cheers,
	Andy

..!ucbvax!woutput
woutput@ji.berkeley.edu
(cond ((lovep you (quote LISP)) (honk)) (t (return ())))
Technical Details
Message-ID: <18848@ucbvax.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!ji.Berkeley.EDU!woutput

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!ji.Berkeley.EDU!woutput
From: woutput@ji.Berkeley.EDU (Andrew Purshottam)
Newsgroups: comp.lang.prolog
Subject: Anyone tried to speed up dcg's?
Message-ID: <18848@ucbvax.BERKELEY.EDU>
Date: Tue, 12-May-87 10:16:28 EDT
Article-I.D.: ucbvax.18848
Posted: Tue May 12 10:16:28 1987
Date-Received: Fri, 15-May-87 00:51:55 EDT
Sender: usenet@ucbvax.BERKELEY.EDU
Reply-To: woutput@ji.Berkeley.EDU.UUCP (Andrew Purshottam)
Organization: University of California, Berkeley
Lines: 30
Keywords: parsing, dcg, LL(1)
Summary: dcg's might be sped up with left context information.