[10705] | 1 | /* A Bison parser, made by GNU Bison 1.875. */
|
---|
[1347] | 2 |
|
---|
[10705] | 3 | /* Skeleton parser for Yacc-like parsing with Bison,
|
---|
| 4 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
|
---|
[1347] | 5 |
|
---|
[10705] | 6 | This program is free software; you can redistribute it and/or modify
|
---|
| 7 | it under the terms of the GNU General Public License as published by
|
---|
| 8 | the Free Software Foundation; either version 2, or (at your option)
|
---|
| 9 | any later version.
|
---|
[1347] | 10 |
|
---|
[10705] | 11 | This program is distributed in the hope that it will be useful,
|
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 14 | GNU General Public License for more details.
|
---|
[1347] | 15 |
|
---|
[10705] | 16 | You should have received a copy of the GNU General Public License
|
---|
| 17 | along with this program; if not, write to the Free Software
|
---|
| 18 | Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
| 19 | Boston, MA 02111-1307, USA. */
|
---|
| 20 |
|
---|
| 21 | /* As a special exception, when this file is copied by Bison into a
|
---|
| 22 | Bison output file, you may use that output file without restriction.
|
---|
| 23 | This special exception was added by the Free Software Foundation
|
---|
| 24 | in version 1.24 of Bison. */
|
---|
| 25 |
|
---|
| 26 | /* Written by Richard Stallman by simplifying the original so called
|
---|
| 27 | ``semantic'' parser. */
|
---|
| 28 |
|
---|
| 29 | /* All symbols defined below should begin with yy or YY, to avoid
|
---|
| 30 | infringing on user name space. This should be done even for local
|
---|
| 31 | variables, as they might otherwise be expanded by user macros.
|
---|
| 32 | There are some unavoidable exceptions within include files to
|
---|
| 33 | define necessary library symbols; they are noted "INFRINGES ON
|
---|
| 34 | USER NAME SPACE" below. */
|
---|
| 35 |
|
---|
| 36 | /* Identify Bison output. */
|
---|
| 37 | #define YYBISON 1
|
---|
| 38 |
|
---|
| 39 | /* Skeleton name. */
|
---|
| 40 | #define YYSKELETON_NAME "yacc.c"
|
---|
| 41 |
|
---|
| 42 | /* Pure parsers. */
|
---|
| 43 | #define YYPURE 0
|
---|
| 44 |
|
---|
| 45 | /* Using locations. */
|
---|
| 46 | #define YYLSP_NEEDED 0
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | /* Tokens. */
|
---|
| 51 | #ifndef YYTOKENTYPE
|
---|
| 52 | # define YYTOKENTYPE
|
---|
| 53 | /* Put the tokens into the symbol table, so that GDB and other debuggers
|
---|
| 54 | know about them. */
|
---|
| 55 | enum yytokentype {
|
---|
| 56 | GSDLVERSION = 257,
|
---|
| 57 | GENERAL_SECTION = 258,
|
---|
| 58 | SEARCH_SECTION = 259,
|
---|
| 59 | BROWSE_SECTION = 260,
|
---|
| 60 | MACROS_SECTION = 261,
|
---|
| 61 | MAINTAINER = 262,
|
---|
| 62 | PUBLIC = 263,
|
---|
| 63 | TRUE = 264,
|
---|
| 64 | FALSE = 265,
|
---|
| 65 | LANGUAGES = 266,
|
---|
| 66 | EN = 267,
|
---|
| 67 | FR = 268,
|
---|
| 68 | MI = 269,
|
---|
| 69 | ZH = 270,
|
---|
| 70 | DE = 271,
|
---|
| 71 | NAME = 272,
|
---|
| 72 | STRING = 273,
|
---|
| 73 | ICON = 274,
|
---|
| 74 | SMALLICON = 275,
|
---|
| 75 | ABOUT = 276,
|
---|
| 76 | SEARCHTEXT = 277,
|
---|
| 77 | DOCUMENT = 278,
|
---|
| 78 | SECTION = 279,
|
---|
| 79 | BROWSE = 280,
|
---|
| 80 | TYPE = 281,
|
---|
| 81 | FORMAT = 282,
|
---|
| 82 | LIST = 283,
|
---|
| 83 | SORTEDLIST = 284,
|
---|
| 84 | SECTIONLIST = 285,
|
---|
| 85 | SORTEDSECTIONLIST = 286,
|
---|
| 86 | DATELIST = 287,
|
---|
| 87 | ICONLINK = 288,
|
---|
| 88 | TEXTLINK = 289,
|
---|
| 89 | DOCUMENTIMAGES = 290,
|
---|
| 90 | DOCUMENTHEADER = 291,
|
---|
| 91 | DOCUMENTTEXT = 292,
|
---|
| 92 | DOCUMENTBUTTONS = 293,
|
---|
| 93 | DOCUMENTARROWSBOTTOM = 294,
|
---|
| 94 | DATA = 295
|
---|
| 95 | };
|
---|
| 96 | #endif
|
---|
| 97 | #define GSDLVERSION 257
|
---|
| 98 | #define GENERAL_SECTION 258
|
---|
| 99 | #define SEARCH_SECTION 259
|
---|
| 100 | #define BROWSE_SECTION 260
|
---|
| 101 | #define MACROS_SECTION 261
|
---|
| 102 | #define MAINTAINER 262
|
---|
| 103 | #define PUBLIC 263
|
---|
| 104 | #define TRUE 264
|
---|
| 105 | #define FALSE 265
|
---|
| 106 | #define LANGUAGES 266
|
---|
| 107 | #define EN 267
|
---|
| 108 | #define FR 268
|
---|
| 109 | #define MI 269
|
---|
| 110 | #define ZH 270
|
---|
| 111 | #define DE 271
|
---|
| 112 | #define NAME 272
|
---|
| 113 | #define STRING 273
|
---|
| 114 | #define ICON 274
|
---|
| 115 | #define SMALLICON 275
|
---|
| 116 | #define ABOUT 276
|
---|
| 117 | #define SEARCHTEXT 277
|
---|
| 118 | #define DOCUMENT 278
|
---|
| 119 | #define SECTION 279
|
---|
| 120 | #define BROWSE 280
|
---|
| 121 | #define TYPE 281
|
---|
| 122 | #define FORMAT 282
|
---|
| 123 | #define LIST 283
|
---|
| 124 | #define SORTEDLIST 284
|
---|
| 125 | #define SECTIONLIST 285
|
---|
| 126 | #define SORTEDSECTIONLIST 286
|
---|
| 127 | #define DATELIST 287
|
---|
| 128 | #define ICONLINK 288
|
---|
| 129 | #define TEXTLINK 289
|
---|
| 130 | #define DOCUMENTIMAGES 290
|
---|
| 131 | #define DOCUMENTHEADER 291
|
---|
| 132 | #define DOCUMENTTEXT 292
|
---|
| 133 | #define DOCUMENTBUTTONS 293
|
---|
| 134 | #define DOCUMENTARROWSBOTTOM 294
|
---|
| 135 | #define DATA 295
|
---|
| 136 |
|
---|
| 137 |
|
---|
| 138 |
|
---|
| 139 |
|
---|
| 140 | /* Copy the first part of user declarations. */
|
---|
[1372] | 141 | #line 27 "zparse.y"
|
---|
[1347] | 142 |
|
---|
| 143 | /* verbatim C code - functions, etc */
|
---|
| 144 | #include <stdlib.h>
|
---|
| 145 | #include <stdio.h>
|
---|
| 146 | #include <string.h>
|
---|
| 147 | #include <ctype.h>
|
---|
[10705] | 148 | #include "z3950cfg.h" /* structure types, and #define of yyin/yyparse */
|
---|
[1347] | 149 |
|
---|
| 150 | #define YYDEBUG 1
|
---|
| 151 | #define YYERROR_VERBOSE 1
|
---|
| 152 | char defLanguage=0;
|
---|
| 153 |
|
---|
| 154 | /* defined in parse.fl */
|
---|
| 155 | extern int lineno;
|
---|
| 156 |
|
---|
| 157 | #ifndef YYRECOVERING
|
---|
| 158 | int YYRECOVERING=0; /* this is supposed to already be defined as a macro */
|
---|
| 159 | #endif
|
---|
| 160 |
|
---|
| 161 | /* defined in z3950proto.cpp */
|
---|
[1355] | 162 | struct z3950cfg *zserver_list=NULL;
|
---|
[1440] | 163 |
|
---|
| 164 | /* this is set in z3950proto.cpp */
|
---|
[1372] | 165 | FILE *errfile;
|
---|
[1347] | 166 |
|
---|
| 167 | int yylex(void);
|
---|
| 168 |
|
---|
| 169 | int yyerror(char *string);
|
---|
| 170 |
|
---|
| 171 | void errormsg(char *str);
|
---|
| 172 |
|
---|
| 173 |
|
---|
[10705] | 174 |
|
---|
| 175 | /* Enabling traces. */
|
---|
| 176 | #ifndef YYDEBUG
|
---|
| 177 | # define YYDEBUG 0
|
---|
| 178 | #endif
|
---|
| 179 |
|
---|
| 180 | /* Enabling verbose error messages. */
|
---|
| 181 | #ifdef YYERROR_VERBOSE
|
---|
| 182 | # undef YYERROR_VERBOSE
|
---|
| 183 | # define YYERROR_VERBOSE 1
|
---|
| 184 | #else
|
---|
| 185 | # define YYERROR_VERBOSE 0
|
---|
| 186 | #endif
|
---|
| 187 |
|
---|
| 188 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
---|
| 189 | #line 61 "zparse.y"
|
---|
| 190 | typedef union YYSTYPE {
|
---|
[1347] | 191 | char *string;
|
---|
| 192 | struct z3950cfg *cfg;
|
---|
| 193 | struct z3950aboutlist *about;
|
---|
| 194 | int number;
|
---|
| 195 | } YYSTYPE;
|
---|
[10705] | 196 | /* Line 191 of yacc.c. */
|
---|
| 197 | #line 197 "zparse.tab.c"
|
---|
| 198 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
---|
| 199 | # define YYSTYPE_IS_DECLARED 1
|
---|
| 200 | # define YYSTYPE_IS_TRIVIAL 1
|
---|
[1347] | 201 | #endif
|
---|
| 202 |
|
---|
| 203 |
|
---|
| 204 |
|
---|
[10705] | 205 | /* Copy the second part of user declarations. */
|
---|
[1347] | 206 |
|
---|
| 207 |
|
---|
[10705] | 208 | /* Line 214 of yacc.c. */
|
---|
| 209 | #line 209 "zparse.tab.c"
|
---|
[1347] | 210 |
|
---|
[10705] | 211 | #if ! defined (yyoverflow) || YYERROR_VERBOSE
|
---|
[1347] | 212 |
|
---|
[10705] | 213 | /* The parser invokes alloca or malloc; define the necessary symbols. */
|
---|
[1347] | 214 |
|
---|
[10705] | 215 | # if YYSTACK_USE_ALLOCA
|
---|
| 216 | # define YYSTACK_ALLOC alloca
|
---|
| 217 | # else
|
---|
| 218 | # ifndef YYSTACK_USE_ALLOCA
|
---|
| 219 | # if defined (alloca) || defined (_ALLOCA_H)
|
---|
| 220 | # define YYSTACK_ALLOC alloca
|
---|
| 221 | # else
|
---|
| 222 | # ifdef __GNUC__
|
---|
| 223 | # define YYSTACK_ALLOC __builtin_alloca
|
---|
| 224 | # endif
|
---|
| 225 | # endif
|
---|
| 226 | # endif
|
---|
| 227 | # endif
|
---|
| 228 |
|
---|
| 229 | # ifdef YYSTACK_ALLOC
|
---|
| 230 | /* Pacify GCC's `empty if-body' warning. */
|
---|
| 231 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
---|
| 232 | # else
|
---|
| 233 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 234 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 235 | # define YYSIZE_T size_t
|
---|
| 236 | # endif
|
---|
| 237 | # define YYSTACK_ALLOC malloc
|
---|
| 238 | # define YYSTACK_FREE free
|
---|
| 239 | # endif
|
---|
| 240 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
---|
| 241 |
|
---|
| 242 |
|
---|
| 243 | #if (! defined (yyoverflow) \
|
---|
| 244 | && (! defined (__cplusplus) \
|
---|
| 245 | || (YYSTYPE_IS_TRIVIAL)))
|
---|
| 246 |
|
---|
| 247 | /* A type that is properly aligned for any stack member. */
|
---|
| 248 | union yyalloc
|
---|
| 249 | {
|
---|
| 250 | short yyss;
|
---|
| 251 | YYSTYPE yyvs;
|
---|
| 252 | };
|
---|
| 253 |
|
---|
| 254 | /* The size of the maximum gap between one aligned stack and the next. */
|
---|
| 255 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
|
---|
| 256 |
|
---|
| 257 | /* The size of an array large to enough to hold all stacks, each with
|
---|
| 258 | N elements. */
|
---|
| 259 | # define YYSTACK_BYTES(N) \
|
---|
| 260 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
|
---|
| 261 | + YYSTACK_GAP_MAXIMUM)
|
---|
| 262 |
|
---|
| 263 | /* Copy COUNT objects from FROM to TO. The source and destination do
|
---|
| 264 | not overlap. */
|
---|
| 265 | # ifndef YYCOPY
|
---|
| 266 | # if 1 < __GNUC__
|
---|
| 267 | # define YYCOPY(To, From, Count) \
|
---|
| 268 | __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
---|
| 269 | # else
|
---|
| 270 | # define YYCOPY(To, From, Count) \
|
---|
| 271 | do \
|
---|
| 272 | { \
|
---|
| 273 | register YYSIZE_T yyi; \
|
---|
| 274 | for (yyi = 0; yyi < (Count); yyi++) \
|
---|
| 275 | (To)[yyi] = (From)[yyi]; \
|
---|
| 276 | } \
|
---|
| 277 | while (0)
|
---|
| 278 | # endif
|
---|
| 279 | # endif
|
---|
| 280 |
|
---|
| 281 | /* Relocate STACK from its old location to the new one. The
|
---|
| 282 | local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
---|
| 283 | elements in the stack, and YYPTR gives the new location of the
|
---|
| 284 | stack. Advance YYPTR to a properly aligned location for the next
|
---|
| 285 | stack. */
|
---|
| 286 | # define YYSTACK_RELOCATE(Stack) \
|
---|
| 287 | do \
|
---|
| 288 | { \
|
---|
| 289 | YYSIZE_T yynewbytes; \
|
---|
| 290 | YYCOPY (&yyptr->Stack, Stack, yysize); \
|
---|
| 291 | Stack = &yyptr->Stack; \
|
---|
| 292 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
---|
| 293 | yyptr += yynewbytes / sizeof (*yyptr); \
|
---|
| 294 | } \
|
---|
| 295 | while (0)
|
---|
| 296 |
|
---|
[1347] | 297 | #endif
|
---|
| 298 |
|
---|
[10705] | 299 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 300 | typedef signed char yysigned_char;
|
---|
| 301 | #else
|
---|
| 302 | typedef short yysigned_char;
|
---|
[1347] | 303 | #endif
|
---|
| 304 |
|
---|
[10705] | 305 | /* YYFINAL -- State number of the termination state. */
|
---|
| 306 | #define YYFINAL 4
|
---|
| 307 | /* YYLAST -- Last index in YYTABLE. */
|
---|
| 308 | #define YYLAST 44
|
---|
[1347] | 309 |
|
---|
[10705] | 310 | /* YYNTOKENS -- Number of terminals. */
|
---|
| 311 | #define YYNTOKENS 44
|
---|
| 312 | /* YYNNTS -- Number of nonterminals. */
|
---|
| 313 | #define YYNNTS 13
|
---|
| 314 | /* YYNRULES -- Number of rules. */
|
---|
| 315 | #define YYNRULES 28
|
---|
| 316 | /* YYNRULES -- Number of states. */
|
---|
| 317 | #define YYNSTATES 37
|
---|
[1347] | 318 |
|
---|
[10705] | 319 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
---|
| 320 | #define YYUNDEFTOK 2
|
---|
| 321 | #define YYMAXUTOK 296
|
---|
| 322 |
|
---|
| 323 | #define YYTRANSLATE(YYX) \
|
---|
| 324 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
---|
| 325 |
|
---|
| 326 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
---|
| 327 | static const unsigned char yytranslate[] =
|
---|
| 328 | {
|
---|
| 329 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 330 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 331 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 332 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 333 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 334 | 2, 2, 2, 2, 2, 2, 2, 2, 42, 2,
|
---|
| 335 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 336 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 337 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 338 | 2, 2, 2, 2, 2, 43, 2, 2, 2, 2,
|
---|
| 339 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 340 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 341 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 342 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 343 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 344 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 345 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 346 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 347 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 348 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 349 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 350 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 351 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 352 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 353 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
| 354 | 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
|
---|
| 355 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
---|
| 356 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
|
---|
| 357 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
---|
| 358 | 36, 37, 38, 39, 40, 41, 2
|
---|
[1347] | 359 | };
|
---|
| 360 |
|
---|
[10705] | 361 | #if YYDEBUG
|
---|
| 362 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
|
---|
| 363 | YYRHS. */
|
---|
| 364 | static const unsigned char yyprhs[] =
|
---|
| 365 | {
|
---|
| 366 | 0, 0, 3, 6, 8, 10, 11, 14, 16, 25,
|
---|
| 367 | 27, 29, 30, 33, 34, 37, 40, 41, 44, 47,
|
---|
| 368 | 48, 50, 51, 53, 56, 60, 63, 67, 69
|
---|
[1347] | 369 | };
|
---|
| 370 |
|
---|
[10705] | 371 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
---|
| 372 | static const yysigned_char yyrhs[] =
|
---|
| 373 | {
|
---|
| 374 | 45, 0, -1, 46, 47, -1, 46, -1, 3, -1,
|
---|
| 375 | -1, 47, 48, -1, 48, -1, 41, 41, 50, 41,
|
---|
| 376 | 49, 51, 52, 53, -1, 1, -1, 19, -1, -1,
|
---|
| 377 | 42, 41, -1, -1, 20, 19, -1, 20, 41, -1,
|
---|
| 378 | -1, 21, 19, -1, 21, 41, -1, -1, 54, -1,
|
---|
| 379 | -1, 55, -1, 54, 55, -1, 22, 56, 19, -1,
|
---|
| 380 | 22, 19, -1, 41, 43, 41, -1, 41, -1, 1,
|
---|
| 381 | -1
|
---|
[1347] | 382 | };
|
---|
| 383 |
|
---|
[10705] | 384 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
---|
| 385 | static const unsigned char yyrline[] =
|
---|
| 386 | {
|
---|
| 387 | 0, 106, 106, 107, 110, 111, 113, 114, 116, 137,
|
---|
| 388 | 141, 142, 147, 148, 151, 152, 155, 156, 157, 162,
|
---|
| 389 | 164, 165, 167, 169, 172, 183, 205, 213, 221
|
---|
[1347] | 390 | };
|
---|
[10705] | 391 | #endif
|
---|
[1347] | 392 |
|
---|
[10705] | 393 | #if YYDEBUG || YYERROR_VERBOSE
|
---|
| 394 | /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
---|
| 395 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
---|
| 396 | static const char *const yytname[] =
|
---|
| 397 | {
|
---|
| 398 | "$end", "error", "$undefined", "GSDLVERSION", "GENERAL_SECTION",
|
---|
| 399 | "SEARCH_SECTION", "BROWSE_SECTION", "MACROS_SECTION", "MAINTAINER",
|
---|
| 400 | "PUBLIC", "TRUE", "FALSE", "LANGUAGES", "EN", "FR", "MI", "ZH", "DE",
|
---|
| 401 | "NAME", "STRING", "ICON", "SMALLICON", "ABOUT", "SEARCHTEXT",
|
---|
| 402 | "DOCUMENT", "SECTION", "BROWSE", "TYPE", "FORMAT", "LIST", "SORTEDLIST",
|
---|
| 403 | "SECTIONLIST", "SORTEDSECTIONLIST", "DATELIST", "ICONLINK", "TEXTLINK",
|
---|
| 404 | "DOCUMENTIMAGES", "DOCUMENTHEADER", "DOCUMENTTEXT", "DOCUMENTBUTTONS",
|
---|
| 405 | "DOCUMENTARROWSBOTTOM", "DATA", "':'", "'_'", "$accept", "z3950",
|
---|
| 406 | "version", "zserverlist", "zserver", "name", "port", "icon",
|
---|
| 407 | "smallicon", "about", "aboutList", "aboutLang", "lang", 0
|
---|
[1347] | 408 | };
|
---|
[10705] | 409 | #endif
|
---|
[1347] | 410 |
|
---|
[10705] | 411 | # ifdef YYPRINT
|
---|
| 412 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
|
---|
| 413 | token YYLEX-NUM. */
|
---|
| 414 | static const unsigned short yytoknum[] =
|
---|
| 415 | {
|
---|
| 416 | 0, 256, 296, 257, 258, 259, 260, 261, 262, 263,
|
---|
| 417 | 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
|
---|
| 418 | 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
|
---|
| 419 | 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
|
---|
| 420 | 294, 295, 58, 95
|
---|
[1347] | 421 | };
|
---|
[10705] | 422 | # endif
|
---|
[1347] | 423 |
|
---|
[10705] | 424 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
---|
| 425 | static const unsigned char yyr1[] =
|
---|
| 426 | {
|
---|
| 427 | 0, 44, 45, 45, 46, 46, 47, 47, 48, 48,
|
---|
| 428 | 49, 49, 50, 50, 51, 51, 51, 52, 52, 52,
|
---|
| 429 | 53, 53, 54, 54, 55, 55, 56, 56, 56
|
---|
[1347] | 430 | };
|
---|
| 431 |
|
---|
[10705] | 432 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
---|
| 433 | static const unsigned char yyr2[] =
|
---|
| 434 | {
|
---|
| 435 | 0, 2, 2, 1, 1, 0, 2, 1, 8, 1,
|
---|
| 436 | 1, 0, 2, 0, 2, 2, 0, 2, 2, 0,
|
---|
| 437 | 1, 0, 1, 2, 3, 2, 3, 1, 1
|
---|
| 438 | };
|
---|
[1347] | 439 |
|
---|
[10705] | 440 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
---|
| 441 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
---|
| 442 | means the default is an error. */
|
---|
| 443 | static const unsigned char yydefact[] =
|
---|
| 444 | {
|
---|
| 445 | 5, 4, 0, 0, 1, 9, 0, 0, 7, 13,
|
---|
| 446 | 6, 0, 0, 12, 11, 10, 16, 0, 19, 14,
|
---|
| 447 | 15, 0, 21, 17, 18, 0, 8, 20, 22, 28,
|
---|
| 448 | 25, 27, 0, 23, 0, 24, 26
|
---|
| 449 | };
|
---|
[1347] | 450 |
|
---|
[10705] | 451 | /* YYDEFGOTO[NTERM-NUM]. */
|
---|
| 452 | static const yysigned_char yydefgoto[] =
|
---|
| 453 | {
|
---|
| 454 | -1, 2, 3, 7, 8, 16, 12, 18, 22, 26,
|
---|
| 455 | 27, 28, 32
|
---|
| 456 | };
|
---|
[1347] | 457 |
|
---|
[10705] | 458 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
---|
| 459 | STATE-NUM. */
|
---|
| 460 | #define YYPACT_NINF -33
|
---|
| 461 | static const yysigned_char yypact[] =
|
---|
| 462 | {
|
---|
| 463 | 4, -33, 8, 0, -33, -33, -32, 2, -33, -31,
|
---|
| 464 | -33, -29, -28, -33, -9, -33, -6, -14, -5, -33,
|
---|
| 465 | -33, -13, -7, -33, -33, 3, -33, -7, -33, -33,
|
---|
| 466 | -33, -26, -1, -33, -22, -33, -33
|
---|
[1347] | 467 | };
|
---|
| 468 |
|
---|
[10705] | 469 | /* YYPGOTO[NTERM-NUM]. */
|
---|
| 470 | static const yysigned_char yypgoto[] =
|
---|
| 471 | {
|
---|
| 472 | -33, -33, -33, -33, 13, -33, -33, -33, -33, -33,
|
---|
| 473 | -33, -4, -33
|
---|
[1347] | 474 | };
|
---|
| 475 |
|
---|
[10705] | 476 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
---|
| 477 | positive, shift that token. If negative, reduce the rule which
|
---|
| 478 | number is the opposite. If zero, do what YYDEFACT says.
|
---|
| 479 | If YYTABLE_NINF, syntax error. */
|
---|
| 480 | #define YYTABLE_NINF -4
|
---|
| 481 | static const yysigned_char yytable[] =
|
---|
| 482 | {
|
---|
| 483 | -3, 5, -2, 5, 29, 19, 23, 1, 4, 9,
|
---|
| 484 | 15, 11, 13, 14, 17, 25, 21, 34, 35, 36,
|
---|
| 485 | 10, 0, 30, 33, 0, 0, 0, 20, 24, 0,
|
---|
| 486 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
| 487 | 0, 6, 0, 6, 31
|
---|
| 488 | };
|
---|
[1347] | 489 |
|
---|
[10705] | 490 | static const yysigned_char yycheck[] =
|
---|
| 491 | {
|
---|
| 492 | 0, 1, 0, 1, 1, 19, 19, 3, 0, 41,
|
---|
| 493 | 19, 42, 41, 41, 20, 22, 21, 43, 19, 41,
|
---|
| 494 | 7, -1, 19, 27, -1, -1, -1, 41, 41, -1,
|
---|
| 495 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
| 496 | -1, 41, -1, 41, 41
|
---|
| 497 | };
|
---|
[1347] | 498 |
|
---|
[10705] | 499 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
---|
| 500 | symbol of state STATE-NUM. */
|
---|
| 501 | static const unsigned char yystos[] =
|
---|
| 502 | {
|
---|
| 503 | 0, 3, 45, 46, 0, 1, 41, 47, 48, 41,
|
---|
| 504 | 48, 42, 50, 41, 41, 19, 49, 20, 51, 19,
|
---|
| 505 | 41, 21, 52, 19, 41, 22, 53, 54, 55, 1,
|
---|
| 506 | 19, 41, 56, 55, 43, 19, 41
|
---|
| 507 | };
|
---|
[1347] | 508 |
|
---|
[10705] | 509 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
---|
| 510 | # define YYSIZE_T __SIZE_TYPE__
|
---|
[1347] | 511 | #endif
|
---|
[10705] | 512 | #if ! defined (YYSIZE_T) && defined (size_t)
|
---|
| 513 | # define YYSIZE_T size_t
|
---|
[1347] | 514 | #endif
|
---|
[10705] | 515 | #if ! defined (YYSIZE_T)
|
---|
| 516 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 517 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 518 | # define YYSIZE_T size_t
|
---|
| 519 | # endif
|
---|
[1347] | 520 | #endif
|
---|
[10705] | 521 | #if ! defined (YYSIZE_T)
|
---|
| 522 | # define YYSIZE_T unsigned int
|
---|
| 523 | #endif
|
---|
[1347] | 524 |
|
---|
| 525 | #define yyerrok (yyerrstatus = 0)
|
---|
| 526 | #define yyclearin (yychar = YYEMPTY)
|
---|
[10705] | 527 | #define YYEMPTY (-2)
|
---|
[1347] | 528 | #define YYEOF 0
|
---|
[10705] | 529 |
|
---|
[1347] | 530 | #define YYACCEPT goto yyacceptlab
|
---|
[10705] | 531 | #define YYABORT goto yyabortlab
|
---|
[1347] | 532 | #define YYERROR goto yyerrlab1
|
---|
[10705] | 533 |
|
---|
| 534 |
|
---|
| 535 | /* Like YYERROR except do call yyerror. This remains here temporarily
|
---|
| 536 | to ease the transition to the new meaning of YYERROR, for GCC.
|
---|
[1347] | 537 | Once GCC version 2 has supplanted version 1, this can go. */
|
---|
[10705] | 538 |
|
---|
[1347] | 539 | #define YYFAIL goto yyerrlab
|
---|
[10705] | 540 |
|
---|
[1347] | 541 | #define YYRECOVERING() (!!yyerrstatus)
|
---|
[10705] | 542 |
|
---|
| 543 | #define YYBACKUP(Token, Value) \
|
---|
[1347] | 544 | do \
|
---|
| 545 | if (yychar == YYEMPTY && yylen == 1) \
|
---|
[10705] | 546 | { \
|
---|
| 547 | yychar = (Token); \
|
---|
| 548 | yylval = (Value); \
|
---|
| 549 | yytoken = YYTRANSLATE (yychar); \
|
---|
[1347] | 550 | YYPOPSTACK; \
|
---|
| 551 | goto yybackup; \
|
---|
| 552 | } \
|
---|
| 553 | else \
|
---|
[10705] | 554 | { \
|
---|
| 555 | yyerror ("syntax error: cannot back up");\
|
---|
| 556 | YYERROR; \
|
---|
| 557 | } \
|
---|
[1347] | 558 | while (0)
|
---|
| 559 |
|
---|
| 560 | #define YYTERROR 1
|
---|
| 561 | #define YYERRCODE 256
|
---|
| 562 |
|
---|
[10705] | 563 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions
|
---|
| 564 | are run). */
|
---|
| 565 |
|
---|
| 566 | #ifndef YYLLOC_DEFAULT
|
---|
| 567 | # define YYLLOC_DEFAULT(Current, Rhs, N) \
|
---|
| 568 | Current.first_line = Rhs[1].first_line; \
|
---|
| 569 | Current.first_column = Rhs[1].first_column; \
|
---|
| 570 | Current.last_line = Rhs[N].last_line; \
|
---|
| 571 | Current.last_column = Rhs[N].last_column;
|
---|
[1347] | 572 | #endif
|
---|
| 573 |
|
---|
[10705] | 574 | /* YYLEX -- calling `yylex' with the right arguments. */
|
---|
| 575 |
|
---|
[1347] | 576 | #ifdef YYLEX_PARAM
|
---|
[10705] | 577 | # define YYLEX yylex (YYLEX_PARAM)
|
---|
[1347] | 578 | #else
|
---|
[10705] | 579 | # define YYLEX yylex ()
|
---|
[1347] | 580 | #endif
|
---|
[10705] | 581 |
|
---|
| 582 | /* Enable debugging if requested. */
|
---|
| 583 | #if YYDEBUG
|
---|
| 584 |
|
---|
| 585 | # ifndef YYFPRINTF
|
---|
| 586 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
---|
| 587 | # define YYFPRINTF fprintf
|
---|
| 588 | # endif
|
---|
| 589 |
|
---|
| 590 | # define YYDPRINTF(Args) \
|
---|
| 591 | do { \
|
---|
| 592 | if (yydebug) \
|
---|
| 593 | YYFPRINTF Args; \
|
---|
| 594 | } while (0)
|
---|
| 595 |
|
---|
| 596 | # define YYDSYMPRINT(Args) \
|
---|
| 597 | do { \
|
---|
| 598 | if (yydebug) \
|
---|
| 599 | yysymprint Args; \
|
---|
| 600 | } while (0)
|
---|
| 601 |
|
---|
| 602 | # define YYDSYMPRINTF(Title, Token, Value, Location) \
|
---|
| 603 | do { \
|
---|
| 604 | if (yydebug) \
|
---|
| 605 | { \
|
---|
| 606 | YYFPRINTF (stderr, "%s ", Title); \
|
---|
| 607 | yysymprint (stderr, \
|
---|
| 608 | Token, Value); \
|
---|
| 609 | YYFPRINTF (stderr, "\n"); \
|
---|
| 610 | } \
|
---|
| 611 | } while (0)
|
---|
| 612 |
|
---|
| 613 | /*------------------------------------------------------------------.
|
---|
| 614 | | yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
---|
| 615 | | TOP (cinluded). |
|
---|
| 616 | `------------------------------------------------------------------*/
|
---|
| 617 |
|
---|
| 618 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 619 | static void
|
---|
| 620 | yy_stack_print (short *bottom, short *top)
|
---|
[1347] | 621 | #else
|
---|
[10705] | 622 | static void
|
---|
| 623 | yy_stack_print (bottom, top)
|
---|
| 624 | short *bottom;
|
---|
| 625 | short *top;
|
---|
[1347] | 626 | #endif
|
---|
[10705] | 627 | {
|
---|
| 628 | YYFPRINTF (stderr, "Stack now");
|
---|
| 629 | for (/* Nothing. */; bottom <= top; ++bottom)
|
---|
| 630 | YYFPRINTF (stderr, " %d", *bottom);
|
---|
| 631 | YYFPRINTF (stderr, "\n");
|
---|
| 632 | }
|
---|
[1347] | 633 |
|
---|
[10705] | 634 | # define YY_STACK_PRINT(Bottom, Top) \
|
---|
| 635 | do { \
|
---|
| 636 | if (yydebug) \
|
---|
| 637 | yy_stack_print ((Bottom), (Top)); \
|
---|
| 638 | } while (0)
|
---|
[1347] | 639 |
|
---|
| 640 |
|
---|
[10705] | 641 | /*------------------------------------------------.
|
---|
| 642 | | Report that the YYRULE is going to be reduced. |
|
---|
| 643 | `------------------------------------------------*/
|
---|
[1347] | 644 |
|
---|
[10705] | 645 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 646 | static void
|
---|
| 647 | yy_reduce_print (int yyrule)
|
---|
| 648 | #else
|
---|
| 649 | static void
|
---|
| 650 | yy_reduce_print (yyrule)
|
---|
| 651 | int yyrule;
|
---|
[1347] | 652 | #endif
|
---|
[10705] | 653 | {
|
---|
| 654 | int yyi;
|
---|
| 655 | unsigned int yylineno = yyrline[yyrule];
|
---|
| 656 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
---|
| 657 | yyrule - 1, yylineno);
|
---|
| 658 | /* Print the symbols being reduced, and their result. */
|
---|
| 659 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
---|
| 660 | YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
---|
| 661 | YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
|
---|
| 662 | }
|
---|
[1347] | 663 |
|
---|
[10705] | 664 | # define YY_REDUCE_PRINT(Rule) \
|
---|
| 665 | do { \
|
---|
| 666 | if (yydebug) \
|
---|
| 667 | yy_reduce_print (Rule); \
|
---|
| 668 | } while (0)
|
---|
[1347] | 669 |
|
---|
[10705] | 670 | /* Nonzero means print parse trace. It is left uninitialized so that
|
---|
| 671 | multiple parsers can coexist. */
|
---|
| 672 | int yydebug;
|
---|
| 673 | #else /* !YYDEBUG */
|
---|
| 674 | # define YYDPRINTF(Args)
|
---|
| 675 | # define YYDSYMPRINT(Args)
|
---|
| 676 | # define YYDSYMPRINTF(Title, Token, Value, Location)
|
---|
| 677 | # define YY_STACK_PRINT(Bottom, Top)
|
---|
| 678 | # define YY_REDUCE_PRINT(Rule)
|
---|
| 679 | #endif /* !YYDEBUG */
|
---|
[1347] | 680 |
|
---|
| 681 |
|
---|
[10705] | 682 | /* YYINITDEPTH -- initial size of the parser's stacks. */
|
---|
[1347] | 683 | #ifndef YYINITDEPTH
|
---|
[10705] | 684 | # define YYINITDEPTH 200
|
---|
[1347] | 685 | #endif
|
---|
| 686 |
|
---|
[10705] | 687 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
---|
| 688 | if the built-in stack extension method is used).
|
---|
[1347] | 689 |
|
---|
[10705] | 690 | Do not make this value too large; the results are undefined if
|
---|
| 691 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
---|
| 692 | evaluated with infinite-precision integer arithmetic. */
|
---|
| 693 |
|
---|
[1347] | 694 | #if YYMAXDEPTH == 0
|
---|
[10705] | 695 | # undef YYMAXDEPTH
|
---|
[1347] | 696 | #endif
|
---|
| 697 |
|
---|
| 698 | #ifndef YYMAXDEPTH
|
---|
[10705] | 699 | # define YYMAXDEPTH 10000
|
---|
[1347] | 700 | #endif
|
---|
[10705] | 701 |
|
---|
[1347] | 702 | |
---|
| 703 |
|
---|
[10705] | 704 |
|
---|
[1347] | 705 | #if YYERROR_VERBOSE
|
---|
[10705] | 706 |
|
---|
| 707 | # ifndef yystrlen
|
---|
| 708 | # if defined (__GLIBC__) && defined (_STRING_H)
|
---|
| 709 | # define yystrlen strlen
|
---|
| 710 | # else
|
---|
| 711 | /* Return the length of YYSTR. */
|
---|
| 712 | static YYSIZE_T
|
---|
| 713 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 714 | yystrlen (const char *yystr)
|
---|
| 715 | # else
|
---|
| 716 | yystrlen (yystr)
|
---|
| 717 | const char *yystr;
|
---|
[1347] | 718 | # endif
|
---|
[10705] | 719 | {
|
---|
[1347] | 720 | register const char *yys = yystr;
|
---|
[10705] | 721 |
|
---|
| 722 | while (*yys++ != '\0')
|
---|
| 723 | continue;
|
---|
| 724 |
|
---|
[1347] | 725 | return yys - yystr - 1;
|
---|
[10705] | 726 | }
|
---|
| 727 | # endif
|
---|
[1347] | 728 | # endif
|
---|
[10705] | 729 |
|
---|
| 730 | # ifndef yystpcpy
|
---|
| 731 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
|
---|
| 732 | # define yystpcpy stpcpy
|
---|
| 733 | # else
|
---|
| 734 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
---|
| 735 | YYDEST. */
|
---|
| 736 | static char *
|
---|
| 737 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 738 | yystpcpy (char *yydest, const char *yysrc)
|
---|
| 739 | # else
|
---|
| 740 | yystpcpy (yydest, yysrc)
|
---|
| 741 | char *yydest;
|
---|
| 742 | const char *yysrc;
|
---|
| 743 | # endif
|
---|
| 744 | {
|
---|
| 745 | register char *yyd = yydest;
|
---|
[1347] | 746 | register const char *yys = yysrc;
|
---|
[10705] | 747 |
|
---|
| 748 | while ((*yyd++ = *yys++) != '\0')
|
---|
| 749 | continue;
|
---|
| 750 |
|
---|
| 751 | return yyd - 1;
|
---|
| 752 | }
|
---|
| 753 | # endif
|
---|
| 754 | # endif
|
---|
| 755 |
|
---|
| 756 | #endif /* !YYERROR_VERBOSE */
|
---|
| 757 |
|
---|
| 758 | |
---|
| 759 |
|
---|
| 760 |
|
---|
| 761 | #if YYDEBUG
|
---|
| 762 | /*--------------------------------.
|
---|
| 763 | | Print this symbol on YYOUTPUT. |
|
---|
| 764 | `--------------------------------*/
|
---|
[1347] | 765 |
|
---|
[10705] | 766 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 767 | static void
|
---|
| 768 | yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
|
---|
| 769 | #else
|
---|
| 770 | static void
|
---|
| 771 | yysymprint (yyoutput, yytype, yyvaluep)
|
---|
| 772 | FILE *yyoutput;
|
---|
| 773 | int yytype;
|
---|
[1347] | 774 | YYSTYPE *yyvaluep;
|
---|
[10705] | 775 | #endif
|
---|
| 776 | {
|
---|
[1347] | 777 | /* Pacify ``unused variable'' warnings. */
|
---|
[10705] | 778 | (void) yyvaluep;
|
---|
| 779 |
|
---|
| 780 | if (yytype < YYNTOKENS)
|
---|
| 781 | {
|
---|
| 782 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
|
---|
| 783 | # ifdef YYPRINT
|
---|
| 784 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
---|
| 785 | # endif
|
---|
| 786 | }
|
---|
| 787 | else
|
---|
| 788 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
---|
| 789 |
|
---|
| 790 | switch (yytype)
|
---|
| 791 | {
|
---|
| 792 | default:
|
---|
| 793 | break;
|
---|
[1347] | 794 | }
|
---|
| 795 | YYFPRINTF (yyoutput, ")");
|
---|
[10705] | 796 | }
|
---|
| 797 |
|
---|
| 798 | #endif /* ! YYDEBUG */
|
---|
| 799 | /*-----------------------------------------------.
|
---|
| 800 | | Release the memory associated to this symbol. |
|
---|
| 801 | `-----------------------------------------------*/
|
---|
| 802 |
|
---|
| 803 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 804 | static void
|
---|
| 805 | yydestruct (int yytype, YYSTYPE *yyvaluep)
|
---|
| 806 | #else
|
---|
| 807 | static void
|
---|
| 808 | yydestruct (yytype, yyvaluep)
|
---|
[1347] | 809 | int yytype;
|
---|
[10705] | 810 | YYSTYPE *yyvaluep;
|
---|
| 811 | #endif
|
---|
| 812 | {
|
---|
| 813 | /* Pacify ``unused variable'' warnings. */
|
---|
| 814 | (void) yyvaluep;
|
---|
| 815 |
|
---|
| 816 | switch (yytype)
|
---|
| 817 | {
|
---|
| 818 |
|
---|
| 819 | default:
|
---|
| 820 | break;
|
---|
[1347] | 821 | }
|
---|
| 822 | }
|
---|
[10705] | 823 | |
---|
[1347] | 824 |
|
---|
| 825 |
|
---|
[10705] | 826 | /* Prevent warnings from -Wmissing-prototypes. */
|
---|
| 827 |
|
---|
| 828 | #ifdef YYPARSE_PARAM
|
---|
| 829 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 830 | int yyparse (void *YYPARSE_PARAM);
|
---|
| 831 | # else
|
---|
| 832 | int yyparse ();
|
---|
| 833 | # endif
|
---|
| 834 | #else /* ! YYPARSE_PARAM */
|
---|
| 835 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
| 836 | int yyparse (void);
|
---|
| 837 | #else
|
---|
[1347] | 838 | int yyparse ();
|
---|
[10705] | 839 | #endif
|
---|
| 840 | #endif /* ! YYPARSE_PARAM */
|
---|
| 841 |
|
---|
| 842 |
|
---|
| 843 |
|
---|
| 844 | /* The lookahead symbol. */
|
---|
| 845 | int yychar;
|
---|
| 846 |
|
---|
| 847 | /* The semantic value of the lookahead symbol. */
|
---|
| 848 | YYSTYPE yylval;
|
---|
| 849 |
|
---|
| 850 | /* Number of syntax errors so far. */
|
---|
| 851 | int yynerrs;
|
---|
| 852 |
|
---|
| 853 |
|
---|
| 854 |
|
---|
| 855 | /*----------.
|
---|
[1347] | 856 | | yyparse. |
|
---|
[10705] | 857 | `----------*/
|
---|
| 858 |
|
---|
| 859 | #ifdef YYPARSE_PARAM
|
---|
| 860 | # if defined (__STDC__) || defined (__cplusplus)
|
---|
| 861 | int yyparse (void *YYPARSE_PARAM)
|
---|
| 862 | # else
|
---|
| 863 | int yyparse (YYPARSE_PARAM)
|
---|
| 864 | void *YYPARSE_PARAM;
|
---|
| 865 | # endif
|
---|
| 866 | #else /* ! YYPARSE_PARAM */
|
---|
[1347] | 867 | #if defined (__STDC__) || defined (__cplusplus)
|
---|
[10705] | 868 | int
|
---|
| 869 | yyparse (void)
|
---|
| 870 | #else
|
---|
[1347] | 871 | int
|
---|
| 872 | yyparse ()
|
---|
| 873 |
|
---|
[10705] | 874 | #endif
|
---|
[1347] | 875 | #endif
|
---|
| 876 | {
|
---|
[10705] | 877 |
|
---|
| 878 | register int yystate;
|
---|
| 879 | register int yyn;
|
---|
| 880 | int yyresult;
|
---|
| 881 | /* Number of tokens to shift before error messages enabled. */
|
---|
| 882 | int yyerrstatus;
|
---|
| 883 | /* Lookahead token as an internal (translated) token number. */
|
---|
| 884 | int yytoken = 0;
|
---|
| 885 |
|
---|
| 886 | /* Three stacks and their tools:
|
---|
| 887 | `yyss': related to states,
|
---|
| 888 | `yyvs': related to semantic values,
|
---|
| 889 | `yyls': related to locations.
|
---|
| 890 |
|
---|
| 891 | Refer to the stacks thru separate pointers, to allow yyoverflow
|
---|
| 892 | to reallocate them elsewhere. */
|
---|
| 893 |
|
---|
[1347] | 894 | /* The state stack. */
|
---|
[10705] | 895 | short yyssa[YYINITDEPTH];
|
---|
| 896 | short *yyss = yyssa;
|
---|
| 897 | register short *yyssp;
|
---|
| 898 |
|
---|
[1347] | 899 | /* The semantic value stack. */
|
---|
| 900 | YYSTYPE yyvsa[YYINITDEPTH];
|
---|
| 901 | YYSTYPE *yyvs = yyvsa;
|
---|
| 902 | register YYSTYPE *yyvsp;
|
---|
| 903 |
|
---|
| 904 |
|
---|
[10705] | 905 |
|
---|
[1347] | 906 | #define YYPOPSTACK (yyvsp--, yyssp--)
|
---|
[10705] | 907 |
|
---|
| 908 | YYSIZE_T yystacksize = YYINITDEPTH;
|
---|
| 909 |
|
---|
[1347] | 910 | /* The variables used to return semantic value and location from the
|
---|
| 911 | action routines. */
|
---|
[10705] | 912 | YYSTYPE yyval;
|
---|
| 913 |
|
---|
[1347] | 914 |
|
---|
| 915 | /* When reducing, the number of symbols on the RHS of the reduced
|
---|
[10705] | 916 | rule. */
|
---|
[1347] | 917 | int yylen;
|
---|
| 918 |
|
---|
| 919 | YYDPRINTF ((stderr, "Starting parse\n"));
|
---|
| 920 |
|
---|
| 921 | yystate = 0;
|
---|
| 922 | yyerrstatus = 0;
|
---|
| 923 | yynerrs = 0;
|
---|
| 924 | yychar = YYEMPTY; /* Cause a token to be read. */
|
---|
| 925 |
|
---|
| 926 | /* Initialize stack pointers.
|
---|
| 927 | Waste one element of value and location stack
|
---|
[10705] | 928 | so that they stay on the same level as the state stack.
|
---|
[1347] | 929 | The wasted elements are never initialized. */
|
---|
| 930 |
|
---|
[10705] | 931 | yyssp = yyss;
|
---|
[1347] | 932 | yyvsp = yyvs;
|
---|
[10705] | 933 |
|
---|
| 934 | goto yysetstate;
|
---|
| 935 |
|
---|
| 936 | /*------------------------------------------------------------.
|
---|
| 937 | | yynewstate -- Push a new state, which is found in yystate. |
|
---|
| 938 | `------------------------------------------------------------*/
|
---|
| 939 | yynewstate:
|
---|
| 940 | /* In all cases, when you get here, the value and location stacks
|
---|
[1347] | 941 | have just been pushed. so pushing a state here evens the stacks.
|
---|
[10705] | 942 | */
|
---|
| 943 | yyssp++;
|
---|
| 944 |
|
---|
| 945 | yysetstate:
|
---|
[1347] | 946 | *yyssp = yystate;
|
---|
| 947 |
|
---|
[10705] | 948 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
[1347] | 949 | {
|
---|
| 950 | /* Get the current used size of the three stacks, in elements. */
|
---|
[10705] | 951 | YYSIZE_T yysize = yyssp - yyss + 1;
|
---|
| 952 |
|
---|
| 953 | #ifdef yyoverflow
|
---|
| 954 | {
|
---|
| 955 | /* Give user a chance to reallocate the stack. Use copies of
|
---|
| 956 | these so that the &'s don't force the real ones into
|
---|
[1347] | 957 | memory. */
|
---|
[10705] | 958 | YYSTYPE *yyvs1 = yyvs;
|
---|
| 959 | short *yyss1 = yyss;
|
---|
| 960 |
|
---|
| 961 |
|
---|
| 962 | /* Each stack pointer address is followed by the size of the
|
---|
| 963 | data in use in that stack, in bytes. This used to be a
|
---|
| 964 | conditional around just the two extra args, but that might
|
---|
| 965 | be undefined if yyoverflow is a macro. */
|
---|
| 966 | yyoverflow ("parser stack overflow",
|
---|
| 967 | &yyss1, yysize * sizeof (*yyssp),
|
---|
| 968 | &yyvs1, yysize * sizeof (*yyvsp),
|
---|
| 969 |
|
---|
| 970 | &yystacksize);
|
---|
| 971 |
|
---|
[1347] | 972 | yyss = yyss1;
|
---|
[10705] | 973 | yyvs = yyvs1;
|
---|
| 974 | }
|
---|
| 975 | #else /* no yyoverflow */
|
---|
[1347] | 976 | # ifndef YYSTACK_RELOCATE
|
---|
[10705] | 977 | goto yyoverflowlab;
|
---|
| 978 | # else
|
---|
[1347] | 979 | /* Extend the stack our own way. */
|
---|
[10705] | 980 | if (YYMAXDEPTH <= yystacksize)
|
---|
[1347] | 981 | goto yyoverflowlab;
|
---|
[10705] | 982 | yystacksize *= 2;
|
---|
| 983 | if (YYMAXDEPTH < yystacksize)
|
---|
| 984 | yystacksize = YYMAXDEPTH;
|
---|
| 985 |
|
---|
| 986 | {
|
---|
| 987 | short *yyss1 = yyss;
|
---|
| 988 | union yyalloc *yyptr =
|
---|
| 989 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
---|
| 990 | if (! yyptr)
|
---|
| 991 | goto yyoverflowlab;
|
---|
| 992 | YYSTACK_RELOCATE (yyss);
|
---|
| 993 | YYSTACK_RELOCATE (yyvs);
|
---|
| 994 |
|
---|
| 995 | # undef YYSTACK_RELOCATE
|
---|
| 996 | if (yyss1 != yyssa)
|
---|
[1347] | 997 | YYSTACK_FREE (yyss1);
|
---|
| 998 | }
|
---|
[10705] | 999 | # endif
|
---|
| 1000 | #endif /* no yyoverflow */
|
---|
[1347] | 1001 |
|
---|
| 1002 | yyssp = yyss + yysize - 1;
|
---|
[10705] | 1003 | yyvsp = yyvs + yysize - 1;
|
---|
| 1004 |
|
---|
| 1005 |
|
---|
| 1006 | YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
---|
[1347] | 1007 | (unsigned long int) yystacksize));
|
---|
| 1008 |
|
---|
| 1009 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
[10705] | 1010 | YYABORT;
|
---|
[1347] | 1011 | }
|
---|
| 1012 |
|
---|
| 1013 | YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
---|
[10705] | 1014 |
|
---|
| 1015 | goto yybackup;
|
---|
| 1016 |
|
---|
| 1017 | /*-----------.
|
---|
| 1018 | | yybackup. |
|
---|
[1347] | 1019 | `-----------*/
|
---|
| 1020 | yybackup:
|
---|
| 1021 |
|
---|
| 1022 | /* Do appropriate processing given the current state. */
|
---|
| 1023 | /* Read a lookahead token if we need one and don't already have one. */
|
---|
| 1024 | /* yyresume: */
|
---|
| 1025 |
|
---|
[10705] | 1026 | /* First try to decide what to do without reference to lookahead token. */
|
---|
[1347] | 1027 |
|
---|
| 1028 | yyn = yypact[yystate];
|
---|
| 1029 | if (yyn == YYPACT_NINF)
|
---|
| 1030 | goto yydefault;
|
---|
[10705] | 1031 |
|
---|
[1347] | 1032 | /* Not known => get a lookahead token if don't already have one. */
|
---|
| 1033 |
|
---|
[10705] | 1034 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
---|
[1347] | 1035 | if (yychar == YYEMPTY)
|
---|
| 1036 | {
|
---|
| 1037 | YYDPRINTF ((stderr, "Reading a token: "));
|
---|
[10705] | 1038 | yychar = YYLEX;
|
---|
[1347] | 1039 | }
|
---|
[10705] | 1040 |
|
---|
| 1041 | if (yychar <= YYEOF)
|
---|
[1347] | 1042 | {
|
---|
| 1043 | yychar = yytoken = YYEOF;
|
---|
| 1044 | YYDPRINTF ((stderr, "Now at end of input.\n"));
|
---|
[10705] | 1045 | }
|
---|
| 1046 | else
|
---|
[1347] | 1047 | {
|
---|
| 1048 | yytoken = YYTRANSLATE (yychar);
|
---|
[10705] | 1049 | YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
|
---|
| 1050 | }
|
---|
| 1051 |
|
---|
| 1052 | /* If the proper action on seeing token YYTOKEN is to reduce or to
|
---|
[1347] | 1053 | detect an error, take that action. */
|
---|
| 1054 | yyn += yytoken;
|
---|
[10705] | 1055 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
|
---|
[1347] | 1056 | goto yydefault;
|
---|
[10705] | 1057 | yyn = yytable[yyn];
|
---|
[1347] | 1058 | if (yyn <= 0)
|
---|
| 1059 | {
|
---|
| 1060 | if (yyn == 0 || yyn == YYTABLE_NINF)
|
---|
| 1061 | goto yyerrlab;
|
---|
| 1062 | yyn = -yyn;
|
---|
| 1063 | goto yyreduce;
|
---|
| 1064 | }
|
---|
| 1065 |
|
---|
| 1066 | if (yyn == YYFINAL)
|
---|
[10705] | 1067 | YYACCEPT;
|
---|
[1347] | 1068 |
|
---|
| 1069 | /* Shift the lookahead token. */
|
---|
| 1070 | YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
|
---|
| 1071 |
|
---|
| 1072 | /* Discard the token being shifted unless it is eof. */
|
---|
| 1073 | if (yychar != YYEOF)
|
---|
| 1074 | yychar = YYEMPTY;
|
---|
| 1075 |
|
---|
[10705] | 1076 | *++yyvsp = yylval;
|
---|
| 1077 |
|
---|
| 1078 |
|
---|
| 1079 | /* Count tokens shifted since error; after three, turn off error
|
---|
| 1080 | status. */
|
---|
[1347] | 1081 | if (yyerrstatus)
|
---|
| 1082 | yyerrstatus--;
|
---|
| 1083 |
|
---|
[10705] | 1084 | yystate = yyn;
|
---|
| 1085 | goto yynewstate;
|
---|
| 1086 |
|
---|
| 1087 |
|
---|
[1347] | 1088 | /*-----------------------------------------------------------.
|
---|
| 1089 | | yydefault -- do the default action for the current state. |
|
---|
| 1090 | `-----------------------------------------------------------*/
|
---|
| 1091 | yydefault:
|
---|
[10705] | 1092 | yyn = yydefact[yystate];
|
---|
[1347] | 1093 | if (yyn == 0)
|
---|
[10705] | 1094 | goto yyerrlab;
|
---|
| 1095 | goto yyreduce;
|
---|
| 1096 |
|
---|
| 1097 |
|
---|
[1347] | 1098 | /*-----------------------------.
|
---|
[10705] | 1099 | | yyreduce -- Do a reduction. |
|
---|
[1347] | 1100 | `-----------------------------*/
|
---|
| 1101 | yyreduce:
|
---|
[10705] | 1102 | /* yyn is the number of a rule to reduce with. */
|
---|
| 1103 | yylen = yyr2[yyn];
|
---|
[1347] | 1104 |
|
---|
[10705] | 1105 | /* If YYLEN is nonzero, implement the default value of the action:
|
---|
| 1106 | `$$ = $1'.
|
---|
| 1107 |
|
---|
| 1108 | Otherwise, the following line sets YYVAL to garbage.
|
---|
| 1109 | This behavior is undocumented and Bison
|
---|
| 1110 | users should not rely upon it. Assigning to YYVAL
|
---|
[1347] | 1111 | unconditionally makes the parser a bit smaller, and it avoids a
|
---|
| 1112 | GCC warning that YYVAL may be used uninitialized. */
|
---|
[10705] | 1113 | yyval = yyvsp[1-yylen];
|
---|
| 1114 |
|
---|
| 1115 |
|
---|
| 1116 | YY_REDUCE_PRINT (yyn);
|
---|
| 1117 | switch (yyn)
|
---|
| 1118 | {
|
---|
| 1119 | case 2:
|
---|
[1347] | 1120 | #line 106 "zparse.y"
|
---|
[10705] | 1121 | {zserver_list=yyvsp[0].cfg;}
|
---|
| 1122 | break;
|
---|
| 1123 |
|
---|
| 1124 | case 3:
|
---|
[1347] | 1125 | #line 107 "zparse.y"
|
---|
[10705] | 1126 | {zserver_list=NULL;}
|
---|
[1372] | 1127 | break;
|
---|
[10705] | 1128 |
|
---|
| 1129 | case 4:
|
---|
| 1130 | #line 110 "zparse.y"
|
---|
| 1131 | {;}
|
---|
| 1132 | break;
|
---|
| 1133 |
|
---|
| 1134 | case 5:
|
---|
| 1135 | #line 111 "zparse.y"
|
---|
| 1136 | {fprintf(errfile,"No version - not GSDL config file?\n");return(1);}
|
---|
[1440] | 1137 | break;
|
---|
[10705] | 1138 |
|
---|
| 1139 | case 6:
|
---|
| 1140 | #line 113 "zparse.y"
|
---|
| 1141 | {if (yyvsp[0].cfg!=NULL) {yyvsp[0].cfg->next=yyvsp[-1].cfg;yyval.cfg=yyvsp[0].cfg;}}
|
---|
| 1142 | break;
|
---|
| 1143 |
|
---|
[1347] | 1144 | case 8:
|
---|
| 1145 | #line 117 "zparse.y"
|
---|
| 1146 | {
|
---|
| 1147 | if (YYRECOVERING)
|
---|
[1355] | 1148 | {yyval.cfg=NULL;YYRECOVERING=0;}
|
---|
[1440] | 1149 | else {
|
---|
[1355] | 1150 | if((yyval.cfg=malloc(sizeof(struct z3950cfg)))==NULL)
|
---|
| 1151 | {
|
---|
[1347] | 1152 | fprintf(errfile,"malloc failed\n");
|
---|
| 1153 | return(1);
|
---|
| 1154 | }
|
---|
| 1155 | yyval.cfg->shortname=yyvsp[-7].string;
|
---|
| 1156 | yyval.cfg->hostname=yyvsp[-6].string;
|
---|
| 1157 | yyval.cfg->port=yyvsp[-5].number;
|
---|
| 1158 | yyval.cfg->dbname=yyvsp[-4].string;
|
---|
| 1159 | yyval.cfg->longname=yyvsp[-3].string;
|
---|
[1450] | 1160 | yyval.cfg->icon=yyvsp[-2].string;
|
---|
[1347] | 1161 | yyval.cfg->smallicon=yyvsp[-1].string;
|
---|
[10705] | 1162 | yyval.cfg->about=yyvsp[0].about;
|
---|
| 1163 | yyval.cfg->next=NULL;
|
---|
| 1164 | }
|
---|
| 1165 | }
|
---|
| 1166 | break;
|
---|
| 1167 |
|
---|
| 1168 | case 9:
|
---|
| 1169 | #line 137 "zparse.y"
|
---|
| 1170 | {yyval.cfg=NULL;
|
---|
| 1171 | fprintf(errfile,"discarding zserver (line %d)\n",lineno);}
|
---|
| 1172 | break;
|
---|
| 1173 |
|
---|
| 1174 | case 10:
|
---|
| 1175 | #line 141 "zparse.y"
|
---|
| 1176 | {;}
|
---|
| 1177 | break;
|
---|
| 1178 |
|
---|
[1347] | 1179 | case 11:
|
---|
| 1180 | #line 142 "zparse.y"
|
---|
[10705] | 1181 | {errormsg("Database name needs to be followed by a short "
|
---|
| 1182 | "descriptive name (enclosed in \" marks)");
|
---|
| 1183 | yyval.string=NULL;
|
---|
| 1184 | YYRECOVERING=1;}
|
---|
| 1185 | break;
|
---|
| 1186 |
|
---|
| 1187 | case 12:
|
---|
| 1188 | #line 147 "zparse.y"
|
---|
| 1189 | {yyval.number=atoi(yyvsp[0].string);}
|
---|
| 1190 | break;
|
---|
| 1191 |
|
---|
| 1192 | case 13:
|
---|
| 1193 | #line 148 "zparse.y"
|
---|
| 1194 | {yyval.number=210;}
|
---|
[1450] | 1195 | break;
|
---|
[10705] | 1196 |
|
---|
| 1197 | case 14:
|
---|
| 1198 | #line 151 "zparse.y"
|
---|
| 1199 | {yyval.string=yyvsp[0].string;}
|
---|
| 1200 | break;
|
---|
| 1201 |
|
---|
| 1202 | case 15:
|
---|
| 1203 | #line 152 "zparse.y"
|
---|
| 1204 | {yyval.string=yyvsp[0].string;
|
---|
| 1205 | errormsg("Icon must be enclosed in quotes");
|
---|
| 1206 | yylex();yylex();}
|
---|
[1450] | 1207 | break;
|
---|
[10705] | 1208 |
|
---|
| 1209 | case 16:
|
---|
| 1210 | #line 155 "zparse.y"
|
---|
| 1211 | {yyval.string=NULL;}
|
---|
| 1212 | break;
|
---|
| 1213 |
|
---|
| 1214 | case 17:
|
---|
| 1215 | #line 156 "zparse.y"
|
---|
| 1216 | {yyval.string=yyvsp[0].string;}
|
---|
| 1217 | break;
|
---|
| 1218 |
|
---|
[1347] | 1219 | case 18:
|
---|
| 1220 | #line 157 "zparse.y"
|
---|
| 1221 | {yyval.string=yyvsp[0].string;
|
---|
[10705] | 1222 | /* this is because of the ':' */
|
---|
| 1223 | errormsg("Smallicon must be enclosed in quotes.\n");
|
---|
| 1224 | yylex();yylex();
|
---|
| 1225 | }
|
---|
| 1226 | break;
|
---|
| 1227 |
|
---|
| 1228 | case 19:
|
---|
| 1229 | #line 162 "zparse.y"
|
---|
| 1230 | {yyval.string=NULL;}
|
---|
| 1231 | break;
|
---|
| 1232 |
|
---|
| 1233 | case 20:
|
---|
| 1234 | #line 164 "zparse.y"
|
---|
| 1235 | {defLanguage=0;}
|
---|
[1450] | 1236 | break;
|
---|
[10705] | 1237 |
|
---|
| 1238 | case 21:
|
---|
| 1239 | #line 165 "zparse.y"
|
---|
| 1240 | {yyval.about=NULL;}
|
---|
[1450] | 1241 | break;
|
---|
[10705] | 1242 |
|
---|
| 1243 | case 22:
|
---|
| 1244 | #line 167 "zparse.y"
|
---|
| 1245 | {;}
|
---|
| 1246 | break;
|
---|
| 1247 |
|
---|
| 1248 | case 23:
|
---|
| 1249 | #line 169 "zparse.y"
|
---|
| 1250 | {yyval.about=yyvsp[0].about;yyvsp[0].about->next=yyvsp[-1].about;}
|
---|
| 1251 | break;
|
---|
| 1252 |
|
---|
[1347] | 1253 | case 24:
|
---|
| 1254 | #line 173 "zparse.y"
|
---|
[1440] | 1255 | {
|
---|
[1355] | 1256 | if((yyval.about=malloc(sizeof(struct z3950aboutlist)))
|
---|
[1347] | 1257 | ==NULL) {
|
---|
| 1258 | fprintf(errfile,"Malloc failed\n");
|
---|
| 1259 | return(1);
|
---|
| 1260 | }
|
---|
[10705] | 1261 | yyval.about->lang=yyvsp[-1].string;
|
---|
| 1262 | yyval.about->text=yyvsp[0].string;
|
---|
| 1263 | yyval.about->next=NULL;
|
---|
| 1264 | }
|
---|
| 1265 | break;
|
---|
| 1266 |
|
---|
[1347] | 1267 | case 25:
|
---|
| 1268 | #line 184 "zparse.y"
|
---|
[1440] | 1269 | {
|
---|
[1347] | 1270 | if (defLanguage)
|
---|
| 1271 | {
|
---|
| 1272 | fprintf(errfile,"warning: (line %d): already have a default language in config file\n",lineno);
|
---|
| 1273 | }
|
---|
| 1274 | else defLanguage=1;
|
---|
[1440] | 1275 |
|
---|
[1355] | 1276 | if((yyval.about=malloc(sizeof(struct z3950aboutlist)))
|
---|
[1347] | 1277 | ==NULL) {
|
---|
| 1278 | fprintf(errfile,"Malloc failed\n");
|
---|
| 1279 | return(1);
|
---|
| 1280 | }
|
---|
[10705] | 1281 | yyval.about->lang=NULL; /* default lang... */
|
---|
| 1282 | yyval.about->text=yyvsp[0].string;
|
---|
| 1283 | yyval.about->next=NULL;
|
---|
| 1284 | }
|
---|
| 1285 | break;
|
---|
| 1286 |
|
---|
[1347] | 1287 | case 26:
|
---|
| 1288 | #line 206 "zparse.y"
|
---|
| 1289 | {
|
---|
| 1290 | yyval.string=malloc(strlen(yyvsp[-2].string)+strlen(yyvsp[0].string)+1);
|
---|
| 1291 | strncpy(yyval.string,yyvsp[-2].string,strlen(yyvsp[-2].string));
|
---|
[10705] | 1292 | yyval.string[strlen(yyvsp[-2].string)]='_';
|
---|
| 1293 | strncpy(yyval.string+strlen(yyvsp[-2].string)+1,yyvsp[0].string,strlen(yyvsp[0].string));
|
---|
| 1294 | free(yyvsp[-2].string);free(yyvsp[0].string);
|
---|
| 1295 | }
|
---|
| 1296 | break;
|
---|
| 1297 |
|
---|
| 1298 | case 27:
|
---|
| 1299 | #line 213 "zparse.y"
|
---|
| 1300 | {;}
|
---|
| 1301 | break;
|
---|
| 1302 |
|
---|
| 1303 | case 28:
|
---|
| 1304 | #line 221 "zparse.y"
|
---|
| 1305 | {errormsg("missing language");}
|
---|
| 1306 | break;
|
---|
| 1307 |
|
---|
| 1308 |
|
---|
| 1309 | }
|
---|
[1347] | 1310 |
|
---|
| 1311 | /* Line 999 of yacc.c. */
|
---|
| 1312 | #line 1309 "zparse.tab.c"
|
---|
| 1313 | |
---|
| 1314 |
|
---|
[10705] | 1315 | yyvsp -= yylen;
|
---|
| 1316 | yyssp -= yylen;
|
---|
[1347] | 1317 |
|
---|
| 1318 |
|
---|
| 1319 | YY_STACK_PRINT (yyss, yyssp);
|
---|
[10705] | 1320 |
|
---|
| 1321 | *++yyvsp = yyval;
|
---|
| 1322 |
|
---|
[1347] | 1323 |
|
---|
| 1324 | /* Now `shift' the result of the reduction. Determine what state
|
---|
| 1325 | that goes to, based on the state we popped back to and the rule
|
---|
[10705] | 1326 | number reduced by. */
|
---|
| 1327 |
|
---|
[1347] | 1328 | yyn = yyr1[yyn];
|
---|
| 1329 |
|
---|
[10705] | 1330 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
|
---|
[1347] | 1331 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
---|
| 1332 | yystate = yytable[yystate];
|
---|
| 1333 | else
|
---|
| 1334 | yystate = yydefgoto[yyn - YYNTOKENS];
|
---|
[10705] | 1335 |
|
---|
| 1336 | goto yynewstate;
|
---|
| 1337 |
|
---|
| 1338 |
|
---|
| 1339 | /*------------------------------------.
|
---|
| 1340 | | yyerrlab -- here on detecting error |
|
---|
[1347] | 1341 | `------------------------------------*/
|
---|
| 1342 | yyerrlab:
|
---|
[10705] | 1343 | /* If not already recovering from an error, report this error. */
|
---|
[1347] | 1344 | if (!yyerrstatus)
|
---|
| 1345 | {
|
---|
[10705] | 1346 | ++yynerrs;
|
---|
[1347] | 1347 | #if YYERROR_VERBOSE
|
---|
[10705] | 1348 | yyn = yypact[yystate];
|
---|
| 1349 |
|
---|
| 1350 | if (YYPACT_NINF < yyn && yyn < YYLAST)
|
---|
| 1351 | {
|
---|
[1347] | 1352 | YYSIZE_T yysize = 0;
|
---|
[10705] | 1353 | int yytype = YYTRANSLATE (yychar);
|
---|
| 1354 | char *yymsg;
|
---|
| 1355 | int yyx, yycount;
|
---|
| 1356 |
|
---|
| 1357 | yycount = 0;
|
---|
| 1358 | /* Start YYX at -YYN if negative to avoid negative indexes in
|
---|
| 1359 | YYCHECK. */
|
---|
| 1360 | for (yyx = yyn < 0 ? -yyn : 0;
|
---|
| 1361 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
---|
| 1362 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
---|
| 1363 | yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
---|
[1347] | 1364 | yysize += yystrlen ("syntax error, unexpected ") + 1;
|
---|
[10705] | 1365 | yysize += yystrlen (yytname[yytype]);
|
---|
| 1366 | yymsg = (char *) YYSTACK_ALLOC (yysize);
|
---|
[1347] | 1367 | if (yymsg != 0)
|
---|
[10705] | 1368 | {
|
---|
[1347] | 1369 | char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
|
---|
[10705] | 1370 | yyp = yystpcpy (yyp, yytname[yytype]);
|
---|
| 1371 |
|
---|
| 1372 | if (yycount < 5)
|
---|
| 1373 | {
|
---|
| 1374 | yycount = 0;
|
---|
[1347] | 1375 | for (yyx = yyn < 0 ? -yyn : 0;
|
---|
[10705] | 1376 | yyx < (int) (sizeof (yytname) / sizeof (char *));
|
---|
| 1377 | yyx++)
|
---|
| 1378 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
---|
| 1379 | {
|
---|
[1347] | 1380 | const char *yyq = ! yycount ? ", expecting " : " or ";
|
---|
| 1381 | yyp = yystpcpy (yyp, yyq);
|
---|
[10705] | 1382 | yyp = yystpcpy (yyp, yytname[yyx]);
|
---|
| 1383 | yycount++;
|
---|
[1347] | 1384 | }
|
---|
| 1385 | }
|
---|
[10705] | 1386 | yyerror (yymsg);
|
---|
[1347] | 1387 | YYSTACK_FREE (yymsg);
|
---|
| 1388 | }
|
---|
| 1389 | else
|
---|
[10705] | 1390 | yyerror ("syntax error; also virtual memory exhausted");
|
---|
[1347] | 1391 | }
|
---|
| 1392 | else
|
---|
| 1393 | #endif /* YYERROR_VERBOSE */
|
---|
[10705] | 1394 | yyerror ("syntax error");
|
---|
[1347] | 1395 | }
|
---|
| 1396 |
|
---|
[10705] | 1397 |
|
---|
| 1398 |
|
---|
[1347] | 1399 | if (yyerrstatus == 3)
|
---|
[10705] | 1400 | {
|
---|
[1347] | 1401 | /* If just tried and failed to reuse lookahead token after an
|
---|
[10705] | 1402 | error, discard it. */
|
---|
| 1403 |
|
---|
| 1404 | /* Return failure if at end of input. */
|
---|
| 1405 | if (yychar == YYEOF)
|
---|
| 1406 | {
|
---|
| 1407 | /* Pop the error token. */
|
---|
| 1408 | YYPOPSTACK;
|
---|
| 1409 | /* Pop the rest of the stack. */
|
---|
| 1410 | while (yyss < yyssp)
|
---|
| 1411 | {
|
---|
| 1412 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
---|
| 1413 | yydestruct (yystos[*yyssp], yyvsp);
|
---|
[1347] | 1414 | YYPOPSTACK;
|
---|
[10705] | 1415 | }
|
---|
| 1416 | YYABORT;
|
---|
| 1417 | }
|
---|
[1347] | 1418 |
|
---|
| 1419 | YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
|
---|
| 1420 | yydestruct (yytoken, &yylval);
|
---|
[10705] | 1421 | yychar = YYEMPTY;
|
---|
| 1422 |
|
---|
| 1423 | }
|
---|
[1347] | 1424 |
|
---|
| 1425 | /* Else will try to reuse lookahead token after shifting the error
|
---|
[10705] | 1426 | token. */
|
---|
| 1427 | goto yyerrlab1;
|
---|
| 1428 |
|
---|
| 1429 |
|
---|
| 1430 | /*----------------------------------------------------.
|
---|
[1347] | 1431 | | yyerrlab1 -- error raised explicitly by an action. |
|
---|
[10705] | 1432 | `----------------------------------------------------*/
|
---|
[1347] | 1433 | yyerrlab1:
|
---|
[10705] | 1434 | yyerrstatus = 3; /* Each real token shifted decrements this. */
|
---|
| 1435 |
|
---|
| 1436 | for (;;)
|
---|
| 1437 | {
|
---|
| 1438 | yyn = yypact[yystate];
|
---|
| 1439 | if (yyn != YYPACT_NINF)
|
---|
| 1440 | {
|
---|
| 1441 | yyn += YYTERROR;
|
---|
| 1442 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
---|
| 1443 | {
|
---|
| 1444 | yyn = yytable[yyn];
|
---|
[1347] | 1445 | if (0 < yyn)
|
---|
[10705] | 1446 | break;
|
---|
| 1447 | }
|
---|
| 1448 | }
|
---|
[1347] | 1449 |
|
---|
[10705] | 1450 | /* Pop the current state because it cannot handle the error token. */
|
---|
| 1451 | if (yyssp == yyss)
|
---|
| 1452 | YYABORT;
|
---|
| 1453 |
|
---|
[1347] | 1454 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
|
---|
[10705] | 1455 | yydestruct (yystos[yystate], yyvsp);
|
---|
[1347] | 1456 | yyvsp--;
|
---|
| 1457 | yystate = *--yyssp;
|
---|
| 1458 |
|
---|
| 1459 | YY_STACK_PRINT (yyss, yyssp);
|
---|
| 1460 | }
|
---|
[10705] | 1461 |
|
---|
[1347] | 1462 | if (yyn == YYFINAL)
|
---|
| 1463 | YYACCEPT;
|
---|
| 1464 |
|
---|
[10705] | 1465 | YYDPRINTF ((stderr, "Shifting error token, "));
|
---|
[1347] | 1466 |
|
---|
| 1467 | *++yyvsp = yylval;
|
---|
| 1468 |
|
---|
[10705] | 1469 |
|
---|
| 1470 | yystate = yyn;
|
---|
| 1471 | goto yynewstate;
|
---|
| 1472 |
|
---|
| 1473 |
|
---|
| 1474 | /*-------------------------------------.
|
---|
| 1475 | | yyacceptlab -- YYACCEPT comes here. |
|
---|
| 1476 | `-------------------------------------*/
|
---|
| 1477 | yyacceptlab:
|
---|
| 1478 | yyresult = 0;
|
---|
| 1479 | goto yyreturn;
|
---|
| 1480 |
|
---|
| 1481 | /*-----------------------------------.
|
---|
| 1482 | | yyabortlab -- YYABORT comes here. |
|
---|
| 1483 | `-----------------------------------*/
|
---|
| 1484 | yyabortlab:
|
---|
| 1485 | yyresult = 1;
|
---|
| 1486 | goto yyreturn;
|
---|
| 1487 |
|
---|
| 1488 | #ifndef yyoverflow
|
---|
| 1489 | /*----------------------------------------------.
|
---|
| 1490 | | yyoverflowlab -- parser overflow comes here. |
|
---|
| 1491 | `----------------------------------------------*/
|
---|
[1347] | 1492 | yyoverflowlab:
|
---|
| 1493 | yyerror ("parser stack overflow");
|
---|
[10705] | 1494 | yyresult = 2;
|
---|
| 1495 | /* Fall through. */
|
---|
| 1496 | #endif
|
---|
| 1497 |
|
---|
[1347] | 1498 | yyreturn:
|
---|
[10705] | 1499 | #ifndef yyoverflow
|
---|
[1347] | 1500 | if (yyss != yyssa)
|
---|
| 1501 | YYSTACK_FREE (yyss);
|
---|
[10705] | 1502 | #endif
|
---|
| 1503 | return yyresult;
|
---|
| 1504 | }
|
---|
[1347] | 1505 |
|
---|
| 1506 |
|
---|
[1440] | 1507 | #line 106 "zparse.y"
|
---|
[1347] | 1508 |
|
---|
| 1509 | /*int strncasecmp (const char *, const char *,size_t);*/
|
---|
| 1510 | int yyerror(char *string) {
|
---|
| 1511 | fprintf(errfile,"Parse error (line %d) near \n\"%s\"<---:%s\n",lineno,
|
---|
| 1512 | yylval.string,string);
|
---|
[1440] | 1513 | return(1);
|
---|
[1347] | 1514 | }
|
---|
| 1515 |
|
---|
| 1516 | void errormsg(char *str) {
|
---|
| 1517 | fprintf(errfile,"Err (line %d, near \"%s\"): %s.\n",lineno,
|
---|
| 1518 | yylval.string,str);
|
---|
| 1519 | }
|
---|
| 1520 |
|
---|
| 1521 | /* *
|
---|
| 1522 | int main (int argc, char *argv[]) {
|
---|
| 1523 | if (argc==2)
|
---|
| 1524 | if (argv[1][0]=='-'&&argv[1][1]=='d')
|
---|
| 1525 | yydebug=1;
|
---|
| 1526 |
|
---|
[10705] | 1527 | yyparse();
|
---|
| 1528 | return(0);
|
---|
| 1529 | }
|
---|
| 1530 | * */
|
---|
| 1531 |
|
---|