It must also be possible to continue to parse after the constant, see the value " gurka" in my example.
Also, you don't support recursive data, do you? Ie, ({@0}).
/ Mirar
Previous text:
2003-02-11 15:11: Subject: sscanf %O
Like this?
private object compile_handler = class { mapping(string:mixed) get_default_module() { return ([ "this_program":0, "aggregate":aggregate, "aggregate_mapping":aggregate_mapping, "aggregate_multiset":aggregate_multiset ]); }
mixed resolv(string id, void|string fn, void|string ch) { error( "The symbol %O is forbidden.\n", id ); } }();
mixed eval(string what) { what -= "lambda"; what -= "class"; return compile_string( "mixed foo=" + what + ";", 0, compile_handler )()->foo; }
/ Martin Nilsson (Åskblod)