On Fri, 26 Apr 2019 11:26:49 +0200, Rainer Gerhards wrote: > I would like to generate that output file during regular configuration > processing. So in short I need a capability to see each character that flex > processes at exactly the time it processes the character. I did not find a > documented override to do this. > > Is there any way to handle this with flex?
Add 'ECHO;' to the flex rule whose token (yytext) you want to write to stdout. You might want to check the first example in https://westes.github.io/flex/manual/Multiple-Input-Buffers.html#Multiple-In put-Buffers which could be pretty close to what you currently have, but using flex only, not bison. Alternatively, 'gcc -E' could be a starting point which ships the nested include feature if the keyword 'include' was replaced by '#include'. This requires the end user to have 'gcc' available, but that should not be an issue when dealing with 'config.h' I guess. Best, J. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison