From 065a88d0ccc38c31b40f8f5dfd46d64448fb82b0 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 24 Apr 2009 21:41:26 -0500 Subject: [PATCH] fix grammer expansion. --- library/apply_macros.yap | 4 ++-- library/expand_macros.yap | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/library/apply_macros.yap b/library/apply_macros.yap index 5e6215863..a2f2eaf55 100644 --- a/library/apply_macros.yap +++ b/library/apply_macros.yap @@ -4,7 +4,7 @@ % Purpose: Macros to apply a predicate to all elements % of a list or to all sub-terms of a term. -:- reexport(library(maplist), [selectlist/3, +:- reexport(maplist, [selectlist/3, checklist/2, maplist/2, maplist/3, @@ -24,6 +24,6 @@ ]). -:- use_module(library(expand_macros)). +:- use_module(expand_macros,[]). diff --git a/library/expand_macros.yap b/library/expand_macros.yap index c5e2328c2..feb8ed91a 100644 --- a/library/expand_macros.yap +++ b/library/expand_macros.yap @@ -8,6 +8,7 @@ :- use_module(library(lists), [append/3]). :- use_module(library(charsio), [format_to_chars/3, read_from_chars/2]). :- use_module(library(error), [must_be/2]). +:- use_module(library(occurs), [sub_term/2]). :- multifile user:goal_expansion/3. @@ -393,6 +394,7 @@ user:goal_expansion(sumnodes(Meta, Term, AccIn, AccOut), Mod, Goal) :- ), RecursiveCall) ], Module). +:- unhide('$translate_rule'). % stolen from SWI-Prolog user:goal_expansion(phrase(NT,Xs), Mod, NTXsNil) :- user:goal_expansion(phrase(NT,Xs,[]), Mod, NTXsNil). @@ -418,6 +420,7 @@ user:goal_expansion(phrase(NT,Xs0,Xs), _Mod, NewGoal) :- NewGoal = NewGoal1 ; ( Xs0 = Xs0c, NewGoal1 ) = NewGoal ). +:- hide('$translate_rule'). %%%%%%%%%%%%%%%%%%%% % utilities