~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/imagemap/imap_ncsa_parse.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A Bison parser, made from imap_ncsa.y
2
 
   by GNU bison 1.35.  */
3
 
 
4
 
#define YYBISON 1  /* Identify Bison output.  */
5
 
 
 
1
/* A Bison parser, made by GNU Bison 2.3.  */
 
2
 
 
3
/* Skeleton implementation for Bison's Yacc-like parsers in C
 
4
 
 
5
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
6
   Free Software Foundation, Inc.
 
7
 
 
8
   This program is free software; you can redistribute it and/or modify
 
9
   it under the terms of the GNU General Public License as published by
 
10
   the Free Software Foundation; either version 2, or (at your option)
 
11
   any later version.
 
12
 
 
13
   This program is distributed in the hope that it will be useful,
 
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
   GNU General Public License for more details.
 
17
 
 
18
   You should have received a copy of the GNU General Public License
 
19
   along with this program; if not, write to the Free Software
 
20
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
   Boston, MA 02110-1301, USA.  */
 
22
 
 
23
/* As a special exception, you may create a larger work that contains
 
24
   part or all of the Bison parser skeleton and distribute that work
 
25
   under terms of your choice, so long as that work isn't itself a
 
26
   parser generator using the skeleton or a modified version thereof
 
27
   as a parser skeleton.  Alternatively, if you modify or redistribute
 
28
   the parser skeleton itself, you may (at your option) remove this
 
29
   special exception, which will cause the skeleton and the resulting
 
30
   Bison output files to be licensed under the GNU General Public
 
31
   License without this special exception.
 
32
 
 
33
   This special exception was added by the Free Software Foundation in
 
34
   version 2.2 of Bison.  */
 
35
 
 
36
/* C LALR(1) parser skeleton written by Richard Stallman, by
 
37
   simplifying the original so-called "semantic" parser.  */
 
38
 
 
39
/* All symbols defined below should begin with yy or YY, to avoid
 
40
   infringing on user name space.  This should be done even for local
 
41
   variables, as they might otherwise be expanded by user macros.
 
42
   There are some unavoidable exceptions within include files to
 
43
   define necessary library symbols; they are noted "INFRINGES ON
 
44
   USER NAME SPACE" below.  */
 
45
 
 
46
/* Identify Bison output.  */
 
47
#define YYBISON 1
 
48
 
 
49
/* Bison version.  */
 
50
#define YYBISON_VERSION "2.3"
 
51
 
 
52
/* Skeleton name.  */
 
53
#define YYSKELETON_NAME "yacc.c"
 
54
 
 
55
/* Pure parsers.  */
 
56
#define YYPURE 0
 
57
 
 
58
/* Using locations.  */
 
59
#define YYLSP_NEEDED 0
 
60
 
 
61
/* Substitute the variable and function names.  */
6
62
#define yyparse ncsa_parse
7
 
#define yylex ncsa_lex
 
63
#define yylex   ncsa_lex
8
64
#define yyerror ncsa_error
9
 
#define yylval ncsa_lval
10
 
#define yychar ncsa_char
 
65
#define yylval  ncsa_lval
 
66
#define yychar  ncsa_char
11
67
#define yydebug ncsa_debug
12
68
#define yynerrs ncsa_nerrs
13
 
# define        RECTANGLE       257
14
 
# define        POLYGON 258
15
 
# define        CIRCLE  259
16
 
# define        DEFAULT 260
17
 
# define        AUTHOR  261
18
 
# define        TITLE   262
19
 
# define        DESCRIPTION     263
20
 
# define        BEGIN_COMMENT   264
21
 
# define        FLOAT   265
22
 
# define        LINK    266
23
 
# define        COMMENT 267
24
 
 
 
69
 
 
70
 
 
71
/* Tokens.  */
 
72
#ifndef YYTOKENTYPE
 
73
# define YYTOKENTYPE
 
74
   /* Put the tokens into the symbol table, so that GDB and other debuggers
 
75
      know about them.  */
 
76
   enum yytokentype {
 
77
     RECTANGLE = 258,
 
78
     POLYGON = 259,
 
79
     CIRCLE = 260,
 
80
     DEFAULT = 261,
 
81
     AUTHOR = 262,
 
82
     TITLE = 263,
 
83
     DESCRIPTION = 264,
 
84
     BEGIN_COMMENT = 265,
 
85
     FLOAT = 266,
 
86
     LINK = 267,
 
87
     COMMENT = 268
 
88
   };
 
89
#endif
 
90
/* Tokens.  */
 
91
#define RECTANGLE 258
 
92
#define POLYGON 259
 
93
#define CIRCLE 260
 
94
#define DEFAULT 261
 
95
#define AUTHOR 262
 
96
#define TITLE 263
 
97
#define DESCRIPTION 264
 
98
#define BEGIN_COMMENT 265
 
99
#define FLOAT 266
 
100
#define LINK 267
 
101
#define COMMENT 268
 
102
 
 
103
 
 
104
 
 
105
 
 
106
/* Copy the first part of user declarations.  */
25
107
#line 1 "imap_ncsa.y"
26
108
 
27
109
/*
49
131
 
50
132
#include <math.h>
51
133
 
 
134
#include <glib/gstdio.h>
 
135
 
52
136
#include <gtk/gtk.h>
53
137
 
54
138
#include "imap_circle.h"
65
149
static Object_t *current_object;
66
150
 
67
151
 
68
 
#line 44 "imap_ncsa.y"
69
 
#ifndef YYSTYPE
70
 
typedef union {
 
152
 
 
153
/* Enabling traces.  */
 
154
#ifndef YYDEBUG
 
155
# define YYDEBUG 0
 
156
#endif
 
157
 
 
158
/* Enabling verbose error messages.  */
 
159
#ifdef YYERROR_VERBOSE
 
160
# undef YYERROR_VERBOSE
 
161
# define YYERROR_VERBOSE 1
 
162
#else
 
163
# define YYERROR_VERBOSE 0
 
164
#endif
 
165
 
 
166
/* Enabling the token table.  */
 
167
#ifndef YYTOKEN_TABLE
 
168
# define YYTOKEN_TABLE 0
 
169
#endif
 
170
 
 
171
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 
172
typedef union YYSTYPE
 
173
#line 46 "imap_ncsa.y"
 
174
{
71
175
   int val;
72
176
   double value;
73
177
   char id[256];
74
 
} yystype;
75
 
# define YYSTYPE yystype
 
178
}
 
179
/* Line 187 of yacc.c.  */
 
180
#line 181 "y.tab.c"
 
181
        YYSTYPE;
 
182
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
 
183
# define YYSTYPE_IS_DECLARED 1
76
184
# define YYSTYPE_IS_TRIVIAL 1
77
185
#endif
78
 
#ifndef YYDEBUG
79
 
# define YYDEBUG 0
80
 
#endif
81
 
 
82
 
 
83
 
 
84
 
#define YYFINAL         50
85
 
#define YYFLAG          -32768
86
 
#define YYNTBASE        15
87
 
 
88
 
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
89
 
#define YYTRANSLATE(x) ((unsigned)(x) <= 267 ? yytranslate[x] : 31)
90
 
 
91
 
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
92
 
static const char yytranslate[] =
93
 
{
94
 
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
95
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
96
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
97
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
98
 
       2,     2,     2,     2,    14,     2,     2,     2,     2,     2,
99
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
100
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
101
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
102
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
103
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
104
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
105
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
106
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
107
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
108
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
109
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
110
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
111
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
112
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
113
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
114
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
115
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
116
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
117
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
118
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
119
 
       2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
120
 
       6,     7,     8,     9,    10,    11,    12,    13
121
 
};
122
 
 
123
 
#if YYDEBUG
124
 
static const short yyprhs[] =
125
 
{
126
 
       0,     0,     3,     4,     7,     9,    11,    13,    15,    18,
127
 
      21,    24,    27,    28,    31,    33,    35,    37,    39,    41,
128
 
      44,    53,    62,    63,    68,    69,    72
129
 
};
130
 
static const short yyrhs[] =
131
 
{
132
 
      16,    22,     0,     0,    16,    17,     0,    19,     0,    20,
133
 
       0,    21,     0,    18,     0,    10,    13,     0,     7,    13,
134
 
       0,     8,    13,     0,     9,    13,     0,     0,    22,    23,
135
 
       0,    24,     0,    25,     0,    26,     0,    27,     0,    18,
136
 
       0,     6,    12,     0,     3,    12,    11,    14,    11,    11,
137
 
      14,    11,     0,     5,    12,    11,    14,    11,    11,    14,
138
 
      11,     0,     0,     4,    12,    28,    29,     0,     0,    29,
139
 
      30,     0,    11,    14,    11,     0
140
 
};
141
 
 
142
 
#endif
143
 
 
144
 
#if YYDEBUG
145
 
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
146
 
static const short yyrline[] =
147
 
{
148
 
       0,    57,    60,    61,    64,    65,    66,    67,    70,    75,
149
 
      82,    89,   100,   101,   104,   105,   106,   107,   108,   111,
150
 
     119,   131,   142,   142,   149,   150,   155
151
 
};
152
 
#endif
153
 
 
154
 
 
155
 
#if (YYDEBUG) || defined YYERROR_VERBOSE
156
 
 
157
 
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
158
 
static const char *const yytname[] =
159
 
{
160
 
  "$", "error", "$undefined.", "RECTANGLE", "POLYGON", "CIRCLE", "DEFAULT", 
161
 
  "AUTHOR", "TITLE", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "LINK", 
162
 
  "COMMENT", "','", "ncsa_file", "comment_lines", "comment_line", 
163
 
  "real_comment", "author_line", "title_line", "description_line", 
164
 
  "area_list", "area", "default", "rectangle", "circle", "polygon", "@1", 
165
 
  "coord_list", "coord", 0
166
 
};
167
 
#endif
168
 
 
169
 
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
170
 
static const short yyr1[] =
171
 
{
172
 
       0,    15,    16,    16,    17,    17,    17,    17,    18,    19,
173
 
      20,    21,    22,    22,    23,    23,    23,    23,    23,    24,
174
 
      25,    26,    28,    27,    29,    29,    30
175
 
};
176
 
 
177
 
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
178
 
static const short yyr2[] =
179
 
{
180
 
       0,     2,     0,     2,     1,     1,     1,     1,     2,     2,
181
 
       2,     2,     0,     2,     1,     1,     1,     1,     1,     2,
182
 
       8,     8,     0,     4,     0,     2,     3
183
 
};
184
 
 
185
 
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
186
 
   doesn't specify something else to do.  Zero means the default is an
187
 
   error. */
188
 
static const short yydefact[] =
189
 
{
190
 
       2,    12,     0,     0,     0,     0,     3,     7,     4,     5,
191
 
       6,     1,     9,    10,    11,     8,     0,     0,     0,     0,
192
 
      18,    13,    14,    15,    16,    17,     0,    22,     0,    19,
193
 
       0,    24,     0,     0,    23,     0,     0,     0,    25,     0,
194
 
       0,     0,     0,     0,    26,     0,    20,    21,     0,     0,
195
 
       0
196
 
};
197
 
 
198
 
static const short yydefgoto[] =
199
 
{
200
 
      48,     1,     6,     7,     8,     9,    10,    11,    21,    22,
201
 
      23,    24,    25,    31,    34,    38
202
 
};
203
 
 
204
 
static const short yypact[] =
205
 
{
206
 
  -32768,     1,    -9,    -8,    -7,    -1,-32768,-32768,-32768,-32768,
207
 
  -32768,    -3,-32768,-32768,-32768,-32768,     2,     3,     4,     5,
208
 
  -32768,-32768,-32768,-32768,-32768,-32768,     7,-32768,     8,-32768,
209
 
       6,-32768,     9,    10,    11,    13,    14,    12,-32768,    16,
210
 
      15,    17,    18,    19,-32768,    20,-32768,-32768,    33,    34,
211
 
  -32768
212
 
};
213
 
 
214
 
