c // 1 and q // 1 are entry points (like top-level production) of a particular grammar of certain positions where you find
c(F) --> .... q(F) --> ....
This style of "calling" at the DCG entry point is not recommended, it is usually better to call the phrase (Grammar, TextToAnalyze, TextAfterAnalysis) , in this case phrase((c(F) ; q(F)), "some text", "")...
The operator --> usually overwritten by adding 2 arguments that are of concern.
EDIT
those. c(L) --> lead_in,arrange(L),end.
corresponded to
c(L,X,Y) :- lead_in(X,X1),arrange(L,X1,X2),end(X2,Y).
source share