FreeCAD

Форк
0
/
SelectionFilter.tab.c 
1643 строки · 42.9 Кб
1
/* A Bison parser, made by GNU Bison 2.4.2.  */
2

3
/* Skeleton implementation for Bison's Yacc-like parsers in C
4
   
5
      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
6
   Foundation, Inc.
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 3 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, see <http://www.gnu.org/licenses/>.  */
20

21
/* As a special exception, you may create a larger work that contains
22
   part or all of the Bison parser skeleton and distribute that work
23
   under terms of your choice, so long as that work isn't itself a
24
   parser generator using the skeleton or a modified version thereof
25
   as a parser skeleton.  Alternatively, if you modify or redistribute
26
   the parser skeleton itself, you may (at your option) remove this
27
   special exception, which will cause the skeleton and the resulting
28
   Bison output files to be licensed under the GNU General Public
29
   License without this special exception.
30
   
31
   This special exception was added by the Free Software Foundation in
32
   version 2.2 of Bison.  */
33

34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
   simplifying the original so-called "semantic" parser.  */
36

37
/* All symbols defined below should begin with yy or YY, to avoid
38
   infringing on user name space.  This should be done even for local
39
   variables, as they might otherwise be expanded by user macros.
40
   There are some unavoidable exceptions within include files to
41
   define necessary library symbols; they are noted "INFRINGES ON
42
   USER NAME SPACE" below.  */
43

44
/* Identify Bison output.  */
45
#define YYBISON 1
46

47
/* Bison version.  */
48
#define YYBISON_VERSION "2.4.2"
49

50
/* Skeleton name.  */
51
#define YYSKELETON_NAME "yacc.c"
52

53
/* Pure parsers.  */
54
#define YYPURE 0
55

56
/* Push parsers.  */
57
#define YYPUSH 0
58

59
/* Pull parsers.  */
60
#define YYPULL 1
61

62
/* Using locations.  */
63
#define YYLSP_NEEDED 0
64

65

66

67
/* Copy the first part of user declarations.  */
68

69

70
/* Line 189 of yacc.c  */
71
#line 72 "SelectionFilter.tab.c"
72

73
/* Enabling traces.  */
74
#ifndef YYDEBUG
75
# define YYDEBUG 0
76
#endif
77

78
/* Enabling verbose error messages.  */
79
#ifdef YYERROR_VERBOSE
80
# undef YYERROR_VERBOSE
81
# define YYERROR_VERBOSE 1
82
#else
83
# define YYERROR_VERBOSE 0
84
#endif
85

86
/* Enabling the token table.  */
87
#ifndef YYTOKEN_TABLE
88
# define YYTOKEN_TABLE 0
89
#endif
90

91

92
/* Tokens.  */
93
#ifndef YYTOKENTYPE
94
# define YYTOKENTYPE
95
   /* Put the tokens into the symbol table, so that GDB and other debuggers
96
      know about them.  */
97
   enum yytokentype {
98
     TIDENTIFIER = 258,
99
     TSUB = 259,
100
     TSELECT = 260,
101
     TCOUNT = 261,
102
     TSLICE = 262,
103
     TNAMESPACE = 263,
104
     TNUMBER = 264
105
   };
106
#endif
107

108

109

110
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
111
typedef union YYSTYPE
112
{
113

114
/* Line 214 of yacc.c  */
115
#line 8 "SelectionFilter.y"
116

117
    std::string *string;
118
    Node_Object *object;
119
    Node_Slice  *slice;
120
    Node_Block  *block;
121
    int          token;
122
    int          number;
123

124

125

126
/* Line 214 of yacc.c  */
127
#line 128 "SelectionFilter.tab.c"
128
} YYSTYPE;
129
# define YYSTYPE_IS_TRIVIAL 1
130
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
131
# define YYSTYPE_IS_DECLARED 1
132
#endif
133

134

135
/* Copy the second part of user declarations.  */
136

137

138
/* Line 264 of yacc.c  */
139
#line 140 "SelectionFilter.tab.c"
140

141
#ifdef short
142
# undef short
143
#endif
144

145
#ifdef YYTYPE_UINT8
146
typedef YYTYPE_UINT8 yytype_uint8;
147
#else
148
typedef unsigned char yytype_uint8;
149
#endif
150

151
#ifdef YYTYPE_INT8
152
typedef YYTYPE_INT8 yytype_int8;
153
#elif (defined __STDC__ || defined __C99__FUNC__ \
154
     || defined __cplusplus || defined _MSC_VER)
155
typedef signed char yytype_int8;
156
#else
157
typedef short int yytype_int8;
158
#endif
159

160
#ifdef YYTYPE_UINT16
161
typedef YYTYPE_UINT16 yytype_uint16;
162
#else
163
typedef unsigned short int yytype_uint16;
164
#endif
165

166
#ifdef YYTYPE_INT16
167
typedef YYTYPE_INT16 yytype_int16;
168
#else
169
typedef short int yytype_int16;
170
#endif
171

172
#ifndef YYSIZE_T
173
# ifdef __SIZE_TYPE__
174
#  define YYSIZE_T __SIZE_TYPE__
175
# elif defined size_t
176
#  define YYSIZE_T size_t
177
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
178
     || defined __cplusplus || defined _MSC_VER)
179
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
180
#  define YYSIZE_T size_t
181
# else
182
#  define YYSIZE_T unsigned int
183
# endif
184
#endif
185

186
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
187

188
#ifndef YY_
189
# if defined YYENABLE_NLS && YYENABLE_NLS
190
#  if ENABLE_NLS
191
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
192
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
193
#  endif
194
# endif
195
# ifndef YY_
196
#  define YY_(msgid) msgid
197
# endif
198
#endif
199

200
/* Suppress unused-variable warnings by "using" E.  */
201
#if ! defined lint || defined __GNUC__
202
# define YYUSE(e) ((void) (e))
203
#else
204
# define YYUSE(e) /* empty */
205
#endif
206

207
/* Identity function, used to suppress warnings about constant conditions.  */
208
#ifndef lint
209
# define YYID(n) (n)
210
#else
211
#if (defined __STDC__ || defined __C99__FUNC__ \
212
     || defined __cplusplus || defined _MSC_VER)
213
static int
214
YYID (int yyi)
215
#else
216
static int
217
YYID (yyi)
218
    int yyi;
219
#endif
220
{
221
  return yyi;
222
}
223
#endif
224

225
#if ! defined yyoverflow || YYERROR_VERBOSE
226