static const short yypgoto[] =
215
 
{
216
 
  -32768,-32768,-32768,    24,-32768,-32768,-32768,-32768,-32768,-32768,
217
 
  -32768,-32768,-32768,-32768,-32768,-32768
218
 
};
219
 
 
220
 
 
221
 
#define YYLAST          35
222
 
 
223
 
 
224
 
static const short yytable[] =
225
 
{
226
 
      16,    17,    18,    19,    12,    13,    14,     5,     2,     3,
227
 
       4,     5,    15,     0,    26,    27,    28,    29,    30,    32,
228
 
      33,    36,    37,    35,    39,    40,    41,    42,    44,    43,
229
 
      46,    47,    45,    49,    50,    20
230
 
};
231
 
 
232
 
static const short yycheck[] =
233
 
{
234
 
       3,     4,     5,     6,    13,    13,    13,    10,     7,     8,
235
 
       9,    10,    13,    -1,    12,    12,    12,    12,    11,    11,
236
 
      14,    11,    11,    14,    11,    11,    14,    11,    11,    14,
237
 
      11,    11,    14,     0,     0,    11
238
 
};
239
 
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
240
 
#line 3 "/usr/share/bison/bison.simple"
241
 
 
242
 
/* Skeleton output parser for bison,
243
 
 
244
 
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
245
 
   Foundation, Inc.
246
 
 
247
 
   This program is free software; you can redistribute it and/or modify
248
 
   it under the terms of the GNU General Public License as published by
249
 
   the Free Software Foundation; either version 2, or (at your option)
250
 
   any later version.
251
 
 
252
 
   This program is distributed in the hope that it will be useful,
253
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
254
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
255
 
   GNU General Public License for more details.
256
 
 
257
 
   You should have received a copy of the GNU General Public License
258
 
   along with this program; if not, write to the Free Software
259
 
   Foundation, Inc., 59 Temple Place - Suite 330,
260
 
   Boston, MA 02111-1307, USA.  */
261
 
 
262
 
/* As a special exception, when this file is copied by Bison into a
263
 
   Bison output file, you may use that output file without restriction.
264
 
   This special exception was added by the Free Software Foundation
265
 
   in version 1.24 of Bison.  */
266
 
 
267
 
/* This is the parser code that is written into each bison parser when
268
 
   the %semantic_parser declaration is not specified in the grammar.
269
 
   It was written by Richard Stallman by simplifying the hairy parser
270
 
   used when %semantic_parser is specified.  */
271
 
 
272
 
/* All symbols defined below should begin with yy or YY, to avoid
273
 
   infringing on user name space.  This should be done even for local
274
 
   variables, as they might otherwise be expanded by user macros.
275
 
   There are some unavoidable exceptions within include files to
276
 
   define necessary library symbols; they are noted "INFRINGES ON
277
 
   USER NAME SPACE" below.  */
278
 
 
279
 
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
 
186
 
 
187
 
 
188
 
 
189
/* Copy the second part of user declarations.  */
 
190
 
 
191
 
 
192
/* Line 216 of yacc.c.  */
 
193
#line 194 "y.tab.c"
 
194
 
 
195
#ifdef short
 
196
# undef short
 
197
#endif
 
198
 
 
199
#ifdef YYTYPE_UINT8
 
200
typedef YYTYPE_UINT8 yytype_uint8;
 
201
#else
 
202
typedef unsigned char yytype_uint8;
 
203
#endif
 
204
 
 
205
#ifdef YYTYPE_INT8
 
206
typedef YYTYPE_INT8 yytype_int8;
 
207
#elif (defined __STDC__ || defined __C99__FUNC__ \
 
208
     || defined __cplusplus || defined _MSC_VER)
 
209
typedef signed char yytype_int8;
 
210
#else
 
211
typedef short int yytype_int8;
 
212
#endif
 
213
 
 
214
#ifdef YYTYPE_UINT16
 
215
typedef YYTYPE_UINT16 yytype_uint16;
 
216
#else
 
217
typedef unsigned short int yytype_uint16;
 
218
#endif
 
219
 
 
220
#ifdef YYTYPE_INT16
 
221
typedef YYTYPE_INT16 yytype_int16;
 
222
#else
 
223
typedef short int yytype_int16;
 
224
#endif
 
225
 
 
226
#ifndef YYSIZE_T
 
227
# ifdef __SIZE_TYPE__
 
228
#  define YYSIZE_T __SIZE_TYPE__
 
229
# elif defined size_t
 
230
#  define YYSIZE_T size_t
 
231
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
 
232
     || defined __cplusplus || defined _MSC_VER)
 
233
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 
234
#  define YYSIZE_T size_t
 
235
# else
 
236
#  define YYSIZE_T unsigned int
 
237
# endif
 
238
#endif
 
239
 
 
240
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
241
 
 
242
#ifndef YY_
 
243
# if YYENABLE_NLS
 
244
#  if ENABLE_NLS
 
245
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 
246
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
 
247
#  endif
 
248
# endif
 
249
# ifndef YY_
 
250
#  define YY_(msgid) msgid
 
251
# endif
 
252
#endif
 
253
 
 
254
/* Suppress unused-variable warnings by "using" E.  */
 
255
#if ! defined lint || defined __GNUC__
 
256
# define YYUSE(e) ((void) (e))
 
257
#else
 
258
# define YYUSE(e) /* empty */
 
259
#endif
 
260
 
 
261
/* Identity function, used to suppress warnings about constant conditions.  */
 
262
#ifndef lint
 
263
# define YYID(n) (n)
 
264
#else
 
265
#if (defined __STDC__ || defined __C99__FUNC__ \
 
266
     || defined __cplusplus || defined _MSC_VER)
 
267
static int
 
268
YYID (int i)
 
269
#else
 
270
static int
 
271
YYID (i)
 
272
    int i;
 
273
#endif
 
274
{
 
275
  return i;
 
276
}
 
277
#endif
 
278
 
 
279
#if ! defined yyoverflow || YYERROR_VERBOSE
280
280
 
281
281
/* The parser invokes alloca or malloc; define the necessary symbols.  */
282
282
 
283
 
# if YYSTACK_USE_ALLOCA
284
 
#  define YYSTACK_ALLOC alloca
285
 
# else
286
 
#  ifndef YYSTACK_USE_ALLOCA
287
 
#   if defined (alloca) || defined (_ALLOCA_H)
 
283
# ifdef YYSTACK_USE_ALLOCA
 
284
#  if YYSTACK_USE_ALLOCA
 
285
#   ifdef __GNUC__
 
286
#    define YYSTACK_ALLOC __builtin_alloca
 
287
#   elif defined __BUILTIN_VA_ARG_INCR
 
288
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
 
289
#   elif defined _AIX
 
290
#    define YYSTACK_ALLOC __alloca
 
291
#   elif defined _MSC_VER
 
292
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
 
293
#    define alloca _alloca
 
294
#   else
288
295
#    define YYSTACK_ALLOC alloca
289
 
#   else
290
 
#    ifdef __GNUC__
291
 
#     define YYSTACK_ALLOC __builtin_alloca
 
296
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
297
     || defined __cplusplus || defined _MSC_VER)
 
298
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
299
#     ifndef _STDLIB_H
 
300
#      define _STDLIB_H 1
 
301
#     endif
292
302
#    endif
293
303
#   endif
294
304
#  endif
295
305
# endif
296
306
 
297
307
# ifdef YYSTACK_ALLOC
298
 
   /* Pacify GCC's `empty if-body' warning. */
299
 
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 
308
   /* Pacify GCC's `empty if-body' warning.  */
 
309
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
 
310
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
311
    /* The OS might guarantee only one guard page at the bottom of the stack,
 
312
       and a page size can be as small as 4096 bytes.  So we cannot safely
 
313
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
 
314
       to allow for a few compiler-allocated temporary stack slots.  */
 
315
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
 
316
#  endif
300
317
# else
301
 
#  if defined (__STDC__) || defined (__cplusplus)
 
318
#  define YYSTACK_ALLOC YYMALLOC
 
319
#  define YYSTACK_FREE YYFREE
 
320
#  ifndef YYSTACK_ALLOC_MAXIMUM
 
321
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 
322
#  endif
 
323
#  if (defined __cplusplus && ! defined _STDLIB_H \
 
324
       && ! ((defined YYMALLOC || defined malloc) \
 
325
             && (defined YYFREE || defined free)))
302
326
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
303
 
#   define YYSIZE_T size_t
304
 
#  endif
305
 
#  define YYSTACK_ALLOC malloc
306
 
#  define YYSTACK_FREE free
 
327
#   ifndef _STDLIB_H
 
328
#    define _STDLIB_H 1
 
329
#   endif
 
330
#  endif
 
331
#  ifndef YYMALLOC
 
332
#   define YYMALLOC malloc
 
333
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
334
     || defined __cplusplus || defined _MSC_VER)
 
335
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 
336
#   endif
 
337
#  endif
 
338
#  ifndef YYFREE
 
339
#   define YYFREE free
 
340
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
 
341
     || defined __cplusplus || defined _MSC_VER)
 
342
void free (void *); /* INFRINGES ON USER NAME SPACE */
 
343
#   endif
 
344
#  endif
307
345
# endif
308
 
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
309
 
 
310
 
 
311
 
#if (! defined (yyoverflow) \
312
 
     && (! defined (__cplusplus) \
313
 
         || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
346
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
 
347
 
 
348
 
 
349
#if (! defined yyoverflow \
 
350
     && (! defined __cplusplus \
 
351
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
314
352
 
315
353
/* A type that is properly aligned for any stack member.  */
316
354
union yyalloc
317
355
{
318
 
  short yyss;
 
356
  yytype_int16 yyss;
319
357
  YYSTYPE yyvs;
320
 
# if YYLSP_NEEDED
321
 
  YYLTYPE yyls;
322
 
# endif
323
 
};
 
358
  };
324
359
 
325
360
/* The size of the maximum gap between one aligned stack and the next.  */
326
 
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
 
361
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
327
362
 
328
363
/* The size of an array large to enough to hold all stacks, each with
329
364
   N elements.  */
330
 
# if YYLSP_NEEDED
331
 
#  define YYSTACK_BYTES(N) \
332
 
     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
333
 
      + 2 * YYSTACK_GAP_MAX)
334
 
# else
335
 
#  define YYSTACK_BYTES(N) \
336
 
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
337
 
      + YYSTACK_GAP_MAX)
338
 
# endif
 
365
# define YYSTACK_BYTES(N) \
 
366
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
 
367
      + YYSTACK_GAP_MAXIMUM)
339
368
 
340
369
/* Copy COUNT objects from FROM to TO.  The source and destination do
341
370
   not overlap.  */
342
371
# ifndef YYCOPY
343
 
#  if 1 < __GNUC__
 
372
#  if defined __GNUC__ && 1 < __GNUC__
344
373
#   define YYCOPY(To, From, Count) \
345
374
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
346
375
#  else
347
376
#   define YYCOPY(To, From, Count)              \
348
377
      do                                        \
349
378
        {                                       \
350
 
          register YYSIZE_T yyi;                \
 
379
          YYSIZE_T yyi;                         \
351
380
          for (yyi = 0; yyi < (Count); yyi++)   \
352
381
            (To)[yyi] = (From)[yyi];            \
353
382
        }                                       \
354
 
      while (0)
 
383
      while (YYID (0))
355
384
#  endif
356
385
# endif
357
386
 
366
395
        YYSIZE_T yynewbytes;                                            \
