term_expansion/2 with DCG clauses
Wouter Beek <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAE1un7PFr4qja3vz46KxLba33x-+3OzD=BxTqk2ULbjXRb8Z6Q@mail.gmail.com> |
Hi all, What would be the recommended way for replacing regular Prolog predicates with DCG rules? I would be nice if I could use the syntactic sugar / `-->`-notation in formulating the replacing rules. I was thinking of using term_expansion/2, but `ResultTerm =.. [-->,Head,Body]` would not be correct since `-->` is not the name of the predicate. --- Cheers!, Wouter. E-mail: [email protected] WWW: www.wouterbeek.com Tel.: 0647674624