a little life

Harvey J. Stein abel@netvision.net.il
Wed, 9 Jul 1997 19:02:07 +0300


ET writes:
 > 2.  Does anyone have Lisp code that can parse a C (and/or) C++ header
 > file?  I know the CIGLOO, part of the bigloo project, can do some, but
 > are there any others?

There's something that comes with scheme-to-C (which I think is
written in scheme), and there's also Lars Thomas Hansen's ffigen
(http://www.cs.uoregon.edu/~lth/ffigen/), but the parser isn't written
in lisp - it uses a modified version of lcc to output the scheme code
for the foreign function interface.

The bigloo stuff is nice because it comes with a reasonably nice lex &
yacc written in scheme, the C parser is written in scheme using
bigloo's lex & yacc, and it has a decent compiler.  I've been using it
to parse Pascal header files and output readers & writers for all the
declared types.

-- 
Harvey J. Stein
Berger Financial Research
abel@netvision.net.il