5

I need to write a few c header wrappers for a new programming language and would like something like gccxml but without the full dependency on gcc and the problems it gives on a windows system.

Just needs to read C not C++. Output in any format is okay as long it is fully documented.

Need it for Curl, SQLite, GTK2, SDL, OpenGL, Win32 API and C posix API's on Linux/Solaris/FreeBSD/MacOSX.

Lothar
  • 12,537
  • 6
  • 72
  • 121
  • Try to use [ABI Compliance Checker](http://ispras.linuxbase.org/index.php/ABI_compliance_checker#Usage_as_a_Parser_of_API) tool as a parser of C header files. See [this answer](http://stackoverflow.com/a/12546962/241776) for instructions on how to do this. – linuxbuild Sep 22 '12 at 19:33

3 Answers3

2

VivaCore is very cool. Have you tried SWIG the wikipedia page on ffi has some good links too. I think there is a MSVC codedom example that does C also.

RandomNickName42
  • 5,923
  • 1
  • 36
  • 35
1

See our SD C Front End for DMS. Full C parsing, symbol table construction, post parsing dump of any information you like. Can dump code and symbol tables in XML format.

Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
  • Wow, haven't seen this answer I gave since I wrote it 4 years ago. Added standard SO indication of self-interest, *our*, that was not a requirement when I first gave this answer. – Ira Baxter Jan 25 '15 at 06:04
0

You may like pycparser in Python. Used in CFFI and other awesome projects.

anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140