Subject: Re: [SWIPL] SWI-Prolog - Definite Clause Grammar

From: "tim menzies" <[email-masked]>
Date: Tue, 16 Oct 2001 11:31:59 -0700

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" <[email-masked]>
To: <[email-masked]>
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 [email-masked] 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/
>
>