Related articles |
---|
BISON: multiple parsers within a single program. pendell@hotmail.com (2002-12-19) |
Re: BISON: multiple parsers within a single program. clint@0lsen.net (Clint Olsen) (2002-12-22) |
From: | pendell@hotmail.com (pendell) |
Newsgroups: | comp.compilers |
Date: | 19 Dec 2002 12:35:25 -0500 |
Organization: | http://groups.google.com/ |
Keywords: | parse, yacc, question |
Posted-Date: | 19 Dec 2002 12:35:25 EST |
The Problem:
4 files.
File one is a list of objects and criteria.
File two is a list of file names which may match this criteria.
We read these two files to develop a master list of yet ANOTHER two
file types. We then read the new files from this list, which have the
following characteristics:
1. Contains a header and a body of data.
2. Data of different types -- some by keyword, some by position, some
by position relative to keyword. .
3. Some entries in type 1 may refer to multiple entries in type 2.
My solution:
Use Flex/Bison to generate four parsers, one for each file. I will
then build a driver which will direct the use of the parsers among the
files and store the collected data in central data structures.
=============
Does this sound like a feasible approach? Or is FLEX/BISON going to
do something strange? Are there some gotchas lurking in the weeds
that I'm not aware of? I've never tried multiple parsers within a
single program before, and although the documentation for Bison says
it's possible -- I wonder. I'd really like a second opinion before I
go off and spend a week trying to implement something before finding
out I've wasted my time.
Opinions?
Many thanks for any assistance you can offer.
Respectfully,
Brian P.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.