Merge branch 'master' of ssh://yap.git.sourceforge.net/gitroot/yap/yap-6.3
This commit is contained in:
commit
97d216a9f3
10
C/scanner.c
10
C/scanner.c
@ -315,6 +315,11 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
|
||||
return '\n';
|
||||
case 'r':
|
||||
return '\r';
|
||||
case 's': /* space */
|
||||
if (yap_flags[CHARACTER_ESCAPE_FLAG] == ISO_CHARACTER_ESCAPES) {
|
||||
return send_error_message("invalid escape sequence \\s");
|
||||
} else
|
||||
return ' ';
|
||||
case 't':
|
||||
return '\t';
|
||||
case 'u':
|
||||
@ -357,6 +362,11 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
|
||||
}
|
||||
case 'v':
|
||||
return '\v';
|
||||
case 'z': /* Prolog end-of-file */
|
||||
if (yap_flags[CHARACTER_ESCAPE_FLAG] == ISO_CHARACTER_ESCAPES) {
|
||||
return send_error_message("invalid escape sequence \\z");
|
||||
} else
|
||||
return -1;
|
||||
case '\\':
|
||||
return '\\';
|
||||
case '\'':
|
||||
|
17
pl/boot.yap
17
pl/boot.yap
@ -144,18 +144,18 @@ true :- true.
|
||||
*/
|
||||
|
||||
/* main execution loop */
|
||||
'$read_vars'(user_input, Goal, Mod, Pos, Bindings) :-
|
||||
'$read_vars'(user_input, Goal, Mod, Pos, Bindings, Prompt) :-
|
||||
'$swi_current_prolog_flag'(readline, true),
|
||||
read_history(h, '!h',
|
||||
[trace, end_of_file],
|
||||
' ?- ', Goal, Bindings), !,
|
||||
Prompt, Goal, Bindings), !,
|
||||
(nonvar(Err) ->
|
||||
print_message(error,Err), fail
|
||||
;
|
||||
true
|
||||
).
|
||||
'$read_vars'(Stream,T,Mod,Pos,V) :-
|
||||
'$read'(true,T,Mod,V,Pos,Err,Stream),
|
||||
'$read_vars'(Stream, T, Mod, Pos, V, _Prompt) :-
|
||||
'$read'(true, T, Mod, V, Pos, Err, Stream),
|
||||
(nonvar(Err) ->
|
||||
print_message(error,Err), fail
|
||||
;
|
||||
@ -195,13 +195,12 @@ true :- true.
|
||||
prompt(_,'| '),
|
||||
prompt1(' ?- '),
|
||||
'$run_toplevel_hooks',
|
||||
'$read_vars'(user_input,Command,_,Pos,Varnames),
|
||||
'$read_vars'(user_input,Command,_,Pos,Varnames, ' ?- '),
|
||||
nb_setval('$spy_gn',1),
|
||||
% stop at spy-points if debugging is on.
|
||||
|
||||
% stop at spy-points if debugging is on.
|
||||
nb_setval('$debug_run',off),
|
||||
nb_setval('$debug_jump',off),
|
||||
prompt(_,'|: '),
|
||||
prompt1('|: '),
|
||||
'$command'(Command,Varnames,Pos,top),
|
||||
'$sync_mmapped_arrays',
|
||||
set_value('$live','$false').
|
||||
@ -1141,7 +1140,7 @@ bootstrap(F) :-
|
||||
!.
|
||||
|
||||
'$enter_command'(Stream,Status) :-
|
||||
'$read_vars'(Stream,Command,_,Pos,Vars),
|
||||
'$read_vars'(Stream,Command,_,Pos,Vars, '|: '),
|
||||
'$command'(Command,Vars,Pos,Status).
|
||||
|
||||
'$abort_loop'(Stream) :-
|
||||
|
@ -958,7 +958,7 @@ yap_flag(dialect,yap).
|
||||
'$yap_flag_show_gc_tracing'(_, _, _, off).
|
||||
|
||||
'$flag_check_alias'(OUT, Alias) :-
|
||||
stream_property(OUT,[alias(Alias)]), !.
|
||||
stream_property(OUT,alias(Alias)), !.
|
||||
|
||||
current_prolog_flag(V,Out) :-
|
||||
var(V), !,
|
||||
|
Reference in New Issue
Block a user