DCGs use both unification and backtracking, so the implementation of the Prolog kernel should not be avoided. That is, you can present any pure Prolog program as a DCG by analyzing an empty list.
You can do this if you are not indifferent to any special case of DCG, for example, without variables (useful only for recognition, not for parsing).
source
share