227
/* The parser invokes alloca or malloc; define the necessary symbols.  */
228

229
# ifdef YYSTACK_USE_ALLOCA
230
#  if YYSTACK_USE_ALLOCA
231
#   ifdef __GNUC__
232
#    define YYSTACK_ALLOC __builtin_alloca
233
#   elif defined __BUILTIN_VA_ARG_INCR
234
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
235
#   elif defined _AIX
236
#    define YYSTACK_ALLOC __alloca
237
#   elif defined _MSC_VER
238
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
239
#    define alloca _alloca
240
#   else
241
#    define YYSTACK_ALLOC alloca
242
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
243
     || defined __cplusplus || defined _MSC_VER)
244
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
245
#     ifndef _STDLIB_H
246
#      define _STDLIB_H 1
247
#     endif
248
#    endif
249
#   endif
250
#  endif
251
# endif
252

253
# ifdef YYSTACK_ALLOC
254
   /* Pacify GCC's `empty if-body' warning.  */
255
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
256
#  ifndef YYSTACK_ALLOC_MAXIMUM
257
    /* The OS might guarantee only one guard page at the bottom of the stack,
258
       and a page size can be as small as 4096 bytes.  So we cannot safely
259
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
260
       to allow for a few compiler-allocated temporary stack slots.  */
261
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
262
#  endif
263
# else
264
#  define YYSTACK_ALLOC YYMALLOC
265
#  define YYSTACK_FREE YYFREE
266
#  ifndef YYSTACK_ALLOC_MAXIMUM
267
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
268
#  endif
269
#  if (defined __cplusplus && ! defined _STDLIB_H \
270
       && ! ((defined YYMALLOC || defined malloc) \
271
	     && (defined YYFREE || defined free)))
272
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
273
#   ifndef _STDLIB_H
274
#    define _STDLIB_H 1
275
#   endif
276
#  endif
277
#  ifndef YYMALLOC
278
#   define YYMALLOC malloc
279
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
280
     || defined __cplusplus || defined _MSC_VER)
281
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
282
#   endif
283
#  endif
284
#  ifndef YYFREE
285
#   define YYFREE free
286
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
287
     || defined __cplusplus || defined _MSC_VER)
288
void free (void *); /* INFRINGES ON USER NAME SPACE */
289
#   endif
290
#  endif
291
# endif
292
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
293

294

295
#if (! defined yyoverflow \
296
     && (! defined __cplusplus \
297
	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
298

299
/* A type that is properly aligned for any stack member.  */
300
union yyalloc
301
{
302
  yytype_int16 yyss_alloc;
303
  YYSTYPE yyvs_alloc;
304
};
305

306
/* The size of the maximum gap between one aligned stack and the next.  */
307
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
308

309
/* The size of an array large to enough to hold all stacks, each with
310
   N elements.  */
311
# define YYSTACK_BYTES(N) \
312
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
313
      + YYSTACK_GAP_MAXIMUM)
314

315
/* Copy COUNT objects from FROM to TO.  The source and destination do
316
   not overlap.  */
317
# ifndef YYCOPY
318
#  if defined __GNUC__ && 1 < __GNUC__
319
#   define YYCOPY(To, From, Count) \
320
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
321
#  else
322
#   define YYCOPY(To, From, Count)		\
323
      do					\
324
	{					\
325
	  YYSIZE_T yyi;				\
326
	  for (yyi = 0; yyi < (Count); yyi++)	\
327
	    (To)[yyi] = (From)[yyi];		\
328
	}					\
329
      while (YYID (0))
330
#  endif
331
# endif
332

333
/* Relocate STACK from its old location to the new one.  The
334
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
335
   elements in the stack, and YYPTR gives the new location of the
336
   stack.  Advance YYPTR to a properly aligned location for the next
337
   stack.  */
338
# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
339
    do									\
340
      {									\
341
	YYSIZE_T yynewbytes;						\
342
	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
343
	Stack = &yyptr->Stack_alloc;					\
344
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
345
	yyptr += yynewbytes / sizeof (*yyptr);				\
346
      }									\
347
    while (YYID (0))
348

349
#endif
350

351
/* YYFINAL -- State number of the termination state.  */
352
#define YYFINAL  11
353
/* YYLAST -- Last index in YYTABLE.  */
354
#define YYLAST   15
355

356
/* YYNTOKENS -- Number of terminals.  */
357
#define YYNTOKENS  10
358
/* YYNNTS -- Number of nonterminals.  */
359
#define YYNNTS  8
360
/* YYNRULES -- Number of rules.  */
361
#define YYNRULES  14
362
/* YYNRULES -- Number of states.  */
363
#define YYNSTATES  20
364

365
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
366
#define YYUNDEFTOK  2
367
#define YYMAXUTOK   264
368

369
#define YYTRANSLATE(YYX)						\
370
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
371

372
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
373
static const yytype_uint8 yytranslate[] =
374
{
375
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
376
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
377
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
378
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
379
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
380
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
381
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
382
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
383
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
384
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
385
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
386
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
387
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
388
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
389
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
390
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
391
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
392
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
393
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
394
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
395
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
396
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
397
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
398
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
399
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
400
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
401
       5,     6,     7,     8,     9
402
};
403

404
#if YYDEBUG
405
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
406
   YYRHS.  */
407
static const yytype_uint8 yyprhs[] =
408
{
409
       0,     0,     3,     6,    11,    12,    15,    16,    21,    25,
410
      28,    32,    34,    37,    39
411
};
412

413
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
414
static const yytype_int8 yyrhs[] =
415
{
416
      17,     0,    -1,     5,     3,    -1,     5,     3,     8,     3,
417
      -1,    -1,     4,     3,    -1,    -1,     6,     9,     7,     9,
418
      -1,     6,     9,     7,    -1,     6,     9,    -1,    11,    12,
419
      13,    -1,    14,    -1,    15,    14,    -1,    15,    -1,    16,
420
      -1
421
};
422

423
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
424
static const yytype_uint8 yyrline[] =
425
{
426
       0,    39,    39,    40,    42,    43,    45,    46,    47,    48,
427
      50,    52,    53,    55,    57
428
};
429
#endif
430

431
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
432
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
433
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
434
static const char *const yytname[] =
435
{
436
  "$end", "error", "$undefined", "TIDENTIFIER", "TSUB", "TSELECT",
437
  "TCOUNT", "TSLICE", "TNAMESPACE", "TNUMBER", "$accept", "type",
438
  "subname", "count", "matchline", "matchlines", "block", "filter", 0
439
};
440
#endif
441

