Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ulysses.UUCP Path: utzoo!watmath!clyde!burl!ulysses!ggs From: ggs@ulysses.UUCP (Griff Smith) Newsgroups: net.lang.c Subject: Re: C++ and YACC (?) Message-ID: <1183@ulysses.UUCP> Date: Mon, 3-Feb-86 09:38:57 EST Article-I.D.: ulysses.1183 Posted: Mon Feb 3 09:38:57 1986 Date-Received: Wed, 5-Feb-86 00:44:57 EST References: <2615@ukma.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 25 > Will YACC and C++ inter-operate properly? > Or would a new sort of "language hosting" need to be done for C++? > Has anybody done a parser using YACC and C++? > > I won't > have to call yyparse() lots of times (I couldn't figure that one > out when I tried a couple of years ago). But I will need to be > using some code that's C to call code that's C++. Or maybe I can > just compile the yacc output with C++ instead of C? > > Any suggestions? > -- > David Herron, cbosgd!ukma!david, david@UKMA.BITNET, soon, david@uky.csnet. > The output of YACC is compatible with C++. The compiler grumbles a bit about the sloppy function declarations, but there are no fatal errors. Lex is a bit worse; the complaints from the compiler are a bit louder, though still non-fatal. I run the output of lex through a sed script to clean up warnings plus a few self-inflicted problems. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: (201) 582-7736 Internet: ggs@ulysses.uucp UUCP: ulysses!ggs ( {allegra|ihnp4}!ulysses!ggs )