/* include platform.h first to get __WIN32__ definition */
#include "wx/platform.h"
-#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"
#include "wx/deprecated/setup.h"
-#endif
#if !defined(wxUSE_PROLOGIO) || wxUSE_PROLOGIO
-#ifndef lint
+#if !defined(lint) && 0
static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90";
#endif
#define YYBYACC 1
-#line 2 "parser.y"
+// #line 2 "parser.y"
#include "string.h"
#if defined(_MSC_VER) || defined(__VISAGECPP__)
#include <io.h>
}
#endif
#endif
-#line 36 "parser.y"
+// #line 36 "parser.y"
typedef union {
char *s;
/* struct pexpr *expr; */
} YYSTYPE;
-#line 44 "y_tab.c"
+// #line 44 "y_tab.c"
#define INTEGER 1
#define WORD 2
#define STRING 3
short yyss[YYSTACKSIZE];
YYSTYPE yyvs[YYSTACKSIZE];
#define yystacksize YYSTACKSIZE
-#line 118 "parser.y"
+// #line 118 "parser.y"
-#ifdef IDE_INVOKED
#include "doslex.c"
-#else
-#include "lex_yy.c"
-#endif
/*
void yyerror(s)
* to test
*/
+#if 0 /* VS: doesn't work... */
#ifndef __SC__
#ifdef USE_DEFINE
#ifndef yywrap
# endif
#endif
#endif
-#line 247 "y_tab.c"
+#endif
+
+// #line 247 "y_tab.c"
#define YYABORT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
}
#endif
}
- if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn = yysindex[yystate];
+ if ((yyn) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
#if YYDEBUG
if (yyerrflag > 0) --yyerrflag;
goto yyloop;
}
- if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn = yyrindex[yystate];
+ if ((yyn) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
yyn = yytable[yyn];
if (yyerrflag) goto yyinrecovery;
#ifdef lint
goto yynewerror;
-#endif
yynewerror:
+#endif
yyerror("syntax error");
#ifdef lint
goto yyerrlab;
-#endif
yyerrlab:
+#endif
++yynerrs;
yyinrecovery:
if (yyerrflag < 3)
yyerrflag = 3;
for (;;)
{
- if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn = yysindex[*yyssp];
+ if ((yyn) && (yyn += YYERRCODE) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
{
#if YYDEBUG
switch (yyn)
{
case 3:
-#line 68 "parser.y"
+// #line 68 "parser.y"
{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
break;
case 4:
-#line 70 "parser.y"
+// #line 70 "parser.y"
{process_command(yyvsp[-1].s);}
break;
case 5:
-#line 72 "parser.y"
+// #line 72 "parser.y"
{syntax_error("Unrecognized command.");}
break;
case 6:
-#line 76 "parser.y"
+// #line 76 "parser.y"
{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
break;
case 7:
-#line 78 "parser.y"
+// #line 78 "parser.y"
{yyval.s = proio_cons(NULL, NULL);}
break;
case 8:
-#line 80 "parser.y"
+// #line 80 "parser.y"
{yyval.s = yyvsp[-1].s; }
break;
case 9:
-#line 84 "parser.y"
+// #line 84 "parser.y"
{yyval.s = NULL;}
break;
case 10:
-#line 86 "parser.y"
+// #line 86 "parser.y"
{yyval.s = proio_cons(yyvsp[0].s, NULL);}
break;
case 11:
-#line 89 "parser.y"
+// #line 89 "parser.y"
{yyval.s = proio_cons(yyvsp[-2].s, yyvsp[0].s);}
break;
case 12:
-#line 93 "parser.y"
+// #line 93 "parser.y"
{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:
-#line 96 "parser.y"
+// #line 96 "parser.y"
{yyval.s = yyvsp[0].s; }
break;
case 14:
-#line 99 "parser.y"
+// #line 99 "parser.y"
{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 15:
-#line 101 "parser.y"
+// #line 101 "parser.y"
{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 16:
-#line 103 "parser.y"
+// #line 103 "parser.y"
{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);}
break;
case 17:
-#line 105 "parser.y"
+// #line 105 "parser.y"
{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"
+// #line 107 "parser.y"
{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"
+// #line 110 "parser.y"
{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:
-#line 114 "parser.y"
+// #line 114 "parser.y"
{yyval.s = yyvsp[0].s;}
break;
-#line 461 "y_tab.c"
+// #line 461 "y_tab.c"
}
yyssp -= yym;
yystate = *yyssp;
if (yychar == 0) goto yyaccept;
goto yyloop;
}
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn = yygindex[yym];
+ if ((yyn) && (yyn += yystate) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
yystate = yytable[yyn];
else