yms@beach.cis.ufl.edu (Yuh-Ming Shyy) (03/06/91)
Hi, is there anyone who knows whether the output of Yacc and Lex program (C) can be compatiable with C++ programs? Or, is there any C++ version of Yacc/Lex where the user-defined functions can be C++ programs? Thanks a lot. yms@beach.cis.ufl.edu
tom@ssd.csd.harris.com (Tom Horsley) (03/06/91)
You could just experiment with yacc and find out if it works. I was doing
just that the other day, and it seems to work fine, all I needed was a few
function prototypes, which I was able to add in the initial definitions
section. Something like:
%{
extern int yyparse();
%}
I used g++ and my test parser built and ran fine after that.
I seem to recall hearing vague reports of something called yacc++, but I
don't know exactly what features it might provide especially oriented
towards C++.
--
======================================================================
domain: tahorsley@csd.harris.com USMail: Tom Horsley
uucp: ...!uunet!hcx1!tahorsley 511 Kingbird Circle
Delray Beach, FL 33444
+==== Censorship is the only form of Obscenity ======================+
| (Wait, I forgot government tobacco subsidies...) |
+====================================================================+
sam@castle.ed.ac.uk (S Manoharan) (03/08/91)
In article <TOM.91Mar6065652@rcx1.ssd.csd.harris.com> tom@ssd.csd.harris.com (Tom Horsley) writes: >You could just experiment with yacc and find out if it works. I was doing >just that the other day, and it seems to work fine, all I needed was a few >function prototypes, which I was able to add in the initial definitions >section. A related note: There is a tool called `mkproto' which could automatically generate function prototypes for classic C. This was posted on comp.sources.misc (or was it comp.lang.c?) sometime back. -- S Manoharan Internet : sam%ed.lfcs@nsfnet-relay.ac.uk Dept of Computer Science Uucp : ..!mcsun!ukc!edcastle!sam University of Edinburgh Fax : 031-667 7209 Edinburgh EH9 3JZ UK. Voice : 031-650 5115 (Office)