<div class="gmail_quote">On Thu, May 20, 2010 at 11:14 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi All,<br>
<br>
I've been playing around with the lex/yacc parser front-end to the<br>
wrappers.  At this point, I have a version that can parse all of the<br>
VTK class header files, including the parts that used to be blocked<br>
off by //BTX, //ETX.  The new parser more-or-less does the following:<br>
<br>
1) parse all classes in the header file (though for now it only builds<br>
a FileInfo struct for the one that matches the filename)<br>
2) parse templates (but throw away template info for now)<br>
3) parse enums, typedefs, internal classes (but throw away the info for now)<br>
4) parse scoped names, e.g. vtkSomeClass::InternalType as IDs<br>
5) in general, it recognizes much more C++ syntax than the parser in VTK<br></blockquote><div><br></div><div>This sounds great, especially if we could get rid of the BTX/ETX blocks, and being able to wrap enums would allow us to improve type safety. Could we then use those enum types in function declarations, and call that from all wrapped languages?</div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
It's all based on the original VTK wrapper lex/yacc parser, just<br>
cleaned up a bit and beefed up substantially. If anyone wants to play<br>
with it, I have a VTK-to-XML converter at<br>
<a href="http://github.com/dgobbi/WrapVTK" target="_blank">http://github.com/dgobbi/WrapVTK</a>.  Eventually I'd like to get it to<br>
store enum and template info in the FileInfo structure but I have no<br>
timeline for that... my main goal here was to get it to parse more of<br>
the header files and eliminate the need for //BTX //ETX.<br></blockquote><div><br></div><div>This sounds very promising. I will try to make some time to look through this, it sounds like you are adding quite a few things from my own personal wishlist. I would like to make a topic branch with your changes in it, see how well they test out with all of the wrapped languages.</div>

<div><br></div><div>One thing I am not entirely clear on - is this support for all three wrapped languages, or some subset of them? If it is not for all three, do you have a feeling for how difficult it would be to extend it?</div>

<div><br>Thanks,</div><div><br></div><div>Marcus</div></div>