367
396
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
368
397
        Stack = &yyptr->Stack;                                          \
369
 
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
 
398
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
370
399
        yyptr += yynewbytes / sizeof (*yyptr);                          \
371
400
      }                                                                 \
372
 
    while (0)
373
 
 
374
 
#endif
375
 
 
376
 
 
377
 
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
378
 
# define YYSIZE_T __SIZE_TYPE__
379
 
#endif
380
 
#if ! defined (YYSIZE_T) && defined (size_t)
381
 
# define YYSIZE_T size_t
382
 
#endif
383
 
#if ! defined (YYSIZE_T)
384
 
# if defined (__STDC__) || defined (__cplusplus)
385
 
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
386
 
#  define YYSIZE_T size_t
 
401
    while (YYID (0))
 
402
 
 
403
#endif
 
404
 
 
405
/* YYFINAL -- State number of the termination state.  */
 
406
#define YYFINAL  3
 
407
/* YYLAST -- Last index in YYTABLE.  */
 
408
#define YYLAST   35
 
409
 
 
410
/* YYNTOKENS -- Number of terminals.  */
 
411
#define YYNTOKENS  15
 
412
/* YYNNTS -- Number of nonterminals.  */
 
413
#define YYNNTS  17
 
414
/* YYNRULES -- Number of rules.  */
 
415
#define YYNRULES  27
 
416
/* YYNRULES -- Number of states.  */
 
417
#define YYNSTATES  50
 
418
 
 
419
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 
420
#define YYUNDEFTOK  2
 
421
#define YYMAXUTOK   268
 
422
 
 
423
#define YYTRANSLATE(YYX)                                                \
 
424
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
425
 
 
426
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 
427
static const yytype_uint8 yytranslate[] =
 
428
{
 
429
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
430
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
431
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
432
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
433
       2,     2,     2,     2,    14,     2,     2,     2,     2,     2,
 
434
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
435
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
436
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
437
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
438
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
439
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
440
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
441
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
442
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
443
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
444
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
445
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
446
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
447
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
448
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
449
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
450
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
451
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
452
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
453
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
454
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
 
455
       5,     6,     7,     8,     9,    10,    11,    12,    13
 
456
};
 
457
 
 
458
#if YYDEBUG
 
459
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
 
460
   YYRHS.  */
 
461
static const yytype_uint8 yyprhs[] =
 
462
{
 
463
       0,     0,     3,     6,     7,    10,    12,    14,    16,    18,
 
464
      21,    24,    27,    30,    31,    34,    36,    38,    40,    42,
 
465
      44,    47,    56,    65,    66,    71,    72,    75
 
466
};
 
467
 
 
468
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 
469
static const yytype_int8 yyrhs[] =
 
470
{
 
471
      16,     0,    -1,    17,    23,    -1,    -1,    17,    18,    -1,
 
472
      20,    -1,    21,    -1,    22,    -1,    19,    -1,    10,    13,
 
473
      -1,     7,    13,    -1,     8,    13,    -1,     9,    13,    -1,
 
474
      -1,    23,    24,    -1,    25,    -1,    26,    -1,    27,    -1,
 
475
      28,    -1,    19,    -1,     6,    12,    -1,     3,    12,    11,
 
476
      14,    11,    11,    14,    11,    -1,     5,    12,    11,    14,
 
477
      11,    11,    14,    11,    -1,    -1,     4,    12,    29,    30,
 
478
      -1,    -1,    30,    31,    -1,    11,    14,    11,    -1
 
479
};
 
480
 
 
481
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 
482
static const yytype_uint8 yyrline[] =
 
483
{
 
484
       0,    59,    59,    62,    63,    66,    67,    68,    69,    72,
 
485
      77,    84,    91,   102,   103,   106,   107,   108,   109,   110,
 
486
     113,   121,   133,   144,   144,   151,   152,   157
 
487
};
 
488
#endif
 
489
 
 
490
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 
491
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
 
492
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 
493
static const char *const yytname[] =
 
494
{
 
495
  "$end", "error", "$undefined", "RECTANGLE", "POLYGON", "CIRCLE",
 
496
  "DEFAULT", "AUTHOR", "TITLE", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT",
 
497
  "LINK", "COMMENT", "','", "$accept", "ncsa_file", "comment_lines",
 
498
  "comment_line", "real_comment", "author_line", "title_line",
 
499
  "description_line", "area_list", "area", "default", "rectangle",
 
500
  "circle", "polygon", "@1", "coord_list", "coord", 0
 
501
};
 
502
#endif
 
503
 
 
504
# ifdef YYPRINT
 
505
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
 
506
   token YYLEX-NUM.  */
 
507
static const yytype_uint16 yytoknum[] =
 
508
{
 
509
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
 
510
     265,   266,   267,   268,    44
 
511
};
387
512
# endif
388
 
#endif
389
 
#if ! defined (YYSIZE_T)
390
 
# define YYSIZE_T unsigned int
391
 
#endif
 
513
 
 
514
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 
515
static const yytype_uint8 yyr1[] =
 
516
{
 
517
       0,    15,    16,    17,    17,    18,    18,    18,    18,    19,
 
518
      20,    21,    22,    23,    23,    24,    24,    24,    24,    24,
 
519
      25,    26,    27,    29,    28,    30,    30,    31
 
520
};
 
521
 
 
522
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 
523
static const yytype_uint8 yyr2[] =
 
524
{
 
525
       0,     2,     2,     0,     2,     1,     1,     1,     1,     2,
 
526
       2,     2,     2,     0,     2,     1,     1,     1,     1,     1,
 
527
       2,     8,     8,     0,     4,     0,     2,     3
 
528
};
 
529
 
 
530
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
 
531
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
 
532
   means the default is an error.  */
 
533
static const yytype_uint8 yydefact[] =
 
534
{
 
535
       3,     0,    13,     1,     0,     0,     0,     0,     4,     8,
 
536
       5,     6,     7,     2,    10,    11,    12,     9,     0,     0,
 
537
       0,     0,    19,    14,    15,    16,    17,    18,     0,    23,
 
538
       0,    20,     0,    25,     0,     0,    24,     0,     0,     0,
 
539
      26,     0,     0,     0,     0,     0,    27,     0,    21,    22
 
540
};
 
541
 
 
542
/* YYDEFGOTO[NTERM-NUM].  */
 
543
static const yytype_int8 yydefgoto[] =
 
544
{
 
545
      -1,     1,     2,     8,     9,    10,    11,    12,    13,    23,
 
546
      24,    25,    26,    27,    33,    36,    40
 
547
};
 
548
 
 
549
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
 
550
   STATE-NUM.  */
 
551
#define YYPACT_NINF -9
 
552
static const yytype_int8 yypact[] =
 
553
{
 
554
      -9,     4,     1,    -9,    -8,    -7,    -1,     0,    -9,    -9,
 
555
      -9,    -9,    -9,    -3,    -9,    -9,    -9,    -9,     2,     3,
 
556
       5,     6,    -9,    -9,    -9,    -9,    -9,    -9,     8,    -9,
 
557
       9,    -9,     7,    -9,    10,    11,    12,    14,    15,    13,
 
558
      -9,    17,    16,    18,    19,    20,    -9,    21,    -9,    -9
 
559
};
 
560
 
 
561
/* YYPGOTO[NTERM-NUM].  */
 
562
static const yytype_int8 yypgoto[] =
 
563
{
 
564
      -9,    -9,    -9,    -9,    22,    -9,    -9,    -9,    -9,    -9,
 
565
      -9,    -9,    -9,    -9,    -9,    -9,    -9
 
566
};
 
567
 
 
568
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
 
569
   positive, shift that token.  If negative, reduce the rule which
 
570
   number is the opposite.  If zero, do what YYDEFACT says.
 
571
   If YYTABLE_NINF, syntax error.  */
 
572
#define YYTABLE_NINF -1
 
573
static const yytype_uint8 yytable[] =
 
574
{
 
575
      18,    19,    20,    21,     3,    14,    15,     7,     4,     5,
 
576
       6,     7,    16,    17,    28,    29,     0,    30,    31,    32,
 
577
      34,    35,    38,    39,    37,    41,    42,    43,    44,    46,
 
578
      45,    48,    49,    47,     0,    22
 
579
};
 
580
 
 
581
static const yytype_int8 yycheck[] =
 
582
{
 
583
       3,     4,     5,     6,     0,    13,    13,    10,     7,     8,
 
584
       9,    10,    13,    13,    12,    12,    -1,    12,    12,    11,
 
585
      11,    14,    11,    11,    14,    11,    11,    14,    11,    11,
 
586
      14,    11,    11,    14,    -1,    13
 
587
};
 
588
 
 
589
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
 
590
   symbol of state STATE-NUM.  */
 
591
static const yytype_uint8 yystos[] =
 
592
{
 
593
       0,    16,    17,     0,     7,     8,     9,    10,    18,    19,
 
594
      20,    21,    22,    23,    13,    13,    13,    13,     3,     4,
 
595
       5,     6,    19,    24,    25,    26,    27,    28,    12,    12,
 
596
      12,    12,    11,    29,    11,    14,    30,    14,    11,    11,
 
597
      31,    11,    11,    14,    11,    14,    11,    14,    11,    11
 
598
};
392
599
 
393
600
#define yyerrok         (yyerrstatus = 0)
394
601
#define yyclearin       (yychar = YYEMPTY)
395
 
#define YYEMPTY         -2
 
602
#define YYEMPTY         (-2)
396
603
#define YYEOF           0
 
604
 
397
605
#define YYACCEPT        goto yyacceptlab
398
 
#define YYABORT         goto yyabortlab
399
 
#define YYERROR         goto yyerrlab1
 
606
#define YYABORT         goto yyabortlab
 
607
#define YYERROR         goto yyerrorlab
 
608
 
 
609
 
400
610
/* Like YYERROR except do call yyerror.  This remains here temporarily
401
611
   to ease the transition to the new meaning of YYERROR, for GCC.
402
612
   Once GCC version 2 has supplanted version 1, this can go.  */
 
613
 
403
614
#define YYFAIL          goto yyerrlab
 
615
 
404
616
#define YYRECOVERING()  (!!yyerrstatus)
 
617
 
405
618
#define YYBACKUP(Token, Value)                                  \
406
619
do                                                              \
407
620
  if (yychar == YYEMPTY && yylen == 1)                          \
408
621
    {                                                           \
409
622
      yychar = (Token);                                         \
410
623
      yylval = (Value);                                         \
411
 
      yychar1 = YYTRANSLATE (yychar);                           \
412
 
      YYPOPSTACK;                                               \
 
624
      yytoken = YYTRANSLATE (yychar);                           \
 
625
      YYPOPSTACK (1);                                           \
413
626
      goto yybackup;                                            \
414
627
    }                                                           \
415
628
  else                                                          \
416
 
    {                                                           \
417
 
      yyerror ("syntax error: cannot back up");                 \
 
629
    {                                                           \
 
630
      yyerror (YY_("syntax error: cannot back up")); \
418
631
      YYERROR;                                                  \
419
632
    }                                                           \
420
 
while (0)
 
633
while (YYID (0))
 
634
 
421
635
 
422
636
#define YYTERROR        1
423
637
#define YYERRCODE       256
424
638
 
425
639
 
426
 
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
427
 
   are run).
428
 
 
429
 
   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
430
 
   first token.  By default, to implement support for ranges, extend
431
 
   its range to the last symbol.  */
432
 
 
 
640
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
 
641
   If N is 0, then set CURRENT to the empty location which ends
 
642
   the previous symbol: RHS[0] (always defined).  */
 
643
 
 
644
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
433
645
#ifndef YYLLOC_DEFAULT
434
 
# define YYLLOC_DEFAULT(Current, Rhs, N)        \
435
 
   Current.last_line   = Rhs[N].last_line;      \
