Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!brazos!rich From: rich@Rice.edu (Rich Murphey) Newsgroups: comp.lang.c++ Subject: Re: Yacc grammar for c++ Message-ID: Date: 19 Jan 90 22:05:53 GMT References: <7453@chaph.usc.edu> <6300001@ux1.cso.uiuc.edu> Sender: root@rice.edu Organization: Department of Electrical and Computer Engineering, Rice University Lines: 17 In-reply-to: cs326ad@ux1.cso.uiuc.edu's message of 19 Jan 90 01:48:37 GMT Both bison and flex will work with g++. If you want to use ostreams (cerr) for error messages you might want to redefine ECHO and YY_FATAL_ERROR for flex: #include #undef ECHO #define ECHO cerr << yytext #undef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) { cerr << msg << '\n'; exit (1);} #define input yyinput I've offered some example code using bison, flex and libg++ to Doug Lea, but haven't finished all the paperwork. I'll post a note when it's ready. -- Rich@rice.edu