2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
68 /* Copy the first part of user declarations. */
70 /* Line 189 of yacc.c */
73 /* Copyright (c) 1990 The Regents of the University of California. */
74 /* All rights reserved. */
76 /* This code is derived from software contributed to Berkeley by */
79 /* The United States Government has rights in this work pursuant */
80 /* to contract no. DE-AC03-76SF00098 between the United States */
81 /* Department of Energy and the University of California. */
83 /* This file is part of flex. */
85 /* Redistribution and use in source and binary forms, with or without */
86 /* modification, are permitted provided that the following conditions */
89 /* 1. Redistributions of source code must retain the above copyright */
90 /* notice, this list of conditions and the following disclaimer. */
91 /* 2. Redistributions in binary form must reproduce the above copyright */
92 /* notice, this list of conditions and the following disclaimer in the */
93 /* documentation and/or other materials provided with the distribution. */
95 /* Neither the name of the University nor the names of its contributors */
96 /* may be used to endorse or promote products derived from this software */
97 /* without specific prior written permission. */
99 /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
100 /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
101 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
107 int pat
, scnum
, eps
, headcnt
, trailcnt
, lastchar
, i
, rulelen
;
108 int trlcontxt
, xcluflg
, currccl
, cclsorted
, varlength
, variable_trail_rule
;
113 static int madeany
= false; /* whether we've made the '.' character class */
114 static int ccldot
, cclany
;
115 int previous_continued_action
; /* whether the previous rule's action was '|' */
117 #define format_warn3(fmt, a1, a2) \
119 char fw3_msg[MAXLINE];\
120 snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
124 /* Expand a POSIX character class expression. */
125 #define CCL_EXPR(func) \
128 for ( c = 0; c < csize; ++c ) \
129 if ( isascii(c) && func(c) ) \
130 ccladd( currccl, c ); \
134 #define CCL_NEG_EXPR(func) \
137 for ( c = 0; c < csize; ++c ) \
139 ccladd( currccl, c ); \
142 /* While POSIX defines isblank(), it's not ANSI C. */
143 #define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
145 /* On some over-ambitious machines, such as DEC Alpha's, the default
146 * token type is "long" instead of "int"; this leads to problems with
147 * declaring yylval in flexdef.h. But so far, all the yacc's I've seen
148 * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
149 * following should ensure that the default token type is "int".
155 /* Line 189 of yacc.c */
158 /* Enabling traces. */
163 /* Enabling verbose error messages. */
164 #ifdef YYERROR_VERBOSE
165 # undef YYERROR_VERBOSE
166 # define YYERROR_VERBOSE 1
168 # define YYERROR_VERBOSE 0
171 /* Enabling the token table. */
172 #ifndef YYTOKEN_TABLE
173 # define YYTOKEN_TABLE 0
180 /* Put the tokens into the symbol table, so that GDB and other debuggers
196 OPT_EXTRA_TYPE
= 271,
221 CCE_NEG_XDIGIT
= 296,
224 BEGIN_REPEAT_POSIX
= 299,
225 END_REPEAT_POSIX
= 300,
226 BEGIN_REPEAT_FLEX
= 301,
227 END_REPEAT_FLEX
= 302
239 #define OPTION_OP 266
240 #define OPT_OUTFILE 267
241 #define OPT_PREFIX 268
242 #define OPT_YYCLASS 269
243 #define OPT_HEADER 270
244 #define OPT_EXTRA_TYPE 271
245 #define OPT_TABLES 272
246 #define CCE_ALNUM 273
247 #define CCE_ALPHA 274
248 #define CCE_BLANK 275
249 #define CCE_CNTRL 276
250 #define CCE_DIGIT 277
251 #define CCE_GRAPH 278
252 #define CCE_LOWER 279
253 #define CCE_PRINT 280
254 #define CCE_PUNCT 281
255 #define CCE_SPACE 282
256 #define CCE_UPPER 283
257 #define CCE_XDIGIT 284
258 #define CCE_NEG_ALNUM 285
259 #define CCE_NEG_ALPHA 286
260 #define CCE_NEG_BLANK 287
261 #define CCE_NEG_CNTRL 288
262 #define CCE_NEG_DIGIT 289
263 #define CCE_NEG_GRAPH 290
264 #define CCE_NEG_LOWER 291
265 #define CCE_NEG_PRINT 292
266 #define CCE_NEG_PUNCT 293
267 #define CCE_NEG_SPACE 294
268 #define CCE_NEG_UPPER 295
269 #define CCE_NEG_XDIGIT 296
270 #define CCL_OP_UNION 297
271 #define CCL_OP_DIFF 298
272 #define BEGIN_REPEAT_POSIX 299
273 #define END_REPEAT_POSIX 300
274 #define BEGIN_REPEAT_FLEX 301
275 #define END_REPEAT_FLEX 302
280 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
282 # define YYSTYPE_IS_TRIVIAL 1
283 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
284 # define YYSTYPE_IS_DECLARED 1
288 /* Copy the second part of user declarations. */
291 /* Line 264 of yacc.c */
299 typedef YYTYPE_UINT8 yytype_uint8
;
301 typedef unsigned char yytype_uint8
;
305 typedef YYTYPE_INT8 yytype_int8
;
306 #elif (defined __STDC__ || defined __C99__FUNC__ \
307 || defined __cplusplus || defined _MSC_VER)
308 typedef signed char yytype_int8
;
310 typedef short int yytype_int8
;
314 typedef YYTYPE_UINT16 yytype_uint16
;
316 typedef unsigned short int yytype_uint16
;
320 typedef YYTYPE_INT16 yytype_int16
;
322 typedef short int yytype_int16
;
326 # ifdef __SIZE_TYPE__
327 # define YYSIZE_T __SIZE_TYPE__
328 # elif defined size_t
329 # define YYSIZE_T size_t
330 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
331 || defined __cplusplus || defined _MSC_VER)
332 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
333 # define YYSIZE_T size_t
335 # define YYSIZE_T unsigned int
339 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
344 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
345 # define YY_(msgid) dgettext ("bison-runtime", msgid)
349 # define YY_(msgid) msgid
353 /* Suppress unused-variable warnings by "using" E. */
354 #if ! defined lint || defined __GNUC__
355 # define YYUSE(e) ((void) (e))
357 # define YYUSE(e) /* empty */
360 /* Identity function, used to suppress warnings about constant conditions. */
364 #if (defined __STDC__ || defined __C99__FUNC__ \
365 || defined __cplusplus || defined _MSC_VER)
378 #if ! defined yyoverflow || YYERROR_VERBOSE
380 /* The parser invokes alloca or malloc; define the necessary symbols. */
382 # ifdef YYSTACK_USE_ALLOCA
383 # if YYSTACK_USE_ALLOCA
385 # define YYSTACK_ALLOC __builtin_alloca
386 # elif defined __BUILTIN_VA_ARG_INCR
387 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
389 # define YYSTACK_ALLOC __alloca
390 # elif defined _MSC_VER
391 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
392 # define alloca _alloca
394 # define YYSTACK_ALLOC alloca
395 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
396 || defined __cplusplus || defined _MSC_VER)
397 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
406 # ifdef YYSTACK_ALLOC
407 /* Pacify GCC's `empty if-body' warning. */
408 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
409 # ifndef YYSTACK_ALLOC_MAXIMUM
410 /* The OS might guarantee only one guard page at the bottom of the stack,
411 and a page size can be as small as 4096 bytes. So we cannot safely
412 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
413 to allow for a few compiler-allocated temporary stack slots. */
414 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
417 # define YYSTACK_ALLOC YYMALLOC
418 # define YYSTACK_FREE YYFREE
419 # ifndef YYSTACK_ALLOC_MAXIMUM
420 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
422 # if (defined __cplusplus && ! defined _STDLIB_H \
423 && ! ((defined YYMALLOC || defined malloc) \
424 && (defined YYFREE || defined free)))
425 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
431 # define YYMALLOC malloc
432 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
433 || defined __cplusplus || defined _MSC_VER)
434 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
439 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
440 || defined __cplusplus || defined _MSC_VER)
441 void free (void *); /* INFRINGES ON USER NAME SPACE */
445 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
448 #if (! defined yyoverflow \
449 && (! defined __cplusplus \
450 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
452 /* A type that is properly aligned for any stack member. */
455 yytype_int16 yyss_alloc
;
459 /* The size of the maximum gap between one aligned stack and the next. */
460 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
462 /* The size of an array large to enough to hold all stacks, each with
464 # define YYSTACK_BYTES(N) \
465 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
466 + YYSTACK_GAP_MAXIMUM)
468 /* Copy COUNT objects from FROM to TO. The source and destination do
471 # if defined __GNUC__ && 1 < __GNUC__
472 # define YYCOPY(To, From, Count) \
473 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
475 # define YYCOPY(To, From, Count) \
479 for (yyi = 0; yyi < (Count); yyi++) \
480 (To)[yyi] = (From)[yyi]; \
486 /* Relocate STACK from its old location to the new one. The
487 local variables YYSIZE and YYSTACKSIZE give the old and new number of
488 elements in the stack, and YYPTR gives the new location of the
489 stack. Advance YYPTR to a properly aligned location for the next
491 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
494 YYSIZE_T yynewbytes; \
495 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
496 Stack = &yyptr->Stack_alloc; \
497 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
498 yyptr += yynewbytes / sizeof (*yyptr); \
504 /* YYFINAL -- State number of the termination state. */
506 /* YYLAST -- Last index in YYTABLE. */
509 /* YYNTOKENS -- Number of terminals. */
511 /* YYNNTS -- Number of nonterminals. */
513 /* YYNRULES -- Number of rules. */
515 /* YYNRULES -- Number of states. */
516 #define YYNSTATES 140
518 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
520 #define YYMAXUTOK 302
522 #define YYTRANSLATE(YYX) \
523 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
525 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
526 static const yytype_uint8 yytranslate
[] =
528 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 49, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 63, 2, 57, 2, 2, 2,
532 64, 65, 55, 60, 56, 68, 62, 59, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 53, 48, 54, 61, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 66, 2, 67, 52, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 50, 58, 51, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
554 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
555 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
556 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
557 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
562 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
564 static const yytype_uint16 yyprhs
[] =
566 0, 0, 3, 9, 10, 14, 17, 18, 20, 22,
567 24, 26, 29, 31, 33, 36, 39, 40, 44, 48,
568 52, 56, 60, 64, 70, 76, 77, 78, 81, 83,
569 85, 87, 88, 93, 97, 98, 102, 104, 106, 108,
570 111, 115, 118, 120, 124, 126, 129, 132, 134, 141,
571 147, 152, 155, 158, 161, 168, 174, 179, 181, 183,
572 185, 189, 193, 195, 199, 203, 205, 209, 214, 219,
573 222, 225, 226, 228, 230, 232, 234, 236, 238, 240,
574 242, 244, 246, 248, 250, 252, 254, 256, 258, 260,
575 262, 264, 266, 268, 270, 272, 274, 277
578 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
579 static const yytype_int8 yyrhs
[] =
581 70, 0, -1, 71, 72, 73, 79, 80, -1, -1,
582 72, 74, 75, -1, 72, 76, -1, -1, 1, -1,
583 5, -1, 6, -1, 7, -1, 75, 8, -1, 8,
584 -1, 1, -1, 11, 77, -1, 77, 78, -1, -1,
585 12, 48, 8, -1, 16, 48, 8, -1, 13, 48,
586 8, -1, 14, 48, 8, -1, 15, 48, 8, -1,
587 17, 48, 8, -1, 79, 83, 80, 81, 49, -1,
588 79, 83, 50, 79, 51, -1, -1, -1, 52, 86,
589 -1, 86, -1, 10, -1, 1, -1, -1, 53, 82,
590 84, 54, -1, 53, 55, 54, -1, -1, 84, 56,
591 85, -1, 85, -1, 1, -1, 8, -1, 88, 87,
592 -1, 88, 87, 57, -1, 87, 57, -1, 87, -1,
593 87, 58, 89, -1, 89, -1, 87, 59, -1, 89,
594 90, -1, 90, -1, 89, 44, 4, 56, 4, 45,
595 -1, 89, 44, 4, 56, 45, -1, 89, 44, 4,
596 45, -1, 90, 55, -1, 90, 60, -1, 90, 61,
597 -1, 90, 46, 4, 56, 4, 47, -1, 90, 46,
598 4, 56, 47, -1, 90, 46, 4, 47, -1, 62,
599 -1, 91, -1, 9, -1, 63, 95, 63, -1, 64,
600 87, 65, -1, 3, -1, 91, 43, 92, -1, 91,
601 42, 92, -1, 92, -1, 66, 93, 67, -1, 66,
602 52, 93, 67, -1, 93, 3, 68, 3, -1, 93,
603 3, -1, 93, 94, -1, -1, 18, -1, 19, -1,
604 20, -1, 21, -1, 22, -1, 23, -1, 24, -1,
605 25, -1, 26, -1, 27, -1, 29, -1, 28, -1,
606 30, -1, 31, -1, 32, -1, 33, -1, 34, -1,
607 35, -1, 37, -1, 38, -1, 39, -1, 41, -1,
608 36, -1, 40, -1, 95, 3, -1, -1
611 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
612 static const yytype_uint16 yyrline
[] =
614 0, 118, 118, 148, 155, 156, 157, 158, 162, 170,
615 173, 177, 180, 183, 187, 190, 191, 194, 199, 201,
616 203, 205, 207, 211, 213, 215, 219, 231, 267, 291,
617 314, 319, 322, 325, 343, 346, 348, 350, 354, 377,
618 433, 436, 479, 497, 503, 508, 535, 543, 546, 574,
619 588, 610, 617, 623, 629, 657, 671, 690, 724, 742,
620 752, 755, 758, 773, 774, 775, 780, 782, 789, 849,
621 867, 875, 883, 884, 885, 886, 887, 888, 889, 894,
622 895, 896, 897, 898, 904, 905, 906, 907, 908, 909,
623 910, 911, 912, 913, 914, 920, 928, 944
627 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
628 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
629 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
630 static const char *const yytname
[] =
632 "$end", "error", "$undefined", "CHAR", "NUMBER", "SECTEND", "SCDECL",
633 "XSCDECL", "NAME", "PREVCCL", "EOF_OP", "OPTION_OP", "OPT_OUTFILE",
634 "OPT_PREFIX", "OPT_YYCLASS", "OPT_HEADER", "OPT_EXTRA_TYPE",
635 "OPT_TABLES", "CCE_ALNUM", "CCE_ALPHA", "CCE_BLANK", "CCE_CNTRL",
636 "CCE_DIGIT", "CCE_GRAPH", "CCE_LOWER", "CCE_PRINT", "CCE_PUNCT",
637 "CCE_SPACE", "CCE_UPPER", "CCE_XDIGIT", "CCE_NEG_ALNUM", "CCE_NEG_ALPHA",
638 "CCE_NEG_BLANK", "CCE_NEG_CNTRL", "CCE_NEG_DIGIT", "CCE_NEG_GRAPH",
639 "CCE_NEG_LOWER", "CCE_NEG_PRINT", "CCE_NEG_PUNCT", "CCE_NEG_SPACE",
640 "CCE_NEG_UPPER", "CCE_NEG_XDIGIT", "CCL_OP_UNION", "CCL_OP_DIFF",
641 "BEGIN_REPEAT_POSIX", "END_REPEAT_POSIX", "BEGIN_REPEAT_FLEX",
642 "END_REPEAT_FLEX", "'='", "'\\n'", "'{'", "'}'", "'^'", "'<'", "'>'",
643 "'*'", "','", "'$'", "'|'", "'/'", "'+'", "'?'", "'.'", "'\"'", "'('",
644 "')'", "'['", "']'", "'-'", "$accept", "goal", "initlex", "sect1",
645 "sect1end", "startconddecl", "namelist1", "options", "optionlist",
646 "option", "sect2", "initforrule", "flexrule", "scon_stk_ptr", "scon",
647 "namelist2", "sconname", "rule", "re", "re2", "series", "singleton",
648 "fullccl", "braceccl", "ccl", "ccl_expr", "string", 0
653 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
655 static const yytype_uint16 yytoknum
[] =
657 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
658 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
659 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
660 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
661 295, 296, 297, 298, 299, 300, 301, 302, 61, 10,
662 123, 125, 94, 60, 62, 42, 44, 36, 124, 47,
663 43, 63, 46, 34, 40, 41, 91, 93, 45
667 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
668 static const yytype_uint8 yyr1
[] =
670 0, 69, 70, 71, 72, 72, 72, 72, 73, 74,
671 74, 75, 75, 75, 76, 77, 77, 78, 78, 78,
672 78, 78, 78, 79, 79, 79, 80, 81, 81, 81,
673 81, 82, 83, 83, 83, 84, 84, 84, 85, 86,
674 86, 86, 86, 87, 87, 88, 89, 89, 89, 89,
675 89, 90, 90, 90, 90, 90, 90, 90, 90, 90,
676 90, 90, 90, 91, 91, 91, 92, 92, 93, 93,
677 93, 93, 94, 94, 94, 94, 94, 94, 94, 94,
678 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
679 94, 94, 94, 94, 94, 94, 95, 95
682 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
683 static const yytype_uint8 yyr2
[] =
685 0, 2, 5, 0, 3, 2, 0, 1, 1, 1,
686 1, 2, 1, 1, 2, 2, 0, 3, 3, 3,
687 3, 3, 3, 5, 5, 0, 0, 2, 1, 1,
688 1, 0, 4, 3, 0, 3, 1, 1, 1, 2,
689 3, 2, 1, 3, 1, 2, 2, 1, 6, 5,
690 4, 2, 2, 2, 6, 5, 4, 1, 1, 1,
691 3, 3, 1, 3, 3, 1, 3, 4, 4, 2,
692 2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
693 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 1, 1, 1, 2, 0
697 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
698 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
699 means the default is an error. */
700 static const yytype_uint8 yydefact
[] =
702 3, 0, 0, 1, 7, 0, 8, 9, 10, 16,
703 25, 0, 5, 14, 34, 13, 12, 4, 0, 0,
704 0, 0, 0, 0, 15, 31, 2, 26, 11, 0,
705 0, 0, 0, 0, 0, 0, 0, 25, 0, 17,
706 19, 20, 21, 18, 22, 33, 37, 38, 0, 36,
707 34, 30, 62, 59, 29, 0, 57, 97, 0, 71,
708 0, 28, 42, 0, 44, 47, 58, 65, 32, 0,
709 24, 27, 0, 0, 71, 0, 23, 41, 0, 45,
710 39, 0, 46, 0, 51, 52, 53, 0, 0, 35,
711 96, 60, 61, 0, 69, 72, 73, 74, 75, 76,
712 77, 78, 79, 80, 81, 83, 82, 84, 85, 86,
713 87, 88, 89, 94, 90, 91, 92, 95, 93, 66,
714 70, 43, 40, 0, 0, 64, 63, 67, 0, 50,
715 0, 56, 0, 68, 0, 49, 0, 55, 48, 54
718 /* YYDEFGOTO[NTERM-NUM]. */
719 static const yytype_int8 yydefgoto
[] =
721 -1, 1, 2, 5, 10, 11, 17, 12, 13, 24,
722 14, 26, 60, 36, 27, 48, 49, 61, 62, 63,
723 64, 65, 66, 67, 75, 120, 72
726 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
728 #define YYPACT_NINF -52
729 static const yytype_int16 yypact
[] =
731 -52, 17, 103, -52, -52, 113, -52, -52, -52, -52,
732 -52, 48, -52, 114, 6, -52, -52, 42, 7, 12,
733 58, 77, 88, 89, -52, 43, -52, 73, -52, 130,
734 131, 132, 133, 134, 135, 90, 91, -52, -1, -52,
735 -52, -52, -52, -52, -52, -52, -52, -52, 40, -52,
736 44, -52, -52, -52, -52, 39, -52, -52, 39, 93,
737 97, -52, -12, 39, 49, 61, -31, -52, -52, 139,
738 -52, -52, 1, -51, -52, 0, -52, -52, 39, -52,
739 75, 144, 61, 145, -52, -52, -52, 84, 84, -52,
740 -52, -52, -52, 50, 83, -52, -52, -52, -52, -52,
741 -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
742 -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
743 -52, 49, -52, -40, 10, -52, -52, -52, 149, -52,
744 9, -52, -3, -52, 108, -52, 107, -52, -52, -52
747 /* YYPGOTO[NTERM-NUM]. */
748 static const yytype_int16 yypgoto
[] =
750 -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
751 118, 129, -52, -52, -52, -52, 92, 102, -48, -52,
752 80, -21, -52, 47, 85, -52, -52
755 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
756 positive, shift that token. If negative, reduce the rule which
757 number is the opposite. If zero, do what YYDEFACT says.
758 If YYTABLE_NINF, syntax error. */
759 #define YYTABLE_NINF -27
760 static const yytype_int16 yytable
[] =
762 51, 136, 52, 94, 90, 129, -26, 78, 53, 54,
763 73, 87, 88, 134, 92, 80, 130, 3, 95, 96,
764 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
765 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
766 117, 118, 52, 82, 137, 77, 78, 79, 53, 15,
767 28, 55, 52, 94, 135, 29, 16, 131, 53, 25,
768 30, 56, 57, 58, 91, 59, 132, 119, 95, 96,
769 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
770 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
771 117, 118, 46, 81, 68, 70, 69, 25, 35, 47,
772 82, 56, 57, 58, 4, 59, 31, 83, -6, -6,
773 -6, 56, 57, 58, -6, 59, 84, 127, 6, 7,
774 8, 85, 86, 37, 9, 32, 18, 19, 20, 21,
775 22, 23, 122, 78, 125, 126, 33, 34, 39, 40,
776 41, 42, 43, 44, 45, 74, 76, 47, 123, 124,
777 59, 128, 133, 138, 139, 50, 38, 71, 121, 93,
781 static const yytype_int8 yycheck
[] =
783 1, 4, 3, 3, 3, 45, 0, 58, 9, 10,
784 58, 42, 43, 4, 65, 63, 56, 0, 18, 19,
785 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
786 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
787 40, 41, 3, 64, 47, 57, 58, 59, 9, 1,
788 8, 52, 3, 3, 45, 48, 8, 47, 9, 53,
789 48, 62, 63, 64, 63, 66, 56, 67, 18, 19,
790 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
791 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
792 40, 41, 1, 44, 54, 51, 56, 53, 55, 8,
793 121, 62, 63, 64, 1, 66, 48, 46, 5, 6,
794 7, 62, 63, 64, 11, 66, 55, 67, 5, 6,
795 7, 60, 61, 50, 11, 48, 12, 13, 14, 15,
796 16, 17, 57, 58, 87, 88, 48, 48, 8, 8,
797 8, 8, 8, 8, 54, 52, 49, 8, 4, 4,
798 66, 68, 3, 45, 47, 37, 27, 55, 78, 74,
802 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
803 symbol of state STATE-NUM. */
804 static const yytype_uint8 yystos
[] =
806 0, 70, 71, 0, 1, 72, 5, 6, 7, 11,
807 73, 74, 76, 77, 79, 1, 8, 75, 12, 13,
808 14, 15, 16, 17, 78, 53, 80, 83, 8, 48,
809 48, 48, 48, 48, 48, 55, 82, 50, 80, 8,
810 8, 8, 8, 8, 8, 54, 1, 8, 84, 85,
811 79, 1, 3, 9, 10, 52, 62, 63, 64, 66,
812 81, 86, 87, 88, 89, 90, 91, 92, 54, 56,
813 51, 86, 95, 87, 52, 93, 49, 57, 58, 59,
814 87, 44, 90, 46, 55, 60, 61, 42, 43, 85,
815 3, 63, 65, 93, 3, 18, 19, 20, 21, 22,
816 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
817 33, 34, 35, 36, 37, 38, 39, 40, 41, 67,
818 94, 89, 57, 4, 4, 92, 92, 67, 68, 45,
819 56, 47, 56, 3, 4, 45, 4, 47, 45, 47
822 #define yyerrok (yyerrstatus = 0)
823 #define yyclearin (yychar = YYEMPTY)
827 #define YYACCEPT goto yyacceptlab
828 #define YYABORT goto yyabortlab
829 #define YYERROR goto yyerrorlab
832 /* Like YYERROR except do call yyerror. This remains here temporarily
833 to ease the transition to the new meaning of YYERROR, for GCC.
834 Once GCC version 2 has supplanted version 1, this can go. */
836 #define YYFAIL goto yyerrlab
838 #define YYRECOVERING() (!!yyerrstatus)
840 #define YYBACKUP(Token, Value) \
842 if (yychar == YYEMPTY && yylen == 1) \
846 yytoken = YYTRANSLATE (yychar); \
852 yyerror (YY_("syntax error: cannot back up")); \
859 #define YYERRCODE 256
862 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
863 If N is 0, then set CURRENT to the empty location which ends
864 the previous symbol: RHS[0] (always defined). */
866 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
867 #ifndef YYLLOC_DEFAULT
868 # define YYLLOC_DEFAULT(Current, Rhs, N) \
872 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
873 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
874 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
875 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
879 (Current).first_line = (Current).last_line = \
880 YYRHSLOC (Rhs, 0).last_line; \
881 (Current).first_column = (Current).last_column = \
882 YYRHSLOC (Rhs, 0).last_column; \
888 /* YY_LOCATION_PRINT -- Print the location on the stream.
889 This macro was not mandated originally: define only if we know
890 we won't break user code: when these are the locations we know. */
892 #ifndef YY_LOCATION_PRINT
893 # if YYLTYPE_IS_TRIVIAL
894 # define YY_LOCATION_PRINT(File, Loc) \
895 fprintf (File, "%d.%d-%d.%d", \
896 (Loc).first_line, (Loc).first_column, \
897 (Loc).last_line, (Loc).last_column)
899 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
904 /* YYLEX -- calling `yylex' with the right arguments. */
907 # define YYLEX yylex (YYLEX_PARAM)
909 # define YYLEX yylex ()
912 /* Enable debugging if requested. */
916 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
917 # define YYFPRINTF fprintf
920 # define YYDPRINTF(Args) \
926 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
930 YYFPRINTF (stderr, "%s ", Title); \
931 yy_symbol_print (stderr, \
933 YYFPRINTF (stderr, "\n"); \
938 /*--------------------------------.
939 | Print this symbol on YYOUTPUT. |
940 `--------------------------------*/
943 #if (defined __STDC__ || defined __C99__FUNC__ \
944 || defined __cplusplus || defined _MSC_VER)
946 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
949 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
952 YYSTYPE
const * const yyvaluep
;
958 if (yytype
< YYNTOKENS
)
959 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
971 /*--------------------------------.
972 | Print this symbol on YYOUTPUT. |
973 `--------------------------------*/
975 #if (defined __STDC__ || defined __C99__FUNC__ \
976 || defined __cplusplus || defined _MSC_VER)
978 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
981 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
984 YYSTYPE
const * const yyvaluep
;
987 if (yytype
< YYNTOKENS
)
988 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
990 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
992 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
993 YYFPRINTF (yyoutput
, ")");
996 /*------------------------------------------------------------------.
997 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
999 `------------------------------------------------------------------*/
1001 #if (defined __STDC__ || defined __C99__FUNC__ \
1002 || defined __cplusplus || defined _MSC_VER)
1004 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1007 yy_stack_print (yybottom
, yytop
)
1008 yytype_int16
*yybottom
;
1009 yytype_int16
*yytop
;
1012 YYFPRINTF (stderr
, "Stack now");
1013 for (; yybottom
<= yytop
; yybottom
++)
1015 int yybot
= *yybottom
;
1016 YYFPRINTF (stderr
, " %d", yybot
);
1018 YYFPRINTF (stderr
, "\n");
1021 # define YY_STACK_PRINT(Bottom, Top) \
1024 yy_stack_print ((Bottom), (Top)); \
1028 /*------------------------------------------------.
1029 | Report that the YYRULE is going to be reduced. |
1030 `------------------------------------------------*/
1032 #if (defined __STDC__ || defined __C99__FUNC__ \
1033 || defined __cplusplus || defined _MSC_VER)
1035 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
1038 yy_reduce_print (yyvsp
, yyrule
)
1043 int yynrhs
= yyr2
[yyrule
];
1045 unsigned long int yylno
= yyrline
[yyrule
];
1046 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1048 /* The symbols being reduced. */
1049 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1051 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1052 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1053 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1055 YYFPRINTF (stderr
, "\n");
1059 # define YY_REDUCE_PRINT(Rule) \
1062 yy_reduce_print (yyvsp, Rule); \
1065 /* Nonzero means print parse trace. It is left uninitialized so that
1066 multiple parsers can coexist. */
1068 #else /* !YYDEBUG */
1069 # define YYDPRINTF(Args)
1070 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1071 # define YY_STACK_PRINT(Bottom, Top)
1072 # define YY_REDUCE_PRINT(Rule)
1073 #endif /* !YYDEBUG */
1076 /* YYINITDEPTH -- initial size of the parser's stacks. */
1078 # define YYINITDEPTH 200
1081 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1082 if the built-in stack extension method is used).
1084 Do not make this value too large; the results are undefined if
1085 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1086 evaluated with infinite-precision integer arithmetic. */
1089 # define YYMAXDEPTH 10000
1097 # if defined __GLIBC__ && defined _STRING_H
1098 # define yystrlen strlen
1100 /* Return the length of YYSTR. */
1101 #if (defined __STDC__ || defined __C99__FUNC__ \
1102 || defined __cplusplus || defined _MSC_VER)
1104 yystrlen (const char *yystr
)
1112 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1120 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1121 # define yystpcpy stpcpy
1123 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1125 #if (defined __STDC__ || defined __C99__FUNC__ \
1126 || defined __cplusplus || defined _MSC_VER)
1128 yystpcpy (char *yydest
, const char *yysrc
)
1131 yystpcpy (yydest
, yysrc
)
1137 const char *yys
= yysrc
;
1139 while ((*yyd
++ = *yys
++) != '\0')
1148 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1149 quotes and backslashes, so that it's suitable for yyerror. The
1150 heuristic is that double-quoting is unnecessary unless the string
1151 contains an apostrophe, a comma, or backslash (other than
1152 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1153 null, do not copy; instead, return the length of what the result
1156 yytnamerr (char *yyres
, const char *yystr
)
1161 char const *yyp
= yystr
;
1168 goto do_not_strip_quotes
;
1172 goto do_not_strip_quotes
;
1185 do_not_strip_quotes
: ;
1189 return yystrlen (yystr
);
1191 return yystpcpy (yyres
, yystr
) - yyres
;
1195 /* Copy into YYRESULT an error message about the unexpected token
1196 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1197 including the terminating null byte. If YYRESULT is null, do not
1198 copy anything; just return the number of bytes that would be
1199 copied. As a special case, return 0 if an ordinary "syntax error"
1200 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1201 size calculation. */
1203 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1205 int yyn
= yypact
[yystate
];
1207 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1211 int yytype
= YYTRANSLATE (yychar
);
1212 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1213 YYSIZE_T yysize
= yysize0
;
1215 int yysize_overflow
= 0;
1216 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1217 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1221 /* This is so xgettext sees the translatable formats that are
1222 constructed on the fly. */
1223 YY_("syntax error, unexpected %s");
1224 YY_("syntax error, unexpected %s, expecting %s");
1225 YY_("syntax error, unexpected %s, expecting %s or %s");
1226 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1227 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1231 static char const yyunexpected
[] = "syntax error, unexpected %s";
1232 static char const yyexpecting
[] = ", expecting %s";
1233 static char const yyor
[] = " or %s";
1234 char yyformat
[sizeof yyunexpected
1235 + sizeof yyexpecting
- 1
1236 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1237 * (sizeof yyor
- 1))];
1238 char const *yyprefix
= yyexpecting
;
1240 /* Start YYX at -YYN if negative to avoid negative indexes in
1242 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1244 /* Stay within bounds of both yycheck and yytname. */
1245 int yychecklim
= YYLAST
- yyn
+ 1;
1246 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1249 yyarg
[0] = yytname
[yytype
];
1250 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1252 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1253 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1255 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1259 yyformat
[sizeof yyunexpected
- 1] = '\0';
1262 yyarg
[yycount
++] = yytname
[yyx
];
1263 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1264 yysize_overflow
|= (yysize1
< yysize
);
1266 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1270 yyf
= YY_(yyformat
);
1271 yysize1
= yysize
+ yystrlen (yyf
);
1272 yysize_overflow
|= (yysize1
< yysize
);
1275 if (yysize_overflow
)
1276 return YYSIZE_MAXIMUM
;
1280 /* Avoid sprintf, as that infringes on the user's name space.
1281 Don't have undefined behavior even if the translation
1282 produced a string with the wrong number of "%s"s. */
1283 char *yyp
= yyresult
;
1285 while ((*yyp
= *yyf
) != '\0')
1287 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1289 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1302 #endif /* YYERROR_VERBOSE */
1305 /*-----------------------------------------------.
1306 | Release the memory associated to this symbol. |
1307 `-----------------------------------------------*/
1310 #if (defined __STDC__ || defined __C99__FUNC__ \
1311 || defined __cplusplus || defined _MSC_VER)
1313 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1316 yydestruct (yymsg
, yytype
, yyvaluep
)
1326 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1336 /* Prevent warnings from -Wmissing-prototypes. */
1337 #ifdef YYPARSE_PARAM
1338 #if defined __STDC__ || defined __cplusplus
1339 int yyparse (void *YYPARSE_PARAM
);
1343 #else /* ! YYPARSE_PARAM */
1344 #if defined __STDC__ || defined __cplusplus
1349 #endif /* ! YYPARSE_PARAM */
1352 /* The lookahead symbol. */
1355 /* The semantic value of the lookahead symbol. */
1358 /* Number of syntax errors so far. */
1363 /*-------------------------.
1364 | yyparse or yypush_parse. |
1365 `-------------------------*/
1367 #ifdef YYPARSE_PARAM
1368 #if (defined __STDC__ || defined __C99__FUNC__ \
1369 || defined __cplusplus || defined _MSC_VER)
1371 yyparse (void *YYPARSE_PARAM
)
1374 yyparse (YYPARSE_PARAM
)
1375 void *YYPARSE_PARAM
;
1377 #else /* ! YYPARSE_PARAM */
1378 #if (defined __STDC__ || defined __C99__FUNC__ \
1379 || defined __cplusplus || defined _MSC_VER)
1392 /* Number of tokens to shift before error messages enabled. */
1395 /* The stacks and their tools:
1396 `yyss': related to states.
1397 `yyvs': related to semantic values.
1399 Refer to the stacks thru separate pointers, to allow yyoverflow
1400 to reallocate them elsewhere. */
1402 /* The state stack. */
1403 yytype_int16 yyssa
[YYINITDEPTH
];
1405 yytype_int16
*yyssp
;
1407 /* The semantic value stack. */
1408 YYSTYPE yyvsa
[YYINITDEPTH
];
1412 YYSIZE_T yystacksize
;
1416 /* Lookahead token as an internal (translated) token number. */
1418 /* The variables used to return semantic value and location from the
1423 /* Buffer for error messages, and its allocated size. */
1425 char *yymsg
= yymsgbuf
;
1426 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1429 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1431 /* The number of symbols on the RHS of the reduced rule.
1432 Keep to zero when no symbol should be popped. */
1438 yystacksize
= YYINITDEPTH
;
1440 YYDPRINTF ((stderr
, "Starting parse\n"));
1445 yychar
= YYEMPTY
; /* Cause a token to be read. */
1447 /* Initialize stack pointers.
1448 Waste one element of value and location stack
1449 so that they stay on the same level as the state stack.
1450 The wasted elements are never initialized. */
1456 /*------------------------------------------------------------.
1457 | yynewstate -- Push a new state, which is found in yystate. |
1458 `------------------------------------------------------------*/
1460 /* In all cases, when you get here, the value and location stacks
1461 have just been pushed. So pushing a state here evens the stacks. */
1467 if (yyss
+ yystacksize
- 1 <= yyssp
)
1469 /* Get the current used size of the three stacks, in elements. */
1470 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1474 /* Give user a chance to reallocate the stack. Use copies of
1475 these so that the &'s don't force the real ones into
1477 YYSTYPE
*yyvs1
= yyvs
;
1478 yytype_int16
*yyss1
= yyss
;
1480 /* Each stack pointer address is followed by the size of the
1481 data in use in that stack, in bytes. This used to be a
1482 conditional around just the two extra args, but that might
1483 be undefined if yyoverflow is a macro. */
1484 yyoverflow (YY_("memory exhausted"),
1485 &yyss1
, yysize
* sizeof (*yyssp
),
1486 &yyvs1
, yysize
* sizeof (*yyvsp
),
1492 #else /* no yyoverflow */
1493 # ifndef YYSTACK_RELOCATE
1494 goto yyexhaustedlab
;
1496 /* Extend the stack our own way. */
1497 if (YYMAXDEPTH
<= yystacksize
)
1498 goto yyexhaustedlab
;
1500 if (YYMAXDEPTH
< yystacksize
)
1501 yystacksize
= YYMAXDEPTH
;
1504 yytype_int16
*yyss1
= yyss
;
1505 union yyalloc
*yyptr
=
1506 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1508 goto yyexhaustedlab
;
1509 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1510 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1511 # undef YYSTACK_RELOCATE
1513 YYSTACK_FREE (yyss1
);
1516 #endif /* no yyoverflow */
1518 yyssp
= yyss
+ yysize
- 1;
1519 yyvsp
= yyvs
+ yysize
- 1;
1521 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1522 (unsigned long int) yystacksize
));
1524 if (yyss
+ yystacksize
- 1 <= yyssp
)
1528 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1530 if (yystate
== YYFINAL
)
1540 /* Do appropriate processing given the current state. Read a
1541 lookahead token if we need one and don't already have one. */
1543 /* First try to decide what to do without reference to lookahead token. */
1544 yyn
= yypact
[yystate
];
1545 if (yyn
== YYPACT_NINF
)
1548 /* Not known => get a lookahead token if don't already have one. */
1550 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1551 if (yychar
== YYEMPTY
)
1553 YYDPRINTF ((stderr
, "Reading a token: "));
1557 if (yychar
<= YYEOF
)
1559 yychar
= yytoken
= YYEOF
;
1560 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1564 yytoken
= YYTRANSLATE (yychar
);
1565 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1568 /* If the proper action on seeing token YYTOKEN is to reduce or to
1569 detect an error, take that action. */
1571 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1576 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1582 /* Count tokens shifted since error; after three, turn off error
1587 /* Shift the lookahead token. */
1588 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1590 /* Discard the shifted token. */
1599 /*-----------------------------------------------------------.
1600 | yydefault -- do the default action for the current state. |
1601 `-----------------------------------------------------------*/
1603 yyn
= yydefact
[yystate
];
1609 /*-----------------------------.
1610 | yyreduce -- Do a reduction. |
1611 `-----------------------------*/
1613 /* yyn is the number of a rule to reduce with. */
1616 /* If YYLEN is nonzero, implement the default value of the action:
1619 Otherwise, the following line sets YYVAL to garbage.
1620 This behavior is undocumented and Bison
1621 users should not rely upon it. Assigning to YYVAL
1622 unconditionally makes the parser a bit smaller, and it avoids a
1623 GCC warning that YYVAL may be used uninitialized. */
1624 yyval
= yyvsp
[1-yylen
];
1627 YY_REDUCE_PRINT (yyn
);
1632 /* Line 1455 of yacc.c */
1634 { /* add default rule */
1640 def_rule
= mkstate( -pat
);
1642 /* Remember the number of the default rule so we
1643 * don't generate "can't match" warnings for it.
1645 default_rule
= num_rules
;
1647 finish_rule( def_rule
, false, 0, 0, 0);
1649 for ( i
= 1; i
<= lastsc
; ++i
)
1650 scset
[i
] = mkbranch( scset
[i
], def_rule
);
1654 "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
1656 add_action( "ECHO" );
1658 add_action( ";\n\tYY_BREAK\n" );
1664 /* Line 1455 of yacc.c */
1666 { /* initialize for processing rules */
1668 /* Create default DFA start condition. */
1669 scinstal( "INITIAL", false );
1675 /* Line 1455 of yacc.c */
1677 { synerr( _("unknown error processing section 1") ); }
1682 /* Line 1455 of yacc.c */
1686 scon_stk
= allocate_integer_array( lastsc
+ 1 );
1693 /* Line 1455 of yacc.c */
1695 { xcluflg
= false; }
1700 /* Line 1455 of yacc.c */
1707 /* Line 1455 of yacc.c */
1709 { scinstal( nmstr
, xcluflg
); }
1714 /* Line 1455 of yacc.c */
1716 { scinstal( nmstr
, xcluflg
); }
1721 /* Line 1455 of yacc.c */
1723 { synerr( _("bad start condition list") ); }
1728 /* Line 1455 of yacc.c */
1731 outfilename
= copy_string( nmstr
);
1732 did_outfilename
= 1;
1738 /* Line 1455 of yacc.c */
1740 { extra_type
= copy_string( nmstr
); }
1745 /* Line 1455 of yacc.c */
1747 { prefix
= copy_string( nmstr
); }
1752 /* Line 1455 of yacc.c */
1754 { yyclass
= copy_string( nmstr
); }
1759 /* Line 1455 of yacc.c */
1761 { headerfilename
= copy_string( nmstr
); }
1766 /* Line 1455 of yacc.c */
1768 { tablesext
= true; tablesfilename
= copy_string( nmstr
); }
1773 /* Line 1455 of yacc.c */
1775 { scon_stk_ptr
= (yyvsp
[(2) - (5)]); }
1780 /* Line 1455 of yacc.c */
1782 { scon_stk_ptr
= (yyvsp
[(2) - (5)]); }
1787 /* Line 1455 of yacc.c */
1790 /* Initialize for a parse of one rule. */
1791 trlcontxt
= variable_trail_rule
= varlength
= false;
1792 trailcnt
= headcnt
= rulelen
= 0;
1793 current_state_type
= STATE_NORMAL
;
1794 previous_continued_action
= continued_action
;
1803 /* Line 1455 of yacc.c */
1806 pat
= (yyvsp
[(2) - (2)]);
1807 finish_rule( pat
, variable_trail_rule
,
1808 headcnt
, trailcnt
, previous_continued_action
);
1810 if ( scon_stk_ptr
> 0 )
1812 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
1813 scbol
[scon_stk
[i
]] =
1814 mkbranch( scbol
[scon_stk
[i
]],
1820 /* Add to all non-exclusive start conditions,
1821 * including the default (0) start condition.
1824 for ( i
= 1; i
<= lastsc
; ++i
)
1826 scbol
[i
] = mkbranch( scbol
[i
],
1834 if ( performance_report
> 1 )
1836 "'^' operator results in sub-optimal performance" );
1843 /* Line 1455 of yacc.c */
1846 pat
= (yyvsp
[(1) - (1)]);
1847 finish_rule( pat
, variable_trail_rule
,
1848 headcnt
, trailcnt
, previous_continued_action
);
1850 if ( scon_stk_ptr
> 0 )
1852 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
1853 scset
[scon_stk
[i
]] =
1854 mkbranch( scset
[scon_stk
[i
]],
1860 for ( i
= 1; i
<= lastsc
; ++i
)
1871 /* Line 1455 of yacc.c */
1874 if ( scon_stk_ptr
> 0 )
1879 /* This EOF applies to all start conditions
1880 * which don't already have EOF actions.
1882 for ( i
= 1; i
<= lastsc
; ++i
)
1884 scon_stk
[++scon_stk_ptr
] = i
;
1886 if ( scon_stk_ptr
== 0 )
1888 "all start conditions already have <<EOF>> rules" );
1898 /* Line 1455 of yacc.c */
1900 { synerr( _("unrecognized rule") ); }
1905 /* Line 1455 of yacc.c */
1907 { (yyval
) = scon_stk_ptr
; }
1912 /* Line 1455 of yacc.c */
1914 { (yyval
) = (yyvsp
[(2) - (4)]); }
1919 /* Line 1455 of yacc.c */
1922 (yyval
) = scon_stk_ptr
;
1924 for ( i
= 1; i
<= lastsc
; ++i
)
1928 for ( j
= 1; j
<= scon_stk_ptr
; ++j
)
1929 if ( scon_stk
[j
] == i
)
1932 if ( j
> scon_stk_ptr
)
1933 scon_stk
[++scon_stk_ptr
] = i
;
1940 /* Line 1455 of yacc.c */
1942 { (yyval
) = scon_stk_ptr
; }
1947 /* Line 1455 of yacc.c */
1949 { synerr( _("bad start condition list") ); }
1954 /* Line 1455 of yacc.c */
1957 if ( (scnum
= sclookup( nmstr
)) == 0 )
1958 format_pinpoint_message(
1959 "undeclared start condition %s",
1963 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
1964 if ( scon_stk
[i
] == scnum
)
1967 "<%s> specified twice",
1972 if ( i
> scon_stk_ptr
)
1973 scon_stk
[++scon_stk_ptr
] = scnum
;
1980 /* Line 1455 of yacc.c */
1983 if ( transchar
[lastst
[(yyvsp
[(2) - (2)])]] != SYM_EPSILON
)
1984 /* Provide final transition \now/ so it
1985 * will be marked as a trailing context
1988 (yyvsp
[(2) - (2)]) = link_machines( (yyvsp
[(2) - (2)]),
1989 mkstate( SYM_EPSILON
) );
1991 mark_beginning_as_normal( (yyvsp
[(2) - (2)]) );
1992 current_state_type
= STATE_NORMAL
;
1994 if ( previous_continued_action
)
1996 /* We need to treat this as variable trailing
1997 * context so that the backup does not happen
1998 * in the action but before the action switch
1999 * statement. If the backup happens in the
2000 * action, then the rules "falling into" this
2001 * one's action will *also* do the backup,
2004 if ( ! varlength
|| headcnt
!= 0 )
2006 "trailing context made variable due to preceding '|' action" );
2008 /* Mark as variable. */
2014 if ( lex_compat
|| (varlength
&& headcnt
== 0) )
2015 { /* variable trailing context rule */
2016 /* Mark the first part of the rule as the
2017 * accepting "head" part of a trailing
2020 * By the way, we didn't do this at the
2021 * beginning of this production because back
2022 * then current_state_type was set up for a
2023 * trail rule, and add_accept() can create
2026 add_accept( (yyvsp
[(1) - (2)]),
2027 num_rules
| YY_TRAILING_HEAD_MASK
);
2028 variable_trail_rule
= true;
2034 (yyval
) = link_machines( (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]) );
2040 /* Line 1455 of yacc.c */
2042 { synerr( _("trailing context used twice") ); }
2047 /* Line 1455 of yacc.c */
2055 current_state_type
= STATE_TRAILING_CONTEXT
;
2059 synerr( _("trailing context used twice") );
2060 (yyval
) = mkstate( SYM_EPSILON
);
2063 else if ( previous_continued_action
)
2065 /* See the comment in the rule for "re2 re"
2069 "trailing context made variable due to preceding '|' action" );
2074 if ( lex_compat
|| varlength
)
2076 /* Again, see the comment in the rule for
2079 add_accept( (yyvsp
[(1) - (2)]),
2080 num_rules
| YY_TRAILING_HEAD_MASK
);
2081 variable_trail_rule
= true;
2086 eps
= mkstate( SYM_EPSILON
);
2087 (yyval
) = link_machines( (yyvsp
[(1) - (2)]),
2088 link_machines( eps
, mkstate( '\n' ) ) );
2094 /* Line 1455 of yacc.c */
2097 (yyval
) = (yyvsp
[(1) - (1)]);
2101 if ( lex_compat
|| (varlength
&& headcnt
== 0) )
2102 /* Both head and trail are
2105 variable_trail_rule
= true;
2114 /* Line 1455 of yacc.c */
2118 (yyval
) = mkor( (yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)]) );
2124 /* Line 1455 of yacc.c */
2126 { (yyval
) = (yyvsp
[(1) - (1)]); }
2131 /* Line 1455 of yacc.c */
2134 /* This rule is written separately so the
2135 * reduction will occur before the trailing
2140 synerr( _("trailing context used twice") );
2145 /* We hope the trailing context is
2154 current_state_type
= STATE_TRAILING_CONTEXT
;
2155 (yyval
) = (yyvsp
[(1) - (2)]);
2161 /* Line 1455 of yacc.c */
2164 /* This is where concatenation of adjacent patterns
2167 (yyval
) = link_machines( (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]) );
2173 /* Line 1455 of yacc.c */
2175 { (yyval
) = (yyvsp
[(1) - (1)]); }
2180 /* Line 1455 of yacc.c */
2185 if ( (yyvsp
[(3) - (6)]) > (yyvsp
[(5) - (6)]) || (yyvsp
[(3) - (6)]) < 0 )
2187 synerr( _("bad iteration values") );
2188 (yyval
) = (yyvsp
[(1) - (6)]);
2192 if ( (yyvsp
[(3) - (6)]) == 0 )
2194 if ( (yyvsp
[(5) - (6)]) <= 0 )
2197 _("bad iteration values") );
2198 (yyval
) = (yyvsp
[(1) - (6)]);
2202 mkrep( (yyvsp
[(1) - (6)]), 1, (yyvsp
[(5) - (6)]) ) );
2205 (yyval
) = mkrep( (yyvsp
[(1) - (6)]), (yyvsp
[(3) - (6)]), (yyvsp
[(5) - (6)]) );
2212 /* Line 1455 of yacc.c */
2217 if ( (yyvsp
[(3) - (5)]) <= 0 )
2219 synerr( _("iteration value must be positive") );
2220 (yyval
) = (yyvsp
[(1) - (5)]);
2224 (yyval
) = mkrep( (yyvsp
[(1) - (5)]), (yyvsp
[(3) - (5)]), INFINITE_REPEAT
);
2230 /* Line 1455 of yacc.c */
2233 /* The series could be something like "(foo)",
2234 * in which case we have no idea what its length
2235 * is, so we punt here.
2239 if ( (yyvsp
[(3) - (4)]) <= 0 )
2241 synerr( _("iteration value must be positive")
2243 (yyval
) = (yyvsp
[(1) - (4)]);
2247 (yyval
) = link_machines( (yyvsp
[(1) - (4)]),
2248 copysingl( (yyvsp
[(1) - (4)]), (yyvsp
[(3) - (4)]) - 1 ) );
2254 /* Line 1455 of yacc.c */
2259 (yyval
) = mkclos( (yyvsp
[(1) - (2)]) );
2265 /* Line 1455 of yacc.c */
2269 (yyval
) = mkposcl( (yyvsp
[(1) - (2)]) );
2275 /* Line 1455 of yacc.c */
2279 (yyval
) = mkopt( (yyvsp
[(1) - (2)]) );
2285 /* Line 1455 of yacc.c */
2290 if ( (yyvsp
[(3) - (6)]) > (yyvsp
[(5) - (6)]) || (yyvsp
[(3) - (6)]) < 0 )
2292 synerr( _("bad iteration values") );
2293 (yyval
) = (yyvsp
[(1) - (6)]);
2297 if ( (yyvsp
[(3) - (6)]) == 0 )
2299 if ( (yyvsp
[(5) - (6)]) <= 0 )
2302 _("bad iteration values") );
2303 (yyval
) = (yyvsp
[(1) - (6)]);
2307 mkrep( (yyvsp
[(1) - (6)]), 1, (yyvsp
[(5) - (6)]) ) );
2310 (yyval
) = mkrep( (yyvsp
[(1) - (6)]), (yyvsp
[(3) - (6)]), (yyvsp
[(5) - (6)]) );
2317 /* Line 1455 of yacc.c */
2322 if ( (yyvsp
[(3) - (5)]) <= 0 )
2324 synerr( _("iteration value must be positive") );
2325 (yyval
) = (yyvsp
[(1) - (5)]);
2329 (yyval
) = mkrep( (yyvsp
[(1) - (5)]), (yyvsp
[(3) - (5)]), INFINITE_REPEAT
);
2335 /* Line 1455 of yacc.c */
2338 /* The singleton could be something like "(foo)",
2339 * in which case we have no idea what its length
2340 * is, so we punt here.
2344 if ( (yyvsp
[(3) - (4)]) <= 0 )
2346 synerr( _("iteration value must be positive") );
2347 (yyval
) = (yyvsp
[(1) - (4)]);
2351 (yyval
) = link_machines( (yyvsp
[(1) - (4)]),
2352 copysingl( (yyvsp
[(1) - (4)]), (yyvsp
[(3) - (4)]) - 1 ) );
2358 /* Line 1455 of yacc.c */
2363 /* Create the '.' character class. */
2365 ccladd( ccldot
, '\n' );
2366 cclnegate( ccldot
);
2369 mkeccl( ccltbl
+ cclmap
[ccldot
],
2370 ccllen
[ccldot
], nextecm
,
2371 ecgroup
, csize
, csize
);
2373 /* Create the (?s:'.') character class. */
2375 cclnegate( cclany
);
2378 mkeccl( ccltbl
+ cclmap
[cclany
],
2379 ccllen
[cclany
], nextecm
,
2380 ecgroup
, csize
, csize
);
2388 (yyval
) = mkstate( -cclany
);
2390 (yyval
) = mkstate( -ccldot
);
2396 /* Line 1455 of yacc.c */
2399 /* Sort characters for fast searching.
2401 qsort( ccltbl
+ cclmap
[(yyvsp
[(1) - (1)])], ccllen
[(yyvsp
[(1) - (1)])], sizeof (*ccltbl
), cclcmp
);
2404 mkeccl( ccltbl
+ cclmap
[(yyvsp
[(1) - (1)])], ccllen
[(yyvsp
[(1) - (1)])],
2405 nextecm
, ecgroup
, csize
, csize
);
2409 if (ccl_has_nl
[(yyvsp
[(1) - (1)])])
2410 rule_has_nl
[num_rules
] = true;
2412 (yyval
) = mkstate( -(yyvsp
[(1) - (1)]) );
2418 /* Line 1455 of yacc.c */
2423 if (ccl_has_nl
[(yyvsp
[(1) - (1)])])
2424 rule_has_nl
[num_rules
] = true;
2426 (yyval
) = mkstate( -(yyvsp
[(1) - (1)]) );
2432 /* Line 1455 of yacc.c */
2434 { (yyval
) = (yyvsp
[(2) - (3)]); }
2439 /* Line 1455 of yacc.c */
2441 { (yyval
) = (yyvsp
[(2) - (3)]); }
2446 /* Line 1455 of yacc.c */
2451 if ((yyvsp
[(1) - (1)]) == nlch
)
2452 rule_has_nl
[num_rules
] = true;
2454 if (sf_case_ins() && has_case((yyvsp
[(1) - (1)])))
2455 /* create an alternation, as in (a|A) */
2456 (yyval
) = mkor (mkstate((yyvsp
[(1) - (1)])), mkstate(reverse_case((yyvsp
[(1) - (1)]))));
2458 (yyval
) = mkstate( (yyvsp
[(1) - (1)]) );
2464 /* Line 1455 of yacc.c */
2466 { (yyval
) = ccl_set_diff ((yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)])); }
2471 /* Line 1455 of yacc.c */
2473 { (yyval
) = ccl_set_union ((yyvsp
[(1) - (3)]), (yyvsp
[(3) - (3)])); }
2478 /* Line 1455 of yacc.c */
2480 { (yyval
) = (yyvsp
[(2) - (3)]); }
2485 /* Line 1455 of yacc.c */
2488 cclnegate( (yyvsp
[(3) - (4)]) );
2489 (yyval
) = (yyvsp
[(3) - (4)]);
2495 /* Line 1455 of yacc.c */
2502 /* If one end of the range has case and the other
2503 * does not, or the cases are different, then we're not
2504 * sure what range the user is trying to express.
2505 * Examples: [@-z] or [S-t]
2507 if (has_case ((yyvsp
[(2) - (4)])) != has_case ((yyvsp
[(4) - (4)]))
2508 || (has_case ((yyvsp
[(2) - (4)])) && (b_islower ((yyvsp
[(2) - (4)])) != b_islower ((yyvsp
[(4) - (4)]))))
2509 || (has_case ((yyvsp
[(2) - (4)])) && (b_isupper ((yyvsp
[(2) - (4)])) != b_isupper ((yyvsp
[(4) - (4)])))))
2511 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
2512 (yyvsp
[(2) - (4)]), (yyvsp
[(4) - (4)]));
2514 /* If the range spans uppercase characters but not
2515 * lowercase (or vice-versa), then should we automatically
2516 * include lowercase characters in the range?
2517 * Example: [@-_] spans [a-z] but not [A-Z]
2519 else if (!has_case ((yyvsp
[(2) - (4)])) && !has_case ((yyvsp
[(4) - (4)])) && !range_covers_case ((yyvsp
[(2) - (4)]), (yyvsp
[(4) - (4)])))
2521 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
2522 (yyvsp
[(2) - (4)]), (yyvsp
[(4) - (4)]));
2525 if ( (yyvsp
[(2) - (4)]) > (yyvsp
[(4) - (4)]) )
2526 synerr( _("negative range in character class") );
2530 for ( i
= (yyvsp
[(2) - (4)]); i
<= (yyvsp
[(4) - (4)]); ++i
)
2531 ccladd( (yyvsp
[(1) - (4)]), i
);
2533 /* Keep track if this ccl is staying in
2534 * alphabetical order.
2536 cclsorted
= cclsorted
&& ((yyvsp
[(2) - (4)]) > lastchar
);
2537 lastchar
= (yyvsp
[(4) - (4)]);
2539 /* Do it again for upper/lowercase */
2540 if (sf_case_ins() && has_case((yyvsp
[(2) - (4)])) && has_case((yyvsp
[(4) - (4)]))){
2541 (yyvsp
[(2) - (4)]) = reverse_case ((yyvsp
[(2) - (4)]));
2542 (yyvsp
[(4) - (4)]) = reverse_case ((yyvsp
[(4) - (4)]));
2544 for ( i
= (yyvsp
[(2) - (4)]); i
<= (yyvsp
[(4) - (4)]); ++i
)
2545 ccladd( (yyvsp
[(1) - (4)]), i
);
2547 cclsorted
= cclsorted
&& ((yyvsp
[(2) - (4)]) > lastchar
);
2548 lastchar
= (yyvsp
[(4) - (4)]);
2553 (yyval
) = (yyvsp
[(1) - (4)]);
2559 /* Line 1455 of yacc.c */
2562 ccladd( (yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]) );
2563 cclsorted
= cclsorted
&& ((yyvsp
[(2) - (2)]) > lastchar
);
2564 lastchar
= (yyvsp
[(2) - (2)]);
2566 /* Do it again for upper/lowercase */
2567 if (sf_case_ins() && has_case((yyvsp
[(2) - (2)]))){
2568 (yyvsp
[(2) - (2)]) = reverse_case ((yyvsp
[(2) - (2)]));
2569 ccladd ((yyvsp
[(1) - (2)]), (yyvsp
[(2) - (2)]));
2571 cclsorted
= cclsorted
&& ((yyvsp
[(2) - (2)]) > lastchar
);
2572 lastchar
= (yyvsp
[(2) - (2)]);
2575 (yyval
) = (yyvsp
[(1) - (2)]);
2581 /* Line 1455 of yacc.c */
2584 /* Too hard to properly maintain cclsorted. */
2586 (yyval
) = (yyvsp
[(1) - (2)]);
2592 /* Line 1455 of yacc.c */
2597 currccl
= (yyval
) = cclinit();
2603 /* Line 1455 of yacc.c */
2605 { CCL_EXPR(isalnum
); }
2610 /* Line 1455 of yacc.c */
2612 { CCL_EXPR(isalpha
); }
2617 /* Line 1455 of yacc.c */
2619 { CCL_EXPR(IS_BLANK
); }
2624 /* Line 1455 of yacc.c */
2626 { CCL_EXPR(iscntrl
); }
2631 /* Line 1455 of yacc.c */
2633 { CCL_EXPR(isdigit
); }
2638 /* Line 1455 of yacc.c */
2640 { CCL_EXPR(isgraph
); }
2645 /* Line 1455 of yacc.c */
2656 /* Line 1455 of yacc.c */
2658 { CCL_EXPR(isprint
); }
2663 /* Line 1455 of yacc.c */
2665 { CCL_EXPR(ispunct
); }
2670 /* Line 1455 of yacc.c */
2672 { CCL_EXPR(isspace
); }
2677 /* Line 1455 of yacc.c */
2679 { CCL_EXPR(isxdigit
); }
2684 /* Line 1455 of yacc.c */
2695 /* Line 1455 of yacc.c */
2697 { CCL_NEG_EXPR(isalnum
); }
2702 /* Line 1455 of yacc.c */
2704 { CCL_NEG_EXPR(isalpha
); }
2709 /* Line 1455 of yacc.c */
2711 { CCL_NEG_EXPR(IS_BLANK
); }
2716 /* Line 1455 of yacc.c */
2718 { CCL_NEG_EXPR(iscntrl
); }
2723 /* Line 1455 of yacc.c */
2725 { CCL_NEG_EXPR(isdigit
); }
2730 /* Line 1455 of yacc.c */
2732 { CCL_NEG_EXPR(isgraph
); }
2737 /* Line 1455 of yacc.c */
2739 { CCL_NEG_EXPR(isprint
); }
2744 /* Line 1455 of yacc.c */
2746 { CCL_NEG_EXPR(ispunct
); }
2751 /* Line 1455 of yacc.c */
2753 { CCL_NEG_EXPR(isspace
); }
2758 /* Line 1455 of yacc.c */
2760 { CCL_NEG_EXPR(isxdigit
); }
2765 /* Line 1455 of yacc.c */
2768 if ( sf_case_ins() )
2769 warn(_("[:^lower:] is ambiguous in case insensitive scanner"));
2771 CCL_NEG_EXPR(islower
);
2777 /* Line 1455 of yacc.c */
2780 if ( sf_case_ins() )
2781 warn(_("[:^upper:] ambiguous in case insensitive scanner"));
2783 CCL_NEG_EXPR(isupper
);
2789 /* Line 1455 of yacc.c */
2792 if ( (yyvsp
[(2) - (2)]) == nlch
)
2793 rule_has_nl
[num_rules
] = true;
2797 if (sf_case_ins() && has_case((yyvsp
[(2) - (2)])))
2798 (yyval
) = mkor (mkstate((yyvsp
[(2) - (2)])), mkstate(reverse_case((yyvsp
[(2) - (2)]))));
2800 (yyval
) = mkstate ((yyvsp
[(2) - (2)]));
2802 (yyval
) = link_machines( (yyvsp
[(1) - (2)]), (yyval
));
2808 /* Line 1455 of yacc.c */
2810 { (yyval
) = mkstate( SYM_EPSILON
); }
2815 /* Line 1455 of yacc.c */
2816 #line 2817 "parse.c"
2819 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2823 YY_STACK_PRINT (yyss
, yyssp
);
2827 /* Now `shift' the result of the reduction. Determine what state
2828 that goes to, based on the state we popped back to and the rule
2829 number reduced by. */
2833 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2834 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2835 yystate
= yytable
[yystate
];
2837 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2842 /*------------------------------------.
2843 | yyerrlab -- here on detecting error |
2844 `------------------------------------*/
2846 /* If not already recovering from an error, report this error. */
2850 #if ! YYERROR_VERBOSE
2851 yyerror (YY_("syntax error"));
2854 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2855 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2857 YYSIZE_T yyalloc
= 2 * yysize
;
2858 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2859 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
2860 if (yymsg
!= yymsgbuf
)
2861 YYSTACK_FREE (yymsg
);
2862 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
2864 yymsg_alloc
= yyalloc
;
2868 yymsg_alloc
= sizeof yymsgbuf
;
2872 if (0 < yysize
&& yysize
<= yymsg_alloc
)
2874 (void) yysyntax_error (yymsg
, yystate
, yychar
);
2879 yyerror (YY_("syntax error"));
2881 goto yyexhaustedlab
;
2889 if (yyerrstatus
== 3)
2891 /* If just tried and failed to reuse lookahead token after an
2892 error, discard it. */
2894 if (yychar
<= YYEOF
)
2896 /* Return failure if at end of input. */
2897 if (yychar
== YYEOF
)
2902 yydestruct ("Error: discarding",
2908 /* Else will try to reuse lookahead token after shifting the error
2913 /*---------------------------------------------------.
2914 | yyerrorlab -- error raised explicitly by YYERROR. |
2915 `---------------------------------------------------*/
2918 /* Pacify compilers like GCC when the user code never invokes
2919 YYERROR and the label yyerrorlab therefore never appears in user
2921 if (/*CONSTCOND*/ 0)
2924 /* Do not reclaim the symbols of the rule which action triggered
2928 YY_STACK_PRINT (yyss
, yyssp
);
2933 /*-------------------------------------------------------------.
2934 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2935 `-------------------------------------------------------------*/
2937 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2941 yyn
= yypact
[yystate
];
2942 if (yyn
!= YYPACT_NINF
)
2945 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2953 /* Pop the current state because it cannot handle the error token. */
2958 yydestruct ("Error: popping",
2959 yystos
[yystate
], yyvsp
);
2962 YY_STACK_PRINT (yyss
, yyssp
);
2968 /* Shift the error token. */
2969 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2975 /*-------------------------------------.
2976 | yyacceptlab -- YYACCEPT comes here. |
2977 `-------------------------------------*/
2982 /*-----------------------------------.
2983 | yyabortlab -- YYABORT comes here. |
2984 `-----------------------------------*/
2989 #if !defined(yyoverflow) || YYERROR_VERBOSE
2990 /*-------------------------------------------------.
2991 | yyexhaustedlab -- memory exhaustion comes here. |
2992 `-------------------------------------------------*/
2994 yyerror (YY_("memory exhausted"));
3000 if (yychar
!= YYEMPTY
)
3001 yydestruct ("Cleanup: discarding lookahead",
3003 /* Do not reclaim the symbols of the rule which action triggered
3004 this YYABORT or YYACCEPT. */
3006 YY_STACK_PRINT (yyss
, yyssp
);
3007 while (yyssp
!= yyss
)
3009 yydestruct ("Cleanup: popping",
3010 yystos
[*yyssp
], yyvsp
);
3015 YYSTACK_FREE (yyss
);
3018 if (yymsg
!= yymsgbuf
)
3019 YYSTACK_FREE (yymsg
);
3021 /* Make sure YYID is used. */
3022 return YYID (yyresult
);
3027 /* Line 1675 of yacc.c */
3032 /* build_eof_action - build the "<<EOF>>" action for the active start
3036 void build_eof_action()
3039 char action_text
[MAXLINE
];
3041 for ( i
= 1; i
<= scon_stk_ptr
; ++i
)
3043 if ( sceof
[scon_stk
[i
]] )
3044 format_pinpoint_message(
3045 "multiple <<EOF>> rules for start condition %s",
3046 scname
[scon_stk
[i
]] );
3050 sceof
[scon_stk
[i
]] = true;
3052 if (previous_continued_action
/* && previous action was regular */)
3053 add_action("YY_RULE_SETUP\n");
3055 snprintf( action_text
, sizeof(action_text
), "case YY_STATE_EOF(%s):\n",
3056 scname
[scon_stk
[i
]] );
3057 add_action( action_text
);
3061 line_directive_out( (FILE *) 0, 1 );
3063 /* This isn't a normal rule after all - don't count it as
3064 * such, so we don't have any holes in the rule numbering
3065 * (which make generating "rule can never match" warnings
3073 /* format_synerr - write out formatted syntax error */
3075 void format_synerr( msg
, arg
)
3076 const char *msg
, arg
[];
3078 char errmsg
[MAXLINE
];
3080 (void) snprintf( errmsg
, sizeof(errmsg
), msg
, arg
);
3085 /* synerr - report a syntax error */
3091 pinpoint_message( str
);
3095 /* format_warn - write out formatted warning */
3097 void format_warn( msg
, arg
)
3098 const char *msg
, arg
[];
3100 char warn_msg
[MAXLINE
];
3102 snprintf( warn_msg
, sizeof(warn_msg
), msg
, arg
);
3107 /* warn - report a warning, unless -w was given */
3112 line_warning( str
, linenum
);
3115 /* format_pinpoint_message - write out a message formatted with one string,
3116 * pinpointing its location
3119 void format_pinpoint_message( msg
, arg
)
3120 const char *msg
, arg
[];
3122 char errmsg
[MAXLINE
];
3124 snprintf( errmsg
, sizeof(errmsg
), msg
, arg
);
3125 pinpoint_message( errmsg
);
3129 /* pinpoint_message - write out a message, pinpointing its location */
3131 void pinpoint_message( str
)
3134 line_pinpoint( str
, linenum
);
3138 /* line_warning - report a warning at a given line, unless -w was given */
3140 void line_warning( str
, line
)
3144 char warning
[MAXLINE
];
3148 snprintf( warning
, sizeof(warning
), "warning, %s", str
);
3149 line_pinpoint( warning
, line
);
3154 /* line_pinpoint - write out a message, pinpointing it at the given line */
3156 void line_pinpoint( str
, line
)
3160 fprintf( stderr
, "%s:%d: %s\n", infilename
, line
, str
);
3164 /* yyerror - eat up an error message from the parser;
3165 * currently, messages are ignore