Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!orion.oac.uci.edu!uci-ics!gateway From: schmidt@crimee.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c++ Subject: YACCable grammars available for C++ and C Keywords: Grammar, C++ Message-ID: <25F844F7.28923@paris.ics.uci.edu> Date: 10 Mar 90 00:06:15 GMT Reply-To: schmidt@crimee.ics.uci.edu (Doug Schmidt) Distribution: usa Organization: University of California, Irvine - Dept of ICS Lines: 38 This was posted for Jim Roskind (jar@ileaf.com) because his news posting facilities were not delivering outgoings messages consistently: I (Jim) have written a pair of YACC able grammars for C++ and C, and posted them to the net (or at least tried). The posting consists of 4 items, including the 2 grammars, a paper on the ambiguities in the C++ syntax, and an introductory letter. Since these items total 160K of text, I am reluctant to "re-post" until I am sure that the first posting has fallen into the bit bucket. In the mean time, Doug Lea and Doug Schmidt have graciously offer to provide anonymous ftp sites for these 4 files. Note that the grammars are VERY clean, and make no use of the YACC %prec and %assoc constructs. The C++ grammar also supports old style function definitions (a feat that no other parser I am aware of offers). The associated paper identifies a number of fundamental ambiguities in C++ that have not received public exposure (read: they represent buggy areas of all existing compilers and translators that I know of). The grammars have copyrights that should allow for their use in any commercial or non-commercial releases, and there are no fees involved with their use (nor are these items copylefted). The files can be obtained from: ics.uci.edu (128.195.1.1) in the ftp/pub directory as c++-grammar.1.0.tar.Z. c++gram.tar.Z, holding them all available for anonymous ftp at mach1.npac.syr.edu:~ftp/pub/C++ and labrea.stanford.edu:~ftp/pub Jim Roskind jar@ileaf.com -- facilis descensus avernus ---------------------------------------- schmidt@ics.uci.edu (ARPA) office: (714) 856-4043