I need write a metaobject compiler for C (like a MOC in Qt). I will add to *.c source own keywords and mechanisms (like slots/signals in Qt).
I'll represent this work in three stages:
- Writing C-code with own constructions
- Parsing and generation of new source file without own constructions using metaobject compiler.
- Compilation of file from stage 2 using, for example, GCC.
So, I have questions about second stage. MOC will be a pure C lexical analyzer/syntax analyzer with addition of analysing my constructions, right? Whether there are such pure C analyzers in the free access? Whether really to build in them parsing of my code? And generally, I think in the correct direction?