From: gehriger AT epfl DOT ch (Daniel Gehriger) Subject: Re: RE: Compiling Bison-generated parsers with MS VC+ 30 Nov 1998 13:11:20 -0800 Message-ID: <19981130111221.12079.qmail.cygnus.gnu-win32@findmail.com> References: <01BDF318 DOT B45C3B70 DOT MCzapski AT openplus DOT com DOT au> To: gnu-win32 AT cygnus DOT com The problem with alloca should disappear if you define MSDOS. Daniel On Thursday, October 08, 1998 2:04 AM, Christopher David Hundhausen > [SMTP:chundhau AT cs DOT uoregon DOT edu] wrote: > > I've used VC++ (v 5.0) to successfully compile a flex-generated lexical > > analyzer (lex.yy.cpp). I did this by using the trick of creating a dummy > > (empty) uinstd.h file (this trick was recently suggested on this mailing > > list). > > > > The next step is to get VC++ to compile a bison-generated parser that > > makes use of MFC classes. Does anyone have any suggestions on > > how to get this to work? At present, my compilation results in > > the following error messages: > > > > /cygnus/b19/share/bison.simple(327) : error C2065: 'yyerror' : undeclared > > identifier > > /cygnus/b19/share/bison.simple(333) : error C2065: 'alloca' : undeclared > > identifier > > /cygnus/b19/share/bison.simple(387) : error C2065: 'yylex' : undeclared > > identifier > > > > Once I get the parser to compile, what will I need to do to get > > everything to link properly with my MFC app? Is there a gnu-win32 > > object file that I need to include in the link? Does anyone have any > > advice? > > > > Please send you responses directly to me (chundhau AT cs DOT uoregon DOT edu), in > > addition to posting them to the list. > > > > Thanks in advance, > > :-)Chris > > > > - > Hello Chris, > > I did a project utilizing both but I did not have a need to create a dummy > unistd.h. > > Presumably you have a yyerror in your source.l as void yyerror(char *message) ? > If not, you will need one, if only an empty one. Once you have the yyerror > declare it as 'extern void yyerror(char *message)' in your source.y or a header > file you share between your source.l and source.y, if you have one. > Similarly, declare yylex in your souce.y as extern int yylex( void ). > In so far as the alloca issue is concerned you can do a > #define YY_ALWAYS_INTERACTIVE 1 > which will take care of that, although I don't see how you got that in the > first place. I have used bith flex and bison in a source-portable app that > builds with MS VC++ 5.0, egcs 1.0.2 on cygwin32, Linux and OpenVMS and only > Linux and OpenVMS had an issue with the alloca (missing that is). > > That's what I did in a C environment. Sorry, I don't grok c++, just plain c. > ------------------ > Cheers ... > Michael Czapski > > > - > For help on using this list (especially unsubscribing), send a message to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". > > ----- See the original message at http://www.egroups.com/list/gnu-win32/?start=8001 - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".