Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!math.lsa.umich.edu!emv From: rich@Rice.edu (Richard Murphey) Newsgroups: comp.archives Subject: [comp.lang.c...] Re: Interfacing yacc/lex with C++ Message-ID: <1990Sep20.024223.25562@math.lsa.umich.edu> Date: 20 Sep 90 02:42:23 GMT Sender: emv@math.lsa.umich.edu (Edward Vielmetti) Reply-To: Rich Murphey Followup-To: comp.lang.c,comp.lang.c++ Organization: Department of Electrical and Computer Engineering, Rice Lines: 25 Approved: emv@math.lsa.umich.edu (Edward Vielmetti) X-Original-Newsgroups: comp.lang.c,comp.lang.c++ Archive-name: interp/20-Sep-90 Original-posting-by: rich@Rice.edu (Richard Murphey) Original-subject: Re: Interfacing yacc/lex with C++ Archive-site: qed.rice.edu [128.42.4.38] Archive-directory: /pub Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti) In article <1635@software.software.org> burkhard@software.org (Neil Burkhard) writes: I'm trying to use yacc/lex in a program I'm developing in C++ using Apollo's C++ system. Can anybody shed some light on how I can have the yacc action routines invoke C++ routines? Not obvious how I can have the compiler figure out the proper names since C++ mangles them. Note: everything is in C++ (including 'main') except yacc/lex stuff. I have the beginnings of an extension language written in g++, bison and flex (free C++, yacc and lex workalikes). The sources are on qed.rice.edu (128.42.4.38) in /pub/interp-1.9.tar.Z and are distributed under the GPL. The texinfo sources for the documentation are included. The bison (or yacc) output is compiled with g++; all you need is a define or two to take into account the differences in I/O. Any comments or suggestions on interp-1.9 are welcome! Rich