Macro enable to easily alias keywords in C, but can it be used to change macro keywords too, so instead of:
#include <stdlib.h>
#define se if
one may write
#inkludu <stdlib.h>
#difinu se if
In other words, can preprocessing directives be aliased, preferably out of the code itself, for example with a compiler argument such as -D
for gcc.
A simple test as the following will fail:
#define difinu define
#difinu valoro 2
int main() {
int aĵo = valoro;
return 0;
}
with the following error:
% clang makro.c -o makro
makro.c:2:2: error: invalid preprocessing directive
#difinu valoro 2
^
makro.c:5:16: error: use of undeclared identifier 'valoro'
int aĵo = valoro;
^
2 errors generated.