OMG .. not believing it ...
//// test program xx.flx ////// LOAD "grammar.automaton"; println$ "Well, LOAD didn't crash"; ////////////////////////////// ~/felix>flx --test=build/release --static -c --force xx Saving automaton grammar.automaton LOADING GRAMMAR AUTOMATON grammar.automaton Channel open Read parsing device Read counter = 675 Loaded local data loaded dssls = expressions,statements,type_decls,executable,variables,assignment,control,conditional,loops,assertions,namespaces,requirements,functions,patterns,cbind,regexps,macros,felix Cached parser data loaded from grammar.automaton Doing scheme .. 17 fragments importing 601 Rules imported ~/felix>echo $? 0 ~/felix>./xx Well, LOAD didn't crash Of course this proves nothing .. since in this case the extended grammar was already loaded. NOTE: this doesn't reload any parsed statements. What will happen is: I will change the flx harness to pass the grammar using --syntax. The parser function (well, somewhere, one of them .. ) will try to run a dummy file that says LOAD "grammar.automaton"; If that fails, it will run the --syntax inputs instead. They already say SAVE "grammar.automaton" so next time the load should work. There's another change: the syntax will only be processed ONCE per run of flxg, and held in a global variable. At present, the syntax is recalculated every include file. This will be sped up a LOT by loading the automaton, but it just isn't necessary to do it at all. Felix can already transfer parser state from one file to another (otherwise, autoimports wouldn't work, would they?) The main problem is figuring out how to add the variable to "syms", since the type isn't known. -- 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