|lex/flex and source correspondence firstname.lastname@example.org (2007-11-06)|
|Re: lex/flex and source correspondence email@example.com (Gene) (2007-11-08)|
|Re: lex/flex and source correspondence firstname.lastname@example.org (Thomas Dickey) (2007-11-29)|
|From:||Thomas Dickey <email@example.com>|
|Date:||Thu, 29 Nov 2007 14:52:10 -0000|
|Organization:||RadixNet Internet Services|
> 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.
> Is this an idea that has been explored and thought of as unworthy?
> I know that multiple input files could increase the size of the
> buffer(s) but hey, we are living in the age of 100s of MB of main
> [This is a very old idea. Turbo Pascal buffered full source files in
> RAM in the 1980s. -John]
Either lex or flex can do this by redefining the input/outputs.
However, flex can be used to support multiple parsers (by restricting
the exported symbols), while for lex it's (ahem) doable but not
Regarding buffering full source files - even as main memory's
increased, there are still text files that people want to edit which
are larger. So it's not a universal solution...
Thomas E. Dickey
Return to the
Search the comp.compilers archives again.