Skip to content
Discussion options

You must be logged in to vote

The original definition you provided seems to be perfectly valid, using the non-terminal call//1 to invoke a predicate from within a DCG in such a way that the predicate can reason about the list difference.

The discussion in #2260 was about a different issue, where the predicate call/3 was originally used to invoke a non-terminal, and that is not portable. Use the predicates phrase/N, and the non-terminals phrase//N, to invoke DCG non-terminals.

Replies: 2 comments 5 replies

Comment options

bakaq
Apr 4, 2024
Author Sponsor

You must be logged in to vote
1 reply
@bakaq
Comment options

bakaq Apr 5, 2024
Author Sponsor

Comment options

You must be logged in to vote
4 replies
@bakaq
Comment options

bakaq Apr 4, 2024
Author Sponsor

@triska
Comment options

@bakaq
Comment options

bakaq Apr 5, 2024
Author Sponsor

@UWN
Comment options

Answer selected by bakaq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants