help-bison
[Top][All Lists]
Advanced

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

getting a copy of all characters flex has processed


From: Rainer Gerhards
Subject: getting a copy of all characters flex has processed
Date: Fri, 26 Apr 2019 11:26:49 +0200

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



reply via email to

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