79 new->open_modules=
NULL;
80 new->inherited_modules=
NULL;
99 current_module=module;
121 if(s!=str && *s==
'#' ) {
147 if(s!=str && *s==
'#' ) {
170 return (
char *)term->value_3;
172 return term->type->keyword->symbol;
198 if(module!=no_module) {
246 key->definition=result;
290 if(key->
public || module==current_module)
293 Errorline(
"qualified call to private symbol '%s'\n",
299 if(module!=current_module) {
300 Errorline(
"qualified call to undefined symbol '%s#%s'\n",
301 module->module_name,symbol);
319 opens=module->open_modules;
330 warningline(
"benign module name clash: %s and %s\n",
335 Errorline(
"serious module name clash: \"%s\" and \"%s\"\n",
343 if(!openkey || !openkey->
public)
352 if(openkey && openkey->
public) {
356 warningline(
"implicit reference to non-public symbol: %s\n",
452 prettyf(k->module->module_name);
470 prettyf(k->module->module_name);
498 Errorline(
"argument missing in '%P'\n",call);
525 Errorline(
"argument missing in '%P'\n",call);
578 for (i=0;i<open_module->symbol_table->size;i++)
579 if ((key1=open_module->symbol_table->data[i]) && key1->
public) {
582 Errorline(
"symbol clash '%s' and '%s'\n",
615 warningline(
"local definition of '%s' overrides '%s'\n",
625 def=
update_symbol(current_module,term->type->keyword->symbol);
633 #define MAKE_PUBLIC 1
634 #define MAKE_PRIVATE 2
635 #define MAKE_FEATURE_PRIVATE 3
684 Errorline(
"argument missing in '%P'\n",call);
710 Errorline(
"argument missing in '%P'\n",call);
743 Errorline(
"argument should be boolean in '%P'\n",call);
779 Errorline(
"argument should be boolean in '%P'\n",call);
815 Errorline(
"argument should be boolean in '%P'\n",call);
898 newlabel=
new->keyword->combined_name;
900 newlabel=
new->keyword->symbol;
902 if(!strcmp(old_attr->
key,oldlabel))
935 if(arg1 && arg2 && arg3) {
943 Errorline(
"argument missing in '%P'\n",call);
1048 traceline(
"match persistent %P with %P\n",u,v);
1057 Errorline(
"cannot unify persistent values\n");
1064 compare=
glb(u->type,v->
type,&new_type,&new_code);
1068 if (compare==1 || compare==3) {
1077 success=(strcmp((
char *)u->value_3,(
char *)v->
value_3)==0);
1100 if(success && u->resid)
1181 warningline(
"alias: '%s' has now been overwritten by '%s'\n",
1189 Errorline(
"module violation: cannot alias '%s' from module \"%s\"\n",
1195 Errorline(
"argument(s) missing in '%P'\n",g);
1219 s=(
char *)psi->value_3;
1221 s=psi->type->keyword->symbol;
1225 Errorline(
"undefined module \"%s\"\n",s);
1266 def=
update_symbol(current_module,term->type->keyword->symbol);
1272 warningline(
"feature '%s' is now private, but was also declared public\n",
1301 Errorline(
"argument missing in '%P'\n",call);
1330 if(
explicit!=module)
ptr_keyword hash_lookup(ptr_hash_table table, char *symbol)
HASH_LOOKUP.
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
void push_ptr_value(type_ptr t, GENERIC *p)
push_ptr_value
ptr_psi_term translate(ptr_psi_term a, long **infoptr)
translate
void clear_copy()
clear_copy
struct wl_definition * def_type
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
stack_cons
void traverse_tree(ptr_node n, int flag)
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
push_goal
ptr_definition new_definition(ptr_keyword key)
int global_unify_attr(ptr_node, ptr_node)
long legal_in_name(long c)
void replace_attr(ptr_node, ptr_psi_term, ptr_definition, ptr_definition)
void push_psi_ptr_value(ptr_psi_term q, GENERIC *p)
push_psi_ptr_value
ptr_definition definition
void open_module_tree(ptr_node n, int *onefailed)
int global_unify(ptr_psi_term u, ptr_psi_term v)
ptr_hash_table symbol_table
ptr_hash_table hash_create(int size)
HASH_CREATE.
void insert_translation(ptr_psi_term a, ptr_psi_term b, long info)
insert_translation
ptr_module current_module
long overlap_type(ptr_definition t1, ptr_definition t2)
ptr_node heap_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
void open_module_one(ptr_psi_term t, int *onefailed)
void release_resid(ptr_psi_term t)
release_resid
void traceline(char *format,...)
char * strip_module_name(char *str)
struct wl_module * ptr_module
char * print_symbol(ptr_keyword k)
void Errorline(char *format,...)
char * heap_copy_string(char *s)
ptr_node stack_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
ptr_definition update_symbol(ptr_module module, char *symbol)
long all_public_symbols()
void hash_insert(ptr_hash_table table, char *symbol, ptr_keyword keyword)
HASH_INSERT.
ptr_definition first_definition
ptr_psi_term error_psi_term
void replace(ptr_definition old, ptr_definition new, ptr_psi_term term)
ptr_psi_term global_value
ptr_definition quoted_string
int make_feature_private(ptr_psi_term term)
void rec_replace(ptr_definition, ptr_definition, ptr_psi_term)
ptr_psi_term stack_psi_term(long stat)
stack_psi_term
void pretty_quote_symbol(ptr_keyword k)
ptr_psi_term stack_nil()
stack_nil
ptr_module create_module(char *module)
ptr_node find(long comp, char *keystr, ptr_node tree)
ptr_int_list open_modules
int dummy_printf(char *f, char *s, char *t)
dummy_printf
long featcmp(char *str1, char *str2)
void pretty_symbol(ptr_keyword k)
char * string_val(ptr_psi_term term)
long make_public(ptr_psi_term term, long bool)
long c_display_persistent()
ptr_definition update_feature(ptr_module module, char *feature)
struct wl_psi_term * ptr_psi_term
#define MAKE_FEATURE_PRIVATE
ptr_module find_module(char *module)
ptr_module extract_module_from_name(char *str)
void warningline(char *format,...)
int get_module(ptr_psi_term psi, ptr_module *module)
void prettyf_quote(char *s)
ptr_triple_list properties
char * make_module_token(ptr_module module, char *str)
ptr_module set_current_module(ptr_module module)
ptr_operator_data op_data