jupyter
This commit is contained in:
parent
a073b663ae
commit
530246688c
54
C/yap-args.c
54
C/yap-args.c
@ -147,8 +147,8 @@ static void init_globals(YAP_init_args *yap_init) {
|
|||||||
|
|
||||||
|
|
||||||
const char *Yap_BINDIR, *Yap_ROOTDIR, *Yap_SHAREDIR, *Yap_LIBDIR, *Yap_DLLDIR,
|
const char *Yap_BINDIR, *Yap_ROOTDIR, *Yap_SHAREDIR, *Yap_LIBDIR, *Yap_DLLDIR,
|
||||||
*Yap_PLDIR, *Yap_BOOTPLDIR, *Yap_BOOTSTRAPPLDIR, *Yap_COMMONSDIR,
|
*Yap_PLDIR, *Yap_BOOTSTRAP, *Yap_COMMONSDIR,
|
||||||
*Yap_STARTUP, *Yap_OUTPUT_STARTUP, *Yap_BOOTFILE, *Yap_INCLUDEDIR;
|
*Yap_STARTUP, *Yap_INPUT_STARTUP, *Yap_OUTPUT_STARTUP, *Yap_BOOTFILE, *Yap_INCLUDEDIR;
|
||||||
|
|
||||||
/* do initial boot by consulting the file boot.yap */
|
/* do initial boot by consulting the file boot.yap */
|
||||||
static void consult(const char *b_file USES_REGS) {
|
static void consult(const char *b_file USES_REGS) {
|
||||||
@ -188,7 +188,7 @@ static void consult(const char *b_file USES_REGS) {
|
|||||||
fprintf(stderr, "[ SYNTAX ERROR: while parsing stream %s at line %ld ]\n",
|
fprintf(stderr, "[ SYNTAX ERROR: while parsing stream %s at line %ld ]\n",
|
||||||
b_file, GLOBAL_Stream[c_stream].linecount);
|
b_file, GLOBAL_Stream[c_stream].linecount);
|
||||||
} else if (IsVarTerm(t) || t == TermNil) {
|
} else if (IsVarTerm(t) || t == TermNil) {
|
||||||
fprintf(stderr, "[ line %d: term cannot be compiled ]",
|
fprintf(stderr, "[ line: " Int_FORMAT ": term cannot be compiled ]",
|
||||||
GLOBAL_Stream[c_stream].linecount);
|
GLOBAL_Stream[c_stream].linecount);
|
||||||
} else if (IsApplTerm(t) && (FunctorOfTerm(t) == functor_query ||
|
} else if (IsApplTerm(t) && (FunctorOfTerm(t) == functor_query ||
|
||||||
FunctorOfTerm(t) == functor_command1)) {
|
FunctorOfTerm(t) == functor_command1)) {
|
||||||
@ -337,13 +337,13 @@ static const char * join(const char *s, ...) {
|
|||||||
#endif
|
#endif
|
||||||
false );
|
false );
|
||||||
/// BOOTPLDIR: where we can find Prolog bootstrap files
|
/// BOOTPLDIR: where we can find Prolog bootstrap files
|
||||||
Yap_BOOTPLDIR = sel(true,
|
Yap_BOOTSTRAP = sel(true,
|
||||||
iap->BOOTPLDIR != NULL, iap->BOOTPLDIR,
|
iap->BOOTSTRAP != NULL, iap->BOOTSTRAP,
|
||||||
true,
|
true,
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
"/assets/Yap/pl",
|
"/assets/Yap/pl",
|
||||||
#else
|
#else
|
||||||
join(getenv("DESTDIR"),YAP_PLDIR "/pl", NULL),
|
join(getenv("DESTDIR"),YAP_BOOTSTRAP, NULL),
|
||||||
#endif
|
#endif
|
||||||
false );
|
false );
|
||||||
/// BOOTFILE: where we can find the core Prolog bootstrap file
|
/// BOOTFILE: where we can find the core Prolog bootstrap file
|
||||||
@ -357,24 +357,24 @@ static const char * join(const char *s, ...) {
|
|||||||
#endif
|
#endif
|
||||||
false );
|
false );
|
||||||
/// STARTUP: where we can find the core Prolog bootstrap file
|
/// STARTUP: where we can find the core Prolog bootstrap file
|
||||||
Yap_STARTUP = sel(false,
|
Yap_OUTPUT_STARTUP = sel(false,
|
||||||
iap->STARTUP != NULL, iap->STARTUP,
|
iap->OUTPUT_STARTUP != NULL, iap->OUTPUT_STARTUP,
|
||||||
true,
|
true,
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
NULL,
|
NULL,
|
||||||
#else
|
#else
|
||||||
join(getenv("DESTDIR"),YAP_STARTUP,NULL),
|
join(getenv("DESTDIR"),YAP_OUTPUT_STARTUP,NULL),
|
||||||
#endif
|
#endif
|
||||||
false );
|
false );
|
||||||
Yap_OUTPUT_STARTUP = sel(false,
|
Yap_INPUT_STARTUP = sel(false,
|
||||||
iap->OUTPUT_STARTUP != NULL, iap->OUTPUT_STARTUP,
|
iap->INPUT_STARTUP != NULL, iap->INPUT_STARTUP,
|
||||||
true,
|
true,
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
NULL,
|
NULL,
|
||||||
#else
|
#else
|
||||||
join(getenv("DESTDIR"),YAP_STARTUP,NULL),
|
join(getenv("DESTDIR"),YAP_INPUT_STARTUP,NULL),
|
||||||
#endif
|
#endif
|
||||||
false );
|
false );
|
||||||
if (Yap_ROOTDIR)
|
if (Yap_ROOTDIR)
|
||||||
setAtomicGlobalPrologFlag(HOME_FLAG,
|
setAtomicGlobalPrologFlag(HOME_FLAG,
|
||||||
MkAtomTerm(Yap_LookupAtom(Yap_ROOTDIR)));
|
MkAtomTerm(Yap_LookupAtom(Yap_ROOTDIR)));
|
||||||
@ -490,7 +490,7 @@ X_API YAP_file_type_t Yap_InitDefaults(void *x, char *saved_state, int argc,
|
|||||||
iap->assetManager = NULL;
|
iap->assetManager = NULL;
|
||||||
#else
|
#else
|
||||||
iap->boot_file_type = YAP_QLY;
|
iap->boot_file_type = YAP_QLY;
|
||||||
iap->STARTUP = saved_state;
|
iap->INPUT_STARTUP = saved_state;
|
||||||
#endif
|
#endif
|
||||||
iap->Argc = argc;
|
iap->Argc = argc;
|
||||||
iap->Argv = argv;
|
iap->Argv = argv;
|
||||||
@ -526,9 +526,9 @@ X_API YAP_file_type_t YAP_parse_yap_arguments(int argc, char *argv[],
|
|||||||
case 'B':
|
case 'B':
|
||||||
iap->boot_file_type = YAP_BOOT_PL;
|
iap->boot_file_type = YAP_BOOT_PL;
|
||||||
if (p[1])
|
if (p[1])
|
||||||
iap->BOOTFILE = p + 1;
|
iap->BOOTSTRAP = p + 1;
|
||||||
else if (argv[1] && *argv[1] != '-') {
|
else if (argv[1] && *argv[1] != '-') {
|
||||||
iap->BOOTFILE = *++argv;
|
iap->BOOTSTRAP = *++argv;
|
||||||
argc--;
|
argc--;
|
||||||
}
|
}
|
||||||
iap->install = true;
|
iap->install = true;
|
||||||
@ -912,7 +912,7 @@ X_API YAP_file_type_t YAP_parse_yap_arguments(int argc, char *argv[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iap->STARTUP = p;
|
iap->INPUT_STARTUP = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iap->boot_file_type;
|
return iap->boot_file_type;
|
||||||
@ -1057,9 +1057,9 @@ X_API YAP_file_type_t YAP_Init(YAP_init_args *yap_init) {
|
|||||||
Yap_ExecutionMode = yap_init->ExecutionMode;
|
Yap_ExecutionMode = yap_init->ExecutionMode;
|
||||||
Yap_set_locations(yap_init);
|
Yap_set_locations(yap_init);
|
||||||
|
|
||||||
if (!do_bootstrap && Yap_STARTUP && yap_init->boot_file_type != YAP_BOOT_PL &&
|
if (!do_bootstrap && Yap_INPUT_STARTUP && yap_init->boot_file_type != YAP_BOOT_PL &&
|
||||||
Yap_SavedInfo(Yap_STARTUP, &minfo.Trail, &minfo.Stack, &minfo.Heap) &&
|
Yap_SavedInfo(Yap_INPUT_STARTUP, &minfo.Trail, &minfo.Stack, &minfo.Heap) &&
|
||||||
Yap_Restore(Yap_STARTUP)) {
|
Yap_Restore(Yap_INPUT_STARTUP)) {
|
||||||
setBooleanGlobalPrologFlag(SAVED_PROGRAM_FLAG, true);
|
setBooleanGlobalPrologFlag(SAVED_PROGRAM_FLAG, true);
|
||||||
CurrentModule = LOCAL_SourceModule = USER_MODULE;
|
CurrentModule = LOCAL_SourceModule = USER_MODULE;
|
||||||
init_globals(yap_init);
|
init_globals(yap_init);
|
||||||
@ -1071,8 +1071,8 @@ X_API YAP_file_type_t YAP_Init(YAP_init_args *yap_init) {
|
|||||||
init_globals(yap_init);
|
init_globals(yap_init);
|
||||||
|
|
||||||
start_modules();
|
start_modules();
|
||||||
consult(Yap_BOOTFILE PASS_REGS);
|
consult(Yap_BOOTSTRAP PASS_REGS);
|
||||||
if (yap_init->install && Yap_OUTPUT_STARTUP == NULL) {
|
if (yap_init->install && Yap_OUTPUT_STARTUP) {
|
||||||
Term t = MkAtomTerm(Yap_LookupAtom(Yap_OUTPUT_STARTUP));
|
Term t = MkAtomTerm(Yap_LookupAtom(Yap_OUTPUT_STARTUP));
|
||||||
Term g = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("qsave_program"), 1),
|
Term g = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("qsave_program"), 1),
|
||||||
1, &t);
|
1, &t);
|
||||||
|
32
CXX/yapq.hh
32
CXX/yapq.hh
@ -189,9 +189,9 @@ struct X_API YAPEngineArgs : YAP_init_args {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
YAPEngineArgs() {
|
YAPEngineArgs() {
|
||||||
const std::string *s = new std::string("startup.yss");
|
// const std::string *s = new std::string("startup.yss");
|
||||||
Embedded = true;
|
Embedded = true;
|
||||||
Yap_InitDefaults(this, (char *)s->c_str(), 0, nullptr);
|
Yap_InitDefaults(this, nullptr, 0, nullptr);
|
||||||
#if YAP_PYTHON
|
#if YAP_PYTHON
|
||||||
Embedded = true;
|
Embedded = true;
|
||||||
python_in_python = Py_IsInitialized();
|
python_in_python = Py_IsInitialized();
|
||||||
@ -233,26 +233,34 @@ public:
|
|||||||
inline const char *getSHAREDIR() { return SHAREDIR; };
|
inline const char *getSHAREDIR() { return SHAREDIR; };
|
||||||
|
|
||||||
|
|
||||||
inline void setRESTORE(const char *fl) {
|
inline void setINPUT_RESTORE(const char *fl) {
|
||||||
STARTUP = (const char *)malloc(strlen(fl) + 1);
|
STARTUP = (const char *)malloc(strlen(fl) + 1);
|
||||||
strcpy((char *)STARTUP, fl);
|
strcpy((char *)INPUT_STARTUP, fl);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const char *getSTARTUP() { return STARTUP; };
|
inline const char *getINPUT_STARTUP() { return INPUT_STARTUP; };
|
||||||
|
|
||||||
inline void setBOOTFILE(const char *fl) {
|
|
||||||
|
inline void setOUTPUT_RESTORE(const char *fl) {
|
||||||
|
STARTUP = (const char *)malloc(strlen(fl) + 1);
|
||||||
|
strcpy((char *)OUTPUT_STARTUP, fl);
|
||||||
|
};
|
||||||
|
|
||||||
|
inline const char *getINPUT_STARTUP() { return OUTPUT_STARTUP; };
|
||||||
|
|
||||||
|
inline void setBOOTFILE(const char *fl) {
|
||||||
BOOTFILE = (const char *)malloc(strlen(fl) + 1);
|
BOOTFILE = (const char *)malloc(strlen(fl) + 1);
|
||||||
strcpy((char *)BOOTFILE, fl);
|
strcpy((char *)BOOTFILE, fl);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const char *getBOOTFILE() { return BOOTFILE; };
|
inline const char *getBOOTFILE() { return BOOTFILE; };
|
||||||
|
|
||||||
inline void setPrologBOOTPLDIR(const char *fl) {
|
inline void setPrologBOOTSTRAP(const char *fl) {
|
||||||
BOOTPLDIR = (const char *)malloc(strlen(fl) + 1);
|
BOOTSTRAP = (const char *)malloc(strlen(fl) + 1);
|
||||||
strcpy((char *)BOOTPLDIR, fl);
|
strcpy((char *)BOOTSTRAP, fl);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const char *getBOOTPLDIR() { return BOOTPLDIR; };
|
inline const char *getBOOTSTRAP() { return BOOTSTRAP; };
|
||||||
|
|
||||||
inline void setPrologGoal(const char *fl) { PrologGoal = fl; };
|
inline void setPrologGoal(const char *fl) { PrologGoal = fl; };
|
||||||
|
|
||||||
|
4
H/Yap.h
4
H/Yap.h
@ -151,7 +151,9 @@ typedef void *(*fptr_t)(void);
|
|||||||
main exports in YapInterface.h
|
main exports in YapInterface.h
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
|
|
||||||
extern const char *Yap_BINDIR, *Yap_ROOTDIR, *Yap_SHAREDIR, *Yap_LIBDIR, *Yap_DLLDIR, *Yap_PLDIR, *Yap_COMMONSDIR, *Yap_STARTUP, *Yap_BOOTFILE, *Yap_INCLUDEDIR;
|
extern const char *Yap_BINDIR, *Yap_ROOTDIR, *Yap_SHAREDIR, *Yap_LIBDIR, *Yap_DLLDIR,
|
||||||
|
*Yap_PLDIR, *Yap_COMMONSDIR, *Yap_STARTUP,*Yap_INPUT_STARTUP,*Yap_OUTPUT_STARTUP,
|
||||||
|
*Yap_BOOTFILE, *Yap_INCLUDEDIR;
|
||||||
|
|
||||||
|
|
||||||
/* Basic exports */
|
/* Basic exports */
|
||||||
|
@ -32,6 +32,7 @@ Set or read system properties for _Param_:
|
|||||||
@enum GlobalFlags Global Flags Dupported ny YAP *
|
@enum GlobalFlags Global Flags Dupported ny YAP *
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
YAP_FLAG(ADDRESS_BITS_FLAG, "address_bits", false, nat, BITNESS, NULL), /**< `address_bits`
|
YAP_FLAG(ADDRESS_BITS_FLAG, "address_bits", false, nat, BITNESS, NULL), /**< `address_bits`
|
||||||
Number of address bits in the machine, either 64 or 32 bits */
|
Number of address bits in the machine, either 64 or 32 bits */
|
||||||
|
|
||||||
@ -358,7 +359,7 @@ call_count_data/3 built-in.
|
|||||||
YAP_FLAG(REPORT_ERROR_FLAG, "report_error", true, booleanFlag, "true",
|
YAP_FLAG(REPORT_ERROR_FLAG, "report_error", true, booleanFlag, "true",
|
||||||
NULL),
|
NULL),
|
||||||
YAP_FLAG(RESOURCE_DATABASE_FLAG, "resource_database", false, isatom,
|
YAP_FLAG(RESOURCE_DATABASE_FLAG, "resource_database", false, isatom,
|
||||||
"pl/boot.yap", NULL),
|
YAP_BOOTSTRAP, NULL),
|
||||||
/**<`resource_database`
|
/**<`resource_database`
|
||||||
Name of the resource file (saved-state or Prolog file) used to construct
|
Name of the resource file (saved-state or Prolog file) used to construct
|
||||||
the YAP
|
the YAP
|
||||||
|
@ -198,7 +198,8 @@ set (INCLUDE_HEADERS
|
|||||||
${CMAKE_SOURCE_DIR}/include/GitSHA1.h
|
${CMAKE_SOURCE_DIR}/include/GitSHA1.h
|
||||||
${CMAKE_SOURCE_DIR}/include/SWI-Prolog.h
|
${CMAKE_SOURCE_DIR}/include/SWI-Prolog.h
|
||||||
${CMAKE_SOURCE_DIR}/include/VFS.h
|
${CMAKE_SOURCE_DIR}/include/VFS.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapDefs.h
|
${CMAKE_SOURCE_DIR}/include/YapBlobs.h
|
||||||
|
${CMAKE_SOURCE_DIR}/include/YapDefs.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapError.h
|
${CMAKE_SOURCE_DIR}/include/YapError.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapErrors.h
|
${CMAKE_SOURCE_DIR}/include/YapErrors.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapFormat.h
|
${CMAKE_SOURCE_DIR}/include/YapFormat.h
|
||||||
@ -206,7 +207,6 @@ set (INCLUDE_HEADERS
|
|||||||
${CMAKE_SOURCE_DIR}/include/YapRegs.h
|
${CMAKE_SOURCE_DIR}/include/YapRegs.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapStreams.h
|
${CMAKE_SOURCE_DIR}/include/YapStreams.h
|
||||||
${CMAKE_SOURCE_DIR}/include/YapTerm.h
|
${CMAKE_SOURCE_DIR}/include/YapTerm.h
|
||||||
${CMAKE_SOURCE_DIR}/include/blobs.h
|
|
||||||
${CMAKE_SOURCE_DIR}/include/c_interface.h
|
${CMAKE_SOURCE_DIR}/include/c_interface.h
|
||||||
${CMAKE_SOURCE_DIR}/include/clause_list.h
|
${CMAKE_SOURCE_DIR}/include/clause_list.h
|
||||||
${CMAKE_SOURCE_DIR}/include/pl-types.h
|
${CMAKE_SOURCE_DIR}/include/pl-types.h
|
||||||
|
@ -1956,17 +1956,6 @@ significant byte first (like Motorola and SPARC, unlike Intel). */
|
|||||||
#cmakedefine YAP_IS_MOVABLE "${YAP_IS_MOVABLE}"
|
#cmakedefine YAP_IS_MOVABLE "${YAP_IS_MOVABLE}"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* saved state file */
|
|
||||||
#ifndef YAP_STARTUP
|
|
||||||
#define YAP_STARTUP "${YAP_STARTUP}"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* saved state file */
|
|
||||||
#ifndef YAP_BOOTFILE
|
|
||||||
#define YAP_BOOTFILE "${YAP_BOOTFILE}"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* date of compilation */
|
|
||||||
#ifndef YAP_TIMESTAMP
|
#ifndef YAP_TIMESTAMP
|
||||||
#define YAP_TIMESTAMP ${YAP_TIMESTAMP}
|
#define YAP_TIMESTAMP ${YAP_TIMESTAMP}
|
||||||
#endif
|
#endif
|
||||||
@ -2013,6 +2002,7 @@ significant byte first (like Motorola and SPARC, unlike Intel). */
|
|||||||
#define YAP_DLLDIR "${YAP_LIBDIR}/Yap"
|
#define YAP_DLLDIR "${YAP_LIBDIR}/Yap"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* name of YAP JIT library */
|
/* name of YAP JIT library */
|
||||||
#ifndef YAP_YAPJITLIB
|
#ifndef YAP_YAPJITLIB
|
||||||
#define YAP_YAPJITLIB "${YAP_YAPJITLIB}"
|
#define YAP_YAPJITLIB "${YAP_YAPJITLIB}"
|
||||||
@ -2033,6 +2023,27 @@ significant byte first (like Motorola and SPARC, unlike Intel). */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* run-time boot */
|
||||||
|
#ifndef YAP_BOOTFILE
|
||||||
|
#define YAP_BOOTFILE "${YAP_PLDIR}/pl/boot.yap"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* init-time boot */
|
||||||
|
#ifndef YAP_BOOTSTRAP
|
||||||
|
#define YAP_BOOTSTRAP "${CMAKE_SOURCE_DIR}/pl/boot.yap"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* run-time boot */
|
||||||
|
#ifndef YAP_INPUT_STARTUP
|
||||||
|
#define YAP_INPUT_STARTUP "${YAP_DLLDIR}/${YAP_STARTUP}"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* init-time boot */
|
||||||
|
##ifndef YAP_OUTPUT_STARTUP
|
||||||
|
##define YAP_OUTPUT_STARTUP "${CMAKE_BINARY_DIR}/${YAP_STARTUP}"
|
||||||
|
##endif
|
||||||
|
|
||||||
/* HP-UX old socket stuff */
|
/* HP-UX old socket stuff */
|
||||||
#ifndef _XOPEN_SOURCE
|
#ifndef _XOPEN_SOURCE
|
||||||
|
@ -195,13 +195,12 @@ typedef struct yap_boot_params {
|
|||||||
const char *PLDIR;
|
const char *PLDIR;
|
||||||
//> if NON-NULL, Prolog library, sets Yap_COMMONSDIR
|
//> if NON-NULL, Prolog library, sets Yap_COMMONSDIR
|
||||||
const char *COMMONSDIR;
|
const char *COMMONSDIR;
|
||||||
//> if NON-NULL, name for a Prolog file to use when booting
|
//> if NON-NULL, name for a Prolog file to use when booting at run-time
|
||||||
const char *BOOTFILE;
|
const char *BOOTFILE;
|
||||||
//> if NON-NULL, directory for a Prolog file to be when booting
|
//> if NON-NULL, name for a Prolog file to use when booting at compile-time
|
||||||
const char *BOOTPLDIR;
|
const char *BOOTSTRAP;
|
||||||
const char *BOOTPLFILE;
|
|
||||||
//> if NON-NULL, path where we can find the saved state
|
//> if NON-NULL, path where we can find the saved state
|
||||||
const char *STARTUP;
|
const char *INPUT_STARTUP;
|
||||||
//> bootstrapping mode: YAP is not properly installed
|
//> bootstrapping mode: YAP is not properly installed
|
||||||
bool install;
|
bool install;
|
||||||
//> generats a saved space at this path
|
//> generats a saved space at this path
|
||||||
|
@ -429,11 +429,7 @@ static Int access_file(USES_REGS1) {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
<<<<<<< HEAD
|
|
||||||
return true;
|
|
||||||
=======
|
|
||||||
return false;
|
return false;
|
||||||
>>>>>>> f798372fb1dc4ff03c592d2ae8e0245a842305b8
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if HAVE_ACCESS
|
#if HAVE_ACCESS
|
||||||
|
@ -183,14 +183,21 @@ ready(Self, Line ) :-
|
|||||||
errors( Self, Text ) :-
|
errors( Self, Text ) :-
|
||||||
setup_call_cleanup(
|
setup_call_cleanup(
|
||||||
open_events( Self, Text, Stream),
|
open_events( Self, Text, Stream),
|
||||||
clauses(Self, Stream),
|
goals(Self, Stream),
|
||||||
close_events( Self )
|
close_events( Self )
|
||||||
).
|
).
|
||||||
|
|
||||||
clauses(Self, Stream) :-
|
clauses(Self, Stream) :-
|
||||||
repeat,
|
repeat,
|
||||||
read_clause(Stream, Cl, [term_position(_Pos), syntax_errors(fail)] ),
|
read_clause(Stream, Cl, [term_position(_Pos), syntax_errors(fail)] ),
|
||||||
command( Self, Cl ),
|
% command( Self, Cl ),
|
||||||
|
Cl == end_of_file,
|
||||||
|
!.
|
||||||
|
|
||||||
|
goals(Self, Stream) :-
|
||||||
|
repeat,
|
||||||
|
read_term(Stream, Cl, [term_position(_Pos), syntax_errors(fail)] ),
|
||||||
|
% command( Self, Cl ),
|
||||||
Cl == end_of_file,
|
Cl == end_of_file,
|
||||||
!.
|
!.
|
||||||
|
|
||||||
|
@ -113,6 +113,7 @@ class YAPInputSplitter(InputSplitter):
|
|||||||
return False
|
return False
|
||||||
self.errors = []
|
self.errors = []
|
||||||
self.yapeng.mgoal(errors(self, line),"user")
|
self.yapeng.mgoal(errors(self, line),"user")
|
||||||
|
print(self.errors)
|
||||||
return self.errors != []
|
return self.errors != []
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ elseif(CMAKE_CROSSCOMPILING)
|
|||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
add_custom_target(STARTUP ALL
|
add_custom_target(STARTUP ALL
|
||||||
DEPENDS ${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
DEPENDS ${CMAKE_BUILD_DIR}/${YAP_STARTUPFILE}
|
||||||
)
|
)
|
||||||
add_custom_command(OUTPUT ${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
add_custom_command(OUTPUT ${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
||||||
COMMAND yap-bin -B${CMAKE_SOURCE_DIR}/pl/boot.yap --output-saved-state=${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
COMMAND yap-bin -B${CMAKE_SOURCE_DIR}/pl/boot.yap --output-saved-state=${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
||||||
|
Reference in New Issue
Block a user