help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: getting a copy of all characters flex has processed


From: Jannick
Subject: RE: getting a copy of all characters flex has processed
Date: Fri, 26 Apr 2019 20:22:33 +0200

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]