Phantasmal MUD Lib for DGD

Phantasmal Site > Phantasmal API > API Listing > basic_unq_parse

API Function: basic_unq_parse

Summary:
convert an UNQ file to parsed UNQ data

Defined In LPC Object:
/usr/common/obj/basic_unq_parser.c

Prototype:
mixed *basic_unq_parse(string text_block)

Can Be Called By:
Anybody

Description:

The block is parsed into UNQ and returned as an array. The array will consist of an even number of elements, paired off as label and block. Unlabelled blocks will have a label of 'nil'. The blocks will consist of either a single string or an array. If an array, the array will be in the same format described here, with an even number of elements alternating labels and blocks.

This UNQ parser will handle backslash escaping, including control characters.

Return Value:

The UNQ data described above, or nil if parsing fails.

Errors:
Errors will be caught and logged if parsing fails, but no errors will occur in the calling function's scope.

See Also:
unq_parse_with_dtd , trim_empty_tags