X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a367b9b3f8a722d6029e209070be11d120be0180..6d8b260cc3c78b8b5923c71f3a9a36e5169c445c:/src/common/dosyacc.c diff --git a/src/common/dosyacc.c b/src/common/dosyacc.c index a5e44c0cc2..a773cce6ef 100644 --- a/src/common/dosyacc.c +++ b/src/common/dosyacc.c @@ -4,7 +4,7 @@ static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90"; #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" @@ -25,7 +25,6 @@ int yyback(int *, int); /* You may need to put /DLEX_SCANNER in your makefile * if you're using LEX! - Last change: JS 13 Jul 97 6:12 pm */ #ifdef LEX_SCANNER /* int yyoutput(int); */ @@ -248,7 +247,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" @@ -256,14 +258,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') @@ -280,7 +283,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; @@ -393,7 +397,7 @@ yyreduce: { case 3: #line 68 "parser.y" -{process_command(proio_cons(make_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);} +{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);} break; case 4: #line 70 "parser.y" @@ -405,7 +409,7 @@ case 5: break; case 6: #line 76 "parser.y" -{yyval.s = proio_cons(make_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);} +{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);} break; case 7: #line 78 "parser.y" @@ -429,7 +433,7 @@ case 11: break; case 12: #line 93 "parser.y" -{yyval.s = proio_cons(make_word("="), proio_cons(make_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL))); +{yyval.s = proio_cons(wxmake_word("="), proio_cons(wxmake_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL))); free(yyvsp[-2].s); } break; case 13: @@ -438,27 +442,27 @@ case 13: break; case 14: #line 99 "parser.y" -{yyval.s = make_word(yyvsp[0].s); free(yyvsp[0].s);} +{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);} break; case 15: #line 101 "parser.y" -{yyval.s = make_string(yyvsp[0].s); free(yyvsp[0].s);} +{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);} break; case 16: #line 103 "parser.y" -{yyval.s = make_integer(yyvsp[0].s); free(yyvsp[0].s);} +{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);} break; case 17: #line 105 "parser.y" -{yyval.s = make_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } +{yyval.s = wxmake_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } break; case 18: #line 107 "parser.y" -{yyval.s = make_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } +{yyval.s = wxmake_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); } break; case 19: #line 110 "parser.y" -{yyval.s = make_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s); +{yyval.s = wxmake_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s); free(yyvsp[0].s); } break; case 20: