Possible Duplicate:
Is there a good Python library that can parse C++?
I want Python to scan through a file (a .cpp file) and generate tokens from it using the in-built Python tokeniser.How can this be achieved?
Possible Duplicate:
Is there a good Python library that can parse C++?
I want Python to scan through a file (a .cpp file) and generate tokens from it using the in-built Python tokeniser.How can this be achieved?
The built-in tokenizer and ast stuff is for parsing Python, not other languages like C++.
You may want to look at GCC-XML.