From tim@menzies.com Tue Oct 16 20:27:42 2001
Received: from femail19.sdc1.sfba.home.com (femail19.sdc1.sfba.home.com [24.0.95.128])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f9GIRft28671
	for <prolog@swi.psy.uva.nl>; Tue, 16 Oct 2001 20:27:42 +0200 (MET DST)
Received: from thoughtfox ([24.78.72.224]) by femail19.sdc1.sfba.home.com
          (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP
          id <20011016182734.CWEZ15917.femail19.sdc1.sfba.home.com@thoughtfox>;
          Tue, 16 Oct 2001 11:27:34 -0700
Message-ID: <002301c15670$d9976c70$6401a8c0@thoughtfox>
Reply-To: "tim menzies" <tim@menzies.com>
From: "tim menzies" <tim@menzies.com>
To: "Dichev, Christo" <dichevc@wssu.edu>, <prolog@swi.psy.uva.nl>
References: <5B264673E9D6D111BB7500A0C99B840D02CD9B2B@wssuram1>
Subject: Re: [SWIPL] SWI-Prolog - Definite Clause Grammar
Date: Tue, 16 Oct 2001 11:31:59 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

in swi prolog, recognizing simple numbers:
http://www.ece.ubc.ca/~elec571f/numl.html

in swi prolog, parsing more complex strings (adds a tokenizer as a
pre-processor between
reading the chars from file and parsing them)
http://www.ece.ubc.ca/~elec571f/parsel.html


bu dcgs are more useful that just parsing- they can carry around updatable
state. see
fastereg2.pl in http://www.ece.ubc.ca/~elec571f/faster2l.html

(but before you read faster2l.html, better look at a
http://www.ece.ubc.ca/~elec571f/faster1l.html first)

----- Original Message -----
From: "Dichev, Christo" <dichevc@wssu.edu>
To: <prolog@swi.psy.uva.nl>
Sent: Tuesday, October 16, 2001 7:24 AM
Subject: [SWIPL] SWI-Prolog - Definite Clause Grammar


> I am not an experienced SWI-Prolog  user and I want to experiment with
some
> of the problems
> from the Language Processing chapter given in the Bratko's  book. I know
> that many Prolog
> implementations support  DCG (with its special notation "-->").  May be
> "phrase/2" or
>  "phrase/3"  are provided for that purpose, but I don't know how to use
> them.
> Is it possible to express in SWI-Prolog grammar rules in the form:
>
> s --> [a],[b].
> s --> [a],s, [b].
>
> Any assistance would be appreciated.
>
> Thanking in advance,
> Christo
>
>
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
>
> or send mail to prolog-request@swi.psy.uva.nl using the Subject:
"unsubscribe"
> (without the quotes) and *no* message body.
>
> ** An ARCHIVE of this list is maintained at
>
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
>
>