442
# ifdef YYPRINT
443
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
444
   token YYLEX-NUM.  */
445
static const yytype_uint16 yytoknum[] =
446
{
447
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264
448
};
449
# endif
450

451
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
452
static const yytype_uint8 yyr1[] =
453
{
454
       0,    10,    11,    11,    12,    12,    13,    13,    13,    13,
455
      14,    15,    15,    16,    17
456
};
457

458
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
459
static const yytype_uint8 yyr2[] =
460
{
461
       0,     2,     2,     4,     0,     2,     0,     4,     3,     2,
462
       3,     1,     2,     1,     1
463
};
464

465
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
466
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
467
   means the default is an error.  */
468
static const yytype_uint8 yydefact[] =
469
{
470
       0,     0,     4,    11,    13,    14,     0,     2,     0,     6,
471
      12,     1,     0,     5,     0,    10,     3,     9,     8,     7
472
};
473

474
/* YYDEFGOTO[NTERM-NUM].  */
475
static const yytype_int8 yydefgoto[] =
476
{
477
      -1,     2,     9,    15,     3,     4,     5,     6
478
};
479

480
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
481
   STATE-NUM.  */
482
#define YYPACT_NINF -6
483
static const yytype_int8 yypact[] =
484
{
485
      -5,    -2,    -1,    -6,    -5,    -6,     2,    -4,     3,     1,
486
      -6,    -6,     5,    -6,     0,    -6,    -6,     4,     6,    -6
487
};
488

489
/* YYPGOTO[NTERM-NUM].  */
490
static const yytype_int8 yypgoto[] =
491
{
492
      -6,    -6,    -6,    -6,     8,    -6,    -6,    -6
493
};
494

495
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
496
   positive, shift that token.  If negative, reduce the rule which
497
   number is the opposite.  If zero, do what YYDEFACT says.
498
   If YYTABLE_NINF, syntax error.  */
499
#define YYTABLE_NINF -1
500
static const yytype_uint8 yytable[] =
501
{
502
       1,     7,    11,     8,    12,     0,    13,    14,    16,    17,
503
       0,    18,    10,     0,     0,    19
504
};
505

506
static const yytype_int8 yycheck[] =
507
{
508
       5,     3,     0,     4,     8,    -1,     3,     6,     3,     9,
509
      -1,     7,     4,    -1,    -1,     9
510
};
511

512
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
513
   symbol of state STATE-NUM.  */
514
static const yytype_uint8 yystos[] =
515
{
516
       0,     5,    11,    14,    15,    16,    17,     3,     4,    12,
517
      14,     0,     8,     3,     6,    13,     3,     9,     7,     9
518
};
519

520
#define yyerrok		(yyerrstatus = 0)
521
#define yyclearin	(yychar = YYEMPTY)
522
#define YYEMPTY		(-2)
523
#define YYEOF		0
524

525
#define YYACCEPT	goto yyacceptlab
526
#define YYABORT		goto yyabortlab
527
#define YYERROR		goto yyerrorlab
528

529

530
/* Like YYERROR except do call yyerror.  This remains here temporarily
531
   to ease the transition to the new meaning of YYERROR, for GCC.
532
   Once GCC version 2 has supplanted version 1, this can go.  However,
533
   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
534
   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
535
   discussed.  */
536

537
#define YYFAIL		goto yyerrlab
538
#if defined YYFAIL
539
  /* This is here to suppress warnings from the GCC cpp's
540
     -Wunused-macros.  Normally we don't worry about that warning, but
541
     some users do, and we want to make it easy for users to remove
542
     YYFAIL uses, which will produce warnings from Bison 2.5.  */
543
#endif
544

545
#define YYRECOVERING()  (!!yyerrstatus)
546

547
#define YYBACKUP(Token, Value)					\
548
do								\
549
  if (yychar == YYEMPTY && yylen == 1)				\
550
    {								\
551
      yychar = (Token);						\
552
      yylval = (Value);						\
553
      yytoken = YYTRANSLATE (yychar);				\
554
      YYPOPSTACK (1);						\
555
      goto yybackup;						\
556
    }								\
557
  else								\
558
    {								\
559
      yyerror (YY_("syntax error: cannot back up")); \
560
      YYERROR;							\
561
    }								\
562
while (YYID (0))
563

564

565
#define YYTERROR	1
566
#define YYERRCODE	256
567

568

569
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
570
   If N is 0, then set CURRENT to the empty location which ends
571
   the previous symbol: RHS[0] (always defined).  */
572

573
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
574
#ifndef YYLLOC_DEFAULT
575
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
576
    do									\
577
      if (YYID (N))                                                    \
578
	{								\
579
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
580
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
581
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
582
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
583
	}								\
584
      else								\
585
	{								\
586
	  (Current).first_line   = (Current).last_line   =		\
587
	    YYRHSLOC (Rhs, 0).last_line;				\
588
	  (Current).first_column = (Current).last_column =		\
589
	    YYRHSLOC (Rhs, 0).last_column;				\
590
	}								\
591
    while (YYID (0))
592
#endif
593

594

595
/* YY_LOCATION_PRINT -- Print the location on the stream.
596
   This macro was not mandated originally: define only if we know
597
   we won't break user code: when these are the locations we know.  */
598

599
#ifndef YY_LOCATION_PRINT
600
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
601
#  define YY_LOCATION_PRINT(File, Loc)			\
602
     fprintf (File, "%d.%d-%d.%d",			\
603
	      (Loc).first_line, (Loc).first_column,	\
604
	      (Loc).last_line,  (Loc).last_column)
605
# else
606
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
607
# endif
608
#endif
609

610

611
/* YYLEX -- calling `yylex' with the right arguments.  */
612

613
#ifdef YYLEX_PARAM
614
# define YYLEX yylex (YYLEX_PARAM)
615
#else
616
# define YYLEX yylex ()
617
#endif
618

619
/* Enable debugging if requested.  */
620
#if YYDEBUG
621

622
# ifndef YYFPRINTF
623
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
624
#  define YYFPRINTF fprintf
625
# endif
626

627
# define YYDPRINTF(Args)			\
628
do {						\
629
  if (yydebug)					\
630
    YYFPRINTF Args;				\
631
} while (YYID (0))
632

