getting a copy of all characters flex has processed

Rainer Gerhards <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <CADk+mPBaCJ7M5M+0vcnVDNKQyJphkMr2X+PQWqEo3ctnmhERyA@mail.gmail.com>
Hi there,

sorry if there is an obvious solution - I didn't find it.

I have a config file parser created with flex/bison. It includes
"include" functionality. Includes works with files as well as
user-provided strings (via yy_scan_buffer()).

As an end-user debugging tool, I would like to optionally generate a
single output file which contains the full configuration with the
includes expanded.

E.g. I have
file1:
f1l1
f1l2
include file 2
f1l3
include text "included text"
f1l4

file2:
f2l1

Output file should be:
f1l1
f1l2
f2l1
f1l3
included text
f1l4

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?

Any help is deeply appreciated.
Rainer

_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.