Related articles |
---|
Using FLEX to do macro processing - enhancement to include processing cdh@world.std.com (1992-07-23) |
Re: Using FLEX to do macro processing - enhancement to include ... vern@horse.ee.lbl.gov (1992-07-24) |
Newsgroups: | comp.compilers |
From: | cdh@world.std.com (Charles D Havener) |
Organization: | The World Public Access UNIX, Brookline, MA |
Date: | Thu, 23 Jul 1992 13:21:24 GMT |
Keywords: | flex, macros, question |
Has there been any discussion about using FLEX to handle macro expansion
as opposed to just #include type processing as descriobed in the Flex
manual?
For example, can I use yy_create_buffer(FILE *file,int size) with a NIL
FILE * and merely unput() the macro text into this buffer? Then I could
use yy_switch_buffer(..) to switch to the macro buffer. I haven't tried
this. Is there some other recommended way? I really don't want to write
the expanded macro out to a disk file and then read it back in.
Charlie Havener at Epsilon - Burlington , Mass. 617-273-2630 x6064
cdh@world.std.com
[Plain unput() might work, though I imagine it'd be more robust to
redefine YY_INPUT to copy in expanded text when it's reading from a
buffer corresponding to expanded text. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.