633
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
634
do {									  \
635
  if (yydebug)								  \
636
    {									  \
637
      YYFPRINTF (stderr, "%s ", Title);					  \
638
      yy_symbol_print (stderr,						  \
639
		  Type, Value); \
640
      YYFPRINTF (stderr, "\n");						  \
641
    }									  \
642
} while (YYID (0))
643

644

645
/*--------------------------------.
646
| Print this symbol on YYOUTPUT.  |
647
`--------------------------------*/
648

649
/*ARGSUSED*/
650
#if (defined __STDC__ || defined __C99__FUNC__ \
651
     || defined __cplusplus || defined _MSC_VER)
652
static void
653
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
654
#else
655
static void
656
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
657
    FILE *yyoutput;
658
    int yytype;
659
    YYSTYPE const * const yyvaluep;
660
#endif
661
{
662
  if (!yyvaluep)
663
    return;
664
# ifdef YYPRINT
665
  if (yytype < YYNTOKENS)
666
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
667
# else
668
  YYUSE (yyoutput);
669
# endif
670
  switch (yytype)
671
    {
672
      default:
673
	break;
674
    }
675
}
676

677

678
/*--------------------------------.
679
| Print this symbol on YYOUTPUT.  |
680
`--------------------------------*/
681

682
#if (defined __STDC__ || defined __C99__FUNC__ \
683
     || defined __cplusplus || defined _MSC_VER)
684
static void
685
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
686
#else
687
static void
688
yy_symbol_print (yyoutput, yytype, yyvaluep)
689
    FILE *yyoutput;
690
    int yytype;
691
    YYSTYPE const * const yyvaluep;
692
#endif
693
{
694
  if (yytype < YYNTOKENS)
695
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
696
  else
697
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
698

699
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
700
  YYFPRINTF (yyoutput, ")");
701
}
702

703
/*------------------------------------------------------------------.
704
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
705
| TOP (included).                                                   |
706
`------------------------------------------------------------------*/
707

708
#if (defined __STDC__ || defined __C99__FUNC__ \
709
     || defined __cplusplus || defined _MSC_VER)
710
static void
711
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
712
#else
713
static void
714
yy_stack_print (yybottom, yytop)
715
    yytype_int16 *yybottom;
716
    yytype_int16 *yytop;
717
#endif
718
{
719
  YYFPRINTF (stderr, "Stack now");
720
  for (; yybottom <= yytop; yybottom++)
721
    {
722
      int yybot = *yybottom;
723
      YYFPRINTF (stderr, " %d", yybot);
724
    }
725
  YYFPRINTF (stderr, "\n");
726
}
727

728
# define YY_STACK_PRINT(Bottom, Top)				\
729
do {								\
730
  if (yydebug)							\
731
    yy_stack_print ((Bottom), (Top));				\
732
} while (YYID (0))
733

734

735
/*------------------------------------------------.
736
| Report that the YYRULE is going to be reduced.  |
737
`------------------------------------------------*/
738

739
#if (defined __STDC__ || defined __C99__FUNC__ \
740
     || defined __cplusplus || defined _MSC_VER)
741
static void
742
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
743
#else
744
static void
745
yy_reduce_print (yyvsp, yyrule)
746
    YYSTYPE *yyvsp;
747
    int yyrule;
748
#endif
749
{
750
  int yynrhs = yyr2[yyrule];
751
  int yyi;
752
  unsigned long int yylno = yyrline[yyrule];
753
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
754
	     yyrule - 1, yylno);
755
  /* The symbols being reduced.  */
756
  for (yyi = 0; yyi < yynrhs; yyi++)
757
    {
758
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
759
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
760
		       &(yyvsp[(yyi + 1) - (yynrhs)])
761
		       		       );
762
      YYFPRINTF (stderr, "\n");
763
    }
764
}
765

766
# define YY_REDUCE_PRINT(Rule)		\
767
do {					\
768
  if (yydebug)				\
769
    yy_reduce_print (yyvsp, Rule); \
770
} while (YYID (0))
771

772
/* Nonzero means print parse trace.  It is left uninitialized so that
773
   multiple parsers can coexist.  */
774
int yydebug;
775
#else /* !YYDEBUG */
776
# define YYDPRINTF(Args)
777
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
778
# define YY_STACK_PRINT(Bottom, Top)
779
# define YY_REDUCE_PRINT(Rule)
780
#endif /* !YYDEBUG */
781

782

783
/* YYINITDEPTH -- initial size of the parser's stacks.  */
784
#ifndef	YYINITDEPTH
785
# define YYINITDEPTH 200
786
#endif
787

788
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
789
   if the built-in stack extension method is used).
790

791
   Do not make this value too large; the results are undefined if
792
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
793
   evaluated with infinite-precision integer arithmetic.  */
794

795
#ifndef YYMAXDEPTH
796
# define YYMAXDEPTH 10000
797
#endif
798

799

800

801
#if YYERROR_VERBOSE
802

803
# ifndef yystrlen
804
#  if defined __GLIBC__ && defined _STRING_H
805
#   define yystrlen strlen
806
#  else
807
/* Return the length of YYSTR.  */
808
#if (defined __STDC__ || defined __C99__FUNC__ \
809
     || defined __cplusplus || defined _MSC_VER)
810
static YYSIZE_T
811
yystrlen (const char *yystr)
812
#else
813
static YYSIZE_T
814
yystrlen (yystr)
815
    const char *yystr;
816
#endif
817
{
818
  YYSIZE_T yylen;
819
  for (yylen = 0; yystr[yylen]; yylen++)
820
    continue;
821
  return yylen;
822
}
823
#  endif
824
# endif
825

826
# ifndef yystpcpy
827
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
828
#   define yystpcpy stpcpy
829
#  else
830
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
831
   YYDEST.  */
832
#if (defined __STDC__ || defined __C99__FUNC__ \
833
     || defined __cplusplus || defined _MSC_VER)
834
static char *
835
yystpcpy (char *yydest, const char *yysrc)
836
#else
837
static char *
838
yystpcpy (yydest, yysrc)
839
    char *yydest;
840
    const char *yysrc;
841
#endif
842
{
843
  char *yyd = yydest;
844
  const char *yys = yysrc;
845

846
  while ((*yyd++ = *yys++) != '\0')
847
    continue;
848

849
  return yyd - 1;
850
}
851
#  endif
852
# endif
853

854
# ifndef yytnamerr
855
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
856
   quotes and backslashes, so that it's suitable for yyerror.  The
857
   heuristic is that double-quoting is unnecessary unless the string
