Skip to content

Defining eos//0 portably. #2375

Answered by triska
bakaq asked this question in Q&A
Apr 4, 2024 · 2 comments · 5 replies
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

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

Comment options

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

@triska
Comment options

@bakaq
Comment options

@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