Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!news.cis.ohio-state.edu!math.ohio-state.edu!howland.erols.net!newsxfer3.itd.umich.edu!su-news-hub1.bbnplanet.com!news.bbnplanet.com!pacbell.com!amdahl.com!ogma.ccc.amdahl.com!netnews
From: "Trecom" <asperd@trecom.com>
Subject: Re: How provide input to parser
X-Nntp-Posting-Host: 159.199.162.17
Message-ID: <01bc23fd$b1b10e00$11a2c79f@Asperd.trecom>
Sender: netnews@ccc.amdahl.com (Usenet Administration)
Organization: Trecom Business Systems
X-Newsreader: Microsoft Internet News 4.70.1155
References: <01bc202e$fa39aec0$11a2c79f@Asperd.trecom> <5etjp9$h1u$1@goanna.cs.rmit.edu.au>
Date: Wed, 26 Feb 1997 15:54:24 GMT
Lines: 30



Richard A. O'Keefe <ok@goanna.cs.rmit.edu.au> wrote in article
<5etjp9$h1u$1@goanna.cs.rmit.edu.au>...

> Why not?  That's only 80kb for the list.  It's hard to get useful work
> done on a PC these days with less than 24Mb (or so I am told).
 
An unstated question or assumption of mine is that list processing may
differ from one Prolog implementation to another, such that there might be
constraints upon the lengths on Prolog lists other than those imposed by
hardware.  Is it reasonable for me to write Prolog programs as though I am
assured that lists can be as long as I want or need them to be?   Is there
a standard for this?   Is this acceptable style?

I am not writing this parser as an exercise.  I started out thinking that a
C language parser would be easier in Prolog because of its language
capabilities.  I also found Prolog attractive because Definite Clause
Grammars are more powerful and flexible than the Context Free Grammars that
Lex and Yacc can process.  I am not so concerned with speed as with ease of
implementation and flexibility.  Am I on the wrong track?  I know that, for
example, the GNU lexical analyzer for C is about 10,000 lines long.  I am
assuming that a Prolog equivalent will be much shorter.  But perhaps I will
discover that I can't do everything in Prolog.  For example, I don't
currently know of a way to do regular expression pattern matching of
constants.

Thank you very much for your reply.      
 

