Thanks, I think it's a great start =)
About doing something else, well, yes. Most things are correct and done wonderfully, but some aren't. First, we can't have a monolitic output file, that simply won't work because of the interdependencies between the include files.
We need to have 1 output file per file listed on the input file. Or even easier, to simplify, we don't need to have a input file which lists the target files. Just use the input file as the .h file. We can build a script which calls the parser several times to automate this later.
Secondly, the output file needs to be on the format declared here:
http://wiki.lazarus.freepascal.org/index.php/PasCocoa#Implementation_DetailsLook at the already partially translated files for inspiration. In theory the parser should give an output which is exactly like the existing partially converted files, but only done automatically. I added the parser to subversion:
http://wiki.lazarus.freepascal.org/index.php/PasCocoa#SubversionPlease submit future modifications of the parser as diff files, or maybe we can give your write access to that directory.
http://wiki.lazarus.freepascal.org/Creating_A_Patchthanks,