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