Hello there, I'm in a situation where I need to write something like this
(in a .lex file)
"printf" { return PRINTFF; }
"scanf" { return SCANFF; }
"int" { return INT; }
"float" { return FLOAT; }
"char" { return CHAR; }
"void" { return VOID; }
"return" { return RETURN; }
"for" { return FOR; }
"if" { return IF; }
"else" { return ELSE; }
And i wanted to know if I can simplify this by using a X macros or something similar to this ?
I have done something that you can check with the file but I have no idea how I can exploit this because I've nerver touched Lex before.
Thanks in advance !