A definite clause grammar (DCG) is a way of expressing grammar, either for natural or formal languages, in a logic programming language such as Prolog. It is closely related to the concept of attribute grammars / affix grammars.
DCGs are usually associated with Prolog, but similar languages such as Mercury also include DCGs. They are called definite clause grammars because they represent a grammar as a set of definite clauses in first-order logic.
The term DCG refers to the specific type of expression in Prolog and other similar languages; not all ways of expressing grammars using definite clauses are considered DCGs. However, all of the capabilities or properties of DCGs will be the same for any grammar that is represented with definite clauses in essentially the same way as in Prolog.
The definite clauses of a DCG can be considered a set of axioms where the validity of a sentence, and the fact that it has a certain parse tree can be considered theorems that follow from these axioms.[1] This has the advantage of making it so that recognition and parsing of expressions in a language becomes a general matter of proving statements, such as statements in a logic programming language.
^Johnson, M. (1994). "Two ways of formalizing grammars". Linguistics and Philosophy. 17 (3): 221–240. doi:10.1007/BF00985036. S2CID 62165766.
and 22 Related for: Definite clause grammar information
A definiteclausegrammar (DCG) is a way of expressing grammar, either for natural or formal languages, in a logic programming language such as Prolog...
outcome in a very short time. There is a special notation called definiteclausegrammars (DCGs). A rule defined via -->/2 instead of :-/2 is expanded by...
Pullum (2002). Cambridge Grammar of the English Language. Cambridge: Cambridge University Press. Abbott, Barbara (2006). "Definiteness and indefiniteness"...
In grammar, sentence and clause structure, commonly known as sentence composition, is the classification of sentences based on the number and kind of clauses...
Daco-Romanian language within Eastern Romance) shares largely the same grammar and most of the vocabulary and phonological processes with the other three...
English grammar is the set of structural rules of the English language. This includes the structure of words, phrases, clauses, sentences, and whole texts...
Swedish is descended from Old Norse. Compared to its progenitor, Swedish grammar is much less characterized by inflection. Modern Swedish has two genders...
clause is a clause that modifies a noun or noun phrase and uses some grammatical device to indicate that one of the arguments in the relative clause refers...
Danish grammar is either the study of the grammar of the Danish language, or the grammatical system itself of the Danish language. Danish is often described...
including constraint programming over a finite domain, parsing using definiteclausegrammars, and an operating system interface. The compiler converts the source...
Ancient Greek grammar is morphologically complex and preserves several features of Proto-Indo-European morphology. Nouns, adjectives, pronouns, articles...
Arabic grammar (Arabic: النَّحْوُ العَرَبِيُّ) is the grammar of the Arabic language. Arabic is a Semitic language and its grammar has many similarities...
The grammar of the German language is quite similar to that of the other Germanic languages. Although some features of German grammar, such as the formation...
Persian grammar (Persian: دستور زبان فارسی, Dastur-e Zabân-e Fârsi lit. Grammar of the Persian language) is the grammar of the Persian language, whose...
The grammar of Modern Hebrew shares similarities with that of its Biblical Hebrew counterpart, but it has evolved significantly over time. Modern Hebrew...
grammars for the habitual aspect. This is quite different from its use in Greek grammars, where it means perfective aspect: what is called "definite past"...
inflected for number (singular/plural) and for definiteness (indefinite/definite). In a few dialects, definite nouns are also inflected for the dative case...
nominative (total object) (24). In the affirmative clause the total object refers to definite quantity and the clause expresses a perfective activity. If at least...
Tagalog grammar (Tagalog: Balarilà ng Tagalog) are the rules that describe the structure of expressions in the Tagalog language, one of the languages...
otherwise presumed familiar to listeners, readers, or speakers. It is the definite article in English. The is the most frequently used word in the English...
Network, Quezon Province, Philippines DCG-IV, a research drug Definiteclausegrammar, a means of expressing grammatical relationships Democratic Montenegro...