436
 
   Current.last_column = Rhs[N].last_column;
 
646
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
 
647
    do                                                                  \
 
648
      if (YYID (N))                                                    \
 
649
        {                                                               \
 
650
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
 
651
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
 
652
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
 
653
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
 
654
        }                                                               \
 
655
      else                                                              \
 
656
        {                                                               \
 
657
          (Current).first_line   = (Current).last_line   =              \
 
658
            YYRHSLOC (Rhs, 0).last_line;                                \
 
659
          (Current).first_column = (Current).last_column =              \
 
660
            YYRHSLOC (Rhs, 0).last_column;                              \
 
661
        }                                                               \
 
662
    while (YYID (0))
 
663
#endif
 
664
 
 
665
 
 
666
/* YY_LOCATION_PRINT -- Print the location on the stream.
 
667
   This macro was not mandated originally: define only if we know
 
668
   we won't break user code: when these are the locations we know.  */
 
669
 
 
670
#ifndef YY_LOCATION_PRINT
 
671
# if YYLTYPE_IS_TRIVIAL
 
672
#  define YY_LOCATION_PRINT(File, Loc)                  \
 
673
     fprintf (File, "%d.%d-%d.%d",                      \
 
674
              (Loc).first_line, (Loc).first_column,     \
 
675
              (Loc).last_line,  (Loc).last_column)
 
676
# else
 
677
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 
678
# endif
437
679
#endif
438
680
 
439
681
 
440
682
/* YYLEX -- calling `yylex' with the right arguments.  */
441
683
 
442
 
#if YYPURE
443
 
# if YYLSP_NEEDED
444
 
#  ifdef YYLEX_PARAM
445
 
#   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)
446
 
#  else
447
 
#   define YYLEX                yylex (&yylval, &yylloc)
448
 
#  endif
449
 
# else /* !YYLSP_NEEDED */
450
 
#  ifdef YYLEX_PARAM
451
 
#   define YYLEX                yylex (&yylval, YYLEX_PARAM)
452
 
#  else
453
 
#   define YYLEX                yylex (&yylval)
454
 
#  endif
455
 
# endif /* !YYLSP_NEEDED */
456
 
#else /* !YYPURE */
457
 
# define YYLEX                  yylex ()
458
 
#endif /* !YYPURE */
459
 
 
 
684
#ifdef YYLEX_PARAM
 
685
# define YYLEX yylex (YYLEX_PARAM)
 
686
#else
 
687
# define YYLEX yylex ()
 
688
#endif
460
689
 
461
690
/* Enable debugging if requested.  */
462
691
#if YYDEBUG
470
699
do {                                            \
471
700
  if (yydebug)                                  \
472
701
    YYFPRINTF Args;                             \
473
 
} while (0)
 
702
} while (YYID (0))
 
703
 
 
704
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
 
705
do {                                                                      \
 
706
  if (yydebug)                                                            \
 
707
    {                                                                     \
 
708
      YYFPRINTF (stderr, "%s ", Title);                                   \
 
709
      yy_symbol_print (stderr,                                            \
 
710
                  Type, Value); \
 
711
      YYFPRINTF (stderr, "\n");                                           \
 
712
    }                                                                     \
 
713
} while (YYID (0))
 
714
 
 
715
 
 
716
/*--------------------------------.
 
717
| Print this symbol on YYOUTPUT.  |
 
718
`--------------------------------*/
 
719
 
 
720
/*ARGSUSED*/
 
721
#if (defined __STDC__ || defined __C99__FUNC__ \
 
722
     || defined __cplusplus || defined _MSC_VER)
 
723
static void
 
724
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
725
#else
 
726
static void
 
727
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 
728
    FILE *yyoutput;
 
729
    int yytype;
 
730
    YYSTYPE const * const yyvaluep;
 
731
#endif
 
732
{
 
733
  if (!yyvaluep)
 
734
    return;
 
735
# ifdef YYPRINT
 
736
  if (yytype < YYNTOKENS)
 
737
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
 
738
# else
 
739
  YYUSE (yyoutput);
 
740
# endif
 
741
  switch (yytype)
 
742
    {
 
743
      default:
 
744
        break;
 
745
    }
 
746
}
 
747
 
 
748
 
 
749
/*--------------------------------.
 
750
| Print this symbol on YYOUTPUT.  |
 
751
`--------------------------------*/
 
752
 
 
753
#if (defined __STDC__ || defined __C99__FUNC__ \
 
754
     || defined __cplusplus || defined _MSC_VER)
 
755
static void
 
756
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
 
757
#else
 
758
static void
 
759
yy_symbol_print (yyoutput, yytype, yyvaluep)
 
760
    FILE *yyoutput;
 
761
    int yytype;
 
762
    YYSTYPE const * const yyvaluep;
 
763
#endif
 
764
{
 
765
  if (yytype < YYNTOKENS)
 
766
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
 
767
  else
 
768
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
769
 
 
770
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
 
771
  YYFPRINTF (yyoutput, ")");
 
772
}
 
773
 
 
774
/*------------------------------------------------------------------.
 
775
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
 
776
| TOP (included).                                                   |
 
777
`------------------------------------------------------------------*/
 
778
 
 
779
#if (defined __STDC__ || defined __C99__FUNC__ \
 
780
     || defined __cplusplus || defined _MSC_VER)
 
781
static void
 
782
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
 
783
#else
 
784
static void
 
785
yy_stack_print (bottom, top)
 
786
    yytype_int16 *bottom;
 
787
    yytype_int16 *top;
 
788
#endif
 
789
{
 
790
  YYFPRINTF (stderr, "Stack now");
 
791
  for (; bottom <= top; ++bottom)
 
792
    YYFPRINTF (stderr, " %d", *bottom);
 
793
  YYFPRINTF (stderr, "\n");
 
794
}
 
795
 
 
796
# define YY_STACK_PRINT(Bottom, Top)                            \
 
797
do {                                                            \
 
798
  if (yydebug)                                                  \
 
799
    yy_stack_print ((Bottom), (Top));                           \
 
800
} while (YYID (0))
 
801
 
 
802
 
 
803
/*------------------------------------------------.
 
804
| Report that the YYRULE is going to be reduced.  |
 
805
`------------------------------------------------*/
 
806
 
 
807
#if (defined __STDC__ || defined __C99__FUNC__ \
 
808
     || defined __cplusplus || defined _MSC_VER)
 
809
static void
 
810
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
 
811
#else
 
812
static void
 
813
yy_reduce_print (yyvsp, yyrule)
 
814
    YYSTYPE *yyvsp;
 
815
    int yyrule;
 
816
#endif
 
817
{
 
818
  int yynrhs = yyr2[yyrule];
 
819
  int yyi;
 
820
  unsigned long int yylno = yyrline[yyrule];
 
821
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
 
822
             yyrule - 1, yylno);
 
823
  /* The symbols being reduced.  */
 
824
  for (yyi = 0; yyi < yynrhs; yyi++)
 
825
    {
 
826
      fprintf (stderr, "   $%d = ", yyi + 1);
 
827
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 
828
                       &(yyvsp[(yyi + 1) - (yynrhs)])
 
829
                                       );
 
830
      fprintf (stderr, "\n");
 
831
    }
 
832
}
 
833
 
 
834
# define YY_REDUCE_PRINT(Rule)          \
 
835
do {                                    \
 
836
  if (yydebug)                          \
 
837
    yy_reduce_print (yyvsp, Rule); \
 
838
} while (YYID (0))
 
839
 
474
840
/* Nonzero means print parse trace.  It is left uninitialized so that
475
841
   multiple parsers can coexist.  */
476
842
int yydebug;
477
843
#else /* !YYDEBUG */
478
844
# define YYDPRINTF(Args)
 
845
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
846
# define YY_STACK_PRINT(Bottom, Top)
 
847
# define YY_REDUCE_PRINT(Rule)
479
848
#endif /* !YYDEBUG */
480
849
 
 
850
 
481
851
/* YYINITDEPTH -- initial size of the parser's stacks.  */
482
852
#ifndef YYINITDEPTH
483
853
# define YYINITDEPTH 200
487
857
   if the built-in stack extension method is used).
488
858
 
489
859
   Do not make this value too large; the results are undefined if
490
 
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
 
860
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
491
861
   evaluated with infinite-precision integer arithmetic.  */
492
862
 
493
 
#if YYMAXDEPTH == 0
494
 
# undef YYMAXDEPTH
495
 
#endif
496
 
 
497
863
#ifndef YYMAXDEPTH
498
864
# define YYMAXDEPTH 10000
499
865
#endif
 
866
 
500
867
 
501
 
#ifdef YYERROR_VERBOSE
 
868
 
 
869
#if YYERROR_VERBOSE
502
870
 
503
871
# ifndef yystrlen
504
 
#  if defined (__GLIBC__) && defined (_STRING_H)
 
872
#  if defined __GLIBC__ && defined _STRING_H
505
873
#   define yystrlen strlen
506
874
#  else
507
875
/* Return the length of YYSTR.  */
 
876
#if (defined __STDC__ || defined __C99__FUNC__ \
 
877
     || defined __cplusplus || defined _MSC_VER)
508
878
static YYSIZE_T
509
 
#   if defined (__STDC__) || defined (__cplusplus)
510
879
yystrlen (const char *yystr)
511
 
#   else
 
880
#else
 
881
static YYSIZE_T
512
882
yystrlen (yystr)
513
 
     const char *yystr;
514
 
#   endif
 
883
    const char *yystr;
 
884
#endif
515
885
{
516
 
  register const char *yys = yystr;
517
 
 
518
 
  while (*yys++ != '\0')
 
886
  YYSIZE_T yylen;
 
887
  for (yylen = 0; yystr[yylen]; yylen++)
519
888
    continue;
520
 
 
521
 
  return yys - yystr - 1;
 
889
  return yylen;
522
890
}
523
891
#  endif
524
892
# endif
525
893
 
526
894
# ifndef yystpcpy
527
 
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
 
895
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
528
896
#   define yystpcpy stpcpy
529
897
#  else
530
898
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
531
899
   YYDEST.  */
 
900
#if (defined __STDC__ || defined __C99__FUNC__ \
 
901
     || defined __cplusplus || defined _MSC_VER)
532
902
static char *
533
 
#   if defined (__STDC__) || defined (__cplusplus)
534
903
yystpcpy (char *yydest, const char *yysrc)
535
 
#   else
 
904
#else
 
905
static char *
536
906
yystpcpy (yydest, yysrc)
537
 
     char *yydest;
538
 
     const char *yysrc;
539
 
#   endif
 
907
    char *yydest;
 
908
    const char *yysrc;
 
909
#endif
540
910
{
541
 
  register char *yyd = yydest;
542
 
  register const char *yys = yysrc;
 
911
  char *yyd = yydest;
 
912
  const char *yys = yysrc;
543
913
 
544
914
  while ((*yyd++ = *yys++) != '\0')
545
915
    continue;
548
918
}
549
919
#  endif
550
920
# endif
 
921
 
 
922
# ifndef yytnamerr
 
923
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
 
924
   quotes and backslashes, so that it's suitable for yyerror.  The
 
925
   heuristic is that double-quoting is unnecessary unless the string
 
