hawker (01/17/83)
I have posted into "net.sources" a companion article
which contains the necessary modifications to yacc(1) sup-
porting multiple parsers. Sorry, but I haven't gotten
around to studying lex(1) and handling it also. The text is
a diff(1) listing of the changes, which include removal of
the fixed file name bugs.
As for the lex problem, my normal technique is to have
only one lexical analyzer which handles all input tokens for
the entire language. Each input line (statement) is read
and completely reduced to lexical tokens with corresponding
descriptors. These descriptors are placed into a vector
used by both grammar parsers -- each individual parser knows
by class which tokens are invalid to it.
I also notice that the multiple-mode lex specification
previously posted in the net should work as well. Sorry, I
don't have an analysis of which will work better.
If I can be of any assistance, please feel free to call
me, send U.S mail, respond by electronic caterwauling, etc.
Net mail: ...randvax!trw-unix!trwspp!hawker
Real Life: Thomas S. (Tom) Hawker
TRW DSG
One Space Park, Bldg R2/2009
Redondo Beach, CA 90278
Phone: (213) 535-6166