858
   contains an apostrophe, a comma, or backslash (other than
859
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
860
   null, do not copy; instead, return the length of what the result
861
   would have been.  */
862
static YYSIZE_T
863
yytnamerr (char *yyres, const char *yystr)
864
{
865
  if (*yystr == '"')
866
    {
867
      YYSIZE_T yyn = 0;
868
      char const *yyp = yystr;
869

870
      for (;;)
871
	switch (*++yyp)
872
	  {
873
	  case '\'':
874
	  case ',':
875
	    goto do_not_strip_quotes;
876

877
	  case '\\':
878
	    if (*++yyp != '\\')
879
	      goto do_not_strip_quotes;
880
	    /* Fall through.  */
881
	  default:
882
	    if (yyres)
883
	      yyres[yyn] = *yyp;
884
	    yyn++;
885
	    break;
886

887
	  case '"':
888
	    if (yyres)
889
	      yyres[yyn] = '\0';
890
	    return yyn;
891
	  }
892
    do_not_strip_quotes: ;
893
    }
894

895
  if (! yyres)
896
    return yystrlen (yystr);
897

898
  return yystpcpy (yyres, yystr) - yyres;
899
}
900
# endif
901

902
/* Copy into YYRESULT an error message about the unexpected token
903
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
904
   including the terminating null byte.  If YYRESULT is null, do not
905
   copy anything; just return the number of bytes that would be
906
   copied.  As a special case, return 0 if an ordinary "syntax error"
907
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
908
   size calculation.  */
909
static YYSIZE_T
910
yysyntax_error (char *yyresult, int yystate, int yychar)
911
{
912
  int yyn = yypact[yystate];
913

914
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
915
    return 0;
916
  else
917
    {
918
      int yytype = YYTRANSLATE (yychar);
919
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
920
      YYSIZE_T yysize = yysize0;
921
      YYSIZE_T yysize1;
922
      int yysize_overflow = 0;
923
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
924
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
925
      int yyx;
926

927
# if 0
928
      /* This is so xgettext sees the translatable formats that are
929
	 constructed on the fly.  */
930
      YY_("syntax error, unexpected %s");
931
      YY_("syntax error, unexpected %s, expecting %s");
932
      YY_("syntax error, unexpected %s, expecting %s or %s");
933
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
934
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
935
# endif
936
      char *yyfmt;
937
      char const *yyf;
938
      static char const yyunexpected[] = "syntax error, unexpected %s";
939
      static char const yyexpecting[] = ", expecting %s";
940
      static char const yyor[] = " or %s";
941
      char yyformat[sizeof yyunexpected
942
		    + sizeof yyexpecting - 1
943
		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
944
		       * (sizeof yyor - 1))];
945
      char const *yyprefix = yyexpecting;
946

947
      /* Start YYX at -YYN if negative to avoid negative indexes in
948
	 YYCHECK.  */
949
      int yyxbegin = yyn < 0 ? -yyn : 0;
950

951
      /* Stay within bounds of both yycheck and yytname.  */
952
      int yychecklim = YYLAST - yyn + 1;
953
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
954
      int yycount = 1;
955

956
      yyarg[0] = yytname[yytype];
957
      yyfmt = yystpcpy (yyformat, yyunexpected);
958

959
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
960
	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
961
	  {
962
	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
963
	      {
964
		yycount = 1;
965
		yysize = yysize0;
966
		yyformat[sizeof yyunexpected - 1] = '\0';
967
		break;
968
	      }
969
	    yyarg[yycount++] = yytname[yyx];
970
	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
971
	    yysize_overflow |= (yysize1 < yysize);
972
	    yysize = yysize1;
973
	    yyfmt = yystpcpy (yyfmt, yyprefix);
974
	    yyprefix = yyor;
975
	  }
976

977
      yyf = YY_(yyformat);
978
      yysize1 = yysize + yystrlen (yyf);
979
      yysize_overflow |= (yysize1 < yysize);
980
      yysize = yysize1;
981

982
      if (yysize_overflow)
983
	return YYSIZE_MAXIMUM;
984

985
      if (yyresult)
986
	{
987
	  /* Avoid sprintf, as that infringes on the user's name space.
988
	     Don't have undefined behavior even if the translation
989
	     produced a string with the wrong number of "%s"s.  */
990
	  char *yyp = yyresult;
991
	  int yyi = 0;
992
	  while ((*yyp = *yyf) != '\0')
993
	    {
994
	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
995
		{
996
		  yyp += yytnamerr (yyp, yyarg[yyi++]);
997
		  yyf += 2;
998
		}
999
	      else
1000
		{
1001
		  yyp++;
1002
		  yyf++;
1003
		}
1004
	    }
1005
	}
1006
      return yysize;
1007
    }
1008
}
1009
#endif /* YYERROR_VERBOSE */
1010

1011

1012
/*-----------------------------------------------.
1013
| Release the memory associated to this symbol.  |
1014
`-----------------------------------------------*/
1015

1016
/*ARGSUSED*/
1017
#if (defined __STDC__ || defined __C99__FUNC__ \
1018
     || defined __cplusplus || defined _MSC_VER)
1019
static void
1020
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1021
#else
1022
static void
1023
yydestruct (yymsg, yytype, yyvaluep)
1024
    const char *yymsg;
1025
    int yytype;
1026
    YYSTYPE *yyvaluep;
1027
#endif
1028
{
1029
  YYUSE (yyvaluep);
1030

1031
  if (!yymsg)
1032
    yymsg = "Deleting";
1033
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1034

1035
  switch (yytype)
1036
    {
1037

1038
      default:
1039
	break;
1040
    }
1041
}
1042

1043
/* Prevent warnings from -Wmissing-prototypes.  */
1044
#ifdef YYPARSE_PARAM
1045
#if defined __STDC__ || defined __cplusplus
1046
int yyparse (void *YYPARSE_PARAM);
1047
#else
1048
int yyparse ();
1049
#endif
1050
#else /* ! YYPARSE_PARAM */
1051
#if defined __STDC__ || defined __cplusplus
1052
int yyparse (void);
1053
#else
1054
int yyparse ();
1055
#endif
1056
#endif /* ! YYPARSE_PARAM */
1057

1058

1059
/* The lookahead symbol.  */
1060
int yychar;
1061

1062
/* The semantic value of the lookahead symbol.  */
1063
YYSTYPE yylval;
1064

1065
/* Number of syntax errors so far.  */
1066
int yynerrs;
1067

1068

1069

