<<<<<<<<<<<<<<<<<

msg(lymb) Core Classes msg(lymb)

NAME

msg - lymb message handler

SUPERCLASS

object

DESCRIPTION

The message handler object, msg, accepts messages that control debugging and message interruption. There is only one instance of msg in the system.

INSTANCE VARIABLES

break_on_error if set to ON will cause an interactive parser to be invoked when msg detect a message sending error. The default value is OFF.

ctrl_c_pending is the count of control-C key strokes. Each control-C increments it by one, each control-D decrements it by one.

inner is the count of inner loop traversals in msg_send(). Each pass of the inner loop corresponds to a compare of the message being sent with a message in the current method table. Not directly modifiable.

migrate_messages is the flag that controls message migration. This variable is normally set implicitly using the migrate_messages_on! and migrate_messages_off! messages. The default is ON.

outer is the count of outer loop traversals in msg_send(). Each pass of the outer loop corresponds to a search of a superclass method table. Not directly modifiable.

trap_ctrl_c is the flag that controls control-C processing. If ON, the parser will start a new parsing stream. If OFF, when the user presses control-C, the parser will terminate the program. The default is ON.

valid_messages is the flag to control the output of valid messages for the object. The default is ON.

MESSAGES

abort_on_ctrl_c! sets the message handler to abort when a control-C is typed.

break_on_error_on! causes msg to invoke an interactive parser when it detects a message-passing error.

break_on_error_off! causes msg to not invoke an interactive parser when it detects a message-passing error.

break_on_trace_match_on! causes msg to invoke an interactive parser when it matches on a selective object or message.

break_on_trace_match_off! disables trace_match breaking.

classes! prints the list of classes in the system on the standard output.

classes? returns the list of classes in the system.

clear_stats! zeros the inner, outer, and msg_count instance variables, resetting the counting mechanism used by the stats! message.

debugon! sets the debug variable ON. If debugging is enabled, the trace_* messages control the printing of diagnostic output for each message sent.

disable_globals! forces all objects create to be placed in the most local symbol table.

enable_globals! forces all objects created to be placed in the most global symbol table.

free: argument deletes an object from the symbol table, removes it from the instances of its class, and frees the storage for the object.

migrate_messages_off! disables message migration, the copying of messages from superclass method tables to subclass method tables when located.

migrate_messages_on! enables message migration, the copying of messages from superclass method tables to subclass method tables when located.

inner? returns the number of traversals of msg_send's inner loop.

outer? returns the number of traversals of msg_send's outer loop.

print_method_table:object prints out the current method table for object. This will change over time as messages migrate into the method table and up to the front of it.

print_stack! displays the LYMB argument stack on stdout. This is useful as a debugging aid to locate missing ARGS_END calls in LYMB C code.

stats! prints message location statistics on stdout.

trap_on_ctrl_c! sets the message handler to trap control-C's and create a new interactive version of the parser. This is the default. To return to the old parser type control-D.

valid_messages? returns the valid messages value.

valid_messages_off! suppresses the listing of valid messages when an object receives an invalid message.

valid_messages_on! turns on the listing of valid messages when an object receives an invalid message.

trace_effect! turns on effect tracing. When a message or object in the trace_messages or trace_objects lists is encountered, message debug tracing will be enabled for all messages sent as a result of that message being sent, if debug is enabled for the msg class. Only one effect trace can be active at a time.

trace_selective! turns on selective message tracing. When a message or object in the trace_messages or trace_objects lists is encountered, information about that one message will be printed, if debug is enabled for the msg class.

trace_all! enables tracing of all messages when debug is enabled for the msg class. This is the default trace mode.

trace_messages[=-+] sets, deletes, or adds messages to be traced when debugging is enabled.

trace_no_messages! clears the list of traced messages.

trace_objects[=-+] sets, deletes, or adds object names to be traced when debugging is enabled.

trace_no_objects! clears the list of traced objects.

EXAMPLE

/* use msg for debugging */ /* put some script here */ msg debugon!; /* type in messages you would like to debug */ msg debugoff!

SEE ALSO

object(lymb), parser(lymb), collection(lymb)


Please send comments and suggestions to
consult@rpi.edu