start | find | index | login or register | edit
DCG
by earl, 7757 days ago
Definite Clause Grammar

Basically, DCGs are an intuitive notation for CFGs in Prolog. A CFG (being a formal language) can directly and validly be transformed into a DCG (being a formal language). Once DCGs are consulted (loaded) by a Prolog implementation, they will be immediatly translated into Prolog clauses.

"DCG notation is a natural notation that lets us write context free grammars in a natural way. DCGs translate into a difference list representation that allows far more efficient processing than a naive single-list representation [...]"

Further, the relationship between DCGs and their corresponding Prolog rules allows for a natural notation of syntactic features. Features are an approach to grammar description facilitating multiple classification / sub-categorization in a clean way.
powered by vanilla
echo earlZstrainYat|tr ZY @.
earl.strain.at • esa3 • online for 8453 days • c'est un vanilla site