1070
/*-------------------------.
1071
| yyparse or yypush_parse.  |
1072
`-------------------------*/
1073

1074
#ifdef YYPARSE_PARAM
1075
#if (defined __STDC__ || defined __C99__FUNC__ \
1076
     || defined __cplusplus || defined _MSC_VER)
1077
int
1078
yyparse (void *YYPARSE_PARAM)
1079
#else
1080
int
1081
yyparse (YYPARSE_PARAM)
1082
    void *YYPARSE_PARAM;
1083
#endif
1084
#else /* ! YYPARSE_PARAM */
1085
#if (defined __STDC__ || defined __C99__FUNC__ \
1086
     || defined __cplusplus || defined _MSC_VER)
1087
int
1088
yyparse (void)
1089
#else
1090
int
1091
yyparse ()
1092

1093
#endif
1094
#endif
1095
{
1096

1097

1098
    int yystate;
1099
    /* Number of tokens to shift before error messages enabled.  */
1100
    int yyerrstatus;
1101

1102
    /* The stacks and their tools:
1103
       `yyss': related to states.
1104
       `yyvs': related to semantic values.
1105

1106
       Refer to the stacks through separate pointers, to allow yyoverflow
1107
       to reallocate them elsewhere.  */
1108

1109
    /* The state stack.  */
1110
    yytype_int16 yyssa[YYINITDEPTH];
1111
    yytype_int16 *yyss;
1112
    yytype_int16 *yyssp;
1113

1114
    /* The semantic value stack.  */
1115
    YYSTYPE yyvsa[YYINITDEPTH];
1116
    YYSTYPE *yyvs;
1117
    YYSTYPE *yyvsp;
1118

1119
    YYSIZE_T yystacksize;
1120

1121
  int yyn;
1122
  int yyresult;
1123
  /* Lookahead token as an internal (translated) token number.  */
1124
  int yytoken;
1125
  /* The variables used to return semantic value and location from the
1126
     action routines.  */
1127
  YYSTYPE yyval;
1128

1129
#if YYERROR_VERBOSE
1130
  /* Buffer for error messages, and its allocated size.  */
1131
  char yymsgbuf[128];
1132
  char *yymsg = yymsgbuf;
1133
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1134
#endif
1135

1136
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1137

1138
  /* The number of symbols on the RHS of the reduced rule.
1139
     Keep to zero when no symbol should be popped.  */
1140
  int yylen = 0;
1141

1142
  yytoken = 0;
1143
  yyss = yyssa;
1144
  yyvs = yyvsa;
1145
  yystacksize = YYINITDEPTH;
1146

1147
  YYDPRINTF ((stderr, "Starting parse\n"));
1148

1149
  yystate = 0;
1150
  yyerrstatus = 0;
1151
  yynerrs = 0;
1152
  yychar = YYEMPTY; /* Cause a token to be read.  */
1153

1154
  /* Initialize stack pointers.
1155
     Waste one element of value and location stack
1156
     so that they stay on the same level as the state stack.
1157
     The wasted elements are never initialized.  */
1158
  yyssp = yyss;
1159
  yyvsp = yyvs;
1160

1161
  goto yysetstate;
1162

1163
/*------------------------------------------------------------.
1164
| yynewstate -- Push a new state, which is found in yystate.  |
1165
`------------------------------------------------------------*/
1166
 yynewstate:
1167
  /* In all cases, when you get here, the value and location stacks
1168
     have just been pushed.  So pushing a state here evens the stacks.  */
1169
  yyssp++;
1170

1171
 yysetstate:
1172
  *yyssp = yystate;
1173

1174
  if (yyss + yystacksize - 1 <= yyssp)
1175
    {
1176
      /* Get the current used size of the three stacks, in elements.  */
1177
      YYSIZE_T yysize = yyssp - yyss + 1;
1178

1179
#ifdef yyoverflow
1180
      {
1181
	/* Give user a chance to reallocate the stack.  Use copies of
1182
	   these so that the &'s don't force the real ones into
1183
	   memory.  */
1184
	YYSTYPE *yyvs1 = yyvs;
1185
	yytype_int16 *yyss1 = yyss;
1186

1187
	/* Each stack pointer address is followed by the size of the
1188
	   data in use in that stack, in bytes.  This used to be a
1189
	   conditional around just the two extra args, but that might
1190
	   be undefined if yyoverflow is a macro.  */
1191
	yyoverflow (YY_("memory exhausted"),
1192
		    &yyss1, yysize * sizeof (*yyssp),
1193
		    &yyvs1, yysize * sizeof (*yyvsp),
1194
		    &yystacksize);
1195

1196
	yyss = yyss1;
1197
	yyvs = yyvs1;
1198
      }
1199
#else /* no yyoverflow */
1200
# ifndef YYSTACK_RELOCATE
1201
      goto yyexhaustedlab;
1202
# else
1203
      /* Extend the stack our own way.  */
1204
      if (YYMAXDEPTH <= yystacksize)
1205
	goto yyexhaustedlab;
1206
      yystacksize *= 2;
1207
      if (YYMAXDEPTH < yystacksize)
1208
	yystacksize = YYMAXDEPTH;
1209

1210
      {
1211
	yytype_int16 *yyss1 = yyss;
1212
	union yyalloc *yyptr =
1213
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1214
	if (! yyptr)
1215
	  goto yyexhaustedlab;
1216
	YYSTACK_RELOCATE (yyss_alloc, yyss);
1217
	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1218
#  undef YYSTACK_RELOCATE
1219
	if (yyss1 != yyssa)
1220
	  YYSTACK_FREE (yyss1);
1221
      }
1222
# endif
1223
#endif /* no yyoverflow */
1224

1225
      yyssp = yyss + yysize - 1;
1226
      yyvsp = yyvs + yysize - 1;
1227

1228
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1229
		  (unsigned long int) yystacksize));
1230

1231
      if (yyss + yystacksize - 1 <= yyssp)
1232
	YYABORT;
1233
    }
1234

1235
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1236

1237
  if (yystate == YYFINAL)
1238
    YYACCEPT;
1239

1240
  goto yybackup;
1241

1242
/*-----------.
1243
| yybackup.  |
1244
`-----------*/
1245
yybackup:
1246

1247
  /* Do appropriate processing given the current state.  Read a
1248
     lookahead token if we need one and don't already have one.  */
1249

1250
  /* First try to decide what to do without reference to lookahead token.  */
1251
  yyn = yypact[yystate];
1252
  if (yyn == YYPACT_NINF)
