-/* $Id: skeleton.c,v 1.27 2010/11/26 17:24:00 tom Exp $ */
+/* $Id: skeleton.c,v 1.30 2010/12/29 20:57:21 tom Exp $ */
#include "defs.h"
/* the body either are not useful outside of semantic actions or */
/* are conditional. */
-const char *banner[] =
+const char *const banner[] =
{
"#ifndef lint",
"static const char yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\";",
0
};
-const char *xdecls[] =
+const char *const xdecls[] =
{
"extern int YYPARSE_DECL();",
- "extern int YYLEX_DECL();",
"",
0
};
-const char *tables[] =
+const char *const tables[] =
{
"extern short yylhs[];",
"extern short yylen[];",
0
};
-const char *hdr_defs[] =
+const char *const hdr_defs[] =
{
"/* define the initial stack-sizes */",
"#ifdef YYSTACKSIZE",
0
};
-const char *hdr_vars[] =
+const char *const hdr_vars[] =
{
"int yyerrflag;",
"int yychar;",
0
};
-const char *body_vars[] =
+const char *const body_vars[] =
{
" int yyerrflag;",
" int yychar;",
0
};
-const char *body_1[] =
+const char *const body_1[] =
{
"",
"#if YYDEBUG",
" newsize = YYMAXDEPTH;",
"",
" i = data->s_mark - data->s_base;",
- " newss = (data->s_base != 0)",
- " ? (short *)realloc(data->s_base, newsize * sizeof(*newss))",
- " : (short *)malloc(newsize * sizeof(*newss));",
+ " newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));",
" if (newss == 0)",
" return -1;",
"",
" data->s_base = newss;",
" data->s_mark = newss + i;",
"",
- " newvs = (data->l_base != 0)",
- " ? (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs))",
- " : (YYSTYPE *)malloc(newsize * sizeof(*newvs));",
+ " newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));",
" if (newvs == 0)",
" return -1;",
"",
0
};
-const char *body_2[] =
+const char *const body_2[] =
{
" int yym, yyn, yystate;",
"#if YYDEBUG",
0
};
-const char *body_3[] =
+const char *const body_3[] =
{
"",
" goto yyerrlab;",
0
};
-const char *trailer[] =
+const char *const trailer[] =
{
" }",
" yystack.s_mark -= yym;",
0
};
-const char *trailer_2[] =
+const char *const trailer_2[] =
{
"",
"yyabort:",
};
void
-write_section(const char *section[])
+write_section(const char *const section[])
{
int c;
int i;