Talk:Definite clause grammar

Alternate meanings of DCG
I want to add a page about "Discounted Cumulative Gain", a popular measure for evaluating Web search and related applications, related to information retrieval in computer science.

I would like to make the current DCG page a disambiguation page. Please advise. —Preceding unsigned comment added by Drmadskills (talk • contribs) 17:56, 30 September 2008 (UTC)

Push Back
I guess there is no mention of push back in this article. Push back is found in many Prolog systems DCG implementations. It has the following syntax:

NT, PH_1 --> PH_2

The meaning is that after parsing the phrase PH_2, the phrase PH_2 is pushed back on the difference list. This allos for checking termimals without consuming them.

For example:

starts_with_digit, [X] --> [X], {digit(X)}.

Janburse (talk) 10:08, 26 November 2011 (UTC)

Negation
The article does also not mention negation in DCG or conditionals in DCG. Many Prolog system DCG implementations nowadays provide these constructs.

Nagation has the following translation:

p --> \+ q.

Is translated to:

p(X,Y) :- \+ q(X,_), X=Y.

So again the difference list is not consumed. But this time a condition is evaluated, and when it fails parsing proceeds.

Janburse (talk) 10:08, 26 November 2011 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 1 one external link on Definite clause grammar. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20090503181751/http://www.cotilliongroup.com:80/arts/DCG.html to http://www.cotilliongroup.com/arts/DCG.html

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).

Cheers.— InternetArchiveBot  (Report bug) 11:33, 1 December 2016 (UTC)