This commit is contained in:
Vitor Santos Costa
2019-03-20 10:52:38 +00:00
parent e626847e93
commit 9980dd49a7
13 changed files with 68 additions and 2566 deletions

View File

@@ -83,9 +83,9 @@ python_query( Caller, String, Bindings ) :-
Caller.q.port := Status,
output(Caller, Bindings).
output( _, Bindings ) :-
write_query_answer( Bindings ),
fail.
%% output( _, Bindings ) :-
%% write_query_answer( Bindings ),
%% fail.
output( Caller, Bindings) :-
maplist(into_dict(Caller),Bindings).
@@ -96,21 +96,3 @@ bv(V,I,I1) :-
into_dict(D,V0=T) :-
D.q.answer[V0] := T.
/**
*
*/
ground_dict(_Dict,var([_V]), I, I) :-
!.
ground_dict(_Dict,var([V,V]), I, I) :-
!.
ground_dict(Dict, nonvar([V0|Vs],T),I0, [V0=T| I0]) :-
!,
ground_dict(Dict, var([V0|Vs]),I0, I0).
ground_dict(Dict, var([V0,V1|Vs]), I, I) :-
!,
Dict[V1] := V0,
ground_dict(Dict, var([V0|Vs]), I, I).

View File

@@ -411,8 +411,13 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/kerne
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/yap.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/yap.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/codemirror/prolog.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/prolog.js
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/codemirror/prolog.js
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/meta.js
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/misc/editors/codemirror/meta.js ${CMAKE_CURRENT_BINARY_DIR}/yap_kernel/resources/meta.js
DEPENDS ${CMAKE_SOURCE_DIR}/misc/editors/codemirror/meta.js
)

View File

@@ -25,7 +25,7 @@ output for a aline such as:
fs.ensureDirSync('node_modules/codemirror/mode/prolog');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/prolog.js'), 'node_modules/codemirror/mode/prolog/prolog.js');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/meta.js'), 'node_modules/codemirror/mode/meta.js');
~~~~~~~~
..~~~~~~~~
These lines should copy YAP's prolog.js and a new version of the mode directory, meta.js. whenever you rebuild jlab, eg, if you add a new plugin.
Next, please check the lines in context.