Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cbosgd!ihnp4!ihwpt!eps From: eps@ihwpt.UUCP (ed schan) Newsgroups: net.lang.c++ Subject: Help unsing YACC/LEX with C++ Message-ID: <1055@ihwpt.UUCP> Date: Fri, 15-Aug-86 08:55:31 EDT Article-I.D.: ihwpt.1055 Posted: Fri Aug 15 08:55:31 1986 Date-Received: Sat, 16-Aug-86 07:37:22 EDT Distribution: net Organization: AT&T Bell Laboratories Lines: 22 I am trying to use a YACC/LEX generated parser with action routines written in C++. If I avoid using the C++ stream IO facility, I can get it to work reasonably well (of course the YACC generated parser produces numerous warnings from the compiler). When I try to use stream IO, things break. The main problem is that I can get the stream get(char) function to give me the newline character that the parser is waiting to see. I haved tried various kludges using the get(char*, int, int) function but this is even worse. It keeps returning without putting any new characters in my buffer and refuses to return that newline. The question - can anyone offer any help on how to get around this problem? Also, is there a version of YACC and LEX which will generate clean C++ code? Thanks in advance. Ed Schan AT&T Bell Labs ihnp4!ihesa!eps 1-312-979-3564