Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!yeshua.marcam.com!zip.eecs.umich.edu!caen!msuinfo!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!coral.cs.jcu.edu.au!geoff
From: geoff@coral.cs.jcu.edu.au (Geoff Sutcliffe)
Subject: DCGs
Message-ID: <geoff.784440211@coral.cs.jcu.edu.au>
Summary: Long list of tokens for DCGs
Keywords: DCGs Lists
Sender: news@marlin.jcu.edu.au (USENET News System)
Organization: James Cook University
Date: 10 Nov 94 04:03:31 GMT
Lines: 18

Hi,

One of the researchers in Building Management is using DCGs to some parsing
of data files (yes, I'll tell him to submit to Prolog 1000!). He has a
problem that the files are very large, so he cannot get all the tokens into
a list to be submitted to the DCG. I've been trying to dream up a way of
making 'demand driven lists' (ala Scheme's streams) for DCGs, but have 
failed. The idea is that the tokens should only be read from the file when
the DCG needs them for the parse. If backtracking is required in the parse
then the tokens remain in memory as part of the list. Ha anyone a solution
to this? Thanks for any suggestions.

Geoff
--
Geoff Sutcliffe
Department of Computer Science    Email : geoff@cs.jcu.edu.au
James Cook University             Phone : +61 77 815085/814622
Townsville, Australia, 4811.      FAX   : +61 77 814029
