sima/autoconf/
sima/hosts/i386/
sima/mudlib/
sima/mudlib/kernel/
sima/mudlib/obj/
sima/mudlib/sys/
sima/synhash/mips/
/*
 * This file specifies types and arguments for efuns.
 * An argument can have two different types with the syntax 'type1 | type2'.
 * An argument is marked as optional if it also takes the type 'void'.
 *
 * Look at the end for the list of functions that are optionally available.
 * If you don't want them, simply comment out them. All other functions must
 * remain defined.
 */

%tokens

/*
 * These are token values that needn't have an associated code for the
 * compiled file
 */

if else
case default 
while do for continue
basic_type closure_decl struct void
type_modifier var_type_modifier fun_type_modifier virtual
inherit scope
arrow qarrow quoted_aggregate
addq div
param local
constant string
shift compare equality
identifier

%codes

/* This code must come first, because it has to have value 0 */
	error

/* prefix bytes for multi-byte codes are required to have fixed values
 * for simple bit manipulation to be applicable.
 */
	dummy
	escape
	tefun
	vefun
/*
 * These are the predefined functions that can be accessed from LPC.
 */
	varargs
	return
	shared
	mapping
	closure
"&&"	land
"||"	lor
"+"	add
"*"	multiply
"~"	complement /* '~' and '!' differ in typechecking */
"!"	not
"subtract" sub
	break
	switch
	sscanf
"&"	and
"|"	or
"^"	xor
	catch
        end_catch
".."	range

/*
 * These values are used by the stack machine, and can not be directly
 * called from LPC.
 */
"/"	divide
"%"	mod
"<"	lt
">"	gt
">="	ge
"<="	le
"=="	eq
"!="	ne
"<<"	lsh
">>"	rsh
break_return
return0
pop
pickf picke pickd pickc pickb picka pick9 pick8
pick7 pick6 pick5 pick4 pick3 pick2 pick1 pick0
l_pick0 l_pick1 l_pick2 l_pick3 l_pick4 l_pick5 l_pick6 l_pick7
l_pick8 l_pick9 l_picka l_pickb l_pickc l_pickd l_picke l_pickf
put0 put1 put2 put3 put4 put5 put6 put7
put8 put9 puta putb putc putd pute putf
call_function_by_index
call_explicit_inherited
const0
const1
lbranch
lbranch_on_zero
lbranch_on_non_zero
xlbranch_on_zero
xlbranch_on_non_zero
xlbranch
branch
branch_on_zero
branch_on_non_zero
bbranch_on_zero
bbranch_on_non_zero
simul_efun0 simul_efun1 simul_efun2 simul_efun3
simul_efun4 simul_efun5 simul_efun6 simul_efun7
simul_efun8 simul_efun9 simul_efuna simul_efunb
simul_efunc simul_efund simul_efune simul_efunf
simul_efun
xsimul_efun
cshared0 cshared1 cshared2 cshared3
unshare /* used to unshare constant arrays/mappings */
l_cshared0
l_shared
v_global
v_global16
lv_global
lv_global16
v_virtual
lv_virtual
v_local
v_local16
lv_local
lv_local16
lv_nil
v_param
lv_param
clit
nclit
aggregate
range2
nr_range
previous_object0

m_aggregate
m_caggregate

%efuns

/* allocate_array() is actually const, but it would be a bad idea to
 * evaluate it at compile time
 */
mixed *allocate_array(int);
/* last argument to apply may be & varargs */
mixed apply(closure, mixed|mixed &, ...);
const int arrayp(mixed);
closure bind_lambda(closure, object default: F_CONST1);
unknown call_other(object|string, string, ...);
void call_out(string|closure, int, void|mixed, ...);
const string capitalize(string);
object clone_object(string);
const int closurep(mixed);
string ctime(int default: F_TIME);
void destruct(object);
const string *explode(string, string);
string file_name(object default: F_THIS_OBJECT);
int file_size(string);
mixed *filter_array(mixed *, string|closure|mapping, ...);
mapping filter_mapping(mapping, string|closure,  ...);
int find_call_out(string|closure);
object find_object(string);
const int floatp(mixed);
/* funcall accepts mixed as a single argument, but the only useful application
 * is with mixed variables that might hold closures, which will work anyways.
 */
