X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48d1144bc4dabb9f8dd6f913e9a65d709e5995e3..95bcc40c745db8bcd392d06366436afb21964db6:/src/common/dosyacc.c diff --git a/src/common/dosyacc.c b/src/common/dosyacc.c index 3220c8dd7b..14672306db 100644 --- a/src/common/dosyacc.c +++ b/src/common/dosyacc.c @@ -1,10 +1,18 @@ +#if defined(__WIN32__) || defined(__GNUWIN32__) +/* all Win32 compilers can handle C++ comments, and C++ comments + is the only C++ in setup.h */ +#include "wx/setup.h" +#endif + +#if !defined(wxUSE_PROLOGIO) || wxUSE_PROLOGIO + #ifndef lint static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90"; #endif #define YYBYACC 1 #line 2 "parser.y" #include "string.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__VISAGECPP__) #include #endif #include "wx/expr.h" @@ -247,7 +255,10 @@ void yyerror(char *s) #define yywrap() 1 #endif #else -int yywrap() { return 1; } +# if !(defined(__VISAGECPP__) && __IBMC__ >= 400) +/* VA 4.0 thinks this is multiply defined (in lex_yy.c) */ + int yywrap() { return 1; } +# endif #endif #endif #line 247 "y_tab.c" @@ -255,14 +266,15 @@ int yywrap() { return 1; } #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int -yyparse() +PROIO_yyparse() { register int yym, yyn, yystate; #if YYDEBUG register char *yys; extern char *getenv(); - if (yys = getenv("YYDEBUG")) + yys = getenv("YYDEBUG"); + if (yys) { yyn = *yys; if (yyn >= '0' && yyn <= '9') @@ -279,7 +291,8 @@ yyparse() *yyssp = yystate = 0; yyloop: - if (yyn = yydefred[yystate]) goto yyreduce; + yyn = yydefred[yystate]; + if (yyn != 0) goto yyreduce; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; @@ -521,3 +534,5 @@ yyabort: yyaccept: return (0); } + +#endif /* wxUSE_PROLOGIO */