DCGs

From: Giovambattista Ianni <ianni_at_si.deis.unical.it>
Date: Wed 17 Mar 1999 06:49:30 PM GMT
Message-Id: <36EFF93A122.8879IANNI@si.deis.unical.it>
can I employ DCGs to design language transducers, besides language
recognizers?

Yours,
Giovambattista Ianni, DEIS - "Università della Calabria"
Tel. +39 0984 494752
REPLY-TO: ianni@si.deis.unical.it
ICQ #18682480



[ Moderator's note:

Yes, you can use DCGs to both parse and generate sentances.
With the example from the manual you can do e.g.

[eclipse 3]: phrase(sentence, S).

S = [eat]     More? (;) 

S = [sing]     More? (;) 

S = [eat, the, man]     More? (;) 
...


[eclipse 4]: length(S, 5), phrase(sentence, S).

S = [the, man, eats, the, man]     More? (;) 

S = [the, man, eats, the, apple]     More? (;) 
...

]
Received on Wed Mar 17 20:04:13 1999

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:04 PM GMT GMT