[DGD] parse_string implementation of restore_variable()

bart at wotf.org bart at wotf.org
Wed Oct 29 12:57:14 CET 2008


Hey,

I wrote a bit of parse_string grammar for parsing strings in mudos
save_variable() format and restore the variable contained in it.
It does not handle objects, and can't deal with 'nil', however, it is
meant for parsing a mudmode data stream, and both objects and nil values
should not occur in those (objects because they make no sense, and nil
because mudos/fluffos do not encode nil in save_variable format).

If you need object handling, it should be relatively easy to add, I'll likely
do so myself over time.

A small library implementing this can be found at:

http://mud.wotf.org/saverestorevar.c

Note, it also contains a save_variable() implementation. 

There are probably many enhancements possible still, but this is a big
improvement over the hand written parsers I have seen so far, both in
performance and reliability.

If you have any improvements, drop me a mail :)

Bart.
--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/




More information about the DGD mailing list