926
   contains an apostrophe, a comma, or backslash (other than
 
927
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
 
928
   null, do not copy; instead, return the length of what the result
 
929
   would have been.  */
 
930
static YYSIZE_T
 
931
yytnamerr (char *yyres, const char *yystr)
 
932
{
 
933
  if (*yystr == '"')
 
934
    {
 
935
      YYSIZE_T yyn = 0;
 
936
      char const *yyp = yystr;
 
937
 
 
938
      for (;;)
 
939
        switch (*++yyp)
 
940
          {
 
941
          case '\'':
 
942
          case ',':
 
943
            goto do_not_strip_quotes;
 
944
 
 
945
          case '\\':
 
946
            if (*++yyp != '\\')
 
947
              goto do_not_strip_quotes;
 
948
            /* Fall through.  */
 
949
          default:
 
950
            if (yyres)
 
951
              yyres[yyn] = *yyp;
 
952
            yyn++;
 
953
            break;
 
954
 
 
955
          case '"':
 
956
            if (yyres)
 
957
              yyres[yyn] = '\0';
 
958
            return yyn;
 
959
          }
 
960
    do_not_strip_quotes: ;
 
961
    }
 
962
 
 
963
  if (! yyres)
 
964
    return yystrlen (yystr);
 
965
 
 
966
  return yystpcpy (yyres, yystr) - yyres;
 
967
}
 
968
# endif
 
969
 
 
970
/* Copy into YYRESULT an error message about the unexpected token
 
971
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
 
972
   including the terminating null byte.  If YYRESULT is null, do not
 
973
   copy anything; just return the number of bytes that would be
 
974
   copied.  As a special case, return 0 if an ordinary "syntax error"
 
975
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
 
976
   size calculation.  */
 
977
static YYSIZE_T
 
978
yysyntax_error (char *yyresult, int yystate, int yychar)
 
979
{
 
980
  int yyn = yypact[yystate];
 
981
 
 
982
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
 
983
    return 0;
 
984
  else
 
985
    {
 
986
      int yytype = YYTRANSLATE (yychar);
 
987
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
 
988
      YYSIZE_T yysize = yysize0;
 
989
      YYSIZE_T yysize1;
 
990
      int yysize_overflow = 0;
 
991
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
 
992
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
 
993
      int yyx;
 
994
 
 
995
# if 0
 
996
      /* This is so xgettext sees the translatable formats that are
 
997
         constructed on the fly.  */
 
998
      YY_("syntax error, unexpected %s");
 
999
      YY_("syntax error, unexpected %s, expecting %s");
 
1000
      YY_("syntax error, unexpected %s, expecting %s or %s");
 
1001
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
 
1002
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
 
1003
# endif
 
1004
      char *yyfmt;
 
1005
      char const *yyf;
 
1006
      static char const yyunexpected[] = "syntax error, unexpected %s";
 
1007
      static char const yyexpecting[] = ", expecting %s";
 
1008
      static char const yyor[] = " or %s";
 
1009
      char yyformat[sizeof yyunexpected
 
1010
                    + sizeof yyexpecting - 1
 
1011
                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
 
1012
                       * (sizeof yyor - 1))];
 
1013
      char const *yyprefix = yyexpecting;
 
1014
 
 
1015
      /* Start YYX at -YYN if negative to avoid negative indexes in
 
1016
         YYCHECK.  */
 
1017
      int yyxbegin = yyn < 0 ? -yyn : 0;
 
1018
 
 
1019
      /* Stay within bounds of both yycheck and yytname.  */
 
1020
      int yychecklim = YYLAST - yyn + 1;
 
1021
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
 
1022
      int yycount = 1;
 
1023
 
 
1024
      yyarg[0] = yytname[yytype];
 
1025
      yyfmt = yystpcpy (yyformat, yyunexpected);
 
1026
 
 
1027
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
 
1028
        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
 
1029
          {
 
1030
            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
 
1031
              {
 
1032
                yycount = 1;
 
1033
                yysize = yysize0;
 
1034
                yyformat[sizeof yyunexpected - 1] = '\0';
 
1035
                break;
 
1036
              }
 
1037
            yyarg[yycount++] = yytname[yyx];
 
1038
            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
 
1039
            yysize_overflow |= (yysize1 < yysize);
 
1040
            yysize = yysize1;
 
1041
            yyfmt = yystpcpy (yyfmt, yyprefix);
 
1042
            yyprefix = yyor;
 
1043
          }
 
1044
 
 
1045
      yyf = YY_(yyformat);
 
1046
      yysize1 = yysize + yystrlen (yyf);
 
1047
      yysize_overflow |= (yysize1 < yysize);
 
1048
      yysize = yysize1;
 
1049
 
 
1050
      if (yysize_overflow)
 
1051
        return YYSIZE_MAXIMUM;
 
1052
 
 
1053
      if (yyresult)
 
1054
        {
 
1055
          /* Avoid sprintf, as that infringes on the user's name space.
 
1056
             Don't have undefined behavior even if the translation
 
1057
             produced a string with the wrong number of "%s"s.  */
 
1058
          char *yyp = yyresult;
 
1059
          int yyi = 0;
 
1060
          while ((*yyp = *yyf) != '\0')
 
1061
            {
 
1062
              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
 
1063
                {
 
1064
                  yyp += yytnamerr (yyp, yyarg[yyi++]);
 
1065
                  yyf += 2;
 
1066
                }
 
1067
              else
 
1068
                {
 
1069
                  yyp++;
 
1070
                  yyf++;
 
1071
                }
 
1072
            }
 
1073
        }
 
1074
      return yysize;
 
1075
    }
 
1076
}
 
1077
#endif /* YYERROR_VERBOSE */
 
1078
 
 
1079
 
 
1080
/*-----------------------------------------------.
 
1081
| Release the memory associated to this symbol.  |
 
1082
`-----------------------------------------------*/
 
1083
 
 
1084
/*ARGSUSED*/
 
1085
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1086
     || defined __cplusplus || defined _MSC_VER)
 
1087
static void
 
1088
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
1089
#else
 
1090
static void
 
1091
yydestruct (yymsg, yytype, yyvaluep)
 
1092
    const char *yymsg;
 
1093
    int yytype;
 
1094
    YYSTYPE *yyvaluep;
551
1095
#endif
 
1096
{
 
1097
  YYUSE (yyvaluep);
 
1098
 
 
1099
  if (!yymsg)
 
1100
    yymsg = "Deleting";
 
1101
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
1102
 
 
1103
  switch (yytype)
 
1104
    {
 
1105
 
 
1106
      default:
 
1107
        break;
 
1108
    }
 
1109
}
552
1110
 
553
 
#line 315 "/usr/share/bison/bison.simple"
554
 
 
555
 
 
556
 
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
557
 
   into yyparse.  The argument should have type void *.
558
 
   It should actually point to an object.
559
 
   Grammar actions can access the variable by casting it
560
 
   to the proper pointer type.  */
 
1111
 
 
1112
/* Prevent warnings from -Wmissing-prototypes.  */
561
1113
 
562
1114
#ifdef YYPARSE_PARAM
563
 
# if defined (__STDC__) || defined (__cplusplus)
564
 
#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
565
 
#  define YYPARSE_PARAM_DECL
566
 
# else
567
 
#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
568
 
#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
569
 
# endif
570
 
#else /* !YYPARSE_PARAM */
571
 
# define YYPARSE_PARAM_ARG
572
 
# define YYPARSE_PARAM_DECL
573
 
#endif /* !YYPARSE_PARAM */
574
 
 
575
 
/* Prevent warning if -Wstrict-prototypes.  */
576
 
#ifdef __GNUC__
577
 
# ifdef YYPARSE_PARAM
578
 
int yyparse (void *);
579
 
# else
 
1115
#if defined __STDC__ || defined __cplusplus
 
1116
int yyparse (void *YYPARSE_PARAM);
 
1117
#else
 
1118
int yyparse ();
 
1119
#endif
 
1120
#else /* ! YYPARSE_PARAM */
 
1121
#if defined __STDC__ || defined __cplusplus
580
1122
int yyparse (void);
581
 
# endif
 
1123
#else
 
1124
int yyparse ();
582
1125
#endif
583
 
 
584
 
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
585
 
   variables are global, or local to YYPARSE.  */
586
 
 
587
 
#define YY_DECL_NON_LSP_VARIABLES                       \
588
 
/* The lookahead symbol.  */                            \
589
 
int yychar;                                             \
590
 
                                                        \
591
 
/* The semantic value of the lookahead symbol. */       \
592
 
YYSTYPE yylval;                                         \
593
 
                                                        \
594
 
/* Number of parse errors so far.  */                   \
 
1126
#endif /* ! YYPARSE_PARAM */
 
1127
 
 
1128
 
 
1129
 
 
1130
/* The look-ahead symbol.  */
 
1131
int yychar;
 
1132
 
 
1133
/* The semantic value of the look-ahead symbol.  */
 
1134
YYSTYPE yylval;
 
1135
 
 
1136
/* Number of syntax errors so far.  */
595
1137
int yynerrs;
596
1138
 
597
 
#if YYLSP_NEEDED
598
 
# define YY_DECL_VARIABLES                      \
599
 
YY_DECL_NON_LSP_VARIABLES                       \
600
 
                                                \
601
 
/* Location data for the lookahead symbol.  */  \
602
 
YYLTYPE yylloc;
603
 
#else
604
 
# define YY_DECL_VARIABLES                      \
605
 
YY_DECL_NON_LSP_VARIABLES
606
 
#endif
607
 
 
608
 
 
609
 
/* If nonreentrant, generate the variables here. */
610
 
 
611
 
#if !YYPURE
612
 
YY_DECL_VARIABLES
613
 
#endif  /* !YYPURE */
614
 
 
615
 
int
616
 
yyparse (YYPARSE_PARAM_ARG)
617
 
     YYPARSE_PARAM_DECL
 
1139
 
 
1140
 
 
1141
/*----------.
 
1142
| yyparse.  |
 
1143
`----------*/
 
1144
 
 
1145
#ifdef YYPARSE_PARAM
 
1146
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1147
     || defined __cplusplus || defined _MSC_VER)
 
1148
int
 
1149
yyparse (void *YYPARSE_PARAM)
 
1150
#else
 
1151
int
 
1152
yyparse (YYPARSE_PARAM)
 
1153
    void *YYPARSE_PARAM;
 
1154
#endif
 
1155
#else /* ! YYPARSE_PARAM */
 
1156
#if (defined __STDC__ || defined __C99__FUNC__ \
 
1157
     || defined __cplusplus || defined _MSC_VER)
 
1158
int
 
1159
yyparse (void)
 
1160
#else
 
1161
int
 
1162
yyparse ()
 
1163
 
 
1164
#endif
 
