Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!uwvax!oddjob!kaon!nucsrl!naim From: naim@eecs.nwu.edu (Naim Abdullah) Newsgroups: comp.lang.c Subject: Are yacc parsers portable ? Message-ID: <3950010@eecs.nwu.edu> Date: 30 Jul 88 01:41:48 GMT Organization: Northwestern U, Evanston IL, USA Lines: 28 [I am a sporadic reader of this newsgroup, so please forgive me if this question has been beaten to death here]. Is the C parser produced by yacc, portable ? I was looking at it and it had stuff like: yyparse() { short yys[YYMAXDEPTH]; register short yystate, *yyps, yyn; ... yyps= &yys[-1]; ... } It seems to me that negative indices on arrays are probably not portable. Is it really necessary for yacc to do these tricks, or can it produce portable code that is just as efficient ? Is bison any better in this respect ? Thank you. Naim Abdullah Dept. of EECS, Northwestern University Internet: naim@eecs.nwu.edu Uucp: {oddjob, chinet, att}!nucsrl!naim