[vtk-developers] More wrapper stuff

David Gobbi david.gobbi at gmail.com
Thu May 20 11:14:32 EDT 2010


Hi All,

I've been playing around with the lex/yacc parser front-end to the
wrappers.  At this point, I have a version that can parse all of the
VTK class header files, including the parts that used to be blocked
off by //BTX, //ETX.  The new parser more-or-less does the following:

1) parse all classes in the header file (though for now it only builds
a FileInfo struct for the one that matches the filename)
2) parse templates (but throw away template info for now)
3) parse enums, typedefs, internal classes (but throw away the info for now)
4) parse scoped names, e.g. vtkSomeClass::InternalType as IDs
5) in general, it recognizes much more C++ syntax than the parser in VTK

It's all based on the original VTK wrapper lex/yacc parser, just
cleaned up a bit and beefed up substantially. If anyone wants to play
with it, I have a VTK-to-XML converter at
http://github.com/dgobbi/WrapVTK.  Eventually I'd like to get it to
store enum and template info in the FileInfo structure but I have no
timeline for that... my main goal here was to get it to parse more of
the header files and eliminate the need for //BTX //ETX.

  David



More information about the vtk-developers mailing list