<div dir="ltr">Hi Matt,<div><br></div><div>Yes, I have tried Pygccxml. But I would prefer not to use Python.<div>But since that you mentioned pygccxml, can you give me an pygccxml example to parse x and y from that previous c++ code?</div><div>And if possible an example of castxml also to parse x and y. If trimming is not possible I am okay with that.</div><div><br></div><div>Thanks,</div></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><span style="font-size:12.8000001907349px">Ranadeep</span><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sat, Oct 1, 2016 at 8:46 PM, Matt <span dir="ltr"><<a href="mailto:mattator@gmail.com" target="_blank">mattator@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,<br>
<br>
You can filter the results with pygccxml.<br>
<div><div class="h5"><br>
2016-10-01 13:50 GMT+02:00 Ranadeep Biswas <<a href="mailto:ranadeep@cmi.ac.in">ranadeep@cmi.ac.in</a>>:<br>
> Hello all,<br>
><br>
> I am doing this project that needs to parse a c/c++ program and generate its<br>
> control flow graph so that I can do some analysis on it. Can this be done<br>
> using castxml?<br>
><br>
> I tried to use castxml to generate xml output to build the CFG, but I can<br>
> not generate the output as per my need. I could not find any good<br>
> documentations. May be I am missing something.<br>
><br>
> Consider this very simple c++ program.<br>
><br>
> // foo.cpp<br>
> int main(){<br>
>   int x, y;<br>
>   x = 0;<br>
>   y = x + 3;<br>
>   return 0;<br>
> }<br>
><br>
> now I run `castxml --castxml-cc-gnu g++ --castxml-gccxml foo.cpp`. It<br>
> generates `foo.xml` file, but xml file contains a lot of other tags. But I<br>
> don't find tags for variable x and y. Also is it possible to trim the<br>
> output, so that I can get tags for only main, x, y and relevant types?<br>
><br>
> Thanks,<br>
><br>
> Ranadeep<br>
> MSc CS 2nd year<br>
> Chennai Mathematical Institute<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> CastXML mailing list<br>
> <a href="mailto:CastXML@public.kitware.com">CastXML@public.kitware.com</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/castxml" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/castxml</a><br>
><br>
</blockquote></div><br></div></div>