From 1c293a9af43893bb5449c027015dbe88bfe45438 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 27 Apr 2018 13:01:08 +0100 Subject: [PATCH] docs --- C/flags.c | 6 +- C/inlines.c | 4 +- C/parser.c | 115 - H/YapFlags.h | 25 +- H/YapGFlagInfo.h | 366 +- H/YapLFlagInfo.h | 12 + H/Yapproto.h | 6 +- OPTYap/opt.preds.c | 5 + docs/Doxyfile.in | 178 +- docs/checkpl.yap | 39 +- docs/md/attributes.md | 356 -- docs/md/fli.md | 19 +- docs/md/load_files.md | 8 +- docs/md/syntax.md | 2 +- library/clp/clpfd.pl | 12 + library/dialect/swi.yap | 5 +- library/lists.yap | 6 +- library/random.yap | 9 +- library/rbtrees.yap | 6 +- library/readutil.yap | 2 +- library/system.yap | 8 +- os/iopreds.c | 1299 +++-- os/pipes.c | 5 +- os/streams.c | 9 +- packages/gecode/clpfd.yap | 4 +- packages/gecode/gecode4.yap | 6 +- packages/gecode/gecode4_yap_hand_written.yap | 2 +- packages/gecode/gecode5_yap_hand_written.yap | 2 +- pl/arith.yap | 10 +- pl/arrays.yap | 4 +- pl/atoms.yap | 3 +- pl/boot.yap | 21 +- pl/bootlists.yap | 2 +- pl/bootutils.yap | 2 +- pl/builtins.yap | 2 +- pl/control.yap | 132 +- pl/debug.yap | 1 + pl/dialect.yap | 2 +- pl/directives.yap | 2 +- pl/error.yap | 2 +- pl/eval.yap | 2 +- pl/flags.yap | 2 +- pl/hacks.yap | 2 +- pl/meta.yap | 12 +- pl/preddyns.yap | 4 +- pl/protect.yap | 6 +- pl/spy.yap | 14 + pl/swi.yap | 2 +- pl/top.yap | 2 +- pl/ypp.yap | 8 +- swi/library/predicate_options.pl | 4434 ++++++++++++++---- 51 files changed, 4794 insertions(+), 2393 deletions(-) diff --git a/C/flags.c b/C/flags.c index d12c5f078..7229dd5e1 100644 --- a/C/flags.c +++ b/C/flags.c @@ -17,9 +17,9 @@ /** @file C/flags.c - @addtogroup Flags -@ingroup core @{ + @addtogroup Flags +@ingroup builtins */ // this is where we define flags @@ -1725,3 +1725,5 @@ void Yap_InitFlags(bool bootstrap) { } /* Accessing and changing the flags for a predicate */ + +// @} diff --git a/C/inlines.c b/C/inlines.c index e44b15d60..49ae75e81 100644 --- a/C/inlines.c +++ b/C/inlines.c @@ -21,10 +21,11 @@ @file inlines.c + @{ + @defgroup YAP_Inlines Inlined Tests nad Ter Manipulation @ingroup builtins - @{ */ @@ -1208,3 +1209,4 @@ cont_genarg( USES_REGS1 ) } +// @} diff --git a/C/parser.c b/C/parser.c index cebaa8b69..fca64504a 100755 --- a/C/parser.c +++ b/C/parser.c @@ -18,121 +18,6 @@ static char SccsId[] = "%W% %G%"; #endif -/** - -@addtogroup YAPSyntax - -describe the syntax for Prolog terms. In a second level we describe -the \a tokens from which Prolog \a terms are -built. - -@defgroup Formal_Syntax Syntax of Terms -@ingroup YAPSyntax -@{ - -Below, we describe the syntax of YAP terms from the different -classes of tokens defined above. The formalism used will be BNF, -extended where necessary with attributes denoting integer precedence or -operator type. - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - term -----> subterm(1200) end_of_term_marker - - subterm(N) ----> term(M) [M <= N] - - term(N) ----> op(N, fx) subterm(N-1) - | op(N, fy) subterm(N) - | subterm(N-1) op(N, xfx) subterm(N-1) - | subterm(N-1) op(N, xfy) subterm(N) - | subterm(N) op(N, yfx) subterm(N-1) - | subterm(N-1) op(N, xf) - | subterm(N) op(N, yf) - - term(0) ----> atom '(' arguments ')' - | '(' subterm(1200) ')' - | '{' subterm(1200) '}' - | list - | string - | number - | atom - | variable - - arguments ----> subterm(999) - | subterm(999) ',' arguments - - list ----> '[]' - | '[' list_expr ']' - - list_expr ----> subterm(999) - | subterm(999) list_tail - - list_tail ----> ',' list_expr - | ',..' subterm(999) - | '|' subterm(999) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Notes: - - + \a op(N,T) denotes an atom which has been previously declared with type - \a T and base precedence \a N. - - + Since ',' is itself a pre-declared operator with type \a xfy and - precedence 1000, is \a subterm starts with a '(', \a op must be - followed by a space to avoid ambiguity with the case of a functor - followed by arguments, e.g.: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ (a,b) [the same as '+'(','(a,b)) of arity one] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - versus - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+(a,b) [the same as '+'(a,b) of arity two] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - + -In the first rule for term(0) no blank space should exist between -\a atom and '('. - - + -Each term to be read by the YAP parser must end with a single -dot, followed by a blank (in the sense mentioned in the previous -paragraph). When a name consisting of a single dot could be taken for -the end of term marker, the ambiguity should be avoided by surrounding the -dot with single quotes. - -@} - -*/ - -/* - * Description: - * - * parser: produces a prolog term from an array of tokens - * - * parser usage: the parser takes its input from an array of token descriptions - * addressed by the global variable 'tokptr' and produces a Term as result. A - * macro 'NextToken' should be defined in 'yap.h' for advancing 'tokptr' from - * one token to the next. In the distributed version this macro also updates - * a variable named 'toktide' for keeping track of how far the parser went - * before failling with a syntax error. The parser should be invoked with - * 'tokptr' pointing to the first token. The last token should have type - * 'eot_tok'. The parser return either a Term. Syntactic errors are signaled - * by a return value 0. The parser builds new terms on the 'global stack' and - * also uses an auxiliary stack pointed to by 'AuxSp'. In the distributed - * version this auxiliary stack is assumed to grow downwards. This - * assumption, however, is only relevant to routine 'ParseArgs', and to the - * variable toktide. conclusion: set tokptr pointing to first token set AuxSp - * Call Parse - * - * VSC: Working whithout known bugs in 87/4/6 - * - * LD: -I or +I evaluated by parser 87/4/28 - * - * LD: parser extended 87/4/28 - * - */ #include "Yap.h" #include "YapEval.h" diff --git a/H/YapFlags.h b/H/YapFlags.h index 88e6ddab3..d426c79ea 100644 --- a/H/YapFlags.h +++ b/H/YapFlags.h @@ -15,8 +15,10 @@ * * *************************************************************************/ -/** @file YapFlags.h +/** + @file YapFlags.h +@{ @addtogroup YAPFlags */ @@ -228,15 +230,24 @@ typedef union flagTerm { void Yap_InitFlags(bool); -#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x +/** + @pred yap_flag( ?Param, ?Value) -typedef enum { + +Set or read system properties for _Param_: +*/ + + +#define YAP_FLAG(ITEM, NAME, WRITABLE, DEF, INIT, HELPER) ITEM + + +/* */ #include "YapGFlagInfo.h" -} global_flag_t; -typedef enum { + /* Local flags */ #include "YapLFlagInfo.h" -} local_flag_t; + + #undef YAP_FLAG bool setYapFlag(Term tflag, Term t2); @@ -372,3 +383,5 @@ xarg *Yap_ArgListToVector(Term listl, const param_t *def, int n); xarg *Yap_ArgList2ToVector(Term listl, const param2_t *def, int n); #endif // YAP_FLAGS_H + +/// @} diff --git a/H/YapGFlagInfo.h b/H/YapGFlagInfo.h index 9e31a98b8..b551f3055 100644 --- a/H/YapGFlagInfo.h +++ b/H/YapGFlagInfo.h @@ -21,44 +21,53 @@ @ingroup builtins @{ - @pred yap_flag( ?Param, ?Value) - - -Set or read system properties for _Param_: - @enum YapGFlag Prolog - @Brief global flag: -@enum GlobalFlags Global Flags Dupported ny YAP * +@enum GlobalFlags Global Flags supported by YAP + @brief global flag: */ +typedef enum { - -YAP_FLAG(ADDRESS_BITS_FLAG, "address_bits", false, nat, BITNESS, NULL), /**< `address_bits` +/**< `address_bits` Number of address bits in the machine, either 64 or 32 bits */ - -YAP_FLAG(AGC_MARGIN_FLAG, "agc_margin", true, nat, "10000", - agc_threshold), /**< `agc_margin` +YAP_FLAG(ADDRESS_BITS_FLAG, "address_bits", false, nat, BITNESS, NULL), +/**< `agc_margin` An integer: if this amount of atoms has been created since the last atom-garbage collection, perform atom garbage collection at the first opportunity. Initial value is 10,000. May be changed. A value of 0 (zero) disables atom garbage collection. */ - YAP_FLAG(ALLOW_ASSERT_FOR_STATIC_PREDICATES, - "allow_assert_for_static_predicates", true, booleanFlag, "true", - NULL), /**< `allow asserting and retracting clauses of static - predicates. */ +YAP_FLAG(AGC_MARGIN_FLAG, "agc_margin", true, nat, "10000", + agc_threshold), - /* YAP_FLAG( ALLOW_VARIABLE_NAME_AS_FUNCTOR_FLAG, - "allow_variable_name_as_functor", true, booleanFlag, "false" , NULL ), - /\**< - `allow_variable_name_as_functor` */ + /**< `allow_assert_for_static_predicates` allow asserting and retracting clauses of static + predicates. */ +YAP_FLAG(ALLOW_ASSERT_FOR_STATIC_PREDICATES, + "allow_assert_for_static_predicates", true, booleanFlag, "true", + NULL), - /* allow - * A(X) - * *\/ - */ - YAP_FLAG(ANSWER_FORMAT_FLAG, "answer_format", true, isatom, "~p", - NULL), /** `arithmetic_exceptions ` + /**< `allow_variable_name_as_functor` boolean flag allows constructs such as + ~~~~~~~~~~~~ +Tree(Node(L,node,R)) :- + Tree(L), + Tree(R). +~~~~~~~~~~~~ + */ + YAP_FLAG( ALLOW_VARIABLE_NAME_AS_FUNCTOR_FLAG, "allow_variable_name_as_functor", false, booleanFlag, "false", NULL), + +/**< `answer_format` how to present answers, default is `~p`. */ +YAP_FLAG(ANSWER_FORMAT_FLAG, "answer_format", true, isatom, "~p", + NULL), +#if __APPLE__ +/**< + `apple`: read-only boolean, a machine running an Apple Operating System * +*/ + YAP_FLAG(APPLE_FLAG, "apple", false, booleanFlag, "true", + NULL), +#endif + YAP_FLAG(ARCH_FLAG, "arch", false, isatom, YAP_ARCH, NULL), + YAP_FLAG(ARGV_FLAG, "argv", false, argv, "@boot", NULL), +/**< `arithmetic_exceptions` Read-write flag telling whether arithmetic exceptions generate Prolog exceptions. If enabled: @@ -78,85 +87,81 @@ X = (+inf). It is `true` by default, but it is disabled by packages like CLP(BN) and ProbLog. */ -#if __APPLE__ - YAP_FLAG(APPLE_FLAG, "apple", false, booleanFlag, "true", - NULL), /**< `apple` - -Read-only booleanFlag flag that unifies with `true` if YAP is -running on an Apple machine. -*/ -#endif - YAP_FLAG(ARCH_FLAG, "arch", false, isatom, YAP_ARCH, NULL), - YAP_FLAG(ARGV_FLAG, "argv", false, argv, "@boot", NULL), YAP_FLAG(ARITHMETIC_EXCEPTIONS_FLAG, "arithmetic_exceptions", true, booleanFlag, "true", NULL), - YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, - "string", bqs), /**> +/**> If _Value_ is unbound, tell whether a back quoted list of characters token is converted to a list of atoms, `chars`, to a list of integers, `codes`, or to a single atom, `atom`. If _Value_ is bound, set to the corresponding behavior. The default value is `string` */ - - YAP_FLAG(BOUNDED_FLAG, "bounded", false, booleanFlag, "false", - NULL), /**< `bounded` is iso + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, "true", NULL), + /**< `bounded` is iso Read-only flag telling whether integers are bounded. The value depends on whether YAP uses the GMP library or not. */ - YAP_FLAG(C_CC_FLAG, "c_cc", false, isatom, C_CC, NULL), + +YAP_FLAG(BOUNDED_FLAG, "bounded", false, booleanFlag, "false", + NULL), + YAP_FLAG(C_CC_FLAG, "c_cc", false, isatom, C_CC, NULL), YAP_FLAG(C_CFLAGS_FLAG, "c_cflags", false, isatom, C_CFLAGS, NULL), YAP_FLAG(C_LDFLAGS_FLAG, "c_ldflags", false, isatom, C_LDFLAGS, NULL), YAP_FLAG(C_LIBPLSO_FLAG, "c_libplso", false, isatom, C_LIBPLSO, NULL), YAP_FLAG(C_LIBS_FLAG, "c_libs", false, isatom, C_LIBS, NULL), - YAP_FLAG(CHAR_CONVERSION_FLAG, "char_conversion", true, booleanFlag, - "false", NULL), /**< `char_conversion is iso` +/**< `char_conversion is iso` Writable flag telling whether a character conversion table is used when reading terms. The default value for this flag is `off` except in `sicstus` and `iso` language modes, where it is `on`. */ - YAP_FLAG(CHARACTER_ESCAPES_FLAG, "character_escapes", true, booleanFlag, - "true", NULL), /**< `character_escapes is iso ` + YAP_FLAG(CHAR_CONVERSION_FLAG, "char_conversion", true, booleanFlag, + "false", NULL), + /**< `character_escapes is iso ` Writable flag telling whether a character escapes are enables, `true`, or disabled, `false`. The default value for this flag is `true`. */ + YAP_FLAG(CHARACTER_ESCAPES_FLAG, "character_escapes", true, booleanFlag, + "true", NULL), YAP_FLAG(COLON_SETS_CALLING_CONTEXT_FLAG, "colon_sets_calling_context", true, booleanFlag, "true", NULL), - YAP_FLAG(COMPILED_AT_FLAG, "compiled_at", false, isatom, YAP_COMPILED_AT, - NULL), /**< `compiled_at ` +/**< `compiled_at ` Read-only flag that gives the time when the main YAP binary was compiled. It is obtained staight from the __TIME__ macro, as defined in the C99. */ - YAP_FLAG(DEBUG_FLAG, "debug", true, booleanFlag, "false", - NULL), /**< `debug is iso ` + YAP_FLAG(COMPILED_AT_FLAG, "compiled_at", false, isatom, YAP_COMPILED_AT, + NULL), +/**< `debug is iso ` If _Value_ is unbound, tell whether debugging is `true` or `false`. If _Value_ is bound to `true` enable debugging, and if it is bound to `false` disable debugging. */ + YAP_FLAG(DEBUG_FLAG, "debug", true, booleanFlag, "false", + NULL), YAP_FLAG(DEBUG_INFO_FLAG, "debug_info", true, booleanFlag, "true", NULL), YAP_FLAG(DEBUG_ON_ERROR_FLAG, "debug_on_error", true, booleanFlag, "true", NULL), - YAP_FLAG(DEBUGGER_PRINT_OPTIONS_FLAG, "debugger_print_options", true, - list_option, - "[quoted(true),numbervars(true),portrayed(true),max_depth(10)]", - NULL), /**< `debugger_print_options ` + /**< `debugger_print_options ` If bound, set the argument to the `write_term/3` options the debugger uses to write terms. If unbound, show the current options. */ + YAP_FLAG(DEBUGGER_PRINT_OPTIONS_FLAG, "debugger_print_options", true, + list_option, + "[quoted(true),numbervars(true),portrayed(true),max_depth(10)]", + NULL), YAP_FLAG(DEBUGGER_SHOW_CONTEXT_FLAG, "debugger_show_context", true, booleanFlag, "false", NULL), - YAP_FLAG(DIALECT_FLAG, "dialect", false, ro, "yap", - NULL), /**< `dialect ` +/**< `dialect ` Read-only flag that always returns `yap`. */ - YAP_FLAG(DISCONTIGUOUS_WARNINGS_FLAG, "discontiguous_warnings", true, - booleanFlag, "true", NULL), /**< `discontiguous_warnings ` + YAP_FLAG(DIALECT_FLAG, "dialect", false, ro, "yap", + NULL), +/**< `discontiguous_warnings ` If `true` (default `true`) YAP checks for definitions of the same predicate that are separated by clauses for other predicates. This may indicate that different @@ -166,36 +171,41 @@ The declaration discontiguous/1 disables this warning for user-specified predicates. */ - YAP_FLAG(DOLLAR_AS_LOWER_CASE_FLAG, "dollar_as_lower_case", true, - booleanFlag, "false", - NULL), /**< `dollar_as_lower_case ` + YAP_FLAG(DISCONTIGUOUS_WARNINGS_FLAG, "discontiguous_warnings", true, + booleanFlag, "true", NULL), +/**< `dollar_as_lower_case ` If `off` (default) consider the character `$` a control character, if `on` consider `$` a lower case character. */ - YAP_FLAG(DOUBLE_QUOTES_FLAG, "double_quotes", true, isatom, "codes", - dqs), /**< `double_quotes is iso ` + YAP_FLAG(DOLLAR_AS_LOWER_CASE_FLAG, "dollar_as_lower_case", true, + booleanFlag, "false", + NULL), +/**< `double_quotes is iso ` If _Value_ is unbound, tell whether a double quoted list of characters token is converted to a list of atoms, `chars`, to a list of integers, `codes`, or to a single atom, `atom`. If _Value_ is bound, set to the corresponding behavior. The default value is `codes`. */ + YAP_FLAG(DOUBLE_QUOTES_FLAG, "double_quotes", true, isatom, "codes", + dqs), YAP_FLAG(EDITOR_FLAG, "editor", true, isatom, "$EDITOR", NULL), - YAP_FLAG(EXECUTABLE_FLAG, "executable", false, executable, "@boot", - NULL), /**< `executable ` +/**< `executable ` Read-only flag. It unifies with an atom that gives the original program path. */ - YAP_FLAG(FAST_FLAG, "fast", true, booleanFlag, "false", NULL), /**< `fast ` + YAP_FLAG(EXECUTABLE_FLAG, "executable", false, executable, "@boot", + NULL), +/**< `fast ` If `on` allow fast machine code, if `off` (default) disable it. Only available in experimental implementations. */ + YAP_FLAG(FAST_FLAG, "fast", true, booleanFlag, "false", NULL), YAP_FLAG(FILE_NAME_VARIABLES_FLAG, "file_name_variables", true, booleanFlag, "true", NULL), - YAP_FLAG(FLOAT_FORMAT_FLAG, "float_format", true, isatom, "%.16g", - NULL), /**< + `float_format ` +/**< + `float_format ` C-library `printf()` format specification used by write/1 and friends to determine how floating point numbers are printed. The @@ -204,19 +214,22 @@ available in experimental implementations. printed, `%g` will print all floats using 6 digits instead of the default 15. */ - YAP_FLAG(GC_FLAG, "gc", true, booleanFlag, "on", NULL), /**< `gc` + YAP_FLAG(FLOAT_FORMAT_FLAG, "float_format", true, isatom, "%.16g", + NULL), +/**< `gc` If `on` allow garbage collection (default), if `off` disable it. */ - YAP_FLAG(GC_MARGIN_FLAG, "gc_margin", true, nat, "0", - gc_margin), /**< `gc_margin ` + YAP_FLAG(GC_FLAG, "gc", true, booleanFlag, "on", NULL), +/**< `gc_margin ` Set or show the minimum free stack before starting garbage collection. The default depends on total stack size. */ - YAP_FLAG(GC_TRACE_FLAG, "gc_trace", true, isatom, "off", - NULL), /**< `gc_trace ` + YAP_FLAG(GC_MARGIN_FLAG, "gc_margin", true, nat, "0", + gc_margin), +/**< `gc_trace ` If `off` (default) do not show information on garbage collection and stack shifts, if `on` inform when a garbage collection or stack @@ -225,8 +238,9 @@ collection and stack shifts. Last, if `very_verbose` give detailed information on data-structures found during the garbage collection process, namely, on choice-points. */ - YAP_FLAG(GENERATE_DEBUGGING_INFO_FLAG, "generate_debug_info", true, - booleanFlag, "true", NULL), /**< `generate_debug_info ` + YAP_FLAG(GC_TRACE_FLAG, "gc_trace", true, isatom, "off", + NULL), +/**< `generate_debug_info ` If `true` (default) generate debugging information for procedures, including source mode. If `false` predicates no @@ -234,48 +248,55 @@ process, namely, on choice-points. source mode is disabled. */ + YAP_FLAG(GENERATE_DEBUGGING_INFO_FLAG, "generate_debug_info", true, + booleanFlag, "true", NULL), YAP_FLAG(GMP_VERSION_FLAG, "gmp_version", false, isatom, "4.8.12", NULL), YAP_FLAG(HALT_AFTER_CONSULT_FLAG, "halt_after_consult", false, booleanFlag, "false", NULL), - YAP_FLAG(HOME_FLAG, "home", false, isatom, YAP_ROOTDIR, NULL), /**< home ` +/**< home ` the root of the YAP installation, by default `/usr/local` in Unix or `c:\Yap` in Windows system. Can only be set at configure time */ - YAP_FLAG(HOST_TYPE_FLAG, "host_type", false, isatom, HOST_ALIAS, - NULL), /**< host_type ` + YAP_FLAG(HOME_FLAG, "home", false, isatom, YAP_ROOTDIR, NULL), +/**< host_type ` Return `configure` system information, including the machine-id for which YAP was compiled and Operating System information. */ - YAP_FLAG(INDEX_FLAG, "index", true, indexer, "multi", NULL), /**< `index ` + YAP_FLAG(HOST_TYPE_FLAG, "host_type", false, isatom, HOST_ALIAS, + NULL), +/**< `index ` If `on` allow indexing (default), if `off` disable it, if `single` allow on first argument only. */ - YAP_FLAG(INDEX_SUB_TERM_SEARCH_DEPTH_FLAG, "index_sub_term_search_depth", - true, nat, "0", NULL), /**< `Index_sub_term_search_depth ` + YAP_FLAG(INDEX_FLAG, "index", true, indexer, "multi", NULL), +/**< `Index_sub_term_search_depth ` Maximum bound on searching sub-terms for indexing, if `0` (default) no bound. */ - YAP_FLAG(INFORMATIONAL_MESSAGES_FLAG, "informational_messages", true, - isatom, "normal", NULL), /**< `informational_messages ` + YAP_FLAG(INDEX_SUB_TERM_SEARCH_DEPTH_FLAG, "index_sub_term_search_depth", + true, nat, "0", NULL), +/**< `informational_messages ` If `on` allow printing of informational messages, such as the ones that are printed when consulting. If `off` disable printing these messages. It is `on` by default except if YAP is booted with the `-L` flag. */ - YAP_FLAG(INTEGER_ROUNDING_FUNCTION_FLAG, "integer_rounding_function", true, - isatom, "toward_zero", - NULL), /**< `integer_rounding_function is iso ` + YAP_FLAG(INFORMATIONAL_MESSAGES_FLAG, "informational_messages", true, + isatom, "normal", NULL), +/**< `integer_rounding_function is iso ` Read-only flag telling the rounding function used for integers. Takes the value `toward_zero` for the current version of YAP. */ + YAP_FLAG(INTEGER_ROUNDING_FUNCTION_FLAG, "integer_rounding_function", true, + isatom, "toward_zero", + NULL), YAP_FLAG(ISO_FLAG, "iso", true, booleanFlag, "false", NULL), - YAP_FLAG(LANGUAGE_FLAG, "language", true, isatom, "yap", - NULL), /**< `language ` +/**< `language ` Choose whether YAP follows native, closer to C-Prolog, `yap`, iso-prolog, `iso` or SICStus Prolog, `sicstus`. The current default is @@ -284,16 +305,21 @@ style checking, handling calls to undefined procedures, how directives are interpreted, when to use dynamic, character escapes, and how files are consulted. Also check the `dialect` option. */ - YAP_FLAG(PROLOG_LIBRARY_DIRECTORY_FLAG, "prolog_library_directory", true, isatom, "", NULL), /**< if defined, first location where YAP expects to find the YAP Prolog library. Takes precedence over library_directory */ + YAP_FLAG(LANGUAGE_FLAG, "language", true, isatom, "yap", + NULL), +/**< if defined, first location where YAP expects to find the YAP Prolog library. Takes precedence over library_directory */ + YAP_FLAG(PROLOG_LIBRARY_DIRECTORY_FLAG, "prolog_library_directory", true, isatom, "", NULL), - YAP_FLAG(PROLOG_FOREIGN_DIRECTORY_FLAG, "prolog_foreign_directory", true, isatom, "", NULL), /**< if defined, first location where YAP expects to find the YAP Prolog shared libraries (DLLS). Takes precedence over executable_directory/2. */ +/**< if defined, first location where YAP expects to find the YAP Prolog shared libraries (DLLS). Takes precedence over executable_directory/2. */ + YAP_FLAG(PROLOG_FOREIGN_DIRECTORY_FLAG, "prolog_foreign_directory", true, isatom, "", NULL), - YAP_FLAG(MAX_ARITY_FLAG, "max_arity", false, isatom, "unbounded", - NULL), /**< `max_arity is iso ` +/**< `max_arity is iso ` Read-only flag telling the maximum arity of a functor. Takes the value `unbounded` for the current version of YAP. */ + YAP_FLAG(MAX_ARITY_FLAG, "max_arity", false, isatom, "unbounded", + NULL), YAP_FLAG(MAX_TAGGED_INTEGER_FLAG, "max_tagged_integer", false, at2n, "INT_MAX", NULL), YAP_FLAG(MAX_THREADS_FLAG, "max_threads", false, at2n, "MAX_THREADS", NULL), @@ -304,43 +330,46 @@ Read-only flag telling the maximum arity of a functor. Takes the value "256", NULL), YAP_FLAG(OCCURS_CHECK_FLAG, "occurs_check", true, booleanFlag, "false", NULL), - YAP_FLAG(OPEN_EXPANDS_FILENAME_FLAG, "open_expands_filename", true, - booleanFlag, "false", NULL), /**< `open_expands_filename ` +/**< `open_expands_filename ` If `true` the open/3 builtin performs filename-expansion before opening a file (SICStus Prolog like). If `false` it does not (SWI-Prolog like). */ - YAP_FLAG(OPEN_SHARED_OBJECT_FLAG, "open_shared_object", true, booleanFlag, - "true", NULL), /**< `open_shared_object ` + YAP_FLAG(OPEN_EXPANDS_FILENAME_FLAG, "open_expands_filename", true, + booleanFlag, "false", NULL), +/**< `open_shared_object ` If true, `open_shared_object/2` and friends are implemented, providing access to shared libraries (`.so` files) or to dynamic link libraries (`.DLL` files). */ - // YAP_FLAG(MODULE_INDEPENDENT_OPERATORS_FLAG, - // "module_independent_operators", true, booleanFlag, - // "false", NULL), - /**< `module_independent_operators ` + YAP_FLAG(OPEN_SHARED_OBJECT_FLAG, "open_shared_object", true, booleanFlag, + "true", NULL), +/**< `module_independent_operators ` If `true` an operator declaration will be valid for every module in the program. This is for compatibility with old software that might expect module-independent operators. */ + // YAP_FLAG(MODULE_INDEPENDENT_OPERATORS_FLAG, + // "module_independent_operators", true, booleanFlag, + // "false", NULL), + YAP_FLAG(OPTIMISE_FLAG, "optimise", true, booleanFlag, "false", NULL), YAP_FLAG(OS_ARGV_FLAG, "os_argv", false, os_argv, "@boot", NULL), YAP_FLAG(PID_FLAG, "pid", false, sys_pid, "@boot", NULL), YAP_FLAG(PIPE_FLAG, "pipe", true, booleanFlag, "true", NULL), - YAP_FLAG(PROFILING_FLAG, "profiling", true, booleanFlag, "false", - NULL), /**< `profiling ` +/**< `profiling ` If `off` (default) do not compile call counting information for procedures. If `on` compile predicates so that they calls and retries to the predicate may be counted. Profiling data can be read through the call_count_data/3 built-in. */ - YAP_FLAG(PROMPT_ALTERNATIVES_ON_FLAG, "prompt_alternatives_on", true, - isatom, "determinism", NULL), /**< `prompt_alternatives_on(atom, + YAP_FLAG(PROFILING_FLAG, "profiling", true, booleanFlag, "false", + NULL), +/**< `prompt_alternatives_on(atom, changeable) ` SWI-Compatible option, determines prompting for alternatives in the Prolog @@ -348,60 +377,69 @@ call_count_data/3 built-in. only if the query contains variables. The alternative, default in SWI-Prolog is determinism which implies the system prompts for alternatives if the goal succeeded while leaving choicepoints. */ + YAP_FLAG(PROMPT_ALTERNATIVES_ON_FLAG, "prompt_alternatives_on", true, + isatom, "determinism", NULL), YAP_FLAG(QUASI_QUOTATIONS_FLAG, "quasi_quotations", true, booleanFlag, "true", NULL), - YAP_FLAG(READLINE_FLAG, "readline", true, booleanFlag, "false", - Yap_InitReadline), /**< `readline(boolean, changeable)` +/**< `readline(boolean, changeable)` } enable the use of the readline library for console interactions, true by default if readline was found. */ + YAP_FLAG(READLINE_FLAG, "readline", true, booleanFlag, "false", + Yap_InitReadline), YAP_FLAG(REPORT_ERROR_FLAG, "report_error", true, booleanFlag, "true", NULL), - YAP_FLAG(RESOURCE_DATABASE_FLAG, "resource_database", false, isatom, - YAP_BOOTSTRAP, NULL), - /**<`resource_database` +/**<`resource_database` Name of the resource file (saved-state or Prolog file) used to construct the YAP run-time environment. */ - YAP_FLAG(SAVED_PROGRAM_FLAG, "saved_program", false, booleanFlag, "false", - NULL), - /**<`saved_program` + YAP_FLAG(RESOURCE_DATABASE_FLAG, "resource_database", false, isatom, + YAP_BOOTSTRAP, NULL), + +/**<`saved_program` if `true` YAP booted from a `yss` file, usually `startup.yss'. If `false`, YAP booted from a Prolog file, by default `boot.yap`. */ - YAP_FLAG(SHARED_OBJECT_EXTENSION_FLAG, "shared_object_extension", false, - isatom, SO_EXT, NULL), /**< `shared_object_extension ` + YAP_FLAG(SAVED_PROGRAM_FLAG, "saved_program", false, booleanFlag, "false", + NULL), + +/**< `shared_object_extension ` Suffix associated with loadable code. */ - YAP_FLAG(SHARED_OBJECT_SEARCH_PATH_FLAG, "shared_object_search_path", true, - isatom, SO_PATH, NULL), /**< `shared_object_search_path ` + YAP_FLAG(SHARED_OBJECT_EXTENSION_FLAG, "shared_object_extension", false, + isatom, SO_EXT, NULL), +/**< `shared_object_search_path ` Name of the environment variable used by the system to search for shared objects. */ - YAP_FLAG(SINGLE_QUOTES_FLAG, "single_quotes", true, isatom, "atom", - sqf), /**< `single_quoted text is usuallly interpreted as atoms. This flagTerm allows other inerpretations such as strings_contains_strings */ + YAP_FLAG(SHARED_OBJECT_SEARCH_PATH_FLAG, "shared_object_search_path", true, + isatom, SO_PATH, NULL), +/**< `single_quoted text is usuallly interpreted as atoms. This flagTerm allows other inerpretations such as strings_contains_strings */ + YAP_FLAG(SINGLE_QUOTES_FLAG, "single_quotes", true, isatom, "atom", + sqf), - YAP_FLAG(SIGNALS_FLAG, "signals", true, booleanFlag, "true", - NULL), /**< `signals` +/**< `signals` If `true` (default) YAP handles Signals such as `^C` (`SIGINT`). */ - YAP_FLAG(SOURCE_FLAG, "source", true, booleanFlag, "true", - NULL), /**< `source` + YAP_FLAG(SIGNALS_FLAG, "signals", true, booleanFlag, "true", + NULL), +/**< `source` If `true` maintain the source for all clauses. Notice that this is trivially supported for facts, and always supported for dynamic code. */ - YAP_FLAG(STRICT_ISO_FLAG, "strict_iso", true, booleanFlag, "false", - NULL), /**< `strict_iso ` + YAP_FLAG(SOURCE_FLAG, "source", true, booleanFlag, "true", + NULL), +/**< `strict_iso ` If _Value_ is unbound, tell whether strict ISO compatibility mode is `on` or `off`. If _Value_ is bound to `on` set @@ -423,9 +461,9 @@ believe this mode is mostly useful when investigating how a program depends on a Prolog's platform specific features. */ - YAP_FLAG(SYSTEM_OPTIONS_FLAG, "system_options", false, options, - SYSTEM_OPTIONS, - NULL), /**< `system_options ` + YAP_FLAG(STRICT_ISO_FLAG, "strict_iso", true, booleanFlag, "false", + NULL), +/**< `system_options ` This read only flag tells which options were used to compile YAP. Currently it informs whether the system supports `big_numbers`, @@ -433,22 +471,24 @@ YAP. Currently it informs whether the system supports `big_numbers`, `or-parallelism`, `rational_trees`, `readline`, `tabling`, `threads`, or the `wam_profiler`. */ + YAP_FLAG(SYSTEM_OPTIONS_FLAG, "system_options", false, options, + SYSTEM_OPTIONS, + NULL), YAP_FLAG(SYSTEM_THREAD_ID_FLAG, "system_thread_id", false, sys_thread_id, "@boot", NULL), - YAP_FLAG(TABLING_MODE_FLAG, "tabling_mode", true, isatom, "[]", - NULL), /**< `tabling_mode` +/**< `tabling_mode` Sets or reads the tabling mode for all tabled predicates. Please (see Tabling) for the list of options. */ + YAP_FLAG(TABLING_MODE_FLAG, "tabling_mode", true, isatom, "[]", + NULL), YAP_FLAG(THREADS_FLAG, "threads", false, ro, "MAX_THREADS", NULL), YAP_FLAG(TIMEZONE_FLAG, "timezone", false, ro, "18000", NULL), YAP_FLAG(TOPLEVEL_PRINT_ANON_FLAG, "toplevel_print_anon", true, booleanFlag, "true", NULL), - YAP_FLAG(TOPLEVEL_PRINT_OPTIONS_FLAG, "toplevel_print_options", true, - list_option, "[quoted(true),numbervars(true),portrayed(true)]", - NULL), /**< `toplevel_hook ` +/**< `toplevel_hook ` If bound, set the argument to a goal to be executed before entering the top-level. If unbound show the current goal or `true` if none is @@ -456,17 +496,20 @@ presented. Only the first solution is considered and the goal is not backtracked into. */ + YAP_FLAG(TOPLEVEL_PRINT_OPTIONS_FLAG, "toplevel_print_options", true, + list_option, "[quoted(true),numbervars(true),portrayed(true)]", + NULL), YAP_FLAG(TOPLEVEL_PROMPT_FLAG, "toplevel_prompt", true, isatom, "?- ", mkprompt), YAP_FLAG(TTY_CONTROL_FLAG, "tty_control", true, booleanFlag, "true", NULL), - YAP_FLAG(UNIX_FLAG, "unix", false, ro, "true", NULL), /**< `unix` +/**< `unix` Read-only BooleanFlag flag that unifies with `true` if YAP is running on an Unix system. Defined if the C-compiler used to compile this version of YAP either defines `__unix__` or `unix`. */ - YAP_FLAG(UPDATE_SEMANTICS_FLAG, "update_semantics", true, isatom, "logical", - NULL), /**< `update_semantics ` + YAP_FLAG(UNIX_FLAG, "unix", false, ro, "true", NULL), +/**< `update_semantics ` Define whether YAP should follow `immediate` update semantics, as in C-Prolog (default), `logical` update semantics, @@ -475,7 +518,9 @@ also an intermediate mode, `logical_assert`, where dynamic procedures follow logical semantics but the internal data base still follows immediate semantics. */ - YAP_FLAG(USER_FLAGS_FLAG, "user_flags", true, isatom, "error", NULL), /**< + YAP_FLAG(UPDATE_SEMANTICS_FLAG, "update_semantics", true, isatom, "logical", + NULL), +/**< `user_flags ` Define the behaviour of set_prolog_flag/2 if the flag is not known. Values @@ -486,18 +531,19 @@ follows immediate semantics. are encouraged to use `create_prolog_flag/3` to create flags for their library. */ - YAP_FLAG(UNKNOWN_FLAG, "unknown", true, isatom, "error", - Yap_unknown), /**< `unknown is iso` + YAP_FLAG(USER_FLAGS_FLAG, "user_flags", true, isatom, "error", NULL), +/**< `unknown is iso` Corresponds to calling the unknown/2 built-in. Possible ISO values are `error`, `fail`, and `warning`. Yap includes the following extensions: `fast_fail` does not invoke any handler. */ + YAP_FLAG(UNKNOWN_FLAG, "unknown", true, isatom, "error", + Yap_unknown), YAP_FLAG(VARIABLE_NAMES_MAY_END_WITH_QUOTES_FLAG, "variable_names_may_end_with_quotes", true, booleanFlag, "false", NULL), - YAP_FLAG(VERBOSE_FLAG, "verbose", true, isatom, "normal", - NULL), /**< `verbose ` +/**< `verbose ` If `normal` allow printing of informational and banner messages, such as the ones that are printed when consulting. If `silent` @@ -505,34 +551,38 @@ disable printing these messages. It is `normal` by default except if YAP is booted with the `-q` or `-L` flag. */ + YAP_FLAG(VERBOSE_FLAG, "verbose", true, isatom, "normal", + NULL), YAP_FLAG(VERBOSE_AUTOLOAD_FLAG, "verbose_autoload", true, booleanFlag, "false", NULL), - YAP_FLAG(VERBOSE_FILE_SEARCH_FLAG, "verbose_file_search", true, booleanFlag, - "false", NULL), /**< `verbose_file_search ` +/**< `verbose_file_search ` If `true` allow printing of informational messages when searching for file names. If `false` disable printing these messages. It is `false` by default except if YAP is booted with the `-L` flag. */ - YAP_FLAG(VERBOSE_LOAD_FLAG, "verbose_load", true, isatom, "normal", - NULL), /**< `verbose_load ` + YAP_FLAG(VERBOSE_FILE_SEARCH_FLAG, "verbose_file_search", true, booleanFlag, + "false", NULL), +/**< `verbose_load ` If `true` allow printing of informational messages when consulting files. If `false` disable printing these messages. It is `normal` by default except if YAP is booted with the `-L` flag. */ - YAP_FLAG(VERSION_FLAG, "version", false, nat, YAP_NUMERIC_VERSION, - NULL), /**< `version_data ` + YAP_FLAG(VERBOSE_LOAD_FLAG, "verbose_load", true, isatom, "normal", + NULL), +/**< `version_data ` Read-only flag that unifies with a number of the form `_Major_ * 100000 + _Minor_ *100 + _Patch_`, where _Major_ is the major version, _Minor_ is the minor version, and _Patch_ is the patch number. */ - YAP_FLAG(VERSION_DATA_FLAG, "version_data", false, ro, YAP_TVERSION, - NULL), /**< + YAP_FLAG(VERSION_FLAG, "version", false, nat, YAP_NUMERIC_VERSION, + NULL), +/**< `version ` Read-only flag that returns a compound term with the current version of YAP. The term will have the name `yap` and arity 4, the first argument will be the @@ -540,27 +590,35 @@ and _Patch_ is the patch number. last one is reserved. */ - YAP_FLAG(VERSION_GIT_FLAG, "version_git", false, isatom, YAP_GIT_HEAD, - NULL), /**< `version_git ` + YAP_FLAG(VERSION_DATA_FLAG, "version_data", false, ro, YAP_TVERSION, + NULL), +/**< `version_git ` ` this is the unique identifier for the last commit of the current GIT HEAD, it xan be used to identify versions that differ on small (or large) updates. */ + YAP_FLAG(VERSION_GIT_FLAG, "version_git", false, isatom, YAP_GIT_HEAD, + NULL), YAP_FLAG(WRITE_ATTRIBUTES_FLAG, "write_attributes", true, isatom, "ignore", NULL), #if __WINDOWS__ - YAP_FLAG(WINDOWS_FLAG, "windows", false, ro, "true", NULL), /**< `windows ` +/**< `windows ` Read-only booleanFlag flag that unifies with `true` if YAP is running on an Windows machine. */ + YAP_FLAG(WINDOWS_FLAG, "windows", false, ro, "true", NULL), #endif - YAP_FLAG(WRITE_STRINGS_FLAG, "write_strings", true, booleanFlag, "false", - NULL), /**< `write_strings ` +/**< `write_strings ` Writable flag telling whether the system should write lists of integers that are writable character codes using the list notation. It is `on` if enables or `off` if disabled. The default value for this flag is `off`. */ - //! @} + YAP_FLAG(WRITE_STRINGS_FLAG, "write_strings", true, booleanFlag, "false", + NULL), + +} global_flag_t; + + //! @} diff --git a/H/YapLFlagInfo.h b/H/YapLFlagInfo.h index da6bcda8b..ded3981fe 100644 --- a/H/YapLFlagInfo.h +++ b/H/YapLFlagInfo.h @@ -1,4 +1,5 @@ + /************************************************************************* * * * YAP Prolog * @@ -19,8 +20,16 @@ /** @file YapLFlagInfo.h @addtogroup YAPFlags +@ingroup builtins +@{ + + +@enum LocalFlags local Flags supported by YAP + @brief local flag: */ +typedef enum { + /** + `autoload`: set the system to look for undefined procedures */ YAP_FLAG( AUTOLOAD_FLAG, "autoload", true, booleanFlag, "false" , NULL ), /** + `read-only flag, that tells if Prolog is in an inner top-level */ @@ -119,3 +128,6 @@ automatically redirects the user_error alias to the original */ YAP_FLAG( USER_INPUT_FLAG, "user_input", true, stream, "user_input" , set_input_stream ), YAP_FLAG( USER_OUTPUT_FLAG, "user_output", true, stream, "user_output" , set_output_stream ), + + +} local_flag_t; diff --git a/H/Yapproto.h b/H/Yapproto.h index bd6c85f93..93f5af1fe 100755 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -14,7 +14,9 @@ *************************************************************************/ /* prototype file for Yap */ -/// @file Prototype Declarations +/// @file Yapproto.h +/// +/// @brief Prototype Declarations #ifndef YAP_PROTOS_H #define YAP_PROTOS_H 1 @@ -535,3 +537,5 @@ extern void init_myddas(void); #endif #endif /* YAP_PROTOS_H */ + +/// @} diff --git a/OPTYap/opt.preds.c b/OPTYap/opt.preds.c index fa7a69445..8f07d9acb 100644 --- a/OPTYap/opt.preds.c +++ b/OPTYap/opt.preds.c @@ -11,6 +11,11 @@ ** ** ************************************************************************/ + +/// @file opt.preds.c +/// +/// @namespace prolog + /************************************ ** Includes & Prototypes ** ************************************/ diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index f01c9f488..152630cab 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.11 +# Doxyfile 1.8.14 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -8,9 +8,9 @@ # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, file.] +# TAG = value [value, ...] # For lists, items can also be appended using: -# TAG += value [value, file.] +# TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- @@ -98,7 +98,7 @@ OUTPUT_LANGUAGE = English # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. - BRIEF_MEMBER_DESC = YES +BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description @@ -229,10 +229,15 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = "predicate=@brief" "license=@par License:\n" \ - "doxygen=\if english" "endenglish=\endif" "dutch=\if dutch" \ - "enddutch=\endif" "tbd=@par TBD:\n" "compat=@par Compatibility:\n" \ - "error=@par Error:\n" +ALIASES = "predicate=@brief" \ + "license=@par License:\n" \ + "doxygen=\if english" \ + "endenglish=\endif" \ + "dutch=\if dutch" \ + "enddutch=\endif" \ + "tbd=@par TBD:\n" \ + "compat=@par Compatibility:\n" \ + "error=@par Error:\n" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" @@ -291,7 +296,10 @@ OPTIMIZE_OUTPUT_FOR_PROLOG = YES # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = md pl=Prolog yap=Prolog ypp=Prolog +EXTENSION_MAPPING = md \ + pl=Prolog \ + yap=Prolog \ + ypp=Prolog # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -303,6 +311,15 @@ EXTENSION_MAPPING = md pl=Prolog yap=Prolog ypp=Prolog MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or @@ -407,7 +424,7 @@ TYPEDEF_HIDES_STRUCT = NO # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0file9, the default is 0, corresponding to a cache size of 2^16=65536 +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. @@ -636,8 +653,8 @@ GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if file. \endif and \cond -# file. \endcond blocks. +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = @@ -694,7 +711,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = @CMAKE_SOURCE_DIR@/docs/custom/DoxygenLayout.xml +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -728,7 +745,7 @@ WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag - # will automatically be disabled. +# will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES @@ -749,6 +766,12 @@ WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -775,8 +798,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = @DOC_INPUT_FILES@ - +INPUT = @DOC_INPUT_FILES@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -798,10 +820,56 @@ INPUT_ENCODING = UTF-8 # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf, *.as and *.js. +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf, *.as, *.js, *.yap, *.ypp, +# *.prolog and *.pl. -FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.h.in *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.pl *.yap *.ypp +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.h.in \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.as \ + *.js \ + *.pl \ + *.yap \ + *.ypp # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -832,14 +900,14 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = \ - @PROJECT_SOURCE_DIR@/*/bprolog/* \ - @PROJECT_SOURCE_DIR@/*/prism/* \ - @PROJECT_SOURCE_DIR@/packages/gecode/gecode4_yap.cc \ - @PROJECT_SOURCE_DIR@/packages/gecode/gecode3.yap \ - @PROJECT_SOURCE_DIR@/packages/gecode/gecode4.yap \ - @PROJECT_SOURCE_DIR@/packages/gecode/gecode3_yap_hand_written.yap \ @PROJECT_SOURCE_DIR@/packages/gecode/gecode4_yap_hand_written.yap - */CMakeFiles/* *~ */\#* \ +EXCLUDE_PATTERNS = @PROJECT_SOURCE_DIR@/*/bprolog/* \ + @PROJECT_SOURCE_DIR@/*/prism/* \ + @PROJECT_SOURCE_DIR@/packages/gecode/gecode4_yap.cc \ + @PROJECT_SOURCE_DIR@/packages/gecode/gecode3.yap \ + @PROJECT_SOURCE_DIR@/packages/gecode/gecode4.yap \ + @PROJECT_SOURCE_DIR@/packages/gecode/gecode3_yap_hand_written.yap \ + \ \ + @PROJECT_SOURCE_DIR@/packages/gecode/gecode4_yap_hand_written.yap # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -1029,7 +1097,7 @@ VERBATIM_HEADERS = YES # classes, structs, unions or interfaces. # The default value is: YES. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. @@ -1088,7 +1156,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = @CMAKE_SOURCE_DIR@/docs/custom/header.html +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1098,7 +1166,8 @@ HTML_HEADER = @CMAKE_SOURCE_DIR@/docs/custom/header.html # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = @CMAKE_SOURCE_DIR@/docs/custom/footer.html +HTML_FOOTER = + # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1110,7 +1179,7 @@ HTML_FOOTER = @CMAKE_SOURCE_DIR@/docs/custom/footer.html # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = YES # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1123,9 +1192,8 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = \ - @CMAKE_SOURCE_DIR@/docs/custom/customdoxygen.css \ - @CMAKE_SOURCE_DIR@/docs/custom/solarized-light.css \ +HTML_EXTRA_STYLESHEET = + # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1135,7 +1203,7 @@ HTML_EXTRA_STYLESHEET = \ # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = @CMAKE_HTML_EXTRA@ +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to @@ -1176,13 +1244,24 @@ HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via Javascript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have Javascript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_DYNAMIC_SECTIONS = NO +HTML_DYNAMIC_SECTIONS = YES # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand @@ -1411,7 +1490,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. @@ -1482,7 +1561,7 @@ MATHJAX_FORMAT = HTML-CSS # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be file/mathjax. The default value points to the MathJax +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. @@ -1537,7 +1616,7 @@ SEARCHENGINE = YES # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. -SERVER_BASED_SEARCH = YES +SERVER_BASED_SEARCH = NO # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file @@ -1869,7 +1948,7 @@ MAN_SUBDIR = # The default value is: NO. # This tag requires that the tag GENERATE_MAN is set to YES. -MAN_LINKS = NOoi9 0 +MAN_LINKS = NO #--------------------------------------------------------------------------- # Configuration options related to the XML output @@ -1879,7 +1958,7 @@ MAN_LINKS = NOoi9 0 # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -2015,11 +2094,11 @@ SEARCH_INCLUDES = YES # This tag requires that the tag SEARCH_INCLUDES is set to YES. INCLUDE_PATH = @CMAKE_BINARY_DIR@ \ - @PROJECT_SOURCE_DIR@/H \ - @PROJECT_SOURCE_DIR@/H/generated \ - @PROJECT_SOURCE_DIR@/include \ - @PROJECT_SOURCE_DIR@/os \ - @PROJECT_SOURCE_DIR@/OPTYap \ + @PROJECT_SOURCE_DIR@/H \ + @PROJECT_SOURCE_DIR@/H/generated \ + @PROJECT_SOURCE_DIR@/include \ + @PROJECT_SOURCE_DIR@/os \ + @PROJECT_SOURCE_DIR@/OPTYap # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2067,7 +2146,7 @@ SKIP_FUNCTION_MACROS = YES # a tag file without this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" file. +# TAGFILES = file1=loc1 "file2 = loc2" ... # where loc1 and loc2 can be relative or absolute paths or URLs. See the # section "Linking to external documentation" for more information about the use # of tag files. @@ -2359,6 +2438,11 @@ DIAFILE_DIRS = PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. diff --git a/docs/checkpl.yap b/docs/checkpl.yap index ba585e49d..7e4d4970e 100644 --- a/docs/checkpl.yap +++ b/docs/checkpl.yap @@ -5,17 +5,22 @@ :- initialization(main). +:- yap_flag(write_strings,on). + main :- - popen('find . \\( -name \"*.pl\" -o -name \"*.yap\" -o -name \"*.c\" -o -name \"*.h\" -o -name \"*.cpp\" -o -name \"*.hh\" \\) -type f -print | xargs grep \"@defgroup\\|@ingroup\\|@addtogroup\\|@\\{\\|@\\}\"', read, S), + S = popen('./get_comments'), file_filter_with_start_end( S, user_output, add2graph, initgraph, checkgraph). -initgraph(_,_). +initgraph(_,_) :- + retractall(node(_,_,_,_)), + retractall(edge(_,_,_)), + retractall(e_b_n(_,_,_)). -:- dynamic node/3, edge/3, e_b_n/3. +:- dynamic node/4, edge/3, e_b_n/3. checkgraph(_,_) :- e_b_n(F,KN,_C), - node(KF,KN,_), + node(_,KF,KN,_), add_edge(KF, F, KN), fail. checkgraph(_,_) :- @@ -23,10 +28,12 @@ checkgraph(_,_) :- listing(edge). - add2graph(Line, _Out) :- - split( Line, "% \t/*:", [File, Job, Name|_]), - append( _, L, Line), +add2graph(Line, _Out) :- + writeln(Line), + split( Line, ":@% \t*", [File, Job, Name|_]), append(Name, R, L), + append( _, L, Line), + !, dispatch( Name, File, Job, R). dispatch( Name, File, "defgroup", Comment):- @@ -45,20 +52,26 @@ dispatch( Name, File, "ingroup", Comment):- atom_codes(C, Comment), add_edge(KF, KN,C). add_node(F, K,_C) :- - node(_,K,_), - throw( repeat(F:K) ). + node(d,F0,K,_), + !, + throw( repeat(K:F0/F) ). +add_node(F, K,_C) :- + retract(node(d,F1,K,_)), + !, + assert(edge(F,F1,K)), + assert(node(d,F,K,C)). add_node(F, K,C) :- - assert(node(F,K,C)). + assert(node(d,F,K,C)). add_node_edge(F, K,_C) :- - node(F1,K,_), + node(_,F1,K,_), !, assert(edge(F1,F,K)). add_node_edge(F, K,C) :- - assert(node(F,K,C)). + assert(node(a,F,K,C)). add_edge(F, K,_C) :- - node(F1,K,_), + node(_,F1,K,_), !, assert(edge(F1,F,K)). add_edge(F, K,C) :- diff --git a/docs/md/attributes.md b/docs/md/attributes.md index cc1f68ec1..be68b209b 100644 --- a/docs/md/attributes.md +++ b/docs/md/attributes.md @@ -31,362 +31,6 @@ interface. + @ref CohYroutining + @ref AttributeVariables_Builtins -@section SICS_attributes SICStus Style attribute declarations. - -The YAP library `atts` implements attribute variables in the style of -SICStus Prolog. Attributed variables work as follows: - -+ Each attribute must be declared beforehand. Attributes are described -as a functor with name and arity and are local to a module. Each -Prolog module declares its own sets of attributes. Different modules -may have attributes with the same name and arity. - -+ The built-in put_atts/2 adds or deletes attributes to a -variable. The variable may be unbound or may be an attributed -variable. In the latter case, YAP discards previous values for the -attributes. - -+ The built-in get_atts/2 can be used to check the values of -an attribute associated with a variable. - -+ The unification algorithm calls the user-defined predicate -verify_attributes/3 before trying to bind an attributed -variable. Unification will resume after this call. - -+ The user-defined predicate -attribute_goal/2 converts from an attribute to a goal. - -+ The user-defined predicate -project_attributes/2 is used from a set of variables into a set of -constraints or goals. One application of project_attributes/2 is in -the top-level, where it is used to output the set of -floundered constraints at the end of a query. - - -Attributes are compound terms associated with a variable. Each attribute -has a name which is private to the module in which the -attribute was defined. Variables may have at most one attribute with a -name. Attribute names are defined through the following declaration: - -~~~~~ -:- attribute AttributeSpec, ..., AttributeSpec. -~~~~~ - -where each _AttributeSpec_ has the form ( _Name_/ _Arity_). -One single such declaration is allowed per module _Module_. - -Although the YAP module system is predicate based, attributes are local -to modules. This is implemented by rewriting all calls to the -built-ins that manipulate attributes so that attribute names are -preprocessed depending on the module. The `user:goal_expansion/3` -mechanism is used for this purpose. - - -The attribute manipulation predicates always work as follows: - -+ The first argument is the unbound variable associated with -attributes, -+ The second argument is a list of attributes. Each attribute will -be a Prolog term or a constant, prefixed with the + and - unary -operators. The prefix + may be dropped for convenience. - -The following three procedures are available to the user. Notice that -these built-ins are rewritten by the system into internal built-ins, and -that the rewriting process depends on the module on which the -built-ins have been invoked. - - -The user-predicate predicate verify_attributes/3 is called when -attempting to unify an attributed variable which might have attributes -in some _Module_. - - -Attributes are usually presented as goals. The following routines are -used by built-in predicates such as call_residue/2 and by the -Prolog top-level to display attributes: - - -Constraint solvers must be able to project a set of constraints to a set -of variables. This is useful when displaying the solution to a goal, but -may also be used to manipulate computations. The user-defined -project_attributes/2 is responsible for implementing this -projection. - - -The following examples are taken from the SICStus Prolog -manual. The sketches the implementation of a simple finite domain -`solver`. Note that an industrial strength solver would have to -provide a wider range of functionality and that it quite likely would -utilize a more efficient representation for the domains proper. The -module exports a single predicate `domain( _-Var_, _?Domain_)` which -associates _Domain_ (a list of terms) with _Var_. A variable can be -queried for its domain by leaving _Domain_ unbound. - -We do not present here a definition for project_attributes/2. -Projecting finite domain constraints happens to be difficult. - -~~~~~ -:- module(domain, [domain/2]). - -:- use_module(library(atts)). -:- use_module(library(ordsets), [ - ord_intersection/3, - ord_intersect/2, - list_to_ord_set/2 - ]). - -:- attribute dom/1. - -verify_attributes(Var, Other, Goals) :- - get_atts(Var, dom(Da)), !, % are we involved? - ( var(Other) -> % must be attributed then - ( get_atts(Other, dom(Db)) -> % has a domain? - ord_intersection(Da, Db, Dc), - Dc = [El|Els], % at least one element - ( Els = [] -> % exactly one element - Goals = [Other=El] % implied binding - ; Goals = [], - put_atts(Other, dom(Dc))% rescue intersection - ) - ; Goals = [], - put_atts(Other, dom(Da)) % rescue the domain - ) - ; Goals = [], - ord_intersect([Other], Da) % value in domain? - ). -verify_attributes(_, _, []). % unification triggered - % because of attributes - % in other modules - -attribute_goal(Var, domain(Var,Dom)) :- % interpretation as goal - get_atts(Var, dom(Dom)). - -domain(X, Dom) :- - var(Dom), !, - get_atts(X, dom(Dom)). -domain(X, List) :- - list_to_ord_set(List, Set), - Set = [El|Els], % at least one element - ( Els = [] -> % exactly one element - X = El % implied binding - ; put_atts(Fresh, dom(Set)), - X = Fresh % may call - % verify_attributes/3 - ). -~~~~~ - -Note that the _implied binding_ `Other=El` was deferred until after -the completion of `verify_attribute/3`. Otherwise, there might be a -danger of recursively invoking `verify_attribute/3`, which might bind -`Var`, which is not allowed inside the scope of `verify_attribute/3`. -Deferring unifications into the third argument of `verify_attribute/3` -effectively serializes the calls to `verify_attribute/3`. - -Assuming that the code resides in the file domain.yap, we -can use it via: - -~~~~~ -| ?- use_module(domain). -~~~~~ - -Let's test it: - -~~~~~ -| ?- domain(X,[5,6,7,1]), domain(Y,[3,4,5,6]), domain(Z,[1,6,7,8]). - -domain(X,[1,5,6,7]), -domain(Y,[3,4,5,6]), -domain(Z,[1,6,7,8]) ? - -yes -| ?- domain(X,[5,6,7,1]), domain(Y,[3,4,5,6]), domain(Z,[1,6,7,8]), - X=Y. - -Y = X, -domain(X,[5,6]), -domain(Z,[1,6,7,8]) ? - -yes -| ?- domain(X,[5,6,7,1]), domain(Y,[3,4,5,6]), domain(Z,[1,6,7,8]), - X=Y, Y=Z. - -X = 6, -Y = 6, -Z = 6 -~~~~~ - -To demonstrate the use of the _Goals_ argument of -verify_attributes/3, we give an implementation of -freeze/2. We have to name it `myfreeze/2` in order to -avoid a name clash with the built-in predicate of the same name. - -~~~~~ -:- module(myfreeze, [myfreeze/2]). - -:- use_module(library(atts)). - -:- attribute frozen/1. - -verify_attributes(Var, Other, Goals) :- - get_atts(Var, frozen(Fa)), !, % are we involved? - ( var(Other) -> % must be attributed then - ( get_atts(Other, frozen(Fb)) % has a pending goal? - -> put_atts(Other, frozen((Fa,Fb))) % rescue conjunction - ; put_atts(Other, frozen(Fa)) % rescue the pending goal - ), - Goals = [] - ; Goals = [Fa] - ). -verify_attributes(_, _, []). - -attribute_goal(Var, Goal) :- % interpretation as goal - get_atts(Var, frozen(Goal)). - -myfreeze(X, Goal) :- put_atts(Fresh, frozen(Goal)), Fresh = X. ~~~~~ - -Assuming that this code lives in file myfreeze.yap, -we would use it via: - -~~~~~ -| ?- use_module(myfreeze). -| ?- myfreeze(X,print(bound(x,X))), X=2. - -bound(x,2) % side effect -X = 2 % bindings -~~~~~ - -The two solvers even work together: - -~~~~~ -| ?- myfreeze(X,print(bound(x,X))), domain(X,[1,2,3]), - domain(Y,[2,10]), X=Y. - -bound(x,2) % side effect -X = 2, % bindings -Y = 2 -~~~~~ - -The two example solvers interact via bindings to shared attributed -variables only. More complicated interactions are likely to be found -in more sophisticated solvers. The corresponding -verify_attributes/3 predicates would typically refer to the -attributes from other known solvers/modules via the module prefix in -Module:get_atts/2`. - -@} - -@{ - -@defgroup New_Style_Attribute_Declarations hProlog and SWI-Prolog style Attribute Declarations - - The following documentation is taken from the SWI-Prolog manual. - - Binding an attributed variable schedules a goal to be executed at the - first possible opportunity. In the current implementation the hooks are - executed immediately after a successful unification of the clause-head - or successful completion of a foreign language (built-in) predicate. Each - attribute is associated to a module and the hook attr_unify_hook/2 is - executed in this module. The example below realises a very simple and - incomplete finite domain reasoner. - - ~~~~~ - :- module(domain, - [ domain/2 % Var, ?Domain % - ]). - :- use_module(library(ordsets)). - - domain(X, Dom) :- - var(Dom), !, - get_attr(X, domain, Dom). - domain(X, List) :- - list_to_ord_set(List, Domain), -v put_attr(Y, domain, Domain), - X = Y. - - % An attributed variable with attribute value Domain has been % - % assigned the value Y % - - attr_unify_hook(Domain, Y) :- - ( get_attr(Y, domain, Dom2) - -> ord_intersection(Domain, Dom2, NewDomain), - ( NewDomain == [] - -> fail - ; NewDomain = [Value] - -> Y = Value - ; put_attr(Y, domain, NewDomain) - ) - ; var(Y) - -> put_attr( Y, domain, Domain ) - ; ord_memberchk(Y, Domain) - ). - - % Translate attributes from this module to residual goals % - - attribute_goals(X) --> - { get_attr(X, domain, List) }, - [domain(X, List)]. - ~~~~~ - - Before explaining the code we give some example queries: - - The predicate `domain/2` fetches (first clause) or assigns - (second clause) the variable a domain, a set of values it can - be unified with. In the second clause first associates the domain - with a fresh variable and then unifies X to this variable to deal - with the possibility that X already has a domain. The - predicate attr_unify_hook/2 is a hook called after a variable with - a domain is assigned a value. In the simple case where the variable - is bound to a concrete value we simply check whether this value is in - the domain. Otherwise we take the intersection of the domains and either - fail if the intersection is empty (first example), simply assign the - value if there is only one value in the intersection (second example) or - assign the intersection as the new domain of the variable (third - example). The nonterminal `attribute_goals/3` is used to translate - remaining attributes to user-readable goals that, when executed, reinstate - these attributes. - -@} - - -@{ -@defgroup CohYroutining Co-routining - -Prolog uses a simple left-to-right flow of control. It is sometimes -convenient to change this control so that goals will only execute when -sufficiently instantiated. This may result in a more "data-driven" -execution, or may be necessary to correctly implement extensions such -as negation by failure. - -Initially, YAP used a separate mechanism for co-routining. Nowadays, YAP uses -attributed variables to implement co-routining. - -Two declarations are supported: - -+ block/1 -The argument to `block/1` is a condition on a goal or a conjunction -of conditions, with each element separated by commas. Each condition is -of the form `predname( _C1_,..., _CN_)`, where _N_ is the -arity of the goal, and each _CI_ is of the form `-`, if the -argument must suspend until the first such variable is bound, or -`?`, otherwise. - -+ wait/1 -The argument to `wait/1` is a predicate descriptor or a conjunction -of these predicates. These predicates will suspend until their first -argument is bound. - - -The following primitives can be used: - -- freeze/2 - -- dif/2 - -- when/2 - -- frozen/2 -@} - @} diff --git a/docs/md/fli.md b/docs/md/fli.md index 47c616406..dbc95c7e4 100644 --- a/docs/md/fli.md +++ b/docs/md/fli.md @@ -878,8 +878,7 @@ a solution was found. Notice that you cannot create new slots if an YAP_ExnterGoal goal is open. -
  • `YAP_Bool` YAP_RetryGoal(`YAP_dogoalinfo \*` _infop_) @anchor -YAP_RetryGoal +
  • `YAP_Bool` YAP_RetryGoal(`YAP_dogoalinfo \*` _infop_) @anchor YAP_RetryGoal Backtrack to a query created by [YAP_EnterGoal](@ref YAP_EnterGoal). The query @@ -984,8 +983,8 @@ collector, the second does the same for the atom garbage collector.`
  • `void \*` YAP_ExternalDataInStackFromTerm(`YAP_Term t`)
  • -
  • `YAP_Bool` YAP_IsExternalDataInStackTerm(`YAP_Term t`) @anchor -YAP_AllocExternalDataInStack +
  • `YAP_Bool` YAP_IsExternalDataInStackTerm(`YAP_Term t`) + @anchor YAP_AllocExternalDataInStack The next routines allow one to store external data in the Prolog @@ -1000,8 +999,8 @@ so it should not be used to store Prolog terms. On the other hand, it may be useful to store arrays in a compact way, or pointers to external objects.
  • -
  • `int` YAP_HaltRegisterHook(`YAP_halt_hook f, void \*closure`) @anchor -YAP_HaltRegisterHook +
  • `int` YAP_HaltRegisterHook(`YAP_halt_hook f, void \*closure`) + @anchor YAP_HaltRegisterHook Register the function _f_ to be called if YAP is halted. The @@ -1076,8 +1075,8 @@ the predicate and _arity_ is the predicate's arity.
  • void YAP_UserBackCPredicate(char \* _name_, int \* _init_(), int \* -_cont_(), unsigned long int _arity_, unsigned int _sizeof_) @anchor -YAP_UserBackCPredicate +_cont_(), unsigned long int _arity_, unsigned int _sizeof_) +@anchor YAP_UserBackCPredicate describes a new predicate where _name_ is the name of the predicate, _init_, and _cont_ are the C functions that implement the @@ -1092,8 +1091,8 @@ predicate and _arity_ is the predicate's arity.
  • -
  • void YAP_PRESERVED_DATA_CUT( _ptr_, _type_); @anchor -YAP_PRESERVED_DATA_CUT +
  • void YAP_PRESERVED_DATA_CUT( _ptr_, _type_); + @anchor YAP_PRESERVED_DATA_CUT
  • diff --git a/docs/md/load_files.md b/docs/md/load_files.md index bcbe0952e..b52a6cd62 100644 --- a/docs/md/load_files.md +++ b/docs/md/load_files.md @@ -3,10 +3,10 @@ @brief Next, we present the main predicates and directives available to load files and to control the Prolog environment. - + @subpage YAPConsulting + + @ref YAPConsulting - + @subpage YAPModules + + @ref YAPModules - + @subpage YAPBigLoad + + @ref YAPBigLoad - \ No newline at end of file + diff --git a/docs/md/syntax.md b/docs/md/syntax.md index 79a292f23..1405eceed 100644 --- a/docs/md/syntax.md +++ b/docs/md/syntax.md @@ -309,7 +309,7 @@ Punctuation tokens consist of one of the following characters: These characters are used to group terms. -@subsection Layout Layout +@subsection LayoutComents Character Layout Any characters with ASCII code less than or equal to 32 appearing before a token are ignored. diff --git a/library/clp/clpfd.pl b/library/clp/clpfd.pl index 638c4e5f8..e20b4ab8a 100644 --- a/library/clp/clpfd.pl +++ b/library/clp/clpfd.pl @@ -5682,21 +5682,33 @@ attribute_goals(X) --> ), attributes_goals(Ps). +%% @namespace clpfd_aux + clpfd_aux:attribute_goals(_) --> []. clpfd_aux:attr_unify_hook(_,_) :- false. +%% @namespace clpfd_gcc_vs + clpfd_gcc_vs:attribute_goals(_) --> []. clpfd_gcc_vs:attr_unify_hook(_,_) :- false. +%% @namespace clpfd_gcc_num + clpfd_gcc_num:attribute_goals(_) --> []. clpfd_gcc_num:attr_unify_hook(_,_) :- false. +%% @namespace clpfd_gcc_occurred + clpfd_gcc_occurred:attribute_goals(_) --> []. clpfd_gcc_occurred:attr_unify_hook(_,_) :- false. +%% @namespace clpfd_relation + clpfd_relation:attribute_goals(_) --> []. clpfd_relation:attr_unify_hook(_,_) :- false. +%% @namespace clpfd_original + clpfd_original:attribute_goals(_) --> []. clpfd_original:attr_unify_hook(_,_) :- false. diff --git a/library/dialect/swi.yap b/library/dialect/swi.yap index eb42c7b64..e09fbdddf 100644 --- a/library/dialect/swi.yap +++ b/library/dialect/swi.yap @@ -2,6 +2,9 @@ % SWI emulation. % written in an on-demand basis. +%% +%% @file dialect/swi.yap +%% %% @defgroup SWI Compatibility with SWI-Prolog and Other Prolog systems %% @{ %% @ingroup YAPProgramming @@ -296,7 +299,7 @@ flag(Key, 0, New) :- recorda(K, New, _). current_flag(Key) :- - swi:flag(Key). + flag(Key). require(F) :- must_be(list, F), diff --git a/library/lists.yap b/library/lists.yap index 4fd7c38ba..ce1569f27 100644 --- a/library/lists.yap +++ b/library/lists.yap @@ -3,12 +3,10 @@ * @author Bob Welham, Lawrence Byrd, and R. A. O'Keefe. Contributions from Vitor Santos Costa, Jan Wielemaker and others. * @date 1999 * - * @addtogroup lists The Prolog Library - * - * @ingroup library - * * @{ * +x * @addtogroup library The Prolog Library + * * @brief List Manipulation Predicates * * diff --git a/library/random.yap b/library/random.yap index c199aca66..272310fc8 100644 --- a/library/random.yap +++ b/library/random.yap @@ -35,9 +35,11 @@ setrand/1 ]). -/** @defgroup random Random Number Generator -@ingroup library -@{ +/** + + @{ + @defgroup random Random Number Generator + @ingroup library Since YAP-4.3.19 YAP uses the O'Keefe public-domain algorithm, based on the "Applied Statistics" @@ -218,5 +220,6 @@ setrand(rand(X,Y,Z)) :- getrand(rand(X,Y,Z)) :- getrand(X,Y,Z). + /** @} */ diff --git a/library/rbtrees.yap b/library/rbtrees.yap index d9c43dc49..8b52743b4 100644 --- a/library/rbtrees.yap +++ b/library/rbtrees.yap @@ -52,10 +52,12 @@ ]). /** + * + * @{ + * * @defgroup rbtrees Red-Black Trees * @ingroup library - @{ Red-Black trees are balanced search binary trees. They are named because nodes can be classified as either red or black. The code we include is based on "Introduction to Algorithms", second edition, by Cormen, @@ -1453,4 +1455,4 @@ with _NewVal_. Fails if it cannot find _Key_ in _T_. */ -%%! @} +%%! @} \ No newline at end of file diff --git a/library/readutil.yap b/library/readutil.yap index 59671958a..abfcff87d 100644 --- a/library/readutil.yap +++ b/library/readutil.yap @@ -38,7 +38,7 @@ ]). /** -* @defgroup readutil +* @defgroup readutil Reading Lines and Files * @ingroup library * * Read full lines and a full file in a single call. diff --git a/library/system.yap b/library/system.yap index 772ea3771..7a37f6abe 100644 --- a/library/system.yap +++ b/library/system.yap @@ -574,7 +574,7 @@ process_inp_stream_for_exec(Error, _, G, L, L) :- var(Error), !, process_inp_stream_for_exec(null, null, _, L, L) :- !. process_inp_stream_for_exec(std, 0, _, L, L) :- !. process_inp_stream_for_exec(pipe(ForWriting), ForReading, _, L, [ForReading|L]) :- var(ForWriting), !, - open_pipe_streams(ForReading, ForWriting). + open_pipe_stream(ForReading, ForWriting). process_inp_stream_for_exec(pipe(Stream), _, _, L, L) :- !, stream_property(Stream, input). process_inp_stream_for_exec(Stream, Stream, _, L, L) :- @@ -587,7 +587,7 @@ process_out_stream_for_exec(Error, _, G, L, L) :- var(Error), !, process_out_stream_for_exec(null, null, _, L, L) :- !. process_out_stream_for_exec(std, 1, _, L, L) :- !. process_out_stream_for_exec(pipe(ForReading), ForWriting, _, L, [ForWriting|L]) :- var(ForReading), !, - open_pipe_streams(ForReading, ForWriting). + open_pipe_stream(ForReading, ForWriting). process_out_stream_for_exec(pipe(Stream), _, _, L, L) :- !, stream_property(Stream, output). process_out_stream_for_exec(Stream, Stream, _, L, L) :- @@ -599,7 +599,7 @@ process_err_stream_for_exec(Error, _, G, L, L) :- var(Error), !, process_err_stream_for_exec(null, null, _, L, L) :- !. process_err_stream_for_exec(std, 2, _, L, L) :- !. process_err_stream_for_exec(pipe(ForReading), ForWriting, _, L, [ForWriting|L]) :- var(ForReading), !, - open_pipe_streams(ForReading, ForWriting). + open_pipe_stream(ForReading, ForWriting). process_err_stream_for_exec(pipe(Stream), Stream, _, L, L) :- !, stream_property(Stream, output). process_err_stream_for_exec(Stream, Stream, _, L, L) :- @@ -803,7 +803,7 @@ Create file _OldFile_ to _NewFile_. This predicate uses the */ rename_file(F0, F) :- rename_file(F0, F, Error), - handle_system_internal(Error, off, rename_file(F0, F))). + handle_system_internal(Error, off, rename_file(F0, F)). /** @pred system(+ _S_) diff --git a/os/iopreds.c b/os/iopreds.c index 0d05839cc..bbfc238a6 100644 --- a/os/iopreds.c +++ b/os/iopreds.c @@ -125,7 +125,7 @@ FILE *Yap_stderr; static Term gethdir(Term t) { CACHE_REGS - Atom aref = AtomOfTerm(t); + Atom aref = AtomOfTerm(t); char *s = RepAtom(aref)->StrOfAE; size_t nsz; @@ -335,7 +335,7 @@ static void default_peek(StreamDesc *st) { void Yap_DefaultStreamOps(StreamDesc *st) { CACHE_REGS - st->stream_wputc = put_wchar; + st->stream_wputc = put_wchar; st->stream_wgetc = get_wchar; if (st->vfs && !st->file) { st->stream_putc = st->vfs->put_char; @@ -392,7 +392,7 @@ void Yap_DefaultStreamOps(StreamDesc *st) { static void InitFileIO(StreamDesc *s) { CACHE_REGS - Yap_DefaultStreamOps(s); + Yap_DefaultStreamOps(s); } static void InitStdStream(int sno, SMALLUNSGN flags, FILE *file, VFS_t *vfsp) { @@ -457,15 +457,15 @@ Term Yap_StreamUserName(int sno) { static void InitStdStreams(void) { CACHE_REGS - if (LOCAL_sockets_io) { - InitStdStream(StdInStream, Input_Stream_f, NULL, NULL); - InitStdStream(StdOutStream, Output_Stream_f, NULL, NULL); - InitStdStream(StdErrStream, Output_Stream_f, NULL, NULL); - } else { - InitStdStream(StdInStream, Input_Stream_f, stdin, NULL); - InitStdStream(StdOutStream, Output_Stream_f, stdout, NULL); - InitStdStream(StdErrStream, Output_Stream_f, stderr, NULL); - } + if (LOCAL_sockets_io) { + InitStdStream(StdInStream, Input_Stream_f, NULL, NULL); + InitStdStream(StdOutStream, Output_Stream_f, NULL, NULL); + InitStdStream(StdErrStream, Output_Stream_f, NULL, NULL); + } else { + InitStdStream(StdInStream, Input_Stream_f, stdin, NULL); + InitStdStream(StdOutStream, Output_Stream_f, stdout, NULL); + InitStdStream(StdErrStream, Output_Stream_f, stderr, NULL); + } GLOBAL_Stream[StdInStream].name = Yap_LookupAtom("user_input"); GLOBAL_Stream[StdOutStream].name = Yap_LookupAtom("user_output"); GLOBAL_Stream[StdErrStream].name = Yap_LookupAtom("user_error"); @@ -589,8 +589,8 @@ void Yap_DebugPlWrite(Term t) { void Yap_DebugPlWriteln(Term t) { CACHE_REGS - if (t == 0) - fprintf(stderr, "NULL"); + if (t == 0) + fprintf(stderr, "NULL"); Yap_plwrite(t, NULL, 15, 0, GLOBAL_MaxPriority); Yap_DebugPutc(GLOBAL_Stream[LOCAL_c_error_stream].file, '.'); Yap_DebugPutc(GLOBAL_Stream[LOCAL_c_error_stream].file, 10); @@ -598,12 +598,12 @@ void Yap_DebugPlWriteln(Term t) { void Yap_DebugErrorPutc(int c) { CACHE_REGS - Yap_DebugPutc(GLOBAL_Stream[LOCAL_c_error_stream].file, c); + Yap_DebugPutc(GLOBAL_Stream[LOCAL_c_error_stream].file, c); } void Yap_DebugWriteIndicator(PredEntry *ap) { CACHE_REGS - Term tmod = ap->ModuleOfPred; + Term tmod = ap->ModuleOfPred; if (!tmod) tmod = TermProlog; #if THREADS @@ -675,13 +675,13 @@ static int NullPutc(int sno, int ch) { /* check if we read a LOCAL_newline or an EOF */ int console_post_process_eof(StreamDesc *s) { CACHE_REGS - if (!ResetEOF(s)) { - s->status |= Eof_Stream_f; - s->stream_getc = EOFGetc; - s->stream_wgetc = EOFWGetc; - s->stream_wgetc_for_read = EOFWGetc; - LOCAL_newline = true; - } + if (!ResetEOF(s)) { + s->status |= Eof_Stream_f; + s->stream_getc = EOFGetc; + s->stream_wgetc = EOFWGetc; + s->stream_wgetc_for_read = EOFWGetc; + LOCAL_newline = true; + } return EOFCHAR; } @@ -780,9 +780,9 @@ static int handle_write_encoding_error(int sno, wchar_t ch) { return ch; } else { CACHE_REGS - Yap_Error(REPRESENTATION_ERROR_CHARACTER, MkIntegerTerm(ch), - "charater %ld cannot be encoded in stream %d", - (unsigned long int)ch, sno); + Yap_Error(REPRESENTATION_ERROR_CHARACTER, MkIntegerTerm(ch), + "charater %ld cannot be encoded in stream %d", + (unsigned long int)ch, sno); return -1; } } @@ -820,91 +820,91 @@ int put_wchar(int sno, wchar_t ch) { } return ch; } - case ENC_ISO_UTF8: - if (ch < 0x80) { - GLOBAL_Stream[sno].stream_putc(sno, ch); - } else if (ch < 0x800) { - GLOBAL_Stream[sno].stream_putc(sno, 0xC0 | ch >> 6); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); - } else if (ch < 0x10000) { - GLOBAL_Stream[sno].stream_putc(sno, 0xE0 | ch >> 12); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 6 & 0x3F)); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); - } else if (ch < 0x200000) { - GLOBAL_Stream[sno].stream_putc(sno, 0xF0 | ch >> 18); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 12 & 0x3F)); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 6 & 0x3F)); - GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); - } else { - /* should never happen */ - return -1; - } + case ENC_ISO_UTF8: + if (ch < 0x80) { + GLOBAL_Stream[sno].stream_putc(sno, ch); + } else if (ch < 0x800) { + GLOBAL_Stream[sno].stream_putc(sno, 0xC0 | ch >> 6); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); + } else if (ch < 0x10000) { + GLOBAL_Stream[sno].stream_putc(sno, 0xE0 | ch >> 12); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 6 & 0x3F)); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); + } else if (ch < 0x200000) { + GLOBAL_Stream[sno].stream_putc(sno, 0xF0 | ch >> 18); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 12 & 0x3F)); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch >> 6 & 0x3F)); + GLOBAL_Stream[sno].stream_putc(sno, 0x80 | (ch & 0x3F)); + } else { + /* should never happen */ + return -1; + } + return ch; + break; + case ENC_UTF16_LE: { + if (ch < 0x10000) { + GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); + } else { + // computations + uint16_t ich = ch; + uint16_t lead = LEAD_OFFSET + (ich >> 10); + uint16_t trail = 0xDC00 + (ich & 0x3FF); + + GLOBAL_Stream[sno].stream_putc(sno, (trail & 0xff)); + GLOBAL_Stream[sno].stream_putc(sno, (trail >> 8)); + GLOBAL_Stream[sno].stream_putc(sno, (lead & 0xff)); + GLOBAL_Stream[sno].stream_putc(sno, (lead >> 8)); + } + return ch; + } + case ENC_UTF16_BE: { + // computations + if (ch < 0x10000) { + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); + GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); + } else { + uint16_t lead = (uint16_t)LEAD_OFFSET + ((uint16_t)ch >> 10); + uint16_t trail = 0xDC00 + ((uint16_t)ch & 0x3FF); + + GLOBAL_Stream[sno].stream_putc(sno, (lead >> 8)); + GLOBAL_Stream[sno].stream_putc(sno, (lead & 0xff)); + GLOBAL_Stream[sno].stream_putc(sno, (trail >> 8)); + GLOBAL_Stream[sno].stream_putc(sno, (trail & 0xff)); + } + return ch; + } + case ENC_UCS2_LE: { + if (ch >= 0x10000) { + return 0; + } + GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); + return ch; + } + case ENC_UCS2_BE: { + // computations + if (ch < 0x10000) { + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); + GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); return ch; - break; - case ENC_UTF16_LE: { - if (ch < 0x10000) { - GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); - } else { - // computations - uint16_t ich = ch; - uint16_t lead = LEAD_OFFSET + (ich >> 10); - uint16_t trail = 0xDC00 + (ich & 0x3FF); + } else { + return 0; + } + } - GLOBAL_Stream[sno].stream_putc(sno, (trail & 0xff)); - GLOBAL_Stream[sno].stream_putc(sno, (trail >> 8)); - GLOBAL_Stream[sno].stream_putc(sno, (lead & 0xff)); - GLOBAL_Stream[sno].stream_putc(sno, (lead >> 8)); - } - return ch; - } - case ENC_UTF16_BE: { - // computations - if (ch < 0x10000) { - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); - GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); - } else { - uint16_t lead = (uint16_t)LEAD_OFFSET + ((uint16_t)ch >> 10); - uint16_t trail = 0xDC00 + ((uint16_t)ch & 0x3FF); - - GLOBAL_Stream[sno].stream_putc(sno, (lead >> 8)); - GLOBAL_Stream[sno].stream_putc(sno, (lead & 0xff)); - GLOBAL_Stream[sno].stream_putc(sno, (trail >> 8)); - GLOBAL_Stream[sno].stream_putc(sno, (trail & 0xff)); - } - return ch; - } - case ENC_UCS2_LE: { - if (ch >= 0x10000) { - return 0; - } - GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); - return ch; - } - case ENC_UCS2_BE: { - // computations - if (ch < 0x10000) { - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8)); - GLOBAL_Stream[sno].stream_putc(sno, (ch & 0xff)); - return ch; - } else { - return 0; - } - } - - case ENC_ISO_UTF32_BE: - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 24) & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 16) & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8) & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, ch & 0xff); - return ch; - case ENC_ISO_UTF32_LE: - GLOBAL_Stream[sno].stream_putc(sno, ch & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8) & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 16) & 0xff); - GLOBAL_Stream[sno].stream_putc(sno, (ch >> 24) & 0xff); - return ch; + case ENC_ISO_UTF32_BE: + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 24) & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 16) & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8) & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, ch & 0xff); + return ch; + case ENC_ISO_UTF32_LE: + GLOBAL_Stream[sno].stream_putc(sno, ch & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 8) & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 16) & 0xff); + GLOBAL_Stream[sno].stream_putc(sno, (ch >> 24) & 0xff); + return ch; } } return -1; @@ -913,19 +913,19 @@ int put_wchar(int sno, wchar_t ch) { /* used by user-code to read characters from the current input stream */ int Yap_PlGetchar(void) { CACHE_REGS - return ( - GLOBAL_Stream[LOCAL_c_input_stream].stream_getc(LOCAL_c_input_stream)); + return ( + GLOBAL_Stream[LOCAL_c_input_stream].stream_getc(LOCAL_c_input_stream)); } int Yap_PlGetWchar(void) { CACHE_REGS - return get_wchar(LOCAL_c_input_stream); + return get_wchar(LOCAL_c_input_stream); } /* avoid using a variable to call a function */ int Yap_PlFGetchar(void) { CACHE_REGS - return (PlGetc(LOCAL_c_input_stream)); + return (PlGetc(LOCAL_c_input_stream)); } Term Yap_MkStream(int n) { @@ -941,11 +941,11 @@ Int GetStreamFd(int sno) { return (GLOBAL_Stream[sno].u.socket.fd); } else #endif - if (GLOBAL_Stream[sno].status & Pipe_Stream_f) { - return (GLOBAL_Stream[sno].u.pipe.fd); - } else if (GLOBAL_Stream[sno].status & InMemory_Stream_f) { - return (-1); - } + if (GLOBAL_Stream[sno].status & Pipe_Stream_f) { + return (GLOBAL_Stream[sno].u.pipe.fd); + } else if (GLOBAL_Stream[sno].status & InMemory_Stream_f) { + return (-1); + } return (fileno(GLOBAL_Stream[sno].file)); } @@ -957,13 +957,13 @@ static int binary_file(const char *file_name) { struct _stat ss; if (_stat(file_name, &ss) != 0) #else - struct stat ss; + struct stat ss; if (stat(file_name, &ss) != 0) #endif - { - /* ignore errors while checking a file */ - return false; - } + { + /* ignore errors while checking a file */ + return false; + } return (S_ISDIR(ss.st_mode)); #else return (FALSE); @@ -1125,25 +1125,26 @@ static void check_bom(int sno, StreamDesc *st) { } } -bool Yap_initStream(int sno, FILE *fd, const char *name, const char *io_mode, Term file_name, encoding_t encoding, - stream_flags_t flags, void *vfs) { +bool Yap_initStream(int sno, FILE *fd, const char *name, const char *io_mode, + Term file_name, encoding_t encoding, stream_flags_t flags, + void *vfs) { StreamDesc *st = &GLOBAL_Stream[sno]; if (io_mode == NULL) - Yap_Error(PERMISSION_ERROR_NEW_ALIAS_FOR_STREAM, MkIntegerTerm(sno), "File opened with NULL Permissions"); + Yap_Error(PERMISSION_ERROR_NEW_ALIAS_FOR_STREAM, MkIntegerTerm(sno), + "File opened with NULL Permissions"); if (strchr(io_mode, 'a')) { - st->status = Append_Stream_f|Output_Stream_f|flags; - } else - if (strchr(io_mode, 'w')) { - st->status = Output_Stream_f | flags; - } + st->status = Append_Stream_f | Output_Stream_f | flags; + } else if (strchr(io_mode, 'w')) { + st->status = Output_Stream_f | flags; + } if (strchr(io_mode, 'r')) { - st->status = Input_Stream_f|flags; + st->status = Input_Stream_f | flags; } if (strchr(io_mode, 'b')) { - st->status = Binary_Stream_f|flags; + st->status = Binary_Stream_f | flags; } - //st->vfs = vfs; + // st->vfs = vfs; st->buf.on = false; st->charcount = 0; st->linecount = 1; @@ -1159,7 +1160,8 @@ bool Yap_initStream(int sno, FILE *fd, const char *name, const char *io_mode, Te name = Yap_guessFileName(fd, sno, buf, YAP_FILENAME_MAX); } if (!name) - Yap_Error(SYSTEM_ERROR_INTERNAL,file_name,"Yap_guessFileName failed: opening a file without a name"); + Yap_Error(SYSTEM_ERROR_INTERNAL, file_name, + "Yap_guessFileName failed: opening a file without a name"); st->name = Yap_LookupAtom(name); st->user_name = file_name; st->file = fd; @@ -1197,62 +1199,44 @@ static bool open_header(int sno, Atom open_mode) { return true; } -#define OPEN_DEFS() \ - PAR("alias", isatom, OPEN_ALIAS) \ - , PAR("bom", booleanFlag, OPEN_BOM), PAR("buffer", isatom, OPEN_BUFFER), \ - PAR("close_on_abort", booleanFlag, OPEN_CLOSE_ON_ABORT), \ - PAR("create", isatom, OPEN_CREATE), \ - PAR("encoding", isatom, OPEN_ENCODING), \ - PAR("eof_action", isatom, OPEN_EOF_ACTION), \ - PAR("expand_filename", booleanFlag, OPEN_EXPAND_FILENAME), \ - PAR("file_name", isatom, OPEN_FILE_NAME), PAR("input", ok, OPEN_INPUT), \ - PAR("locale", isatom, OPEN_LOCALE), PAR("lock", isatom, OPEN_LOCK), \ - PAR("mode", isatom, OPEN_MODE), PAR("output", ok, OPEN_OUTPUT), \ - PAR("representation_errors", booleanFlag, OPEN_REPRESENTATION_ERRORS), \ - PAR("reposition", booleanFlag, OPEN_REPOSITION), \ - PAR("script", booleanFlag, OPEN_SCRIPT), PAR("type", isatom, OPEN_TYPE), \ - PAR("wait", booleanFlag, OPEN_WAIT), PAR(NULL, ok, OPEN_END) +#define OPEN_DEFS() \ + PAR("alias", isatom, OPEN_ALIAS) \ + , PAR("bom", booleanFlag, OPEN_BOM), PAR("buffer", isatom, OPEN_BUFFER), \ + PAR("close_on_abort", booleanFlag, OPEN_CLOSE_ON_ABORT), \ + PAR("create", isatom, OPEN_CREATE), \ + PAR("encoding", isatom, OPEN_ENCODING), \ + PAR("eof_action", isatom, OPEN_EOF_ACTION), \ + PAR("expand_filename", booleanFlag, OPEN_EXPAND_FILENAME), \ + PAR("file_name", isatom, OPEN_FILE_NAME), PAR("input", ok, OPEN_INPUT), \ + PAR("locale", isatom, OPEN_LOCALE), PAR("lock", isatom, OPEN_LOCK), \ + PAR("mode", isatom, OPEN_MODE), PAR("output", ok, OPEN_OUTPUT), \ + PAR("representation_errors", booleanFlag, OPEN_REPRESENTATION_ERRORS), \ + PAR("reposition", booleanFlag, OPEN_REPOSITION), \ + PAR("script", booleanFlag, OPEN_SCRIPT), PAR("type", isatom, OPEN_TYPE), \ + PAR("wait", booleanFlag, OPEN_WAIT), PAR(NULL, ok, OPEN_END) #define PAR(x, y, z) z typedef enum open_enum_choices { OPEN_DEFS() } open_choices_t; #undef PAR -#define PAR(x, y, z) \ +#define PAR(x, y, z) \ { x, y, z } static const param_t open_defs[] = {OPEN_DEFS()}; #undef PAR -static Int -do_open(Term file_name, Term t2, - Term tlist USES_REGS) { +static Int do_open(Term file_name, Term t2, Term tlist USES_REGS) { Atom open_mode; int sno; StreamDesc *st; bool avoid_bom = false, needs_bom = false; - const char *fname0; stream_flags_t flags; const char *s_encoding; encoding_t encoding; Term tenc; char io_mode[8]; - // original file name - if (IsVarTerm(file_name)) { - Yap_Error(INSTANTIATION_ERROR, file_name, "open/3"); - return FALSE; - } - if (!IsAtomTerm(file_name)) { - if (IsStringTerm(file_name)) { - fname0 = (char *)StringOfTerm(file_name); - } else { - Yap_Error(DOMAIN_ERROR_SOURCE_SINK, file_name, "open/3"); - return FALSE; - } - } else { - fname0 = RepAtom(AtomOfTerm(file_name))->StrOfAE; - } // open mode if (IsVarTerm(t2)) { Yap_Error(INSTANTIATION_ERROR, t2, "open/3"); @@ -1289,22 +1273,25 @@ do_open(Term file_name, Term t2, // default encoding, no bom yet encoding = enc_id(s_encoding, ENC_OCTET); // only set encoding after getting BOM + char const *fname0; bool ok = (args[OPEN_EXPAND_FILENAME].used - ? args[OPEN_EXPAND_FILENAME].tvalue == TermTrue - : false) || - trueGlobalPrologFlag(OPEN_EXPANDS_FILENAME_FLAG); - - // expand file name? - int lvl = push_text_stack(); - const char *fname = Yap_AbsoluteFile(fname0, ok); - - if (!fname) { - pop_text_stack(lvl); - PlIOError(EXISTENCE_ERROR_SOURCE_SINK, ARG1, NULL); + ? args[OPEN_EXPAND_FILENAME].tvalue == TermTrue + : false) || + trueGlobalPrologFlag(OPEN_EXPANDS_FILENAME_FLAG); + if (ok) { + if (((IsAtomTerm(file_name) && + (fname0 = RepAtom(AtomOfTerm(file_name))->StrOfAE))) || + (IsStringTerm(file_name) && (fname0 = StringOfTerm(file_name)))) { + int lvl = push_text_stack(); + const char *fname = Yap_AbsoluteFile(fname0, ok); + file_name = MkAtomTerm(Yap_LookupAtom(fname)); + if (!fname) { + pop_text_stack(lvl); + PlIOError(EXISTENCE_ERROR_SOURCE_SINK, ARG1, NULL); + } + } } - // Skip scripts that start with !#/.. or similar - pop_text_stack(lvl); if (open_mode == AtomRead) { strncpy(io_mode, "r", 8); @@ -1313,7 +1300,6 @@ do_open(Term file_name, Term t2, } else if (open_mode == AtomAppend) { strncpy(io_mode, "a", 8); } else { - pop_text_stack(lvl); return false; } // binary type @@ -1334,41 +1320,33 @@ do_open(Term file_name, Term t2, #endif /* note that this matters for UNICODE style conversions */ } else { - pop_text_stack(lvl); Yap_Error(DOMAIN_ERROR_STREAM, tlist, "type is ~a, must be one of binary or text", t); } } - if ((sno = Yap_OpenStream(file_name, io_mode, file_name, encoding)) < 0) - { - pop_text_stack(lvl); - return false; - } + if ((sno = Yap_OpenStream(file_name, io_mode, file_name, encoding)) < 0) { + return false; + } st = &GLOBAL_Stream[sno]; // user requested encoding? // BOM mess if (encoding == ENC_UTF16_BE || encoding == ENC_UTF16_LE || encoding == ENC_UCS2_BE || encoding == ENC_UCS2_LE || - encoding == ENC_ISO_UTF32_BE || encoding == ENC_ISO_UTF32_LE) - { + encoding == ENC_ISO_UTF32_BE || encoding == ENC_ISO_UTF32_LE) { + needs_bom = true; + } + if (args[OPEN_BOM].used) { + if (args[OPEN_BOM].tvalue == TermTrue) { + avoid_bom = false; needs_bom = true; + } else if (args[OPEN_BOM].tvalue == TermFalse) { + avoid_bom = true; + needs_bom = false; } - if (args[OPEN_BOM].used) - { - if (args[OPEN_BOM].tvalue == TermTrue) - { - avoid_bom = false; - needs_bom = true; - } - else if (args[OPEN_BOM].tvalue == TermFalse) - { - avoid_bom = true; - needs_bom = false; - } - } + } bool script = - (args[OPEN_SCRIPT].used ? args[OPEN_SCRIPT].tvalue == TermTrue : false); + (args[OPEN_SCRIPT].used ? args[OPEN_SCRIPT].tvalue == TermTrue : false); if (args[OPEN_ALIAS].used) { Atom al = AtomOfTerm(args[OPEN_ALIAS].tvalue); @@ -1400,7 +1378,6 @@ do_open(Term file_name, Term t2, if (script) { open_header(sno, open_mode); } - pop_text_stack(lvl); free(args); UNLOCK(st->streamlock); @@ -1437,79 +1414,79 @@ static Int open3(USES_REGS1) { /** @pred open(+ _F_,+ _M_,- _S_,+ _Opts_) is iso - Opens the file with name _F_ in mode _M_ (`read`, `write` or - `append`), returning _S_ unified with the stream name, and following - these options: + Opens the file with name _F_ in mode _M_ (`read`, `write` or + `append`), returning _S_ unified with the stream name, and following + these options: - + `type(+ _T_)` is iso + + `type(+ _T_)` is iso - Specify whether the stream is a `text` stream (default), or a - `binary` stream. + Specify whether the stream is a `text` stream (default), or a + `binary` stream. - + `reposition(+ _Bool_)` is iso - Specify whether it is possible to reposition the stream (`true`), or - not (`false`). By default, YAP enables repositioning for all - files, except terminal files and sockets. + + `reposition(+ _Bool_)` is iso + Specify whether it is possible to reposition the stream (`true`), or + not (`false`). By default, YAP enables repositioning for all + files, except terminal files and sockets. - + `eof(+ _Action_)` is iso + + `eof(+ _Action_)` is iso - Specify the action to take if attempting to input characters from a - stream where we have previously found an `end_of_file`. The possible - actions are `error`, that raises an error, `reset`, that tries to - reset the stream and is used for `tty` type files, and `eof_code`, - which generates a new `end_of_file` (default for non-tty files). + Specify the action to take if attempting to input characters from a + stream where we have previously found an `end_of_file`. The possible + actions are `error`, that raises an error, `reset`, that tries to + reset the stream and is used for `tty` type files, and `eof_code`, + which generates a new `end_of_file` (default for non-tty files). - + `alias(+ _Name_)` is iso + + `alias(+ _Name_)` is iso - Specify an alias to the stream. The alias Name must be an atom. - The - alias can be used instead of the stream descriptor for every operation - concerning the stream. + Specify an alias to the stream. The alias Name must be an atom. + The + alias can be used instead of the stream descriptor for every operation + concerning the stream. - The operation will fail and give an error if the alias name is already - in use. YAP allows several aliases for the same file, but only - one is returned by stream_property/2 + The operation will fail and give an error if the alias name is already + in use. YAP allows several aliases for the same file, but only + one is returned by stream_property/2 - + `bom(+ _Bool_)` + + `bom(+ _Bool_)` - If present and `true`, a BOM (Byte Order Mark) was - detected while opening the file for reading or a BOM was written while - opening the stream. See BOM for details. + If present and `true`, a BOM (Byte Order Mark) was + detected while opening the file for reading or a BOM was written while + opening the stream. See BOM for details. - + `encoding(+ _Encoding_)` + + `encoding(+ _Encoding_)` - Set the encoding used for text. See Encoding for an overview of - wide character and encoding issues. + Set the encoding used for text. See Encoding for an overview of + wide character and encoding issues. - + `representation_errors(+ _Mode_)` + + `representation_errors(+ _Mode_)` - Change the behaviour when writing characters to the stream that cannot - be represented by the encoding. The behaviour is one of `error` - (throw and Input/Output error exception), `prolog` (write `\u...\` - escape code or `xml` (write `\&#...;` XML character entity). - The initial mode is `prolog` for the user streams and - `error` for all other streams. See also Encoding. + Change the behaviour when writing characters to the stream that cannot + be represented by the encoding. The behaviour is one of `error` + (throw and Input/Output error exception), `prolog` (write `\u...\` + escape code or `xml` (write `\&#...;` XML character entity). + The initial mode is `prolog` for the user streams and + `error` for all other streams. See also Encoding. - + `expand_filename(+ _Mode_)` + + `expand_filename(+ _Mode_)` - If _Mode_ is `true` then do filename expansion, then ask Prolog - to do file name expansion before actually trying to opening the file: - this includes processing `~` characters and processing `$` - environment variables at the beginning of the file. Otherwise, just try - to open the file using the given name. + If _Mode_ is `true` then do filename expansion, then ask Prolog + to do file name expansion before actually trying to opening the file: + this includes processing `~` characters and processing `$` + environment variables at the beginning of the file. Otherwise, just try + to open the file using the given name. - The default behavior is given by the Prolog flag - open_expands_filename. + The default behavior is given by the Prolog flag + open_expands_filename. - + `script( + _Boolean_ )` YAP extension. + + `script( + _Boolean_ )` YAP extension. - The file may be a Prolog script. In `read` mode just check for - initial lines if they start with the hash symbol, and skip them. In - `write` mode output an header that can be used to launch the file by - calling `yap -l file -- $*`. Note that YAP will not set file - permissions as executable. In `append` mode ignore the flag. + The file may be a Prolog script. In `read` mode just check for + initial lines if they start with the hash symbol, and skip them. In + `write` mode output an header that can be used to launch the file by + calling `yap -l file -- $*`. Note that YAP will not set file + permissions as executable. In `append` mode ignore the flag. */ @@ -1571,9 +1548,10 @@ static Int p_open_null_stream(USES_REGS1) { return (Yap_unify(ARG1, t)); } -int Yap_OpenStream(Term tin, const char* io_mode, Term user_name, encoding_t enc) { +int Yap_OpenStream(Term tin, const char *io_mode, Term user_name, + encoding_t enc) { CACHE_REGS - int sno; + int sno; StreamDesc *st; struct vfs *vfsp; int flags; @@ -1581,238 +1559,253 @@ int Yap_OpenStream(Term tin, const char* io_mode, Term user_name, encoding_t enc sno = GetFreeStreamD(); if (sno < 0) { - PlIOError(RESOURCE_ERROR_MAX_STREAMS,tin, "new stream not available for opening"); + PlIOError(RESOURCE_ERROR_MAX_STREAMS, tin, + "new stream not available for opening"); return -1; } st = GLOBAL_Stream + sno; // fname = Yap_VF(fname); flags = 0; - if ((((IsAtomTerm(tin) && - (fname = RepAtom(AtomOfTerm(tin))->StrOfAE))) || - (IsStringTerm(tin) && - (fname =StringOfTerm(tin)))) && - ((vfsp = vfs_owner(fname)) != NULL)) { - if (!vfsp->open(vfsp, fname, io_mode, sno)) { + if (IsAtomTerm(tin)) + fname = RepAtom(AtomOfTerm(tin))->StrOfAE; + else if (IsStringTerm(tin)) + fname = StringOfTerm(tin); + else + fname = NULL; + + st->file = NULL; + if (fname) { + if ((vfsp = vfs_owner(fname)) != NULL && + vfsp->open(vfsp, fname, io_mode, sno)) { + // read, write, append + user_name = st->user_name; UNLOCK(st->streamlock); - PlIOError(EXISTENCE_ERROR_SOURCE_SINK, MkAtomTerm(Yap_LookupAtom(fname)), - "%s", fname); + } else { + st->file = fopen(fname, io_mode); + } + if (!st->file) { + + PlIOError(EXISTENCE_ERROR_SOURCE_SINK, tin, "%s", fname); /* extract BACK info passed through the stream descriptor */ return -1; } - // read, write, append - user_name = st->user_name; } else if (IsApplTerm(tin)) { Functor f = FunctorOfTerm(tin); if (f == FunctorAtom || f == FunctorString || f == FunctorCodes1 || - f == FunctorCodes || f == FunctorChars1 || f == FunctorChars) { + f == FunctorCodes || f == FunctorChars1 || f == FunctorChars) { if (strchr(io_mode, 'r')) { - return Yap_OpenBufWriteStream(PASS_REGS1); + return Yap_OpenBufWriteStream(PASS_REGS1); } else { - int i = push_text_stack(); - const char *buf; + int i = push_text_stack(); + const char *buf; - buf = Yap_TextTermToText(tin PASS_REGS); - if (!buf) { - return false; - } - buf = pop_output_text_stack(i, buf); - sno = Yap_open_buf_read_stream(buf, strlen(buf) + 1, &LOCAL_encoding, - MEM_BUF_MALLOC); - return Yap_OpenBufWriteStream(PASS_REGS1); + buf = Yap_TextTermToText(tin PASS_REGS); + if (!buf) { + pop_text_stack(i); + return false; + } + buf = pop_output_text_stack(i, buf); + sno = Yap_open_buf_read_stream(buf, strlen(buf) + 1, &LOCAL_encoding, + MEM_BUF_MALLOC); + return Yap_OpenBufWriteStream(PASS_REGS1); } - } else if (f == FunctorPopen) { + } else if (!strcmp(RepAtom(NameOfFunctor(f))->StrOfAE, "popen")) { const char *buf; int i = push_text_stack(); - buf = Yap_TextTermToText(tin PASS_REGS); + buf = Yap_TextTermToText(ArgOfTerm(1, tin) PASS_REGS); if (!buf) { - return false; + pop_text_stack(i); + return -1; } - pop_text_stack(i); #if _WIN32 - st->file = _popen(buf, io_mode); + st->file = _popen(buf, io_mode); #else st->file = popen(buf, io_mode); #endif - } else { - st->file = fopen(fname, io_mode); + fname = "popen"; + user_name = tin; + flags |= Popen_Stream_f; + pop_text_stack(i); } - if (st->file == NULL) { - if (!strchr(io_mode, 'b') && binary_file(fname)) { - UNLOCK(st->streamlock); - if (errno == ENOENT && !strchr(io_mode, 'r')) { - PlIOError(EXISTENCE_ERROR_SOURCE_SINK, - MkAtomTerm(Yap_LookupAtom(fname)), "%s: %s", fname, - strerror(errno)); - } else { - PlIOError(PERMISSION_ERROR_OPEN_SOURCE_SINK, - MkAtomTerm(Yap_LookupAtom(fname)), "%s: %s", fname, - strerror(errno)); - } - return -1; + } + if (st->file == NULL) { + if (!strchr(io_mode, 'b') && binary_file(fname)) { + UNLOCK(st->streamlock); + if (errno == ENOENT && !strchr(io_mode, 'r')) { + PlIOError(EXISTENCE_ERROR_SOURCE_SINK, + tin, "%s: %s", fname, + strerror(errno)); + } else { + PlIOError(PERMISSION_ERROR_OPEN_SOURCE_SINK, + tin, "%s: %s", fname, + strerror(errno)); } - }} - Yap_initStream(sno, st->file, fname, io_mode, user_name, LOCAL_encoding, flags, vfsp); - __android_log_print(ANDROID_LOG_INFO, "YAPDroid", "exists %s <%d>", fname, - sno); - return sno; - } - - int Yap_FileStream(FILE *fd, char *name, Term file_name, int flags, - VFS_t *vfsp) { - CACHE_REGS - int sno; - const char *mode; - - sno = GetFreeStreamD(); - if (sno < 0) - return (PlIOError(RESOURCE_ERROR_MAX_STREAMS, file_name, - "new stream not available for opening")); - if (flags & Output_Stream_f) { - if (flags & Append_Stream_f) - mode = "a"; - else - mode = "w"; - } else { - mode = "r"; } - Yap_initStream(sno, fd, name, mode, file_name, LOCAL_encoding, flags, vfsp); - return sno; + return -1; } + Yap_initStream(sno, st->file, fname, io_mode, user_name, LOCAL_encoding, + flags, vfsp); + __android_log_print(ANDROID_LOG_INFO, "YAPDroid", "exists %s <%d>", fname, + sno); + return sno; +} -#define CheckStream(arg, kind, msg) \ +int Yap_FileStream(FILE *fd, char *name, Term file_name, int flags, + VFS_t *vfsp) { + CACHE_REGS + int sno; + const char *mode; + + sno = GetFreeStreamD(); + if (sno < 0) + return (PlIOError(RESOURCE_ERROR_MAX_STREAMS, file_name, + "new stream not available for opening")); + if (flags & Output_Stream_f) { + if (flags & Append_Stream_f) + mode = "a"; + else + mode = "w"; + } else { + mode = "r"; + } + Yap_initStream(sno, fd, name, mode, file_name, LOCAL_encoding, flags, vfsp); + return sno; +} + +#define CheckStream(arg, kind, msg) \ CheckStream__(__FILE__, __FUNCTION__, __LINE__, arg, kind, msg) - static int CheckStream__(const char *file, const char *f, int line, Term arg, - int kind, const char *msg) { - int sno = -1; - arg = Deref(arg); - if (IsVarTerm(arg)) { - Yap_Error(INSTANTIATION_ERROR, arg, msg); - return -1; - } else if (IsAtomTerm(arg)) { - Atom sname = AtomOfTerm(arg); +static int CheckStream__(const char *file, const char *f, int line, Term arg, + int kind, const char *msg) { + int sno = -1; + arg = Deref(arg); + if (IsVarTerm(arg)) { + Yap_Error(INSTANTIATION_ERROR, arg, msg); + return -1; + } else if (IsAtomTerm(arg)) { + Atom sname = AtomOfTerm(arg); - if (sname == AtomUser) { - if (kind & Input_Stream_f) { - if (kind & (Output_Stream_f | Append_Stream_f)) { - PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_STREAM, arg, - "ambiguous use of 'user' as a stream"); - return (-1); - } - sname = AtomUserIn; - } else { - sname = AtomUserOut; - } - } - if ((sno = Yap_CheckAlias(sname)) < 0) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - PlIOError__(file, f, line, EXISTENCE_ERROR_STREAM, arg, msg); - return -1; + if (sname == AtomUser) { + if (kind & Input_Stream_f) { + if (kind & (Output_Stream_f | Append_Stream_f)) { + PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_STREAM, arg, + "ambiguous use of 'user' as a stream"); + return (-1); + } + sname = AtomUserIn; } else { - LOCK(GLOBAL_Stream[sno].streamlock); - } - } else if (IsApplTerm(arg) && FunctorOfTerm(arg) == FunctorStream) { - arg = ArgOfTerm(1, arg); - if (!IsVarTerm(arg) && IsIntegerTerm(arg)) { - sno = IntegerOfTerm(arg); + sname = AtomUserOut; } } - if (sno < 0) { - Yap_Error(DOMAIN_ERROR_STREAM_OR_ALIAS, arg, msg); - return -1; - } - if (GLOBAL_Stream[sno].status & Free_Stream_f) { + if ((sno = Yap_CheckAlias(sname)) < 0) { + UNLOCK(GLOBAL_Stream[sno].streamlock); PlIOError__(file, f, line, EXISTENCE_ERROR_STREAM, arg, msg); return -1; + } else { + LOCK(GLOBAL_Stream[sno].streamlock); } - LOCK(GLOBAL_Stream[sno].streamlock); - if ((GLOBAL_Stream[sno].status & Input_Stream_f) && - !(kind & Input_Stream_f)) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_STREAM, arg, msg); - return -1; - } - if ((GLOBAL_Stream[sno].status & (Append_Stream_f | Output_Stream_f)) && - !(kind & Output_Stream_f)) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_STREAM, arg, msg); - return -1; + } else if (IsApplTerm(arg) && FunctorOfTerm(arg) == FunctorStream) { + arg = ArgOfTerm(1, arg); + if (!IsVarTerm(arg) && IsIntegerTerm(arg)) { + sno = IntegerOfTerm(arg); } + } + if (sno < 0) { + Yap_Error(DOMAIN_ERROR_STREAM_OR_ALIAS, arg, msg); + return -1; + } + if (GLOBAL_Stream[sno].status & Free_Stream_f) { + PlIOError__(file, f, line, EXISTENCE_ERROR_STREAM, arg, msg); + return -1; + } + LOCK(GLOBAL_Stream[sno].streamlock); + if ((GLOBAL_Stream[sno].status & Input_Stream_f) && + !(kind & Input_Stream_f)) { + UNLOCK(GLOBAL_Stream[sno].streamlock); + PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_STREAM, arg, msg); + return -1; + } + if ((GLOBAL_Stream[sno].status & (Append_Stream_f | Output_Stream_f)) && + !(kind & Output_Stream_f)) { + UNLOCK(GLOBAL_Stream[sno].streamlock); + PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_STREAM, arg, msg); + return -1; + } + return sno; +} + +int Yap_CheckStream__(const char *file, const char *f, int line, Term arg, + int kind, const char *msg) { + return CheckStream__(file, f, line, arg, kind, msg); +} + +int Yap_CheckTextStream__(const char *file, const char *f, int line, Term arg, + int kind, const char *msg) { + int sno; + if ((sno = CheckStream__(file, f, line, arg, kind, msg)) < 0) + return -1; + if ((GLOBAL_Stream[sno].status & Binary_Stream_f)) { + UNLOCK(GLOBAL_Stream[sno].streamlock); + if (kind == Input_Stream_f) + PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_BINARY_STREAM, arg, + msg); + else + PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_BINARY_STREAM, arg, + msg); + return -1; + } + return sno; +} + +int Yap_CheckBinaryStream__(const char *file, const char *f, int line, Term arg, + int kind, const char *msg) { + int sno; + if ((sno = CheckStream__(file, f, line, arg, kind, msg)) < 0) + return -1; + if (!(GLOBAL_Stream[sno].status & Binary_Stream_f)) { + UNLOCK(GLOBAL_Stream[sno].streamlock); + if (kind == Input_Stream_f) + PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_TEXT_STREAM, arg, msg); + else + PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_TEXT_STREAM, arg, msg); + return -1; + } + return sno; +} + +/* used from C-interface */ +int Yap_GetFreeStreamDForReading(void) { + int sno = GetFreeStreamD(); + StreamDesc *s; + + if (sno < 0) return sno; - } + s = GLOBAL_Stream + sno; + s->status |= User_Stream_f | Input_Stream_f; + s->charcount = 0; + s->linecount = 1; + s->linepos = 0; + Yap_DefaultStreamOps(s); + UNLOCK(s->streamlock); + return sno; +} - int Yap_CheckStream__(const char *file, const char *f, int line, Term arg, - int kind, const char *msg) { - return CheckStream__(file, f, line, arg, kind, msg); - } +/** + * @pred always_prompt_user + * + * Ensure that the stream always prompts before asking the standard input + stream for data. - int Yap_CheckTextStream__(const char *file, const char *f, int line, Term arg, - int kind, const char *msg) { - int sno; - if ((sno = CheckStream__(file, f, line, arg, kind, msg)) < 0) - return -1; - if ((GLOBAL_Stream[sno].status & Binary_Stream_f)) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - if (kind == Input_Stream_f) - PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_BINARY_STREAM, arg, - msg); - else - PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_BINARY_STREAM, arg, - msg); - return -1; - } - return sno; - } +*/ +static Int always_prompt_user(USES_REGS1) { + StreamDesc *s = GLOBAL_Stream + StdInStream; - int Yap_CheckBinaryStream__(const char *file, const char *f, int line, Term arg, - int kind, const char *msg) { - int sno; - if ((sno = CheckStream__(file, f, line, arg, kind, msg)) < 0) - return -1; - if (!(GLOBAL_Stream[sno].status & Binary_Stream_f)) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - if (kind == Input_Stream_f) - PlIOError__(file, f, line, PERMISSION_ERROR_INPUT_TEXT_STREAM, arg, msg); - else - PlIOError__(file, f, line, PERMISSION_ERROR_OUTPUT_TEXT_STREAM, arg, msg); - return -1; - } - return sno; - } + s->status |= Promptable_Stream_f; + Yap_DefaultStreamOps(s); + return (TRUE); +} - /* used from C-interface */ - int Yap_GetFreeStreamDForReading(void) { - int sno = GetFreeStreamD(); - StreamDesc *s; - - if (sno < 0) - return sno; - s = GLOBAL_Stream + sno; - s->status |= User_Stream_f | Input_Stream_f; - s->charcount = 0; - s->linecount = 1; - s->linepos = 0; - Yap_DefaultStreamOps(s); - UNLOCK(s->streamlock); - return sno; - } - - /** - * @pred always_prompt_user - * - * Ensure that the stream always prompts before asking the standard input - stream for data. - - */ - static Int always_prompt_user(USES_REGS1) { - StreamDesc *s = GLOBAL_Stream + StdInStream; - - s->status |= Promptable_Stream_f; - Yap_DefaultStreamOps(s); - return (TRUE); - } - - static Int close1 /** @pred close(+ _S_) is iso +static Int close1 /** @pred close(+ _S_) is iso Closes the stream _S_. If _S_ does not stand for a stream @@ -1820,252 +1813,252 @@ currently opened an error is reported. The streams user_input, user_output, and user_error can never be closed. - */ + */ (USES_REGS1) { /* '$close'(+GLOBAL_Stream) */ - int sno = CheckStream( - ARG1, (Input_Stream_f | Output_Stream_f | Socket_Stream_f), "close/2"); - if (sno < 0) - return false; - if (sno <= StdErrStream) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - return true; - } - Yap_CloseStream(sno); + int sno = CheckStream( + ARG1, (Input_Stream_f | Output_Stream_f | Socket_Stream_f), "close/2"); + if (sno < 0) + return false; + if (sno <= StdErrStream) { UNLOCK(GLOBAL_Stream[sno].streamlock); - return (TRUE); + return true; } + Yap_CloseStream(sno); + UNLOCK(GLOBAL_Stream[sno].streamlock); + return (TRUE); +} -#define CLOSE_DEFS() \ +#define CLOSE_DEFS() \ PAR("force", booleanFlag, CLOSE_FORCE), PAR(NULL, ok, CLOSE_END) #define PAR(x, y, z) z - typedef enum close_enum_choices { CLOSE_DEFS() } close_choices_t; +typedef enum close_enum_choices { CLOSE_DEFS() } close_choices_t; #undef PAR -#define PAR(x, y, z) \ +#define PAR(x, y, z) \ { x, y, z } - static const param_t close_defs[] = {CLOSE_DEFS()}; +static const param_t close_defs[] = {CLOSE_DEFS()}; #undef PAR - /** @pred close(+ _S_,+ _O_) is iso +/** @pred close(+ _S_,+ _O_) is iso - Closes the stream _S_, following options _O_. + Closes the stream _S_, following options _O_. - The only valid options are `force(true)` and `force(false)`. - YAP currently ignores these options. + The only valid options are `force(true)` and `force(false)`. + YAP currently ignores these options. - */ - static Int close2(USES_REGS1) { /* '$close'(+GLOBAL_Stream) */ - Int sno = CheckStream( - ARG1, (Input_Stream_f | Output_Stream_f | Socket_Stream_f), "close/2"); - Term tlist; - if (sno < 0) - return (FALSE); - if (sno <= StdErrStream) { - UNLOCK(GLOBAL_Stream[sno].streamlock); - return TRUE; - } - xarg *args = - Yap_ArgListToVector((tlist = Deref(ARG2)), close_defs, CLOSE_END); - if (args == NULL) { - if (LOCAL_Error_TYPE != YAP_NO_ERROR) { - if (LOCAL_Error_TYPE == DOMAIN_ERROR_PROLOG_FLAG) - LOCAL_Error_TYPE = DOMAIN_ERROR_CLOSE_OPTION; - Yap_Error(LOCAL_Error_TYPE, tlist, NULL); - } - return false; - } - // if (args[CLOSE_FORCE].used) { - // } - Yap_CloseStream(sno); +*/ +static Int close2(USES_REGS1) { /* '$close'(+GLOBAL_Stream) */ + Int sno = CheckStream( + ARG1, (Input_Stream_f | Output_Stream_f | Socket_Stream_f), "close/2"); + Term tlist; + if (sno < 0) + return (FALSE); + if (sno <= StdErrStream) { UNLOCK(GLOBAL_Stream[sno].streamlock); - return (TRUE); + return TRUE; } - - Term read_line(int sno) { - CACHE_REGS - Term tail; - Int ch; - - if ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) == 10) { - return (TermNil); + xarg *args = + Yap_ArgListToVector((tlist = Deref(ARG2)), close_defs, CLOSE_END); + if (args == NULL) { + if (LOCAL_Error_TYPE != YAP_NO_ERROR) { + if (LOCAL_Error_TYPE == DOMAIN_ERROR_PROLOG_FLAG) + LOCAL_Error_TYPE = DOMAIN_ERROR_CLOSE_OPTION; + Yap_Error(LOCAL_Error_TYPE, tlist, NULL); } - tail = read_line(sno); - return (MkPairTerm(MkIntTerm(ch), tail)); + return false; } + // if (args[CLOSE_FORCE].used) { + // } + Yap_CloseStream(sno); + UNLOCK(GLOBAL_Stream[sno].streamlock); + return (TRUE); +} -#define ABSOLUTE_FILE_NAME_DEFS() \ - PAR("access", isatom, ABSOLUTE_FILE_NAME_ACCESS) \ - , PAR("expand", booleanFlag, ABSOLUTE_FILE_NAME_EXPAND), \ - PAR("extensions", ok, ABSOLUTE_FILE_NAME_EXTENSIONS), \ - PAR("file_errors", is_file_errors, ABSOLUTE_FILE_NAME_FILE_ERRORS), \ - PAR("file_type", is_file_type, ABSOLUTE_FILE_NAME_FILE_TYPE), \ - PAR("glob", ok, ABSOLUTE_FILE_NAME_GLOB), \ - PAR("relative_to", isatom, ABSOLUTE_FILE_NAME_RELATIVE_TO), \ - PAR("solutions", issolutions, ABSOLUTE_FILE_NAME_SOLUTIONS), \ - PAR("verbose_file_search", booleanFlag, \ - ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH), \ - PAR(NULL, ok, ABSOLUTE_FILE_NAME_END) +Term read_line(int sno) { + CACHE_REGS + Term tail; + Int ch; + + if ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) == 10) { + return (TermNil); + } + tail = read_line(sno); + return (MkPairTerm(MkIntTerm(ch), tail)); +} + +#define ABSOLUTE_FILE_NAME_DEFS() \ + PAR("access", isatom, ABSOLUTE_FILE_NAME_ACCESS) \ + , PAR("expand", booleanFlag, ABSOLUTE_FILE_NAME_EXPAND), \ + PAR("extensions", ok, ABSOLUTE_FILE_NAME_EXTENSIONS), \ + PAR("file_errors", is_file_errors, ABSOLUTE_FILE_NAME_FILE_ERRORS), \ + PAR("file_type", is_file_type, ABSOLUTE_FILE_NAME_FILE_TYPE), \ + PAR("glob", ok, ABSOLUTE_FILE_NAME_GLOB), \ + PAR("relative_to", isatom, ABSOLUTE_FILE_NAME_RELATIVE_TO), \ + PAR("solutions", issolutions, ABSOLUTE_FILE_NAME_SOLUTIONS), \ + PAR("verbose_file_search", booleanFlag, \ + ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH), \ + PAR(NULL, ok, ABSOLUTE_FILE_NAME_END) #define PAR(x, y, z) z - typedef enum ABSOLUTE_FILE_NAME_enum_ { - ABSOLUTE_FILE_NAME_DEFS() - } absolute_file_name_choices_t; +typedef enum ABSOLUTE_FILE_NAME_enum_ { + ABSOLUTE_FILE_NAME_DEFS() +} absolute_file_name_choices_t; #undef PAR -#define PAR(x, y, z) \ +#define PAR(x, y, z) \ { x, y, z } - static const param_t absolute_file_name_search_defs[] = { +static const param_t absolute_file_name_search_defs[] = { ABSOLUTE_FILE_NAME_DEFS()}; #undef PAR - static Int abs_file_parameters(USES_REGS1) { - Term t[ABSOLUTE_FILE_NAME_END]; - Term tlist = Deref(ARG1), tf; - /* get options */ - xarg *args = Yap_ArgListToVector(tlist, absolute_file_name_search_defs, - ABSOLUTE_FILE_NAME_END); - if (args == NULL) { - if (LOCAL_Error_TYPE != YAP_NO_ERROR) { - if (LOCAL_Error_TYPE == DOMAIN_ERROR_PROLOG_FLAG) - LOCAL_Error_TYPE = DOMAIN_ERROR_ABSOLUTE_FILE_NAME_OPTION; - Yap_Error(LOCAL_Error_TYPE, tlist, NULL); - } - return false; +static Int abs_file_parameters(USES_REGS1) { + Term t[ABSOLUTE_FILE_NAME_END]; + Term tlist = Deref(ARG1), tf; + /* get options */ + xarg *args = Yap_ArgListToVector(tlist, absolute_file_name_search_defs, + ABSOLUTE_FILE_NAME_END); + if (args == NULL) { + if (LOCAL_Error_TYPE != YAP_NO_ERROR) { + if (LOCAL_Error_TYPE == DOMAIN_ERROR_PROLOG_FLAG) + LOCAL_Error_TYPE = DOMAIN_ERROR_ABSOLUTE_FILE_NAME_OPTION; + Yap_Error(LOCAL_Error_TYPE, tlist, NULL); } - /* done */ - if (args[ABSOLUTE_FILE_NAME_EXTENSIONS].used) { - t[ABSOLUTE_FILE_NAME_EXTENSIONS] = - args[ABSOLUTE_FILE_NAME_EXTENSIONS].tvalue; - } else { - t[ABSOLUTE_FILE_NAME_EXTENSIONS] = TermNil; - } - if (args[ABSOLUTE_FILE_NAME_RELATIVE_TO].used) { - t[ABSOLUTE_FILE_NAME_RELATIVE_TO] = - gethdir(args[ABSOLUTE_FILE_NAME_RELATIVE_TO].tvalue); - } else { - t[ABSOLUTE_FILE_NAME_RELATIVE_TO] = gethdir(TermDot); - } - if (args[ABSOLUTE_FILE_NAME_FILE_TYPE].used) - t[ABSOLUTE_FILE_NAME_FILE_TYPE] = args[ABSOLUTE_FILE_NAME_FILE_TYPE].tvalue; - else - t[ABSOLUTE_FILE_NAME_FILE_TYPE] = TermTxt; - if (args[ABSOLUTE_FILE_NAME_ACCESS].used) - t[ABSOLUTE_FILE_NAME_ACCESS] = args[ABSOLUTE_FILE_NAME_ACCESS].tvalue; - else - t[ABSOLUTE_FILE_NAME_ACCESS] = TermNone; - if (args[ABSOLUTE_FILE_NAME_FILE_ERRORS].used) - t[ABSOLUTE_FILE_NAME_FILE_ERRORS] = - args[ABSOLUTE_FILE_NAME_FILE_ERRORS].tvalue; - else - t[ABSOLUTE_FILE_NAME_FILE_ERRORS] = TermError; - if (args[ABSOLUTE_FILE_NAME_SOLUTIONS].used) - t[ABSOLUTE_FILE_NAME_SOLUTIONS] = args[ABSOLUTE_FILE_NAME_SOLUTIONS].tvalue; - else - t[ABSOLUTE_FILE_NAME_SOLUTIONS] = TermFirst; - if (args[ABSOLUTE_FILE_NAME_EXPAND].used) - t[ABSOLUTE_FILE_NAME_EXPAND] = args[ABSOLUTE_FILE_NAME_EXPAND].tvalue; - else - t[ABSOLUTE_FILE_NAME_EXPAND] = TermFalse; - if (args[ABSOLUTE_FILE_NAME_GLOB].used) { - t[ABSOLUTE_FILE_NAME_GLOB] = args[ABSOLUTE_FILE_NAME_GLOB].tvalue; - t[ABSOLUTE_FILE_NAME_EXPAND] = TermTrue; - } else - t[ABSOLUTE_FILE_NAME_GLOB] = TermEmptyAtom; - if (args[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH].used) - t[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH] = - args[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH].tvalue; - else - t[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH] = - (trueGlobalPrologFlag(VERBOSE_FILE_SEARCH_FLAG) ? TermTrue : TermFalse); - tf = Yap_MkApplTerm(Yap_MkFunctor(AtomOpt, ABSOLUTE_FILE_NAME_END), - ABSOLUTE_FILE_NAME_END, t); - return (Yap_unify(ARG2, tf)); - } - - static Int get_abs_file_parameter(USES_REGS1) { - Term t = Deref(ARG1), topts = Deref(ARG2); - /* get options */ - /* done */ - int i = Yap_ArgKey(AtomOfTerm(t), absolute_file_name_search_defs, - ABSOLUTE_FILE_NAME_END); - if (i >= 0) - return Yap_unify(ARG3, ArgOfTerm(i + 1, topts)); - Yap_Error(DOMAIN_ERROR_ABSOLUTE_FILE_NAME_OPTION, ARG1, NULL); return false; } + /* done */ + if (args[ABSOLUTE_FILE_NAME_EXTENSIONS].used) { + t[ABSOLUTE_FILE_NAME_EXTENSIONS] = + args[ABSOLUTE_FILE_NAME_EXTENSIONS].tvalue; + } else { + t[ABSOLUTE_FILE_NAME_EXTENSIONS] = TermNil; + } + if (args[ABSOLUTE_FILE_NAME_RELATIVE_TO].used) { + t[ABSOLUTE_FILE_NAME_RELATIVE_TO] = + gethdir(args[ABSOLUTE_FILE_NAME_RELATIVE_TO].tvalue); + } else { + t[ABSOLUTE_FILE_NAME_RELATIVE_TO] = gethdir(TermDot); + } + if (args[ABSOLUTE_FILE_NAME_FILE_TYPE].used) + t[ABSOLUTE_FILE_NAME_FILE_TYPE] = args[ABSOLUTE_FILE_NAME_FILE_TYPE].tvalue; + else + t[ABSOLUTE_FILE_NAME_FILE_TYPE] = TermTxt; + if (args[ABSOLUTE_FILE_NAME_ACCESS].used) + t[ABSOLUTE_FILE_NAME_ACCESS] = args[ABSOLUTE_FILE_NAME_ACCESS].tvalue; + else + t[ABSOLUTE_FILE_NAME_ACCESS] = TermNone; + if (args[ABSOLUTE_FILE_NAME_FILE_ERRORS].used) + t[ABSOLUTE_FILE_NAME_FILE_ERRORS] = + args[ABSOLUTE_FILE_NAME_FILE_ERRORS].tvalue; + else + t[ABSOLUTE_FILE_NAME_FILE_ERRORS] = TermError; + if (args[ABSOLUTE_FILE_NAME_SOLUTIONS].used) + t[ABSOLUTE_FILE_NAME_SOLUTIONS] = args[ABSOLUTE_FILE_NAME_SOLUTIONS].tvalue; + else + t[ABSOLUTE_FILE_NAME_SOLUTIONS] = TermFirst; + if (args[ABSOLUTE_FILE_NAME_EXPAND].used) + t[ABSOLUTE_FILE_NAME_EXPAND] = args[ABSOLUTE_FILE_NAME_EXPAND].tvalue; + else + t[ABSOLUTE_FILE_NAME_EXPAND] = TermFalse; + if (args[ABSOLUTE_FILE_NAME_GLOB].used) { + t[ABSOLUTE_FILE_NAME_GLOB] = args[ABSOLUTE_FILE_NAME_GLOB].tvalue; + t[ABSOLUTE_FILE_NAME_EXPAND] = TermTrue; + } else + t[ABSOLUTE_FILE_NAME_GLOB] = TermEmptyAtom; + if (args[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH].used) + t[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH] = + args[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH].tvalue; + else + t[ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH] = + (trueGlobalPrologFlag(VERBOSE_FILE_SEARCH_FLAG) ? TermTrue : TermFalse); + tf = Yap_MkApplTerm(Yap_MkFunctor(AtomOpt, ABSOLUTE_FILE_NAME_END), + ABSOLUTE_FILE_NAME_END, t); + return (Yap_unify(ARG2, tf)); +} - void Yap_InitPlIO(struct yap_boot_params *argi) { - Int i; - if (argi->inp > 0) - Yap_stdin = fdopen(argi->inp - 1, "r"); - else if (argi->inp) - Yap_stdin = NULL; - else - Yap_stdin = stdin; - if (argi->out > 0) - Yap_stdout = fdopen(argi->out - 1, "a"); - else if (argi->out) - Yap_stdout = NULL; - else - Yap_stdout = stdout; - if (argi->err > 0) - Yap_stderr = fdopen(argi->err - 1, "a"); - else if (argi->out) - Yap_stdout = NULL; - else - Yap_stderr = stderr; - GLOBAL_Stream = +static Int get_abs_file_parameter(USES_REGS1) { + Term t = Deref(ARG1), topts = Deref(ARG2); + /* get options */ + /* done */ + int i = Yap_ArgKey(AtomOfTerm(t), absolute_file_name_search_defs, + ABSOLUTE_FILE_NAME_END); + if (i >= 0) + return Yap_unify(ARG3, ArgOfTerm(i + 1, topts)); + Yap_Error(DOMAIN_ERROR_ABSOLUTE_FILE_NAME_OPTION, ARG1, NULL); + return false; +} + +void Yap_InitPlIO(struct yap_boot_params *argi) { + Int i; + if (argi->inp > 0) + Yap_stdin = fdopen(argi->inp - 1, "r"); + else if (argi->inp) + Yap_stdin = NULL; + else + Yap_stdin = stdin; + if (argi->out > 0) + Yap_stdout = fdopen(argi->out - 1, "a"); + else if (argi->out) + Yap_stdout = NULL; + else + Yap_stdout = stdout; + if (argi->err > 0) + Yap_stderr = fdopen(argi->err - 1, "a"); + else if (argi->out) + Yap_stdout = NULL; + else + Yap_stderr = stderr; + GLOBAL_Stream = (StreamDesc *)Yap_AllocCodeSpace(sizeof(StreamDesc) * MaxStreams); - for (i = 0; i < MaxStreams; ++i) { - INIT_LOCK(GLOBAL_Stream[i].streamlock); - GLOBAL_Stream[i].status = Free_Stream_f; - } - InitStdStreams(); + for (i = 0; i < MaxStreams; ++i) { + INIT_LOCK(GLOBAL_Stream[i].streamlock); + GLOBAL_Stream[i].status = Free_Stream_f; } + InitStdStreams(); +} - void Yap_InitIOPreds(void) { - /* here the Input/Output predicates */ - Yap_InitCPred("always_prompt_user", 0, always_prompt_user, - SafePredFlag | SyncPredFlag); - Yap_InitCPred("close", 1, close1, SafePredFlag | SyncPredFlag); - Yap_InitCPred("close", 2, close2, SafePredFlag | SyncPredFlag); - Yap_InitCPred("open", 4, open4, SyncPredFlag); - Yap_InitCPred("open", 3, open3, SyncPredFlag); - Yap_InitCPred("abs_file_parameters", 2, abs_file_parameters, - SyncPredFlag | HiddenPredFlag); - Yap_InitCPred("get_abs_file_parameter", 3, get_abs_file_parameter, - SafePredFlag | SyncPredFlag | HiddenPredFlag); - Yap_InitCPred("$file_expansion", 2, p_file_expansion, - SafePredFlag | SyncPredFlag | HiddenPredFlag); - Yap_InitCPred("$open_null_stream", 1, p_open_null_stream, - SafePredFlag | SyncPredFlag | HiddenPredFlag); - Yap_InitIOStreams(); - Yap_InitAliases(); - Yap_InitCharsio(); - Yap_InitChtypes(); - Yap_InitConsole(); - Yap_InitReadUtil(); - Yap_InitMems(); - Yap_InitPipes(); - Yap_InitFiles(); - Yap_InitWriteTPreds(); - Yap_InitReadTPreds(); - Yap_InitFormat(); - Yap_InitRandomPreds(); +void Yap_InitIOPreds(void) { + /* here the Input/Output predicates */ + Yap_InitCPred("always_prompt_user", 0, always_prompt_user, + SafePredFlag | SyncPredFlag); + Yap_InitCPred("close", 1, close1, SafePredFlag | SyncPredFlag); + Yap_InitCPred("close", 2, close2, SafePredFlag | SyncPredFlag); + Yap_InitCPred("open", 4, open4, SyncPredFlag); + Yap_InitCPred("open", 3, open3, SyncPredFlag); + Yap_InitCPred("abs_file_parameters", 2, abs_file_parameters, + SyncPredFlag | HiddenPredFlag); + Yap_InitCPred("get_abs_file_parameter", 3, get_abs_file_parameter, + SafePredFlag | SyncPredFlag | HiddenPredFlag); + Yap_InitCPred("$file_expansion", 2, p_file_expansion, + SafePredFlag | SyncPredFlag | HiddenPredFlag); + Yap_InitCPred("$open_null_stream", 1, p_open_null_stream, + SafePredFlag | SyncPredFlag | HiddenPredFlag); + Yap_InitIOStreams(); + Yap_InitAliases(); + Yap_InitCharsio(); + Yap_InitChtypes(); + Yap_InitConsole(); + Yap_InitReadUtil(); + Yap_InitMems(); + Yap_InitPipes(); + Yap_InitFiles(); + Yap_InitWriteTPreds(); + Yap_InitReadTPreds(); + Yap_InitFormat(); + Yap_InitRandomPreds(); #if USE_READLINE - Yap_InitReadlinePreds(); + Yap_InitReadlinePreds(); #endif - Yap_InitSockets(); - Yap_InitSignalPreds(); - Yap_InitSysPreds(); - Yap_InitTimePreds(); - } + Yap_InitSockets(); + Yap_InitSignalPreds(); + Yap_InitSysPreds(); + Yap_InitTimePreds(); +} diff --git a/os/pipes.c b/os/pipes.c index db3d325f7..5b4fedb4f 100644 --- a/os/pipes.c +++ b/os/pipes.c @@ -18,7 +18,10 @@ static char SccsId[] = "%W% %G%"; #endif -/* +/** + * + * @file pipes.c + * * This file includes the definition of a pipe related IO. * */ diff --git a/os/streams.c b/os/streams.c index f5b62dd6b..06b0190f1 100644 --- a/os/streams.c +++ b/os/streams.c @@ -990,9 +990,12 @@ static void CloseStream(int sno) { } GLOBAL_Stream[sno].vfs = NULL; } else if (GLOBAL_Stream[sno].file && - !(GLOBAL_Stream[sno].status & - (Null_Stream_f | Socket_Stream_f | InMemory_Stream_f | Pipe_Stream_f))) - fclose(GLOBAL_Stream[sno].file); + (GLOBAL_Stream[sno].status &Popen_Stream_f)) { + pclose(GLOBAL_Stream[sno].file); + } else if (GLOBAL_Stream[sno].file && + !(GLOBAL_Stream[sno].status & + (Null_Stream_f | Socket_Stream_f | InMemory_Stream_f | Pipe_Stream_f))) + fclose(GLOBAL_Stream[sno].file); #if HAVE_SOCKET else if (GLOBAL_Stream[sno].status & (Socket_Stream_f)) { Yap_CloseSocket(GLOBAL_Stream[sno].u.socket.fd, diff --git a/packages/gecode/clpfd.yap b/packages/gecode/clpfd.yap index 1d14385c7..a5a683113 100644 --- a/packages/gecode/clpfd.yap +++ b/packages/gecode/clpfd.yap @@ -1,6 +1,6 @@ /** -@defgroup Gecode_and_ClPbBFDbC Programming Finite Domain Constraints in YAP/Gecode -@ingroup Gecode +@defgroup Gecode5and+ClPbBFDbC Programming Finite Domain Constraints in YAP/Gecode +@ingroup Gecode5 @{ The gecode/clp(fd) interface is designed to use the GECODE functionality diff --git a/packages/gecode/gecode4.yap b/packages/gecode/gecode4.yap index 575bf79f0..6d6b5c90f 100644 --- a/packages/gecode/gecode4.yap +++ b/packages/gecode/gecode4.yap @@ -16,7 +16,7 @@ %% along with this program. If not, see . %%============================================================================= -/** @defgroup Gecode Gecode Interface +/** @addtogroup Gecode4 Gecode Interface @ingroup packages @{ @@ -27,8 +27,8 @@ Duchier, with recent work by Vítor Santos Costa to port it to version 4 of gecode and to have an higher level interface, - @defgroup The_Gecode_Interface The Gecode Interface -@ingroup Gecode + @addtogroup TheGecode4Interface The Gecode Interface +@ingroup Gecode4 @{ This text is due to Denys Duchier. The gecode interface requires diff --git a/packages/gecode/gecode4_yap_hand_written.yap b/packages/gecode/gecode4_yap_hand_written.yap index a9e2d284c..03f1e5b81 100644 --- a/packages/gecode/gecode4_yap_hand_written.yap +++ b/packages/gecode/gecode4_yap_hand_written.yap @@ -16,7 +16,7 @@ %% along with this program. If not, see . %%============================================================================= -/** @defgroup Gecode Gecode Interface +/** @addtogroup Gecode4 Gecode 4 Interface @ingroup packages @{ diff --git a/packages/gecode/gecode5_yap_hand_written.yap b/packages/gecode/gecode5_yap_hand_written.yap index e3e32b8ad..1ad38b8a5 100644 --- a/packages/gecode/gecode5_yap_hand_written.yap +++ b/packages/gecode/gecode5_yap_hand_written.yap @@ -20,7 +20,7 @@ (+=)/2, op(500, xfx, '+=')]). -/** @defgroup Gecode Gecode Interface +/** @addtogroup Gecode5 Gecode 5 Interface @ingroup packages @{ diff --git a/pl/arith.yap b/pl/arith.yap index a3244b3cf..ac5413373 100644 --- a/pl/arith.yap +++ b/pl/arith.yap @@ -129,15 +129,7 @@ do_c_built_in(Mod:G, _, H, OUT) :- var(G1), !, do_c_built_metacall(G1, M1, H, OUT). do_c_built_in('$do_error'( Error, Goal), M, Head, - (strip_module(M:Goal,M1,NGoal), - throw(error(Error, - print_message( - ['while executing goal ~w' -M1:NGoal,nl, - 'in clause matching ~w'-Head,nl] - ) - ) - ) - ) + throw(error(Error,M:Goal)) ) :- !. do_c_built_in(system_error( Error, Goal), M, Head, ErrorG) :- do_c_built_in('$do_error'( Error, Goal), M, Head, ErrorG). diff --git a/pl/arrays.yap b/pl/arrays.yap index d14d6ed3c..6fc7eb79d 100644 --- a/pl/arrays.yap +++ b/pl/arrays.yap @@ -19,8 +19,10 @@ @file arrays.yap -@addtogroup YAPArrays +@addtogroup YAPArraysPl Prolog Support for seeing terms as arrays and for data-base arrays of objects + @ingroupp YAPArrays + @{ */ % diff --git a/pl/atoms.yap b/pl/atoms.yap index 3f74f89aa..78ad66de0 100644 --- a/pl/atoms.yap +++ b/pl/atoms.yap @@ -9,7 +9,8 @@ *************************************************************************/ /** - * @file atoms.yap + * @file pl/atoms.yap + * * */ diff --git a/pl/boot.yap b/pl/boot.yap index 7b49cc6db..23af39460 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -19,11 +19,11 @@ @file boot.yap @brief YAP bootstrap +@{ + @defgroup YAPControl Control Predicates @ingroup builtins -@{ - */ @@ -147,17 +147,6 @@ print_message(L,E) :- :- '$new_multifile'('$full_clause_optimisation'(_H, _M, _B0, _BF), prolog). :- '$new_multifile'('$exec_directive'(_,_,_,_,_), prolog). -/** - -@{ - @defgroup library The Prolog library - - - - @addtogroup YAPControl -@ingroup builtins - @{ -*/ :- system_module( '$_init', [!/0, ':-'/1, '?-'/1, @@ -321,8 +310,6 @@ initialize_prolog :- :- ['protect.yap']. -:- stop_low_level_trace. - version(yap,[6,3]). :- op(1150,fx,(mode)). @@ -439,7 +426,7 @@ as directives. :- dynamic system:term_expansion/2. -:- multifile swi:swi_predicate_table/4. +:- multifile system:swi_predicate_table/4. /** @pred user:message_hook(+ _Term_, + _Kind_, + _Lines_) @@ -478,3 +465,5 @@ If this hook preodicate succeeds it must instantiate the _Action_ argument to t :- ensure_loaded('../pl/pathconf.yap'). :- yap_flag(user:unknown,error). + +%% @} \ No newline at end of file diff --git a/pl/bootlists.yap b/pl/bootlists.yap index 5508b55b1..2c209af51 100644 --- a/pl/bootlists.yap +++ b/pl/bootlists.yap @@ -3,7 +3,7 @@ * @author VITOR SANTOS COSTA * @date Thu Nov 19 09:54:00 2015 * - * @addtogroup lists + * @addtogroup lists * @{ */ diff --git a/pl/bootutils.yap b/pl/bootutils.yap index 886272899..ca97c0bdf 100644 --- a/pl/bootutils.yap +++ b/pl/bootutils.yap @@ -1,5 +1,5 @@ /** - @file bootutils.c + @file bootutils.yap @short utilities @addtogroup Internal_Database diff --git a/pl/builtins.yap b/pl/builtins.yap index 39e695cfa..5723cb9c7 100644 --- a/pl/builtins.yap +++ b/pl/builtins.yap @@ -19,7 +19,7 @@ @file boot.yap @brief YAP bootstrap - @defgroup YAPControl Control Predicates + @addtogroupg YAPControl Control Predicates @ingroup builtins @{ diff --git a/pl/control.yap b/pl/control.yap index fa38c654b..f4935ddf0 100644 --- a/pl/control.yap +++ b/pl/control.yap @@ -100,23 +100,6 @@ proven. The example verifies that all arithmetic statements in the list ~~~~~ -*/ -/** @pred forall(+ _Cond_,+ _Action_) - - - - -For all alternative bindings of _Cond_ _Action_ can be proven. -The next example verifies that all arithmetic statements in the list - _L_ are correct. It does not say which is wrong if one proves wrong. - -~~~~~ -?- forall(member(Result = Formula, [2 = 1 + 1, 4 = 2 * 2]), - Result =:= Formula). -~~~~~ - - - */ forall(Cond, Action) :- \+((Cond, \+(Action))). @@ -136,19 +119,6 @@ ignore(_). */ ignore(Goal) :- (Goal->true;true). -notrace(G) :- - strip_module(G, M, G1), - ( '$$save_by'(CP), - '$debug_stop'( State ), - '$call'(G1, CP, G, M), - '$$save_by'(CP2), - (CP == CP2 -> ! ; '$debug_state'( NState ), ( true ; '$debug_restart'(NState), fail ) ), - '$debug_restart'( State ) - ; - '$debug_restart'( State ), - fail - ). - /** @pred if(? _G_,? _H_,? _I_) Call goal _H_ once per each solution of goal _H_. If goal @@ -204,19 +174,79 @@ if(X,Y,Z) :- '$call'(Z,CP,if(X,Y,Z),M) ). +/** @pred call( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Closure,...,? Ai,...) is iso + + +Meta-call with extractpattern arguments, where _Closure_ is a closure +that is converted into a goal by appending the _Ai_ additional +arguments. YAP supports up to 10 extra arguments. + +*/ call(X,A) :- '$execute'(X,A). call(X,A1,A2) :- '$execute'(X,A1,A2). -/** @pred call(+ _Closure_,...,? _Ai_,...) is iso - - -Meta-call where _Closure_ is a closure that is converted into a goal by -appending the _Ai_ additional arguments. The number of arguments varies -between 0 and 10. - - -*/ call(X,A1,A2,A3) :- '$execute'(X,A1,A2,A3). call(X,A1,A2,A3,A4) :- '$execute'(X,A1,A2,A3,A4). @@ -270,7 +300,7 @@ setup_call_catcher_cleanup(Setup, Goal, Catcher, Cleanup) :- call_cleanup(Goal, Catcher, Cleanup). -/** @pred call_with_args(+ _Name_,...,? _Ai_,...) +/** @pred call_with_args(+ Name,...,? Ai,...) Meta-call where _Name_ is the name of the procedure to be called and @@ -588,7 +618,15 @@ break :- '$break'( false ). -at_halt(G) :- +/** + * @pred at_halt( G ) + * + * Hook predicate: _G_ must be called on exit. + * + * @param _G_: the hook + * + * @return succeeds with side-effect. +*/at_halt(G) :- recorda('$halt', G, _), fail. at_halt(_). @@ -619,7 +657,17 @@ halt(X) :- set_value('$live','$false'), '$halt'(X). -prolog_current_frame(Env) :- +/** + * @pred prolog_current_frame(-Env) + * + * reports a reference to the last execution environment _Env_. + * YAP creates an enviroment when a clause contains several sub-goals. + * Facts and simple recursion do not need an environment, + * + * @param Env + * + * @return +*/prolog_current_frame(Env) :- Env is '$env'. '$run_atom_goal'(GA) :- diff --git a/pl/debug.yap b/pl/debug.yap index 96123e1e5..c31f167b8 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -421,6 +421,7 @@ be lost. '$trace_query'(B, M, CP, S, EB). '$trace_query'((A|B), M, CP, S, (EA|EB)) :- !, '$trace_query'(A, M, CP, S, EA), + '$trace_query'(B, M, CP, S, EB). '$trace_query'((\+ A), M, CP, S, (\+ EA)) :- !, '$trace_query'(A, M, CP, S, EA). '$trace_query'(G, M, _CP, _, ( diff --git a/pl/dialect.yap b/pl/dialect.yap index 6a5837c65..bf9612b43 100644 --- a/pl/dialect.yap +++ b/pl/dialect.yap @@ -6,7 +6,7 @@ * * @brief support Prolog dialects * - * @defgroup Dialects + * @defgroup Dialects Compatibilty with other Prolog dialects * @ingroup builtins * */ diff --git a/pl/directives.yap b/pl/directives.yap index 64cd8d9e0..0694b841b 100644 --- a/pl/directives.yap +++ b/pl/directives.yap @@ -22,7 +22,7 @@ * * @brief Control File Loading % - % @defgroup Directives + % @defgroup Directives Prolog Directives @ @ingroup consult * * diff --git a/pl/error.yap b/pl/error.yap index f5d2b108e..97c5c310a 100644 --- a/pl/error.yap +++ b/pl/error.yap @@ -25,7 +25,7 @@ ]), []) . /** - @defgroup error Error generating support + @defgroup SWI-error High-level error testing. @ingroup YAPError This SWI module provides predicates to simplify error generation and diff --git a/pl/eval.yap b/pl/eval.yap index 485db7d94..7123777c5 100644 --- a/pl/eval.yap +++ b/pl/eval.yap @@ -22,7 +22,7 @@ * * @brief compiling expressions * - * @defgroup CompiledExpressions + * @defgroup CompiledExpression A Compiler for Arithmetic * @ingroup drectives * * diff --git a/pl/flags.yap b/pl/flags.yap index 298666c4f..082921108 100644 --- a/pl/flags.yap +++ b/pl/flags.yap @@ -15,7 +15,7 @@ * * *************************************************************************/ /** - * @file flagd.ysp + * @file flags.yap * * @defgroup YAPFlags Yap Flags * diff --git a/pl/hacks.yap b/pl/hacks.yap index fcb762d7c..70c0400c2 100644 --- a/pl/hacks.yap +++ b/pl/hacks.yap @@ -45,7 +45,7 @@ Notice that variable names option must have been on. */ -hacks:context_variables(NamedVariables) :- +yap_hacks:context_variables(NamedVariables) :- '$context_variables'(NamedVariables). diff --git a/pl/meta.yap b/pl/meta.yap index a98792f08..4d152e7d7 100644 --- a/pl/meta.yap +++ b/pl/meta.yap @@ -2,11 +2,15 @@ @file meta.yap - @defgroup YAPMetaPredicates Using Meta-Calls with Modules - @ingroup YAPModules @{ - @pred meta_predicate(G1 , Gj , Gn) is directive + @defgroup YAPMetaPredicates Using Meta-Calls with Modules + @ingroup YAPModules + +*/ + + /** + @pred meta_predicate( Gi ) is directive Declares that this predicate manipulates references to predicates. Each _Gi_ is a mode specification. @@ -498,3 +502,5 @@ expand_goal(Input, Output) :- '$yap_strip_module'(SM:G, M, IG), '$expand_goals'(IG, _, GF0, M, SM, M, HVars-G), '$yap_strip_module'(M:GF0, MF, GF). + +%% @} \ No newline at end of file diff --git a/pl/preddyns.yap b/pl/preddyns.yap index 0bf210422..87faa88cc 100644 --- a/pl/preddyns.yap +++ b/pl/preddyns.yap @@ -4,8 +4,8 @@ /** @file preddyns.yap */ /** - * @addtogroup Database * @{ + * @addtogroup Database Next follow the main operations on dynamic predicates. @@ -347,3 +347,5 @@ dynamic_predicate(P,Sem) :- '$bad_if_is_semantics'(Sem, Goal) :- Sem \= immediate, Sem \= logical, !, '$do_error'(domain_error(semantics_indicator,Sem),Goal). + +%% @} \ No newline at end of file diff --git a/pl/protect.yap b/pl/protect.yap index 3cdea91d6..f0509c02b 100755 --- a/pl/protect.yap +++ b/pl/protect.yap @@ -18,7 +18,7 @@ :- system_module( '$_protect', [], ['$protect'/0]). /** * @file protect.yap - * @addgroup ProtectCore Freeze System Configuration + * @addtogroup ProtectCore Freeze System Configuration * @ingroup YAPControl * * This protects current code from further changes @@ -38,7 +38,7 @@ new_system_module( M ), fail. '$protect' :- - '$current_predicate'(Name,M,P,_), + '$current_predicate'(Name,M,P,_), '$is_system_module'(M), functor(P,Name,Arity), '$new_system_predicate'(Name,Arity,M), @@ -48,7 +48,7 @@ fail. '$protect' :- current_atom(Name), - sub_atom(Name,0,1,_, '$'), + sub_atom(Name,0,1,_, '$'), \+ '$visible'(Name), hide_atom(Name), fail. diff --git a/pl/spy.yap b/pl/spy.yap index 4fc61cbbb..79bcb259c 100644 --- a/pl/spy.yap +++ b/pl/spy.yap @@ -377,6 +377,20 @@ debugging :- get_value('$leash',Leash), '$show_leash'(help,Leash). +notrace(G) :- + strip_module(G, M, G1), + ( '$$save_by'(CP), + '$debug_stop'( State ), + '$call'(G1, CP, G, M), + '$$save_by'(CP2), + (CP == CP2 -> ! ; '$debug_state'( NState ), ( true ; '$debug_restart'(NState), fail ) ), + '$debug_restart'( State ) + ; + '$debug_restart'( State ), + fail + ). + + /* @} diff --git a/pl/swi.yap b/pl/swi.yap index 1f4b2ddcf..5ce54d995 100644 --- a/pl/swi.yap +++ b/pl/swi.yap @@ -1,5 +1,5 @@ /** - * @file swi.yap + * @file pl/swi.yap * @author VITOR SANTOS COSTA * @date Thu Oct 19 12:18:05 2017 * diff --git a/pl/top.yap b/pl/top.yap index 13aa0d9ba..91a3d29ed 100644 --- a/pl/top.yap +++ b/pl/top.yap @@ -5,7 +5,7 @@ * * @brief top-level implementation plus system booting.x * - * @defgroup Top-Level and Boot Predicates + * @defgroup TopLevel Top-Level and Boot Predicates * @ingroup YAPControl * */ diff --git a/pl/ypp.yap b/pl/ypp.yap index 79f6027c1..bf9cd6396 100644 --- a/pl/ypp.yap +++ b/pl/ypp.yap @@ -32,10 +32,10 @@ ). /** -* @defgroup ypp Yap PreProcessing -* @ingroup library -* -*/ + * @defgroup ypp Yap PreProcessing + * @ingroup library + * + */ %==================================================================================== % Public Predicates diff --git a/swi/library/predicate_options.pl b/swi/library/predicate_options.pl index 4c281f2ad..aa1b597e3 100644 --- a/swi/library/predicate_options.pl +++ b/swi/library/predicate_options.pl @@ -1,913 +1,3521 @@ -/* Part of SWI-Prolog - - Author: Jan Wielemaker - E-mail: J.Wielemaker@cs.vu.nl - WWW: http://www.swi-prolog.org - Copyright (C): 2011, VU University Amsterdam - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - As a special exception, if you link this library with other files, - compiled with a Free Software compiler, to produce an executable, this - library does not by itself cause the resulting executable to be covered - by the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. -*/ - -:- module(predicate_options, - [ predicate_options/3, % +PI, +Arg, +Options - assert_predicate_options/4, % +PI, +Arg, +Options, ?New - - current_option_arg/2, % ?PI, ?Arg - current_predicate_option/3, % ?PI, ?Arg, ?Option - check_predicate_option/3, % +PI, +Arg, +Option - % Create declarations - current_predicate_options/3, % ?PI, ?Arg, ?Options - retractall_predicate_options/0, - derived_predicate_options/3, % :PI, ?Arg, ?Options - derived_predicate_options/1, % +Module - % Checking - check_predicate_options/0, - derive_predicate_options/0, - check_predicate_options/1 % :PredicateIndicator - ]). -:- use_module(library(lists)). -:- use_module(library(pairs)). -:- use_module(library(error)). -:- use_module(library(lists)). -:- use_module(library(debug)). -:- use_module(library(prolog_clause)). - -:- meta_predicate - predicate_options(:, +, +), - assert_predicate_options(:, +, +, ?), - current_predicate_option(:, ?, ?), - check_predicate_option(:, ?, ?), - current_predicate_options(:, ?, ?), - current_option_arg(:, ?), - pred_option(:,-), - derived_predicate_options(:,?,?), - check_predicate_options(:). - -/** Access and analyse predicate options -@ingroup swi - -This module provides the developers interface for the directive -predicate_options/3. This directive allows us to specify that e.g., -open/4 processes options using the 4th argument and supports the option -=type= using the values =text= and =binary=. Declaring options that are -processed allows for more reliable handling of predicate options and -simplifies porting applications. This library provides the following -functionality: - - * Query supported options through current_predicate_option/3 - or current_predicate_options/3. This is intended to support - conditional compilation and an IDE. - * Derive additional declarations through dataflow analysis using - derive_predicate_options/0. - * Perform a compile-time analysis of the entire loaded program using - check_predicate_options/0. - -Below, we describe some use-cases. - - $ Quick check of a program : - This scenario is useful as an occasional check or to assess problems - with option-handling for porting an application to SWI-Prolog. It - consists of three steps: loading the program (1 and 2), deriving - option handling for application predicates (3) and running the - checker (4). - - == - 1 ?- [load]. - 2 ?- autoload. - 3 ?- derive_predicate_options. - 4 ?- check_predicate_options. - == - - $ Add declaations to your program : - Adding declarations about option processes improves the quality of - the checking. The analysis of derive_predicate_options/0 may miss - options and does not derive the types for options that are processed - in Prolog code. The process is similar to the above. In steps 4 and - further, the inferred declarations are listed, inspected and added to - the source-code of the module. - - == - 1 ?- [load]. - 2 ?- autoload. - 3 ?- derive_predicate_options. - 4 ?- derived_predicate_options(module_1). - 5 ?- derived_predicate_options(module_2). - 6 ?- ... - == - - $ Declare option processing requirements : - If an application requires that open/4 needs to support lock(write), - it may do so using the derective below. This directive raises an - exception when loaded on a Prolog implementation that does not support - this option. - - == - :- current_predicate_option(open/4, 4, lock(write)). - == - -@see library(option) for accessing options in Prolog code. -*/ - -:- multifile option_decl/3, pred_option/3. -:- dynamic dyn_option_decl/3. - -%% predicate_options(:PI, +Arg, +Options) is det. -% -% Declare that the predicate PI processes options on Arg. Options -% is a list of options processed. Each element is one of: -% -% * Option(ModeAndType) -% PI processes Option. The option-value must comply to -% ModeAndType. Mode is one of + or - and Type is a type as -% accepted by must_be/2. -% -% * pass_to(:PI,Arg) -% The option-list is passed to the indicated predicate. -% -% Below is an example that processes the option header(boolean) -% and passes all options to open/4: -% -% == -% :- predicate_options(write_xml_file/3, 3, -% [ header(boolean), -% pass_to(open/4, 4) -% ]). -% -% write_xml_file(File, XMLTerm, Options) :- -% open(File, write, Out, Options), -% ( option(header(true), Option, true) -% -> write_xml_header(Out) -% ; true -% ), -% ... -% == -% -% This predicate may only be used as a _directive_ and is -% processed by expand_term/2. Option processing can be be -% specified at runtime using assert_predicate_options/3, which is -% intended to support program analysis. - -predicate_options(PI, Arg, Options) :- - throw(error(context_error(nodirective, - predicate_options(PI, Arg, Options)), _)). - - -%% assert_predicate_options(:PI, +Arg, +Options, ?New) is semidet. -% -% As predicate_options(:PI, +Arg, +Options). New is a boolean -% indicating whether the declarations have changed. If new is -% provided and =false=, the predicate becomes semidet and fails -% without modifications if modifications are required. - -assert_predicate_options(PI, Arg, Options, New) :- - canonical_pi(PI, M:Name/Arity), - functor(Head, Name, Arity), - ( dyn_option_decl(Head, M, Arg) - -> true - ; New = true, - assertz(dyn_option_decl(Head, M, Arg)) - ), - phrase('$predopts':option_clauses(Options, Head, M, Arg), - OptionClauses), - forall(member(Clause, OptionClauses), - assert_option_clause(Clause, New)), - ( var(New) - -> New = false - ; true - ). - -assert_option_clause(Clause, New) :- - rename_clause(Clause, NewClause, - '$pred_option'(A,B,C,D), '$dyn_pred_option'(A,B,C,D)), - clause_head(NewClause, NewHead), - ( clause(NewHead, _) - -> true - ; New = true, - assertz(NewClause) - ). - -clause_head(M:(Head:-_Body), M:Head) :- !. -clause_head((M:Head :-_Body), M:Head) :- !. -clause_head(Head, Head). - -rename_clause(M:Clause, M:NewClause, Head, NewHead) :- !, - rename_clause(Clause, NewClause, Head, NewHead). -rename_clause((Head :- Body), (NewHead :- Body), Head, NewHead) :- !. -rename_clause(Head, NewHead, Head, NewHead) :- !. -rename_clause(Head, Head, _, _). - - - - /******************************* - * QUERY OPTIONS * - *******************************/ - -%% current_option_arg(:PI, ?Arg) is nondet. -% -% True when Arg of PI processes predicate options. Which options -% are processed can be accessed using current_predicate_option/3. - -current_option_arg(Module:Name/Arity, Arg) :- - current_option_arg(Module:Name/Arity, Arg, _DefM). - -current_option_arg(Module:Name/Arity, Arg, DefM) :- - atom(Name), integer(Arity), !, - resolve_module(Module:Name/Arity, DefM:Name/Arity), - functor(Head, Name, Arity), - ( option_decl(Head, DefM, Arg) - ; dyn_option_decl(Head, DefM, Arg) - ). -current_option_arg(M:Name/Arity, Arg, M) :- - ( option_decl(Head, M, Arg) - ; dyn_option_decl(Head, M, Arg) - ), - functor(Head, Name, Arity). - -%% current_predicate_option(:PI, ?Arg, ?Option) is nondet. -% -% True when Arg of PI processes Option. For example, the following -% is true: -% -% == -% ?- current_predicate_option(open/4, 4, type(text)). -% true. -% == -% -% This predicate is intended to support conditional compilation -% using if/1 ... endif/0. The predicate -% current_predicate_options/3 can be used to access the full -% capabilities of a predicate. - -current_predicate_option(Module:PI, Arg, Option) :- - current_option_arg(Module:PI, Arg, DefM), - PI = Name/Arity, - functor(Head, Name, Arity), - catch(pred_option(DefM:Head, Option), - error(type_error(_,_),_), - fail). - -%% check_predicate_option(:PI, +Arg, +Option) is det. -% -% Similar to current_predicate_option/3, but intended to support -% runtime checking. -% -% @error existence_error(option, OptionName) if the option is not -% supported by PI. -% @error type_error(Type, Value) if the option is supported but -% the value does not match the option type. See must_be/2. - -check_predicate_option(Module:PI, Arg, Option) :- - define_predicate(Module:PI), - current_option_arg(Module:PI, Arg, DefM), - PI = Name/Arity, - functor(Head, Name, Arity), - ( pred_option(DefM:Head, Option) - -> true - ; existence_error(option, Option) - ). - - -pred_option(M:Head, Option) :- - pred_option(M:Head, Option, []). - -pred_option(M:Head, Option, Seen) :- - ( has_static_option_decl(M), - M:'$pred_option'(Head, _, Option, Seen) - ; has_dynamic_option_decl(M), - M:'$dyn_pred_option'(Head, _, Option, Seen) - ). - -has_static_option_decl(M) :- - '$c_current_predicate'(_, M:'$pred_option'(_,_,_,_)). -has_dynamic_option_decl(M) :- - '$c_current_predicate'(_, M:'$dyn_pred_option'(_,_,_,_)). - - - /******************************* - * TYPE&MODE CONSTRAINTS * - *******************************/ - -:- public - system:predicate_option_mode/2, - system:predicate_option_type/2. - -add_attr(Var, Value) :- - ( get_attr(Var, predicate_options, Old) - -> put_attr(Var, predicate_options, [Value|Old]) - ; put_attr(Var, predicate_options, [Value]) - ). - -system:predicate_option_type(Type, Arg) :- - var(Arg), !, - add_attr(Arg, option_type(Type)). -system:predicate_option_type(Type, Arg) :- - must_be(Type, Arg). - -system:predicate_option_mode(Mode, Arg) :- - var(Arg), !, - add_attr(Arg, option_mode(Mode)). -system:predicate_option_mode(Mode, Arg) :- - check_mode(Mode, Arg). - -check_mode(input, Arg) :- - ( nonvar(Arg) - -> true - ; instantiation_error(Arg) - ). -check_mode(output, Arg) :- - ( var(Arg) - -> true - ; instantiation_error(Arg) % TBD: Uninstantiated - ). - -attr_unify_hook([], _). -attr_unify_hook([H|T], Var) :- - option_hook(H, Var), - attr_unify_hook(T, Var). - -option_hook(option_type(Type), Value) :- - is_of_type(Type, Value). -option_hook(option_mode(Mode), Value) :- - check_mode(Mode, Value). - - -attribute_goals(Var) --> - { get_attr(Var, predicate_options, Attrs) }, - option_goals(Attrs, Var). - -option_goals([], _) --> []. -option_goals([H|T], Var) --> - option_goal(H, Var), - option_goals(T, Var). - -option_goal(option_type(Type), Var) --> [predicate_option_type(Type, Var)]. -option_goal(option_mode(Mode), Var) --> [predicate_option_mode(Mode, Var)]. - - - /******************************* - * OUTPUT DECLARATIONS * - *******************************/ - -%% current_predicate_options(:PI, ?Arg, ?Options) is nondet. -% -% True when Options is the current active option declaration for -% PI on Arg. See predicate_options/3 for the argument -% descriptions. If PI is ground and refers to an undefined -% predicate, the autoloader is used to obtain a definition of the -% predicate. - -current_predicate_options(PI, Arg, Options) :- - define_predicate(PI), - setof(Arg-Option, - current_predicate_option_decl(PI, Arg, Option), - Options0), - group_pairs_by_key(Options0, Grouped), - member(Arg-Options, Grouped). - -current_predicate_option_decl(PI, Arg, Option) :- - current_predicate_option(PI, Arg, Option0), - Option0 =.. [Name|Values], - maplist(mode_and_type, Values, Types), - Option =.. [Name|Types]. - -mode_and_type(Value, ModeAndType) :- - copy_term(Value,_,Goals), - ( memberchk(predicate_option_mode(output, _), Goals) - -> ModeAndType = -(Type) - ; ModeAndType = Type - ), - ( memberchk(predicate_option_type(Type, _), Goals) - -> true - ; Type = any - ). - -define_predicate(PI) :- - ground(PI), !, - PI = M:Name/Arity, - functor(Head, Name, Arity), - once(predicate_property(M:Head, _)). -define_predicate(_). - -%% derived_predicate_options(:PI, ?Arg, ?Options) is nondet. -% -% True when Options is the current _derived_ active option -% declaration for PI on Arg. - -derived_predicate_options(PI, Arg, Options) :- - define_predicate(PI), - setof(Arg-Option, - derived_predicate_option(PI, Arg, Option), - Options0), - group_pairs_by_key(Options0, Grouped), - member(Arg-Options1, Grouped), - PI = M:_, - phrase(expand_pass_to_options(Options1, M), Options2), - sort(Options2, Options). - -derived_predicate_option(PI, Arg, Decl) :- - current_option_arg(PI, Arg, DefM), - PI = _:Name/Arity, - functor(Head, Name, Arity), - has_dynamic_option_decl(DefM), - ( has_static_option_decl(DefM), - DefM:'$pred_option'(Head, Decl, _, []) - ; DefM:'$dyn_pred_option'(Head, Decl, _, []) - ). - -%% expand_pass_to_options(+OptionsIn, +Module, -OptionsOut)// is det. -% -% Expand the options of pass_to(PI,Arg) if PI does not refer to a -% public predicate. - -expand_pass_to_options([], _) --> []. -expand_pass_to_options([H|T], M) --> - expand_pass_to(H, M), - expand_pass_to_options(T, M). - -expand_pass_to(pass_to(PI, Arg), Module) --> - { strip_module(Module:PI, M, Name/Arity), - functor(Head, Name, Arity), - \+ ( predicate_property(M:Head, exported) - ; predicate_property(M:Head, public) - ; M == system - ), !, - current_predicate_options(M:Name/Arity, Arg, Options) - }, - list(Options). -expand_pass_to(Option, _) --> - [Option]. - -list([]) --> []. -list([H|T]) --> [H], list(T). - -%% derived_predicate_options(+Module) is det. -% -% Derive predicate option declarations for the given module and -% print them to the current output. - -derived_predicate_options(Module) :- - var(Module), !, - forall(current_module(Module), - derived_predicate_options(Module)). -derived_predicate_options(Module) :- - findall(predicate_options(Module:PI, Arg, Options), - ( derived_predicate_options(Module:PI, Arg, Options), - PI = Name/Arity, - functor(Head, Name, Arity), - ( predicate_property(Module:Head, exported) - -> true - ; predicate_property(Module:Head, public) - ) - ), - Decls0), - maplist(qualify_decl(Module), Decls0, Decls1), - sort(Decls1, Decls), - ( Decls \== [] - -> format('~N~n~n% Predicate option declarations for module ~q~n~n', - [Module]), - forall(member(Decl, Decls), - portray_clause((:-Decl))) - ; true - ). - -qualify_decl(M, - predicate_options(PI0, Arg, Options0), - predicate_options(PI1, Arg, Options1)) :- - qualify(PI0, M, PI1), - maplist(qualify_option(M), Options0, Options1). - -qualify_option(M, pass_to(PI0, Arg), pass_to(PI1, Arg)) :- !, - qualify(PI0, M, PI1). -qualify_option(_, Opt, Opt). - -qualify(M:Term, M, Term) :- !. -qualify(QTerm, _, QTerm). - - - /******************************* - * CLEANUP * - *******************************/ - -%% retractall_predicate_options is det. -% -% Remove all dynamically (derived) predicate options. - -retractall_predicate_options :- - forall(retract(dyn_option_decl(_,M,_)), - abolish(M:'$dyn_pred_option'/4)). - - - /******************************* - * COMPILE-TIME CHECKER * - *******************************/ - - -:- thread_local - new_decl/1. - -%% check_predicate_options is det. -% -% Analyse loaded program for errornous options. This predicate -% decompiles the current program and searches for calls to -% predicates that process options. For each option list, it -% validates whether the provided options are supported and -% validates the argument type. This predicate performs partial -% dataflow analysis to track option-lists inside a clause. -% -% @see derive_predicate_options/0 can be used to derive -% declarations for predicates that pass options. This -% predicate should normally be called before -% check_predicate_options/0. - -check_predicate_options :- - forall(current_module(Module), - check_predicate_options_module(Module)). - -%% derive_predicate_options is det. -% -% Derive new predicate option declarations. This predicate -% analyses the loaded program to find clauses that process options -% using one of the predicates from library(option) or passes -% options to other predicates that are known to process options. -% The process is repeated until no new declarations are retrieved. -% -% @see autoload/0 may be used to complete the loaded program. - -derive_predicate_options :- - derive_predicate_options(NewDecls), - ( NewDecls == [] - -> true - ; print_message(informational, check_options(new(NewDecls))), - new_decls(NewDecls), - derive_predicate_options - ). - -new_decls([]). -new_decls([predicate_options(PI, A, O)|T]) :- - assert_predicate_options(PI, A, O, _), - new_decls(T). - - -derive_predicate_options(NewDecls) :- - call_cleanup( - ( forall( - current_module(Module), - forall( - ( predicate_in_module(Module, PI), - PI = Name/Arity, - functor(Head, Name, Arity), - catch(Module:clause(Head, Body, Ref), _, fail) - ), - check_clause((Head:-Body), Module, Ref, decl))), - ( setof(Decl, retract(new_decl(Decl)), NewDecls) - -> true - ; NewDecls = [] - ) - ), - retractall(new_decl(_))). - - -check_predicate_options_module(Module) :- - forall(predicate_in_module(Module, PI), - check_predicate_options(Module:PI)). - -predicate_in_module(Module, PI) :- - current_predicate(Module:PI), - PI = Name/Arity, - functor(Head, Name, Arity), - \+ predicate_property(Module:Head, imported_from(_)). - -%% check_predicate_options(:PredicateIndicator) is det. -% -% Verify calls to predicates that have options in all clauses of -% the predicate indicated by PredicateIndicator. - -check_predicate_options(Module:Name/Arity) :- - debug(predicate_options, 'Checking ~q', [Module:Name/Arity]), - functor(Head, Name, Arity), - forall(catch(Module:clause(Head, Body, Ref), _, fail), - check_clause((Head:-Body), Module, Ref, check)). - -%% check_clause(+Clause, +Module, +Ref, +Action) is det. -% -% Action is one of -% -% * decl -% Create additional declarations -% * check -% Produce error messages - -check_clause((Head:-Body), M, ClauseRef, Action) :- !, - catch(check_body(Body, M, _, Action), E, true), - ( var(E) - -> option_decl(M:Head, Action) - ; ( clause_info(ClauseRef, File, TermPos, _NameOffset), - TermPos = term_position(_,_,_,_,[_,BodyPos]), - catch(check_body(Body, M, BodyPos, Action), - error(Formal, ArgPos), true), - compound(ArgPos), - arg(1, ArgPos, CharCount), - integer(CharCount) - -> Location = file_char_count(File, CharCount) - ; Location = clause(ClauseRef), - E = error(Formal, _) - ), - print_message(error, predicate_option_error(Formal, Location)) - ). - - -%% check_body(+Body, +Module, +TermPos, +Action) - -check_body(Var, _, _, _) :- - var(Var), !. -check_body(M:G, _, term_position(_,_,_,_,[_,Pos]), Action) :- !, - check_body(G, M, Pos, Action). -check_body((A,B), M, term_position(_,_,_,_,[PA,PB]), Action) :- !, - check_body(A, M, PA, Action), - check_body(B, M, PB, Action). -check_body(A=B, _, _, _) :- % partial evaluation - unify_with_occurs_check(A,B), !. -check_body(Goal, M, term_position(_,_,_,_,ArgPosList), Action) :- - callable(Goal), - functor(Goal, Name, Arity), - ( '$get_predicate_attribute'(M:Goal, imported, DefM) - -> true - ; DefM = M - ), - ( eval_option_pred(DefM:Goal) - -> true - ; current_option_arg(DefM:Name/Arity, OptArg), !, - arg(OptArg, Goal, Options), - nth1(OptArg, ArgPosList, ArgPos), - check_options(DefM:Name/Arity, OptArg, Options, ArgPos, Action) - ). -check_body(Goal, M, _, Action) :- - prolog:called_by(Goal, Called), !, - check_called_by(Called, M, Action). -check_body(Meta, M, term_position(_,_,_,_,ArgPosList), Action) :- - '$get_predicate_attribute'(M:Meta, meta_predicate, Head), !, - check_meta_args(1, Head, Meta, M, ArgPosList, Action). -check_body(_, _, _, _). - -check_meta_args(I, Head, Meta, M, [ArgPos|ArgPosList], Action) :- - arg(I, Head, AS), !, - ( AS == 0 - -> arg(I, Meta, MA), - check_body(MA, M, ArgPos, Action) - ; true - ), - succ(I, I2), - check_meta_args(I2, Head, Meta, M, ArgPosList, Action). -check_meta_args(_,_,_,_, _, _). - -%% check_called_by(+CalledBy, +M, +Action) is det. -% -% Handle results from prolog:called_by/2. - -check_called_by([], _, _). -check_called_by([H|T], M, Action) :- - ( H = G+N - -> ( extend(G, N, G2) - -> check_body(G2, M, _, Action) - ; true - ) - ; check_body(H, M, _, Action) - ), - check_called_by(T, M, Action). - -extend(Goal, N, GoalEx) :- - callable(Goal), - Goal =.. List, - length(Extra, N), - append(List, Extra, ListEx), - GoalEx =.. ListEx. - - -%% check_options(:Predicate, +OptionArg, +Options, +ArgPos, +Action) -% -% Verify the list Options, that is passed into Predicate on -% argument OptionArg. ArgPos is a term-position term describing -% the location of the Options list. If Options is a partial list, -% the tail is annotated with pass_to(PI, OptArg). - -check_options(PI, OptArg, QOptions, ArgPos, Action) :- - debug(predicate_options, '\tChecking call to ~q', [PI]), - remove_qualifier(QOptions, Options), - must_be(list_or_partial_list, Options), - check_option_list(Options, PI, OptArg, Options, ArgPos, Action). - -remove_qualifier(X, X) :- - var(X), !. -remove_qualifier(_:X, X) :- !. -remove_qualifier(X, X). - -check_option_list(Var, PI, OptArg, _, _, _) :- - var(Var), !, - annotate(Var, pass_to(PI, OptArg)). -check_option_list([], _, _, _, _, _). -check_option_list([H|T], PI, OptArg, Options, ArgPos, Action) :- - check_option(PI, OptArg, H, ArgPos, Action), - check_option_list(T, PI, OptArg, Options, ArgPos, Action). - -check_option(_, _, _, _, decl) :- !. -check_option(PI, OptArg, Opt, ArgPos, _) :- - catch(check_predicate_option(PI, OptArg, Opt), E, true), !, - ( var(E) - -> true - ; E = error(Formal,_), - throw(error(Formal,ArgPos)) - ). - - - /******************************* - * ANNOTATIONS * - *******************************/ - -%% annotate(+Var, +Term) is det. -% -% Use constraints to accumulate annotations about variables. If -% two annotated variables are unified, the attributes are joined. - -annotate(Var, Term) :- - ( get_attr(Var, predopts_analysis, Old) - -> put_attr(Var, predopts_analysis, [Term|Old]) - ; var(Var) - -> put_attr(Var, predopts_analysis, [Term]) - ; true - ). - -annotations(Var, Annotations) :- - get_attr(Var, predopts_analysis, Annotations). - -predopts_analysis:attr_unify_hook(Opts, Value) :- - get_attr(Value, predopts_analysis, Others), !, - append(Opts, Others, All), - put_attr(Value, predopts_analysis, All). -predopts_analysis:attr_unify_hook(_, _). - - - /******************************* - * PARTIAL EVAL * - *******************************/ - -eval_option_pred(swi_option:option(Opt, Options)) :- - processes(Opt, Spec), - annotate(Options, Spec). -eval_option_pred(swi_option:option(Opt, Options, _Default)) :- - processes(Opt, Spec), - annotate(Options, Spec). -eval_option_pred(swi_option:select_option(Opt, Options, Rest)) :- - ignore(unify_with_occurs_check(Rest, Options)), - processes(Opt, Spec), - annotate(Options, Spec). -eval_option_pred(swi_option:select_option(Opt, Options, Rest, _Default)) :- - ignore(unify_with_occurs_check(Rest, Options)), - processes(Opt, Spec), - annotate(Options, Spec). -eval_option_pred(swi_option:meta_options(_Cond, QOptionsIn, QOptionsOut)) :- - remove_qualifier(QOptionsIn, OptionsIn), - remove_qualifier(QOptionsOut, OptionsOut), - ignore(unify_with_occurs_check(OptionsIn, OptionsOut)). - -processes(Opt, Spec) :- - compound(Opt), - functor(Opt, OptName, 1), - Spec =.. [OptName,any]. - - - /******************************* - * NEW DECLARTIONS * - *******************************/ - -%% option_decl(:Head, +Action) is det. -% -% Add new declarations based on attributes left by the analysis -% pass. We do not add declarations for system modules or modules -% that already contain static declarations. -% -% @tbd Should we add a mode to include generating declarations -% for system modules and modules with static declarations? - -option_decl(_, check) :- !. -option_decl(M:_, _) :- - system_module(M), !. -option_decl(M:_, _) :- - has_static_option_decl(M), !. -option_decl(M:Head, _) :- - arg(AP, Head, QA), - remove_qualifier(QA, A), - annotations(A, Annotations0), - functor(Head, Name, Arity), - PI = M:Name/Arity, - delete(Annotations0, pass_to(PI,AP), Annotations), - Annotations \== [], - Decl = predicate_options(PI, AP, Annotations), - ( new_decl(Decl) - -> true - ; assert_predicate_options(M:Name/Arity, AP, Annotations, false) - -> true - ; assertz(new_decl(Decl)), - debug(predicate_options(decl), '~q', [Decl]) - ), - fail. -option_decl(_, _). - -system_module(system) :- !. -system_module(Module) :- - sub_atom(Module, 0, _, _, $). - - - /******************************* - * MISC * - *******************************/ - -canonical_pi(M:Name//Arity, M:Name/PArity) :- - integer(Arity), - PArity is Arity+2. -canonical_pi(PI, PI). - -%% resolve_module(:PI, -DefPI) is det. -% -% Find the real predicate indicator pointing to the definition -% module of PI. This is similar to using predicate_property/3 with -% the property imported_from, but using -% '$get_predicate_attribute'/3 avoids auto-importing the -% predicate. - -resolve_module(Module:Name/Arity, DefM:Name/Arity) :- - functor(Head, Name, Arity), - ( '$get_predicate_attribute'(Module:Head, imported, M) - -> DefM = M - ; DefM = Module - ). - - - /******************************* - * MESSAGES * - *******************************/ -:- multifile - prolog:message//1. - -prolog:message(predicate_option_error(Formal, Location)) --> - error_location(Location), - '$messages':term_message(Formal). % TBD: clean interface -prolog:message(check_options(new(Decls))) --> - [ 'Inferred declarations:'-[], nl ], - new_decls(Decls). - -error_location(file_char_count(File, CharPos)) --> - { filepos_line(File, CharPos, Line, LinePos) }, - [ '~w:~d:~d: '-[File, Line, LinePos] ]. -error_location(clause(ClauseRef)) --> - { clause_property(ClauseRef, file(File)), - clause_property(ClauseRef, line_count(Line)) - }, !, - [ '~w:~d: '-[File, Line] ]. -error_location(clause(ClauseRef)) --> - [ 'Clause ~q: '-[ClauseRef] ]. - -filepos_line(File, CharPos, Line, LinePos) :- - setup_call_cleanup( - ( open(File, read, In), - open_null_stream(Out) - ), - ( Skip is CharPos-1, - copy_stream_data(In, Out, Skip), - stream_property(In, position(Pos)), - stream_position_data(line_count, Pos, Line), - stream_position_data(line_position, Pos, LinePos) - ), - ( close(Out), - close(In) - )). - -new_decls([]) --> []. -new_decls([H|T]) --> - [ ' :- ~q'-[H], nl ], - new_decls(T). - - - /******************************* - * SYSTEM DECLARATIONS * - *******************************/ - -:- use_module(library(dialect/swi/syspred_options)). +-*- mode: compilation; default-directory: "~/github/yap-6.3/swi/library/" -*- +Compilation started at Fri Apr 27 00:11:37 + +make -j -C "/Users/vsc/github/yap-6.3/build/" install +Scanning dependencies of target Yapsqlite3 +Scanning dependencies of target libswi +Scanning dependencies of target libOPTYap +[ 1%] Built target sqlite4YAP +[ 5%] Built target plmyddas +[ 6%] Built target jpl +[ 6%] Built target utf8proc +Scanning dependencies of target libYAPOs +Scanning dependencies of target myddas +[ 6%] Building C object packages/myddas/sqlite3/CMakeFiles/Yapsqlite3.dir/myddas_sqlite3.c.o +[ 6%] Building C object library/dialect/swi/fli/CMakeFiles/libswi.dir/swi.c.o +[ 7%] Building C object library/dialect/swi/fli/CMakeFiles/libswi.dir/blobs.c.o +[ 8%] Building C object packages/myddas/CMakeFiles/myddas.dir/myddas_initialization.c.o +[ 8%] Building C object packages/myddas/CMakeFiles/myddas.dir/myddas_shared.c.o +[ 8%] Building C object packages/myddas/CMakeFiles/myddas.dir/myddas_statistics.c.o +[ 9%] Building C object packages/myddas/CMakeFiles/myddas.dir/myddas_top_level.c.o +[ 9%] Building C object packages/myddas/CMakeFiles/myddas.dir/myddas_util.c.o +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:32: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +/Users/vsc/github/yap-6.3/H/YapFlags.h:238:2: error: embedding a #include + directive within macro arguments is not supported +#include "YapLFlagInfo.h" + ^ +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:32: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:32: +/Users/vsc/github/yap-6.3/H/Yap.h:785:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapSignals.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:827:2: error: embedding a #include directive + within macro arguments is not supported +#include "GitSHA1.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:831:2:In file included from error: /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.cembedding: 19a: + In file included from #include/Users/vsc/github/yap-6.3/H/Yap.h :directive781 +: + In file included from within/Users/vsc/github/yap-6.3/H/YapHandles.h :macro20 : +argumentsIn file included from /Users/vsc/github/yap-6.3/H/Yatom.his: 1342not: + supported +/Users/vsc/github/yap-6.3/H/YapFlags.h:238:2:#include "YapText.h" +error ^: +embedding a #include + dire/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:33:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:34:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:36:2: error: embedding + a #include directive within macro arguments is not supported +#include "swi.h" + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:37:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:39:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:41:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +/Users/[ 10%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.memory.c.o +[ 10%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/opt.preds.c.o +[ 11%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.sba_engine.c.o +[ 11%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.cow_engine.c.o +[ 11%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.scheduler.c.o +[ 13%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.cut.c.o +[ 12%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/tab.tries.c.o +[ 13%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/tab.completion.c.o +ctive within macro arguments is not supported +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:27: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h#include "YapLFlagInfo.h": +20: + ^In file included from +/Users/vsc/github/yap-6.3/H/Yatom.h:1342: +/Users/vsc/github/yap-6.3/H/YapFlags.h:238:2: [ 10%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/opt.init.c.o +error: embedding a #include + directive within macro arguments is not supported +#include "YapLFlagInfo.h" + ^ +[ 11%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.copy_engine.c.o +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:27: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:27: +/Users/vsc/github/yap-6.3/H/Yap.h:785:2: error: embedding a #include directive + within macro arguments[ 12%] Building C object OPTYap/CMakeFiles/libOPTYap.dir/or.thread_engine.c.o + is not supported +#include "YapSignals.h" + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:19: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781/Users/vsc/github/yap-6.3/H/Yap.h: +:/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:19: +/Users/vsc/github/yap-6.3/H/Yap.h:785:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapSignals.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:827:2: error: embedding a #include directive + within macro arguments is not supported +#include "GitSHA1.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:831:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapText.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:20:2: error: + embedding a #include directive within macro arguments is not supported +#include "YapEval.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:21:2: error: + embedding a #include directive within macro arguments is not supported +#include "YapText.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:22:2: error: + embedding a #include directive within macro arguments is not supported +#include "Yatom.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:23:2: error: + embedding a #include directive within macro arguments is not supported +#include "cut_c.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:24:2: error: + embedding a #include directive within macro arguments is not supported +#include "myddas.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:25:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:26:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:27:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +827:2:In file included from /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.cerror:: 19embedding: + In file included from a/Users/vsc/github/yap-6.3/H/Yap.h :#include781 : +directiveIn file included from +/Users/vsc/github/yap-6.3/H/YapHandles.h :within20 : +macroIn file included from /Users/vsc/github/yap-6.3/H/Yatom.harguments: 1342is: + In file included from not/Users/vsc/github/yap-6.3/H/YapFlags.h :supported234 +: +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:101:3: #include "GitSHA1.h"error +: ^unterminated + + function-like macro invocation +/Users/vsc/github/yap-6.3/H/Yap.h:831:2: error: embedding a #include directive + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, +within ^macro + arguments is not/Users/vsc/github/yap-6.3/H/YapFlags.h :supported231 +:9: note: macro#include "YapText.h" +'YAP_FLAG' ^ +defined + here +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:28:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:29:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:30:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:32:2: error: + embedding a #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:34:2: error: + embedding a #include directive within macro arguments is not supported +#include "YapText.h" + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:38:2: error: + embedding a #include directive within macro arguments In file included from is/Users/vsc/github/yap-6.3/OPTYap/opt.init.c :not18 : +supportedIn file includ +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + ^ +#include + ^ +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:::431706:: +:27In file included from ::/Users/vsc/github/yap-6.3/H/Yap.h :errorerror781: : : + + +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.hexpectedembedding: 20identifiera: + + In file included from #include/Users/vsc/github/yap-6.3/H/Yatom.h :directive1342 : +within #endifmacro + /Users/vsc/github/yap-6.3/H/YapFlags.h ^arguments: + 238is: 2not: supported/Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.cerror +:: 706:7embedding: #include "swi.h"aerror + : ^#include + + + expecteddirective '}'within + macro/Users/vsc/github/yap-6.3/H/YapFlags.h :arguments233 :is14 :not notesupported: +to match this '{' +typedef enum { + ^ +#include "YapLFlagInfo.h" + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.cvsc/github/yap-6.3/library/dialect/swi/fli/swi.cIn file included from :In file included from 19: +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c27/Users/vsc/github/yap-6.3/H/Yap.h:::: +178142In file included from : +:: +/Users/vsc/github/yap-6.3/H/Yap.hIn file included from 2:In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h781:/Users/vsc/github/yap-6.3/H/Yap.h:: +: 20In file included from error/Users/vsc/github/yap-6.3/H/YapHandles.h: +: In file included from :/Users/vsc/github/yap-6.3/H/Yatom.hembedding: +1342 : +a781In file included from : +/Users/vsc/github/yap-6.3/H/YapFlags.h#include:/Users/vsc/github/yap-6.3/H/YapHandles.h 234:directive: +67 :/Users/vsc/github/yap-6.3/H/YapGFlagInfo.hwithin2: :94macro : error41arguments: : embedding is error a: not expected#includesupported + +';' directiveafter +within enummacro + #20include : + + ^In file included from +/Users/vsc/github/yap-6.3/H/Yatom.h: booleanFlag, "true", NULL),1342: +In file included from +/Users/vsc/github/yap-6.3/H/YapFlags.h:234 ^: + + ;/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +:101:3: error: unterminated + function-like macro invocation +argumentsIn file included from /Users/vsc/github/yap-6.3/packages/myddas/sqlite3/myddas_sqlite3.c:19: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,/Users/vsc/github/yap-6.3/H/Yatom.h +: ^1342 +: +/Users/vsc/github/yap-6.3/H/YapFlags.h:233:1:/Users/vsc/github/yap-6.3/H/YapFlags.h : 231warning:: 9typedef: requiresnote : amacro name'YAP_FLAG'is + defined[-Wmissing-declarations] + +here +typedef enum { +^~~~~~~ +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x/ +1 ^Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c + warning and :1745 error:s2 generated. +: error: embedding + a/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c :#include169 :directive4 :within errormacro: +arguments expectedis identifiernot + supported + */ +#include ^ + + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:169:4: /Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.cerror:: 48 +: 2expected: '}'error +: embedding +/Users/vsc/github/yap-6.3/H/YapFlags.h :a233 :#include14 :directive notewithin: tomacro matcharguments thisis '{'not + supported +typedef enum { + ^ +#include + ^ +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:51:2: error: embedding + a #include directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c:27: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c781make[2]: :: +61In file included from :2/Users/vsc/github/yap-6.3/H/YapHandles.h:: 20error: +: In file included from *** [packages/myddas/sqlite3/CMakeFiles/Yapsqlite3.dir/myddas_sqlite3.c.o] Error 1embedding/Users/vsc/github/yap-6.3/H/Yatom.h +: 1342a: + + In file included from #include/Users/vsc/github/yap-6.3/H/YapFlags.h :directive234 : +within/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h :macro94 :arguments41 :is errornot: supportedexpected + ';' after + enum +#include + ^ + booleanFlag, "true", NULL), + ^ + ; + not In file included from supported/Users/vsc/github/yap-6.3/library/dialect/swi/fli/blobs.c +:27: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +#include In file included from +/Users/vsc/github/yap-6.3/H/YapHandles.h ^: +20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +/Users/vsc/github/yap-6.3/H/YapFlags.h:233:1: warning: typedef requires a In file included from In file included from name/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.cIn file included from In file included from : +make[1]: 5 : +[-Wmissing-declarations]/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c +In file included from :/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c/Users/vsc/github/yap-6.3/H/Yap.h1::: +32781: +/Users/vsc/github/yap-6.3/H/Yap.h: +In file included from In file included from :/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapHandles.h785:*** [packages/myddas/sqlite3/CMakeFiles/Yapsqlite3.dir/all] Error 2::781typedef enum {20: +2 +: +In file included from :^~~~~~~In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h +/Users/vsc/github/yap-6.3/H/Yatom.h +error::: 201342: +embedding: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.ha: 1342#include/Users/vsc/github/yap-6.3/H/YapFlags.h: + make[1]: :directiveIn file included from *** Waiting for unfinished jobs..../Users/vsc/github/yap-6.3/H/YapFlags.h +238 + :within234: : +macro/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h2 ::arguments101 :erroris3: :not errorsupported: embedding +unterminated +a function-like#include +macro directiveinvocation +within #include "YapSignals.h"macro + arguments ^ +is not supported +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,: + ^17 +: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/H/Yap.h:In file included from :231/Users/vsc/github/yap-6.3/H/YapHandles.h827:::9202:: +: In file included from #include "YapLFlagInfo.h" note/Users/vsc/github/yap-6.3/H/Yatom.h +error: : ^: 1342macro +embedding: + 'YAP_FLAG'a defined/Users/vsc/github/yap-6.3/H/YapFlags.h#include +: 238directivehere: + +2 :within errormacro: arguments embeddingis anot #includesupported + +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x +directive ^ +within macro#include "GitSHA1.h" +ar[ 19%] Building C object os/CMakeFiles/libYAPOs.dir/sockets.c.o +guments is not supported + ^ +#include "YapLFlagInfo.h" + ^/Users/vsc/github/yap-6.3/H/Yap.h +:831:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapText.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:2:2: error: embedding a + #include directive within macro arguments is not supported +#include "cut_c.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:3:2: error: embedding a + #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:4:2: error: embedding a + #include directive within macro arguments is not supported +#include + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:6:2: error: embedding a + #include directive within macro1 arguments warning and is 16not error ssupported generated. + +In file included from #include "myddas.h"/Users/vsc/github/yap-6.3/pack[ 15%] Building C object os/CMakeFiles/libYAPOs.dir/chartypes.c.o +[ 16%] Building C object os/CMakeFiles/libYAPOs.dir/fmem.c.o +[ 17%] Building C object os/CMakeFiles/libYAPOs.dir/iopreds.c.o +[ 17%] Building C object os/CMakeFiles/libYAPOs.dir/readline.c.o +[ 17%] Building C object os/CMakeFiles/libYAPOs.dir/pipes.c.o +[ 17%] Building C object os/CMakeFiles/libYAPOs.dir/mem.c.o +[ 18%] Building C object os/CMakeFiles/libYAPOs.dir/random.c.o +[ 18%] Building C object os/CMakeFiles/libYAPOs.dir/readterm.c.o +[ 18%] Building C object os/CMakeFiles/libYAPOs.dir/readutil.c.o +[ 19%] Building C object os/CMakeFiles/libYAPOs.dir/sig.c.o +[ 20%] Building C object os/CMakeFiles/libYAPOs.dir/streams.c.o +[ 20%] Building C object os/CMakeFiles/libYAPOs.dir/sysbits.c.o +[ 20%] Building C object os/CMakeFiles/libYAPOs.dir/time.c.o +make[2]: [ 21%] Building C object os/CMakeFiles/libYAPOs.dir/writeterm.c.o +[ 21%] Building C object os/CMakeFiles/libYAPOs.dir/ypsocks.c.o +*** [library/dialect/swi/fli/CMakeFiles/libswi.dir/blobs.c.o] Error 1 +make[2]: *** Waiting for unfinished jobs.... +[ 22%] Building C object os/CMakeFiles/libYAPOs.dir/ypstdio.c.o +[ 24%] Built target YAP_KERNEL +ages/myddas/myddas_shared.c:17: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:17: +/Users/vsc/github/yap-6.3/H/Yap.h:785:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapSignals.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:827:2: error: embedding a #include +directive[ 14%] Building C object os/CMakeFiles/libYAPOs.dir/assets.c.o + + ^within + macro arguments is not/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c :supported7 +:2: error: #include "GitSHA1.h"embedding + ^a + + #include directive/Users/vsc/github/yap-6.3/H/Yap.h :within831 :macro2 :arguments erroris: em[ 14%] Building C object os/CMakeFiles/libYAPOs.dir/alias.c.o +[ 14%] Building C object os/CMakeFiles/libYAPOs.dir/charsio.c.o +[ 16%] Building C object os/CMakeFiles/libYAPOs.dir/files.c.o +[ 15%] Building C object os/CMakeFiles/libYAPOs.dir/console.c.o +[ 16%] Building C object os/CMakeFiles/libYAPOs.dir/format.c.o +bedding a #include directive + within macro arguments is not supported +#include "YapText.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:20:2: error: + embedding a #include directive within macro arguments is not supported +#include "Yatom.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:21:2: error: + embedding a #include directive within macro arguments is not supported +#include "cut_c.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:22:2: error: + embedding a #include directive within macro arguments is not supported +#include "myddas.h" + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:23:2: error: + embedding a #incluIn file included from /Users/vsc/github/yap-6.3/os/sockets.c:26: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +/Users/vsc/github/yap-6.3/H/YapFlags.h:238:2: error: embedding a #include + directive within macro arguments is not supported +#include "YapLFlagInfo.h" + ^ +denot directive supportedwithin + macro arguments is not supported +#include "myddas_util.h" + ^ +#include + ^ +In file included from /Users/vsc/github/yap-6.3/os/sockets.c:26: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:1: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c/Users/vsc/github/yap-6.3/H/Yatom.h::13423152: +:4In file included from :/Users/vsc/github/yap-6.3/H/YapFlags.h :error234: : + +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h :expected101 :identifier3 +: error: unterminated + function-like */macro + ^invocation + +/Users/vsc/github/yap-6.3/library/dialect/swi/fli/swi.c:3152:4: error: + expected YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, +'}' ^ + +/Users/vsc/github/yap-6.3/H/YapFlags.h:233:14/Users/vsc/github/yap-6.3/H/YapFlags.h:: 231note:: 9to: matchnote : thismacro '{''YAP_FLAG' + defined + heretypedef enum { + + ^ +fatal error#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x: +too ^ +many errors emitted, stopping now [-ferror-limit=]/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c +:267:7: error: expected + identifier +#endif + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:267:7: error: expected + '}' +/Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from :233/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c::145:: + noteIn file included from : /Users/vsc/github/yap-6.3/H/Yap.h:to781 : +match /Users/vsc/github/yap-6.3/H/YapHandles.hthis: 67'{': +2: error: embedding atypedef enum { +#include ^ + + directive within macro arguments is not supported +#include + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_util.c:1: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h:234: +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:94:41: error: expected ';' after + enum + booleanFlag, "true", NULL), + ^ + ; +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_util.cIn file included from :1/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c: +:17In file included from : +/Users/vsc/github/yap-6.3/H/Yap.h:In file included from 781/Users/vsc/github/yap-6.3/H/Yap.h: +:In file included from 781/Users/vsc/github/yap-6.3/H/YapHandles.h: +:In file included from 20/Users/vsc/github/yap-6.3/H/YapHandles.h: +:In file included from 20/Users/vsc/github/yap-6.3/H/Yatom.h: +:In file included from 1342/Users/vsc/github/yap-6.3/H/Yatom.h: +:1342/Users/vsc/github/yap-6.3/H/YapFlags.h: +:In file included from 233/Users/vsc/github/yap-6.3/H/YapFlags.h::1234:: + /Users/vsc/github/yap-6.3/H/YapGFlagInfo.hwarning:: 101typedef: 3requires: aerror : nameunterminated + + [-Wmissing-declarations]function-like + macro invocation +typedef enum { +^~~~~~~ + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, + ^ +/Users/vsc/github/yap-6.3/H/YapFlags.h:231:9: note: macro 'YAP_FLAG' defined + here +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c20:737 error:s7 generated. +: error: + expected identifier +#endif + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:737:7: error: + expected '}' +/Users/vsc/github/yap-6.3/H/YapFlags.h:233:14: note: to match this '{' +typedef enum { + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:17: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h:234: +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:94:41: error: expected ';' after + enum + booleanFlag, "true", NULL), + ^ + ; +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_shared.c:17: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from In file included from 1/Users/vsc/github/yap-6.3/H/YapHandles.h warning:/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c and 20:: +514In file included from : + error/Users/vsc/github/yap-6.3/H/Yatom.hs/Users/vsc/github/yap-6.3/H/Yap.h: generated. +:1342785: +:/Users/vsc/github/yap-6.3/H/YapFlags.h2::233 :error1: : embeddingwarning : a typedef#include requiresdirective +a withinname +macro [-Wmissing-declarations]arguments + is not supported +typedef enum { +^~~~~~~ +#include "YapSignals.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:827:2: error: embedding a #include directive + within macro arguments is notIn file included from supported +/Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.c:18: +In file included from #include "GitSHA1.h"/Users/vsc/github/yap-6.3/H/Yap.h +: ^781 +: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:/Users/vsc/github/yap-6.3/H/Yap.h20:: +831In file included from In file included from :/Users/vsc/github/yap-6.3/H/Yatom.h2::1342 : +/Users/vsc/github/yap-6.make[2]: 13/OPTYap/tab.tries.cmake[2]: error warning:*** [library/dialect/swi/fli/CMakeFiles/libswi.dir/swi.c.o] Error 1 and 18: +13: + errorembeddingsIn file included from generated. +/Users/vsc/github/yap-6.3/H/Yap.ha*** [packages/myddas/CMakeFiles/myddas.dir/myddas_util.c.o] Error 1: 781#include: + In file included from directive +/Users/vsc/github/yap-6.3/H/YapHandles.h +: 20within: + In file included from macro/Users/vsc/github/yap-6.3/H/Yatom.h :arguments1342 : +ismake[2]: *** Waiting for unfinished jobs....not/Users/vsc/github/yap-6.3/H/YapFlags.h + :supported238 +:2In file included from : error: /Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c:18embedding#include "YapText.h": + +aIn file included from ^ /Users/vsc/github/yap-6.3/H/Yap.h +#include: +781 : +directiveIn file included from /Users/vsc/github/yap-6.3/H/YapHandles.hwithin: 20macro: + In file included from arguments/Users/vsc/github/yap-6.3/H/Yatom.h :is1342 : +not/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c :supported6make[1]: :2: *** [library/dialect/swi/fli/CMakeFiles/libswi.dir/all] Error 2error +: + embedding a #include directive within make[2]: macro arguments is*** [packages/myddas/CMakeFiles/myddas.dir/myddas_shared.c.o] Error 1 +not supported +#include "myddas.h" + ^ +/Users/vsc/github/yap-6.3/H/YapFlags.h:238:2: error: embedding a #include + directive within macro arguments is not supported +#include "YapLFlagInfo.h" + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c:5: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h:234: +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:101:3: error: unterminated + function-like macro invocation + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, + ^ +/Users/vsc/github/yap-6.3/H/YapFlags.h:231:9: note: macro 'YAP_FLAG' defined + here +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c:111:2: error: + expected identifier +} + ^ +/Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c:111:2: error: + expected '}' +/Users/vsc/github/yap-6.3/H/YapFlags.h:233:14: note: to match this '{' +typedef enum { + ^ +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_initialization.c:5: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h:20: +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h:1342: +In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h:234: +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:94:41: error: expected ';' after + enum + booleanFlag, "true", NULL), + ^ + ; +In file included from /Users/vsc/github/yap-6.3/packages/myddas/myddas_initia +In file included from lization.c/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c::185: +: +In file included from In file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.h::781781: +: +In file included from In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/YapHandles.h::2020: +: +In file included from In file included from /Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/Yatom.h::13421342: +: +#include "YapLFlagInfo.h"/Users/vsc/github/yap-6.3/H/YapFlags.h +:233/Users/vsc/github/yap-6.3/H/YapFlags.h ^:: +1238:: 2warning:: typedeferror : requires aembedding namea + #include[-Wmissing-declarations] + + directive within macro arguments istypedef enum { +not^~~~~~~ +supported +#include "YapLFlagInfo.h" + ^ +In file included from /Users/vsc/github/yap-6.3/OPTYap/tab.tries.c:18: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/H/YapHandles.h:67:2: error: embedding a #include + directive within In file included from In file included from In file included from ed from In file included from /Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c/Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c/Users/vsc/github/yap-6.3/OPTYap/or.cut.c/Users/vsc/github/yap-6.3/H/Yap.h::In file included from 18:18: +781/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c: +In file included from : +:/Users/vsc/github/yap-6.3/OPTYap/or.memory.cIn file included from /Users/vsc/github/yap-6.3/H/Yap.h:23In file included from /Users/vsc/github/yap-6.3/H/Yap.h18:/Users/vsc/github/yap-6.3/H/YapHandles.h: +781:In file included from In file included from In file included from : +20: +:/Users/vsc/github/yap-6.3/H/Yap.hIn file included from 781In file included from /Users/vsc/github/yap-6.3/os/sockets.c/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapHandles.h: +:: +:::781In file included from 26781: +18:: +: +In file included from In file included from /Users/vsc/github/yap-6.3/H/Yatom.h20In /Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from file included from In file included from : +: +:In file included from /Users/vsc/github/yap-6.3/os/sysbits.c/Users/vsc/github/yap-6.3/H/YapHandles.h20/Users/vsc/github/yap-6.3/os/streams.c::/Users/vsc/github/yap-6.3/H/YapHandles.h: +In file included from In file included from :212029In file included from /Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/Yap.h: +/Users/vsc/github/yap-6.3/H/Yatom.h:: +::: +In file included from :20781/Users/vsc/github/yap-6.3/H/Yap.h1342: +In file included from In file included from : +1342/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/H/Yatom.h:: +/Users/vsc/github/yap-6.3/H/YapHandles.h781In file included from : +:::: +/Users/vsc/github/yap-6.3/H/Yatom.h671342In file included from 24:: +: +:/Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/H/YapFlags.h1342:2: +::In file included from 238:/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap:1In file included from :In file included from macro/Users/vsc/github/yap-6.3/os/readutil.cIn file included from warning and /Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c:210arguments/Users/vsc/github/yap-6.3/os/ypsocks.c:: error 1342:sis: + generated. + 18 18not: +error : +: In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/OPTYap/tab.completion.cIn file included from /Users/vsc/github/yap-6.3/H/Yap.h::/Users/vsc/github/yap-6.3/os/sysbits.hsupported:18embedding238781: +: + : +:24/Users/vsc/github/yap-6.3/H/YapHandles.ha2In file included from ::: +/Users/vsc/github/yap-6.3/H/Yap.h 67 In file included from ::#includeerror/Users/vsc/github/yap-6.3/H/Yap.h7812 +:: :: +781#include In file included from +embeddingerrordirective: +/Users/vsc/github/yap-6.3/H/YapHandles.h ^ : :In file included from aembedding20within /Users/vsc/github/yap-6.3/H/YapHandles.h +: +:#includea In file included from +20 macro/Users/vsc/github/yap-6.3/H/Yatom.h: + #include:directiveIn file /Users/vsc/github/yap-6.3/H/YapFlags.h:/Users/vsc/github/yap-6.3/H/YapFlags.h238make[2]: included from In file included from :238:::2382238:2/Users/vsc/github/yap-6.3/H/Yatom.h*** [packages/myddas/CMakeFiles/myddas.dir/myddas_initialization.c.o] Error 12::/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c1342 +:: +::18: : +2errorerrorerror:: /Users/vsc/github/yap-6.3/H/Yap.h: : :/Users/vsc/github/yap-6.3/H/YapFlags.herror:785: 238:embeddingembeddingembedding:2 :2aembeddingaa : #include aerror#include#includeerror: +: + +embedding#include embeddingdirective +directiveadirective directivea#include within within withinwithin #includedirective macro +macro macro + macrodirective withinarguments argumentsargumentsarguments within is macroisisis macro not argumentsnotnotarguments is not supported issupportedsupported + not +not + supported supported +supported + +#include "YapSignals.h" + ^ +#include "YapLFlagInfo.h"#include "YapLFlagInfo.h"#include "YapLFlagInfo.h"#include " + +1342 arguments ^/Users/vsc/github/yap-6.3/H/Yap.h +: +within directiveerror : is: macrowithin 785 /Users/vsc/github/yap-6.3/H/YapFlags.h:argumentsmacroembeddingnot 2: isargumentssupporteda238: + : #includeis2errornot + : : notsupportedembedding directive +error supported : a +within #includeembeddingmacro directiveaarguments + is#includewithin +#include not +macrodirective ^ supported +argumentswithin + ismacro#include "YapLFlagInfo.h" +notarguments ^ +supportedis +#include +not ^ +#include "YapLFlagInfo.h"supported + + ^ +#include "YapSignals.h" + ^ +#include "YapLFlagInfo.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:827:2: error: embedding a #include directive + within macro arguments is not supported +#include "GitSHA1.h" + ^ +/Users/vsc/github/yap-6.3/H/Yap.h:831:2: error: embedding a #include directive + within macro arguments is not supported +#include "YapText.h" + ^ +In file included from /Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c:18: +/Users/vsc/github/y:/Users/vsc/github/yap-6.3/H/Yap.hIn file included from YapLFlagInfo.h"make[1]: #include "YapLFlagInfo.h" +18: +/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c: + +: ^In file included from 18 ^*** [packages/myddas/CMakeFiles/myddas.dir/all] Error 2 ^827 + +: + +:/Users/vsc/github/yap-6.3/H/Yap.h +/Users/vsc/github/yap-6.3/H/Yap.h2:::781785 : +:errorIn file included from 2: /Users/vsc/github/yap-6.3/H/YapHandles.h::embedding 20 error: +a: + In file included from embedding#include/Users/vsc/github/yap-6.3/H/Yatom.h ^: a +1342directive : + +#include withindirective +/Users/vsc/github/yap-6.3/H/YapFlags.hmacro : within238arguments : macro2is : arguments not error is: supported +not embeddingsupported +a #include + #include "GitSHA1.h"directive + ^within + macro#include "YapSignals.h" + ^arguments + is/Users/vsc/github/yap-6.3/H/Yap.h :not831 :supported2 +: error: embedding a #include directive/Users/vsc/github/yap-6.3/H/Yap.h +: 827within: 2macro: argumentserror : isembedding #include "YapLFlagInfo.h" not aIn file included from In file included from In file included from In file included from ap-6.3/H/Yap.hsupported /Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c/Users/vsc/github/yap-6.3/OPTYap/or.memory.c +/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c/Users/vsc/github/yap-6.3/OPTYap/opt.init.c::#include:1818:: 785: +directive: +18:In file included from In file included from +2/Users/vsc/github/yap-6.3/H/Yap.h 18:within#include "YapText.h": +: + + :In file included from /Users/vsc/github/yap-6.3/H/Yap.h781macro ^:/Users/vsc/github/yap-6.3/H/Yap.h In file included from : : +error781arguments +/Users/vsc/github/yap-6.3/H/Yap.h781: /Users/vsc/github/yap-6.3/H/YapHandles.h : +: +:embeddingis/Users/vsc/github/yap-6.3/H/YapHandles.h: :781anot67/Users/vsc/github/yap-6.3/H/YapHandles.h67: + :: supported:2/Users/vsc/github/yap-6.3/H/YapHandles.h2#include:67:: +: 67 error2directive:error: /Users/vsc/github/yap-6.3/OPTYap/tab.tries.c:2embedding +:: #include "GitSHA1.h" embedding:errora +within20 ^ error +:: macrembeddingIn file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/os/sockets.c + o: :/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c: ^a:831 + embedding2327#include: + :: +In file included from 2a /Users/vsc/github/yap-6.3/H/Yap.h:2 : arguments:781#includeerror: +directive + : /Users/vsc/github/yap-6.3/H/YapHandles.h errorembedding:: within 67 aembeddingdirective: macro a2#includewithin : #include arguments +error : ismacrodirective embedding not arguments awithin supporteddirective is + +#include +notmacro directivesupportedarguments + withinis #include macro + ^arguments + is#include not + not ^supported + +supportedwithin + macro arguments #include "Yatom.h"is + ^#include not + + ^supported + +/Users/vsc/github/yap-6.3/os/sockets.c:28:2: #include "YapText.h"error +: ^embedding + a #include + directive within macro arguments is not supported +#include "YapHeap.h" + ^ +/Users/vsc/github/yap-6.3/os/sockets.c:29:2: error: embeddingIn file inaIn file included from In file included from In file included from cluded from In file included from In file included from /Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c:/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c/Users/vsc/github/yap-6.3/OPTYap/or.cut.c/Users/vsc/github/yap-6.3/OPTYap/opt.init.c:18:/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c::: +18:#include18: +/Users/vsc/github/yap-6.3/H/Yap.h231818 +: +: + :/Users/vsc/github/yap-6.3/H/Yap.hIn file included from directive:In file included from : +: +785 /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.hIn file included from :785:/Users/vsc/github/yap-6.3/H/Yap.h2:within::/Users/vsc/github/yap-6.3/H/Yap.h7812 785:macro: +::781 In file included from 781:error: +/Users/vsc/github/yap-6.3/H/YapHandles.h error: 2: +:/Users/vsc/github/yap-6.3/H/YapHandles.hembedding: /Users/vsc/github/yap-6.3/H/YapHandles.h: embedding: :20arguments67error67 a ::: : +2is2In file included from #includea::embe#include In file included from +dding/Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.c isa:error directive : 18#include +a: +not +In file included from embedding /Users/vsc/github/yap-6.3/H/Yap.h #includesupported:directivewithin + directive aerror781withinmacro: : + + /Users/vsc/github/yap-6.3/H/YapHandles.h#includeembedding argumentsmacro:within 67ismacro +arguments :#include "YapSignals.h"a 2 + notdirectivearguments: ^ + #includeiswithin is + error macro supported: notdirectivenot +embedding arguments supportedsupportedwithin +isa + macronot#include +argumentssupported #include "YapSignals.h" +directive #include "yapio.h" + is +#include "YapSignals.h" ^within ^ + +not /Users/vsc/github/yap-6.3/H/Yap.h + ^#include macro:supported + +827 + ^:arguments/Users/vsc/github/yap-6.3/os/sockets.c2 +::is30 :noterror2 : :supportedembedding#include + +error/Users/vsc/github/yap-6.3/H/Yap.ha ^: : +827embedding#include: /Users/vsc/github/yap-6.3/H/Yap.ha2direcdirective/Users/vsc/github/yap-6.3/H/Yatom.h In file included from In file included from 20 :/Users/vsc/github/yap-6.3/OPTYap/or.cut.cwithin/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c: #include:181342tive18 : +: +: +directivemacro +In file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.h + :/Users/vsc/github/yap-6.3/H/YapFlags.h :argumentswithinwithin785785 : :macro 234:: +: +is 22macroIn file included from ::/Users/vsc/github/yap-6.3/H/YapGFlagInfo.hnotarguments :/Users/vsc/github/yap-6.3/H/Yatom.h error101 : ::supported:is +31342 :: +not827embedding :#include errorsupported +a: 2 /Users/vsc/github/yap-6.3/H/YapFlags.h + unterminated:directive:#include #include + + errorwithinfunction-likedirective238 ^ : + +macro:embedding macro #include "GitSHA1.h"arguments 2 +withinais: invocation ^ +macro#includenoterror + : argumentssupporteddirective + +isembedding notwithina /Users/vsc/github/yap-6.3/H/Yap.hmacrosupported : +#include arguments + +/Users/vsc/github/yap-6.3/OPTYap/or.memory.c ^: ^ +/Users/vsc/github/yap-6.3/os/writeterm.c +:is +18is27 : + : + ^notnot/Users/vsc/github/yap-6.3/H/Yap.h + In file included from :/Users/vsc/github/yap-6.3/H/Yap.hsupported/Users/vsc/github/yap-6.3/H/YapFlags.hsupported785 +: +::2317812:: +:9In file included from :/Users/vsc/github/yap-6.3/H/YapHandles.herror /Users/vsc/github/yap-6.3/os/sockets.c:: note20:#include "GitSHA1.h": : +embedding +#include "YapSignals.h"macro /Users/vsc/github/yap-6.3/H/Yap.hIn file included from ^32:a +/Users/vsc/github/yap-6.3/H/Yatom.h: +'YAP_FLAG' ^ 2:827#include +1342:: : +2 defined:error/Users/vsc/github/yap-6.3/H/Yap.hdirective + :: +831error/Users/vsc/github/yap-6.3/H/YapFlags.h here: :within +embedding:238embedding 2: macro:a2a : argumentserror#include #include +: /Users/vsc/github/yap-6.3/H/Yap.his embedding: errordirect #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x831:directive#include + not:not + +2 ^supportederror +: ^: + supported +withinerrorembedding + : macroaembedding arguments#includea isdirective#include #include #include "YapSignals.h" +not +/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.cdirective + : supported ^ ^within +584 + + : +macro27within :argumentsmacro errorisarguments: expectednotis#include "GitSHA1.h" + +supportednot ^ +identifier + +supported +/Users/vsc/github/yap-6.3/H/Yap.h:827/Users/vsc/github/yap-6.3/H/Yap.h:#include "GitSHA1.h":2 +831: ^#include "YapText.h": + +2error ^:: + #endif /* YAPOR_THREADS */embeddingerror + : /Users/vsc/github/yap-6.3/H/Yap.ha ^embedding: + 831#includea: 2directive#include: + directiveerrorwithin +/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c: :embeddingmacrowithin584 :argumentsamacro27 :is#includearguments errornotdirectiveis: + expected supportednot withiIn file included from : 2#includeiveIn file included from /Users/vsc/github/yap-6.3/os/alias.c: + /Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.c :embedding :within error56directive: a: + embedding18 In file included from within#include/Users/vsc/github/yap-6.3/os/sysbits.ha +: 24macro: +: +macro /Users/vsc/github/yap-6.3/H/Yap.hIn file included from #includedirective:arguments + /Users/vsc/github/yap-6.3/H/Yap.hargumentswithin 785 :directive is781:ismacro 2 within:not: +not arguments supported macroIn file included from supported +erroris/Users/vsc/github/yap-6.3/H/YapHandles.h + :: argumentsnot20embedding : + supportedisIn file included from a + /Users/vsc/github/yap-6.3/H/Yatom.h #include not#include + : ^supporteddirective +1342 + +: + within macro arguments/Users/vsc/github/yap-6.3/H/YapFlags.h#include "Yatom.h" : +In file included from 238 ^is/Users/vsc/github/yap-6.3/os/sockets.c +: :2/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c35not::: 182supported#include "YapLFlagInfo.h#include "YapLFlagInfo.h"In file included from '}'error In file included from In file included from +/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c +: error/Users/vsc/github/yap-6.3/os/random.c:/Users/vsc/github/yap-6.3/os/iopreds.c:18: ^1: + +:: +embeddingembedding/Users/vsc/github/yap-6.3/H/Yap.h35/Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from : :: +785/Users/vsc/github/yap-6.3/H/Yap.h233aa::: In file included from 147812#include :/Users/vsc/github/yap-6.3/H/Yap.h:: + :#include +In file included from 781 : +notedirectivedirective/Users/vsc/github/yap-6.3/H/YapHandles.herror: In file included from :: +/Users/vsc/github/yap-6.3/H/YapHandles.hto20embedding: : + 20match withinaIn file included from : + /Users/vsc/github/yap-6.3/H/Yatom.h thiswithinmacroIn file included from :#include/Users/vsc/github/yap-6.3/H/Yatom.h'{' +1342:macroarguments: +directive 1342 arguments +: +is is/Users/vsc/github/yap-6.3/H/YapFlags.hwithintypedef enum { not: /Users/vsc/github/yap-6.3/H/YapFlags.h +238 ::n"In file included from + 238: +:error +/Users/vsc/github/yap-6.3/os/assets.c2: macro:: ^In file included from embedding32arguments +/Users/vsc/github/yap-6.3/H/Yap.h : + :aerroris781#include "GitSHA1.h" : In file included from #includenot +: +/Users/vsc/github/yap-6.3/os/sysbits.h + ^In file included from : +/Users/vsc/github/yap-6.3/H/YapHandles.h supported24:embeddingdirective: + +20 In file included from : +awithin/Users/vsc/github/yap-6.3/H/Yap.hIn file included from :/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yatom.hmacro +781:: : +831#include "YapText.h"arguments:1342 +In file included from 2: + ^ /Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from +::/Users/vsc/github/yap-6.3/H/YapFlags.h is20:error : +234: notIn file included from : +embedding#include "YapSignals.h"/Users/vsc/github/yap-6.3/H/Yatom.h /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +supported:a: + ^1011342 +: +#include: 3directive: + /Users/vsc/github/yap-6.3/H/YapFlags.h error#include :within: +238 unt ^:not827supportedIn file included from + 2 +::supported/Users/vsc/github/yap-6.3/os/fmem.c#include 2 +: +error:26 : : +directiveerrorIn file included from : /Users/vsc/github/yap-6.3/H/YapText.hwithinembedding:embedding 32 a: +macroa #include "YapSignals.h"In file included from #include +/Users/vsc/github/yap-6.3/H/Yap.h +arguments#include: ^ 781 +isdirectivedirective: + + notIn file included from within /Users/vsc/github/yap-6.3/H/YapHandles.hwithin supported: macro +20macro : +#include "YapLFlagInfo.h" argumentsIn file included from +arguments /Users/vsc/github/yap-6.3/H/Yatom.h ^is:is +1342 : +notnot supportedsupported/Users/vsc/github/yap-6.3/H/YapFlags.h + +/Users/vsc/github/yap-6.3/H/Yap.h::238827::22:: error#include "GitSHA1.h"error: +: ^#include "YapLFlagInfo.h"embedding +embedding + aaIn file included from ^ /Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.c#include#include +: + /Users/vsc/github/yap-6.3/H/Yap.h18 directive:: +directive +831In file included from :erminated2In file included from ^/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c: +: + /Users/vsc/github/yap-6.3/os/streams.c2function-like::error :21: macro29: : +embedding2errorinvocation In file included from : : +/Users/vsc/github/yap-6.3/H/Yap.ha : 781error: +: embedding#include/Users/vsc/github/yap-6.3/os/sockets.c/Users/vsc/github/yap-6.3/H/YapHandles.h embedding::adirective50 67 +:a: #include 2within +2#include : +: macro directive error YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,arguments: + errorembeddingdirectiveis ^: +within embedding notwithin macroa amacro supportedarguments #include +/Users/vsc/github/yap-6.3/H/YapFlags.h#include : + is231 + arguments : not9directivedirective is #include "YapText.h"supported:within + within ^note not + : macro +macromacro supported argumentsarguments +'YAP_FLAG' is isdefinednot + supportednot#include "YapHeap.h" +here + + ^supported + +#include "iopreds.h"/Users/vsc/github/yap-6.3/OPTYap/opt.init.c/Users/vsc/github#include macroIn file included from /Users/vsc/github/yap-6.3/H/Yap.h#include "YapLFlagInfo.h"withinwithin +/Users/vsc/github/yap-6.3/os/writeterm.c +:: ^27macro ^arguments: +781 macro + + : +In file included from argumentsargumentsis/Users/vsc/github/yap-6.3/H/Yap.hIn file included from :/Users/vsc/github/yap-6.3/H/YapHandles.his 781not:is : +20 not: +/Users/vsc/github/yap-6.3/H/YapHandles.hnotsupportedIn file included from : +/Users/vsc/github/yap-6.3/H/Yatom.hsupported67#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x: +:13422: + +:In file included from /Users/vsc/github/yap-6.3/H/YapFlags.h ^:error +234: : +embedding#include "GitSHA1.h"/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h#include "YapSignals.h" +: +a ^94 ^ : + +#include41 +: directiveerror : within/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.cexpected /Users/vsc/github/yap-6.3/H/Yap.h: macro:643';' 831: arguments:19after 2: +is: errornotenumerror +: : /Users/vsc/github/yap-6.3/H/Yap.hsupportedexpectedembedding: + + 827 +#include In file included from In file included from -6.3/H/Yap.hIn file included from In file included from +a ^/Users/vsc/github/yap-6.3/os/readterm.c/Users/vsc/github/yap-6.3/os/time.c:: : +/Users/vsc/github/yap-6.3/os/sig.c#include272:781: + /Users/vsc/github/yap-6.3/os/ypsocks.c: +directiveIn file included from 1:In file included from : +/Users/vsc/github/yap-6.3/H/Yap.h +18/Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from ::/Users/vsc/github/yap-6.3/os/sysbits.h: +within781 ^:In file included from : +24 +20: +In file included from : +In file included from /Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/H/YapHandles.hmacroIn file included from /Users/vsc/github/yap-6.3/H/Yap.h:: :/Users/vsc/github/yap-6.3/H/Yatom.h2024781:: +arguments: +: +1342 In file included from In file included from : +isIn file included from /Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/Yap.h :/Users/vsc/github/yap-6.3/H/YapHandles.h:not1342:781 : +20: +supported/Users/vsc/github/yap-621 +In file included from :In file included from /Users/vsc/github/yap-6.3/H/Yap.ha: +/Users/vsc/github/yap-6.3/os/streams.c2/Users/vsc/github/yap-6.3/os/random.cIn file included from ::: : /Users/vsc/github/yap-6.3/H/Yap.h291error:#include "YapText.h": +: #include827781/Users/vsc/github/yap-6.3/H/Yap.hembedding +: +: In file included from ^a785In file included from :: directive2 +/Users/vsc/github/yap-6.3/H/YapHandles.h2#include/Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c: +::20: 18 directive: +: +withinerrorerror +In file included from In file included from : /Users/vsc/github/yap-6.3/H/Yap.h: /Users/vsc/github/yap-6.3/H/Yatom.hmacro embedding::within embedding7811342 : +argumentsmacroa: + a In file included from isarguments#include/Users/vsc/github/yap-6.3/H/YapFlags.h /Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c :#include:not20 :25 directive: +directive:238In file included from supported2:/Users/vsc/github/yap-6.3/H/Yatom.h + +2: +identifier: 13/yap-6.3/OPTYap/tab.tries.cmacro : +In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h booleanFlag, "true", NULL),In file included from supported::/Users/vsc/github/yap-6.3/H/Yatom.h + +arguments:6722 /Users/vsc/github/yap-6.3/os/writeterm.c ^:is13422: +: +:: 27 ; 2not: +error #include "YapText.h" +:/Users/vsc/github/yap-6.3/H/Yap.h: /Users/vsc/github/yap-6.3/H/YapFlags.h +:embedding:supported ^ 238 +785errora::: + 22embedding#include:: + a errorerror directive: #include "YapText.h"#include: + +embeddingwithin ^embedding In file included from +macro directivea/Users/vsc/github/yap-6.3/OPTYap/or.thread_engine.ca :arguments within#include18#include : +is +directivemacroIn file included from + /Users/vsc/github/yap-6.3/H/Yap.hnot arguments : directive withinsupported781 is: + +within In file included from macro not/Users/vsc/github/yap-6.3/H/YapHandles.h macro :arguments supported20 arguments +:42#include "YapText.h".3/H/YapFlags.h withinwithin: + +::is ^ In file included from + 238macro /Users/vsc/github/yap-6.3/H/YapFlags.h: notmacro2arguments: error supported:: argumentsis +234 : +errornotis: /Users/vsc/github/yap-6.3/H/YapGFlagInfo.hembeddingsupportednot: + 101asupportedembedding#include "GitSHA1.h": + + 3#include ^a: + + #includeerrordirective +#include "YapSignals.h": #include "GitSHA1.h" +unterminateddirectivewithin + + ^ ^ +within + /Users/vsc/github/yap-6.3/H/Yap.h function-likemacro:macro 831 macroarguments:arguments 2 invocationis/Users/vsc/github/yap-6.3/H/Yap.h:is + : not831errornot: : supported2embeddingsupported +: + aerror/Users/vsc/github/yap-6.3/H/Yap.h : :#includeembedding 827 directive:a2 + : #include within error directive: macro YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, + embedding + arguments ^withina + ismacro #include not arguments directive supported +is/Users/vsc/github/yap-6.3/H/YapFlags.h + :#include "YapLFlagInfo.h"within#inc#include "YapText.h" In file included from + +error +In file included from : ^/Users/vsc/github/yap-6.3/os/sockets.cis +embeddingIn file included from /Users/vsc/github/yap-6.3/OPTYap/or.cut.c: :26 a/Users/vsc/github/yap-6.3/H/Yatom.h: +18 :not#include1342: +In file included from : + +In file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapFlags.h#endif /* YAPOR *//Users/vsc/github/yap-6.3/H/Yap.h:: :781supported233 +directive +: +781: ^: +In file included from 1within +/Users/vsc/github/yap-6.3/H/YapHandles.h: In file included from : macro/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c/Users/vsc/github/yap-6.3/H/YapHandles.h20warning ::: +: 20argumentsIn file included from 20typedef :: +/Users/vsc/github/yap-6.3/H/Yatom.h is2In file included from :requires :/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c not 1342/Users/vsc/github/yap-6.3/H/Yatom.ha:: +:error In file included from 6431342/Users/vsc/github/yap-6.3/H/YapFlags.h : : +::nameembeddingsupportedIn file includ23419 : +: +lude "YapLFlagInfo.h"not: +In file included from In file included from /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +:/Users/vsc/github/yap-6.3/os/sysbits.ha:/Users/vsc/github/yap-6.3/H/Yap.h ^ : + +:error24 101231: +781:: : +In file included from #include:3/Users/vsc/github/yap-6.3/H/Yap.hexpected/Users/vsc/github/yap-6.3/H/YapHandles.h 9: :: directive: '}'error78167 + : +note:within: : In file included from 2 unterminatedmacro/Users/vsc/github/yap-6.3/H/YapHandles.h:/Users/vsc/github/yap-6.3/H/YapFlags.h + macro: : 20 'YAP_FLAG'233errorfunction-likearguments:: 14: +embedding :In file included from definedmacro /Users/vsc/github/yap-6.3/H/Yatom.his +notea :: invocationtoherenot#include 1342 +match: +supported + + +thisdirective '{'within/Users/vsc/github/yap-6.3/H/YapFlags.h + :macro238 :arguments#include "Yatom.h"2 +:istypedef enum { ^ + +errornot ^: +supported +/Users/vsc/github/yap-6.3/OPTYap/tab.completion.cembedding: YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isat#include "YapEval.h"/Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from In file included from #include "YapLFlagInfo.h"In file included from In file included from : +/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c/Users/vsc/github/yap-6.3/os/readline.c ^ +::238 +/Users/vsc/github/yap-6.3/os/console.c2918 ^:: +:: +In file included from +35In file included from In file included from 2: +/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/os/iopreds.c::/Users/vsc/github/yap-6.3/H/Yap.hIn file included from /Users/vsc/github/yap-6.3/OPTYap/tab.tries.c: 781:/Users/vsc/github/yap-6.3/os/sysbits.h35: +error: +23:In file included from : :In file included from 24In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/Yap.h2: +::In file included from :20/Users/vsc/github/yap-6.3/os/mem.c781embedding /Users/vsc/github/yap-6.3/H/Yap.h: +: + error::/Users/vsc/github/yap-6.3/H/YapHandles.h: 26In file included from a:: +/Users/vsc/github/yap-6.3/H/Yatom.h781embedding :In file included fed from In file included from In file included from +In file included from + +/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/os/files.c#include "YapSignals.h" /Users/vsc/github/yap-6.3/os/charsio.c:::[-Wmissing-declarations]27234 + +46: +: +: + ^ ^/Users/vsc/github/yap-6.3/H/YapGFlagInfo.hIn file included from +In file included from +/Users/vsc/github/yap-6.3/os/sysbits.h:/Users/vsc/github/yap-6.3/H/Yap.h:#include "YapHeap.h":10124 +781:: + ^typedef enum {: +3In file included from +In file included from +:/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapHandles.h^~~~~~~ :: +781error20: +: : +In file included from /Users/vsc/github/yap-6.3/OPTYap/opt.preds.cunterminatedIn file included from /Users/vsc/github/yap-6.3/H/YapHandles.h: +/Users/vsc/github/yap-6.3/H/Yatom.h:26 :20:function-like1342: +2 : +In file included from :macro/Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/Yap.h ::invocation1342827error +/Users/vsc/github/yap-6.3/H/YapFlags.h: +: ::embedding2382 ::a/Us aom,In file included from #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x 21supported + +/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c +#include ^::is ^18 + + : + + not2In file included from directive :/Users/vsc/github/yap-6.3/H/Yap.h supported :within +error781#include "YapText.h" : : + +macroIn file included from embedding ^/Users/vsc/github/yap-6.3/H/YapFlags.h arguments: +a/Users/vsc/github/yap-6.3/H/YapHandles.h231 +::/Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c is9:20 :#include: +not 719In file included from note /Users/vsc/github/yap-6.3/H/Yatom.hdirective:: : 11342supportedmacrowithin: +: + In file included from 'YAP_FLAG'macroerror/Users/vsc/github/yap-6.3/H/YapFlags.h : :definedarguments234expected + : + + is /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h#include "YapLFlagInfo.h" identifier:herenot +94 + + ^:supported +41 +:^ +error: expected #include "YapHeap.h"';'/Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c + : ^after#include "YapLFlagInfo.h" + +719 + :#define YAP_ YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,#include In file included from #includerom In file included from In file included from + +/Users/vsc/github/yap-6.3/os/ypstdio.c +/Users/vsc/github/yap-6.3/os/sysbits.h ^/Users/vsc/github/yap-6.3/os/assets.c/Users/vsc/github/yap-6.3/os/chartypes.c +:::: ^4224directive +18: +32: + : +: +withinIn file included from In file included from In file included from In file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.hmacro/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/os/sysbits.h:: ::/Users/vsc/github/yap-6.3/H/YapFlags.h781arguments78124781:: + : +231isIn file included from In file included from : +:/Users/vsc/github/yap-6.3/H/YapHandles.h /Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from :not:920 /Users/vsc/github/yap-6.3/H/YapHandles.h:: +1342: In file included from 20supported20: +: +/Users/vsc/github/yap-6.3/H/Yatom.h +noteIn file included from :In file included from : : +/Users/vsc/github/yap-6.3: +In file included from In file included from 1In file included from In file included from /Users/vsc/github/yap-6.3/os/sysbits.c/Users/vsc/github/yap-6.3/os/alias.cerror warning:/Users/vsc/github/yap-6.3/H/YapHandles.h: 21:#include and /Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.cembedding:: +56:20 In file included from : +: +a/Users/vsc/github/yap-6.3/os/sysbits.hIn file included from In file included from /Users/vsc/github/yap-6.3/os/sysbits.hIn file included from FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x#include/Users/vsc/github/yap-6.3/H/Yatom.h:: ^/Users/vsc/github/yap-6.3/os/sig.c2424: +: +1342directive1: +: +: + + ^In file included from In file included from : + +/Users/vsc/github/yap-6.3/H/Yap.h /Users/vsc/github/yap-6.3/H/Yap.h:In file included from within:781/Users/vsc/github/yap-6.3/H/YapFlags.h /Users/vsc/github/yap-6.3/os/sysbits.h781: +macro:: +:/Users/vsc/github/yap-6.3/H/YapHandles.h 238/Users/vsc/github/yap-6.3/H/YapHandles.h24::arguments:67: +2 :67In file included from is:2:/Users/v/Users/vsc/github/yap-6.3/os/format.c1: +: In file included from :67:In file included from 21macro237 :/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/os/random.cerror::: + 22: :1arguments:: +781expected : +/Users/vsc/github/yap-6.3/H/Yap.herror is/H/YapFlags.h/Users/vsc/github/yap-6.3/H/Yatom.h: /Users/vsc/github/yap-6.3/H/YapHandles.h'}':embedding: +::7851342 234#include "YapLFlagInfo.h"a: +: +/Users/vsc/github/yap-6.3/H/YapFlags.h 67 +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h#include::macro:233 ^ +2 +101/Users/vsc/github/yap-6.3/H/YapFlags.h: :directive: :'YAP_FLAG'14 3 error238:within:: defined macronote2 +: errorIn file included from toarguments: : unterminated ismatch +/Users/vsc/github/yap-6.3/os/readutil.cerrorhere +:: function-likenotthis21 : +macro'{'embeddingIn file included from supported + /Users/vsc/github/yap-6.3/H/Yap.h + invocation:a +781 : +#includetypedef enum {/Users/vsc/github/yap-6.3/H/YapHandles.h + +: ^#include 67directive +: 2within#define YIn file included from #include /Users/vsc/github/yap-6.3/os/pipes.c +9 YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,:/Users/vsc/github/yap-6.3/H/Yatom.h +: ^ error +: +29sdirective1342 : +: + errorIn file included from ^within: /Users/vsc/github/yap-6.3/H/Yap.h + 18:embeddingmacro/Users/vsc/github/yap-6.3/H/YapFlags.h781 : +:aarguments: +238In file included from :In file included from is#include/Users/vsc/github/yap-6.3/H/Yap.h2 +::/Users/vsc/github/yap-6.3/H/YapFlags.hnot781 :: + directiveerror231In file included from In file included from : : supported/Users/vsc/github/yap-6.3/H/YapHandles.h9/Users/vsc/github/yap-6.3/os/time.cwithin: +: 20:embeddingmacro: + 2 In file included from note a/Users/vsc/github/yap-6.3/H/Yatom.h: +: arguments: macro In file included from 1342is#include: + +/Users/vsc/github/yap-6.3/os/sysbits.hIn file included from 'YAP_FLAG'not /Users/vsc/github/yap-6.3/H/YapFlags.h ::defined error24directivesupported: +234: : +In file included from +within/Users/vsc//Users/vsc/github/yap-6.3/os/sockets.cenum:: In file included from #include :: + +embedding316/Users/vsc/github/yap-6.3/OPTYap/or.memory.c2error ^::: +:7 embedding:18In file included from : +errorIn file included from error: /Users/vsc/github/yap-6.3/H/Yap.h : /Users/vsc/github/yap-6.3/H/Yap.hexpected:embeddinga :781 781: +identifiera: +#include + In file included from In file included from +#include/Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/YapHandles.h :: booleanFlag, "true", NULL),directivedirective20 +20 + : +: + ^within#endifIn file included from +In file included from + /Users/vsc/github/yap-6.3/H/Yatom.h ^ ;/Users/vsc/github/yap-6.3/H/Yatom.h: + +macro1342within: : + arguments1342In file included from macro : +/Users/vsc/github/yap-6.3/H/YapFlags.his : arguments234not : +/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/os/sockets.cis /Users/vsc/github/yap-6.3/HIn file included from ers/vsc/github/yap-6.3/H/YapFlags.h +/Users/vsc/github/yap-6.3/H/YapHandles.h2 generated. +/Users/vsc/github/yap-6.3/OPTYap/or.scheduler.c ^ :::: +238 1820:error: +2not: : +In file included from : In file included from /Users/vsc/github/yap-6.3/H/Yap.h supported/Users/vsc/github/yap-6.3/H/Yatom.h:error +:781: embedding: +1342 In file included from : +a/Users/vsc/github/yap-6.3/H/YapHandles.h embedding:#include 20 +/Users/vsc/github/yap-6.3/H/YapFlags.ha: + :#include "GitSHA1.h"In file included from 238 +directive#include: ^ +2within/Users/vsc/github/yap-6.3/H/Yatom.h + : :directive macro1342 error: +withinarguments: /Users/vsc/github/yap-6.3/H/YapFlags.hmacrois/Users/vsc/github/yap-6.3/H/Yap.h: embedding 233: argumentsnot831: a 1:is :supported2#include + +warning:not : directiveerrortypedefsupported : +withinembeddingrequires macroaa arguments#includename +directiveis + [-Wmissing-declarations] not +within supportedmacro + arguments is typedef enum {not + ^~~~~~~sup #include "Yatom.h" +github/yap-6.3/H/Yap.h#include "YapLFlagInfo.h" /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h supported +sc/github/yap-6.3/H/Yap.hhere +:not + ^: + 101 ^ +supported781: + +: +3:/Users/vsc/github/yap-6.3/H/YapHandles.h :error67: :2unterminated#include "GitSHA1.h": + + ^errorfunction-like +: /Users/vsc/github/yap-6.3/OPTYap/opt.preds.cembeddingmacro :#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x a37 +invocation :/Users/vsc/github/yap-6.3/H/Yap.h +#include ^2: + +:#include "YapLFlagInfo.h" 831 +directiveerror: ^ 2: +within:embedding macroerrora : /Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.cargumentsembedding#include: +a is337 directive : YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,#includenot17 + :withindirective ^ supported + + +errormacro : withinexpectedarguments + macro is /Users/vsc/github/yap-6.3/H/YapFlags.h#include identifier :arguments + +not231 ^ :is +supported9 +:not notesupported#endif /* SBA */: + +macro /Users/vsc/github/yap-6.3/OPTYap/tab.completion.c#include "YapText.h" embedding2:: +aa:22 : ^#include aerror2In file included from + +#include:: +directive/Users/vsc/github/yap-6.3/os/sysbits.c#includeembeddingerror: + : a 21embeddingdirective withindirective : + a#includewithinmacro +withinIn file included from + /Users/vsc/github/yap-6.3/os/sysbits.h macro#includearguments:directivemacro 24/Users/vsc/github/yap-6.3/os/writeterm.c withindirectivearguments arguments macro is within/YapGFlagInfo.his: is argumentsnot macro notis316argumentssupportednot +:supportednotissupported +7In file included from +:supportednot /Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c + error:supported#include : 18 + +expected: + ^ +In file included from '}'#include "tab.macros.h"/Users/vsc/github/yap-6.3/H/Yap.h +#include +: +781 ^ ^: + +/Users/vsc/github/yap-6.3/H/YapFlags.h +In file included from #include "tab.macros.h":/Users/vsc/github/yap-6.3/H/YapHandles.h +233:: ^2014 +: +:make[2]: +portedIn file included from In file included from In file included from ^ +/Users/vsc/github/yap-6.3/os/charsio.c/Users/vsc/github/yap-6.3/os/fmem.c +:/Users/vsc/github/yap-6.3/os/sig.c:46:26: +1: +In file included from : +In file included from /Users/vsc/github/yap-6.3/H/Yap.h*** [OPTYap/CMakeFiles/libOPTYap.dir/or.thread_engine.c.o] Error 1#include "YapText.h"In file included from /Users/vsc/github/yap-6.3/H/YapText.h: +/Users/vsc/github/yap-6.3/os/sysbits.h:781 ^:32: + + +24: +/Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.cIn file included from : +::/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.h67337::::785781217:: +::2/Users/vsc/github/yap-6.3/H/YapHandles.h ::error67 error: :error: 2: embeddingexpected:embedding amake[2]: '}'errora*** Waiting for unfinished jobs.... +: /Users/vsc/github/yap-6.3/os/streams.c +#includeembedding:#include /Users/vsc/github/yap-6.3/H/YapFlags.h +directive32: +a:233: :2directive#include14within:: 781 wi: +In file included from :/Users/vsc/github/yap-6.3/OPTYap/tab.tries.cIn file included from In file included from In file included from /Users/vsc/github/yap-6.3/os/ypsocks.c/Users/vsc/github/yap-6.3/H/YapHandles.h:28::/Users/vsc/github/yap-6.3/os/alias.c/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c67197:::::21856In file included from : +:: +In file included from supported/Users/vsc/github/yap-6.3/H/Yatom.hIn file included from /Users/vsc/github/yap-6.3/H/Yap.h#include "YapLFlagInfo.h" :/Users/vsc/github/yap-6.3/os/sysbits.h: +note:781 +error134224: +: : +: +In file included from ^: In file included from to/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapHandles.h +embedding::#include "Yatom.h"/Users/vsc/github/yap-6.3/H/YapFlags.h 20 +match785: +: ^a:In file included from 234 +2this#include/Users/vsc/github/yap-6.3/H/Yatom.h:: + + : /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h'{'errordirective: +: 1342/Users/vsc/github/yap-6.3/OPTYap/opt.init.c94 : +embedding::within In file included from 22 41a/AP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x 238#include "YapLFlagInfo.h" +: + +:macromacro 1012 ^ :directive: +3arguments 1342 :within1 error : +is warningmacroerror: and : notargumentsunterminated9 /Users/vsc/github/yap-6.3/H/YapFlags.h errorsupportedis +embeddings + generated. + notfunction-like amacrosupported +note#includeinvocation: + + todirective matchwithin #include this +macro ^ '{' +arguments + is not supported +typedef enum {#include "YapLFlagInfo.h" YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, + + + ^ ^ ^ + + +/Users/vsc/github/yap-6.3/H/YapFlags.h:231:9: note: macro #include "YapLFlagInfo.h"'YAP_FLAG' + ^defined + + here +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x +In file included from ^/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c +:18: +In file included from /Users/vsc/github/yap-6.3/H/Yap.h:781: +/Users/vsc/github/yap-6.3/OPTYap/or.memory.cIn file included from :/Users/vsc/github/yap-6.3/H/YapHandles.h270::2050: +:In file ierror/Users/vsc/github/yap-6.3/os/assets.c: +thin22 :: typedef enum {::/Users/vsc/github/yap-6.3/H/Yap.h32embedding not +:: + error ^ a: errorIn file included from supported: embedding/Users/vsc/github/yap-6.3/os/sysbits.h +#include : +embedding 18 24adirectivemacro: +a : +/Users/vsc/github/yap-6.3/H/Yap.h #includewithinargumentsIn file included from :#include + /Users/vsc/github/yap-6.3/os/sysbits.h#include "YapSignals.h" +785macrois: : + directive2directive ^ 24 arguments +:within: + within In file included from /Users/vsc/github/yap-6.3/H/Yap.h is errormacro macro:/Users/vsc/github/yap-6.3/os/console.cnot : :785arguments 35arguments:embedding: + supported 2In file included from +is:is /Users/vsc/github/yap-6.3/os/sysbits.h aerror:not 24: not#includeembedding: +supported #include In file included from /Users/vsc/github/yap-6.3/H/Yap.hdirective +supported/Users/vsc/github/yap-6.3/H/Yap.h: +a: ^ +827 + 781Users/vsc/github/yap-6.3/H/YapFlags.h:: +within#include2/Users/vsc/gi/Users/vsc/github/yap-6.3/os/streams.c:#include "YapLFlagInfo.h" In file included from : : +error34macro : ^/Users/vsc/github/yap-6.3/os/readterm.c2error: : +: : embeddingarguments27embedding error : +: aisIn file included from embedding /Users/vsc/github/yap-6.3/H/Yap.h #include :nota781 : + directivesupported#include +arguments + + /Users/vsc/github/yap-6.3/H/YapHandles.h withinis:directive ^67 macro :within + notarguments2macro : supportedis arguments +#include "YapSignals.h" error +notis: ^supportedembedding + +not asupported +#include/Users/vsc/github/yap-6.3/OPTYap/or.cut.c +: 338#include "GitSHA1.h"directive: + 19 ^within#include "YapHeap.h": + + macro ^error +: argumentsexpected is/Users/vsc/github/yap-6.3/H/Yap.hidentifier/Users/vsc/github/yap-6.3/os/streams.c/Users/vsc/github/yap-6.3/H/Yap.h +:::#include "YapLFlagInfo.h"not82735831 + :::supported2 ^22 + +::: #endif /* YAPOR */errorerrorerror +: : : ^embeddingembedding +embedding #include aa +a ^ #incluIn file included from /Users/vsc/github/yap-6.3/OPTYap/or.cut.c +:In file included from ncluded from macro/Users/vsc/github/yap-6.3/os/fmem.c238::error 2/Users/vsc/github/yap-6.3/H/Yatom.h: 26/Users/vsc/github/yap-6.3/os/format.c:arguments:: +:1342 237: +iserrorIn file included from expected: +: /Users/vsc/github/yap-6.3/H/YapText.hIn file included from In file included from not: /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapFlags.h32 identifier::: + +embeddingsupported234781 +: +: +a/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h/Users/vsc/github/yap-6.3/H/YapHandles.h :::#include7859467 +::: 2412directive::: within#include "YapSignals.h"errorerrorerror + : : : macro ^embeddingembeddingexpected + #endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */ argumentsa a + ';'is ^ #include + #includeafter not + +directive +supporteddirectiveenum + +withinwithin macromacro /Users/vsc/github/yap-6.3/OPTYap/or.memo arguments +::make[2]: 785 +is338 arguments:*** [OPTYap/CMakeFiles/libOPTYap.dir/or.scheduler.c.o] Error 1not :2 +is19 : :supported not + errorerrorsupported: : +embeddingexpected#include "tab.rational.h" +a'}' ^ +#include + directive#include "YapSignals.h"#include + + + /Users/vsc/github/yap-6.3/H/YapFlags.h ^within ^: + +233macro: 14arguments781:/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c : + :isIn file included from note208 /Users/vsc/github/yap-6.3/H/YapHandles.h: :not:to2 20 :supported: +match +In file included from error/Users/vsc/github/yap-6.3/H/Yatom.hthis: : /Users/vsc/github/yap-6.3/H/Yap.hembedding1342'{': : + +827a: 2#include#include "YapSignals.h":/Users/vsc/github/yap-6.3/H/YapFlags.h + +In file included from typedef enum {: + ^238error/Users/vsc/github/yap-6.3/os/sockets.c +:: directive ^:2 embedding26within: : + +aIn file included from macro /Users/vsc/github/yap-6.3/H/Yap.herror #include:: arguments 781 directive: +isembedding +In file included from /Users/vsc/git#include "tab.macros.h":macro : + a error ^directive234 +: : +arguments +expected#include/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h : +withinis101 ';' :directivemacronot 3 within/Users/vsc/github/yap-6.3/OPTYap/opt.preds.cafter :supported: +arguments +39 macroenum:is error +2 arguments: :not unterminated is +errorsupported#include "YapEval.h" : + +function-likenotembedding ^ +macrosupporteda +#includeinvocation +/Users/vsc/github/yap-6.3/os/writeterm.c + :#include "YapSignals.h"directive29 + : ^within2#include + booleanFlag, "true", NULL), +:macro + ^ + ^errorarguments +: ;embeddingis + anot #includesupported + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, + +directive ^ +within/Users/vsc/github/yap-6.3/H/Yap.h In file included from :#include "iopreds.h"macro/Users/vsc/github/yap-6.3/OPTYap/or.copy_engine.c827 + :: ^arguments182 +: + /Users/vsc/github/yap-6.3/H/YapFlags.h:I#includeIn file included from booleanFlag, "true", NULL),In file included from In file included from In file included from In file included from /Users/vsc/github/yap-6.3/os/pipes.c +/Users/vsc/github/yap-6.3/os/files.cdirective:/Users/vsc/github/yap-6.3/os/iopreds.c/Users/vsc/github/yap-6.3/os/ypstdio.c29 +:: ^ 3518: +#include "YapLFlagInfo.h": + +: +In file included from withinIn file included from /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.h + ; :/Users/vsc/github/yap-6.3/H/Yap.h: +781/Users/vsc/github/yap-6.3/H/Yap.h785: +: ^macro:781/Users/vsc/github/yap-6.3/H/YapHandles.h + : +::arguments2/Users/vsc/github/yap-6.3/H/YapHandles.h67 :827::is: 267 2error::not: : 2 embeddingerrorsupportederror :: : a +In file included from embedding embeddingerror/Users/vsc/github/yap-6.3/OPTYap/or.sba_engine.c#include : : aaembedding18 directive : + +#includea#includeIn file included from + #include "GitSHA1. notwithin/Users/vsc/github/yap-6.3/H/Yap.hIn file included from 'YAP_FLAG' : macrosupporteddefined827 /Users/vsc/github/yap-6.3/os/format.c +arguments +:: 2237hereis:: + + not/Users/vsc/github/yap-6.3/H/Yap.herror :: supported785embedding +:#include "tab.tries.h" 2 +a: ^ +#includeerror : directive#include "GitSHA1.h" +embedding +not ^ withina +supported #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + macro +#include ^ arguments +directive +is/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c :#include notwithin222 + :/Users/vsc/github/yap-6.3/H/Yap.hmacrosupported2 ^ : +:arguments +/Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.c831 ::erroris2352: ::embeddingnot23 :errorasupported : #include "GitSHA1.h" +error embedding +: #include ^expected +a + + directiveidentifier#include + withindirective#include "YapSignals.h" +/Users/vsc/github/yap-6.3/H/Yap.h +macro : ^831withinarguments +: 2macrois: #endif /* YAPOR_COW */ arguments +noterror ^ : i: is n file included from In file included from 2#include#includeerror/Users/vsc/github/yap-6.3/H/Yap.h : : : /Users/vsc/github/yap-6.3/os/chartypes.c notembeddingdirectiveerror:directive : + +supportedaembedding: + withinry.ca#include within27 : : +macromacrodirective270In file included from +:arguments/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/readterm.carguments#include "YapHeap.h" : 50 ::isis24 +within 27 ^errornot : + +: +In file included from notmacro: /Users/vsc/github/yap-6.3/H/Yap.h /Users/vsc/github/yap-6.3/H/Yap.h: supportedsupportedexpected781 +:/Users/vsc/github/yap-6.3/os/writeterm.c + arguments:785: +30 '}':/Users/vsc/github/yap-6.3/H/YapHandles.his +:: 2267not::#include "YapText.h" #include "YapSignals.h"/Users/vsc/github/yap-6.3/H/YapFlags.h +errorerrorsupported: +/Users/vsc/github/yap-6.3/H/Yap.h ^233 +: : ^: +embedding +:embedding827 14 :a:a2 : #include "GitSHA1.h"#includenote +#include: ^ +error to +directive: directive +embeddingmatch withiwithinIn file included from /Users/vsc/github/yap-6.3/H/Yap.hhub/yap-6.3/H/YapHandles.hIn file included from s /Users/vsc/github/yap-6.3/os/mem.c::macro /Users/vsc/github/yap-6.3/OPTYap/or.cut.c20781 ::: +2618arguments: +: + : +In file included from In file included from isIn file included from In file included from /Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/Yap.h :/Users/vsc/github/yap-6.3/os/sysbits.h::notsupported20: 1342: +24 +supportedIn file included from : +: + +In file included from In file included from /Users/vsc/github/yap-6.3/H/Yatom.hIn file included from /Users/vsc/github/yap-6.3/H/YapFlags.h:/Users/vsc/github/yap-6.3/H/Yap.h:1342:234: +781/Users/vsc/github/yap-6.3/os/charsio.c: +: +/Users/vsc/github/yap-6.3/H/YapFlags.h:/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h#include "tab.tries.h":/Users/vsc/github/yap-6.3/H/YapHandles.h46 +::233: +94 ^#include "YapSignals.h"::/Users/vsc/github/yap-6.3/H/Yap.h167 +41 +::: ^:785 2 : +:warning2error : :: error typedefde#include a/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c781 +/Users/vsc/github/yap-6.3/H/Yap.hembedding/Users/vsc/github/yap-6.3/os/random.c +: + : ::In file included from 231 ^directive8272 +a /Users/vsc/github/yap-6.3/H/YapHandles.h:::within :2 #include22macro :: 20: : +directivearguments In file included from +error error: erroris/Users/vsc/github/yap-6.3/H/Yatom.h : : withinembedding: embedding1342not embedding: + a /Users/vsc/github/yap-6.3/H/YapFlags.hamacro asupported : #include +#includearguments#include +233 + : directivedirective directive1 + is: within within#include "YapText.h"within warning +not macro ^ : +macrosupportedtypedefarguments + arguments requiresis /Users/vsc/github/yap-6.3/os/streams.cis#includenota: + 36 notnamesupported:directive#include "YapText.h" + + +2 supported ^within: +[-Wmissing-declarations] + +errormacro: #include "tab.tries.h"embeddingarguments + ^#include "GitSHA1.h"ais + + typedef enum { ^#includenot + + + ^~~~~~~ supportednh"/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/Yap.hdirective ::: +macro231 +831831: within: ^9arguments:2 + 2: :is: macro error notenoterror: : arguments: embedding macrosupportedembedding /Users/vsc/github/yap-6.3/H/Yap.h + isa:a'YAP_FLAG' 831 not:#include#includedefined 2 supported +directive:directive#include "YapText.h" + + + + here ^withinerror + + within: macro embedding#include "GitSHA1.h"macroarguments + a/Users/vsc/github/yap-6.3/os/writeterm.c ^argumentsis +: #include31isnot : directive2notsupported +:/Users/vsc/github/yap-6.3/H/Yap.h + supported#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) xerrorwithin +: +: 831 ^embeddingmacro +: 2aarguments#include "YapText.h": + #includeis ^#include "YapText.h" +error +not + : ^directiveembedding +supported /Users/vsc/github/yap-6.3/OPTYap/tab.completion.c +withina: 465macro#include: 21 arguments:directive +#include "YapText.h"iserror + In file iwithin: In file included from ^ notnot expected +/Users/vsc/github/yap-6.3/os/alias.c +macro directive : argumentsidentifiersupportedwithinsupported56 + + : + +macrois /Users/vsc/github/yap-6.3/os/sysbits.hargumentsnot: 25issupported: #include "YapText.h" +2not +#include "Yatom.h": ^ + #endif /* TABLING */ +supported ^ +error + +: In file included from ^#include "YapText.h"embedding/Users/vsc/github/yap-6.3/os/assets.c + + : ^a32 +/Users/vsc/github/yap-6.3/os/writeterm.c:#include 32 : +: +#include/Users/vsc/github/yap-6.3/os/sysbits.h2 ^ +:: + 25/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c :directive:error2 465: :within:embedding 21 macroerror:aIn file included from : /Users/vsc/github/yap-6.3/os/sig.c embeddingargumentserror:#include 1 +: is: + aexpected/Users/vsc/github/yap-6.3/os/sysbits.h directive: not#include 25'}' +within +:supported 2directive +macro/Users/vsc/github/yap-6.3/H/YapFlags.h: : withinarguments233error :: macrois14embedding : arguments#inc/Users/vsc/github/yap-6.3/H/Yap.h expected + : :note : requires827';'to : embeddinga2aftermatch : + a namethis +/Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.cerror #include: enum[-Wmissing-declarations]embedding + + + '{' aIn file included from directive + #includewithin/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c :directivemacro23 + : +typedef enum { argumentstypedef enum { +In file included from within + ^~~~~~~/Users/vsc/github/yap-6.3/H/Yap.h ^ +: +macrois781 arguments: + booleanFlag, "true", NULL),not In file included from + is/Users/vsc/github/yap-6.3/H/YapHandles.hsupported ^ : + +not20 ; : + +supportedIn file included from +/Users/vsc/github/yap-6.3/H/Yatom.h:1342: +#include In file included from +/Users/vsc/github/yap-6.3/H/YapFlags.h ^: +#include "GitSHA1.h"234 +: + ^/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +:101In file included from :/Users/vsc/github/yap-6.3/os/sockets.c3::26/Us +In file included from within 42 /Users/vsc/github/yap-6.3/os/sysbits.c#include: +:macro +21 In file included from arguments: +directive /Users/vsc/github/yap-6.3/H/Yap.h is/Users/vsc/github/yap-6.3/os/sysbits.h:within: 781error25: + not:macro/Users/vsc/github/yap-6.3/H/YapHandles.h: : 2arguments67supportedembedding: : + 2isaerror : : not#include embedding #include "YapLFlagInfo.h" errordirective +supporteda: + +#include "YapSignals.h" thisembedding +#include ^ ^ + +within a + '{'directivemacro#include#include "YapHeap.h" + + +within arguments ^ directive +macro is within typedef enum {arguments not + macro ^is supported + /Users/vsc/github/yap-6.3/OPTYap/opt.init.carguments +not: 24is/Users/vsc/github/yap-6.3/H/Yap.hsupported: : +2not827: : supported2error +:#include "YapSignals.h": +#include "YapHeap.h"errorembedding +: ^ ^embedding +a + #include a#include + +/Users/vsc/github/yap-6.3/os/sysbits.h#include ^ :directive +directive26 +:within 2 within:macro macroer +ncluded from In file included from /Users/vsc/github/yap-6.3/os/fmem.c:alude "YapHeap.h"arguments/Users/vsc/github/yap-6.3/os/pipes.cnot2 : +29 is#include: ^ : +supported + +not +/Users/vsc/github/yap-6.3/H/Yap.h error :directivesupported: 785 +:embeddingwithin2 :/Users/vsc/github/yap-6.3/os/sysbits.hamacro #include "yapio.h" : +#includeerrorarguments26 ^: #include "GitSHA1.h" + +embedding + : directive ^is2a + : within/Users/vsc/github/yap-6.3/os/writeterm.c#includenot : errormacrodirective33: supported : + +embeddingarguments/Users/vsc/github/yap-6.3/H/Yap.h 2 : :within831ais :macroerror#include2not: +#include "YapHeap.h" embedding + : ^directive supportedaarguments + +error within: #includeis embedding +/Users/vsc/github/yap-6.3/os/sysbits.h not :macro directivea 26 supportedarguments:#include +2 within +#includeis: ^ macrodirective +error not +: arguments embedding supportedwithin is#include "YapSignals.h" +a + macronot ^#include + +argumentssupported +#inc /Users/vsc/github/yap-6.3/os/ypsocks.c1:ers/vsc/github/yap-6.3/H/Yap.hthub/yap-6.3/H/YapHandles.his: warning:235 and ::18not831: +67 239:/Users/vsc/github/yap-6.3/os/sysbits.h:2supported: error : +s 25 generated. +errorerror:error: : 2: embeddingexpected:unterminated +a'}'error +#include "YapHeap.h"function-like: #include + embedding + ^macro +/Users/vsc/github/yap-6.3/H/YapFlags.ha directive: invocation 233#include +within: + 78114macro/Users/vsc/github/yap-6.3/os/sysbits.h : :directive: +26 arguments :within noteIn file included from 2: is:/Users/vsc/github/yap-6.3/H/YapHandles.hmacro to : noterror20arguments match: +: supported In file included from +embedding/Users/vsc/github/yap-6.3/H/Yatom.hthisis YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,: +1342'{'a ^: + + +notIn file included from #include #include /Users/vsc/github/yap-6.3/H/YapFlags.h + +supported: ^ +234 +typedef enum {directive: + + /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h/Users/vsc/github/yap-6.3/H/YapFladirectiveIn file included from : +In file included from In file included from ror/Users/vsc/github/yap-6.3/H/Yap.h /Users/vsc/github/yap-6.3/os/time.cIn file included from /Users/vsc/github/yap-6.3/os/readutil.c:within:2/Users/vsc/github/yap-6.3/H/Yap.h:: /Users/vsc/github/yap-6.3/os/chartypes.c:21 :embedding: +macro 42: +781 aIn file included from : +arguments/Users/vsc/github/yap-6.3/os/sysbits.harguments/Users/vsc/github/yap-6.3/H/Yap.h In file included from : /Users/vsc/github/yap-6.3/H/Yap.h#includeis/Users/vsc/github/yap-6.3/H/YapHandles.h785is +:In file included from :: 827 220notnotdirective::: + 2 In file included from :supported1errorwithin +In file included from warning error: macro: isembedding embedding/Users/vsc/github/yap-6.3/os/readline.c and arguments :9aanot#include "Yatom.h" is 29 error#include#includesupporteds +: + generated. + ^ +In file included from lude "YapText.h"directive +/Users/vsc/github/yap-6.3/H/Yap.h +#include : +781within + ^: + ^ +macro/Users/vsc/github/yap-6.:/Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from In file included from #include:27In file included from ::22 +67: /Users/vsc/github/yap-6.3/os/console.c:: /Users/vsc/github/yap-6.3/os/sysbits.h ^:error2 directive: +35error: :: +: 27embeddingIn file included from embedding :within/Users/vsc/github/yap-6.3/os/sysbits.herror 2:a : 24 :macroa: +embedding#include /Users/vsc/github/yap-6.3/H/Yap.h arguments#include:error directive: is785 a +embedding directive not +: a within#include supportedwithin2 +#include + : +macromacro directivedirectiveerrorargumentsarguments : within withinis#include is macro + macro notnot within arguments ^argumentssupportedsupported + + + ismacrois notargumentsnotIn file included from /Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.cissupportedsupported:#include "YapText.h"#include "format.h" +18 + +: +not + ^In file included from ^ +supported/Users/vsc/github/yap-6.3/H/Yap.h + +:781#include "Yatom.h": +#include +/#include "YapHeap.h":macrogs.hIn file included from a +827: + ^ : +:/Users/vsc/github/yap-6.3/OPTYap/or.memory.carguments231 2/Users/vsc/github/yap-6.3/H/Yap.h ::::#include18is9: +785 : In file included from :directivenot /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/os/sysbits.h +error2: : 781 notewithinembeddingsupported: :: + +macro 26In file included from macroa :/Users/vsc/github/yap-6.3/H/YapHandles.h 'YAP_FLAG':942#includearguments :20:#include "Yatom.h"defined : +41directiveiserror:In file included from + +: + ^/Users/vsc/github/yap-6.3/H/Yatom.hembedding +here : + 1342errorawithin: +: : In file included from #include/Users/vsc/github/yap-6.3/os/random.cmacroexpected24/Users/vsc/github/yap-6.3/H/YapFlags.h +:: + : 3/Users/vsc/github/yap-6.3/H/Yap.h234argumentsdirective::: +';'785 2 :is/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h within: after: not2 #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x +94error + :macro :: ^ supported41enum +arguments +embeddingerr /Users/vsc/github/yap-6.3/os/files.c/Users/vsc/github/yap-6.3/os/iopreds.c#include "GitSHA1.h":3/os/streams.cdirectivemake[2]: : +:241 +: ^36: :27237 +2::within:2*** [OPTYap/CMakeFiles/libOPTYap.dir/or.sba_engine.c.o] Error 1 : +macroerrordirectiveerror : : error embeddingembedding: argumentswithin a/Users/vsc/github/yap-6.3/H/Yap.hembedding :amacro aisarguments#include +#includenot#include831 is : + +supported directivenot + make[2]: directivesupporteddirectivewithin +*** [OPTYap/CMakeFiles/libOPTYap.dir/or.copy_engine.c.o] Error 1 +macrowithinwithin arguments argumentsmacro#include "GitSHA1.h" ismacro +arguments#include "YapText.h" ^ + +notargumentsis ^ /Users/vsc/github/yap-6.3/os/mem.c +issupported +not : +not 26supported /Users/vsc/github/yap-6.3/H/Yap.h: + +supported/Users/vsc/github/yap-6.3/os/sysbits.hIn file included from +::/Users/vsc/github/yap-6.3/os/sysbits.h83127:::24/Users/vsc/github/yap-6.3/os/writeterm.c22: +:#include "YapSignals.h":/Users/vsc/github/yap-6.3/H/Yap.In file included from In file included from embedding:/Users/vsc/github/yap-6.3/OPTYap/opt.preds.cUsers/vsc/github/yap-6.3/os/fmem.c /Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/os/ypstdio.c: :20:not:: +error 181248a: : +supported :In file included from + +/Users/vsc/github/yap-6.3/H/Yap.hembedding30/Users/vsc/github/yap-6.3/H/Yatom.h#include: ^ :: 1342 +785: +directiveerrora:#include "GitSHA1.h": In file included from 2 + /Users/vsc/github/yap-6.3/H/YapFlags.h: ^expected#include: + +or 234 errordirective: +identifier: : +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +embedding :embedding within/Users/vsc/github/yap-6.3/H/Yap.ha 94 :macro:831a 41:#includearguments: #include2isdirective error +:: directive not#endif /* YAPOR || TABLING */ +errorwithinexpected + : supported ^embeddingmacro within + +';' a macro after #include +arguments directiveenumis + + /Users/vsc/github/yap-6.3/OPTYap/opt.preds.cnot#include "YapSignals.h"within: + 1248#include "YapText.h" 2 + +supported/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c ^ +not:is + ^ :supported +errornot +18: : +#include supportedembeddingIn file included from + +/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/H/Yap.h ^ :: +a27781#include "YapText.h" :: + +#include2In file included from ^ :#include "YapText.h"/Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/OPTYap/opt.init.c +directive :: + +2620 ^: +:within/Users/vsc/github/yap-6.3/os/sysbits.h +In file included from /Users/vsc/github/yap-6.3/H/Yap.h : ^2macro27::/Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/os/sysbits.h827 ::error +:arguments2: 21342: :embedding: + is In file included from /Users/vsc/github/yap-6.3/os/sysbits.haerror/Users/vsc/github/yap-6.3/H/YapFlags.h: : :a28#include234embedding:not: +: + 2 +aIn file included from : #includesupported /Users/vsc/github/yap-6.3/os/sysbits.h +#includedirectiveerror : +: within 24directive embeddinghdirective: +macro + /Users/v#include "YapEval.h"#include "YapEval.h" + booleanFlag, "true", NULL),35 +supportederror + +: ^ ^ + + ^: +embedding +within2 ; : +macroa error/Users/vsc/github/yap-6.3/os/streams.c/Users/vsc/github/yap-6.3/os/iopreds.c#include: arguments +::embedding 38 directive:37is#include "YapSignals.h" 2: within:2not + : macro ^macroerror supported +In file included from error: : +/Users/vsc/github/yap-6.3/OPTYap/or.cow_engine.cargumentsembeddingembeddingarguments : a18aisis: + In file included from #includenot/Users/vsc/github/yap-6.3/H/Yap.h#includenot :#include "YapSignals.h" +supported781 + + +directive: + supported In file included from directive +within/Users/vsc/github/yap-6.3/H/Yap.h ^ /Users/vsc/github/yap-6.3/H/YapHandles.h:within : + macro#include "YapText.h"20827 macro +:arguments#include "Yatom.h" : +2 ^ +In file included from : +/Users/vsc/github/yap-6.3/H/Yatom.h ^arguments is + :error is1342: not : +embedisIn file included from +:/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h/Users/vsc/github/yap-6.3/H/Yatom.h ^/Users/vsc/github/yap-6.3/os/format.c/Users/vsc/github/yap-6.3/os/readline.c +:not785:29: ::941342: +supported2238: +:/Users/vsc/github/yap-6.3/H/Yap.h::41/Users/vsc/github/yap-6.3/H/YapFlags.h: + 2::785error:233 : :error:embedding21: error::expected: a #include "tab.tries.h" embeddingerror +warning';' /Users/vsc/github/yap-6.3/H/Yap.h: a ^ embedding: + after827 +28#include:a +2 :enum:#include + directive2errordirective :: +within embedding error withinmacro: a embedding/Users/vsc/github/yap-6.3/OPTYap/tab.tries.cmacroarguments :aargumentsis#include258 booleanFlag, "true", NULL), :directive + 2#include +isnot ^ : booleanFlag, "true", NULL),directive + + +supported ;error ^ +: sc/github/yap-6.3/H/Yap.h +embeddingwithin + : withinerrora error:#include "YapText.h" : /Users/vsc/github/yap-6.3/H/Yap.h : +macroembedding#include: ^error +argumentsembedding +827: : directive2embeddingais : within#includea not + errormacro #include supporteddirective : arguments directive +embedding within + is a withinmacro not #include macroarguments supported directive/Users/vsc/github/yap-6.3/os/pipes.c +#include "YapHeap.h" +:argumentsis +30 ^:withinnotis +2 :macrosupportednot #include +errorarguments + : supported ^embedding + +/Users/vsc/github/yap-6.3/os/random.cais : a #include "Yatom.h"4 not#include#include : + +#include "YapText.h"supported2 + + :/Users/vsc/github/yap-6.3/os/writeterm.cdirective + ^ ^error: + +: directivewithin38embedding : withinmacro2a #include "GitSHA1.h": /Users/vsc/github/yap-6.3/os/sysbits.h +macroarguments:#include ^arguments +28iserror : +directive2 : is: /Users/vsc/github/yap-6.3/os/charsio.c within:errornot notembedding: 47 macro /Users/vsc/github/yap-6.3/H/:not /Users/vsc/github/yap-6.3/os/sysbits.hIn file included from :argumentserrorsupported/Users/vsc/github/yap-6.3/OPTYap/or.cut.carguments28: ::supported2is expected +18 :is: + : In file included from noterror';'/Users/vsc/github/yap-6.3/H/Yap.hnot27 : after:embeddingsupported:supported 2781#include "YapHeap.h" +: +a + : + ^enum In file included from not +#include/Users/vsc/github/yap-6.3/H/YapHandles.herror + + :: 20supportedembeddingdirective: + +/Users/vsc/github/yap-6.3/os/iopreds.cIn file included from #include "YapSignals.h":/Users/vsc/github/yap-6.3/H/Yatom.ha +within:38 ^ :1342 +#includemacro: +2 + : /Users/vsc/github/yap-6.3/H/YapFlags.h#include "YapSignals.h"argumentsdirective: +233error is:: ^ within1embedding booleanFlag, "true", NULL), +not macro: +a ^ supported#includewarningarguments + +: + ;typedef is +/Users/vsc/github/yap-6.3/H/Yap.h directive :requiresnotwithin827 :#include "Yap/Users/vsc/github/yap-6.3/H/YapFlags.hmacro2 ;: :/Users/vsc/github/yap-6.3/H/Yap.h: +macro :typedef 233argumentserror arguments: requires1is: :is a embedding warning#include notnotname: a +typedef supportedsupported In file included from +#include/Users/vsc/github/yap-6.3/OPTYap/tab.completion.c[-Wmissing-declarations] +requires a + :directivea18 + : + nameIn file included from within#include +#include "sysbits.h"/Users/vsc/github/yap-6.3/H/Yap.h + #include "YapText.h": + +typedef enum { [-Wmissing-declarations]macrodirective781 ^ + ^ + + +: +argumentswithin^~~~~~~In file included from +/Users/vsc/github/yap-6.3/H/YapHandles.hmacrois: /Users/vsc/github/yap-6.3/os/iopreds.c20notargumentstypedef enum {:: + +In file included from supportedis39/Users/vsc/github/yap-6.3/H/Yatom.h +^~~~~~~: +:2not1342: : + supported/Users/vsc/github/yap-6.3/H/YapFlags.herror +:: 233#include "GitSHA1.h"embedding: + 1 ^a: + #include#include "tab.tries.h"warning + +: ^typedefdirective + /Users/vsc/dingaargumentsIn file included from 785supported #include "YapHeap.h" :a +/Users/vsc/github/yap-6.3/OPTYap/or.memory.ciswithin 2: #include: 18notmacro directive#include: +error In file included from #include "Yatom.h"supported + + +arguments: + /Users/vsc/github/yap-6.3/H/Yap.h ^embeddingdirectiveis: + 781 within: +anot#include In file included from + /Users/vsc/github/yap-6.3/H/YapHandles.h#includemacrosupported +/Users/vsc/github/yap-6.3/os/pipes.c + ^:: +directivearguments3120 + : +:is :2In file included from #include "GitSHA1.h" within/Users/vsc/github/yap-6.3/H/Yatom.h: +not2 ^:error: +/Users/vsc/github/yap-6.3/OPTYap/opt.init.c: 1342supported: : +embedding31 +supported /Users/vsc/github/yap-6.3/H/YapFlags.herror:a: +2 233: :/Users/vsc/github/yap-6.3/H/Yap.h#include:embedding: +1 error831 a#include "YapEval.h"directive: : +#include "Yatom.h"#includeembedding2 +awithin ^ + ^: + +a macro#includedirectiveerror +: #include /Users/vsc/github/yap-6.3/os/sysbits.h/Users/vswithin +embedding#include "YapText.h"Eval.h"/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c a +macro + ^a : + ^arguments name270 + +#include:#include "yapio.h"is +2 + [-Wmissing-declarations]: ^directivenot + /Users/vsc/github/yap-6.3/os/sysbits.h errorwithin +:supported: 29 +embedding:macro 2 /Users/vsc/github/yap-6.3/os/streams.catypedef enum {::arguments + /Users/vsc/github/yap-6.3/os/readterm.c39^~~~~~~ error:#include +: 28 +#include "GitSHA1.h":isembedding +directive 2 ^directivenot: + +a supported within +error#includewithin : + macroembedding /Users/vsc/github/yap-6.3/H/Yap.h macro directivearguments : a831#include "YapEval.h"argumentsis:within + 2#include ^not +:is + macro supported not directive +errorarguments /Users/vsc/github/yap-6.3/os/sysbits.h: withinsupported:embeddingis +29 macro :anot 2 arguments:#includesupported +iserrordirective : +notembedding#include "YapSignals.h" +withinsupporteda ^ +#include "yapio.h"macro + + #include ^arguments + + isdirective##include "tab.tries.h" /* answer_search_min_max + answer_search_sum + i...In file included from /Users/vsc/github/yap-6.3/os/sysbits.h 1within +:/Users/vsc/github/yap-6.3/os/fmem.cwithin warning ^45 : + and macro:26macro 29 : +arguments:arguments error In file included from siserror/Users/vsc/github/yap-6.3/H/YapText.his generated. + : : not32not embedding: + supported In file included from supported +a/Users/vsc/github/yap-6.3/H/Yap.h + :#include781 +: + In file included from directive/Users/vsc/github/yap-6.3/H/YapHandles.h ^ #include "Yatom.h"#include "GitSHA1.h":within + +20 + ^: + ^macro +In file included from + /Users/vsc/github/yap-6.3/H/Yatom.harguments: 1342is: +/Users/vsc/github/yap-6.3/os/format.c /Users/vsc/github/yap-6.3/os/iopreds.cIn file included from /Users/vsc/github/yap-6.3/H/Yap.h:not:/Users/vsc/github/yap-6.3/H/YapFlags.h:23940 831::supported:2: +2:2:234 : : +error error/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h: error: :embedding: #include embedding101 embedding +: a ^ 3a a +: #include : arguments/Users/vsc/github/yap-6.3/os/sysbits.hc/github/yap-6.3/os/sysbits.hembedding macro: warning::: is28 2948arguments:typedef a::not2is 22: supportedrequires#includenot +error : : adirectivesupported embedding + +errornamedirective: + embeddingawithin #include "YapHeap.h" [-Wmissing-declarations] +#includemacro within + ^ + arguments#include "YapSignals.h"a directive + + macro#include ^iswithin + + arguments notmacro directive is supportedarguments within + /Users/vsc/github/yap-6.3/os/pipes.c nottypedef enum {is: macro +32 supported^~~~~~~:not +arguments +2 :supported#include "YapText.h"is + + error ^not: + #include embeddingsupported +/Users/vsc/github/yap-6.3/H/Yap.h + ^:a +#include "YapEval.h" 827 +#include: ^ +2 + #include "yapio.h"directive: + ^within/Users/vsc/github/yap-6.3/os/writeterm.c +error /Users/vsc/github/yap-6.3/os/sysbits.h:: macro:/Users/vsc/github/yap-6.3/os/chartypes.c41embedding29 : ::argumentsa4322 : :is:#include2 : errornoterror directive/U +1 :include "YapEval.h" + warningwithinnot and 2 + : 9supportedwithin ^ macro + #include "yapio.h" error +macroerrors +: generated. +arguments ^embeddingarguments + #include "YapText.h" isa +is/Users/vsc/github/yap-6.3/os/readterm.c ^:#includenot +not + /Users/vsc/github/yap-6.3/os/random.c29 supported::directivesupported +25 ::within 2 error +macro:: embeddingargumentserror #include "YapHeap.h": ais + embedding ^#include "GitSHA1.h"#includenot + + /Users/vsc/github/yap-6.3/os/readutil.c +a supported: ^ directive + +#include 22/Users/vsc/github/yap-6.3/os/charsio.c +within:: 248directivemacro:: #include 2arguments +within: ^ error/Users/vsc/github/yap-6.3/H/Yap.hmacroerror: : : 831embeddingargumentsembedding/Users/vsc/github/yap-6.3/H/Yap.h: : 2 a:isa30: 827: : #includenoterrorgithub/yap-6.3/H/Yap.h2error : +: ::embeddingsupported expected 831directive error +a '}':: within 2 + embedding:#includemacro a/Users/vsc/github/yap-6.3/H/YapFlags.hdirectiveerror arguments +:#includrequireserror#include#include +:supported : + +aunterminated + error directivedirective: directivenamefunction-like + + withinwithinembeddingmacro#include "Yatom.h" +[-Wmissing-declarations] macro ^invocationa +In file included from 1 arguments + +#include warning/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c +is and : 18directivenot9: + error/Users/vsc/github/yap-6.3/os/sysbits.htypedef enum {withinsupported:sIn file included from +28 + generated. +/Users/vsc/github/yap-6.3/H/Yap.h^~~~~~~macro:: + 2781arguments:: + In file included from is YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,error/Users/vsc/github/yap-6.3/H/YapHandles.h +: :not#include "YapText.h" ^embedding20 + +: +supported ^aIn file included from + + /Users/vsc/github/yap-6.3/H/Yatom.h#include: +1342 : +/Users/vsc/github/yap-6.3/os/format.c/Users/vsc/github/yap-6.3/H/YapFlags.hdirectiveIn file included from ::#include /Users/vsc/github/yap-6.3/H/YapFlags.h231within240: + :: ^macro9234 +2 :: +: arYap.h : is: +errorsupported embedding: +embedding : not 831directive a:a embeddingsupported2 +:#include within +#includea +macrodirective error #includeargumentsdirectivewithin +#include "YapFlags.h" #include +: ^ + embeddingiswithin directiveadirective notmacro#include ewithin#includesupported within + +arguments ^macro macro + directivedirective + +isargumentsarguments withinnotwithin #include "tab.macros.h"ismacrosupported is + +not /Users/vsc/github/yap-6.3/os/random.c macro ^notsupported:arguments + +7 :is#include supportedarguments2 + : ^ +isnot + error#include "YapHeap.h"not: supported + embedding + ^supported + +#include "YapHeap.h"a/Users/vsc/github/yap-6.3/os/writeterm.c + : ^#include44 +/Users/vsc/github/yap-6.3/os/chartypes.c +:#include "GitSHA1.h": 2 +44directive: ^: /Users/vsc/github/yap-6.3/os/readutil.c#include "YapText.h"2error +within:: ^ : 23 +embedding macro: error 2awithinarguments: : #includeembeddingismacroerror + : In file included from 1make[2]: gumentsis warning/Users/vsc/github/yap-6.3/os/console.cmacro and within : 12*** [OPTYap/CMakeFiles/libOPTYap.dir/or.cow_engine.c.o] Error 1notargumentsis35 + error: +not s /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h generated. +supportedis/Users/vsc/github/yap-6.3/os/sysbits.hsupported +: : +not25101 ::supported23 +:: error#include "YapEval.h"error#include "YapText.h": +: +unterminated ^embedding ^make[2]: + + +#include "yapio.h"*** [OPTYap/CMakeFiles/libOPTYap.dir/or.memory.c.o] Error 1a + + function-like ^#include + +/Users/vsc/github/yap-6.3/os/sysbits.hmacro/Users/vsc/github/yap-6.3/os/charsio.c ::directiveinvocation2949/Users/vsc/github/yap-6.3/os/iopreds.c +::: 2241within:::make[2]: 2 macroerror*** [OPTYap/CMakeFiles/libOPTYap.dir/or.cut.c.o] Error 1error: : +: arguments embeddingembedding error is: aa embedding not #include#include a + + supported #include +directivedirective YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, +sers/vsc/githubnote + +/Users/vsc/github/yap-6.3/os/sysbits.h#include "yapio.h"within#include "YapHeap.h": : +macro + ^50 ^macro: +'YAP_FLAG'/Users/vsc/github/yap-6.3/os/readterm.c /Users/vsc/github/yap-6.3/os/streams.c:2 +arguments 30:: defined41:is +:/Users/vsc/github/yap-6.3/os/sysbits.herror 2:/Users/vsc/github/yap-6.3/os/pipes.c:226: here:: In file included from 33 +error ::: errorembedding/Users/vsc/github/yap-6.3/OPTYap/opt.init.c2: embedding2 :: :a 18 embeddinga: +errorerror #include: : In file included from a +embeddingembedding/Users/vsc/github/yap-6.3/H/Yap.h #include: +781a directive #include a : +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) xdirectiveIn file included from within +/Users/vsc/github/yap-6.3/H/YapHandles.hwithin +: directive 20 ^macro a: + + +within directive In file included from arguments /Users/vsc/github/yap-6.3/H/Yatom.hmacro within#include: is + 1342arguments macro: +notdirective isargumentssupportedwithin /Users/vsc/github/yap-6.3/H/Yap.h + not:In f233 1827 make[2]: :macro: warning 14macro and 2arguments: : 16arguments *** [OPTYap/CMakeFiles/libOPTYap.dir/tab.completion.c.o] Error 1 error note + iserrors : generated. +notisto: embeddingsupportednotmatch + asupportedthis + #include'{' +directive +#include "YapText.h" +within#include "YapHeap.h"#include "yapio.h" ^ +typedef enum { + +macro + ^ ^ ^ + +arguments + is not supported/Users/vsc/github/yap-6.3/os/readterm.c +:31:2:/Users/vsc/github/yap-6.3/os/sysbits.hIn file included from :/Users/vsc/github/yap-6.3/os/files.cerror45: :#include "GitSHA1.h":27embedding +2: + ^:/Users/vsc/github/yap-6.3/os/sysbits.ha +: error25#include: : +embedding2 :adirective error#includewithin: /Users/vsc/github/yap-6.3/H/Yap.h +embedding:macro 831 directivea:arguments 2 within#include: is +macro noterrordirective arguments: supported embeddingwithin +is amacronot #includeIn file included from supported arguments/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c +directive#include "YapText.h": +/yap-6.3/os/sysbits.h #include +#include : +within 45 macro ^:directivemacro directive2 + :arguments +argumentswithinwithin ^ismacroerroris +: macro embeddingargumentsnotnot/Users/vsc/github/yap-6.3/H/YapFlags.h arguments:supportedis +supported231 is: : +not/Users/vsc/github/yap-6.3/os/sysbits.h 9 :not:embedding48supported : + #include "Yatom.h"supported2notea +: +#include ^ +: error +#include ^#include macro: + + directiveembedding ^'YAP_FLAG'#include + /Users/vsc/github/yap-6.3/os/charsio.c +defineda: +within +50 ^ #include/Users/vsc/github/yap-6.3/os/sysbits.h + +:/Users/vsc/github/yap-6.3/os/iopreds.cmacro here2:directive +: 45 ile included from 831:error: /Users/vsc/github/yap-6.3/H/YapFlags.h2supported::embedding:2342 + : +a:error/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x :: error +#include101embedding: : + ^embedding#include + aa +3directive ^:#include#inotis is + errorembeddingsupportednotwithin + ^ : a +notsupportedmacro unterminated + #include +supportedarguments + + function-like #include isdirective + /Users/vsc/github/yap-6.3/os/readterm.c ^notmacro : +#include supportedwithin 32#include "YapHeap.h" invocation + +: +macro + ^2 ^ +: +arguments /Users/vsc/github/yap-6.3/os/random.c error:is#include "YapText.h"/Users/vsc/github/yap-6.3/os/sysbits.h: 10 +embedding::not ^/Users/vsc/github/yap-6.3/os/writeterm.c2 26 + a::supported: 47 +2#include:error: +2: YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,embeddingdirective:error + : a ^#include "YapText.h"embeddingwithin + + error a ^#include: /Users/vsc/github/yap-6.3/os/readline.cmacro +embedding:#include + 30 +/Users/vsc/github/yap-6.3/H/YapFlags.ha: arguments:/Users/vsc/github/yap-6.3/os/readutil.c directive 2231: directive:#include 24is + within:within error 2: macronot:embedding directive supported macroa arguments within + error#includear : 23arguments#include embedding macro: + + aIn file included from a withindirectiveis/Users/vsc/github/yap-6.3/H/Yap.harguments : 781is macronot#include within within +supported notarguments + macro/Users/vsc/github/yap-6.3/os/fmem.c supported macrois +:arguments : argumentsnot323is :57is 7supported#include "YapText.h" ::#include not2not + : + ^ error supported: +/Users/vsc/github/yap-6.3/os/pipes.c +errorsupportedexpected: + :embeddingidentifier#include 35 + +:a ^2 +:#include#include "YapText.h" #include "yapio.h" +/Users/vsc/github/yap-6.3/os/writeterm.c +error + ^:: #endif +directive/Users/vsc/github/yap-6.3/os/sysbits.h ^50 +: + ^:embedding50within/Users/vsc/github/yap-6.3/os/sysbits.h +2 :: :227macroa :: 2 argumentserror:#includeerror : /Users/vsc/github/yap-6.3/os/fmem.c +/Users/vsc/github/yap-6.3/os/sysbits.his: errorembedding:directive:: 323 45 a:embedding:7 within :nclude2 #includeerror: +: errormacroerrordirective : embedding +expected: dire +: +macroarguments +make[2]: 9 : directive argumentsisnote directive within: is not macrowithinmacro not /Users/vsc/github/yap-6.3/os/streams.c arguments :macro supported44supportedis'YAP_FLAG'*** [os/CMakeFiles/libYAPOs.dir/sockets.c.o] Error 1 :arguments + +2definednot : + is + supported errorhere +not: + embedding#include "YapText.h"#include "yapio.h"supported + + +a ^ ^ + +#include#include + + ^/Users/vsc/github/yap-6.3/os/chartypes.cdirective +: #include "YapHeap.h"45within +:make[2]: ^2macro*** Waiting for unfinished jobs.... +: + arguments#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) xerror +/Users/vsc/github/yap-6.3/os/iopreds.c/Users/vsc/github/yap-6.3/os/sysbits.h: is/Users/vsc/github/yap-6.3/os/readline.c ^::: +45 50embedding:notguments31 :2asupported:2 2 + :::#include is +error error/Users/vsc/github/yap-6.3/OPTYap/opt.init.cdirective: not: #include :embeddingwithin +embedding301 ^ /Users/vsc/github/yap-6.3/OPTYap/tab.tries.c:macro +a supported30:a /Users/vsc/github/yap-6.3/os/streams.c : not:embedding #includeargumentssupported#include + +47 + is:directivedirective 2a not: 1898within #include:within supported #include "YapText.h"error21 + +macro: : directive ^embeddingerror + +arguments +within: a expected ^is + #include +macronot + arguments#include "YapText.h"supportedidentifier directive + +is + ^ within +In file included from not/Users/vsc/github/yap-6.3/os/time.cmacro : #include "Yatom.h"supported2arguments + +: +/Users/vsc/github/yap-6.3/os/sysbits.h ^/Users/vsc/github/yap-6.3/os/sysbits.h:is +:#endif /* TABLING */27 25 +:not: ^2#include /Users/vsc/github/yap-6.3/os/readline.c2:supported:: + + 32 +error ^:error: +2: embedding:embedding aerrora : #include/Users/vsc/github/yap-6.3/OPTYap/tab.tries.c#include#include +/Users/vsc/github/yap-6.3/os/sysbits.h: + +1898: ^directive: 5721 + directive::not within2 within :errorsupportedmacro : + expectedmacro/Users/vsc/gith withinisctive#include "Yatom.h"embedding'}'#include + +notmacro +within ^ a ^ +argumentsmacro +supported /Users/vsc/github/yap-6.3/H/YapFlags.h +#includearguments:is + 233 is:notdirective 14 /Users/vsc/github/yap-6.3/os/readterm.cnot:supported :/Users/vsc/github/yap-6.3/os/sysbits.h#include +33supported: +: +60 ^within2: + :2macro : argumentserror #include "Yatom.h" argumentserror#include +is : ^is +: +embedding/Users/vsc/github/yap-6.3/os/random.cembedding ^ :notnot + 26a a :supported 2/Users/vsc/github/yap-6.3/os/format.c#include +:#includesupported + + +:error 241directive: directive/Users/vsc/github/yap-6.3/os/writeterm.c:embedding :2 within53#include : a:within +#include "YapHeap.h"2 + ^ macroerror ^ +: #include : +macroerrorargumentsembedding +: isaargumentsembedding/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/sysbits.hdirective :: 4826anotwithin#include: :is2 supported +:#include macro +directive ererror In file included from '}'argumentsmacroerror: embedding/Users/vsc/github/yap-6.3/os/ypstdio.c: + : embeddingexpectedis18 arguments: +aidentifier In file included from not + is error/Users/vsc/github/yap-6.3/H/Yap.h#includesupported : +:not +781: In file included from +: +directive embedding/Users/vsc/github/yap-6.3/H/YapHandles.h supportedIn file included from : +/Users/vsc/github/yap-6.3/H/YapHandles.hwithina20: : +20macro#include#endif /* YAPOR || TABLING */ #include : + +In file included from arguments +In file included from /Users/vsc/github/yap-6.3/H/Yatom.h +#include /Users/vsc/github/yap-6.3/H/Yatom.h ^:directive ^ +: 1342 + ^within: + +1342In file included from : +/Users/vsc/github/yap-6.3/H/YapFlags.hmacroaIn file included from a: /Users/vsc/github/yap-6.3/H/YapFlags.h234arguments#include :: + /Users/vsc/github/yap-6.3/OPTYap/opt.init.c +234is/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h: : +:#includedirective +301 94notwithin: note: 30supported:argumentsror +withinnot : errordirectiveembeddingsupported: argumentsmacro + expectedwithin a arguments#include macro'}' is + #include ^is +not +#include "yapio.h"arguments + supported +notdirective ^/Users/vsc/github/yap-6.3/H/YapFlags.h is: +supported + 233 +within:not 14 macro:supported +/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/readterm.carguments#include note #include "YapText.h"::is +: 6634 to:: ^not +2 +2 #include supported: ^:match + + + this ^errorerror +: : '{'/Users/vsc/github/yap-6.3/os/random.cembeddingembedding +: #include 29a +: ^a2#include + /Users/vsc/github/yap-6.3/os/writeterm.ctypedef enum { +:#include: + + ^56directiveerror /Users/vsc/github/yap-6.3/os/sysbits.h +:In file included from :directive2/Users/vsc/github/yap-6.3/os/mem.cwithin: :: 5026 within: +:macro errorembeddingmacro/Users/vsc/github/yap-6.3/os/sysbits.h: 2: arguments:25 embeddinga: arguments is 2 #includeerror is: +a: + 2 /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h:within isdirective: is error notwithin101#include macro: not + :embeddingarguments3macro supported ^ +:supported +arguments a + error is#include: +notunterminated #include +directive +#include #include "Yatom.h" supported + + ^/Users/vsc/github/yap-6.3/os/sysbits.hdirective ^ +function-like +: + 60 +within:macro 2 macroinvocation:/Users/vsc/github/yap-6.3/os/sysbits.h +#include arguments:/Users/vsc/github/yap-6.3/os/iopreds.c + error:28 ^: is:59 +2: embedding#include "Yatom.h"2: not + : ^a error/Users/vsc/github/yap-6.3/os/random.c + supported: :error +#includeembedding31: +:/Users/vsc/github/yap-6.3/os/chartypes.cembeddinga YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,2: +: 46 #includedirective#include : ^ +2aerror + +: : embedding/Users/vsc/github/yap-6.3/H/YapFlags.hdirective#includedirective + error: a: within233withinembeddingdirective : macro14 /Users/vsc/github/yap-6.3#include +macro: +/Users/vsc/github/yap-6.3/os/sysbits.harguments : noteisdirective48: :: not/Users/vsc/github/yap-6.3/os/pipes.c2within to:: supported 38to macro: match error2 +match: arguments: embedding thisthis iserror a : '{''{'not embedding#include "Yatom.h" + + #include +supported +a ^ + +directive#include +typedef enum {typedef enum {within /Users/vsc/github/yap-6.3/os/sysbits.h + + : ^ ^directive28 + +#include "iopreds.h": macro +2within ^: arguments + macro error is: arguments embedding notis /Users/vsc/github/yap-6.3/os/random.c supporteda:not + 34 #include:supportedfatal error2 + +: : too directive error#include many: +within embedding ^ #include errors + +macro a ^emitted, +arguments #include stopping +/Users/vsc/github/yap-6.3/os/sysbits.his : nowdirective50not : [-ferror-limit=]within2supported/Users/vsc/github/yap-6.3/os/pipes.c +: : + macro54error :: arguments2embedding : is #include "YapEval.h"a error + not: ^#include embedding +sIn file included from /Users/vsc/github/yap-6.3/os/sysbits.h not 41is#include:embedding not: 29 +noterrorasupported: : + 2 directivesupportedexpected#include/Users/vsc/github/yap-6.3/OPTYap/opt.init.c: + : +';'18 errorwithin : +directiveafter : In file included from #include /Users/vsc/github/yap-6.3/H/Yap.h +embeddingmacro + #include "yapio.h" :withinarguments + ^enuma ^781 + + +is#includemacro: + + In file included from not arguments/Users/vsc/github/yap-6.3/H/YapHandles.h directive :supported/Users/vsc/github/yap-6.3/os/format.c +is20:within : +/Users/vsc/github/yap-6.3/os/sysbits.h242 In file included from :not:/Users/vsc/github/yap-6.3/H/Yatom.hmacro269: :#include argumentssupported1342 :: +erroris + +In file included from 2 ^ : :/Users/vsc/github/yap-6.3/H/YapFlags.h +not booleanFlag, "true", NULL), : +error234supported: ^#include : + +withinembedding + +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h/Users/vsc/github/yap-6.3/os/sysbits.h ^ ^:#include "yapio.h"macro +a + 94: +#include ^:arguments + +4148 ::directiveis 2 :withinerrornot /Users/vsc/github/yap-6.3/os/sysbits.h : errorsupported:macroexpected: +57 embedding:arguments';' 2 fatal errora:isafter : /Users/vsc/github/yap-6.3/os/sysbits.h + too#includeerrornot: #include "yapio.h"45 + :enum +many2 + supported ^: directive + + errors error within: emitted, arguments/Users/vsc/github/yap-6.3/os/charsio.cembedding macro: #include 51astoppingarguments +is: ^#includenownot2is +: + [-ferror-limit=]supported booleanFlag, "true", NULL),directive +errornot + +: embeddingwithin ^supported + +a ;/Users/vsc/github/yap-6.3/os/sysbits.hmacro + : #include "YapEval.h"72#includearguments +: + 2 ^ is +:directive#include +noterrorwithin ^ : /Users/vsc/github/yap-6.3/os/sysbits.h +supportedmacro:embedding + 29 In file included from arguments:a//H/YapFlags.h directive +aub/yap-6.3/os/streams.c: within : within231errordirective macro#include50: ::argumentsmacrowithin 29is :20:arguments supportedmacro errornotnoteerrors +: : generated. +argumentsembeddingasupported macro is + a'YAP_FLAG'#include not +#include#include defined + +directivesupported ^ + + +directive #include here +within + ^ macro +within #include arguments +macro /Users/vsc/github/yap-6.3/os/readterm.c ^ is: +arguments 36 not:/Users/vsc/github/yap-6.3/os/iopreds.c is2:supported :64 +not : /Users/vsc/github/yap-6.3/os/sysbits.herror2supported:: : +57embedding #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x :error#include "yapio.h" +a2: + : ^ ^embedding #include + + error#include +a: + embedding ^directive#include/Users/vsc/github/yap-6.3/os/readline.c + + :a within33 directive :#include macro2 +within/Users/vsc/github/yap-6.3/os/ypstdio.c:/Users/vsc/github/yap-6.3/os/streams.c : :307errorargument ;upportedembedding: In file included from + +20 2/Users/vsc/github/yap-6.3/os/fmem.cembedding errora:: s a26 generated. +#includeerror : + +#include : #include +In file included from directive +embedding ^ /Users/vsc/github/yap-6.3/H/YapText.h within +:a directive32 macro : + #includewithinIn file included from In file included from arguments +/Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/OPTYap/opt.preds.c :macro:directive23is781 : + : + withinIn file included from In file included from not /Users/vsc/github/yap-6.3/H/Yap.h/Users/vsc/github/yap-6.3/H/YapHandles.harguments macro: : supported78120is +arguments: +: + In file included from In file included from notis/Users/vsc/github/yap-6.3/H/YapHandles.h/Users/vsc/github/yap-6.3/H/Yatom.h ::supportednot201342 + : +: +#include supportedIn file included from In file included from + +/Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/H/YapFlags.h ^:: +1342234: +: +#include 41 +not: ^ argumentswithin +supported +: macroiserror : embeddingnotargumentsexpected asupportedis';'/Users/vsc/github/yap-6.3/os/charsio.c #include +not:#include + 53 + ^supported: + +2directive within macro#include +#include arguments ^: + + ^iserror + : not embeddingsupportedafter /Users/vsc/github/yap-6.3/os/sysbits.h +a/Users/vsc/github/yap-6.3/os/sysbits.h +: /Users/vsc/github/yap-6.3/os/pipes.c: #include60:enum75 +:57 +: 2:2#include :directive2: + : ^withinerror error +error: macro: : embedding embeddingembedding arguments a aa is #include /Users/vsc/github/yap-6.3/os/sysbits.h#include +#include: + not + 57directive directive: booleanFlag, directivesupported#include :: make[2]: + +is ^ 1 +notembedding:*** [OPTYap/CMakeFiles/libOPTYap.dir/tab.tries.c.o] Error 1 supported +errora +#include : +#includeexpected ^ + + identifierdirective +/Users/vsc/github/yap-6.3/os/sysbits.h #include "Yatom.h":within +48 ^:macro^ +/Users/vsc/github/yap-6.3/os/charsio.c +2:arguments:56 /Users/vsc/github/yap-6.3/os/readutil.c:is :2error 25:withinnot: /Users/vsc/github/yap-6.3/os/ypstdio.c2 s:supportedmacro:307 : + macroarguments1errormacrois: : isargumentserrorargumentsnot embedding : #include not expectedis a +notsupported ^'}' +#include53In file included from supported + + + +: /Users/vsc/github/yap-6.3/os/random.cdirective2:/Users/vsc/github/yap-6.3/H/YapFlags.h :1#include :within : +233 +/Users/vsc/github/yap-6.3/os/readline.c: ^:14#include +35:macro +:within 2make[2]: : ^note arguments : + macroerrorto*** [os/CMakeFiles/libYAPOs.dir/writeterm.c.o] Error 1 is/Users/vsc/github/yap-6.3/os/sysbits.h :match/Users/vsc/github/yap-6.3/os/iopreds.c:arguments>directive :66#include "yapio.h"Users/vsc/github/yap-6.3/OPTYap/opt.init.c69: within:: +thiswithin ^182 :: +macro '{' + macroIn file included from ^arguments +error + /Users/vsc/github/yap-6.3/H/Yap.h: argumentsis: 781embeddingisnotis : + typedef enum {notnotsupported +aIn file included from /Users/vsc/github/yap-6.3/os/sysbits.h ^supported/Users/vsc/github/yap-6.3/H/YapHandles.h + + +:#include:6020 + :: + 2In file included from directivewithin: /Users/vsc/github/yap-6.3/H/Yatom.h #include macro#include "yapio.h" +:withinerror + ^: 1342 ^argumentsembedding + +macro : + isa/Users/vsc/github/yap-6.3/H/YapFlags.harguments : /Users/vsc/github/yap-6.3/os/chartypes.cnot233#includeis:: +1notsupported47 :: +directivesupported 2 +fatal error:warningwithin: : tooerrortypedefmacro : #include many +embedding#include requiresarguments ^ + + aa ^is errors + #include name +/Users/vsc/github/yap-6.3/os/pipes.cnotIn f:is:error/Users/vsc/github/yap-6.3/os/iopreds.cerrorIn file included from 59: 2:: :not:embedding/Users/vsc/github/yap-6.3/H/Yap.h2 74 ::: supported7812 a: +supported:error In file included from +: /Users/vsc/github/yap-6.3/H/YapHandles.h#includeerrorembedding: + + : 20 +adirective: +embedding In file included from #includewithin#include a/Users/vsc/github/yap-6.3/H/Yatom.h + #include macro +: ^#include 1342 +directive: + + ^ + In file included from arguments + within/Users/vsc/github/yap-6.3/H/YapFlags.hdirectiveis : macro234withinnot : + argumentsmacro/Users/vsc/github/yap-6.3/os/readterm.c supported/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h: is/Users/vsc/github/yap-6.3/os/sysbits.h39arguments::: :66 1012supported + /Users/vsc/github/yap-6.3/H/YapFlags.h +::directive embedding 233error within:: a 1 macroembedding:#include #include "YapText.h" a + +warningarguments ^ /Users/vsc/github/yap-6.3/os/sysbits.h : :directive#include +istypedef + 45within :not requires2/Umacro:directive emitted, ile included from 2a not supported/Users/vsc/github/yap-6.3/os/ypstdio.c stoppingarguments +:: 18namesupportednow: + +erroris +: In file included from not[-ferror-limit=]embedding[-Wmissing-declarations]/Users/vsc/github/yap-6.3/H/Yap.h #include + + +supported:a +781 ^ : +#include "encoding.h" +#includeIn file included from + +/Users/vsc/github/yap-6.3/H/YapHandles.h ^ : +directivetypedef enum {20#include +: + +^~~~~~~withinIn file included from ^ + /Users/vsc/github/yap-6.3/H/Yatom.h/Users/vsc/github/yap-6.3/os/readutil.c +/Users/vsc/github/yap-6.3/os/sysbits.hmacro::: 26134266arguments:: +: 2In file included from 2is:/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/os/readline.c: :: noterror23438 : :error: +supportedembedding2: /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +:embedding:a 94 error:a#include: 41 +embedding:#include +directive#include errora directive + : within #include ^ expected +within +macro directive'macroarguments "true", NULL),/Users/vsc/github/yap-6.3/os/sysbits.h + embedding +:embedding is within 60a not :[-Wmissing-declarations]#include 2 +macrosupported +: + argumentswithin directive error is: macrowithin arguments embeddingnottypedef enum {#include "iopreds.h"macro arguments + supported^~~~~~~a + is ^ + + +arguments #include not +is error supported: directive#include +not +/Users/vsc/github/yap-6.3/os/readutil.c embedding ^within: supported + a +27macro :#include #include 2 + +arguments: ^ +directive/Users/vsc/github/yap-6.3/os/readterm.c#include "YapHeap.h"erroris: +: 42 ^ within:embedding + not 2macro a:/Users/vsc/github/yap-6.3/os/readline.c /Users/vsc/github/yap-6.3/os/sysbits.hsupported #include::arguments +error +26 54 :: :is2directive2 embedding::not #include errorwithinaerror + : : ^embeddingmacro#include +embedding + + a arguments adirective #include is +#includewithin + notdirective macro directive#include /Users/vsc/github/yap-6.3/os/sysbits.h +erroris::embeddingnot ^ +3 : not:2supported 66asupported + :: +error2#include :: +error unterminated: directive/Users/vsc/github/yap-6.3/os/charsio.cerror +#include "iopreds.h" embedding +within: :function-like #include 71 embedding: ^macro +macro 2 ^invocation: +arguments + +:a embedding is error#include a: +not embedding #includedirective supported + a + /Users/vsc/github/yap-6.3/os/iopreds.c withindirective:#include 81 +macrowithin: 2directiveargumentsmacro: #include YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,is + within + ^errorarguments ^ +macro +: is embedding arguments not supported/Users/vsc/github/yap-6.3/os/sysbits.h ais +: supported/Users/vsc/github/yap-6.3/H/YapFlags.h#include50 + +:not: 2 231directive:supported: #include +9withinerror +: : ^macroembeddingnote #include +arguments +#include "iopreds.h"a: + ^ ismacro + ^ #include +not'YAP_FLAG'/Users/vsc/github/yap-6.3/os/char2 1;'sers/vsc/github/yap-6.3/os/sysbits.h20 warningsupported: :/Users/vsc/github/yap-6.3/os/format.c and errorafter27errors13:: + error generated. +: 2s 251: generated. +embedding:aenum 2 +error:a#include: +error#include embedding: +directive embeddingadirectivewithin a#includewithinmacro + #include argumentsmacro +directive isargumentsdirectivewithin isnotwithinmacro booleanFlag, "true", NULL), +notsupportedmacroarguments + ^ supported +isarguments + ; +notis supportednot + #include supported +#include + ^ + + ^ +#include "Yatom.h" + ^In file included from +/Users/vsc/github/yap-6.3/os/ypstdio.c#include : +/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/streams.c ^/Users/vsc/github/yap-6.3/os/sysbits.h18:::: + +6928In file included from 56::/Users/vsc/github/yap-6.3/H/Yap.h:22:2::781: : + errorerrorIn file included from error: : /Usembeddingembeddingissupportedwithin1 + warningwithin and a notmacro 14 a error#includesupported +s#include +#include generated. + + arguments +directive ^ +isnotwithindirective #include supportednotmacrowithin + + ^argumentssupportedmacro + + /Users/vsc/github/yap-6.3/os/sysbits.hisarguments: 48notis#include : +2/Users/vsc/github/yap-6.3/os/sysbits.hsupportednot ^:#include "YapText.h" + + +:69supported ^ : + +error2: : embeddingerror /Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/sysbits.h: #include "YapEval.h":aembedding +27:#include ^ +:#includea + ^2 + + #includesupported:directive +/Users/vsc/github/yap-6.3/os/sysbits.h +error:withindirective: 29 embedding:macrowithin 2 :/Users/vsc/github/yap-6.3/os/sysbits.haargumentsmacro:#include "yapio.h" 72 +#includeerror: ^ + +: 2 embedding:directiveIn file included from In file included from aerrorwithin /Users/vsc/github/yap-6.3/os/pipes.c: /Users/vsc/github/yap-6.3/os/charsio.c#include: embedding + :types.c29 ^ 46 defined: +:: + +adirective +49 ;In file included from In file included from /Users/vsc/github/yap-6.3/H/Yap.h:here#include:/Users/vsc/github/yap-6.3/H/Yap.h2 + +:within:781 : + +781macrodirectiveerror: + : In file included from argumentsIn file included from withinembedding/Users/vsc/github/yap-6.3/H/YapHandles.h /Users/vsc/github/yap-6.3/H/YapHandles.his:macro:a 2020notarguments : +: + #include In file included from +issupported/Users/vsc/github/yap-6.3/H/Yatom.h In file included from +:/Users/vsc/github/yap-6.3/H/Yatom.hdirectivenot1342In file included from : +:#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) xwithin1342/Users/vsc/github/yap-6.3/os/fmem.c +In file included from supported:: +#include 26 + ^: + + +/Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from ^In file included from :/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vs +c/github/yap-6.3/H/YapText.ha:234make[2]: : : +234#include: +embedding*** [os/CMakeFiles/libYAPOs.dir/sig.c.o] Error 1 +arguments /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +a ::directive is101101 #include ::withinnot +3 3: /Users/vsc/github/yap-6.3/os/sysbits.h supportedmacro: +:directive error57 arguments :: error within2unterminated: is : +unterminatedmacro#include + + function-like ^argumentsnot: + error function-likemacro: is 32 supported: +embedding +In file included from macroinvocationnota/Users/vsc/github/yap-6.3/os/readterm.c + :invocation#includesupported45 + +: + +2 :#include directive + directive ^errorwithin + #include : within +embeddingmacro ^ macroa +arguments arguments#include/Users/vsc/github/yap-6.3/os/sysbits.h is YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,:is + + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,not/Users/vsc/github/yap-6.3/os/streams.c ^ +69: ^ +macro #include +59 :arguments +2macro arguments: is ^ arguments +iserrornot/Users/vsc/github/yap-6.3/H/YapFlags.h : /Users/vsc/github/yap-6.3/H/YapFlags.h is: supported not231 +not: :supported231supported +9:/Users/vsc/github/yap-6.3/os/sysbits.h +:9:: :75note #include 2:note +:#include "iopreds.h" ^: : 2 +#include "Yatom.h" +:macroerror ^macro + +: ^ error embedding +'YAP_FLAG''YAP_FLAG' : a/Users/vsc/github/yap-6.3/os/sysbits.hdefineddefinedembedding: + /Users/vsc/github/yap-6.3/os/sysbits.h + #include72 : +a:28here 2here #include:: + +directive + 2 error:withindirective: embeddingerrormacrowithin : aembeddingargumentsmacro #includeaisarguments + #includenotisdirective + #define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) xnotwithindirective +supported + ^macrosupportedwithin#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + + + arguments ^ macro +is #include argumentsnot#include + + ^is ^suppo + +/Users/vsc/github/yap-6.3/os/random.cmake[2]: /Users/vsc/github/yap-6.3/os/pipes.c69macronot: : :*** [OPTYap/CMakeFiles/libOPTYap.dir/opt.preds.c.o] Error 1173266supportedarguments +:2 2: +is#include : +error not ^: error +: embeddingsupportedexpected +#include "YapEval.h" a +identifier ^ +#include + +/Users/vsc/github/yap-6.3/os/iopreds.c :directive86/Users/vsc/github/yap-6.3/os/sysbits.hmake[2]: #include :} :29 +within*** [OPTYap/CMakeFiles/libOPTYap.dir/opt.init.c.o] Error 1fatal error2 ^: +: : In file included from +macrotoo2error : :/Users/vsc/github/yap-6.3/os/readutil.cargumentsmany embedding: error is21aerrors: : + /Users/vsc/github/yap-6.3/os/pipes.c embeddingnot:emitted, #includeIn file included from a +/Users/vsc/github/yap-6.3/H/Yap.hstopping : supported781nowers/vsc/github/yap-6.3/H/YapHandles.h +#includedirective : + +:[-ferror-limit=] In file included from 20 +withindirective/Users/vsc/github/yap-6.3/H/YapHandles.h: + :In file included from #include : +embedding1342#include "yapio.h" +is In file included from + ^ /Users/vsc/github/yap-6.3/H/Yatom.h ^a#include +:not/Users/vsc/github/yap-6.3/os/charsio.c + +1342 ^ :: +#includesupported +/Users/vsc/github/yap-6.3/H/YapFlags.h1233 + +:: 2337directive:: 1/Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/os/sysbits.h :within:: /Users/vsc/github/yap-6.3/os/sysbits.h50error60#include macrowarning:::: +452argumentstypedef2 ^ : +requiresis:embedding 2notaIn file included from error : :namesupported/Users/vsc/github/yap-6.3/os/readline.c embeddinga +error + : :#includea[-Wmissing-declarations]29 +embedding +: + In file included from directive#includefatal error/Users/vsc/github/yap +#include "YapEval.h"a +:rted + ^directive +2 ^ + :withinwithin + +macroerrormacro : argumentsargumentsexpected #include /Users/vsc/github/yap-6.3/os/chartypes.cidentifierisis/Users/vsc/github/yap-6.3/os/format.c : + :notnot52269/Users/vsc/github/yap-6.3/os/sysbits.h :::supported2 make[1]: +272supported:}:: + + 2 ^errorerror*** [OPTYap/CMakeFiles/libOPTYap.dir/all] Error 2 +: : : +embeddingembedding#include #include error +aa + ^ : ^ +#include +embedding#include +/Users/vsc/github/yap-6.3/os/random.c + :20 directivea173directive : +: within In file included from 2within #include/Users/vsc/github/yap-6.3/os/sysbits.h: +macro/Users/vsc/github/yap-6.3/H/Yatom.h:macro :66error directive :arguments : 21342 within arguments expectedis: +:macro In file included from isnot '}'error/Users/vsc/github/yap-6.3/H/YapFlags.hargumentsnot: : +234embedding20issupported: + : + + error/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h /Users/vsc/github/yap-6.3/H/YapFlags.hs:anot/Users/vsc/github/yap-6.3/H/YapFlags.h generated. + 101arguments:typedef enum {#include "iopreds.h"#include + +errorsupportedis: ^^~~~~~~ + +embedding +not a:supported +#include3: + /Users/vsc/github/yap-6.3/os/format.cerrordirective:: #include 270unterminated +:within#include "yapio.h" + ^2 + +:macro ^function-like + errorargumentsmacro: embeddingisinvocation +anot/Users/vsc/github/yap-6.3/os/sysbits.h :#includesupported75 + +: 2/Users/vsc/github/yap-6.3/os/sysbits.hdirective:: 45withinerror: : 2macro#include embedding: YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,-6.3/H/Yap.h: +error233 ^:: : +7811embedding: +: In file included from awarning/Users/vsc/github/yap-6.3/H/YapHandles.h : :/Users/vsc/github/yap-6.3/H/YapFlags.htypedef#include20: +: +231requires :In file included from directive9/Users/vsc/github/yap-6.3/H/Yatom.ha :: within 1342name note: + +macro: In file included from macro/Users/vsc/github/yap-6.3/H/YapFlags.h[-Wmissing-declarations]arguments: +: #include266fatal error234'YAP_FLAG': +too : : +defined/Users/vsc/github/yap-6.3/H/YapGFlagInfo.hmany too: + 2directive 101 : typedef enum {hereerrorsmany +: + ^~~~~~~ 3errors within: emitted, emitted, +error stoppingerror: stoppingmacro: expected unterminated nowarguments +'}' now + [-ferror-limit=]is function-like + [-ferror-limit=]notmacro#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + +/Users/vsc/github/yap-6.3/H/YapFlags.hsupportedinvocation ^: + + +233:14: note: #include to + ^match + this /Users/vsc/github/yap-6.3/os/readutil.c'{': +301: YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,2/Users/vsc/github/yap-6.3/os/sysbits.h +:: ^48typedef enum { +error: +: 2 ^expected +: identifiererror/Users/vsc/github/yap-6.3/H/YapFlags.h +: :embedding231 :a9} : +#include ^ +note + : directivemacro within macro 'YAP_FLAG'/Users/vsc/github/yap-6.3/os/readutil.c arguments:defined 301 +is: 2herenot +: supportederror +: expected '}' +#include + is + + 233arguments supported ^:not +14 +is : supported not + note ^ : macro +supported to +arguments matchis #include thisnot + /Users/vsc/github/yap-6.3/os/readline.c #include "format.h"'{':supported ^ + + +/Users/vsc/github/yap-6.3/os/sysbits.h480 ^ +:: +752::2typedef enum { : +error #include /Users/vsc/github/yap-6.3/os/sysbits.h ^: +:error +expected ^: 48 +embedding:identifier 2 +a: #includeerror +: /Users/vsc/github/yap-6.3/os/readterm.c }embedding:directive + 48 ^:awithin +2 :#includemacro + error arguments: directive /Users/vsc/github/yap-6.3/os/readline.cembedding is within: a 480not macro: #include 2supported +arguments: + directiveerroris : within expected not macro #include '}'supported +arguments + + ^ +is/Users/vsc/github/yap-6.3/H/YapFlags.h :not233 :#include supported14In file included from +: +/Users/vsc/github/yap-6.3/os/random.c ^:note +fatal error: 1: to: +/UIn file included from #include : 1 +In file included from +match warningexpected ^ and a ^ +this/Users/vsc/github/yap-6.3/os/pipes.c11 + : error#include29'{'s +: +/Users/vsc/github/yap-6.3/H/Yap.h + In file included from : generated. +directive/Users/vsc/github/yap-6.3/H/Yap.h781 :: +/Users/vsc/github/yap-6.3/os/readterm.c781withinIn file included from : + /Users/vsc/github/yap-6.3/os/sysbits.h/Users/vsc/github/yap-6.3/H/YapHandles.hIn file included from macro::typedef enum {/Users/vsc/github/yap-6.3/H/YapHandles.h 20 +1arguments:57 ^ : +:is20In file included from warning + /Users/vsc/github/yap-6.3/H/Yatom.h and not: +2: In file included from :9supported error +errors20make[2]: : generated. +embedding error sa generated. +*** [os/CMakeFiles/libYAPOs.dir/assets.c.o] Error 1 #include + +#include ^ + + directive within macro arguments is fatal errornot: toosupported +many errors 20emitted, errorstopping#include s + generated. +now ^ +[-ferror-limit=]In file included from +g.h>/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/os/sysbits.h ^ +directive: ^: + +/Users/vsc/github/yap-6.3/os/readline.c23360 :::2914within2: +: : macroIn file included from /Users/vsc/github/yap-6.3/os/sysbits.hnote/Users/vsc/github/yap-6.3/H/Yap.herror : ::: 781arguments/Users/vsc/github/yap-6.3/os/sysbits.hto50embedding: : : + matchisIn file included from 2a /Users/vsc/github/yap-6.3/H/YapHandles.h ::notthis #include 20#includeerror'{' +supported: +: ^ +In file included from + + +/Users/vsc/github/yap-6.3/H/Yatom.hembeddingdirective: 1342awithin: + In file included from #includetypedef enum {/Users/vsc/github/yap-6.3/H/YapFlags.hmacro +/Users/vsc/github/yap-6.3/os/chartypes.c#include +:arguments: + 23455isdirective ^ ^: + : +within2/Users/vsc/github/yap-6.3/H/YapGFlagInfo.hnot +: macro: supported 94error +arguments:: /Users/vsc/github/yap-6.3/os/sysbits.h 41embedding:is: 69 a:noterror 2 : #include #includesupported:expected + + + error ^';'In file included from toosers/vsc/github/yap-6.3/os/sysbits.h : +/Users/vsc/github/yap-6.3/os/format.c ::51identifierafter23750 +many: +: +: 2In file included from 2errors:/Users/vsc/github/yap-6.3/H/Yap.henum: +:emitted, error781 error: stopping: +/// @}: embeddingIn file included from embedding + /Users/vsc/github/yap-6.3/os/sysbits.hnow/Users/vsc/github/yap-6.3/H/YapHandles.h :a: a66 20[-ferror-limit=]:: +#include + 2 +In file included from #include:: /Users/vsc/github/yap-6.3/H/Yatom.h +directiveerror: embedding: 1342 booleanFlag, "true", NULL),directivewithinembedding: + + aIn file included from ^macro within/Users/vsc/github/yap-6.3/H/YapFlags.h +a #include ;:macro +234 +#includearguments: + arguments +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h directive is: isdirective 101within not:not within 3 macrosupported :supported +macro arguments +In file included from error arguments/Users/vsc/github/yap-6.3/os/readline.cis: /Users/vsc/github/yap-6.3/H/Yatom.h1342make[2]: #include :is: +unterminated: + +In file included from 1342 ^ 29/Users/vsc/github/yap-6.3/H/YapFlags.h*** [os/CMakeFiles/libYAPOs.dir/fmem.c.o] Error 1 +: +function-like: +In file included from 234/Users/vsc/github/yap-6.3/H/Yap.h#include macro:: + 781 /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +invocation: +:not ^In file included from +94 +/Users/vsc/github/yap-6.3/H/YapHandles.h:supported:41/Users/vsc/github/yap-6.3/os/readterm.c +:20: : +54In file included from error:/Users/vsc/github/yap-6.3/H/Yatom.h: 2::1342expected/Users/vsc/github/yap-6.3/os/sysbits.h : +make[2]: error#include : /Users/vsc/github/yap-6.3/H/YapFlags.h57 +: *** [os/CMakeFiles/libYAPOs.dir/ypstdio.c.o] Error 1';': ^embedding : +2233 YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,after: +: +1 ^72a +: error:#includeenumwarning: /Users/vsc/github/yap-6.3/os/sysbits.h + +: embedding: 2typedef72 :/Users/vsc/github/yap-6.3/H/YapFlags.h :adirective ^:directive#include +2231 requires: +: #include ^9a +error: within + : namedirectivemacroembeddingnote/Users/vsc/github/yap-6.3/os/charsio.c + :: awithin1233 arguments [-Wmissing-declarations]: macro +7is#include/Users/vsc/github/yap-6.3/os/sysbits.h :: +not57arguments : error 2withinsupporteddirective: istypedef enum {: +macro + expectederror^~~~~~~not arguments: 20'}' embedding + +is #include supported errora + +s /Users/vsc/github/yap-6.3/H/YapFlags.h ^ generated. +:not#include +233 +:supported 14 +directive#include : + within/Users/vsc/github/yap-6.3/os/chartypes.c ^note : +: macro58to : arguments2match#include : +is this ^ /Users/vsc/github/yap-6.3/os/sysbits.h errornot +:: '{'60embeddingsupported +: +2a: #includeerrortypedef enum { +: + #include embedding ^directive +fatal error + ^ : a +withintoo #includemacromany + /Users/vsc/github/yap-6.3/os/sysbits.h arguments:erro directiversIn file included from 60 20 notwithinis:/Users/vsc/github/yap-6.3/os/readutil.c error :error s: macronot221 generated. +supported:: + + In file included from supportedembeddingarguments/Users/vsc/github/yap-6.3/H/Yap.herror + : :isa781embedding : + not#includeIn file included from a +/Users/vsc/github/yap-6.3/H/YapHandles.h #include supported#include:#include + +20directive + +: + ^ In file included from directive ^within/Users/vsc/github/yap-6.3/H/Yatom.h + + : #include macrowithin1342 + : + ^argumentsmacroIn file included from + /Users/vsc/github/yap-6.3/H/YapFlags.hisarguments: 234not/Users/vsc/github/yap-6.3/os/sysbits.h: +is/Users/vsc/github/yap-6.3/os/chartypes.c: /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h :supported69:not61 +:/Users/vsc/github/yap-6.3/os/sysbits.h: 942:2supported::66: + 41 :error:error2: : :embeddingerror embedding #include : errora#include expected + : a + ^#include embedding + ^';' +#include + a +afterdirective + booleanFlag, "true", NULL),In file included from : +macro#includewithin + /Users/vsc/github/yap-6.3/os/charsio.c +In file included from macroenum: 46/Users/vsc/github/yap-6.3/H/YapFlags.h + ^directive: + 'YAP_FLAG': +arguments 234In file included from ;/Users/vsc/github/yap-6.3/H/Yap.hwithinis +: +defined: +781macronot/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h: + : hereIn file included from arguments94 +supported /Users/vsc/github/yap-6.3/H/YapHandles.h: +is:41 20:not: + In file included from errorsupported/Users/vsc/github/yap-6.3/H/Yatom.h: +:expected booleanFlag, "true", NULL),1342 : +';' +In file included from /Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from after: ^/Users/vsc/github/yap-6.3/os/random.c +#include 234 +: +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x: + ^ 1 ; +/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h +enum +: + #include ^ + +In file included from emitted, + /Users/vsc/github/yap-6.3/H/Yap.hstopping ^:/Users/vsc/github/yap-6.3/os/sysbits.h 781 +:now: +69 In file included from :[-ferror-limit=]/Users/vsc/github/yap-6.3/H/YapHandles.h2 +::/Users/vsc/github/yap-6.3/os/format.c20 In file included from :: +error/Users/vsc/github/yap-6.3/os/readutil.c1181In file included from : :/Users/vsc/github/yap-6.3/os/sysbits.h:/Users/vsc/github/yap-6.3/H/Yatom.hembedding::721 134275: booleanFlag, "true", NULL),: +: +: +a /Users/vsc/github/yap-6.3/H/YapFlags.hIn file included from error ^/Users/vsc/github/yap-6.3/H/Yap.h2#include: :: +expected233781 :: + directiveIn file included from 1 identifier1/Users/vsc/github/yap-6.3/H/YapHandles.h: +within: warning:94 and 20warning:macro: +: 41 In file included from typedef:/// @}16/Users/vsc/github/yap-6.3/H/Yatom.h error : +errorrequiress1342: ^directive generated. + expected +a/Users/vsc/github/yap-6.3/os/sysbits.h: + /Users/vsc/github/yap-6.3/os/sysbits.h :/Users/vsc/github/yap-6.3/H/YapFlags.hwithinname66within:: : +233752:macro:macro /Users/vsc/github/yap-6.3/os/format.c [-Wmissing-declarations]1:arguments +: :is1181error + : : 7 ;not:warning';' + embedding: typedef enum {error typedefaftersupporteda : + +requires +^~~~~~~expected #include a +enum '}' + +name + +directive #include /Users/vsc/github/yap-6.3/H/YapFlags.h[-Wmissing-declarations]within +: +In file included from 233 ^/Users/vsc/github/yap-6.3/os/pipes.c:macro +:14 29:arguments: + In file included from noteistypedef enum {/Users/vsc/github/yap-6.3/H/Yap.h: +:not^~~~~~~781to + : + booleanFlag, "true", NULL),supported/Users/vsc/github/yap-6.3/os/chartypes.cIn file included from +match +:/Users/vsc/github/yap-6.3/H/YapHandles.h ^ 76 +:this: ;20 2 +: +'{':In file included from #include + 20 +:arguments +error ^ error: + sembeddingtypedef enum { generated. + iserror +a : ^not +embedding #include supported +a + directive/Users/vsc/github/yap-6.3/os/sysbits.h #includewithin: + 69 macro:directive #include 2 arguments +:within make[2]: ismacro ^error*** [os/CMakeFiles/libYAPOs.dir/iopreds.c.o] Error 1 : + +argumentsnotembedding issupported +anot #includesupported + + /Users/vsc/github/yap-6.3/os/sysbits.hdirective:make[2]: #include "YapEval.h"72within*** [os/CMakeFiles/libYAPOs.dir/readline.c.o] Error 1 +: + ^2#include macro +: + ^arguments +error : is/Users/vsc/github/yap-6.3/os/chartypes.cembedding : not77a : supportedIn file included from 2make[2]: +/Users/vsc/github/yap-6.3/os/format.c:#include*** [os/CMakeFiles/libYAPOs.dir/sysbits.c.o] Error 1: + +237errorfatal error : +: : directiveIn file included from embeddingtoo /Users/vsc/github/yap-6.3/H/Yap.h#include within : +a many ^781 macro: +#includeIn file included from +errors 2/Users/vsc/github/yap-6.3/H/YapHandles.h::20argumentsarguments + : + iserrorIn file included from isdirective : /Users/vsc/github/yap-6.3/H/Yatom.h not :within notembedding supported1342 macro +a: +/Users/vsc/github/yap-6.3/os/sysbits.h In file included from supported:#include/Users/vsc/github/yap-6.3/H/YapFlags.h +arguments: +72 234 :is: +directive2 /Users/vsc/github/yap-6.3/H/YapGFlagInfo.h :not#include within +#include error :supported +macro: + 94 ^embeddingarguments: + 41isa : notemitted,#include#include "iopreds.h" error + +supportedstopping: + expected ^directivenow + /Users/vsc/github/yap-6.3/os/sysbits.h';'within[-ferror-limit=]: +72In file included from macroafter#include : + +2/Users/vsc/github/yap-6.3/os/charsio.carguments ^ : : +enumis46 + : +errornot: In file included from embedding/Users/vsc/github/yap-6.3/H/Yap.hsupported : +a781 : +#includeIn file included from fatal error +/Users/vsc/github/yap-6.3/H/YapHandles.h : 11/Users/vsc/github/yap-6.3/H/Yatom.hmake[2]: #include toodirective warning:: +20 and 1342*** [os/CMakeFiles/libYAPOs.dir/ypsocks.c.o] Error 1within: +many +: +In file included from 15 macro/Users/vsc/github/yap-6.3/H/YapFlags.h/Users/vsc/github/yap-6.3/H/Yatom.h errorerrors: s: arguments warning233 emitted, and : generated. +1342is1 19 : +stopping errornot: /Users/vsc/github/yap-6.3/H/YapFlags.h now s: supportedwarning generated. +[-ferror-limit=] +: 233 +:typedefmake[2]: 1requires*** [os/CMakeFiles/libYAPOs.dir/readterm.c.o] Error 1: + awarning : name#include typedef + + ^[-Wmissing-declarations]requires + + a namemake[2]: +*** [os/CMakeFiles/libYAPOs.dir/streams.c.o] Error 1 +[-Wmissing-declarations]/Users/vsc/github/yap-6.3/os/sysbits.h +typedef enum {: +75^~~~~~~: +2: errortypedef enum {: +embedding ^^~~~~~~ +a + #include + directive within macro arguments/Users/vsc/github/yap-6.3/os/sysbits.h :is75 :not2 :supported +error: embedding a #include #include booleanFlag, "true", NULL), +In file included from 20 + ^ + 1 ^ error +directives/Users/vsc/github/yap-6.3/os/chartypes.c ^ generated. + : + + warning42within ; and : + +In file included from macro18/Users/vsc/github/yap-6.3/H/Yap.h error:argumentss781 generated. +: +isIn file included from /Users/vsc/github/yap-6.3/os/sysbits.hfatal errornot/Users/vsc/github/yap-6.3/H/YapHandles.h:: :75too20supported: : + +2manyIn file included from : /Users/vsc/github/yap-6.3/H/Yatom.hIn file included from errors:/Users/vsc/github/yap-6.3/os/format.cerror 1342:: emitted,: +237embedding In file included from : +#include stopping/Users/vsc/github/yap-6.3/H/YapFlags.h +In file included from :a ^/Users/vsc/github/yap-6.3/H/Yap.hnow234 : + : +781#include[-ferror-limit=]/Users/vsc/github/yap-6.3/H/YapGFlagInfo.h: + + +:In file included from 101/Users/vsc/github/yap-6.3/H/YapHandles.hdirective:: 320within:: + In file included from errorfatal error/Users/vsc/github/yap-6.3/H/Yatom.h1macro: :: 2020unterminatedtoo1342 warning + error error: + and argumentsss 17/Users/vsc/github/yap-6.3/H/YapFlags.h make[2]: erroris:function-likes 233 generated. +notmacro: generated. + 1 *** [os/CMakeFiles/libYAPOs.dir/readutil.c.o] Error 1 :supportedmanyinvocation + + + warningerrors: typedefemitted, requiresstopping #include anow + ^name[-ferror-limit=] + + + [-Wmissing-declarations] + YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom,make[2]: +*** [os/CMakeFiles/libYAPOs.dir/console.c.o] Error 1 ^ + +fatal errortypedef enum {: +too^~~~~~~ +many/Users/vsc/github/yap-6.3/H/YapFlags.h :errors231 make[2]: :emitted,9*** [os/CMakeFiles/libYAPOs.dir/pipes.c.o] Error 1 : +stopping notenow: macro[-ferror-limit=] +'YAP_FLAG' defined +make[2]: *** [os/CMakeFiles/libYAPOs.dir/random.c.o] Error 1here + + generated. +#define YAP_FLAG(x, NAME, WRITABLE, DEF, INIT, HELPER) x + ^ +/Users/vsc/github/yap-6.3/os/chartypes.c:920:2: error: expected12020make[2]: warning error and s erroridentifier generated. +19s + error generated. +*** [os/CMakeFiles/libYAPOs.dir/alias.c.o] Error 1s generated. + +} + ^ +make[2]: *** [os/CMakeFiles/libYAPOs.dir/charsio.c.o] Error 1fatal error +: too many errors emitted, stopping nowmake[2]: [-ferror-limit=]*** [os/CMakeFiles/libYAPOs.dir/files.c.o] Error 1 + +20 errors generated. +make[2]: *** [os/CMakeFiles/libYAPOs.dir/mem.c.o] Error 1 +make[2]: *** [os/CMakeFiles/libYAPOs.dir/format.c.o] Error 1 +make[2]: *** [os/CMakeFiles/libYAPOs.dir/chartypes.c.o] Error 1 +make[2]: *** [os/CMakeFiles/libYAPOs.dir/time.c.o] Error 1 +make[1]: *** [os/CMakeFiles/libYAPOs.dir/all] Error 2 +make: *** [all] Error 2 + +Compilation exited abnormally with code 2 at Fri Apr 27 00:11:42