]> git.saurik.com Git - bison.git/blame - data/yacc.c
(MUSCLE_TAB_H_): Was misspelled as MUSCLE_TAB_H_.
[bison.git] / data / yacc.c
CommitLineData
007a50a4 1m4_divert(-1) -*- C -*-
fb8135fa 2m4_include([c.m4])
a8289c62 3
60491a94 4# Yacc compatible skeleton for Bison
12b0043a
AD
5# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002
6# Free Software Foundation, Inc.
60491a94
AD
7
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21# 02111-1307 USA
22
82b6cb3f
AD
23# b4_lhs_value([TYPE])
24# --------------------
25# Expansion of $<TYPE>$.
26m4_define([b4_lhs_value],
27[yyval[]m4_ifval([$1], [.$1])])
28
29
30# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
31# --------------------------------------
32# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
33# symbols on RHS.
34m4_define([b4_rhs_value],
35[yyvsp@<:@m4_eval([$2 - $1])@:>@m4_ifval([$3], [.$3])])
36
37
58612f1d
AD
38
39## ----------- ##
40## Locations. ##
41## ----------- ##
42
43# b4_location_if(IF-TRUE, IF-FALSE)
44# ---------------------------------
45# Expand IF-TRUE, if locations are used, IF-FALSE otherwise.
46m4_define([b4_location_if],
47[m4_if(b4_locations_flag, [1],
48 [$1],
49 [$2])])
50
51
82b6cb3f
AD
52# b4_lhs_location()
53# -----------------
54# Expansion of @$.
55m4_define([b4_lhs_location],
56[yyloc])
57
58
59# b4_rhs_location(RULE-LENGTH, NUM)
60# ---------------------------------
61# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
62# on RHS.
63m4_define([b4_rhs_location],
64[yylsp@<:@m4_eval([$2 - $1])@:>@])
65
66
58612f1d 67
74310291
AD
68## -------------- ##
69## %pure-parser. ##
70## -------------- ##
71
72# b4_pure_if(IF-TRUE, IF-FALSE)
73# -----------------------------
74# Expand IF-TRUE, if %pure-parser, IF-FALSE otherwise.
75m4_define([b4_pure_if],
76[m4_if(b4_pure, [1],
77 [$1],
78 [$2])])
79
80
58612f1d
AD
81## ------------------- ##
82## Output file names. ##
83## ------------------- ##
84
be2a1a68 85m4_define_default([b4_input_suffix], [.y])
2992e1e9 86
be2a1a68
AD
87m4_define_default([b4_output_parser_suffix],
88[m4_translit(b4_input_suffix, [yY], [cC])])
89
90m4_define_default([b4_output_parser_name],
91[b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
92
93
94m4_define_default([b4_output_header_suffix],
95[m4_translit(b4_input_suffix, [yY], [hH])])
96
97m4_define_default([b4_output_header_name],
98[b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
99
100m4_define_default([b4_header_guard],
101 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
102 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
103
0d8bed56 104
0d8bed56 105
1ae72863
AD
106## --------------------------------------------------------- ##
107## Defining symbol actions, e.g., printers and destructors. ##
108## --------------------------------------------------------- ##
109
110# b4_symbol_actions(FILENAME, LINENO,
111# SYMBOL-TAG, SYMBOL-NUM,
112# SYMBOL-ACTION, SYMBOL-TYPENAME)
113# -------------------------------------------------
114m4_define([b4_symbol_actions],
115[m4_pushdef([b4_dollar_dollar], [yyvalue.$6])dnl
116m4_pushdef([b4_at_dollar], [yylocation])dnl
117 case $4: /* $3 */
118#line $2 "$1"
119 $5;
120#line __oline__ "__ofile__"
121 break;
122m4_popdef([b4_at_dollar])dnl
123m4_popdef([b4_dollar_dollar])dnl
124])
125
126
127
be2a1a68
AD
128m4_divert(0)dnl
129#output "b4_output_parser_name"
fb8135fa
AD
130b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
131 [1984, 1989, 1990, 2000, 2001, 2002])
132
0252b55c
PE
133/* As a special exception, when this file is copied by Bison into a
134 Bison output file, you may use that output file without restriction.
135 This special exception was added by the Free Software Foundation
136 in version 1.24 of Bison. */
137
fb8135fa
AD
138/* Written by Richard Stallman by simplifying the original so called
139 ``semantic'' parser. */
444fbf65 140
cf44a9ae
PE
141/* All symbols defined below should begin with yy or YY, to avoid
142 infringing on user name space. This should be done even for local
143 variables, as they might otherwise be expanded by user macros.
144 There are some unavoidable exceptions within include files to
145 define necessary library symbols; they are noted "INFRINGES ON
146 USER NAME SPACE" below. */
147
7093d0f5
AD
148/* Identify Bison output. */
149#define YYBISON 1
fd51e5ff 150
7093d0f5 151/* Pure parsers. */
be2a1a68 152#define YYPURE b4_pure
7093d0f5
AD
153
154/* Using locations. */
be2a1a68 155#define YYLSP_NEEDED b4_locations_flag
7093d0f5 156
be2a1a68
AD
157m4_if(b4_prefix[], [yy], [],
158[/* If NAME_PREFIX is specified substitute the variables and functions
17da6427 159 names. */
be2a1a68
AD
160#define yyparse b4_prefix[]parse
161#define yylex b4_prefix[]lex
162#define yyerror b4_prefix[]error
163#define yylval b4_prefix[]lval
164#define yychar b4_prefix[]char
165#define yydebug b4_prefix[]debug
166#define yynerrs b4_prefix[]nerrs
58612f1d 167b4_location_if([#define yylloc b4_prefix[]lloc])])
17da6427 168
17acead5
PE
169b4_token_defines(b4_tokens)
170
0dd1580a
RA
171/* Copy the first part of user declarations. */
172b4_pre_prologue
cce71710 173
d99361e6
AD
174/* Enabling traces. */
175#ifndef YYDEBUG
be2a1a68 176# define YYDEBUG b4_debug
d99361e6
AD
177#endif
178
179/* Enabling verbose error messages. */
180#ifdef YYERROR_VERBOSE
181# undef YYERROR_VERBOSE
182# define YYERROR_VERBOSE 1
183#else
be2a1a68 184# define YYERROR_VERBOSE b4_error_verbose
d99361e6
AD
185#endif
186
fd51e5ff 187#ifndef YYSTYPE
e9955c83 188m4_ifdef([b4_stype],
642cb8f8 189[#line b4_stype_line "b4_filename"
e96c9728
AD
190typedef union b4_stype yystype;
191/* Line __line__ of __file__. */
192#line __oline__ "__ofile__"],
e9955c83 193[typedef int yystype;])
fd51e5ff 194# define YYSTYPE yystype
71cd15d4 195# define YYSTYPE_IS_TRIVIAL 1
fd51e5ff
AD
196#endif
197
198#ifndef YYLTYPE
199typedef struct yyltype
200{
201 int first_line;
202 int first_column;
203 int last_line;
204 int last_column;
205} yyltype;
be2a1a68 206# define YYLTYPE b4_ltype
71cd15d4 207# define YYLTYPE_IS_TRIVIAL 1
fd51e5ff
AD
208#endif
209
0dd1580a
RA
210/* Copy the second part of user declarations. */
211b4_post_prologue
212
be2a1a68 213/* Line __line__ of __file__. */
06446ccf 214#line __oline__ "__ofile__"
7093d0f5 215
cf44a9ae 216#if ! defined (yyoverflow) || YYERROR_VERBOSE
7093d0f5
AD
217
218/* The parser invokes alloca or malloc; define the necessary symbols. */
219
220# if YYSTACK_USE_ALLOCA
221# define YYSTACK_ALLOC alloca
7093d0f5
AD
222# else
223# ifndef YYSTACK_USE_ALLOCA
224# if defined (alloca) || defined (_ALLOCA_H)
225# define YYSTACK_ALLOC alloca
7093d0f5 226# else
0d8a7363 227# ifdef __GNUC__
7093d0f5
AD
228# define YYSTACK_ALLOC __builtin_alloca
229# endif
7093d0f5
AD
230# endif
231# endif
232# endif
233
234# ifdef YYSTACK_ALLOC
235 /* Pacify GCC's `empty if-body' warning. */
236# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
237# else
45119af1
PE
238# if defined (__STDC__) || defined (__cplusplus)
239# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
240# define YYSIZE_T size_t
7093d0f5 241# endif
45119af1
PE
242# define YYSTACK_ALLOC malloc
243# define YYSTACK_FREE free
7093d0f5 244# endif
cf44a9ae
PE
245#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
246
247
248#if (! defined (yyoverflow) \
249 && (! defined (__cplusplus) \
250 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
7093d0f5 251
600f9b0c
PE
252/* A type that is properly aligned for any stack member. */
253union yyalloc
254{
2729e106
PE
255 short yyss;
256 YYSTYPE yyvs;
58612f1d
AD
257 b4_location_if([ YYLTYPE yyls;
258])dnl
600f9b0c
PE
259};
260
261/* The size of the maximum gap between one aligned stack and the next. */
7093d0f5 262# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
600f9b0c
PE
263
264/* The size of an array large to enough to hold all stacks, each with
265 N elements. */
58612f1d
AD
266b4_location_if(
267[# define YYSTACK_BYTES(N) \
cf44a9ae 268 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
58612f1d
AD
269 + 2 * YYSTACK_GAP_MAX)],
270[# define YYSTACK_BYTES(N) \
cf44a9ae 271 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
58612f1d 272 + YYSTACK_GAP_MAX)])
600f9b0c 273
5b041382
PE
274/* Copy COUNT objects from FROM to TO. The source and destination do
275 not overlap. */
276# ifndef YYCOPY
277# if 1 < __GNUC__
278# define YYCOPY(To, From, Count) \
279 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
280# else
281# define YYCOPY(To, From, Count) \
282 do \
283 { \
284 register YYSIZE_T yyi; \
285 for (yyi = 0; yyi < (Count); yyi++) \
0c76a0c9 286 (To)[[yyi]] = (From)[[yyi]]; \
5b041382
PE
287 } \
288 while (0)
289# endif
290# endif
291
292/* Relocate STACK from its old location to the new one. The
7093d0f5 293 local variables YYSIZE and YYSTACKSIZE give the old and new number of
600f9b0c
PE
294 elements in the stack, and YYPTR gives the new location of the
295 stack. Advance YYPTR to a properly aligned location for the next
296 stack. */
5b041382 297# define YYSTACK_RELOCATE(Stack) \
7093d0f5
AD
298 do \
299 { \
300 YYSIZE_T yynewbytes; \
5b041382 301 YYCOPY (&yyptr->Stack, Stack, yysize); \
2729e106 302 Stack = &yyptr->Stack; \
5b041382 303 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
2729e106 304 yyptr += yynewbytes / sizeof (*yyptr); \
7093d0f5
AD
305 } \
306 while (0)
307
cf44a9ae 308#endif
8850be4b 309
768eb43f
PE
310#if defined (__STDC__) || defined (__cplusplus)
311 typedef signed char yysigned_char;
312#else
313 typedef short yysigned_char;
314#endif
315
7742ddeb 316/* YYFINAL -- State number of the termination state. */
7db2ed2d 317#define YYFINAL b4_final_state_number
be2a1a68 318#define YYLAST b4_last
7742ddeb
AD
319
320/* YYNTOKENS -- Number of terminals. */
7db2ed2d 321#define YYNTOKENS b4_tokens_number
7742ddeb 322/* YYNNTS -- Number of nonterminals. */
7db2ed2d 323#define YYNNTS b4_nterms_number
7742ddeb 324/* YYNRULES -- Number of rules. */
7db2ed2d 325#define YYNRULES b4_rules_number
7742ddeb 326/* YYNRULES -- Number of states. */
7db2ed2d 327#define YYNSTATES b4_states_number
7742ddeb
AD
328
329/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
007a50a4
AD
330#define YYUNDEFTOK b4_undef_token_number
331#define YYMAXUTOK b4_user_token_number_max
332
007a50a4
AD
333#define YYTRANSLATE(X) \
334 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[[X]] : YYUNDEFTOK)
a8289c62 335
be2a1a68 336/* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
a762e609 337static const b4_int_type_for([b4_translate]) yytranslate[[]] =
a8289c62 338{
be2a1a68 339 b4_translate
a8289c62
RA
340};
341
342#if YYDEBUG
be2a1a68 343/* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
7742ddeb 344 YYRHS. */
a762e609 345static const b4_int_type_for([b4_prhs]) yyprhs[[]] =
a8289c62 346{
be2a1a68 347 b4_prhs
a8289c62
RA
348};
349
3db472b9 350/* YYRHS -- A `-1'-separated list of the rules' RHS. */
a762e609 351static const b4_int_type_for([b4_rhs]) yyrhs[[]] =
a8289c62 352{
be2a1a68 353 b4_rhs
a8289c62
RA
354};
355
be2a1a68 356/* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
a762e609 357static const b4_int_type_for([b4_rline]) yyrline[[]] =
a8289c62 358{
be2a1a68 359 b4_rline
a8289c62
RA
360};
361#endif
362
5504898e 363#if YYDEBUG || YYERROR_VERBOSE
be2a1a68 364/* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
7742ddeb 365 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
be2a1a68 366static const char *const yytname[[]] =
a8289c62 367{
be2a1a68 368 b4_tname
a8289c62
RA
369};
370#endif
371
c0ad8bf3 372# ifdef YYPRINT
769b430f
AD
373/* YYTOKNUM[[YYLEX-NUM]] -- Internal token number corresponding to
374 token YYLEX-NUM. */
a762e609 375static const b4_int_type_for([b4_toknum]) yytoknum[[]] =
a8289c62 376{
be2a1a68 377 b4_toknum
a8289c62 378};
c0ad8bf3 379# endif
a8289c62 380
be2a1a68 381/* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
a762e609 382static const b4_int_type_for([b4_r1]) yyr1[[]] =
a8289c62 383{
be2a1a68 384 b4_r1
a8289c62
RA
385};
386
be2a1a68 387/* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
a762e609 388static const b4_int_type_for([b4_r2]) yyr2[[]] =
a8289c62 389{
be2a1a68 390 b4_r2
a8289c62
RA
391};
392
5504898e
AD
393/* YYDEFACT[[STATE-NAME]] -- Default rule to reduce with in state
394 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
395 means the default is an error. */
a762e609 396static const b4_int_type_for([b4_defact]) yydefact[[]] =
a8289c62 397{
be2a1a68 398 b4_defact
a8289c62
RA
399};
400
12b0043a 401/* YYDEFGOTO[[NTERM-NUM]]. */
a762e609 402static const b4_int_type_for([b4_defgoto]) yydefgoto[[]] =
a8289c62 403{
be2a1a68 404 b4_defgoto
a8289c62
RA
405};
406
be2a1a68 407/* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
7742ddeb 408 STATE-NUM. */
12b0043a 409#define YYPACT_NINF b4_pact_ninf
a762e609 410static const b4_int_type_for([b4_pact]) yypact[[]] =
a8289c62 411{
be2a1a68 412 b4_pact
a8289c62
RA
413};
414
be2a1a68 415/* YYPGOTO[[NTERM-NUM]]. */
a762e609 416static const b4_int_type_for([b4_pgoto]) yypgoto[[]] =
a8289c62 417{
be2a1a68 418 b4_pgoto
a8289c62
RA
419};
420
be2a1a68 421/* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
7742ddeb 422 positive, shift that token. If negative, reduce the rule which
f50adbbd
AD
423 number is the opposite. If zero, do what YYDEFACT says.
424 If YYTABLE_NINF, parse error. */
12b0043a 425#define YYTABLE_NINF b4_table_ninf
a762e609 426static const b4_int_type_for([b4_table]) yytable[[]] =
a8289c62 427{
be2a1a68 428 b4_table
a8289c62
RA
429};
430
a762e609 431static const b4_int_type_for([b4_check]) yycheck[[]] =
a8289c62 432{
be2a1a68 433 b4_check
a8289c62
RA
434};
435
5504898e
AD
436/* YYSTOS[[STATE-NUM]] -- The (internal number of the) accessing
437 symbol of state STATE-NUM. */
a762e609 438static const b4_int_type_for([b4_stos]) yystos[[]] =
5504898e
AD
439{
440 b4_stos
441};
7093d0f5
AD
442
443#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
444# define YYSIZE_T __SIZE_TYPE__
445#endif
446#if ! defined (YYSIZE_T) && defined (size_t)
447# define YYSIZE_T size_t
448#endif
b7575ffe 449#if ! defined (YYSIZE_T)
45119af1
PE
450# if defined (__STDC__) || defined (__cplusplus)
451# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
452# define YYSIZE_T size_t
b7575ffe 453# endif
7093d0f5
AD
454#endif
455#if ! defined (YYSIZE_T)
456# define YYSIZE_T unsigned int
457#endif
458
10fa2066 459#define yyerrok (yyerrstatus = 0)
17da6427 460#define yyclearin (yychar = YYEMPTY)
10fa2066
RS
461#define YYEMPTY -2
462#define YYEOF 0
a8289c62 463
70ddf897 464#define YYACCEPT goto yyacceptlab
a8289c62 465#define YYABORT goto yyabortlab
10fa2066 466#define YYERROR goto yyerrlab1
a8289c62 467
71da9eea
AD
468/* Like YYERROR except do call yyerror. This remains here temporarily
469 to ease the transition to the new meaning of YYERROR, for GCC.
10fa2066 470 Once GCC version 2 has supplanted version 1, this can go. */
a8289c62 471
10fa2066 472#define YYFAIL goto yyerrlab
a8289c62 473
10fa2066 474#define YYRECOVERING() (!!yyerrstatus)
a8289c62 475
69b4e0c5 476#define YYBACKUP(Token, Value) \
10fa2066 477do \
17da6427 478 if (yychar == YYEMPTY && yylen == 1) \
71da9eea 479 { \
17da6427 480 yychar = (Token); \
7742ddeb 481 yylval = (Value); \
17da6427 482 yychar1 = YYTRANSLATE (yychar); \
10fa2066
RS
483 YYPOPSTACK; \
484 goto yybackup; \
485 } \
486 else \
71da9eea 487 { \
7742ddeb 488 yyerror ("syntax error: cannot back up"); \
71da9eea
AD
489 YYERROR; \
490 } \
10fa2066
RS
491while (0)
492
493#define YYTERROR 1
494#define YYERRCODE 256
495
3abcd459 496/* YYLLOC_DEFAULT -- Compute the default location (before the actions
b2d52318 497 are run). */
3abcd459
AD
498
499#ifndef YYLLOC_DEFAULT
b2d52318
AD
500# define YYLLOC_DEFAULT(Current, Rhs, N) \
501 Current.first_line = Rhs[[1]].first_line; \
502 Current.first_column = Rhs[[1]].first_column; \
503 Current.last_line = Rhs[[N]].last_line; \
504 Current.last_column = Rhs[[N]].last_column;
3abcd459
AD
505#endif
506
3abcd459 507/* YYLEX -- calling `yylex' with the right arguments. */
553e2b22 508
74310291
AD
509b4_pure_if(
510[#ifdef YYLEX_PARAM
5c1180b3 511# define YYLEX yylex (&yylval[]b4_location_if([, &yylloc]), YYLEX_PARAM)
74310291 512#else
5c1180b3 513# define YYLEX yylex (&yylval[]b4_location_if([, &yylloc]))
74310291
AD
514#endif],
515[#define YYLEX yylex ()])
553e2b22 516
5a35a6cb 517/* Enable debugging if requested. */
0d533154 518#if YYDEBUG
b7575ffe
PE
519
520# ifndef YYFPRINTF
45119af1
PE
521# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
522# define YYFPRINTF fprintf
b7575ffe
PE
523# endif
524
5a35a6cb
AD
525# define YYDPRINTF(Args) \
526do { \
17da6427 527 if (yydebug) \
b7575ffe 528 YYFPRINTF Args; \
5a35a6cb 529} while (0)
253862fd
AD
530# define YYDSYMPRINT(Args) \
531do { \
532 if (yydebug) \
533 yysymprint Args; \
534} while (0)
cf44a9ae
PE
535/* Nonzero means print parse trace. It is left uninitialized so that
536 multiple parsers can coexist. */
17da6427 537int yydebug;
5a35a6cb
AD
538#else /* !YYDEBUG */
539# define YYDPRINTF(Args)
253862fd 540# define YYDSYMPRINT(Args)
5a35a6cb
AD
541#endif /* !YYDEBUG */
542
543/* YYINITDEPTH -- initial size of the parser's stacks. */
10fa2066 544#ifndef YYINITDEPTH
be2a1a68 545# define YYINITDEPTH b4_initdepth
10fa2066
RS
546#endif
547
5a35a6cb 548/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
600f9b0c
PE
549 if the built-in stack extension method is used).
550
551 Do not make this value too large; the results are undefined if
552 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
553 evaluated with infinite-precision integer arithmetic. */
554
10fa2066 555#if YYMAXDEPTH == 0
b07b484a 556# undef YYMAXDEPTH
10fa2066
RS
557#endif
558
559#ifndef YYMAXDEPTH
be2a1a68 560# define YYMAXDEPTH b4_maxdepth
10fa2066 561#endif
a8289c62 562
10fa2066 563\f
a8289c62 564
7093d0f5
AD
565#if YYERROR_VERBOSE
566
567# ifndef yystrlen
568# if defined (__GLIBC__) && defined (_STRING_H)
569# define yystrlen strlen
570# else
571/* Return the length of YYSTR. */
572static YYSIZE_T
573# if defined (__STDC__) || defined (__cplusplus)
574yystrlen (const char *yystr)
575# else
576yystrlen (yystr)
577 const char *yystr;
578# endif
579{
580 register const char *yys = yystr;
581
582 while (*yys++ != '\0')
583 continue;
584
585 return yys - yystr - 1;
586}
587# endif
588# endif
589
590# ifndef yystpcpy
591# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
592# define yystpcpy stpcpy
593# else
594/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
595 YYDEST. */
596static char *
f11966ff
PE
597# if defined (__STDC__) || defined (__cplusplus)
598yystpcpy (char *yydest, const char *yysrc)
599# else
7093d0f5
AD
600yystpcpy (yydest, yysrc)
601 char *yydest;
602 const char *yysrc;
7093d0f5
AD
603# endif
604{
605 register char *yyd = yydest;
606 register const char *yys = yysrc;
607
608 while ((*yyd++ = *yys++) != '\0')
609 continue;
610
611 return yyd - 1;
612}
613# endif
614# endif
615
616#endif /* !YYERROR_VERBOSE */
617
10fa2066 618\f
a8289c62 619
b8df3223
AD
620#if YYDEBUG
621/*-----------------------------.
622| Print this symbol on YYOUT. |
623`-----------------------------*/
624
4a2a22f4
AD
625b4_c_function([yysymprint],
626 [static void],
627 [[FILE*], [yyout]],
628 [[int], [yytype]],
629 [[YYSTYPE], [yyvalue]]b4_location_if([,
630 [[YYLTYPE], [yylocation]]]))
b8df3223
AD
631{
632 /* Pacify ``unused variable'' warnings. */
633 (void) yyvalue;
634b4_location_if([ (void) yylocation;
635])dnl
636
637 if (yytype < YYNTOKENS)
638 {
639 YYFPRINTF (yyout, "token %s (", yytname[[yytype]]);
640# ifdef YYPRINT
641 YYPRINT (yyout, yytoknum[[yytype]], yyvalue);
366eea36 642# endif
b8df3223
AD
643 }
644 else
645 YYFPRINTF (yyout, "nterm %s (", yytname[[yytype]]);
646
647 switch (yytype)
648 {
649m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
650 default:
651 break;
652 }
653 YYFPRINTF (yyout, ")");
654}
655#endif /* YYDEBUG. */
656
657
b8df3223
AD
658/*-----------------------------------------------.
659| Release the memory associated to this symbol. |
660`-----------------------------------------------*/
661
4a2a22f4
AD
662b4_c_function([yydestruct],
663 [static void],
664 [[int], [yytype]],
665 [[YYSTYPE], [yyvalue]]b4_location_if([,
666 [[YYLTYPE], [yylocation]]]))
b8df3223
AD
667{
668 /* Pacify ``unused variable'' warnings. */
669 (void) yyvalue;
670b4_location_if([ (void) yylocation;
671])dnl
672
673 switch (yytype)
674 {
675m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))dnl
676 default:
677 break;
678 }
679}
680
4a2a22f4
AD
681\f
682
683/* The user can define YYPARSE_PARAM as the name of an argument to be passed
684 into yyparse. The argument should have type void *.
685 It should actually point to an object.
686 Grammar actions can access the variable by casting it
687 to the proper pointer type. */
688
689#ifdef YYPARSE_PARAM
690# if defined (__STDC__) || defined (__cplusplus)
691# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
692# define YYPARSE_PARAM_DECL
693# else
694# define YYPARSE_PARAM_ARG YYPARSE_PARAM
695# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
696# endif
697#else /* !YYPARSE_PARAM */
698# define YYPARSE_PARAM_ARG
699# define YYPARSE_PARAM_DECL
700#endif /* !YYPARSE_PARAM */
701
702/* Prevent warning if -Wstrict-prototypes. */
703#ifdef __GNUC__
704# ifdef YYPARSE_PARAM
705int yyparse (void *);
706# else
707int yyparse (void);
708# endif
709#endif
1b181651 710
74310291
AD
711m4_divert_push([KILL])# ======================== M4 code.
712# b4_declare_parser_variables
713# ---------------------------
714# Declare the variables that are global, or local to YYPARSE if
715# pure-parser
716m4_define([b4_declare_parser_variables],
717[/* The lookahead symbol. */
718int yychar;
719
720/* The semantic value of the lookahead symbol. */
721YYSTYPE yylval;
722
723/* Number of parse errors so far. */
724int yynerrs;b4_location_if([
725/* Location data for the lookahead symbol. */
58612f1d 726YYLTYPE yylloc;])
74310291
AD
727])
728m4_divert_pop([KILL])dnl# ====================== End of M4 code.
58612f1d 729
74310291
AD
730b4_pure_if([],
731 [b4_declare_parser_variables])
a35f64ea 732
10fa2066 733int
17da6427 734yyparse (YYPARSE_PARAM_ARG)
b658bf92 735 YYPARSE_PARAM_DECL
be2a1a68 736{[
74310291 737 ]b4_pure_if([b4_declare_parser_variables])[
10fa2066
RS
738 register int yystate;
739 register int yyn;
600f9b0c 740 int yyresult;
b07b484a
AD
741 /* Number of tokens to shift before error messages enabled. */
742 int yyerrstatus;
743 /* Lookahead token as an internal (translated) token number. */
744 int yychar1 = 0;
10fa2066 745
bb10be54
AD
746 /* Three stacks and their tools:
747 `yyss': related to states,
e9e4c321 748 `yyvs': related to semantic values,
bb10be54
AD
749 `yyls': related to locations.
750
751 Refer to the stacks thru separate pointers, to allow yyoverflow
752 to reallocate them elsewhere. */
753
e8cb70b9 754 /* The state stack. */
b07b484a 755 short yyssa[YYINITDEPTH];
bb10be54
AD
756 short *yyss = yyssa;
757 register short *yyssp;
758
b07b484a
AD
759 /* The semantic value stack. */
760 YYSTYPE yyvsa[YYINITDEPTH];
b07b484a 761 YYSTYPE *yyvs = yyvsa;
bb10be54 762 register YYSTYPE *yyvsp;
10fa2066 763
58612f1d
AD
764]b4_location_if(
765[[ /* The location stack. */
b07b484a 766 YYLTYPE yylsa[YYINITDEPTH];
10fa2066 767 YYLTYPE *yyls = yylsa;
58612f1d 768 YYLTYPE *yylsp;]])[
10fa2066 769
58612f1d 770#define YYPOPSTACK (yyvsp--, yyssp--]b4_location_if([, yylsp--])[)
10fa2066 771
7093d0f5 772 YYSIZE_T yystacksize = YYINITDEPTH;
10fa2066 773
6666f98f
AD
774 /* The variables used to return semantic value and location from the
775 action routines. */
bb10be54 776 YYSTYPE yyval;
58612f1d 777]b4_location_if([ YYLTYPE yyloc;])[
10fa2066 778
6666f98f 779 /* When reducing, the number of symbols on the RHS of the reduced
e8cb70b9 780 rule. */
10fa2066
RS
781 int yylen;
782
7ea5e977 783 YYDPRINTF ((stderr, "Starting parse\n"));
10fa2066
RS
784
785 yystate = 0;
786 yyerrstatus = 0;
17da6427
PB
787 yynerrs = 0;
788 yychar = YYEMPTY; /* Cause a token to be read. */
10fa2066
RS
789
790 /* Initialize stack pointers.
791 Waste one element of value and location stack
792 so that they stay on the same level as the state stack.
793 The wasted elements are never initialized. */
794
cbd89906 795 yyssp = yyss;
10fa2066 796 yyvsp = yyvs;
58612f1d 797]b4_location_if([ yylsp = yyls;])[
cbd89906 798 goto yysetstate;
10fa2066 799
71da9eea
AD
800/*------------------------------------------------------------.
801| yynewstate -- Push a new state, which is found in yystate. |
802`------------------------------------------------------------*/
342b8b6e 803 yynewstate:
71da9eea
AD
804 /* In all cases, when you get here, the value and location stacks
805 have just been pushed. so pushing a state here evens the stacks.
806 */
cbd89906
PE
807 yyssp++;
808
342b8b6e 809 yysetstate:
cbd89906 810 *yyssp = yystate;
10fa2066
RS
811
812 if (yyssp >= yyss + yystacksize - 1)
813 {
10fa2066 814 /* Get the current used size of the three stacks, in elements. */
7093d0f5 815 YYSIZE_T yysize = yyssp - yyss + 1;
10fa2066
RS
816
817#ifdef yyoverflow
3d76b07d
AD
818 {
819 /* Give user a chance to reallocate the stack. Use copies of
820 these so that the &'s don't force the real ones into
821 memory. */
822 YYSTYPE *yyvs1 = yyvs;
823 short *yyss1 = yyss;
58612f1d 824]b4_location_if([ YYLTYPE *yyls1 = yyls;])[
3d76b07d
AD
825
826 /* Each stack pointer address is followed by the size of the
58612f1d
AD
827 data in use in that stack, in bytes. This used to be a
828 conditional around just the two extra args, but that might
829 be undefined if yyoverflow is a macro. */
3d76b07d 830 yyoverflow ("parser stack overflow",
7093d0f5
AD
831 &yyss1, yysize * sizeof (*yyssp),
832 &yyvs1, yysize * sizeof (*yyvsp),
58612f1d 833]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
3d76b07d 834 &yystacksize);
58612f1d 835]b4_location_if([ yyls = yyls1;])[
3d76b07d
AD
836 yyss = yyss1;
837 yyvs = yyvs1;
838 }
10fa2066 839#else /* no yyoverflow */
cf44a9ae
PE
840# ifndef YYSTACK_RELOCATE
841 goto yyoverflowlab;
842# else
10fa2066
RS
843 /* Extend the stack our own way. */
844 if (yystacksize >= YYMAXDEPTH)
600f9b0c 845 goto yyoverflowlab;
10fa2066
RS
846 yystacksize *= 2;
847 if (yystacksize > YYMAXDEPTH)
848 yystacksize = YYMAXDEPTH;
e9e4c321 849
600f9b0c
PE
850 {
851 short *yyss1 = yyss;
2729e106
PE
852 union yyalloc *yyptr =
853 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
600f9b0c
PE
854 if (! yyptr)
855 goto yyoverflowlab;
5b041382
PE
856 YYSTACK_RELOCATE (yyss);
857 YYSTACK_RELOCATE (yyvs);
58612f1d 858]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
cf44a9ae 859# undef YYSTACK_RELOCATE
600f9b0c
PE
860 if (yyss1 != yyssa)
861 YYSTACK_FREE (yyss1);
862 }
cf44a9ae 863# endif
10fa2066
RS
864#endif /* no yyoverflow */
865
7093d0f5
AD
866 yyssp = yyss + yysize - 1;
867 yyvsp = yyvs + yysize - 1;
58612f1d 868]b4_location_if([ yylsp = yyls + yysize - 1;])[
10fa2066 869
7ea5e977 870 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
600f9b0c 871 (unsigned long int) yystacksize));
10fa2066
RS
872
873 if (yyssp >= yyss + yystacksize - 1)
874 YYABORT;
875 }
876
7ea5e977 877 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
10fa2066
RS
878
879 goto yybackup;
71da9eea 880
71da9eea
AD
881/*-----------.
882| yybackup. |
883`-----------*/
884yybackup:
10fa2066
RS
885
886/* Do appropriate processing given the current state. */
887/* Read a lookahead token if we need one and don't already have one. */
888/* yyresume: */
889
890 /* First try to decide what to do without reference to lookahead token. */
891
892 yyn = yypact[yystate];
12b0043a 893 if (yyn == YYPACT_NINF)
10fa2066
RS
894 goto yydefault;
895
896 /* Not known => get a lookahead token if don't already have one. */
897
898 /* yychar is either YYEMPTY or YYEOF
899 or a valid token in external form. */
900
17da6427 901 if (yychar == YYEMPTY)
10fa2066 902 {
7ea5e977 903 YYDPRINTF ((stderr, "Reading a token: "));
17da6427 904 yychar = YYLEX;
10fa2066
RS
905 }
906
e8cb70b9 907 /* Convert token to internal form (in yychar1) for indexing tables with. */
10fa2066 908
17da6427 909 if (yychar <= 0) /* This means end of input. */
10fa2066
RS
910 {
911 yychar1 = 0;
17da6427 912 yychar = YYEOF; /* Don't call YYLEX any more. */
10fa2066 913
7ea5e977 914 YYDPRINTF ((stderr, "Now at end of input.\n"));
10fa2066
RS
915 }
916 else
917 {
17da6427 918 yychar1 = YYTRANSLATE (yychar);
10fa2066 919
253862fd
AD
920 /* We have to keep this `#if YYDEBUG', since we use variables
921 which are defined only if `YYDEBUG' is set. */
922 YYDPRINTF ((stderr, "Next token is "));
923 YYDSYMPRINT ((stderr, yychar1, yylval]b4_location_if([, yyloc])[));
924 YYDPRINTF ((stderr, "\n"));
10fa2066
RS
925 }
926
e5cfd9d8
PE
927 /* If the proper action on seeing token YYCHAR1 is to reduce or to
928 detect an error, take that action. */
10fa2066 929 yyn += yychar1;
12b0043a 930 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
e5cfd9d8
PE
931 goto yydefault;
932 yyn = yytable[yyn];
933 if (yyn <= 0)
10fa2066 934 {
e5cfd9d8
PE
935 if (yyn == 0 || yyn == YYTABLE_NINF)
936 goto yyerrlab;
10fa2066
RS
937 yyn = -yyn;
938 goto yyreduce;
939 }
10fa2066
RS
940
941 if (yyn == YYFINAL)
942 YYACCEPT;
943
944 /* Shift the lookahead token. */
7ea5e977 945 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
b7575ffe 946 yychar, yytname[yychar1]));
10fa2066
RS
947
948 /* Discard the token being shifted unless it is eof. */
17da6427
PB
949 if (yychar != YYEOF)
950 yychar = YYEMPTY;
10fa2066 951
17da6427 952 *++yyvsp = yylval;
58612f1d 953]b4_location_if([ *++yylsp = yylloc;])[
10fa2066 954
71da9eea
AD
955 /* Count tokens shifted since error; after three, turn off error
956 status. */
957 if (yyerrstatus)
958 yyerrstatus--;
10fa2066
RS
959
960 yystate = yyn;
961 goto yynewstate;
962
10fa2066 963
71da9eea
AD
964/*-----------------------------------------------------------.
965| yydefault -- do the default action for the current state. |
966`-----------------------------------------------------------*/
967yydefault:
10fa2066
RS
968 yyn = yydefact[yystate];
969 if (yyn == 0)
970 goto yyerrlab;
71da9eea 971 goto yyreduce;
10fa2066 972
71da9eea
AD
973
974/*-----------------------------.
975| yyreduce -- Do a reduction. |
976`-----------------------------*/
10fa2066 977yyreduce:
71da9eea 978 /* yyn is the number of a rule to reduce with. */
10fa2066 979 yylen = yyr2[yyn];
da9abf43
AD
980
981 /* If YYLEN is nonzero, implement the default value of the action:
573c1d9f 982 `$$ = $1'.
da9abf43 983
accea6db
PE
984 Otherwise, the following line sets YYVAL to garbage.
985 This behavior is undocumented and Bison
da9abf43
AD
986 users should not rely upon it. Assigning to YYVAL
987 unconditionally makes the parser a bit smaller, and it avoids a
988 GCC warning that YYVAL may be used uninitialized. */
989 yyval = yyvsp[1-yylen];
3abcd459 990
58612f1d
AD
991]b4_location_if(
992[ /* Default location. */
993 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);])[
10fa2066 994
0de741ca
AD
995#if YYDEBUG
996 /* We have to keep this `#if YYDEBUG', since we use variables which
997 are defined only if `YYDEBUG' is set. */
17da6427 998 if (yydebug)
10fa2066 999 {
7093d0f5 1000 int yyi;
10fa2066 1001
7ea5e977 1002 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
3db472b9 1003 yyn - 1, yyrline[yyn]);
10fa2066
RS
1004
1005 /* Print the symbols being reduced, and their result. */
3db472b9 1006 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
7ea5e977
AD
1007 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1008 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
10fa2066
RS
1009 }
1010#endif
a8289c62 1011 switch (yyn)
be2a1a68
AD
1012 ]{
1013 b4_actions
a8289c62 1014 }
897668ee 1015
be2a1a68 1016/* Line __line__ of __file__. */
06446ccf 1017#line __oline__ "__ofile__"
10fa2066 1018\f
be2a1a68 1019[ yyvsp -= yylen;
10fa2066 1020 yyssp -= yylen;
58612f1d 1021]b4_location_if([ yylsp -= yylen;])[
10fa2066 1022
5a35a6cb 1023#if YYDEBUG
17da6427 1024 if (yydebug)
10fa2066 1025 {
7093d0f5 1026 short *yyssp1 = yyss - 1;
7ea5e977 1027 YYFPRINTF (stderr, "state stack now");
7093d0f5 1028 while (yyssp1 != yyssp)
7ea5e977
AD
1029 YYFPRINTF (stderr, " %d", *++yyssp1);
1030 YYFPRINTF (stderr, "\n");
10fa2066 1031 }
5a35a6cb 1032#endif
10fa2066
RS
1033
1034 *++yyvsp = yyval;
58612f1d 1035]b4_location_if([ *++yylsp = yyloc;])[
10fa2066 1036
41aca2e0
AD
1037 /* Now `shift' the result of the reduction. Determine what state
1038 that goes to, based on the state we popped back to and the rule
1039 number reduced by. */
10fa2066
RS
1040
1041 yyn = yyr1[yyn];
1042
7742ddeb 1043 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
12b0043a 1044 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10fa2066
RS
1045 yystate = yytable[yystate];
1046 else
7742ddeb 1047 yystate = yydefgoto[yyn - YYNTOKENS];
10fa2066
RS
1048
1049 goto yynewstate;
1050
10fa2066 1051
71da9eea
AD
1052/*------------------------------------.
1053| yyerrlab -- here on detecting error |
1054`------------------------------------*/
1055yyerrlab:
1056 /* If not already recovering from an error, report this error. */
1057 if (!yyerrstatus)
10fa2066 1058 {
17da6427 1059 ++yynerrs;
df5aed8c
PE
1060#if YYERROR_VERBOSE
1061 yyn = yypact[yystate];
1062
1063 if (YYPACT_NINF < yyn && yyn < YYLAST)
1064 {
1065 YYSIZE_T yysize = 0;
1066 int yytype = YYTRANSLATE (yychar);
1067 char *yymsg;
1068 int yyx, yycount;
1069
1070 yycount = 0;
1071 /* Start YYX at -YYN if negative to avoid negative indexes in
1072 YYCHECK. */
1073 for (yyx = yyn < 0 ? -yyn : 0;
1074 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1075 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1076 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1077 yysize += yystrlen ("parse error, unexpected ") + 1;
1078 yysize += yystrlen (yytname[yytype]);
1079 yymsg = (char *) YYSTACK_ALLOC (yysize);
1080 if (yymsg != 0)
1081 {
1082 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1083 yyp = yystpcpy (yyp, yytname[yytype]);
1084
1085 if (yycount < 5)
1086 {
1087 yycount = 0;
1088 for (yyx = yyn < 0 ? -yyn : 0;
1089 yyx < (int) (sizeof (yytname) / sizeof (char *));
1090 yyx++)
1091 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1092 {
1093 const char *yyq = ! yycount ? ", expecting " : " or ";
1094 yyp = yystpcpy (yyp, yyq);
1095 yyp = yystpcpy (yyp, yytname[yyx]);
1096 yycount++;
1097 }
1098 }
1099 yyerror (yymsg);
1100 YYSTACK_FREE (yymsg);
1101 }
1102 else
1103 yyerror ("parse error; also virtual memory exhausted");
1104 }
1105 else
1106#endif /* YYERROR_VERBOSE */
1107 yyerror ("parse error");
10fa2066 1108 }
10fa2066 1109 goto yyerrlab1;
10fa2066 1110
71da9eea 1111
e8cb70b9
PB
1112/*----------------------------------------------------.
1113| yyerrlab1 -- error raised explicitly by an action. |
1114`----------------------------------------------------*/
71da9eea 1115yyerrlab1:
10fa2066
RS
1116 if (yyerrstatus == 3)
1117 {
71da9eea
AD
1118 /* If just tried and failed to reuse lookahead token after an
1119 error, discard it. */
10fa2066 1120
e8cb70b9 1121 /* Return failure if at end of input. */
17da6427 1122 if (yychar == YYEOF)
5719c109
AD
1123 {
1124 /* Pop the error token. */
1125 YYPOPSTACK;
1126 /* Pop the rest of the stack. */
1127 while (yyssp > yyss)
1128 {
253862fd
AD
1129 YYDPRINTF ((stderr, "Error: popping "));
1130 YYDSYMPRINT ((stderr,
1131 yystos[*yyssp],
1132 *yyvsp]b4_location_if([, *yylsp])[));
1133 YYDPRINTF ((stderr, "\n"));
87542d29 1134 yydestruct (yystos[*yyssp], *yyvsp]b4_location_if([, *yylsp])[);
5719c109
AD
1135 YYPOPSTACK;
1136 }
1137 YYABORT;
1138 }
1139
7ea5e977 1140 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
17da6427 1141 yychar, yytname[yychar1]));
87542d29 1142 yydestruct (yychar1, yylval]b4_location_if([, yylloc])[);
17da6427 1143 yychar = YYEMPTY;
10fa2066
RS
1144 }
1145
71da9eea
AD
1146 /* Else will try to reuse lookahead token after shifting the error
1147 token. */
10fa2066 1148
cf44a9ae 1149 yyerrstatus = 3; /* Each real token shifted decrements this. */
10fa2066 1150
660bc8dd
PE
1151 for (;;)
1152 {
1153 yyn = yypact[yystate];
12b0043a 1154 if (yyn != YYPACT_NINF)
660bc8dd
PE
1155 {
1156 yyn += YYTERROR;
1157 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1158 {
1159 yyn = yytable[yyn];
1160 if (0 < yyn)
1161 break;
1162 }
1163 }
10fa2066 1164
660bc8dd
PE
1165 /* Pop the current state because it cannot handle the error token. */
1166 if (yyssp == yyss)
1167 YYABORT;
5504898e 1168
253862fd
AD
1169 YYDPRINTF ((stderr, "Error: popping "));
1170 YYDSYMPRINT ((stderr,
1171 yystos[*yyssp], *yyvsp]b4_location_if([, *yylsp])[));
1172 YYDPRINTF ((stderr, "\n"));
5504898e 1173
87542d29 1174 yydestruct (yystos[yystate], *yyvsp]b4_location_if([, *yylsp])[);
660bc8dd
PE
1175 yyvsp--;
1176 yystate = *--yyssp;
58612f1d 1177]b4_location_if([ yylsp--;])[
10fa2066 1178
5a35a6cb 1179#if YYDEBUG
660bc8dd
PE
1180 if (yydebug)
1181 {
1182 short *yyssp1 = yyss - 1;
1183 YYFPRINTF (stderr, "Error: state stack now");
1184 while (yyssp1 != yyssp)
1185 YYFPRINTF (stderr, " %d", *++yyssp1);
1186 YYFPRINTF (stderr, "\n");
1187 }
5a35a6cb 1188#endif
10fa2066 1189 }
10fa2066
RS
1190
1191 if (yyn == YYFINAL)
1192 YYACCEPT;
1193
7ea5e977 1194 YYDPRINTF ((stderr, "Shifting error token, "));
10fa2066 1195
17da6427 1196 *++yyvsp = yylval;
58612f1d 1197]b4_location_if([ *++yylsp = yylloc;])[
10fa2066
RS
1198
1199 yystate = yyn;
1200 goto yynewstate;
70ddf897 1201
71da9eea
AD
1202
1203/*-------------------------------------.
1204| yyacceptlab -- YYACCEPT comes here. |
1205`-------------------------------------*/
1206yyacceptlab:
600f9b0c
PE
1207 yyresult = 0;
1208 goto yyreturn;
71da9eea
AD
1209
1210/*-----------------------------------.
1211| yyabortlab -- YYABORT comes here. |
1212`-----------------------------------*/
1213yyabortlab:
600f9b0c
PE
1214 yyresult = 1;
1215 goto yyreturn;
1216
0bfb02ff 1217#ifndef yyoverflow
ca98bf57
AD
1218/*----------------------------------------------.
1219| yyoverflowlab -- parser overflow comes here. |
1220`----------------------------------------------*/
600f9b0c
PE
1221yyoverflowlab:
1222 yyerror ("parser stack overflow");
1223 yyresult = 2;
1224 /* Fall through. */
0bfb02ff 1225#endif
600f9b0c
PE
1226
1227yyreturn:
1228#ifndef yyoverflow
1229 if (yyss != yyssa)
1230 YYSTACK_FREE (yyss);
70ddf897 1231#endif
600f9b0c 1232 return yyresult;
be2a1a68
AD
1233]}
1234
24c0aad7 1235
be2a1a68
AD
1236b4_epilogue
1237m4_if(b4_defines_flag, 0, [],
c76e14da
AD
1238[#output "b4_output_header_name"
1239b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
0252b55c
PE
1240 [1984, 1989, 1990, 2000, 2001, 2002])
1241
1242/* As a special exception, when this file is copied by Bison into a
1243 Bison output file, you may use that output file without restriction.
1244 This special exception was added by the Free Software Foundation
1245 in version 1.24 of Bison. */
c76e14da 1246
be2a1a68
AD
1247#ifndef b4_header_guard
1248# define b4_header_guard
1249
0d8bed56 1250b4_token_defines(b4_tokens)
be2a1a68
AD
1251
1252#ifndef YYSTYPE
e9955c83 1253m4_ifdef([b4_stype],
642cb8f8 1254[#line b4_stype_line "b4_filename"
e96c9728
AD
1255typedef union b4_stype yystype;
1256/* Line __line__ of __file__. */
1257#line __oline__ "__ofile__"],
e9955c83 1258[typedef int yystype;])
be2a1a68
AD
1259# define YYSTYPE yystype
1260#endif
1261
74310291 1262b4_pure_if([],
be2a1a68
AD
1263[extern YYSTYPE b4_prefix[]lval;])
1264
58612f1d 1265b4_location_if(
be2a1a68
AD
1266[#ifndef YYLTYPE
1267typedef struct yyltype
1268{
1269 int first_line;
1270 int first_column;
1271 int last_line;
1272 int last_column;
1273} yyltype;
1274# define YYLTYPE yyltype
1275#endif
ff48177d 1276
be2a1a68
AD
1277m4_if(b4_pure, [0],
1278[extern YYLTYPE b4_prefix[]lloc;])
1279])
1280#endif /* not b4_header_guard */
1281])