[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/pattern_compiler.c

Compiles up the patterns for use by the add_command system.

See also:
/global/new_parse->add_command()

Written by Pinkfish

Includes

This class includes the following files /include/user_parser.h

Method index

Public Functions

These are functions that everyone can access.

clean_cache
void clean_cache()
compile_pattern
nomask mixed * compile_pattern(string str)

Compiles the pattern. Does no cache checking. This returns only the compiled pattern, it also creates the short pattern as a side effect. The short pattern can be queried by using query_short_pattern()

Parameters:
str - the pattern to compile

Returns:
the compiled pattern

See also:
/include/user_parser.h, query_short_pattern() and /global/new_parse.c


query_pattern
nomask mixed * query_pattern(string pattern)

Returns the compiled pattern to the caller. This checks to see if they pattern is in its internal cache and if it is, it uses that.

Parameters:
pattern - the pattern to compiler

Returns:
the compiler pattern

See also:
/include/user_parser.h


query_short_pattern
string query_short_pattern(string str)

Returns the short pattern for the given pattern string. The short pattern is the message which is shown to the players.

Parameters:
str - the pattern to get the short for

Returns:
the short pattern