1253
    goto yydefault;
1254

1255
  /* Not known => get a lookahead token if don't already have one.  */
1256

1257
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1258
  if (yychar == YYEMPTY)
1259
    {
1260
      YYDPRINTF ((stderr, "Reading a token: "));
1261
      yychar = YYLEX;
1262
    }
1263

1264
  if (yychar <= YYEOF)
1265
    {
1266
      yychar = yytoken = YYEOF;
1267
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1268
    }
1269
  else
1270
    {
1271
      yytoken = YYTRANSLATE (yychar);
1272
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1273
    }
1274

1275
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1276
     detect an error, take that action.  */
1277
  yyn += yytoken;
1278
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1279
    goto yydefault;
1280
  yyn = yytable[yyn];
1281
  if (yyn <= 0)
1282
    {
1283
      if (yyn == 0 || yyn == YYTABLE_NINF)
1284
	goto yyerrlab;
1285
      yyn = -yyn;
1286
      goto yyreduce;
1287
    }
1288

1289
  /* Count tokens shifted since error; after three, turn off error
1290
     status.  */
1291
  if (yyerrstatus)
1292
    yyerrstatus--;
1293

1294
  /* Shift the lookahead token.  */
1295
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1296

1297
  /* Discard the shifted token.  */
1298
  yychar = YYEMPTY;
1299

1300
  yystate = yyn;
1301
  *++yyvsp = yylval;
1302

1303
  goto yynewstate;
1304

1305

1306
/*-----------------------------------------------------------.
1307
| yydefault -- do the default action for the current state.  |
1308
`-----------------------------------------------------------*/
1309
yydefault:
1310
  yyn = yydefact[yystate];
1311
  if (yyn == 0)
1312
    goto yyerrlab;
1313
  goto yyreduce;
1314

1315

1316
/*-----------------------------.
1317
| yyreduce -- Do a reduction.  |
1318
`-----------------------------*/
1319
yyreduce:
1320
  /* yyn is the number of a rule to reduce with.  */
1321
  yylen = yyr2[yyn];
1322

1323
  /* If YYLEN is nonzero, implement the default value of the action:
1324
     `$$ = $1'.
1325

1326
     Otherwise, the following line sets YYVAL to garbage.
1327
     This behavior is undocumented and Bison
1328
     users should not rely upon it.  Assigning to YYVAL
1329
     unconditionally makes the parser a bit smaller, and it avoids a
1330
     GCC warning that YYVAL may be used uninitialized.  */
1331
  yyval = yyvsp[1-yylen];
1332

1333

1334
  YY_REDUCE_PRINT (yyn);
1335
  switch (yyn)
1336
    {
1337
        case 2:
1338

1339
/* Line 1464 of yacc.c  */
1340
#line 39 "SelectionFilter.y"
1341
    { (yyval.string) = (yyvsp[(2) - (2)].string) ;}
1342
    break;
1343

1344
  case 3:
1345

1346
/* Line 1464 of yacc.c  */
1347
#line 40 "SelectionFilter.y"
1348
    { (yyval.string) = StringFactory::New(*(yyvsp[(2) - (4)].string) + "::" + *(yyvsp[(4) - (4)].string)) ;}
1349
    break;
1350

1351
  case 4:
1352

1353
/* Line 1464 of yacc.c  */
1354
#line 42 "SelectionFilter.y"
1355
    { (yyval.string) = 0  ;}
1356
    break;
1357

1358
  case 5:
1359

1360
/* Line 1464 of yacc.c  */
1361
#line 43 "SelectionFilter.y"
1362
    { (yyval.string) = (yyvsp[(2) - (2)].string) ;}
1363
    break;
1364

1365
  case 6:
1366

1367
/* Line 1464 of yacc.c  */
1368
#line 45 "SelectionFilter.y"
1369
    { (yyval.slice) = 0                     ;}
1370
    break;
1371

1372
  case 7:
1373

1374
/* Line 1464 of yacc.c  */
1375
#line 46 "SelectionFilter.y"
1376
    { (yyval.slice) = new Node_Slice((yyvsp[(2) - (4)].number),(yyvsp[(4) - (4)].number)) ;}
1377
    break;
1378

1379
  case 8:
1380

1381
/* Line 1464 of yacc.c  */
1382
#line 47 "SelectionFilter.y"
1383
    { (yyval.slice) = new Node_Slice((yyvsp[(2) - (3)].number))    ;}
1384
    break;
1385

1386
  case 9:
1387

1388
/* Line 1464 of yacc.c  */
1389
#line 48 "SelectionFilter.y"
1390
    { (yyval.slice) = new Node_Slice((yyvsp[(2) - (2)].number),(yyvsp[(2) - (2)].number)) ;}
1391
    break;
1392

1393
  case 10:
1394

1395
/* Line 1464 of yacc.c  */
1396
#line 50 "SelectionFilter.y"
1397
    { (yyval.object) = new Node_Object((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string),(yyvsp[(3) - (3)].slice)) ;}
1398
    break;
1399

1400
  case 11:
1401

1402
/* Line 1464 of yacc.c  */
1403
#line 52 "SelectionFilter.y"
1404
    { (yyval.block) = new Node_Block((yyvsp[(1) - (1)].object));  ;}
1405
    break;
1406

1407
  case 12:
1408

1409
/* Line 1464 of yacc.c  */
1410
#line 53 "SelectionFilter.y"
1411
    { (yyval.block) = (yyvsp[(1) - (2)].block) ; (yyval.block)->Objects.emplace_back((yyvsp[(2) - (2)].object)); ;}
1412
    break;
1413

1414
  case 13:
1415

1416
/* Line 1464 of yacc.c  */
1417
#line 55 "SelectionFilter.y"
1418
    { (yyval.block) = (yyvsp[(1) - (1)].block) ;}
1419
    break;
1420

1421
  case 14:
1422

1423
/* Line 1464 of yacc.c  */
1424
#line 57 "SelectionFilter.y"
1425
    { TopBlock = (yyvsp[(1) - (1)].block) ;}
1426
    break;
1427

1428

1429

1430
/* Line 1464 of yacc.c  */
1431
#line 1432 "SelectionFilter.tab.c"
1432
      default: break;
1433
    }
1434
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1435

1436
  YYPOPSTACK (yylen);
1437
  yylen = 0;
1438
  YY_STACK_PRINT (yyss, yyssp);
1439

1440
  *++yyvsp = yyval;
1441

