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

_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to