Source: wikibot/definite-clause-grammar

= Definite clause grammar
{wiki=Definite_clause_grammar}

Definite Clause Grammar (DCG) is a formalism used in computational linguistics and programming languages to describe the syntax of a language. It is particularly associated with Prolog, a logic programming language, but can also be used in other contexts. Here are some key points about DCGs: 1. **Syntax and Semantics**: DCGs provide a way to define grammars in a manner that is both readable and expressive.