I want to manipulate the output of lex. There is only one write to yyout, in the ECHO macro. The macro is surrounded by "#ifndef ECHO", so I am replacing it with my desired action. However, I want to be sure to correctly replicate the original lex behavior. Lex defines ECHO to this code fragment:
do {
if (fwrite( yytext, yyleng, 1, yyout )) {
}
} while (0)
Can anyone guess why the output is not simply "fwrite(...)"?