1165
#endif
618
1166
{
619
 
  /* If reentrant, generate the variables here. */
620
 
#if YYPURE
621
 
  YY_DECL_VARIABLES
622
 
#endif  /* !YYPURE */
623
 
 
624
 
  register int yystate;
625
 
  register int yyn;
 
1167
  
 
1168
  int yystate;
 
1169
  int yyn;
626
1170
  int yyresult;
627
1171
  /* Number of tokens to shift before error messages enabled.  */
628
1172
  int yyerrstatus;
629
 
  /* Lookahead token as an internal (translated) token number.  */
630
 
  int yychar1 = 0;
 
1173
  /* Look-ahead token as an internal (translated) token number.  */
 
1174
  int yytoken = 0;
 
1175
#if YYERROR_VERBOSE
 
1176
  /* Buffer for error messages, and its allocated size.  */
 
1177
  char yymsgbuf[128];
 
1178
  char *yymsg = yymsgbuf;
 
1179
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 
1180
#endif
631
1181
 
632
1182
  /* Three stacks and their tools:
633
1183
     `yyss': related to states,
637
1187
     Refer to the stacks thru separate pointers, to allow yyoverflow
638
1188
     to reallocate them elsewhere.  */
639
1189
 
640
 
  /* The state stack. */
641
 
  short yyssa[YYINITDEPTH];
642
 
  short *yyss = yyssa;
643
 
  register short *yyssp;
 
1190
  /* The state stack.  */
 
1191
  yytype_int16 yyssa[YYINITDEPTH];
 
1192
  yytype_int16 *yyss = yyssa;
 
1193
  yytype_int16 *yyssp;
644
1194
 
645
1195
  /* The semantic value stack.  */
646
1196
  YYSTYPE yyvsa[YYINITDEPTH];
647
1197
  YYSTYPE *yyvs = yyvsa;
648
 
  register YYSTYPE *yyvsp;
649
 
 
650
 
#if YYLSP_NEEDED
651
 
  /* The location stack.  */
652
 
  YYLTYPE yylsa[YYINITDEPTH];
653
 
  YYLTYPE *yyls = yylsa;
654
 
  YYLTYPE *yylsp;
655
 
#endif
656
 
 
657
 
#if YYLSP_NEEDED
658
 
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
659
 
#else
660
 
# define YYPOPSTACK   (yyvsp--, yyssp--)
661
 
#endif
 
1198
  YYSTYPE *yyvsp;
 
1199
 
 
1200
 
 
1201
 
 
1202
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
662
1203
 
663
1204
  YYSIZE_T yystacksize = YYINITDEPTH;
664
1205
 
665
 
 
666
1206
  /* The variables used to return semantic value and location from the
667
1207
     action routines.  */
668
1208
  YYSTYPE yyval;
669
 
#if YYLSP_NEEDED
670
 
  YYLTYPE yyloc;
671
 
#endif
672
 
 
673
 
  /* When reducing, the number of symbols on the RHS of the reduced
674
 
     rule. */
675
 
  int yylen;
 
1209
 
 
1210
 
 
1211
  /* The number of symbols on the RHS of the reduced rule.
 
1212
     Keep to zero when no symbol should be popped.  */
 
1213
  int yylen = 0;
676
1214
 
677
1215
  YYDPRINTF ((stderr, "Starting parse\n"));
678
1216
 
688
1226
 
689
1227
  yyssp = yyss;
690
1228
  yyvsp = yyvs;
691
 
#if YYLSP_NEEDED
692
 
  yylsp = yyls;
693
 
#endif
 
1229
 
694
1230
  goto yysetstate;
695
1231
 
696
1232
/*------------------------------------------------------------.
698
1234
`------------------------------------------------------------*/
699
1235
 yynewstate:
700
1236
  /* In all cases, when you get here, the value and location stacks
701
 
     have just been pushed. so pushing a state here evens the stacks.
702
 
     */
 
1237
     have just been pushed.  So pushing a state here evens the stacks.  */
703
1238
  yyssp++;
704
1239
 
705
1240
 yysetstate:
706
1241
  *yyssp = yystate;
707
1242
 
708
 
  if (yyssp >= yyss + yystacksize - 1)
 
1243
  if (yyss + yystacksize - 1 <= yyssp)
709
1244
    {
710
1245
      /* Get the current used size of the three stacks, in elements.  */
711
1246
      YYSIZE_T yysize = yyssp - yyss + 1;
712
1247
 
713
1248
#ifdef yyoverflow
714
1249
      {
715
 
        /* Give user a chance to reallocate the stack. Use copies of
 
1250
        /* Give user a chance to reallocate the stack.  Use copies of
716
1251
           these so that the &'s don't force the real ones into
717
1252
           memory.  */
718
1253
        YYSTYPE *yyvs1 = yyvs;
719
 
        short *yyss1 = yyss;
 
1254
        yytype_int16 *yyss1 = yyss;
 
1255
 
720
1256
 
721
1257
        /* Each stack pointer address is followed by the size of the
722
 
           data in use in that stack, in bytes.  */
723
 
# if YYLSP_NEEDED
724
 
        YYLTYPE *yyls1 = yyls;
725
 
        /* This used to be a conditional around just the two extra args,
726
 
           but that might be undefined if yyoverflow is a macro.  */
727
 
        yyoverflow ("parser stack overflow",
728
 
                    &yyss1, yysize * sizeof (*yyssp),
729
 
                    &yyvs1, yysize * sizeof (*yyvsp),
730
 
                    &yyls1, yysize * sizeof (*yylsp),
731
 
                    &yystacksize);
732
 
        yyls = yyls1;
733
 
# else
734
 
        yyoverflow ("parser stack overflow",
735
 
                    &yyss1, yysize * sizeof (*yyssp),
736
 
                    &yyvs1, yysize * sizeof (*yyvsp),
737
 
                    &yystacksize);
738
 
# endif
 
1258
           data in use in that stack, in bytes.  This used to be a
 
1259
           conditional around just the two extra args, but that might
 
1260
           be undefined if yyoverflow is a macro.  */
 
1261
        yyoverflow (YY_("memory exhausted"),
 
1262
                    &yyss1, yysize * sizeof (*yyssp),
 
1263
                    &yyvs1, yysize * sizeof (*yyvsp),
 
1264
 
 
1265
                    &yystacksize);
 
1266
 
739
1267
        yyss = yyss1;
740
1268
        yyvs = yyvs1;
741
1269
      }
742
1270
#else /* no yyoverflow */
743
1271
# ifndef YYSTACK_RELOCATE
744
 
      goto yyoverflowlab;
 
1272
      goto yyexhaustedlab;
745
1273
# else
746
1274
      /* Extend the stack our own way.  */
747
 
      if (yystacksize >= YYMAXDEPTH)
748
 
        goto yyoverflowlab;
 
1275
      if (YYMAXDEPTH <= yystacksize)
 
1276
        goto yyexhaustedlab;
749
1277
      yystacksize *= 2;
750
 
      if (yystacksize > YYMAXDEPTH)
 
1278
      if (YYMAXDEPTH < yystacksize)
751
1279
        yystacksize = YYMAXDEPTH;
752
1280
 
753
1281
      {
754
 
        short *yyss1 = yyss;
 
1282
        yytype_int16 *yyss1 = yyss;
755
1283
        union yyalloc *yyptr =
756
1284
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
757
1285
        if (! yyptr)
758
 
          goto yyoverflowlab;
 
1286
          goto yyexhaustedlab;
759
1287
        YYSTACK_RELOCATE (yyss);
760
1288
        YYSTACK_RELOCATE (yyvs);
761
 
# if YYLSP_NEEDED
762
 
        YYSTACK_RELOCATE (yyls);
763
 
# endif
764
 
# undef YYSTACK_RELOCATE
 
1289
 
 
1290
#  undef YYSTACK_RELOCATE
765
1291
        if (yyss1 != yyssa)
766
1292
          YYSTACK_FREE (yyss1);
767
1293
      }
770
1296
 
771
1297
      yyssp = yyss + yysize - 1;
772
1298
      yyvsp = yyvs + yysize - 1;
773
 
#if YYLSP_NEEDED
774
 
      yylsp = yyls + yysize - 1;
775
 
#endif
 
1299
 
776
1300
 
777
1301
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
778
1302
                  (unsigned long int) yystacksize));
779
1303
 
780
 
      if (yyssp >= yyss + yystacksize - 1)
 
1304
      if (yyss + yystacksize - 1 <= yyssp)
781
1305
        YYABORT;
782
1306
    }
783
1307
 
785
1309
 
786
1310
  goto yybackup;
787
1311
 
788
 
 
789
1312
/*-----------.
790
1313
| yybackup.  |
791
1314
`-----------*/
792
1315
yybackup:
793
1316
 
794
 
/* Do appropriate processing given the current state.  */
795
 
/* Read a lookahead token if we need one and don't already have one.  */
796
 
/* yyresume: */
797
 
 
798
 
  /* First try to decide what to do without reference to lookahead token.  */
799
 
 
 
1317
  /* Do appropriate processing given the current state.  Read a
 
1318
     look-ahead token if we need one and don't already have one.  */
 
1319
 
 
1320
  /* First try to decide what to do without reference to look-ahead token.  */
800
1321
  yyn = yypact[yystate];
801
 
  if (yyn == YYFLAG)
 
1322
  if (yyn == YYPACT_NINF)
802
1323
    goto yydefault;
803
1324
 
804
 
  /* Not known => get a lookahead token if don't already have one.  */
805
 
 
806
 
  /* yychar is either YYEMPTY or YYEOF
807
 
     or a valid token in external form.  */
808
 
 
 
1325
  /* Not known => get a look-ahead token if don't already have one.  */
 
1326
 
 
1327
  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
809
1328
  if (yychar == YYEMPTY)
810
1329
    {
811
1330
      YYDPRINTF ((stderr, "Reading a token: "));
812
1331
      yychar = YYLEX;
813
1332
    }
814
1333
 
815
 
  /* Convert token to internal form (in yychar1) for indexing tables with */
816
 
 
817
 
  if (yychar <= 0)              /* This means end of input. */
 
1334
  if (yychar <= YYEOF)
818
1335
    {
819
 
      yychar1 = 0;
820
 
      yychar = YYEOF;           /* Don't call YYLEX any more */
821
 
 
 
1336
      yychar = yytoken = YYEOF;
822
1337
      YYDPRINTF ((stderr, "Now at end of input.\n"));
823
1338
    }
824
1339
  else
825
1340
    {
826
 
      yychar1 = YYTRANSLATE (yychar);
827
 
 
828
 
#if YYDEBUG
829
 
     /* We have to keep this `#if YYDEBUG', since we use variables
830
 
        which are defined only if `YYDEBUG' is set.  */
831
 
      if (yydebug)
832
 
        {
833
 
          YYFPRINTF (stderr, "Next token is %d (%s",
834
 
                     yychar, yytname[yychar1]);
835
 
          /* Give the individual parser a way to print the precise
836
 
             meaning of a token, for further debugging info.  */
837
 
# ifdef YYPRINT
838
 
          YYPRINT (stderr, yychar, yylval);
839
 
# endif
840
 
          YYFPRINTF (stderr, ")\n");
841
 
        }
842
 
#endif
 
1341
      yytoken = YYTRANSLATE (yychar);
 
1342
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
843
1343
    }
844
1344
 
845
 
  yyn += yychar1;
846
 
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
 
1345
  /* If the proper action on seeing token YYTOKEN is to reduce or to
 
1346
     detect an error, take that action.  */
 
1347
  yyn += yytoken;
 
1348
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
847
1349
    goto yydefault;
848
 
 
849
1350
  yyn = yytable[yyn];
850
 
 
851
 
  /* yyn is what to do for this token type in this state.
852
 
     Negative => reduce, -yyn is rule number.
853
 
     Positive => shift, yyn is new state.
854
 
       New state is final state => don't bother to shift,
855
 
       just return success.
856
 
     0, or most negative number => error.  */
857
 
 
858
 
  if (yyn < 0)
 
1351
  if (yyn <= 0)
859
1352
    {
860
 
      if (yyn == YYFLAG)
 
1353
      if (yyn == 0 || yyn == YYTABLE_NINF)
861
1354
        goto yyerrlab;
862
1355
      yyn = -yyn;
863
1356
      goto yyreduce;
864
1357
    }
865
 
  else if (yyn == 0)
866
 
    goto yyerrlab;
867
1358
 
868
1359
  if (yyn == YYFINAL)
869
1360
    YYACCEPT;
870
1361
 
871
 
  /* Shift the lookahead token.  */
872
 
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
873
 
              yychar, yytname[yychar1]));
874
 
 
875
 
  /* Discard the token being shifted unless it is eof.  */
876
 
  if (yychar != YYEOF)
877
 
    yychar = YYEMPTY;
878
 
 
879
 
  *++yyvsp = yylval;
880
 
#if YYLSP_NEEDED
881
 
  *++yylsp = yylloc;
882
 
#endif
883
 
 
884
1362
  /* Count tokens shifted since error; after three, turn off error
885
1363
     status.  */
886
1364
  if (yyerrstatus)
887
1365
    yyerrstatus--;
