Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!jarthur!uci-ics!hadley From: hadley@ics.uci.edu (Tedd Hadley) Newsgroups: comp.unix.wizards Subject: Re: Linking two yacc (y.tab.o) files Message-ID: <25E59904.18274@paris.ics.uci.edu> Date: 23 Feb 90 20:11:48 GMT References: <25E34681.3787@deimos.cis.ksu.edu> Distribution: usa Lines: 65 jxf@phobos.cis.ksu.edu (Jerry Frain) writes: >I seem to recall a thread in this newsgroup about this problem quite some >time ago, but I did not pay any attention to the solution at the time. >Anybody got any ideas as to how I can solve this dilemma? Here's a very practical (as opposed to pedantically correct) solution. Include the following ".h" file in your yacc file. Replace all with whatever name you wish. Call to parser becomes _yyparse() --- yacc_unique.h --- #define yyact _yyact #define yyback _yyback #define yybgin _yybgin #define yychar _yychar #define yychk _yychk #define yycrank _yycrank #define yydef _yydef #define yyerrflag _yyerrflag #define yyestate _yyestate #define yyexca _yyexca #define yyextra _yyextra #define yyfnd _yyfnd #define yyin _yyin #define yyinput _yyinput #define yyleng _yyleng #define yylex _yylex #define yylineno _yylineno #define yylook _yylook #define yylsp _yylsp #define yylstate _yylstate #define yylval _yylval #define yymatch _yymatch #define yymorfg _yymorfg #define yynerrs _yynerrs #define yyolsp _yyolsp #define yyout _yyout #define yyoutput _yyoutput #define yypact _yypact #define yyparse _yyparse #define yypgo _yypgo #define yyprevious _yyprevious #define yyr1 _yyr1 #define yyr2 _yyr2 #define yysbuf _yysbuf #define yysptr _yysptr #define yysvec _yysvec #define yytchar _yytchar #define yytext _yytext #define yytop _yytop #define yyunput _yyunput #define yyv _yyv #define yyval _yyval #define yyvstop _yyvstop --- yacc_unique.h --- And best of all, no `sed' scripts. ++ Tedd Hadley (hadley@ics.uci.edu)