[Package Index | Mudlib Index | Effect Index]
Written by Pinkfish
Started Thu May 4 22:44:34 PDT 2000
.
void add_allowed_function(string name, int type, int * args, function value)This method adds in an allowed function and specifies the types it takes.
void add_allowed_variable(string name, int type, function value)This method adds in an allowed variable and specifies it's type.
class parse_node evaluate_expression(class parse_node * expr, mixed args ...)This method evaluates the expression and creates a nice end result thingy.
class parse_node * parse_boolean_string(string str)A very small recursive decent parser which must return a boolean value.
class parse_node * parse_integer_string(string str)A very small recursive decent parser which must return a integer value.
class parse_node * parse_money_string(string str)A very small recursive decent parser which must return a money value.
string parse_user_expression(string def, string str)This method attempts to parse a user expression.
mixed * parse_user_expression_definition(string def)This will pass the arguments to a user defined function and return an array of three elements. The first is the name of the function, the second is the array of arguments types and the third is the array of argument names.
string query_expression_string(class parse_node * expr, int brief)This method returns the expresion as a string.
int * query_function_args_types(string name)This method returns the type of the function.
string * query_function_names()This method returns all the function names defined in this expression inheritable.
int query_function_type(string name)This method returns the type of the function.
function query_function_value(string name)This method returns the value of the function.
int query_function_variable_position(string name)This method returns the position of the function variable.
int query_function_variable_type(string name)This method returns the type of the function variable.
string query_last_expression_error()This method returns the last error if there was an error in the parsing.
string query_last_expression_warning()This method returns the last warning if there was an warning in the parsing.
class parse_node query_null_type(int type)This method returns a null object of the specified type.
string query_operator_name(int operator)This method returns the string value of the operator name.
string query_type_name(int type)This method returns the name of the type.
int query_type_value(string type)This method returns the value of the type.
mixed * query_user_function_arg_names(string name)This method returns the argument names names of the user defined function.
mixed * query_user_function_arg_types(string name)This method returns the argument names types of the user defined function.
mixed * query_user_function_args(string name)This method returns the argument names and types of the user defined function. It returns an array of two elements, the first is an array of names and the second is an array of types.
class parse_node * query_user_function_expression(string name)This method returns the expression of the user defined function.
string * query_user_function_names()This method returns the list of user defined functions in the inheritable.
int query_user_function_return_type(string name)This method returns the return type of the user defined function.
string query_user_function_string(string func)This method makes a nice string representation of the user function.
string * query_variable_names()This method returns the names of all the variables.
int query_variable_type(string name)This method returns the type of the variable.
function query_variable_value(string name)This method returns the value of the variable.
int remove_user_expression(string name)This method removes the currently defined user expression.
int sizeof_function(mixed * arr, mixed args ...)Does a sizeof an array. Nifty...
int is_alpha(int alpha)This method checks to see if the passed in character is an alpha or not.
int is_array_type(int type)This checks to make sure that the type is an array.
int is_null_array_type(int type)This checks to make sure that the type is a null array.
int is_number(int number)This method checks to see if the passed in character is a number or not.
int is_number_type(int type)This checks to make sure that the type is a number based type. This can be controlled to make sure that any added types are also allowed to be treated as numbers.
int is_space(int space)This method checks to see if the passed in character is a space or a space equivilant.
string * query_token(string str)This method find the next token. It can be overrideen in higher things to deal with special token types (ie: money).
class func_variable_thing { int type; int arg_no; }
class function_thing { int type; function value; int * args; int return_pos; }
class user_function_thing { int type; class parse_node * expr; int * arg_types; string * arg_names; }
class variable_thing { int type; function value; }