s4:heimdal Import generated files from heimdal tree
[abartlet/samba.git/.git] / source4 / heimdal / lib / hx509 / sel-gram.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
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.
13    
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.
18    
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/>.  */
21
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.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
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.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66
67
68 /* Copy the first part of user declarations.  */
69
70 /* Line 189 of yacc.c  */
71 #line 34 "sel-gram.y"
72
73 #ifdef HAVE_CONFIG_H
74 #include <config.h>
75 #endif
76 #include <stdio.h>
77 #include <stdlib.h>
78 #include <hx_locl.h>
79
80
81
82
83 /* Line 189 of yacc.c  */
84 #line 85 "sel-gram.c"
85
86 /* Enabling traces.  */
87 #ifndef YYDEBUG
88 # define YYDEBUG 0
89 #endif
90
91 /* Enabling verbose error messages.  */
92 #ifdef YYERROR_VERBOSE
93 # undef YYERROR_VERBOSE
94 # define YYERROR_VERBOSE 1
95 #else
96 # define YYERROR_VERBOSE 0
97 #endif
98
99 /* Enabling the token table.  */
100 #ifndef YYTOKEN_TABLE
101 # define YYTOKEN_TABLE 0
102 #endif
103
104
105 /* Tokens.  */
106 #ifndef YYTOKENTYPE
107 # define YYTOKENTYPE
108    /* Put the tokens into the symbol table, so that GDB and other debuggers
109       know about them.  */
110    enum yytokentype {
111      kw_TRUE = 258,
112      kw_FALSE = 259,
113      kw_AND = 260,
114      kw_OR = 261,
115      kw_IN = 262,
116      kw_TAILMATCH = 263,
117      NUMBER = 264,
118      STRING = 265,
119      IDENTIFIER = 266
120    };
121 #endif
122 /* Tokens.  */
123 #define kw_TRUE 258
124 #define kw_FALSE 259
125 #define kw_AND 260
126 #define kw_OR 261
127 #define kw_IN 262
128 #define kw_TAILMATCH 263
129 #define NUMBER 264
130 #define STRING 265
131 #define IDENTIFIER 266
132
133
134
135
136 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
137 typedef union YYSTYPE
138 {
139
140 /* Line 214 of yacc.c  */
141 #line 45 "sel-gram.y"
142
143     char *string;
144     struct hx_expr *expr;
145
146
147
148 /* Line 214 of yacc.c  */
149 #line 150 "sel-gram.c"
150 } YYSTYPE;
151 # define YYSTYPE_IS_TRIVIAL 1
152 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
153 # define YYSTYPE_IS_DECLARED 1
154 #endif
155
156
157 /* Copy the second part of user declarations.  */
158
159
160 /* Line 264 of yacc.c  */
161 #line 162 "sel-gram.c"
162
163 #ifdef short
164 # undef short
165 #endif
166
167 #ifdef YYTYPE_UINT8
168 typedef YYTYPE_UINT8 yytype_uint8;
169 #else
170 typedef unsigned char yytype_uint8;
171 #endif
172
173 #ifdef YYTYPE_INT8
174 typedef YYTYPE_INT8 yytype_int8;
175 #elif (defined __STDC__ || defined __C99__FUNC__ \
176      || defined __cplusplus || defined _MSC_VER)
177 typedef signed char yytype_int8;
178 #else
179 typedef short int yytype_int8;
180 #endif
181
182 #ifdef YYTYPE_UINT16
183 typedef YYTYPE_UINT16 yytype_uint16;
184 #else
185 typedef unsigned short int yytype_uint16;
186 #endif
187
188 #ifdef YYTYPE_INT16
189 typedef YYTYPE_INT16 yytype_int16;
190 #else
191 typedef short int yytype_int16;
192 #endif
193
194 #ifndef YYSIZE_T
195 # ifdef __SIZE_TYPE__
196 #  define YYSIZE_T __SIZE_TYPE__
197 # elif defined size_t
198 #  define YYSIZE_T size_t
199 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
200      || defined __cplusplus || defined _MSC_VER)
201 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
202 #  define YYSIZE_T size_t
203 # else
204 #  define YYSIZE_T unsigned int
205 # endif
206 #endif
207
208 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
209
210 #ifndef YY_
211 # if YYENABLE_NLS
212 #  if ENABLE_NLS
213 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
214 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
215 #  endif
216 # endif
217 # ifndef YY_
218 #  define YY_(msgid) msgid
219 # endif
220 #endif
221
222 /* Suppress unused-variable warnings by "using" E.  */
223 #if ! defined lint || defined __GNUC__
224 # define YYUSE(e) ((void) (e))
225 #else
226 # define YYUSE(e) /* empty */
227 #endif
228
229 /* Identity function, used to suppress warnings about constant conditions.  */
230 #ifndef lint
231 # define YYID(n) (n)
232 #else
233 #if (defined __STDC__ || defined __C99__FUNC__ \
234      || defined __cplusplus || defined _MSC_VER)
235 static int
236 YYID (int yyi)
237 #else
238 static int
239 YYID (yyi)
240     int yyi;
241 #endif
242 {
243   return yyi;
244 }
245 #endif
246
247 #if ! defined yyoverflow || YYERROR_VERBOSE
248
249 /* The parser invokes alloca or malloc; define the necessary symbols.  */
250
251 # ifdef YYSTACK_USE_ALLOCA
252 #  if YYSTACK_USE_ALLOCA
253 #   ifdef __GNUC__
254 #    define YYSTACK_ALLOC __builtin_alloca
255 #   elif defined __BUILTIN_VA_ARG_INCR
256 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
257 #   elif defined _AIX
258 #    define YYSTACK_ALLOC __alloca
259 #   elif defined _MSC_VER
260 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
261 #    define alloca _alloca
262 #   else
263 #    define YYSTACK_ALLOC alloca
264 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
265      || defined __cplusplus || defined _MSC_VER)
266 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
267 #     ifndef _STDLIB_H
268 #      define _STDLIB_H 1
269 #     endif
270 #    endif
271 #   endif
272 #  endif
273 # endif
274
275 # ifdef YYSTACK_ALLOC
276    /* Pacify GCC's `empty if-body' warning.  */
277 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
278 #  ifndef YYSTACK_ALLOC_MAXIMUM
279     /* The OS might guarantee only one guard page at the bottom of the stack,
280        and a page size can be as small as 4096 bytes.  So we cannot safely
281        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
282        to allow for a few compiler-allocated temporary stack slots.  */
283 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
284 #  endif
285 # else
286 #  define YYSTACK_ALLOC YYMALLOC
287 #  define YYSTACK_FREE YYFREE
288 #  ifndef YYSTACK_ALLOC_MAXIMUM
289 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
290 #  endif
291 #  if (defined __cplusplus && ! defined _STDLIB_H \
292        && ! ((defined YYMALLOC || defined malloc) \
293              && (defined YYFREE || defined free)))
294 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
295 #   ifndef _STDLIB_H
296 #    define _STDLIB_H 1
297 #   endif
298 #  endif
299 #  ifndef YYMALLOC
300 #   define YYMALLOC malloc
301 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
302      || defined __cplusplus || defined _MSC_VER)
303 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
304 #   endif
305 #  endif
306 #  ifndef YYFREE
307 #   define YYFREE free
308 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
309      || defined __cplusplus || defined _MSC_VER)
310 void free (void *); /* INFRINGES ON USER NAME SPACE */
311 #   endif
312 #  endif
313 # endif
314 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
315
316
317 #if (! defined yyoverflow \
318      && (! defined __cplusplus \
319          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
320
321 /* A type that is properly aligned for any stack member.  */
322 union yyalloc
323 {
324   yytype_int16 yyss_alloc;
325   YYSTYPE yyvs_alloc;
326 };
327
328 /* The size of the maximum gap between one aligned stack and the next.  */
329 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
330
331 /* The size of an array large to enough to hold all stacks, each with
332    N elements.  */
333 # define YYSTACK_BYTES(N) \
334      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
335       + YYSTACK_GAP_MAXIMUM)
336
337 /* Copy COUNT objects from FROM to TO.  The source and destination do
338    not overlap.  */
339 # ifndef YYCOPY
340 #  if defined __GNUC__ && 1 < __GNUC__
341 #   define YYCOPY(To, From, Count) \
342       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
343 #  else
344 #   define YYCOPY(To, From, Count)              \
345       do                                        \
346         {                                       \
347           YYSIZE_T yyi;                         \
348           for (yyi = 0; yyi < (Count); yyi++)   \
349             (To)[yyi] = (From)[yyi];            \
350         }                                       \
351       while (YYID (0))
352 #  endif
353 # endif
354
355 /* Relocate STACK from its old location to the new one.  The
356    local variables YYSIZE and YYSTACKSIZE give the old and new number of
357    elements in the stack, and YYPTR gives the new location of the
358    stack.  Advance YYPTR to a properly aligned location for the next
359    stack.  */
360 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
361     do                                                                  \
362       {                                                                 \
363         YYSIZE_T yynewbytes;                                            \
364         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
365         Stack = &yyptr->Stack_alloc;                                    \
366         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
367         yyptr += yynewbytes / sizeof (*yyptr);                          \
368       }                                                                 \
369     while (YYID (0))
370
371 #endif
372
373 /* YYFINAL -- State number of the termination state.  */
374 #define YYFINAL  21
375 /* YYLAST -- Last index in YYTABLE.  */
376 #define YYLAST   50
377
378 /* YYNTOKENS -- Number of terminals.  */
379 #define YYNTOKENS  21
380 /* YYNNTS -- Number of nonterminals.  */
381 #define YYNNTS  11
382 /* YYNRULES -- Number of rules.  */
383 #define YYNRULES  26
384 /* YYNRULES -- Number of states.  */
385 #define YYNSTATES  50
386
387 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
388 #define YYUNDEFTOK  2
389 #define YYMAXUTOK   266
390
391 #define YYTRANSLATE(YYX)                                                \
392   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
393
394 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
395 static const yytype_uint8 yytranslate[] =
396 {
397        0,     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,    12,     2,     2,     2,    17,     2,     2,
401       13,    14,     2,     2,    15,     2,    20,     2,     2,     2,
402        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
403        2,    16,     2,     2,     2,     2,     2,     2,     2,     2,
404        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
405        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
406        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
407        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
408        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
409        2,     2,     2,    18,     2,    19,     2,     2,     2,     2,
410        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
411        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
412        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
413        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
414        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
415        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
416        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
417        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
418        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
419        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
420        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
421        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
422        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
423        5,     6,     7,     8,     9,    10,    11
424 };
425
426 #if YYDEBUG
427 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
428    YYRHS.  */
429 static const yytype_uint8 yyprhs[] =
430 {
431        0,     0,     3,     5,     7,     9,    12,    16,    20,    24,
432       26,    28,    32,    37,    42,    46,    52,    56,    58,    60,
433       62,    64,    66,    68,    73,    78,    82
434 };
435
436 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
437 static const yytype_int8 yyrhs[] =
438 {
439       22,     0,    -1,    23,    -1,     3,    -1,     4,    -1,    12,
440       23,    -1,    23,     5,    23,    -1,    23,     6,    23,    -1,
441       13,    23,    14,    -1,    25,    -1,    26,    -1,    26,    15,
442       24,    -1,    26,    16,    16,    26,    -1,    26,    12,    16,
443       26,    -1,    26,     8,    26,    -1,    26,     7,    13,    24,
444       14,    -1,    26,     7,    30,    -1,    27,    -1,    28,    -1,
445       29,    -1,    30,    -1,     9,    -1,    10,    -1,    11,    13,
446       24,    14,    -1,    17,    18,    31,    19,    -1,    11,    20,
447       31,    -1,    11,    -1
448 };
449
450 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
451 static const yytype_uint8 yyrline[] =
452 {
453        0,    73,    73,    75,    76,    77,    78,    79,    80,    81,
454       84,    85,    88,    89,    90,    91,    92,    95,    96,    97,
455       98,   101,   102,   104,   107,   110,   112
456 };
457 #endif
458
459 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
460 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
461    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
462 static const char *const yytname[] =
463 {
464   "$end", "error", "$undefined", "kw_TRUE", "kw_FALSE", "kw_AND", "kw_OR",
465   "kw_IN", "kw_TAILMATCH", "NUMBER", "STRING", "IDENTIFIER", "'!'", "'('",
466   "')'", "','", "'='", "'%'", "'{'", "'}'", "'.'", "$accept", "start",
467   "expr", "words", "comp", "word", "number", "string", "function",
468   "variable", "variables", 0
469 };
470 #endif
471
472 # ifdef YYPRINT
473 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
474    token YYLEX-NUM.  */
475 static const yytype_uint16 yytoknum[] =
476 {
477        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
478      265,   266,    33,    40,    41,    44,    61,    37,   123,   125,
479       46
480 };
481 # endif
482
483 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
484 static const yytype_uint8 yyr1[] =
485 {
486        0,    21,    22,    23,    23,    23,    23,    23,    23,    23,
487       24,    24,    25,    25,    25,    25,    25,    26,    26,    26,
488       26,    27,    28,    29,    30,    31,    31
489 };
490
491 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
492 static const yytype_uint8 yyr2[] =
493 {
494        0,     2,     1,     1,     1,     2,     3,     3,     3,     1,
495        1,     3,     4,     4,     3,     5,     3,     1,     1,     1,
496        1,     1,     1,     4,     4,     3,     1
497 };
498
499 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
500    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
501    means the default is an error.  */
502 static const yytype_uint8 yydefact[] =
503 {
504        0,     3,     4,    21,    22,     0,     0,     0,     0,     0,
505        2,     9,     0,    17,    18,    19,    20,     0,     5,     0,
506        0,     1,     0,     0,     0,     0,     0,     0,     0,    10,
507        8,    26,     0,     6,     7,     0,    16,    14,     0,     0,
508       23,     0,     0,    24,     0,    13,    12,    11,    25,    15
509 };
510
511 /* YYDEFGOTO[NTERM-NUM].  */
512 static const yytype_int8 yydefgoto[] =
513 {
514       -1,     9,    10,    28,    11,    12,    13,    14,    15,    16,
515       32
516 };
517
518 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
519    STATE-NUM.  */
520 #define YYPACT_NINF -31
521 static const yytype_int8 yypact[] =
522 {
523       22,   -31,   -31,   -31,   -31,    -1,    22,    22,   -11,    27,
524       11,   -31,    -6,   -31,   -31,   -31,   -31,    19,    11,     9,
525       26,   -31,    22,    22,    -4,    19,    24,    25,    28,    23,
526      -31,    29,    31,    11,    11,    19,   -31,   -31,    19,    19,
527      -31,    19,    26,   -31,    30,   -31,   -31,   -31,   -31,   -31
528 };
529
530 /* YYPGOTO[NTERM-NUM].  */
531 static const yytype_int8 yypgoto[] =
532 {
533      -31,   -31,    -3,   -30,   -31,   -17,   -31,   -31,   -31,    21,
534        1
535 };
536
537 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
538    positive, shift that token.  If negative, reduce the rule which
539    number is the opposite.  If zero, do what YYDEFACT says.
540    If YYTABLE_NINF, syntax error.  */
541 #define YYTABLE_NINF -1
542 static const yytype_uint8 yytable[] =
543 {
544       29,    24,    25,    18,    19,    44,    26,    20,    37,    35,
545       27,    47,    17,     8,    22,    23,    22,    23,    29,    33,
546       34,    45,    46,    30,    29,     1,     2,    21,     3,     4,
547        5,     3,     4,     5,     6,     7,     8,    31,    41,     8,
548       38,    39,    40,    48,    49,    36,     0,     0,     0,    42,
549       43
550 };
551
552 static const yytype_int8 yycheck[] =
553 {
554       17,     7,     8,     6,     7,    35,    12,    18,    25,    13,
555       16,    41,    13,    17,     5,     6,     5,     6,    35,    22,
556       23,    38,    39,    14,    41,     3,     4,     0,     9,    10,
557       11,     9,    10,    11,    12,    13,    17,    11,    15,    17,
558       16,    16,    14,    42,    14,    24,    -1,    -1,    -1,    20,
559       19
560 };
561
562 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
563    symbol of state STATE-NUM.  */
564 static const yytype_uint8 yystos[] =
565 {
566        0,     3,     4,     9,    10,    11,    12,    13,    17,    22,
567       23,    25,    26,    27,    28,    29,    30,    13,    23,    23,
568       18,     0,     5,     6,     7,     8,    12,    16,    24,    26,
569       14,    11,    31,    23,    23,    13,    30,    26,    16,    16,
570       14,    15,    20,    19,    24,    26,    26,    24,    31,    14
571 };
572
573 #define yyerrok         (yyerrstatus = 0)
574 #define yyclearin       (yychar = YYEMPTY)
575 #define YYEMPTY         (-2)
576 #define YYEOF           0
577
578 #define YYACCEPT        goto yyacceptlab
579 #define YYABORT         goto yyabortlab
580 #define YYERROR         goto yyerrorlab
581
582
583 /* Like YYERROR except do call yyerror.  This remains here temporarily
584    to ease the transition to the new meaning of YYERROR, for GCC.
585    Once GCC version 2 has supplanted version 1, this can go.  */
586
587 #define YYFAIL          goto yyerrlab
588
589 #define YYRECOVERING()  (!!yyerrstatus)
590
591 #define YYBACKUP(Token, Value)                                  \
592 do                                                              \
593   if (yychar == YYEMPTY && yylen == 1)                          \
594     {                                                           \
595       yychar = (Token);                                         \
596       yylval = (Value);                                         \
597       yytoken = YYTRANSLATE (yychar);                           \
598       YYPOPSTACK (1);                                           \
599       goto yybackup;                                            \
600     }                                                           \
601   else                                                          \
602     {                                                           \
603       yyerror (YY_("syntax error: cannot back up")); \
604       YYERROR;                                                  \
605     }                                                           \
606 while (YYID (0))
607
608
609 #define YYTERROR        1
610 #define YYERRCODE       256
611
612
613 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
614    If N is 0, then set CURRENT to the empty location which ends
615    the previous symbol: RHS[0] (always defined).  */
616
617 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
618 #ifndef YYLLOC_DEFAULT
619 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
620     do                                                                  \
621       if (YYID (N))                                                    \
622         {                                                               \
623           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
624           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
625           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
626           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
627         }                                                               \
628       else                                                              \
629         {                                                               \
630           (Current).first_line   = (Current).last_line   =              \
631             YYRHSLOC (Rhs, 0).last_line;                                \
632           (Current).first_column = (Current).last_column =              \
633             YYRHSLOC (Rhs, 0).last_column;                              \
634         }                                                               \
635     while (YYID (0))
636 #endif
637
638
639 /* YY_LOCATION_PRINT -- Print the location on the stream.
640    This macro was not mandated originally: define only if we know
641    we won't break user code: when these are the locations we know.  */
642
643 #ifndef YY_LOCATION_PRINT
644 # if YYLTYPE_IS_TRIVIAL
645 #  define YY_LOCATION_PRINT(File, Loc)                  \
646      fprintf (File, "%d.%d-%d.%d",                      \
647               (Loc).first_line, (Loc).first_column,     \
648               (Loc).last_line,  (Loc).last_column)
649 # else
650 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
651 # endif
652 #endif
653
654
655 /* YYLEX -- calling `yylex' with the right arguments.  */
656
657 #ifdef YYLEX_PARAM
658 # define YYLEX yylex (YYLEX_PARAM)
659 #else
660 # define YYLEX yylex ()
661 #endif
662
663 /* Enable debugging if requested.  */
664 #if YYDEBUG
665
666 # ifndef YYFPRINTF
667 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
668 #  define YYFPRINTF fprintf
669 # endif
670
671 # define YYDPRINTF(Args)                        \
672 do {                                            \
673   if (yydebug)                                  \
674     YYFPRINTF Args;                             \
675 } while (YYID (0))
676
677 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
678 do {                                                                      \
679   if (yydebug)                                                            \
680     {                                                                     \
681       YYFPRINTF (stderr, "%s ", Title);                                   \
682       yy_symbol_print (stderr,                                            \
683                   Type, Value); \
684       YYFPRINTF (stderr, "\n");                                           \
685     }                                                                     \
686 } while (YYID (0))
687
688
689 /*--------------------------------.
690 | Print this symbol on YYOUTPUT.  |
691 `--------------------------------*/
692
693 /*ARGSUSED*/
694 #if (defined __STDC__ || defined __C99__FUNC__ \
695      || defined __cplusplus || defined _MSC_VER)
696 static void
697 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
698 #else
699 static void
700 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
701     FILE *yyoutput;
702     int yytype;
703     YYSTYPE const * const yyvaluep;
704 #endif
705 {
706   if (!yyvaluep)
707     return;
708 # ifdef YYPRINT
709   if (yytype < YYNTOKENS)
710     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
711 # else
712   YYUSE (yyoutput);
713 # endif
714   switch (yytype)
715     {
716       default:
717         break;
718     }
719 }
720
721
722 /*--------------------------------.
723 | Print this symbol on YYOUTPUT.  |
724 `--------------------------------*/
725
726 #if (defined __STDC__ || defined __C99__FUNC__ \
727      || defined __cplusplus || defined _MSC_VER)
728 static void
729 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
730 #else
731 static void
732 yy_symbol_print (yyoutput, yytype, yyvaluep)
733     FILE *yyoutput;
734     int yytype;
735     YYSTYPE const * const yyvaluep;
736 #endif
737 {
738   if (yytype < YYNTOKENS)
739     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
740   else
741     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
742
743   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
744   YYFPRINTF (yyoutput, ")");
745 }
746
747 /*------------------------------------------------------------------.
748 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
749 | TOP (included).                                                   |
750 `------------------------------------------------------------------*/
751
752 #if (defined __STDC__ || defined __C99__FUNC__ \
753      || defined __cplusplus || defined _MSC_VER)
754 static void
755 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
756 #else
757 static void
758 yy_stack_print (yybottom, yytop)
759     yytype_int16 *yybottom;
760     yytype_int16 *yytop;
761 #endif
762 {
763   YYFPRINTF (stderr, "Stack now");
764   for (; yybottom <= yytop; yybottom++)
765     {
766       int yybot = *yybottom;
767       YYFPRINTF (stderr, " %d", yybot);
768     }
769   YYFPRINTF (stderr, "\n");
770 }
771
772 # define YY_STACK_PRINT(Bottom, Top)                            \
773 do {                                                            \
774   if (yydebug)                                                  \
775     yy_stack_print ((Bottom), (Top));                           \
776 } while (YYID (0))
777
778
779 /*------------------------------------------------.
780 | Report that the YYRULE is going to be reduced.  |
781 `------------------------------------------------*/
782
783 #if (defined __STDC__ || defined __C99__FUNC__ \
784      || defined __cplusplus || defined _MSC_VER)
785 static void
786 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
787 #else
788 static void
789 yy_reduce_print (yyvsp, yyrule)
790     YYSTYPE *yyvsp;
791     int yyrule;
792 #endif
793 {
794   int yynrhs = yyr2[yyrule];
795   int yyi;
796   unsigned long int yylno = yyrline[yyrule];
797   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
798              yyrule - 1, yylno);
799   /* The symbols being reduced.  */
800   for (yyi = 0; yyi < yynrhs; yyi++)
801     {
802       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
803       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
804                        &(yyvsp[(yyi + 1) - (yynrhs)])
805                                        );
806       YYFPRINTF (stderr, "\n");
807     }
808 }
809
810 # define YY_REDUCE_PRINT(Rule)          \
811 do {                                    \
812   if (yydebug)                          \
813     yy_reduce_print (yyvsp, Rule); \
814 } while (YYID (0))
815
816 /* Nonzero means print parse trace.  It is left uninitialized so that
817    multiple parsers can coexist.  */
818 int yydebug;
819 #else /* !YYDEBUG */
820 # define YYDPRINTF(Args)
821 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
822 # define YY_STACK_PRINT(Bottom, Top)
823 # define YY_REDUCE_PRINT(Rule)
824 #endif /* !YYDEBUG */
825
826
827 /* YYINITDEPTH -- initial size of the parser's stacks.  */
828 #ifndef YYINITDEPTH
829 # define YYINITDEPTH 200
830 #endif
831
832 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
833    if the built-in stack extension method is used).
834
835    Do not make this value too large; the results are undefined if
836    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
837    evaluated with infinite-precision integer arithmetic.  */
838
839 #ifndef YYMAXDEPTH
840 # define YYMAXDEPTH 10000
841 #endif
842
843 \f
844
845 #if YYERROR_VERBOSE
846
847 # ifndef yystrlen
848 #  if defined __GLIBC__ && defined _STRING_H
849 #   define yystrlen strlen
850 #  else
851 /* Return the length of YYSTR.  */
852 #if (defined __STDC__ || defined __C99__FUNC__ \
853      || defined __cplusplus || defined _MSC_VER)
854 static YYSIZE_T
855 yystrlen (const char *yystr)
856 #else
857 static YYSIZE_T
858 yystrlen (yystr)
859     const char *yystr;
860 #endif
861 {
862   YYSIZE_T yylen;
863   for (yylen = 0; yystr[yylen]; yylen++)
864     continue;
865   return yylen;
866 }
867 #  endif
868 # endif
869
870 # ifndef yystpcpy
871 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
872 #   define yystpcpy stpcpy
873 #  else
874 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
875    YYDEST.  */
876 #if (defined __STDC__ || defined __C99__FUNC__ \
877      || defined __cplusplus || defined _MSC_VER)
878 static char *
879 yystpcpy (char *yydest, const char *yysrc)
880 #else
881 static char *
882 yystpcpy (yydest, yysrc)
883     char *yydest;
884     const char *yysrc;
885 #endif
886 {
887   char *yyd = yydest;
888   const char *yys = yysrc;
889
890   while ((*yyd++ = *yys++) != '\0')
891     continue;
892
893   return yyd - 1;
894 }
895 #  endif
896 # endif
897
898 # ifndef yytnamerr
899 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
900    quotes and backslashes, so that it's suitable for yyerror.  The
901    heuristic is that double-quoting is unnecessary unless the string
902    contains an apostrophe, a comma, or backslash (other than
903    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
904    null, do not copy; instead, return the length of what the result
905    would have been.  */
906 static YYSIZE_T
907 yytnamerr (char *yyres, const char *yystr)
908 {
909   if (*yystr == '"')
910     {
911       YYSIZE_T yyn = 0;
912       char const *yyp = yystr;
913
914       for (;;)
915         switch (*++yyp)
916           {
917           case '\'':
918           case ',':
919             goto do_not_strip_quotes;
920
921           case '\\':
922             if (*++yyp != '\\')
923               goto do_not_strip_quotes;
924             /* Fall through.  */
925           default:
926             if (yyres)
927               yyres[yyn] = *yyp;
928             yyn++;
929             break;
930
931           case '"':
932             if (yyres)
933               yyres[yyn] = '\0';
934             return yyn;
935           }
936     do_not_strip_quotes: ;
937     }
938
939   if (! yyres)
940     return yystrlen (yystr);
941
942   return yystpcpy (yyres, yystr) - yyres;
943 }
944 # endif
945
946 /* Copy into YYRESULT an error message about the unexpected token
947    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
948    including the terminating null byte.  If YYRESULT is null, do not
949    copy anything; just return the number of bytes that would be
950    copied.  As a special case, return 0 if an ordinary "syntax error"
951    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
952    size calculation.  */
953 static YYSIZE_T
954 yysyntax_error (char *yyresult, int yystate, int yychar)
955 {
956   int yyn = yypact[yystate];
957
958   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
959     return 0;
960   else
961     {
962       int yytype = YYTRANSLATE (yychar);
963       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
964       YYSIZE_T yysize = yysize0;
965       YYSIZE_T yysize1;
966       int yysize_overflow = 0;
967       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
968       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
969       int yyx;
970
971 # if 0
972       /* This is so xgettext sees the translatable formats that are
973          constructed on the fly.  */
974       YY_("syntax error, unexpected %s");
975       YY_("syntax error, unexpected %s, expecting %s");
976       YY_("syntax error, unexpected %s, expecting %s or %s");
977       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
978       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
979 # endif
980       char *yyfmt;
981       char const *yyf;
982       static char const yyunexpected[] = "syntax error, unexpected %s";
983       static char const yyexpecting[] = ", expecting %s";
984       static char const yyor[] = " or %s";
985       char yyformat[sizeof yyunexpected
986                     + sizeof yyexpecting - 1
987                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
988                        * (sizeof yyor - 1))];
989       char const *yyprefix = yyexpecting;
990
991       /* Start YYX at -YYN if negative to avoid negative indexes in
992          YYCHECK.  */
993       int yyxbegin = yyn < 0 ? -yyn : 0;
994
995       /* Stay within bounds of both yycheck and yytname.  */
996       int yychecklim = YYLAST - yyn + 1;
997       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
998       int yycount = 1;
999
1000       yyarg[0] = yytname[yytype];
1001       yyfmt = yystpcpy (yyformat, yyunexpected);
1002
1003       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1004         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1005           {
1006             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1007               {
1008                 yycount = 1;
1009                 yysize = yysize0;
1010                 yyformat[sizeof yyunexpected - 1] = '\0';
1011                 break;
1012               }
1013             yyarg[yycount++] = yytname[yyx];
1014             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1015             yysize_overflow |= (yysize1 < yysize);
1016             yysize = yysize1;
1017             yyfmt = yystpcpy (yyfmt, yyprefix);
1018             yyprefix = yyor;
1019           }
1020
1021       yyf = YY_(yyformat);
1022       yysize1 = yysize + yystrlen (yyf);
1023       yysize_overflow |= (yysize1 < yysize);
1024       yysize = yysize1;
1025
1026       if (yysize_overflow)
1027         return YYSIZE_MAXIMUM;
1028
1029       if (yyresult)
1030         {
1031           /* Avoid sprintf, as that infringes on the user's name space.
1032              Don't have undefined behavior even if the translation
1033              produced a string with the wrong number of "%s"s.  */
1034           char *yyp = yyresult;
1035           int yyi = 0;
1036           while ((*yyp = *yyf) != '\0')
1037             {
1038               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1039                 {
1040                   yyp += yytnamerr (yyp, yyarg[yyi++]);
1041                   yyf += 2;
1042                 }
1043               else
1044                 {
1045                   yyp++;
1046                   yyf++;
1047                 }
1048             }
1049         }
1050       return yysize;
1051     }
1052 }
1053 #endif /* YYERROR_VERBOSE */
1054 \f
1055
1056 /*-----------------------------------------------.
1057 | Release the memory associated to this symbol.  |
1058 `-----------------------------------------------*/
1059
1060 /*ARGSUSED*/
1061 #if (defined __STDC__ || defined __C99__FUNC__ \
1062      || defined __cplusplus || defined _MSC_VER)
1063 static void
1064 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1065 #else
1066 static void
1067 yydestruct (yymsg, yytype, yyvaluep)
1068     const char *yymsg;
1069     int yytype;
1070     YYSTYPE *yyvaluep;
1071 #endif
1072 {
1073   YYUSE (yyvaluep);
1074
1075   if (!yymsg)
1076     yymsg = "Deleting";
1077   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1078
1079   switch (yytype)
1080     {
1081
1082       default:
1083         break;
1084     }
1085 }
1086
1087 /* Prevent warnings from -Wmissing-prototypes.  */
1088 #ifdef YYPARSE_PARAM
1089 #if defined __STDC__ || defined __cplusplus
1090 int yyparse (void *YYPARSE_PARAM);
1091 #else
1092 int yyparse ();
1093 #endif
1094 #else /* ! YYPARSE_PARAM */
1095 #if defined __STDC__ || defined __cplusplus
1096 int yyparse (void);
1097 #else
1098 int yyparse ();
1099 #endif
1100 #endif /* ! YYPARSE_PARAM */
1101
1102
1103 /* The lookahead symbol.  */
1104 int yychar;
1105
1106 /* The semantic value of the lookahead symbol.  */
1107 YYSTYPE yylval;
1108
1109 /* Number of syntax errors so far.  */
1110 int yynerrs;
1111
1112
1113
1114 /*-------------------------.
1115 | yyparse or yypush_parse.  |
1116 `-------------------------*/
1117
1118 #ifdef YYPARSE_PARAM
1119 #if (defined __STDC__ || defined __C99__FUNC__ \
1120      || defined __cplusplus || defined _MSC_VER)
1121 int
1122 yyparse (void *YYPARSE_PARAM)
1123 #else
1124 int
1125 yyparse (YYPARSE_PARAM)
1126     void *YYPARSE_PARAM;
1127 #endif
1128 #else /* ! YYPARSE_PARAM */
1129 #if (defined __STDC__ || defined __C99__FUNC__ \
1130      || defined __cplusplus || defined _MSC_VER)
1131 int
1132 yyparse (void)
1133 #else
1134 int
1135 yyparse ()
1136
1137 #endif
1138 #endif
1139 {
1140
1141
1142     int yystate;
1143     /* Number of tokens to shift before error messages enabled.  */
1144     int yyerrstatus;
1145
1146     /* The stacks and their tools:
1147        `yyss': related to states.
1148        `yyvs': related to semantic values.
1149
1150        Refer to the stacks thru separate pointers, to allow yyoverflow
1151        to reallocate them elsewhere.  */
1152
1153     /* The state stack.  */
1154     yytype_int16 yyssa[YYINITDEPTH];
1155     yytype_int16 *yyss;
1156     yytype_int16 *yyssp;
1157
1158     /* The semantic value stack.  */
1159     YYSTYPE yyvsa[YYINITDEPTH];
1160     YYSTYPE *yyvs;
1161     YYSTYPE *yyvsp;
1162
1163     YYSIZE_T yystacksize;
1164
1165   int yyn;
1166   int yyresult;
1167   /* Lookahead token as an internal (translated) token number.  */
1168   int yytoken;
1169   /* The variables used to return semantic value and location from the
1170      action routines.  */
1171   YYSTYPE yyval;
1172
1173 #if YYERROR_VERBOSE
1174   /* Buffer for error messages, and its allocated size.  */
1175   char yymsgbuf[128];
1176   char *yymsg = yymsgbuf;
1177   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1178 #endif
1179
1180 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1181
1182   /* The number of symbols on the RHS of the reduced rule.
1183      Keep to zero when no symbol should be popped.  */
1184   int yylen = 0;
1185
1186   yytoken = 0;
1187   yyss = yyssa;
1188   yyvs = yyvsa;
1189   yystacksize = YYINITDEPTH;
1190
1191   YYDPRINTF ((stderr, "Starting parse\n"));
1192
1193   yystate = 0;
1194   yyerrstatus = 0;
1195   yynerrs = 0;
1196   yychar = YYEMPTY; /* Cause a token to be read.  */
1197
1198   /* Initialize stack pointers.
1199      Waste one element of value and location stack
1200      so that they stay on the same level as the state stack.
1201      The wasted elements are never initialized.  */
1202   yyssp = yyss;
1203   yyvsp = yyvs;
1204
1205   goto yysetstate;
1206
1207 /*------------------------------------------------------------.
1208 | yynewstate -- Push a new state, which is found in yystate.  |
1209 `------------------------------------------------------------*/
1210  yynewstate:
1211   /* In all cases, when you get here, the value and location stacks
1212      have just been pushed.  So pushing a state here evens the stacks.  */
1213   yyssp++;
1214
1215  yysetstate:
1216   *yyssp = yystate;
1217
1218   if (yyss + yystacksize - 1 <= yyssp)
1219     {
1220       /* Get the current used size of the three stacks, in elements.  */
1221       YYSIZE_T yysize = yyssp - yyss + 1;
1222
1223 #ifdef yyoverflow
1224       {
1225         /* Give user a chance to reallocate the stack.  Use copies of
1226            these so that the &'s don't force the real ones into
1227            memory.  */
1228         YYSTYPE *yyvs1 = yyvs;
1229         yytype_int16 *yyss1 = yyss;
1230
1231         /* Each stack pointer address is followed by the size of the
1232            data in use in that stack, in bytes.  This used to be a
1233            conditional around just the two extra args, but that might
1234            be undefined if yyoverflow is a macro.  */
1235         yyoverflow (YY_("memory exhausted"),
1236                     &yyss1, yysize * sizeof (*yyssp),
1237                     &yyvs1, yysize * sizeof (*yyvsp),
1238                     &yystacksize);
1239
1240         yyss = yyss1;
1241         yyvs = yyvs1;
1242       }
1243 #else /* no yyoverflow */
1244 # ifndef YYSTACK_RELOCATE
1245       goto yyexhaustedlab;
1246 # else
1247       /* Extend the stack our own way.  */
1248       if (YYMAXDEPTH <= yystacksize)
1249         goto yyexhaustedlab;
1250       yystacksize *= 2;
1251       if (YYMAXDEPTH < yystacksize)
1252         yystacksize = YYMAXDEPTH;
1253
1254       {
1255         yytype_int16 *yyss1 = yyss;
1256         union yyalloc *yyptr =
1257           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1258         if (! yyptr)
1259           goto yyexhaustedlab;
1260         YYSTACK_RELOCATE (yyss_alloc, yyss);
1261         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1262 #  undef YYSTACK_RELOCATE
1263         if (yyss1 != yyssa)
1264           YYSTACK_FREE (yyss1);
1265       }
1266 # endif
1267 #endif /* no yyoverflow */
1268
1269       yyssp = yyss + yysize - 1;
1270       yyvsp = yyvs + yysize - 1;
1271
1272       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1273                   (unsigned long int) yystacksize));
1274
1275       if (yyss + yystacksize - 1 <= yyssp)
1276         YYABORT;
1277     }
1278
1279   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1280
1281   if (yystate == YYFINAL)
1282     YYACCEPT;
1283
1284   goto yybackup;
1285
1286 /*-----------.
1287 | yybackup.  |
1288 `-----------*/
1289 yybackup:
1290
1291   /* Do appropriate processing given the current state.  Read a
1292      lookahead token if we need one and don't already have one.  */
1293
1294   /* First try to decide what to do without reference to lookahead token.  */
1295   yyn = yypact[yystate];
1296   if (yyn == YYPACT_NINF)
1297     goto yydefault;
1298
1299   /* Not known => get a lookahead token if don't already have one.  */
1300
1301   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1302   if (yychar == YYEMPTY)
1303     {
1304       YYDPRINTF ((stderr, "Reading a token: "));
1305       yychar = YYLEX;
1306     }
1307
1308   if (yychar <= YYEOF)
1309     {
1310       yychar = yytoken = YYEOF;
1311       YYDPRINTF ((stderr, "Now at end of input.\n"));
1312     }
1313   else
1314     {
1315       yytoken = YYTRANSLATE (yychar);
1316       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1317     }
1318
1319   /* If the proper action on seeing token YYTOKEN is to reduce or to
1320      detect an error, take that action.  */
1321   yyn += yytoken;
1322   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1323     goto yydefault;
1324   yyn = yytable[yyn];
1325   if (yyn <= 0)
1326     {
1327       if (yyn == 0 || yyn == YYTABLE_NINF)
1328         goto yyerrlab;
1329       yyn = -yyn;
1330       goto yyreduce;
1331     }
1332
1333   /* Count tokens shifted since error; after three, turn off error
1334      status.  */
1335   if (yyerrstatus)
1336     yyerrstatus--;
1337
1338   /* Shift the lookahead token.  */
1339   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1340
1341   /* Discard the shifted token.  */
1342   yychar = YYEMPTY;
1343
1344   yystate = yyn;
1345   *++yyvsp = yylval;
1346
1347   goto yynewstate;
1348
1349
1350 /*-----------------------------------------------------------.
1351 | yydefault -- do the default action for the current state.  |
1352 `-----------------------------------------------------------*/
1353 yydefault:
1354   yyn = yydefact[yystate];
1355   if (yyn == 0)
1356     goto yyerrlab;
1357   goto yyreduce;
1358
1359
1360 /*-----------------------------.
1361 | yyreduce -- Do a reduction.  |
1362 `-----------------------------*/
1363 yyreduce:
1364   /* yyn is the number of a rule to reduce with.  */
1365   yylen = yyr2[yyn];
1366
1367   /* If YYLEN is nonzero, implement the default value of the action:
1368      `$$ = $1'.
1369
1370      Otherwise, the following line sets YYVAL to garbage.
1371      This behavior is undocumented and Bison
1372      users should not rely upon it.  Assigning to YYVAL
1373      unconditionally makes the parser a bit smaller, and it avoids a
1374      GCC warning that YYVAL may be used uninitialized.  */
1375   yyval = yyvsp[1-yylen];
1376
1377
1378   YY_REDUCE_PRINT (yyn);
1379   switch (yyn)
1380     {
1381         case 2:
1382
1383 /* Line 1455 of yacc.c  */
1384 #line 73 "sel-gram.y"
1385     { _hx509_expr_input.expr = (yyvsp[(1) - (1)].expr); }
1386     break;
1387
1388   case 3:
1389
1390 /* Line 1455 of yacc.c  */
1391 #line 75 "sel-gram.y"
1392     { (yyval.expr) = _hx509_make_expr(op_TRUE, NULL, NULL); }
1393     break;
1394
1395   case 4:
1396
1397 /* Line 1455 of yacc.c  */
1398 #line 76 "sel-gram.y"
1399     { (yyval.expr) = _hx509_make_expr(op_FALSE, NULL, NULL); }
1400     break;
1401
1402   case 5:
1403
1404 /* Line 1455 of yacc.c  */
1405 #line 77 "sel-gram.y"
1406     { (yyval.expr) = _hx509_make_expr(op_NOT, (yyvsp[(2) - (2)].expr), NULL); }
1407     break;
1408
1409   case 6:
1410
1411 /* Line 1455 of yacc.c  */
1412 #line 78 "sel-gram.y"
1413     { (yyval.expr) = _hx509_make_expr(op_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
1414     break;
1415
1416   case 7:
1417
1418 /* Line 1455 of yacc.c  */
1419 #line 79 "sel-gram.y"
1420     { (yyval.expr) = _hx509_make_expr(op_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
1421     break;
1422
1423   case 8:
1424
1425 /* Line 1455 of yacc.c  */
1426 #line 80 "sel-gram.y"
1427     { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
1428     break;
1429
1430   case 9:
1431
1432 /* Line 1455 of yacc.c  */
1433 #line 81 "sel-gram.y"
1434     { (yyval.expr) = _hx509_make_expr(op_COMP, (yyvsp[(1) - (1)].expr), NULL); }
1435     break;
1436
1437   case 10:
1438
1439 /* Line 1455 of yacc.c  */
1440 #line 84 "sel-gram.y"
1441     { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (1)].expr), NULL); }
1442     break;
1443
1444   case 11:
1445
1446 /* Line 1455 of yacc.c  */
1447 #line 85 "sel-gram.y"
1448     { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
1449     break;
1450
1451   case 12:
1452
1453 /* Line 1455 of yacc.c  */
1454 #line 88 "sel-gram.y"
1455     { (yyval.expr) = _hx509_make_expr(comp_EQ, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); }
1456     break;
1457
1458   case 13:
1459
1460 /* Line 1455 of yacc.c  */
1461 #line 89 "sel-gram.y"
1462     { (yyval.expr) = _hx509_make_expr(comp_NE, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); }
1463     break;
1464
1465   case 14:
1466
1467 /* Line 1455 of yacc.c  */
1468 #line 90 "sel-gram.y"
1469     { (yyval.expr) = _hx509_make_expr(comp_TAILEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
1470     break;
1471
1472   case 15:
1473
1474 /* Line 1455 of yacc.c  */
1475 #line 91 "sel-gram.y"
1476     { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (5)].expr), (yyvsp[(4) - (5)].expr)); }
1477     break;
1478
1479   case 16:
1480
1481 /* Line 1455 of yacc.c  */
1482 #line 92 "sel-gram.y"
1483     { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
1484     break;
1485
1486   case 17:
1487
1488 /* Line 1455 of yacc.c  */
1489 #line 95 "sel-gram.y"
1490     { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
1491     break;
1492
1493   case 18:
1494
1495 /* Line 1455 of yacc.c  */
1496 #line 96 "sel-gram.y"
1497     { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
1498     break;
1499
1500   case 19:
1501
1502 /* Line 1455 of yacc.c  */
1503 #line 97 "sel-gram.y"
1504     { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
1505     break;
1506
1507   case 20:
1508
1509 /* Line 1455 of yacc.c  */
1510 #line 98 "sel-gram.y"
1511     { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
1512     break;
1513
1514   case 21:
1515
1516 /* Line 1455 of yacc.c  */
1517 #line 101 "sel-gram.y"
1518     { (yyval.expr) = _hx509_make_expr(expr_NUMBER, (yyvsp[(1) - (1)].string), NULL); }
1519     break;
1520
1521   case 22:
1522
1523 /* Line 1455 of yacc.c  */
1524 #line 102 "sel-gram.y"
1525     { (yyval.expr) = _hx509_make_expr(expr_STRING, (yyvsp[(1) - (1)].string), NULL); }
1526     break;
1527
1528   case 23:
1529
1530 /* Line 1455 of yacc.c  */
1531 #line 104 "sel-gram.y"
1532     {
1533                         (yyval.expr) = _hx509_make_expr(expr_FUNCTION, (yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].expr)); }
1534     break;
1535
1536   case 24:
1537
1538 /* Line 1455 of yacc.c  */
1539 #line 107 "sel-gram.y"
1540     { (yyval.expr) = (yyvsp[(3) - (4)].expr); }
1541     break;
1542
1543   case 25:
1544
1545 /* Line 1455 of yacc.c  */
1546 #line 110 "sel-gram.y"
1547     {
1548                         (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].expr)); }
1549     break;
1550
1551   case 26:
1552
1553 /* Line 1455 of yacc.c  */
1554 #line 112 "sel-gram.y"
1555     {
1556                         (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (1)].string), NULL); }
1557     break;
1558
1559
1560
1561 /* Line 1455 of yacc.c  */
1562 #line 1563 "sel-gram.c"
1563       default: break;
1564     }
1565   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1566
1567   YYPOPSTACK (yylen);
1568   yylen = 0;
1569   YY_STACK_PRINT (yyss, yyssp);
1570
1571   *++yyvsp = yyval;
1572
1573   /* Now `shift' the result of the reduction.  Determine what state
1574      that goes to, based on the state we popped back to and the rule
1575      number reduced by.  */
1576
1577   yyn = yyr1[yyn];
1578
1579   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1580   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1581     yystate = yytable[yystate];
1582   else
1583     yystate = yydefgoto[yyn - YYNTOKENS];
1584
1585   goto yynewstate;
1586
1587
1588 /*------------------------------------.
1589 | yyerrlab -- here on detecting error |
1590 `------------------------------------*/
1591 yyerrlab:
1592   /* If not already recovering from an error, report this error.  */
1593   if (!yyerrstatus)
1594     {
1595       ++yynerrs;
1596 #if ! YYERROR_VERBOSE
1597       yyerror (YY_("syntax error"));
1598 #else
1599       {
1600         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1601         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1602           {
1603             YYSIZE_T yyalloc = 2 * yysize;
1604             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1605               yyalloc = YYSTACK_ALLOC_MAXIMUM;
1606             if (yymsg != yymsgbuf)
1607               YYSTACK_FREE (yymsg);
1608             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1609             if (yymsg)
1610               yymsg_alloc = yyalloc;
1611             else
1612               {
1613                 yymsg = yymsgbuf;
1614                 yymsg_alloc = sizeof yymsgbuf;
1615               }
1616           }
1617
1618         if (0 < yysize && yysize <= yymsg_alloc)
1619           {
1620             (void) yysyntax_error (yymsg, yystate, yychar);
1621             yyerror (yymsg);
1622           }
1623         else
1624           {
1625             yyerror (YY_("syntax error"));
1626             if (yysize != 0)
1627               goto yyexhaustedlab;
1628           }
1629       }
1630 #endif
1631     }
1632
1633
1634
1635   if (yyerrstatus == 3)
1636     {
1637       /* If just tried and failed to reuse lookahead token after an
1638          error, discard it.  */
1639
1640       if (yychar <= YYEOF)
1641         {
1642           /* Return failure if at end of input.  */
1643           if (yychar == YYEOF)
1644             YYABORT;
1645         }
1646       else
1647         {
1648           yydestruct ("Error: discarding",
1649                       yytoken, &yylval);
1650           yychar = YYEMPTY;
1651         }
1652     }
1653
1654   /* Else will try to reuse lookahead token after shifting the error
1655      token.  */
1656   goto yyerrlab1;
1657
1658
1659 /*---------------------------------------------------.
1660 | yyerrorlab -- error raised explicitly by YYERROR.  |
1661 `---------------------------------------------------*/
1662 yyerrorlab:
1663
1664   /* Pacify compilers like GCC when the user code never invokes
1665      YYERROR and the label yyerrorlab therefore never appears in user
1666      code.  */
1667   if (/*CONSTCOND*/ 0)
1668      goto yyerrorlab;
1669
1670   /* Do not reclaim the symbols of the rule which action triggered
1671      this YYERROR.  */
1672   YYPOPSTACK (yylen);
1673   yylen = 0;
1674   YY_STACK_PRINT (yyss, yyssp);
1675   yystate = *yyssp;
1676   goto yyerrlab1;
1677
1678
1679 /*-------------------------------------------------------------.
1680 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1681 `-------------------------------------------------------------*/
1682 yyerrlab1:
1683   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1684
1685   for (;;)
1686     {
1687       yyn = yypact[yystate];
1688       if (yyn != YYPACT_NINF)
1689         {
1690           yyn += YYTERROR;
1691           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1692             {
1693               yyn = yytable[yyn];
1694               if (0 < yyn)
1695                 break;
1696             }
1697         }
1698
1699       /* Pop the current state because it cannot handle the error token.  */
1700       if (yyssp == yyss)
1701         YYABORT;
1702
1703
1704       yydestruct ("Error: popping",
1705                   yystos[yystate], yyvsp);
1706       YYPOPSTACK (1);
1707       yystate = *yyssp;
1708       YY_STACK_PRINT (yyss, yyssp);
1709     }
1710
1711   *++yyvsp = yylval;
1712
1713
1714   /* Shift the error token.  */
1715   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1716
1717   yystate = yyn;
1718   goto yynewstate;
1719
1720
1721 /*-------------------------------------.
1722 | yyacceptlab -- YYACCEPT comes here.  |
1723 `-------------------------------------*/
1724 yyacceptlab:
1725   yyresult = 0;
1726   goto yyreturn;
1727
1728 /*-----------------------------------.
1729 | yyabortlab -- YYABORT comes here.  |
1730 `-----------------------------------*/
1731 yyabortlab:
1732   yyresult = 1;
1733   goto yyreturn;
1734
1735 #if !defined(yyoverflow) || YYERROR_VERBOSE
1736 /*-------------------------------------------------.
1737 | yyexhaustedlab -- memory exhaustion comes here.  |
1738 `-------------------------------------------------*/
1739 yyexhaustedlab:
1740   yyerror (YY_("memory exhausted"));
1741   yyresult = 2;
1742   /* Fall through.  */
1743 #endif
1744
1745 yyreturn:
1746   if (yychar != YYEMPTY)
1747      yydestruct ("Cleanup: discarding lookahead",
1748                  yytoken, &yylval);
1749   /* Do not reclaim the symbols of the rule which action triggered
1750      this YYABORT or YYACCEPT.  */
1751   YYPOPSTACK (yylen);
1752   YY_STACK_PRINT (yyss, yyssp);
1753   while (yyssp != yyss)
1754     {
1755       yydestruct ("Cleanup: popping",
1756                   yystos[*yyssp], yyvsp);
1757       YYPOPSTACK (1);
1758     }
1759 #ifndef yyoverflow
1760   if (yyss != yyssa)
1761     YYSTACK_FREE (yyss);
1762 #endif
1763 #if YYERROR_VERBOSE
1764   if (yymsg != yymsgbuf)
1765     YYSTACK_FREE (yymsg);
1766 #endif
1767   /* Make sure YYID is used.  */
1768   return YYID (yyresult);
1769 }
1770
1771
1772