Path: utzoo!utgpu!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!esegue!compilers-sender
From: samples@sequoia.Berkeley.EDU 	 id AA04031; Fri, 11 Aug 89 13:45:09 EDT (for compilers)
Newsgroups: comp.compilers
Subject: C++/ANSI C grammar desired ...
Message-ID: <1989Aug12.010409.2092@esegue.uucp>
Date: 12 Aug 89 01:04:09 GMT
Sender: compilers-sender@esegue.uucp
Reply-To: samples@sequoia.Berkeley.EDU
Organization: Compilers Central
Lines: 32
Approved: compilers@esegue.segue.bos.ma.us

I have been directed to this group as a possible source for a C++
LR or LALR grammar.  Here is my situation: I'm using a non-standard
parser-generator which does not implement, among other things, YACC's
%prec function.  I attempted to modify the Gnu g++ grammar, but
unfortunately, it is distributed already with 41 expected conflicts,
and makes heavy use of %prec to get rid of others.  This makes it
very difficult to translate into a form acceptable by a more limited
LALR parser generator.

Are there other C++ grammars out there that might help me with my
little problem?  I'm not trying to compile C++, simply trying to
preprocess it (I'm experimenting with some techniques for selecting
implementations of abstract data types [classes]), so if the grammar
actually accepts a superset of C++, that's OK, just so long as I can
make useful discriminations (after all the grammar
"prog ::= tokenlist;" solves only part of the problem!-)

Barring the existence of a C++ grammar, I would be interested in any
pointers to LALR/LR grammars that handle ANSI C.  

Any help would be GREATLY appreciated.

Thanks!
Dain
[There are yacc C grammars lying around the net, most due to efforts to
try to prototype ANSI compilers, but I've not seen a free C++ parser other
than gnu's.  -John]
[From samples@sequoia.Berkeley.EDU]
-- 
Send compilers articles to compilers@ima.isc.com or, perhaps, Levine@YALE.EDU
{ decvax | harvard | yale | bbn }!ima.  Meta-mail to ima!compilers-request.
Please send responses to the author of the message, not the poster.