Unfortunately I have to abandon attempts to completely avoid rebuilding the automaton except when necessary. This is because I need a variable to save it in, and I cannot type the variable.
It is possible to save the automaton as a Marshalled string, and rebuild it from the string, this will probably be faster than rebuilding it from rules. This avoids the problem by making the type of the saved automaton "string" :) But this is annoying. It isn't right. I think this problem would go away if Dypgen were to emit the type as, eg parsing_device_t. The only hassle would be the parse stuff would have to come *before* the mtypes2.ml module which defines the type of the "syms" variable would would hold the parsing device. It's not clear how to get the variable out of the parse or into it, neither global nor local data can be used because the type of the parsing device depends on them. There is one way to do it: using Obj.magic .. but I'm loathe to use that :) Another way is a global variable in the parser module, I don't like that either. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language