[comp.lang.c++] Roskind Grammar

murphy@ibma0.cs.uiuc.edu (Mick Murphy) (04/24/91)

I have been doing some work with translating C++ code into 
an equivalent Lisp representation.  I eventually want to 
be able to do some manipulations with the Lisp representation
and then regenerate Lisp code.

I have been using Berkeley YACC and flex and the grammar 
written by Jim Roskind.  I would like to get around the 
hack in the lex file presented by Roskind that decides that 
an identifier is a TYPEDEF based on the 1st character (BTW --
Roskind makes it very clear that the flex file that he provides
is just for experimenting and is not meant to be complete).

My question is -- Are there any books that I could read to get 
more information about Berkeley YACC and flex in particular or 
YACC and lex in general?  I am particularly interested in the
interface between the two tools.  I have considered writing my own
lexer in C, but I need more information on the interface to yacc.

Thanks for any information.

Mick
mick@uiuc.edu 

P.S. If a query of this type belongs in a different newsgroup, please
let me know and I will redirect it.  I have seen some discussion of the
Roskind grammar on this group, so that's why I posted here.