888
1366
 
 
1367
  /* Shift the look-ahead token.  */
 
1368
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
1369
 
 
1370
  /* Discard the shifted token unless it is eof.  */
 
1371
  if (yychar != YYEOF)
 
1372
    yychar = YYEMPTY;
 
1373
 
889
1374
  yystate = yyn;
 
1375
  *++yyvsp = yylval;
 
1376
 
890
1377
  goto yynewstate;
891
1378
 
892
1379
 
910
1397
  /* If YYLEN is nonzero, implement the default value of the action:
911
1398
     `$$ = $1'.
912
1399
 
913
 
     Otherwise, the following line sets YYVAL to the semantic value of
914
 
     the lookahead token.  This behavior is undocumented and Bison
 
1400
     Otherwise, the following line sets YYVAL to garbage.
 
1401
     This behavior is undocumented and Bison
915
1402
     users should not rely upon it.  Assigning to YYVAL
916
1403
     unconditionally makes the parser a bit smaller, and it avoids a
917
1404
     GCC warning that YYVAL may be used uninitialized.  */
918
1405
  yyval = yyvsp[1-yylen];
919
1406
 
920
 
#if YYLSP_NEEDED
921
 
  /* Similarly for the default location.  Let the user run additional
922
 
     commands if for instance locations are ranges.  */
923
 
  yyloc = yylsp[1-yylen];
924
 
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
925
 
#endif
926
 
 
927
 
#if YYDEBUG
928
 
  /* We have to keep this `#if YYDEBUG', since we use variables which
929
 
     are defined only if `YYDEBUG' is set.  */
930
 
  if (yydebug)
931
 
    {
932
 
      int yyi;
933
 
 
934
 
      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
935
 
                 yyn, yyrline[yyn]);
936
 
 
937
 
      /* Print the symbols being reduced, and their result.  */
938
 
      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
939
 
        YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
940
 
      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
941
 
    }
942
 
