Linking two yacc (y.tab.o) files
Ronnie Kon
kon at wolverine.Stanford.EDU
Thu Mar 1 10:35:48 AEST 1990
In article <238 at ncrons.StPaul.NCR.COM> johnson at ncrons.StPaul.NCR.COM (Wayne D. Johnson) writes:
>#
># The kludge is to simply sed with the command
>#
># sed 's/\<yy/parser1_yy/g' < y.tab.c > parser1.c
>
>I have seen an implementation where they #defined the yy as
>somthing else before the compile. Who needs sed?
>
This will not work with a functioning C preprocessor. Only complete
identifiers should be replaced. Thus a variable named "yy" would get
changed, but "yytext" will not.
--
-------------------------------------------------------------------------------
Ronnie Kon | "I don't know about your brain,
ronnie at mindcraft.com | but mine is really bossy"
...!{decwrl,hpda}!mindcrf!ronnie | -- Laurie Anderson
-------------------------------------------------------------------------------
More information about the Comp.unix.wizards
mailing list