[DGD] Reprise: parse_string implementation of restore_variable()

bart at wotf.org bart at wotf.org
Thu Oct 30 10:21:26 CET 2008


And fixed a small bug in handling what looks like an int or float that is
inside a string.

On Wed, 29 Oct 2008 12:57:14 +0100, bart wrote
> 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/
> 
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd


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




More information about the DGD mailing list