add a "ignore keyword" option/list for quick diff/merge compiler adaption without a full parser
think of a C compiler for an embedded target that has some special keywords that lead to parsing errors
-
But why do you want to replace it in the merge tool if this is how your code is actually written?
Does your IDE does this?
-
Piotr Mis commented
Alternative solution: set of regular expression rules for replace operation.
-
Piotr Mis commented
I personally would imagine this as kind of preprocessor.
You could list set of #defines and before semantic parse all defines would be replaced.
Imagine following example:
interrupt void int_handler(void);
To "semantic_c.conf" you could put:
#define interruptThan the code seen by semantic parser will look like:
void int_handler(void);Other example:
FUNC(void, AUTOMATIC) foo( VAR(uint8, AUTOMATIC) bar);put to semantic_c.conf:
#define FUNC(rettype, memclass) rettype
#define VAR(type, memclass) typeAnd voila:
final code will be seen as:
void foo( uint8 bar); -
Thanks Christian,
Would you mind elaborating a little bit more?