From: Eshel Yaron Date: Mon, 13 Nov 2023 13:11:07 +0000 (+0100) Subject: ; Exclude grammar rules from regular goal completion X-Git-Tag: V9.1.19-sweep-0.27.1~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b7233ba9b3096df47649ef57a5f8d0a6eac2a858;p=sweep.git ; Exclude grammar rules from regular goal completion * sweep.pl (sweep_heads_collection/2): Exclude DCG non-terminals when completing a regular goal. --- diff --git a/sweep.pl b/sweep.pl index b5eb37c..3109b99 100644 --- a/sweep.pl +++ b/sweep.pl @@ -1288,7 +1288,11 @@ sweep_heads_collection([D,M0,Bef,Aft], Ps) :- -> true ; term_string(M, M0) ), - sweep_matching_predicates(Bef, Aft, D, M, PIs), + sweep_matching_predicates(Bef, Aft, D, M, PIs0), + ( D == 0 + -> exclude([M:P/A]>>sweep_grammar_rule(M, P, A), PIs0, PIs) + ; PIs = PIs0 + ), maplist(sweep_format_head_(D), PIs, Ps). sweep_format_head_(D, M:F/A, [S|SP]) :-