1442
  /* Now `shift' the result of the reduction.  Determine what state
1443
     that goes to, based on the state we popped back to and the rule
1444
     number reduced by.  */
1445

1446
  yyn = yyr1[yyn];
1447

1448
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1449
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1450
    yystate = yytable[yystate];
1451
  else
1452
    yystate = yydefgoto[yyn - YYNTOKENS];
1453

1454
  goto yynewstate;
1455

1456

1457
/*------------------------------------.
1458
| yyerrlab -- here on detecting error |
1459
`------------------------------------*/
1460
yyerrlab:
1461
  /* If not already recovering from an error, report this error.  */
1462
  if (!yyerrstatus)
1463
    {
1464
      ++yynerrs;
1465
#if ! YYERROR_VERBOSE
1466
      yyerror (YY_("syntax error"));
1467
#else
1468
      {
1469
	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1470
	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1471
	  {
1472
	    YYSIZE_T yyalloc = 2 * yysize;
1473
	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1474
	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
1475
	    if (yymsg != yymsgbuf)
1476
	      YYSTACK_FREE (yymsg);
1477
	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1478
	    if (yymsg)
1479
	      yymsg_alloc = yyalloc;
1480
	    else
1481
	      {
1482
		yymsg = yymsgbuf;
1483
		yymsg_alloc = sizeof yymsgbuf;
1484
	      }
1485
	  }
1486

1487
	if (0 < yysize && yysize <= yymsg_alloc)
1488
	  {
1489
	    (void) yysyntax_error (yymsg, yystate, yychar);
1490
	    yyerror (yymsg);
1491
	  }
1492
	else
1493
	  {
1494
	    yyerror (YY_("syntax error"));
1495
	    if (yysize != 0)
1496
	      goto yyexhaustedlab;
1497
	  }
1498
      }
1499
#endif
1500
    }
1501

1502

1503

1504
  if (yyerrstatus == 3)
1505
    {
1506
      /* If just tried and failed to reuse lookahead token after an
1507
	 error, discard it.  */
1508

1509
      if (yychar <= YYEOF)
1510
	{
1511
	  /* Return failure if at end of input.  */
1512
	  if (yychar == YYEOF)
1513
	    YYABORT;
1514
	}
1515
      else
1516
	{
1517
	  yydestruct ("Error: discarding",
1518
		      yytoken, &yylval);
1519
	  yychar = YYEMPTY;
1520
	}
1521
    }
1522

1523
  /* Else will try to reuse lookahead token after shifting the error
1524
     token.  */
1525
  goto yyerrlab1;
1526

1527

1528
/*---------------------------------------------------.
1529
| yyerrorlab -- error raised explicitly by YYERROR.  |
1530
`---------------------------------------------------*/
1531
yyerrorlab:
1532

1533
  /* Pacify compilers like GCC when the user code never invokes
1534
     YYERROR and the label yyerrorlab therefore never appears in user
1535
     code.  */
1536
  if (/*CONSTCOND*/ 0)
1537
     goto yyerrorlab;
1538

1539
  /* Do not reclaim the symbols of the rule which action triggered
1540
     this YYERROR.  */
1541
  YYPOPSTACK (yylen);
1542
  yylen = 0;
1543
  YY_STACK_PRINT (yyss, yyssp);
1544
  yystate = *yyssp;
1545
  goto yyerrlab1;
1546

1547

1548
/*-------------------------------------------------------------.
1549
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1550
`-------------------------------------------------------------*/
1551
yyerrlab1:
1552
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
1553

1554
  for (;;)
1555
    {
1556
      yyn = yypact[yystate];
1557
      if (yyn != YYPACT_NINF)
1558
	{
1559
	  yyn += YYTERROR;
1560
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1561
	    {
1562
	      yyn = yytable[yyn];
1563
	      if (0 < yyn)
1564
		break;
1565
	    }
1566
	}
1567

1568
      /* Pop the current state because it cannot handle the error token.  */
1569
      if (yyssp == yyss)
1570
	YYABORT;
1571

1572

1573
      yydestruct ("Error: popping",
1574
		  yystos[yystate], yyvsp);
1575
      YYPOPSTACK (1);
1576
      yystate = *yyssp;
1577
      YY_STACK_PRINT (yyss, yyssp);
1578
    }
1579

1580
  *++yyvsp = yylval;
1581

1582

1583
  /* Shift the error token.  */
1584
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1585

1586
  yystate = yyn;
1587
  goto yynewstate;
1588

1589

1590
/*-------------------------------------.
1591
| yyacceptlab -- YYACCEPT comes here.  |
1592
`-------------------------------------*/
1593
yyacceptlab:
1594
  yyresult = 0;
1595
  goto yyreturn;
1596

1597
/*-----------------------------------.
1598
| yyabortlab -- YYABORT comes here.  |
1599
`-----------------------------------*/
1600
yyabortlab:
1601
  yyresult = 1;
1602
  goto yyreturn;
1603

1604
#if !defined(yyoverflow) || YYERROR_VERBOSE
1605
/*-------------------------------------------------.
1606
| yyexhaustedlab -- memory exhaustion comes here.  |
1607
`-------------------------------------------------*/
1608
yyexhaustedlab:
1609
  yyerror (YY_("memory exhausted"));
1610
  yyresult = 2;
1611
  /* Fall through.  */
1612
#endif
1613

1614
yyreturn:
1615
  if (yychar != YYEMPTY)
1616
     yydestruct ("Cleanup: discarding lookahead",
1617
		 yytoken, &yylval);
1618
  /* Do not reclaim the symbols of the rule which action triggered
1619
     this YYABORT or YYACCEPT.  */
1620
  YYPOPSTACK (yylen);
1621
  YY_STACK_PRINT (yyss, yyssp);
1622
  while (yyssp != yyss)
1623
    {
1624
      yydestruct ("Cleanup: popping",
1625
		  yystos[*yyssp], yyvsp);
1626
      YYPOPSTACK (1);
1627
    }
1628
#ifndef yyoverflow
1629
  if (yyss != yyssa)
1630
    YYSTACK_FREE (yyss);
1631
#endif
1632
#if YYERROR_VERBOSE
1633
  if (yymsg != yymsgbuf)
1634
    YYSTACK_FREE (yymsg);
1635
#endif
1636
  /* Make sure YYID is used.  */
1637
  return YYID (yyresult);
1638
}
1639

1640

1641

1642
/* Line 1684 of yacc.c  */
1643
#line 61 "SelectionFilter.y"
1644

1645

1646

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.