[net.lang.c++] Help unsing YACC/LEX with C++

eps@ihwpt.UUCP (ed schan) (08/15/86)

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