From a128d1d78df1125e2c07310cced0f819b4de45b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 13 Feb 2012 09:39:29 +0000 Subject: [PATCH] allow calling directives with VL and Line Number. --- pl/boot.yap | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pl/boot.yap b/pl/boot.yap index 81d411ded..011d2bab0 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -311,7 +311,7 @@ true :- true. ( O = (:- G1) -> - '$process_directive'(G1, Option, M) + '$process_directive'(G1, Option, M, VL, Pos) ; '$execute_commands'(O,VL,Pos,Option,O) ). @@ -328,33 +328,33 @@ true :- true. % SICStus accepts everything in files % YAP accepts everything everywhere % - '$process_directive'(G, top, M) :- + '$process_directive'(G, top, M, VL, Pos) :- '$access_yap_flags'(8, 0), !, % YAP mode, go in and do it, - '$process_directive'(G, consult, M). - '$process_directive'(G, top, _) :- !, + '$process_directive'(G, consult, M, VL, Pos). + '$process_directive'(G, top, _, _, _) :- !, '$do_error'(context_error((:- G),clause),query). % % allow modules % - '$process_directive'(M:G, Mode, _) :- !, - '$process_directive'(G, Mode, M). + '$process_directive'(M:G, Mode, _, VL, Pos) :- !, + '$process_directive'(G, Mode, M, VL, Pos). % % default case % - '$process_directive'(Gs, Mode, M) :- + '$process_directive'(Gs, Mode, M, VL, Pos) :- '$all_directives'(Gs), !, - '$exec_directives'(Gs, Mode, M). + '$exec_directives'(Gs, Mode, M, VL, Pos). % % ISO does not allow goals (use initialization). % - '$process_directive'(D, _, M) :- + '$process_directive'(D, _, M, VL, Pos) :- '$access_yap_flags'(8, 1), !, % ISO Prolog mode, go in and do it, '$do_error'(context_error((:- M:D),query),directive). % % but YAP and SICStus does. % - '$process_directive'(G, _, M) :- + '$process_directive'(G, _, M, VL, Pos) :- '$exit_system_mode', ( '$notrace'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ), '$enter_system_mode'.