Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/3/85; site ukma.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!david From: david@ukma.UUCP (David Herron, NPR Lover) Newsgroups: net.lang.c Subject: C++ and YACC (?) Message-ID: <2615@ukma.UUCP> Date: Sun, 2-Feb-86 21:30:06 EST Article-I.D.: ukma.2615 Posted: Sun Feb 2 21:30:06 1986 Date-Received: Mon, 3-Feb-86 06:33:59 EST Organization: U of Kentucky, Mathematical Sciences, Lexington KY Lines: 23 I'm wanting to learn C++. As the language is geared towards large projects what I have in mind is finally fixing up my BASIC interpretor. (You may remember me posting it to mod.sources last summer). As I know very little about parsing I will want to use a YACC grammar spec for the parser. But will YACC and C++ inter-operate properly? Or would a new sort of "language hosting" need to be done for C++? Has anybody done a parser using YACC and C++? My "working design" at the moment has the grammar also recognizing the normal user-level commands (i.e. RUN, LIST, etc). It generates code lists into an intermediate language, and calls a function to interpret this intermediate language at appropriate times. So I won't have to call yyparse() lots of times (I couldn't figure that one out when I tried a couple of years ago). But I will need to be using some code that's C to call code that's C++. Or maybe I can just compile the yacc output with C++ instead of C? Any suggestions? -- David Herron, cbosgd!ukma!david, david@UKMA.BITNET, soon, david@uky.csnet. Experience is something you don't get until just after you need it.