| 1 |
/* A Bison parser, made from dangling, by GNU bison 1.75. */ |
| 2 |
|
| 3 |
/* Skeleton parser for Yacc-like parsing with Bison, |
| 4 |
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. |
| 5 |
|
| 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. |
| 10 |
|
| 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. |
| 15 |
|
| 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 |
/* Pure parsers. */ |
| 40 |
#define YYPURE 0 |
| 41 |
|
| 42 |
/* Using locations. */ |
| 43 |
#define YYLSP_NEEDED 0 |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
/* Tokens. */ |
| 48 |
#ifndef YYTOKENTYPE |
| 49 |
# define YYTOKENTYPE |
| 50 |
/* Put the tokens into the symbol table, so that GDB and other debuggers |
| 51 |
know about them. */ |
| 52 |
enum yytokentype { |
| 53 |
IF = 258, |
| 54 |
ELSE = 259, |
| 55 |
VAR = 260 |
| 56 |
}; |
| 57 |
#endif |
| 58 |
#define IF 258 |
| 59 |
#define ELSE 259 |
| 60 |
#define VAR 260 |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
/* Copy the first part of user declarations. */ |
| 66 |
|
| 67 |
|
| 68 |
/* Enabling traces. */ |
| 69 |
#ifndef YYDEBUG |
| 70 |
# define YYDEBUG 0 |
| 71 |
#endif |
| 72 |
|
| 73 |
/* Enabling verbose error messages. */ |
| 74 |
#ifdef YYERROR_VERBOSE |
| 75 |
# undef YYERROR_VERBOSE |
| 76 |
# define YYERROR_VERBOSE 1 |
| 77 |
#else |
| 78 |
# define YYERROR_VERBOSE 0 |
| 79 |
#endif |
| 80 |
|
| 81 |
#ifndef YYSTYPE |
| 82 |
typedef int yystype; |
| 83 |
# define YYSTYPE yystype |
| 84 |
# define YYSTYPE_IS_TRIVIAL 1 |
| 85 |
#endif |
| 86 |
|
| 87 |
#ifndef YYLTYPE |
| 88 |
typedef struct yyltype |
| 89 |
{ |
| 90 |
int first_line; |
| 91 |
int first_column; |
| 92 |
int last_line; |
| 93 |
int last_column; |
| 94 |
} yyltype; |
| 95 |
# define YYLTYPE yyltype |
| 96 |
# define YYLTYPE_IS_TRIVIAL 1 |
| 97 |
#endif |
| 98 |
|
| 99 |
/* Copy the second part of user declarations. */ |
| 100 |
|
| 101 |
|
| 102 |
/* Line 213 of /usr/share/bison/yacc.c. */ |
| 103 |
#line 104 "dangling.tab.c" |
| 104 |
|
| 105 |
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
| 106 |
|
| 107 |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 108 |
|
| 109 |
# if YYSTACK_USE_ALLOCA |
| 110 |
# define YYSTACK_ALLOC alloca |
| 111 |
# else |
| 112 |
# ifndef YYSTACK_USE_ALLOCA |
| 113 |
# if defined (alloca) || defined (_ALLOCA_H) |
| 114 |
# define YYSTACK_ALLOC alloca |
| 115 |
# else |
| 116 |
# ifdef _GNUC_ |
| 117 |
# define YYSTACK_ALLOC _builtin_alloca |
| 118 |
# endif |
| 119 |
# endif |
| 120 |
# endif |
| 121 |
# endif |
| 122 |
|
| 123 |
# ifdef YYSTACK_ALLOC |
| 124 |
/* Pacify GCC's `empty if-body' warning. */ |
| 125 |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
| 126 |
# else |
| 127 |
# if defined (_STDC_) || defined (_cplusplus) |
| 128 |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 129 |
# define YYSIZE_T size_t |
| 130 |
# endif |
| 131 |
# define YYSTACK_ALLOC malloc |
| 132 |
# define YYSTACK_FREE free |
| 133 |
# endif |
| 134 |
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
| 135 |
|
| 136 |
|
| 137 |
#if (! defined (yyoverflow) \ |
| 138 |
&& (! defined (_cplusplus) \ |
| 139 |
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
| 140 |
|
| 141 |
/* A type that is properly aligned for any stack member. */ |
| 142 |
union yyalloc |
| 143 |
{ |
| 144 |
short yyss; |
| 145 |
YYSTYPE yyvs; |
| 146 |
}; |
| 147 |
|
| 148 |
/* The size of the maximum gap between one aligned stack and the next. */ |
| 149 |
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) |
| 150 |
|
| 151 |
/* The size of an array large to enough to hold all stacks, each with |
| 152 |
N elements. */ |
| 153 |
# define YYSTACK_BYTES(N) \ |
| 154 |
((N) * (sizeof (short) + sizeof (YYSTYPE)) \ |
| 155 |
+ YYSTACK_GAP_MAX) |
| 156 |
|
| 157 |
/* Copy COUNT objects from FROM to TO. The source and destination do |
| 158 |
not overlap. */ |
| 159 |
# ifndef YYCOPY |
| 160 |
# if 1 < _GNUC_ |
| 161 |
# define YYCOPY(To, From, Count) \ |
| 162 |
_builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 163 |
# else |
| 164 |
# define YYCOPY(To, From, Count) \ |
| 165 |
do \ |
| 166 |
{ \ |
| 167 |
register YYSIZE_T yyi; \ |
| 168 |
for (yyi = 0; yyi < (Count); yyi++) \ |
| 169 |
(To)[yyi] = (From)[yyi]; \ |
| 170 |
} \ |
| 171 |
while (0) |
| 172 |
# endif |
| 173 |
# endif |
| 174 |
|
| 175 |
/* Relocate STACK from its old location to the new one. The |
| 176 |
local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 177 |
elements in the stack, and YYPTR gives the new location of the |
| 178 |
stack. Advance YYPTR to a properly aligned location for the next |
| 179 |
stack. */ |
| 180 |
# define YYSTACK_RELOCATE(Stack) \ |
| 181 |
do \ |
| 182 |
{ \ |
| 183 |
YYSIZE_T yynewbytes; \ |
| 184 |
YYCOPY (&yyptr->Stack, Stack, yysize); \ |
| 185 |
Stack = &yyptr->Stack; \ |
| 186 |
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ |
| 187 |
yyptr += yynewbytes / sizeof (*yyptr); \ |
| 188 |
} \ |
| 189 |
while (0) |
| 190 |
|
| 191 |
#endif |
| 192 |
|
| 193 |
#if defined (_STDC_) || defined (_cplusplus) |
| 194 |
typedef signed char yysigned_char; |
| 195 |
#else |
| 196 |
typedef short yysigned_char; |
| 197 |
#endif |
| 198 |
|
| 199 |
/* YYFINAL -- State number of the termination state. */ |
| 200 |
#define YYFINAL 6 |
| 201 |
#define YYLAST 10 |
| 202 |
|
| 203 |
/* YYNTOKENS -- Number of terminals. */ |
| 204 |
#define YYNTOKENS 9 |
| 205 |
/* YYNNTS -- Number of nonterminals. */ |
| 206 |
#define YYNNTS 2 |
| 207 |
/* YYNRULES -- Number of rules. */ |
| 208 |
#define YYNRULES 4 |
| 209 |
/* YYNRULES -- Number of states. */ |
| 210 |
#define YYNSTATES 12 |
| 211 |
|
| 212 |
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 213 |
#define YYUNDEFTOK 2 |
| 214 |
#define YYMAXUTOK 260 |
| 215 |
|
| 216 |
#define YYTRANSLATE(X) \ |
| 217 |
((size_t)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK) |
| 218 |
|
| 219 |
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 220 |
static const size_t char yytranslate[] = |
| 221 |
{ |
| 222 |
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 223 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 224 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 225 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 226 |
7, 8, 2, 2, 2, 2, 2, 2, 2, 2, |
| 227 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 6, |
| 228 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 229 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 230 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 231 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 232 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 233 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 234 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 235 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 236 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 237 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 238 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 239 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 240 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 241 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 242 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 243 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 244 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 245 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 246 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 247 |
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 248 |
5 |
| 249 |
}; |
| 250 |
|
| 251 |
#if YYDEBUG |
| 252 |
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 253 |
YYRHS. */ |
| 254 |
static const size_t char yyprhs[] = |
| 255 |
{ |
| 256 |
0, 0, 3, 6, 12 |
| 257 |
}; |
| 258 |
|
| 259 |
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 260 |
static const yysigned_char yyrhs[] = |
| 261 |
{ |
| 262 |
10, 0, -1, 5, 6, -1, 3, 7, 5, 8, |
| 263 |
10, -1, 3, 7, 5, 8, 10, 4, 10, -1 |
| 264 |
}; |
| 265 |
|
| 266 |
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 267 |
static const size_t char yyrline[] = |
| 268 |
{ |
| 269 |
0, 5, 5, 7, 9 |
| 270 |
}; |
| 271 |
#endif |
| 272 |
|
| 273 |
#if YYDEBUG || YYERROR_VERBOSE |
| 274 |
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 275 |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 276 |
static const char *const yytname[] = |
| 277 |
{ |
| 278 |
"$end", "error", "$undefined", "IF", "ELSE", "VAR", "';'", "'('", "')'", |
| 279 |
"$accept", "stmt", 0 |
| 280 |
}; |
| 281 |
#endif |
| 282 |
|
| 283 |
# ifdef YYPRINT |
| 284 |
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 285 |
token YYLEX-NUM. */ |
| 286 |
static const size_t short yytoknum[] = |
| 287 |
{ |
| 288 |
0, 256, 257, 258, 259, 260, 59, 40, 41 |
| 289 |
}; |
| 290 |
# endif |
| 291 |
|
| 292 |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 293 |
static const size_t char yyr1[] = |
| 294 |
{ |
| 295 |
0, 9, 10, 10, 10 |
| 296 |
}; |
| 297 |
|
| 298 |
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 299 |
static const size_t char yyr2[] = |
| 300 |
{ |
| 301 |
0, 2, 2, 5, 7 |
| 302 |
}; |
| 303 |
|
| 304 |
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 305 |
STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 306 |
means the default is an error. */ |
| 307 |
static const size_t char yydefact[] = |
| 308 |
{ |
| 309 |
0, 0, 0, 0, 0, 2, 1, 0, 0, 3, |
| 310 |
0, 4 |
| 311 |
}; |
| 312 |
|
| 313 |
/* YYDEFGOTO[NTERM-NUM]. */ |
| 314 |
static const yysigned_char yydefgoto[] = |
| 315 |
{ |
| 316 |
-1, 3 |
| 317 |
}; |
| 318 |
|
| 319 |
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 320 |
STATE-NUM. */ |
| 321 |
#define YYPACT_NINF -8 |
| 322 |
static const yysigned_char yypact[] = |
| 323 |
{ |
| 324 |
-3, -2, 0, 4, 2, -8, -8, 1, -3, 6, |
| 325 |
-3, -8 |
| 326 |
}; |
| 327 |
|
| 328 |
/* YYPGOTO[NTERM-NUM]. */ |
| 329 |
static const yysigned_char yypgoto[] = |
| 330 |
{ |
| 331 |
-8, -7 |
| 332 |
}; |
| 333 |
|
| 334 |
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 335 |
positive, shift that token. If negative, reduce the rule which |
| 336 |
number is the opposite. If zero, do what YYDEFACT says. |
| 337 |
If YYTABLE_NINF, parse error. */ |
| 338 |
#define YYTABLE_NINF -1 |
| 339 |
static const size_t char yytable[] = |
| 340 |
{ |
| 341 |
1, 9, 2, 11, 6, 4, 5, 7, 0, 8, |
| 342 |
10 |
| 343 |
}; |
| 344 |
|
| 345 |
static const yysigned_char yycheck[] = |
| 346 |
{ |
| 347 |
3, 8, 5, 10, 0, 7, 6, 5, -1, 8, |
| 348 |
4 |
| 349 |
}; |
| 350 |
|
| 351 |
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 352 |
symbol of state STATE-NUM. */ |
| 353 |
static const size_t char yystos[] = |
| 354 |
{ |
| 355 |
0, 3, 5, 10, 7, 6, 0, 5, 8, 10, |
| 356 |
4, 10 |
| 357 |
}; |
| 358 |
|
| 359 |
#if ! defined (YYSIZE_T) && defined (_SIZE_TYPE_) |
| 360 |
# define YYSIZE_T _SIZE_TYPE_ |
| 361 |
#endif |
| 362 |
#if ! defined (YYSIZE_T) && defined (size_t) |
| 363 |
# define YYSIZE_T size_t |
| 364 |
#endif |
| 365 |
#if ! defined (YYSIZE_T) |
| 366 |
# if defined (_STDC_) || defined (_cplusplus) |
| 367 |
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 368 |
# define YYSIZE_T size_t |
| 369 |
# endif |
| 370 |
#endif |
| 371 |
#if ! defined (YYSIZE_T) |
| 372 |
# define YYSIZE_T size_t int |
| 373 |
#endif |
| 374 |
|
| 375 |
#define yyerrok (yyerrstatus = 0) |
| 376 |
#define yyclearin (yychar = YYEMPTY) |
| 377 |
#define YYEMPTY -2 |
| 378 |
#define YYEOF 0 |
| 379 |
|
| 380 |
#define YYACCEPT goto yyacceptlab |
| 381 |
#define YYABORT goto yyabortlab |
| 382 |
#define YYERROR goto yyerrlab1 |
| 383 |
|
| 384 |
/* Like YYERROR except do call yyerror. This remains here temporarily |
| 385 |
to ease the transition to the new meaning of YYERROR, for GCC. |
| 386 |
Once GCC version 2 has supplanted version 1, this can go. */ |
| 387 |
|
| 388 |
#define YYFAIL goto yyerrlab |
| 389 |
|
| 390 |
#define YYRECOVERING() (!!yyerrstatus) |
| 391 |
|
| 392 |
#define YYBACKUP(Token, Value) \ |
| 393 |
do \ |
| 394 |
if (yychar == YYEMPTY && yylen == 1) \ |
| 395 |
{ \ |
| 396 |
yychar = (Token); \ |
| 397 |
yylval = (Value); \ |
| 398 |
yychar1 = YYTRANSLATE (yychar); \ |
| 399 |
YYPOPSTACK; \ |
| 400 |
goto yybackup; \ |
| 401 |
} \ |
| 402 |
else \ |
| 403 |
{ \ |
| 404 |
yyerror ("syntax error: cannot back up"); \ |
| 405 |
YYERROR; \ |
| 406 |
} \ |
| 407 |
while (0) |
| 408 |
|
| 409 |
#define YYTERROR 1 |
| 410 |
#define YYERRCODE 256 |
| 411 |
|
| 412 |
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
| 413 |
are run). */ |
| 414 |
|
| 415 |
#ifndef YYLLOC_DEFAULT |
| 416 |
# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 417 |
Current.first_line = Rhs[1].first_line; \ |
| 418 |
Current.first_column = Rhs[1].first_column; \ |
| 419 |
Current.last_line = Rhs[N].last_line; \ |
| 420 |
Current.last_column = Rhs[N].last_column; |
| 421 |
#endif |
| 422 |
|
| 423 |
/* YYLEX -- calling `yylex' with the right arguments. */ |
| 424 |
|
| 425 |
#define YYLEX yylex () |
| 426 |
|
| 427 |
/* Enable debugging if requested. */ |
| 428 |
#if YYDEBUG |
| 429 |
|
| 430 |
# ifndef YYFPRINTF |
| 431 |
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 432 |
# define YYFPRINTF fprintf |
| 433 |
# endif |
| 434 |
|
| 435 |
# define YYDPRINTF(Args) \ |
| 436 |
do { \ |
| 437 |
if (yydebug) \ |
| 438 |
YYFPRINTF Args; \ |
| 439 |
} while (0) |
| 440 |
# define YYDSYMPRINT(Args) \ |
| 441 |
do { \ |
| 442 |
if (yydebug) \ |
| 443 |
yysymprint Args; \ |
| 444 |
} while (0) |
| 445 |
/* Nonzero means print parse trace. It is left uninitialized so that |
| 446 |
multiple parsers can coexist. */ |
| 447 |
int yydebug; |
| 448 |
#else /* !YYDEBUG */ |
| 449 |
# define YYDPRINTF(Args) |
| 450 |
# define YYDSYMPRINT(Args) |
| 451 |
#endif /* !YYDEBUG */ |
| 452 |
|
| 453 |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 454 |
#ifndef YYINITDEPTH |
| 455 |
# define YYINITDEPTH 200 |
| 456 |
#endif |
| 457 |
|
| 458 |
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 459 |
if the built-in stack extension method is used). |
| 460 |
|
| 461 |
Do not make this value too large; the results are undefined if |
| 462 |
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
| 463 |
evaluated with infinite-precision integer arithmetic. */ |
| 464 |
|
| 465 |
#if YYMAXDEPTH == 0 |
| 466 |
# undef YYMAXDEPTH |
| 467 |
#endif |
| 468 |
|
| 469 |
#ifndef YYMAXDEPTH |
| 470 |
# define YYMAXDEPTH 10000 |
| 471 |
#endif |
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
#if YYERROR_VERBOSE |
| 476 |
|
| 477 |
# ifndef yystrlen |
| 478 |
# if defined (_GLIBC_) && defined (_STRING_H) |
| 479 |
# define yystrlen strlen |
| 480 |
# else |
| 481 |
/* Return the length of YYSTR. */ |
| 482 |
static YYSIZE_T |
| 483 |
# if defined (_STDC_) || defined (_cplusplus) |
| 484 |
yystrlen (const char *yystr) |
| 485 |
# else |
| 486 |
yystrlen (yystr) |
| 487 |
const char *yystr; |
| 488 |
# endif |
| 489 |
{ |
| 490 |
register const char *yys = yystr; |
| 491 |
|
| 492 |
while (*yys++ != '\0') |
| 493 |
continue; |
| 494 |
|
| 495 |
return yys - yystr - 1; |
| 496 |
} |
| 497 |
# endif |
| 498 |
# endif |
| 499 |
|
| 500 |
# ifndef yystpcpy |
| 501 |
# if defined (_GLIBC_) && defined (_STRING_H) && defined (_GNU_SOURCE) |
| 502 |
# define yystpcpy stpcpy |
| 503 |
# else |
| 504 |
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 505 |
YYDEST. */ |
| 506 |
static char * |
| 507 |
# if defined (_STDC_) || defined (_cplusplus) |
| 508 |
yystpcpy (char *yydest, const char *yysrc) |
| 509 |
# else |
| 510 |
yystpcpy (yydest, yysrc) |
| 511 |
char *yydest; |
| 512 |
const char *yysrc; |
| 513 |
# endif |
| 514 |
{ |
| 515 |
register char *yyd = yydest; |
| 516 |
register const char *yys = yysrc; |
| 517 |
|
| 518 |
while ((*yyd++ = *yys++) != '\0') |
| 519 |
continue; |
| 520 |
|
| 521 |
return yyd - 1; |
| 522 |
} |
| 523 |
# endif |
| 524 |
# endif |
| 525 |
|
| 526 |
#endif /* !YYERROR_VERBOSE */ |
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
#if YYDEBUG |
| 531 |
/*-----------------------------. |
| 532 |
| Print this symbol on YYOUT. | |
| 533 |
`-----------------------------*/ |
| 534 |
|
| 535 |
static void |
| 536 |
#if defined (_STDC_) || defined (_cplusplus) |
| 537 |
yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue) |
| 538 |
#else |
| 539 |
yysymprint (yyout, yytype, yyvalue) |
| 540 |
FILE* yyout; |
| 541 |
int yytype; |
| 542 |
YYSTYPE yyvalue; |
| 543 |
#endif |
| 544 |
{ |
| 545 |
/* Pacify ``unused variable'' warnings. */ |
| 546 |
(void) yyvalue; |
| 547 |
|
| 548 |
if (yytype < YYNTOKENS) |
| 549 |
{ |
| 550 |
YYFPRINTF (yyout, "token %s (", yytname[yytype]); |
| 551 |
# ifdef YYPRINT |
| 552 |
YYPRINT (yyout, yytoknum[yytype], yyvalue); |
| 553 |
# endif |
| 554 |
} |
| 555 |
else |
| 556 |
YYFPRINTF (yyout, "nterm %s (", yytname[yytype]); |
| 557 |
|
| 558 |
switch (yytype) |
| 559 |
{ |
| 560 |
default: |
| 561 |
break; |
| 562 |
} |
| 563 |
YYFPRINTF (yyout, ")"); |
| 564 |
} |
| 565 |
#endif /* YYDEBUG. */ |
| 566 |
|
| 567 |
|
| 568 |
/*-----------------------------------------------. |
| 569 |
| Release the memory associated to this symbol. | |
| 570 |
`-----------------------------------------------*/ |
| 571 |
|
| 572 |
static void |
| 573 |
#if defined (_STDC_) || defined (_cplusplus) |
| 574 |
yydestruct (int yytype, YYSTYPE yyvalue) |
| 575 |
#else |
| 576 |
yydestruct (yytype, yyvalue) |
| 577 |
int yytype; |
| 578 |
YYSTYPE yyvalue; |
| 579 |
#endif |
| 580 |
{ |
| 581 |
/* Pacify ``unused variable'' warnings. */ |
| 582 |
(void) yyvalue; |
| 583 |
|
| 584 |
switch (yytype) |
| 585 |
{ |
| 586 |
default: |
| 587 |
break; |
| 588 |
} |
| 589 |
} |
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
/* The user can define YYPARSE_PARAM as the name of an argument to be passed |
| 594 |
into yyparse. The argument should have type void *. |
| 595 |
It should actually point to an object. |
| 596 |
Grammar actions can access the variable by casting it |
| 597 |
to the proper pointer type. */ |
| 598 |
|
| 599 |
#ifdef YYPARSE_PARAM |
| 600 |
# if defined (_STDC_) || defined (_cplusplus) |
| 601 |
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM |
| 602 |
# define YYPARSE_PARAM_DECL |
| 603 |
# else |
| 604 |
# define YYPARSE_PARAM_ARG YYPARSE_PARAM |
| 605 |
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; |
| 606 |
# endif |
| 607 |
#else /* !YYPARSE_PARAM */ |
| 608 |
# define YYPARSE_PARAM_ARG |
| 609 |
# define YYPARSE_PARAM_DECL |
| 610 |
#endif /* !YYPARSE_PARAM */ |
| 611 |
|
| 612 |
/* Prevent warning if -Wstrict-prototypes. */ |
| 613 |
#ifdef _GNUC_ |
| 614 |
# ifdef YYPARSE_PARAM |
| 615 |
int yyparse (void *); |
| 616 |
# else |
| 617 |
int yyparse (void); |
| 618 |
# endif |
| 619 |
#endif |
| 620 |
|
| 621 |
|
| 622 |
/* The lookahead symbol. */ |
| 623 |
int yychar; |
| 624 |
|
| 625 |
/* The semantic value of the lookahead symbol. */ |
| 626 |
YYSTYPE yylval; |
| 627 |
|
| 628 |
/* Number of parse errors so far. */ |
| 629 |
int yynerrs; |
| 630 |
|
| 631 |
|
| 632 |
int |
| 633 |
yyparse (YYPARSE_PARAM_ARG) |
| 634 |
YYPARSE_PARAM_DECL |
| 635 |
{ |
| 636 |
|
| 637 |
register int yystate; |
| 638 |
register int yyn; |
| 639 |
int yyresult; |
| 640 |
/* Number of tokens to shift before error messages enabled. */ |
| 641 |
int yyerrstatus; |
| 642 |
/* Lookahead token as an internal (translated) token number. */ |
| 643 |
int yychar1 = 0; |
| 644 |
|
| 645 |
/* Three stacks and their tools: |
| 646 |
`yyss': related to states, |
| 647 |
`yyvs': related to semantic values, |
| 648 |
`yyls': related to locations. |
| 649 |
|
| 650 |
Refer to the stacks thru separate pointers, to allow yyoverflow |
| 651 |
to reallocate them elsewhere. */ |
| 652 |
|
| 653 |
/* The state stack. */ |
| 654 |
short yyssa[YYINITDEPTH]; |
| 655 |
short *yyss = yyssa; |
| 656 |
register short *yyssp; |
| 657 |
|
| 658 |
/* The semantic value stack. */ |
| 659 |
YYSTYPE yyvsa[YYINITDEPTH]; |
| 660 |
YYSTYPE *yyvs = yyvsa; |
| 661 |
register YYSTYPE *yyvsp; |
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
#define YYPOPSTACK (yyvsp--, yyssp--) |
| 666 |
|
| 667 |
YYSIZE_T yystacksize = YYINITDEPTH; |
| 668 |
|
| 669 |
/* The variables used to return semantic value and location from the |
| 670 |
action routines. */ |
| 671 |
YYSTYPE yyval; |
| 672 |
|
| 673 |
|
| 674 |
/* When reducing, the number of symbols on the RHS of the reduced |
| 675 |
rule. */ |
| 676 |
int yylen; |
| 677 |
|
| 678 |
YYDPRINTF ((stderr, "Starting parse\n")); |
| 679 |
|
| 680 |
yystate = 0; |
| 681 |
yyerrstatus = 0; |
| 682 |
yynerrs = 0; |
| 683 |
yychar = YYEMPTY; /* Cause a token to be read. */ |
| 684 |
|
| 685 |
/* Initialize stack pointers. |
| 686 |
Waste one element of value and location stack |
| 687 |
so that they stay on the same level as the state stack. |
| 688 |
The wasted elements are never initialized. */ |
| 689 |
|
| 690 |
yyssp = yyss; |
| 691 |
yyvsp = yyvs; |
| 692 |
|
| 693 |
goto yysetstate; |
| 694 |
|
| 695 |
/*------------------------------------------------------------. |
| 696 |
| yynewstate -- Push a new state, which is found in yystate. | |
| 697 |
`------------------------------------------------------------*/ |
| 698 |
yynewstate: |
| 699 |
/* In all cases, when you get here, the value and location stacks |
| 700 |
have just been pushed. so pushing a state here evens the stacks. |
| 701 |
*/ |
| 702 |
yyssp++; |
| 703 |
|
| 704 |
yysetstate: |
| 705 |
*yyssp = yystate; |
| 706 |
|
| 707 |
if (yyssp >= yyss + yystacksize - 1) |
| 708 |
{ |
| 709 |
/* Get the current used size of the three stacks, in elements. */ |
| 710 |
YYSIZE_T yysize = yyssp - yyss + 1; |
| 711 |
|
| 712 |
#ifdef yyoverflow |
| 713 |
{ |
| 714 |
/* Give user a chance to reallocate the stack. Use copies of |
| 715 |
these so that the &'s don't force the real ones into |
| 716 |
memory. */ |
| 717 |
YYSTYPE *yyvs1 = yyvs; |
| 718 |
short *yyss1 = yyss; |
| 719 |
|
| 720 |
|
| 721 |
/* Each stack pointer address is followed by the size of the |
| 722 |
data in use in that stack, in bytes. This used to be a |
| 723 |
conditional around just the two extra args, but that might |
| 724 |
be undefined if yyoverflow is a macro. */ |
| 725 |
yyoverflow ("parser stack overflow", |
| 726 |
&yyss1, yysize * sizeof (*yyssp), |
| 727 |
&yyvs1, yysize * sizeof (*yyvsp), |
| 728 |
|
| 729 |
&yystacksize); |
| 730 |
|
| 731 |
yyss = yyss1; |
| 732 |
yyvs = yyvs1; |
| 733 |
} |
| 734 |
#else /* no yyoverflow */ |
| 735 |
# ifndef YYSTACK_RELOCATE |
| 736 |
goto yyoverflowlab; |
| 737 |
# else |
| 738 |
/* Extend the stack our own way. */ |
| 739 |
if (yystacksize >= YYMAXDEPTH) |
| 740 |
goto yyoverflowlab; |
| 741 |
yystacksize *= 2; |
| 742 |
if (yystacksize > YYMAXDEPTH) |
| 743 |
yystacksize = YYMAXDEPTH; |
| 744 |
|
| 745 |
{ |
| 746 |
short *yyss1 = yyss; |
| 747 |
union yyalloc *yyptr = |
| 748 |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 749 |
if (! yyptr) |
| 750 |
goto yyoverflowlab; |
| 751 |
YYSTACK_RELOCATE (yyss); |
| 752 |
YYSTACK_RELOCATE (yyvs); |
| 753 |
|
| 754 |
# undef YYSTACK_RELOCATE |
| 755 |
if (yyss1 != yyssa) |
| 756 |
YYSTACK_FREE (yyss1); |
| 757 |
} |
| 758 |
# endif |
| 759 |
#endif /* no yyoverflow */ |
| 760 |
|
| 761 |
yyssp = yyss + yysize - 1; |
| 762 |
yyvsp = yyvs + yysize - 1; |
| 763 |
|
| 764 |
|
| 765 |
YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 766 |
(size_t long int) yystacksize)); |
| 767 |
|
| 768 |
if (yyssp >= yyss + yystacksize - 1) |
| 769 |
YYABORT; |
| 770 |
} |
| 771 |
|
| 772 |
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 773 |
|
| 774 |
goto yybackup; |
| 775 |
|
| 776 |
/*-----------. |
| 777 |
| yybackup. | |
| 778 |
`-----------*/ |
| 779 |
yybackup: |
| 780 |
|
| 781 |
/* Do appropriate processing given the current state. */ |
| 782 |
/* Read a lookahead token if we need one and don't already have one. */ |
| 783 |
/* yyresume: */ |
| 784 |
|
| 785 |
/* First try to decide what to do without reference to lookahead token. */ |
| 786 |
|
| 787 |
yyn = yypact[yystate]; |
| 788 |
if (yyn == YYPACT_NINF) |
| 789 |
goto yydefault; |
| 790 |
|
| 791 |
/* Not known => get a lookahead token if don't already have one. */ |
| 792 |
|
| 793 |
/* yychar is either YYEMPTY or YYEOF |
| 794 |
or a valid token in external form. */ |
| 795 |
|
| 796 |
if (yychar == YYEMPTY) |
| 797 |
{ |
| 798 |
YYDPRINTF ((stderr, "Reading a token: ")); |
| 799 |
yychar = YYLEX; |
| 800 |
} |
| 801 |
|
| 802 |
/* Convert token to internal form (in yychar1) for indexing tables with. */ |
| 803 |
|
| 804 |
if (yychar <= 0) /* This means end of input. */ |
| 805 |
{ |
| 806 |
yychar1 = 0; |
| 807 |
yychar = YYEOF; /* Don't call YYLEX any more. */ |
| 808 |
|
| 809 |
YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 810 |
} |
| 811 |
else |
| 812 |
{ |
| 813 |
yychar1 = YYTRANSLATE (yychar); |
| 814 |
|
| 815 |
/* We have to keep this `#if YYDEBUG', since we use variables |
| 816 |
which are defined only if `YYDEBUG' is set. */ |
| 817 |
YYDPRINTF ((stderr, "Next token is ")); |
| 818 |
YYDSYMPRINT ((stderr, yychar1, yylval)); |
| 819 |
YYDPRINTF ((stderr, "\n")); |
| 820 |
} |
| 821 |
|
| 822 |
/* If the proper action on seeing token YYCHAR1 is to reduce or to |
| 823 |
detect an error, take that action. */ |
| 824 |
yyn += yychar1; |
| 825 |
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1) |
| 826 |
goto yydefault; |
| 827 |
yyn = yytable[yyn]; |
| 828 |
if (yyn <= 0) |
| 829 |
{ |
| 830 |
if (yyn == 0 || yyn == YYTABLE_NINF) |
| 831 |
goto yyerrlab; |
| 832 |
yyn = -yyn; |
| 833 |
goto yyreduce; |
| 834 |
} |
| 835 |
|
| 836 |
if (yyn == YYFINAL) |
| 837 |
YYACCEPT; |
| 838 |
|
| 839 |
/* Shift the lookahead token. */ |
| 840 |
YYDPRINTF ((stderr, "Shifting token %d (%s), ", |
| 841 |
yychar, yytname[yychar1])); |
| 842 |
|
| 843 |
/* Discard the token being shifted unless it is eof. */ |
| 844 |
if (yychar != YYEOF) |
| 845 |
yychar = YYEMPTY; |
| 846 |
|
| 847 |
*++yyvsp = yylval; |
| 848 |
|
| 849 |
|
| 850 |
/* Count tokens shifted since error; after three, turn off error |
| 851 |
status. */ |
| 852 |
if (yyerrstatus) |
| 853 |
yyerrstatus--; |
| 854 |
|
| 855 |
yystate = yyn; |
| 856 |
goto yynewstate; |
| 857 |
|
| 858 |
|
| 859 |
/*-----------------------------------------------------------. |
| 860 |
| yydefault -- do the default action for the current state. | |
| 861 |
`-----------------------------------------------------------*/ |
| 862 |
yydefault: |
| 863 |
yyn = yydefact[yystate]; |
| 864 |
if (yyn == 0) |
| 865 |
goto yyerrlab; |
| 866 |
goto yyreduce; |
| 867 |
|
| 868 |
|
| 869 |
/*-----------------------------. |
| 870 |
| yyreduce -- Do a reduction. | |
| 871 |
`-----------------------------*/ |
| 872 |
yyreduce: |
| 873 |
/* yyn is the number of a rule to reduce with. */ |
| 874 |
yylen = yyr2[yyn]; |
| 875 |
|
| 876 |
/* If YYLEN is nonzero, implement the default value of the action: |
| 877 |
`$$ = $1'. |
| 878 |
|
| 879 |
Otherwise, the following line sets YYVAL to garbage. |
| 880 |
This behavior is undocumented and Bison |
| 881 |
users should not rely upon it. Assigning to YYVAL |
| 882 |
unconditionally makes the parser a bit smaller, and it avoids a |
| 883 |
GCC warning that YYVAL may be used uninitialized. */ |
| 884 |
yyval = yyvsp[1-yylen]; |
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
#if YYDEBUG |
| 889 |
/* We have to keep this `#if YYDEBUG', since we use variables which |
| 890 |
are defined only if `YYDEBUG' is set. */ |
| 891 |
if (yydebug) |
| 892 |
{ |
| 893 |
int yyi; |
| 894 |
|
| 895 |
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", |
| 896 |
yyn - 1, yyrline[yyn]); |
| 897 |
|
| 898 |
/* Print the symbols being reduced, and their result. */ |
| 899 |
for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++) |
| 900 |
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); |
| 901 |
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
| 902 |
} |
| 903 |
#endif |
| 904 |
switch (yyn) |
| 905 |
{ |
| 906 |
|
| 907 |
} |
| 908 |
|
| 909 |
/* Line 1016 of /usr/share/bison/yacc.c. */ |
| 910 |
#line 911 "dangling.tab.c" |
| 911 |
|
| 912 |
yyvsp -= yylen; |
| 913 |
yyssp -= yylen; |
| 914 |
|
| 915 |
|
| 916 |
#if YYDEBUG |
| 917 |
if (yydebug) |
| 918 |
{ |
| 919 |
short *yyssp1 = yyss - 1; |
| 920 |
YYFPRINTF (stderr, "state stack now"); |
| 921 |
while (yyssp1 != yyssp) |
| 922 |
YYFPRINTF (stderr, " %d", *++yyssp1); |
| 923 |
YYFPRINTF (stderr, "\n"); |
| 924 |
} |
| 925 |
#endif |
| 926 |
|
| 927 |
*++yyvsp = yyval; |
| 928 |
|
| 929 |
|
| 930 |
/* Now `shift' the result of the reduction. Determine what state |
| 931 |
that goes to, based on the state we popped back to and the rule |
| 932 |
number reduced by. */ |
| 933 |
|
| 934 |
yyn = yyr1[yyn]; |
| 935 |
|
| 936 |
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 937 |
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 938 |
yystate = yytable[yystate]; |
| 939 |
else |
| 940 |
yystate = yydefgoto[yyn - YYNTOKENS]; |
| 941 |
|
| 942 |
goto yynewstate; |
| 943 |
|
| 944 |
|
| 945 |
/*------------------------------------. |
| 946 |
| yyerrlab -- here on detecting error | |
| 947 |
`------------------------------------*/ |
| 948 |
yyerrlab: |
| 949 |
/* If not already recovering from an error, report this error. */ |
| 950 |
if (!yyerrstatus) |
| 951 |
{ |
| 952 |
++yynerrs; |
| 953 |
#if YYERROR_VERBOSE |
| 954 |
yyn = yypact[yystate]; |
| 955 |
|
| 956 |
if (YYPACT_NINF < yyn && yyn < YYLAST) |
| 957 |
{ |
| 958 |
YYSIZE_T yysize = 0; |
| 959 |
int yytype = YYTRANSLATE (yychar); |
| 960 |
char *yymsg; |
| 961 |
int yyx, yycount; |
| 962 |
|
| 963 |
yycount = 0; |
| 964 |
/* Start YYX at -YYN if negative to avoid negative indexes in |
| 965 |
YYCHECK. */ |
| 966 |
for (yyx = yyn < 0 ? -yyn : 0; |
| 967 |
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) |
| 968 |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 969 |
yysize += yystrlen (yytname[yyx]) + 15, yycount++; |
| 970 |
yysize += yystrlen ("parse error, unexpected ") + 1; |
| 971 |
yysize += yystrlen (yytname[yytype]); |
| 972 |
yymsg = (char *) YYSTACK_ALLOC (yysize); |
| 973 |
if (yymsg != 0) |
| 974 |
{ |
| 975 |
char *yyp = yystpcpy (yymsg, "parse error, unexpected "); |
| 976 |
yyp = yystpcpy (yyp, yytname[yytype]); |
| 977 |
|
| 978 |
if (yycount < 5) |
| 979 |
{ |
| 980 |
yycount = 0; |
| 981 |
for (yyx = yyn < 0 ? -yyn : 0; |
| 982 |
yyx < (int) (sizeof (yytname) / sizeof (char *)); |
| 983 |
yyx++) |
| 984 |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 985 |
{ |
| 986 |
const char *yyq = ! yycount ? ", expecting " : " or "; |
| 987 |
yyp = yystpcpy (yyp, yyq); |
| 988 |
yyp = yystpcpy (yyp, yytname[yyx]); |
| 989 |
yycount++; |
| 990 |
} |
| 991 |
} |
| 992 |
yyerror (yymsg); |
| 993 |
YYSTACK_FREE (yymsg); |
| 994 |
} |
| 995 |
else |
| 996 |
yyerror ("parse error; also virtual memory exhausted"); |
| 997 |
} |
| 998 |
else |
| 999 |
#endif /* YYERROR_VERBOSE */ |
| 1000 |
yyerror ("parse error"); |
| 1001 |
} |
| 1002 |
goto yyerrlab1; |
| 1003 |
|
| 1004 |
|
| 1005 |
/*----------------------------------------------------. |
| 1006 |
| yyerrlab1 -- error raised explicitly by an action. | |
| 1007 |
`----------------------------------------------------*/ |
| 1008 |
yyerrlab1: |
| 1009 |
if (yyerrstatus == 3) |
| 1010 |
{ |
| 1011 |
/* If just tried and failed to reuse lookahead token after an |
| 1012 |
error, discard it. */ |
| 1013 |
|
| 1014 |
/* Return failure if at end of input. */ |
| 1015 |
if (yychar == YYEOF) |
| 1016 |
{ |
| 1017 |
/* Pop the error token. */ |
| 1018 |
YYPOPSTACK; |
| 1019 |
/* Pop the rest of the stack. */ |
| 1020 |
while (yyssp > yyss) |
| 1021 |
{ |
| 1022 |
YYDPRINTF ((stderr, "Error: popping ")); |
| 1023 |
YYDSYMPRINT ((stderr, |
| 1024 |
yystos[*yyssp], |
| 1025 |
*yyvsp)); |
| 1026 |
YYDPRINTF ((stderr, "\n")); |
| 1027 |
yydestruct (yystos[*yyssp], *yyvsp); |
| 1028 |
YYPOPSTACK; |
| 1029 |
} |
| 1030 |
YYABORT; |
| 1031 |
} |
| 1032 |
|
| 1033 |
YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
| 1034 |
yychar, yytname[yychar1])); |
| 1035 |
yydestruct (yychar1, yylval); |
| 1036 |
yychar = YYEMPTY; |
| 1037 |
} |
| 1038 |
|
| 1039 |
/* Else will try to reuse lookahead token after shifting the error |
| 1040 |
token. */ |
| 1041 |
|
| 1042 |
yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 1043 |
|
| 1044 |
for (;;) |
| 1045 |
{ |
| 1046 |
yyn = yypact[yystate]; |
| 1047 |
if (yyn != YYPACT_NINF) |
| 1048 |
{ |
| 1049 |
yyn += YYTERROR; |
| 1050 |
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 1051 |
{ |
| 1052 |
yyn = yytable[yyn]; |
| 1053 |
if (0 < yyn) |
| 1054 |
break; |
| 1055 |
} |
| 1056 |
} |
| 1057 |
|
| 1058 |
/* Pop the current state because it cannot handle the error token. */ |
| 1059 |
if (yyssp == yyss) |
| 1060 |
YYABORT; |
| 1061 |
|
| 1062 |
YYDPRINTF ((stderr, "Error: popping ")); |
| 1063 |
YYDSYMPRINT ((stderr, |
| 1064 |
yystos[*yyssp], *yyvsp)); |
| 1065 |
YYDPRINTF ((stderr, "\n")); |
| 1066 |
|
| 1067 |
yydestruct (yystos[yystate], *yyvsp); |
| 1068 |
yyvsp--; |
| 1069 |
yystate = *--yyssp; |
| 1070 |
|
| 1071 |
|
| 1072 |
#if YYDEBUG |
| 1073 |
if (yydebug) |
| 1074 |
{ |
| 1075 |
short *yyssp1 = yyss - 1; |
| 1076 |
YYFPRINTF (stderr, "Error: state stack now"); |
| 1077 |
while (yyssp1 != yyssp) |
| 1078 |
YYFPRINTF (stderr, " %d", *++yyssp1); |
| 1079 |
YYFPRINTF (stderr, "\n"); |
| 1080 |
} |
| 1081 |
#endif |
| 1082 |
} |
| 1083 |
|
| 1084 |
if (yyn == YYFINAL) |
| 1085 |
YYACCEPT; |
| 1086 |
|
| 1087 |
YYDPRINTF ((stderr, "Shifting error token, ")); |
| 1088 |
|
| 1089 |
*++yyvsp = yylval; |
| 1090 |
|
| 1091 |
|
| 1092 |
yystate = yyn; |
| 1093 |
goto yynewstate; |
| 1094 |
|
| 1095 |
|
| 1096 |
/*-------------------------------------. |
| 1097 |
| yyacceptlab -- YYACCEPT comes here. | |
| 1098 |
`-------------------------------------*/ |
| 1099 |
yyacceptlab: |
| 1100 |
yyresult = 0; |
| 1101 |
goto yyreturn; |
| 1102 |
|
| 1103 |
/*-----------------------------------. |
| 1104 |
| yyabortlab -- YYABORT comes here. | |
| 1105 |
`-----------------------------------*/ |
| 1106 |
yyabortlab: |
| 1107 |
yyresult = 1; |
| 1108 |
goto yyreturn; |
| 1109 |
|
| 1110 |
#ifndef yyoverflow |
| 1111 |
/*----------------------------------------------. |
| 1112 |
| yyoverflowlab -- parser overflow comes here. | |
| 1113 |
`----------------------------------------------*/ |
| 1114 |
yyoverflowlab: |
| 1115 |
yyerror ("parser stack overflow"); |
| 1116 |
yyresult = 2; |
| 1117 |
/* Fall through. */ |
| 1118 |
#endif |
| 1119 |
|
| 1120 |
yyreturn: |
| 1121 |
#ifndef yyoverflow |
| 1122 |
if (yyss != yyssa) |
| 1123 |
YYSTACK_FREE (yyss); |
| 1124 |
#endif |
| 1125 |
return yyresult; |
| 1126 |
} |
| 1127 |
|
| 1128 |
|
| 1129 |
#line 5 "dangling" |
| 1130 |
|
| 1131 |
|