Hmmm... Or you could try using pegged (or CTPG or goldie or dparser). I haven't played with it too much, but there's a C grammar, and it mentions the ability to specify semantic actions, so.... That's like 1/3 of the way to something usable.
https://github.com/PhilippeSigaud/Pegged/wiki/Semantic-Actions
signature.asc
Description: OpenPGP digital signature
