Related articles |
---|
Two pass compiler using YACC? wsineel@info.win.tue.nl (1990-08-22) |
Re: Two pass compiler using YACC? mkie@vlsivie.at (1990-08-23) |
Re: Two pass compiler using YACC? tbr@virgil.tfic.bc.ca (1990-08-24) |
Re: Two pass compiler using YACC? bart@videovax.tv.tek.com (Bart Massey) (1990-08-25) |
Re: Two pass compiler using YACC? sja@sirius.hut.fi (1990-08-25) |
Re: Two pass compiler using YACC? meissner@osf.org (1990-08-27) |
Two pass compiler using YACC? jar@florida.eng.ileaf.com (1990-09-02) |
Two pass compiler using YACC? meissner@osf.org (1990-09-06) |
Newsgroups: | comp.compilers |
From: | meissner@osf.org |
In-Reply-To: | jar@florida.eng.ileaf.com's message of 3 Sep 90 01:04:55 GMT |
Keywords: | yacc, parse |
Organization: | Compilers Central |
Date: | Thu, 6 Sep 90 12:03:39 -0400 |
| [re using two yacc grammars in the same program]
| IMHO the cleanest solution lies in use of the C preprocessor (as do so
| many solutions :-) ).
|
| Suppose that the only multiply defined external were yyparse and yyerror.
|
| Create a file called "pass1.h" containing the lines:
|
| #define yyparse pass1_yyparse
| #define yyerror pass1_yyerror
| ...
The problem with this type of solution is that a different version of
yacc may define more yy<xxx> external names. If this is the case, you
are hosed. Just because the yacc that your computer vendor only uses
those two symbols today, means diddly squat when you load the new
release, or go to a different machine.
--
Michael Meissner email: meissner@osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.