From: Braden M. <br...@en...> - 2007-08-02 05:43:29
|
I've decided to replace the ANTLR-based parsers in OpenVRML with Spirit-based ones for the 0.17.0 release. There is plenty of motivation for this: * Using Spirit means there is no code generation step. * Spirit is included with Boost; OpenVRML already requires Boost, so using Spirit doesn't really add a dependency. * Spirit is entirely a template library; so there is no run-time library to link with. * C++ has been a second-class citizen for ANTLR; and there's no sign of that changing. If anything, things are a bit worse in this regard with ANTLR 3.0. * The release of ANTLR 3.0 means it's time either to upgrade or to migrate away from ANTLR. I've chosen the latter. Now, all that said, I have made significant progress in this direction. As of this writing, I have a Spirit-based parser for VRML97 that is at least as strict as the existing ANTLR parser. And perhaps the best thing about it is that its semantic actions are pluggable. That means it makes sense to expose the parser itself to users; users can invoke the parser with arbitrary semantic actions. This should be extremely useful to persons who just want to read in some VRML and do something arbitrary with it. Even better, the parser is entirely in headers--users who use no other part of OpenVRML will not need to link with libopenvrml. I haven't committed anything to CVS just yet. I'd like to finish migrating libopenvrml to use the new parser before doing that. But that shouldn't be too far away at this point. -- Braden McDaniel e-mail: <br...@en...> <http://endoframe.com> Jabber: <br...@ja...> |