Newsgroups: comp.lang.c++
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!ibma0.cs.uiuc.edu!ibma0.cs.uiuc.edu!murphy
From: murphy@ibma0.cs.uiuc.edu (Mick Murphy)
Subject: Roskind Grammar
Summary: Need help parsing C++ code
Sender: news@ibma0.cs.uiuc.edu
Message-ID: <28147D0D.42F9@ibma0.cs.uiuc.edu>
Date: Tue, 23 Apr 1991 18:29:33 GMT
Organization: University of Illinois at Urbana-Champaign
Keywords: Roskind, grammar, parsing
Lines: 27

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.