#endif
943
 
 
944
 
  switch (yyn) {
945
 
 
946
 
case 8:
947
 
#line 71 "imap_ncsa.y"
948
 
{
949
 
                }
950
 
    break;
951
 
case 9:
952
 
#line 76 "imap_ncsa.y"
953
 
{
954
 
                   MapInfo_t *info = get_map_info();
955
 
                   g_strreplace(&info->author, yyvsp[0].id);
956
 
                }
957
 
    break;
958
 
case 10:
959
 
#line 83 "imap_ncsa.y"
960
 
{
961
 
                   MapInfo_t *info = get_map_info();
962
 
                   g_strreplace(&info->title, yyvsp[0].id);
963
 
                }
964
 
    break;
965
 
case 11:
966
 
#line 90 "imap_ncsa.y"
967
 
{
 
1407
 
 
1408
  YY_REDUCE_PRINT (yyn);
 
1409
  switch (yyn)
 
1410
    {
 
1411
        case 9:
 
1412
#line 73 "imap_ncsa.y"
 
1413
    {
 
1414
                }
 
1415
    break;
 
1416
 
 
1417
  case 10:
 
1418
#line 78 "imap_ncsa.y"
 
1419
    {
 
1420
                   MapInfo_t *info = get_map_info();
 
1421
                   g_strreplace(&info->author, (yyvsp[(2) - (2)].id));
 
1422
                }
 
1423
    break;
 
1424
 
 
1425
  case 11:
 
1426
#line 85 "imap_ncsa.y"
 
1427
    {
 
1428
                   MapInfo_t *info = get_map_info();
 
1429
                   g_strreplace(&info->title, (yyvsp[(2) - (2)].id));
 
1430
                }
 
1431
    break;
 
1432
 
 
1433
  case 12:
 
1434
#line 92 "imap_ncsa.y"
 
1435
    {
968
1436
                   MapInfo_t *info = get_map_info();
969
1437
                   gchar *description;
970
1438
 
971
 
                   description = g_strconcat(info->description, yyvsp[0].id, "\n", 
 
1439
                   description = g_strconcat(info->description, (yyvsp[(2) - (2)].id), "\n", 
972
1440
                                             NULL);
973
1441
                   g_strreplace(&info->description, description);
974
1442
                }
975
1443
    break;
976
 
case 19:
977
 
#line 112 "imap_ncsa.y"
978
 
{
 
1444
 
 
1445
  case 20:
 
1446
#line 114 "imap_ncsa.y"
 
1447
    {
979
1448
                   MapInfo_t *info = get_map_info();                  
980
 
                   g_strreplace(&info->default_url, yyvsp[0].id);
 
1449
                   g_strreplace(&info->default_url, (yyvsp[(2) - (2)].id));
981
1450
                }
982
1451
    break;
983
 
case 20:
984
 
#line 120 "imap_ncsa.y"
985
 
{
986
 
                   gint x = (gint) yyvsp[-5].value;
987
 
                   gint y = (gint) yyvsp[-3].value;
988
 
                   gint width = (gint) fabs(yyvsp[-2].value - x);
989
 
                   gint height = (gint) fabs(yyvsp[0].value - y);
 
1452
 
 
1453
  case 21:
 
1454
#line 122 "imap_ncsa.y"
 
1455
    {
 
1456
                   gint x = (gint) (yyvsp[(3) - (8)].value);
 
1457
                   gint y = (gint) (yyvsp[(5) - (8)].value);
 
1458
                   gint width = (gint) fabs((yyvsp[(6) - (8)].value) - x);
 
1459
                   gint height = (gint) fabs((yyvsp[(8) - (8)].value) - y);
990
1460
                   current_object = create_rectangle(x, y, width, height);
991
 
                   object_set_url(current_object, yyvsp[-6].id);
 
1461
                   object_set_url(current_object, (yyvsp[(2) - (8)].id));
992
1462
                   add_shape(current_object);
993
1463
                }
994
1464
    break;
995
 
case 21:
996
 
#line 132 "imap_ncsa.y"
997
 
{
998
 
                   gint x = (gint) yyvsp[-5].value;
999
 
                   gint y = (gint) yyvsp[-3].value;
1000
 
                   gint r = (gint) fabs(yyvsp[0].value - yyvsp[-3].value);
 
1465
 
 
1466
  case 22:
 
1467
#line 134 "imap_ncsa.y"
 
1468
    {
 
1469
                   gint x = (gint) (yyvsp[(3) - (8)].value);
 
1470
                   gint y = (gint) (yyvsp[(5) - (8)].value);
 
1471
                   gint r = (gint) fabs((yyvsp[(8) - (8)].value) - (yyvsp[(5) - (8)].value));
1001
1472
                   current_object = create_circle(x, y, r);
1002
 
                   object_set_url(current_object, yyvsp[-6].id);
1003
 
                   add_shape(current_object);
1004
 
                }
1005
 
    break;
1006
 
case 22:
1007
 
#line 142 "imap_ncsa.y"
1008
 
{current_object = create_polygon(NULL);}
1009
 
    break;
1010
 
case 23:
1011
 
#line 143 "imap_ncsa.y"
1012
 
{
1013
 
                   object_set_url(current_object, yyvsp[-2].id);
1014
 
                   add_shape(current_object);
1015
 
                }
1016
 
    break;
1017
 
case 25:
1018
 
#line 151 "imap_ncsa.y"
1019
 
{
1020
 
                }
1021
 
    break;
1022
 
case 26:
1023
 
#line 156 "imap_ncsa.y"
1024
 
{
 
1473
                   object_set_url(current_object, (yyvsp[(2) - (8)].id));
 
1474
                   add_shape(current_object);
 
1475
                }
 
1476
    break;
 
1477
 
 
1478
  case 23:
 
1479
#line 144 "imap_ncsa.y"
 
1480
    {current_object = create_polygon(NULL);}
 
1481
    break;
 
1482
 
 
1483
  case 24:
 
1484
#line 145 "imap_ncsa.y"
 
1485
    {
 
1486
                   object_set_url(current_object, (yyvsp[(2) - (4)].id));
 
1487
                   add_shape(current_object);
 
1488
                }
 
1489
    break;
 
1490
 
 
1491
  case 26:
 
1492
#line 153 "imap_ncsa.y"
 
1493
    {
 
1494
                }
 
1495
    break;
 
1496
 
 
1497
  case 27:
 
1498
#line 158 "imap_ncsa.y"
 
1499
    {
1025
1500
                   Polygon_t *polygon = ObjectToPolygon(current_object);
1026
 
                   GdkPoint *point = new_point((gint) yyvsp[-2].value, (gint) yyvsp[0].value);
 
1501
                   GdkPoint *point = new_point((gint) (yyvsp[(1) - (3)].value), (gint) (yyvsp[(3) - (3)].value));
1027
1502
                   polygon->points = g_list_append(polygon->points, 
1028
1503
                                                   (gpointer) point);
1029
1504
                }
1030
1505
    break;
1031
 
}
1032
 
 
1033
 
#line 705 "/usr/share/bison/bison.simple"
1034
 
 
1035
 
 
1036
 
  yyvsp -= yylen;
1037
 
  yyssp -= yylen;
1038
 
#if YYLSP_NEEDED
1039
 
  yylsp -= yylen;
1040
 
#endif
1041
 
 
1042
 
#if YYDEBUG
1043
 
  if (yydebug)
1044
 
    {
1045
 
      short *yyssp1 = yyss - 1;
1046
 
      YYFPRINTF (stderr, "state stack now");
1047
 
      while (yyssp1 != yyssp)
1048
 
        YYFPRINTF (stderr, " %d", *++yyssp1);
1049
 
      YYFPRINTF (stderr, "\n");
 
1506
 
 
1507
 
 
1508
/* Line 1267 of yacc.c.  */
 
1509
#line 1510 "y.tab.c"
 
1510
      default: break;
1050
1511
    }
1051
 
#endif
 
1512
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
1513
 
 
1514
  YYPOPSTACK (yylen);
 
1515
  yylen = 0;
 
1516
  YY_STACK_PRINT (yyss, yyssp);
1052
1517
 
1053
1518
  *++yyvsp = yyval;
1054
 
#if YYLSP_NEEDED
1055
 
  *++yylsp = yyloc;
1056
 
#endif
 
1519
 
1057
1520
 
1058
1521
  /* Now `shift' the result of the reduction.  Determine what state
1059
1522
     that goes to, based on the state we popped back to and the rule
1061
1524
 
1062
1525
  yyn = yyr1[yyn];
1063
1526
 
1064
 
  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1065
 
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 
1527
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
 
1528
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1066
1529
    yystate = yytable[yystate];
1067
1530
  else
1068
 
    yystate = yydefgoto[yyn - YYNTBASE];
 
1531
    yystate = yydefgoto[yyn - YYNTOKENS];
1069
1532
 
1070
1533
  goto yynewstate;
1071
1534
 
1078
1541
  if (!yyerrstatus)
1079
1542
    {
1080
1543
      ++yynerrs;
1081
 
 
1082
 
#ifdef YYERROR_VERBOSE
1083
 
      yyn = yypact[yystate];
1084
 
 
1085
 
      if (yyn > YYFLAG && yyn < YYLAST)
1086
 
        {
1087
 
          YYSIZE_T yysize = 0;
1088
 
          char *yymsg;
1089
 
          int yyx, yycount;
1090
 
 
1091
 
          yycount = 0;
1092
 
          /* Start YYX at -YYN if negative to avoid negative indexes in
1093
 
             YYCHECK.  */
1094
 
          for (yyx = yyn < 0 ? -yyn : 0;
1095
 
               yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1096
 
            if (yycheck[yyx + yyn] == yyx)
1097
 
              yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1098
 
          yysize += yystrlen ("parse error, unexpected ") + 1;
1099
 
          yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1100
 
          yymsg = (char *) YYSTACK_ALLOC (yysize);
1101
 
          if (yymsg != 0)
1102
 
            {
1103
 
              char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1104
 
              yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1105
 
 
1106
 
              if (yycount < 5)
1107
 
                {
1108
 
                  yycount = 0;
1109
 
                  for (yyx = yyn < 0 ? -yyn : 0;
1110
 
                       yyx < (int) (sizeof (yytname) / sizeof (char *));
1111
 
                       yyx++)
1112
 
                    if (yycheck[yyx + yyn] == yyx)
1113
 
                      {
1114
 
                        const char *yyq = ! yycount ? ", expecting " : " or ";
1115
 
                        yyp = yystpcpy (yyp, yyq);
1116
 
                        yyp = yystpcpy (yyp, yytname[yyx]);
1117
 
                        yycount++;
1118
 
                      }
1119
 
                }
1120
 
              yyerror (yymsg);
 
1544
#if ! YYERROR_VERBOSE
 
1545
      yyerror (YY_("syntax error"));
 
1546
#else
 
1547
      {
 
1548
        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
 
1549
        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
 
1550
          {
 
1551
            YYSIZE_T yyalloc = 2 * yysize;
 
1552
            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
 
1553
              yyalloc = YYSTACK_ALLOC_MAXIMUM;
 
1554
            if (yymsg != yymsgbuf)
1121
1555
              YYSTACK_FREE (yymsg);
1122
 
            }
1123
 
          else
1124
 
            yyerror ("parse error; also virtual memory exhausted");
1125
 
        }
1126
 
      else
1127
 
#endif /* defined (YYERROR_VERBOSE) */
1128
 
        yyerror ("parse error");
 
1556
            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
 
1557
            if (yymsg)
 
1558
              yymsg_alloc = yyalloc;
 
1559
            else
 
1560
              {
 
1561
                yymsg = yymsgbuf;
 
1562
                yymsg_alloc = sizeof yymsgbuf;
 
1563
              }
 
1564
          }
 
1565
 
 
1566
        if (0 < yysize && yysize <= yymsg_alloc)
 
1567
          {
 
1568
            (void) yysyntax_error (yymsg, yystate, yychar);
 
1569
            yyerror (yymsg);
 
1570
          }
 
1571
        else
 
1572
          {
 
1573
            yyerror (YY_("syntax error"));
 
1574
            if (yysize != 0)
 
1575
              goto yyexhaustedlab;
 
1576
          }
 
1577
      }
 
1578
#endif
1129
1579
    }
1130
 
  goto yyerrlab1;
1131
 
 
1132
 
 
1133
 
/*--------------------------------------------------.
1134
 
| yyerrlab1 -- error raised explicitly by an action |
1135
 
`--------------------------------------------------*/
1136
 
yyerrlab1:
 
1580
 
 
1581
 
 
1582
 
1137
1583
  if (yyerrstatus == 3)
1138
1584
    {
1139
 
      /* If just tried and failed to reuse lookahead token after an
 
1585
      /* If just tried and failed to reuse look-ahead token after an
1140
1586
         error, discard it.  */
1141
1587
 
1142
 
      /* return failure if at end of input */
1143
 
      if (yychar == YYEOF)
1144
 
        YYABORT;
1145
 
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1146
 
                  yychar, yytname[yychar1]));
1147
 
      yychar = YYEMPTY;
 
1588
      if (yychar <= YYEOF)
 
1589
        {
 
1590
          /* Return failure if at end of input.  */
 
1591
          if (yychar == YYEOF)
 
1592
            YYABORT;
 
1593
        }
 
1594
      else
 
1595
        {
 
1596
          yydestruct ("Error: discarding",
 
1597
                      yytoken, &yylval);
 
1598
          yychar = YYEMPTY;
 
1599
        }
1148
1600
    }
1149
1601
 
1150
 
  /* Else will try to reuse lookahead token after shifting the error
 
1602
  /* Else will try to reuse look-ahead token after shifting the error
1151
1603
     token.  */
1152
 
 
1153
 
  yyerrstatus = 3;              /* Each real token shifted decrements this */
1154
 
 
1155
 
  goto yyerrhandle;
1156
 
 
1157
 
 
1158
 
/*-------------------------------------------------------------------.
1159
 
| yyerrdefault -- current state does not do anything special for the |
1160
 
| error token.                                                       |
1161
 
`-------------------------------------------------------------------*/
1162
 
yyerrdefault:
1163
 
#if 0
1164
 
  /* This is wrong; only states that explicitly want error tokens
1165
 
     should shift them.  */
1166
 
 
1167
 
  /* If its default is to accept any token, ok.  Otherwise pop it.  */
1168
 
  yyn = yydefact[yystate];
1169
 
  if (yyn)
1170
 
    goto yydefault;
1171
 
#endif
1172
 
 
1173
 
 
1174
 
/*---------------------------------------------------------------.
1175
 
| yyerrpop -- pop the current state because it cannot handle the |
1176
 
| error token                                                    |
1177
 
`---------------------------------------------------------------*/
1178
 
yyerrpop:
1179
 
  if (yyssp == yyss)
1180
 
    YYABORT;
1181
 
  yyvsp--;
1182
 
  yystate = *--yyssp;
1183
 
#if YYLSP_NEEDED
1184
 
  yylsp--;
1185
 
#endif
1186
 
 
1187
 
#if YYDEBUG
1188
 
  if (yydebug)
1189
 
    {
1190
 
      short *yyssp1 = yyss - 1;
1191
 
      YYFPRINTF (stderr, "Error: state stack now");
1192
 
      while (yyssp1 != yyssp)
1193
 
        YYFPRINTF (stderr, " %d", *++yyssp1);
1194
 
      YYFPRINTF (stderr, "\n");
1195
 
    }
1196
 
#endif
1197
 
 
1198
 
/*--------------.
1199
 
| yyerrhandle.  |
1200
 
`--------------*/
1201
 
yyerrhandle:
1202
 
  yyn = yypact[yystate];
1203
 
  if (yyn == YYFLAG)
1204
 
    goto yyerrdefault;
1205
 
 
1206
 
  yyn += YYTERROR;
1207
 
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1208
 
    goto yyerrdefault;
1209
 
 
1210
 
  yyn = yytable[yyn];
1211
 
  if (yyn < 0)
1212
 
    {
1213
 
      if (yyn == YYFLAG)
1214
 
        goto yyerrpop;
1215
 
      yyn = -yyn;
1216
 
      goto yyreduce;
1217
 
    }
1218
 
  else if (yyn == 0)
1219
 
    goto yyerrpop;
 
1604
  goto yyerrlab1;
 
1605
 
 
1606
 
 
1607
/*---------------------------------------------------.
 
1608
| yyerrorlab -- error raised explicitly by YYERROR.  |
 
1609
`---------------------------------------------------*/
 
1610
yyerrorlab:
 
1611
 
 
1612
  /* Pacify compilers like GCC when the user code never invokes
 
1613
     YYERROR and the label yyerrorlab therefore never appears in user
 
1614
     code.  */
 
1615
  if (/*CONSTCOND*/ 0)
 
1616
     goto yyerrorlab;
 
1617
 
 
1618
  /* Do not reclaim the symbols of the rule which action triggered
 
1619
     this YYERROR.  */
 
1620
  YYPOPSTACK (yylen);
 
1621
  yylen = 0;
 
1622
  YY_STACK_PRINT (yyss, yyssp);
 
1623
  yystate = *yyssp;
 
1624
  goto yyerrlab1;
 
1625
 
 
1626
 
 
1627
/*-------------------------------------------------------------.
 
1628
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
 
1629
`-------------------------------------------------------------*/
 
1630
yyerrlab1:
 
1631
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
 
1632
 
 
1633
  for (;;)
 
1634
    {
 
1635
      yyn = yypact[yystate];
 
1636
      if (yyn != YYPACT_NINF)
 
1637
        {
 
1638
          yyn += YYTERROR;
 
1639
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
 
1640
            {
 
1641
              yyn = yytable[yyn];
 
1642
              if (0 < yyn)
 
1643
                break;
 
1644
            }
 
1645
        }
 
1646
 
 
1647
      /* Pop the current state because it cannot handle the error token.  */
 
1648
      if (yyssp == yyss)
 
1649
        YYABORT;
 
1650
 
 
1651
 
 
1652
      yydestruct ("Error: popping",
 
1653
                  yystos[yystate], yyvsp);
 
1654
      YYPOPSTACK (1);
 
1655
      yystate = *yyssp;
 
1656
      YY_STACK_PRINT (yyss, yyssp);
 
1657
    }
1220
1658
 
1221
1659
  if (yyn == YYFINAL)
1222
1660
    YYACCEPT;
1223
1661
 
1224
 
  YYDPRINTF ((stderr, "Shifting error token, "));
1225
 
 
1226
1662
  *++yyvsp = yylval;
1227
 
#if YYLSP_NEEDED
1228
 
  *++yylsp = yylloc;
1229
 
#endif
 
1663
 
 
1664
 
 
1665
  /* Shift the error token.  */
 
1666
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1230
1667
 
1231
1668
  yystate = yyn;
1232
1669
  goto yynewstate;
1246
1683
  yyresult = 1;
1247
1684
  goto yyreturn;
1248
1685
 
1249
 
/*---------------------------------------------.
1250
 
| yyoverflowab -- parser overflow comes here.  |
1251
 
`---------------------------------------------*/
1252
 
yyoverflowlab:
1253
 
  yyerror ("parser stack overflow");
 
1686
#ifndef yyoverflow
 
1687
/*-------------------------------------------------.
 
1688
| yyexhaustedlab -- memory exhaustion comes here.  |
 
1689
`-------------------------------------------------*/
 
1690
yyexhaustedlab:
 
1691
  yyerror (YY_("memory exhausted"));
1254
1692
  yyresult = 2;
1255
1693
  /* Fall through.  */
 
1694
#endif
1256
1695
 
1257
1696
yyreturn:
 
1697
  if (yychar != YYEOF && yychar != YYEMPTY)
 
1698
     yydestruct ("Cleanup: discarding lookahead",
 
1699
                 yytoken, &yylval);
 
1700
  /* Do not reclaim the symbols of the rule which action triggered
 
1701
     this YYABORT or YYACCEPT.  */
 
1702
  YYPOPSTACK (yylen);
 
1703
  YY_STACK_PRINT (yyss, yyssp);
 
1704
  while (yyssp != yyss)
 
1705
    {
 
1706
      yydestruct ("Cleanup: popping",
 
1707
                  yystos[*yyssp], yyvsp);
 
1708
      YYPOPSTACK (1);
 
1709
    }
1258
1710
#ifndef yyoverflow
1259
1711
  if (yyss != yyssa)
1260
1712
    YYSTACK_FREE (yyss);
1261
1713
#endif
1262
 
  return yyresult;
 
1714
#if YYERROR_VERBOSE
 
1715
  if (yymsg != yymsgbuf)
 
1716
    YYSTACK_FREE (yymsg);
 
1717
#endif
 
1718
  /* Make sure YYID is used.  */
 
1719
  return YYID (yyresult);
1263
1720
}
1264
 
#line 164 "imap_ncsa.y"
 
1721
 
 
1722
 
 
1723
#line 166 "imap_ncsa.y"
1265
1724
 
1266
1725
 
1267
1726
static void 
1276
1735
{
1277
1736
   gboolean status;
1278
1737
   extern FILE *ncsa_in;
1279
 
   ncsa_in = fopen(filename, "r");
 
1738
   ncsa_in = g_fopen(filename, "r");
1280
1739
   if (ncsa_in) {
1281
1740
      status = !ncsa_parse();
1282
1741
      fclose(ncsa_in);
1285
1744
   }
1286
1745
   return status;
1287
1746
}
 
1747