Googles re2 is now part of Felix. You need to do this: git pull # update Felix git submodule init # link re2 git submodule update # grab re2
The re2 submodule is hosted at g...@github.com:skaller/re2.git At this time, re2 is not auto-built in the standard library, you have to include "std/re2"; first, to use it. This is because it uses the Rtti module to dynamically create a shape object for RE2, the regexp class from re2, and to use it there is a hack: the shape is stored in the thread_frame object (Felix global storage) with a particular variable name, and then that name is used in the C code that creates an RE2 object as the shape pointer. To make sure the variable isn't lost, since it is only used hidden inside C code, the variable is "force used" by making it the argument of a C_hack::ignore() procedure (which has the wonderful side effect of telling Felix NOT to ignore its argument :) Originally, if re2 were not available, this would cause the library build to fail, since re2 has to be linked in, just to create the shape, even if re2 itself is never used. Since the support is experimental, and at the time required installation of an external library, the module was left out of std/__init__.flx to prevent the requirement of linking the library. Now, pending some testing, re2 is built-in to Felix, so this failure shouldn't happen (except on Windows, which is no longer actively supported because I no longer have access to a Windows development platform). However the forced linkage is not really acceptable. The dynamic shape create was primarily intended to test if it could be done and what the impact would be. The issue here is: to create a shape, we need to link the class in to get the destructor. What should happen is: the shape is hauled into the link if, and only if, an object of that shape is actually created. However at present, I don't know if there is any support to tell flx_ogen.ml when a particular primitive requires a shape, and if so, how to generate it. [However flx_ogen.ml does know which types are used already] Actually were RE2 a first class type everything might already work. The problem is, it isn't: it isn't copyable. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language