Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!snorkelwacker!ira.uka.de!smurf!gopnbg!tmpmbx!boss!gtc!aragon!ananke!kaiser From: kaiser@aragon.gtc.de (Andreas Kaiser) Newsgroups: comp.lang.c Subject: C-BNF notation for Yacc ? Message-ID: <45.2659B830@aragon.gtc.de> Date: 22 May 90 21:43:28 GMT Organization: Ananke, Stuttgart, FRG Lines: 26 > I want to write some programs which recognize the C-syntax > to selectively look at lots of C-sources. > I want to do thing like "cflow". Extract information from > C-sources. To do this I want to use Yacc (and maybe lex) > Is there anyone who has available the input part of Yacc? > I need the formal description. You can look for the GNU C compiler. It has a Yacc parser (or a Bison parser, Bison is a yacc clone). But you might get problems with the copyleft. I have seen a file in german Fidonet, pretending to be a C++ Yacc parser. Haven't loaded it, but since C++ is a superset of C it should help: The description line (that's all I know): YACCPP.ZIP 49942 05-09-90 YACC - Grammar for ANSI-C and C++ Available in german Fidonet node 2:507/205. Tel-Nr 49-231-47126. -- :::::::::::::::::::: Bang: ..!unido!gtc!aragon!ananke!kaiser :: Andreas Kaiser :: Smart: kaiser@ananke.UUCP :::::::::::::::::::: Fido: 2:509/5.7206