Re: lex/flex and source correspondence



On Nov 6, 8:54 am, parthaspand...@xxxxxxxxx wrote:
A flex generated scanner could decide to store the entire input file
in memory. That way, a single buffer can be used in several places in
the tool chain that uses a scanner. ...

[This is a very old idea. Turbo Pascal buffered full source files in
RAM in the 1980s. -John]

The C preprocessor of gcc also buffers entire files, or at least did
in the version I studied some years ago. It used a hand-coded
scanner, however, not lex/flex.

.