mixed funcall (closure, ...);
string function_exists(string, object default: F_THIS_OBJECT);
string getuid(object default: F_THIS_OBJECT);
const string implode(string *, string);
int interactive(object default: F_THIS_OBJECT);
int intp(mixed);
closure lambda(mixed *, mixed);
const string lower_case(string);
mapping m_delete(mapping, mixed);
const mixed *m_indices(mapping);
const mixed *m_values(mapping);
mixed *map_array(mixed *, string|closure, ...);
mapping map_mapping(mapping, string|closure, ...);
const int mappingp(mixed);
const int member(mixed *|string|mapping|int, mixed);
mapping mkmapping(mixed *, ...);
const mixed negate(int|float);
int objectp(mixed);
const mixed quote(mixed *|quoted_array|symbol|string);
int random(int);
string read_bytes(string, void|int, void|int);
string read_file(string, void|int, void|int);
const string *regexp(string *, string);
int remove_call_out(string|closure);
int restore_object(string);
void save_object(string);
const int sizeof(string | mixed *|mapping);
mixed *slice_array F_RANGE (mixed *,int,int);
mixed *sort_array(mixed *,string|closure,object|string default: F_THIS_OBJECT);
string sprintf(string, ...);
mixed *statistics(int);
const int stringp(mixed);
closure symbol_function(symbol|string, string|object default: F_CONST0);
const int symbolp(mixed);
object this_interactive();
object this_object();
int time();
object *users();
int write_bytes(string, int, string);
int text_message(string);


/* aliases for LPmud compatibility */

mixed *allocate F_ALLOCATE_ARRAY (int);
string creator F_GETUID (object);
const int m_sizeof F_SIZEOF (mapping);
const int pointerp F_ARRAYP (mixed);
const int strlen F_SIZEOF (string);


%xcodes

break_continue
breakn_continue
protected_extract_lvalue
undef
r_range2
rn_range
rr_range

%xefuns

int extern_call();
object previous_object(int);
int program_time(object default: F_THIS_OBJECT);
string query_ip_number(object);
int to_int(string|float|closure);
float to_float(string|int);
string to_string(mixed);
int *to_array(string);
void  set_extra_wizinfo_size(int);
int caller_stack_depth();
void set_interactive_hook(int, string|closure);
object shadow(object);
mixed *get_dir(mixed, int, string);
int write_file(string, string);

/* A few interesting comm functions for the internet mud protocol */
int query_mud_port();
#ifdef CATCH_UDP_PORT
int query_udp_port();
#endif

object query_input_pending(object);

#if defined( FLOATS ) && defined( TRANSCENDENT_FUNCTIONS )
float sin(float);
float asin(float);
float cos(float);
float acos(float);
float tan(float);
float atan(float);
float log(float);
float exp(float);
float sqrt(float);
#endif /* TRANSCENDENT_FUNCTIONS */

int mapping_contains(mixed & | mapping, mixed & | mixed, ...);
mapping allocate_mapping(int, int default: F_CONST1);
mapping copy_mapping(mapping);

int call_resolved(mixed &, object|string, string, ...);
int referencep(mixed &);
void raise_error(string, int default: F_CONST1);
int get_eval_cost();
void garbage_collection();
int typeof(mixed);
mixed get_type_info(mixed, int default: F_THIS_OBJECT);


%tcodes

extract_lvalue

%tefuns

void add_define(string, string|closure);
int binary_message(int *|string, int default: F_CONST0);
mixed *call_out_info();
void clear_object_flags(int);
string crypt(string, string|int default: F_CONST0);
void debug_message(string);
int exec(object, object);
string *functionlist(object|string, int default: F_CONST1);
mixed get_extra_wizinfo(object|string);
string *inherit_list(object default: F_THIS_OBJECT);
int mkdir(string);
int query_idle(object);
int query_object_flags(int);
object query_shadow(object);
object query_shadowing(object);
string *regexplode(string, string);
void remove_interactive(object);
int rename(string, string);
void rename_object(object, string);
int rm(string);
int rmdir(string);
void set_auto_include_string(string);
int set_buffer_size(int);
void set_connection_charset(int *, int default: F_CONST1);
void set_driver_hook(int, closure|int|string|mapping|string*);
void set_extra_wizinfo(object|string, mixed);
void set_object_flags(int);
void shutdown();
int strstr(string, string, int default: F_CONST0);
closure symbol_variable(symbol|string|int);
object to_object(string|closure);
int trace(int);
string traceprefix(string|int);
mixed *transpose_array(mixed *);
closure unbound_lambda(mixed *, mixed);
void unshadow();
mixed *wizlist_info();
#ifdef TRACE_CODE
string *last_instructions(int, int default: F_CONST1);
#endif
#ifdef ERQ_DEMON
int attach_erq_demon(object, int default: F_CONST0);
int send_erq(int, int*|string, closure default: F_CONST0);
#endif
#ifdef UDP_SEND
int send_udp(string, int, string);
#endif

mixed debug_info(int, ...);
mixed *filter_objects(mixed *, string, ...);
mixed *map_objects(mixed *, string, ...);
void walk_mapping(mapping, string|closure, ...);