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.c"
|
---|
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.c"
|
---|
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 | |
---|
844 |
|
---|
845 |
|
---|
846 | #if YYERROR_VERBOSE
|
---|
847 |
|
---|
848 | # ifndef yystrlen
|
---|
849 | # if defined __GLIBC__ && defined _STRING_H
|
---|
850 | # define yystrlen strlen
|
---|
851 | # else
|
---|
852 | /* Return the length of YYSTR. */
|
---|
853 | #if (defined __STDC__ || defined __C99__FUNC__ \
|
---|
854 | || defined __cplusplus || defined _MSC_VER)
|
---|
855 | static YYSIZE_T
|
---|
856 | yystrlen (const char *yystr)
|
---|
857 | #else
|
---|
858 | static YYSIZE_T
|
---|
859 | yystrlen (yystr)
|
---|
860 | const char *yystr;
|
---|
861 | #endif
|
---|
862 | {
|
---|
863 | YYSIZE_T yylen;
|
---|
864 | for (yylen = 0; yystr[yylen]; yylen++)
|
---|
865 | continue;
|
---|
866 | return yylen;
|
---|
867 | }
|
---|
868 | # endif
|
---|
869 | # endif
|
---|
870 |
|
---|
871 | # ifndef yystpcpy
|
---|
872 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
|
---|
873 | # define yystpcpy stpcpy
|
---|
874 | # else
|
---|
875 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
---|
876 | YYDEST. */
|
---|
877 | #if (defined __STDC__ || defined __C99__FUNC__ \
|
---|
878 | || defined __cplusplus || defined _MSC_VER)
|
---|
879 | static char *
|
---|
880 | yystpcpy (char *yydest, const char *yysrc)
|
---|
881 | #else
|
---|
882 | static char *
|
---|
883 | yystpcpy (yydest, yysrc)
|
---|
884 | char *yydest;
|
---|
885 | const char *yysrc;
|
---|
886 | #endif
|
---|
887 | {
|
---|
888 | char *yyd = yydest;
|
---|
889 | const char *yys = yysrc;
|
---|
890 |
|
---|
891 | while ((*yyd++ = *yys++) != '\0')
|
---|
892 | continue;
|
---|
893 |
|
---|
894 | return yyd - 1;
|
---|
895 | }
|
---|
896 | # endif
|
---|
897 | # endif
|
---|
898 |
|
---|
899 | # ifndef yytnamerr
|
---|
900 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
|
---|
901 | quotes and backslashes, so that it's suitable for yyerror. The
|
---|
902 | heuristic is that double-quoting is unnecessary unless the string
|
---|
903 | contains an apostrophe, a comma, or backslash (other than
|
---|
904 | backslash-backslash). YYSTR is taken from yytname. If YYRES is
|
---|
905 | null, do not copy; instead, return the length of what the result
|
---|
906 | would have been. */
|
---|
907 | static YYSIZE_T
|
---|
908 | yytnamerr (char *yyres, const char *yystr)
|
---|
909 | {
|
---|
910 | if (*yystr == '"')
|
---|
911 | {
|
---|
912 | YYSIZE_T yyn = 0;
|
---|
913 | char const *yyp = yystr;
|
---|
914 |
|
---|
915 | for (;;)
|
---|
916 | switch (*++yyp)
|
---|
917 | {
|
---|
918 | case '\'':
|
---|
919 | case ',':
|
---|
920 | goto do_not_strip_quotes;
|
---|
921 |
|
---|
922 | case '\\':
|
---|
923 | if (*++yyp != '\\')
|
---|
924 | goto do_not_strip_quotes;
|
---|
925 | /* Fall through. */
|
---|
926 | default:
|
---|
927 | if (yyres)
|
---|
928 | yyres[yyn] = *yyp;
|
---|
929 | yyn++;
|
---|
930 | break;
|
---|
931 |
|
---|
932 | case '"':
|
---|
933 | if (yyres)
|
---|
934 | yyres[yyn] = '\0';
|
---|
935 | return yyn;
|
---|
936 | }
|
---|
937 | do_not_strip_quotes: ;
|
---|
938 | }
|
---|
939 |
|
---|
940 | if (! yyres)
|
---|
941 | return yystrlen (yystr);
|
---|
942 |
|
---|
943 | return yystpcpy (yyres, yystr) - yyres;
|
---|
944 | }
|
---|
945 | # endif
|
---|
946 |
|
---|
947 | /* Copy into YYRESULT an error message about the unexpected token
|
---|
948 | YYCHAR while in state YYSTATE. Return the number of bytes copied,
|
---|
949 | including the terminating null byte. If YYRESULT is null, do not
|
---|
950 | copy anything; just return the number of bytes that would be
|
---|
951 | copied. As a special case, return 0 if an ordinary "syntax error"
|
---|
952 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during
|
---|
953 | size calculation. */
|
---|
954 | static YYSIZE_T
|
---|
955 | yysyntax_error (char *yyresult, int yystate, int yychar)
|
---|
956 | {
|
---|
957 | int yyn = yypact[yystate];
|
---|
958 |
|
---|
959 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
|
---|
960 | return 0;
|
---|
961 | else
|
---|
962 | {
|
---|
963 | int yytype = YYTRANSLATE (yychar);
|
---|
964 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
---|
965 | YYSIZE_T yysize = yysize0;
|
---|
966 | YYSIZE_T yysize1;
|
---|
967 | int yysize_overflow = 0;
|
---|
968 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
---|
969 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
---|
970 | int yyx;
|
---|
971 |
|
---|
972 | # if 0
|
---|
973 | /* This is so xgettext sees the translatable formats that are
|
---|
974 | constructed on the fly. */
|
---|
975 | YY_("syntax error, unexpected %s");
|
---|
976 | YY_("syntax error, unexpected %s, expecting %s");
|
---|
977 | YY_("syntax error, unexpected %s, expecting %s or %s");
|
---|
978 | YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
---|
979 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
---|
980 | # endif
|
---|
981 | char *yyfmt;
|
---|
982 | char const *yyf;
|
---|
983 | static char const yyunexpected[] = "syntax error, unexpected %s";
|
---|
984 | static char const yyexpecting[] = ", expecting %s";
|
---|
985 | static char const yyor[] = " or %s";
|
---|
986 | char yyformat[sizeof yyunexpected
|
---|
987 | + sizeof yyexpecting - 1
|
---|
988 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
---|
989 | * (sizeof yyor - 1))];
|
---|
990 | char const *yyprefix = yyexpecting;
|
---|
991 |
|
---|
992 | /* Start YYX at -YYN if negative to avoid negative indexes in
|
---|
993 | YYCHECK. */
|
---|
994 | int yyxbegin = yyn < 0 ? -yyn : 0;
|
---|
995 |
|
---|
996 | /* Stay within bounds of both yycheck and yytname. */
|
---|
997 | int yychecklim = YYLAST - yyn + 1;
|
---|
998 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
---|
999 | int yycount = 1;
|
---|
1000 |
|
---|
1001 | yyarg[0] = yytname[yytype];
|
---|
1002 | yyfmt = yystpcpy (yyformat, yyunexpected);
|
---|
1003 |
|
---|
1004 | for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
---|
1005 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
---|
1006 | {
|
---|
1007 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
---|
1008 | {
|
---|
1009 | yycount = 1;
|
---|
1010 | yysize = yysize0;
|
---|
1011 | yyformat[sizeof yyunexpected - 1] = '\0';
|
---|
1012 | break;
|
---|
1013 | }
|
---|
1014 | yyarg[yycount++] = yytname[yyx];
|
---|
1015 | yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
---|
1016 | yysize_overflow |= (yysize1 < yysize);
|
---|
1017 | yysize = yysize1;
|
---|
1018 | yyfmt = yystpcpy (yyfmt, yyprefix);
|
---|
1019 | yyprefix = yyor;
|
---|
1020 | }
|
---|
1021 |
|
---|
1022 | yyf = YY_(yyformat);
|
---|
1023 | yysize1 = yysize + yystrlen (yyf);
|
---|
1024 | yysize_overflow |= (yysize1 < yysize);
|
---|
1025 | yysize = yysize1;
|
---|
1026 |
|
---|
1027 | if (yysize_overflow)
|
---|
1028 | return YYSIZE_MAXIMUM;
|
---|
1029 |
|
---|
1030 | if (yyresult)
|
---|
1031 | {
|
---|
1032 | /* Avoid sprintf, as that infringes on the user's name space.
|
---|
1033 | Don't have undefined behavior even if the translation
|
---|
1034 | produced a string with the wrong number of "%s"s. */
|
---|
1035 | char *yyp = yyresult;
|
---|
1036 | int yyi = 0;
|
---|
1037 | while ((*yyp = *yyf) != '\0')
|
---|
1038 | {
|
---|
1039 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
---|
1040 | {
|
---|
1041 | yyp += yytnamerr (yyp, yyarg[yyi++]);
|
---|
1042 | yyf += 2;
|
---|
1043 | }
|
---|
1044 | else
|
---|
1045 | {
|
---|
1046 | yyp++;
|
---|
1047 | yyf++;
|
---|
1048 | }
|
---|
1049 | }
|
---|
1050 | }
|
---|
1051 | return yysize;
|
---|
1052 | }
|
---|
1053 | }
|
---|
1054 | #endif /* YYERROR_VERBOSE */
|
---|
1055 | |
---|
1056 |
|
---|
1057 |
|
---|
1058 | /*-----------------------------------------------.
|
---|
1059 | | Release the memory associated to this symbol. |
|
---|
1060 | `-----------------------------------------------*/
|
---|
1061 |
|
---|
1062 | /*ARGSUSED*/
|
---|
1063 | #if (defined __STDC__ || defined __C99__FUNC__ \
|
---|
1064 | || defined __cplusplus || defined _MSC_VER)
|
---|
1065 | static void
|
---|
1066 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
|
---|
1067 | #else
|
---|
1068 | static void
|
---|
1069 | yydestruct (yymsg, yytype, yyvaluep)
|
---|
1070 | const char *yymsg;
|
---|
1071 | int yytype;
|
---|
1072 | YYSTYPE *yyvaluep;
|
---|
1073 | #endif
|
---|
1074 | {
|
---|
1075 | YYUSE (yyvaluep);
|
---|
1076 |
|
---|
1077 | if (!yymsg)
|
---|
1078 | yymsg = "Deleting";
|
---|
1079 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
---|
1080 |
|
---|
1081 | switch (yytype)
|
---|
1082 | {
|
---|
1083 |
|
---|
1084 | default:
|
---|
1085 | break;
|
---|
1086 | }
|
---|
1087 | }
|
---|
1088 |
|
---|
1089 | /* Prevent warnings from -Wmissing-prototypes. */
|
---|
1090 | #ifdef YYPARSE_PARAM
|
---|
1091 | #if defined __STDC__ || defined __cplusplus
|
---|
1092 | int yyparse (void *YYPARSE_PARAM);
|
---|
1093 | #else
|
---|
1094 | int yyparse ();
|
---|
1095 | #endif
|
---|
1096 | #else /* ! YYPARSE_PARAM */
|
---|
1097 | #if defined __STDC__ || defined __cplusplus
|
---|
1098 | int yyparse (void);
|
---|
1099 | #else
|
---|
1100 | int yyparse ();
|
---|
1101 | #endif
|
---|
1102 | #endif /* ! YYPARSE_PARAM */
|
---|
1103 |
|
---|
1104 |
|
---|
1105 | /* The lookahead symbol. */
|
---|
1106 | int yychar;
|
---|
1107 |
|
---|
1108 | /* The semantic value of the lookahead symbol. */
|
---|
1109 | YYSTYPE yylval;
|
---|
1110 |
|
---|
1111 | /* Number of syntax errors so far. */
|
---|
1112 | int yynerrs;
|
---|
1113 |
|
---|
1114 |
|
---|
1115 |
|
---|
1116 | /*-------------------------.
|
---|
1117 | | yyparse or yypush_parse. |
|
---|
1118 | `-------------------------*/
|
---|
1119 |
|
---|
1120 | #ifdef YYPARSE_PARAM
|
---|
1121 | #if (defined __STDC__ || defined __C99__FUNC__ \
|
---|
1122 | || defined __cplusplus || defined _MSC_VER)
|
---|
1123 | int
|
---|
1124 | yyparse (void *YYPARSE_PARAM)
|
---|
1125 | #else
|
---|
1126 | int
|
---|
1127 | yyparse (YYPARSE_PARAM)
|
---|
1128 | void *YYPARSE_PARAM;
|
---|
1129 | #endif
|
---|
1130 | #else /* ! YYPARSE_PARAM */
|
---|
1131 | #if (defined __STDC__ || defined __C99__FUNC__ \
|
---|
1132 | || defined __cplusplus || defined _MSC_VER)
|
---|
1133 | int
|
---|
1134 | yyparse (void)
|
---|
1135 | #else
|
---|
1136 | int
|
---|
1137 | yyparse ()
|
---|
1138 |
|
---|
1139 | #endif
|
---|
1140 | #endif
|
---|
1141 | {
|
---|
1142 |
|
---|
1143 |
|
---|
1144 | int yystate;
|
---|
1145 | /* Number of tokens to shift before error messages enabled. */
|
---|
1146 | int yyerrstatus;
|
---|
1147 |
|
---|
1148 | /* The stacks and their tools:
|
---|
1149 | `yyss': related to states.
|
---|
1150 | `yyvs': related to semantic values.
|
---|
1151 |
|
---|
1152 | Refer to the stacks thru separate pointers, to allow yyoverflow
|
---|
1153 | to reallocate them elsewhere. */
|
---|
1154 |
|
---|
1155 | /* The state stack. */
|
---|
1156 | yytype_int16 yyssa[YYINITDEPTH];
|
---|
1157 | yytype_int16 *yyss;
|
---|
1158 | yytype_int16 *yyssp;
|
---|
1159 |
|
---|
1160 | /* The semantic value stack. */
|
---|
1161 | YYSTYPE yyvsa[YYINITDEPTH];
|
---|
1162 | YYSTYPE *yyvs;
|
---|
1163 | YYSTYPE *yyvsp;
|
---|
1164 |
|
---|
1165 | YYSIZE_T yystacksize;
|
---|
1166 |
|
---|
1167 | int yyn;
|
---|
1168 | int yyresult;
|
---|
1169 | /* Lookahead token as an internal (translated) token number. */
|
---|
1170 | int yytoken;
|
---|
1171 | /* The variables used to return semantic value and location from the
|
---|
1172 | action routines. */
|
---|
1173 | YYSTYPE yyval;
|
---|
1174 |
|
---|
1175 | #if YYERROR_VERBOSE
|
---|
1176 | /* Buffer for error messages, and its allocated size. */
|
---|
1177 | char yymsgbuf[128];
|
---|
1178 | char *yymsg = yymsgbuf;
|
---|
1179 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
---|
1180 | #endif
|
---|
1181 |
|
---|
1182 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
|
---|
1183 |
|
---|
1184 | /* The number of symbols on the RHS of the reduced rule.
|
---|
1185 | Keep to zero when no symbol should be popped. */
|
---|
1186 | int yylen = 0;
|
---|
1187 |
|
---|
1188 | yytoken = 0;
|
---|
1189 | yyss = yyssa;
|
---|
1190 | yyvs = yyvsa;
|
---|
1191 | yystacksize = YYINITDEPTH;
|
---|
1192 |
|
---|
1193 | YYDPRINTF ((stderr, "Starting parse\n"));
|
---|
1194 |
|
---|
1195 | yystate = 0;
|
---|
1196 | yyerrstatus = 0;
|
---|
1197 | yynerrs = 0;
|
---|
1198 | yychar = YYEMPTY; /* Cause a token to be read. */
|
---|
1199 |
|
---|
1200 | /* Initialize stack pointers.
|
---|
1201 | Waste one element of value and location stack
|
---|
1202 | so that they stay on the same level as the state stack.
|
---|
1203 | The wasted elements are never initialized. */
|
---|
1204 | yyssp = yyss;
|
---|
1205 | yyvsp = yyvs;
|
---|
1206 |
|
---|
1207 | goto yysetstate;
|
---|
1208 |
|
---|
1209 | /*------------------------------------------------------------.
|
---|
1210 | | yynewstate -- Push a new state, which is found in yystate. |
|
---|
1211 | `------------------------------------------------------------*/
|
---|
1212 | yynewstate:
|
---|
1213 | /* In all cases, when you get here, the value and location stacks
|
---|
1214 | have just been pushed. So pushing a state here evens the stacks. */
|
---|
1215 | yyssp++;
|
---|
1216 |
|
---|
1217 | yysetstate:
|
---|
1218 | *yyssp = yystate;
|
---|
1219 |
|
---|
1220 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
1221 | {
|
---|
1222 | /* Get the current used size of the three stacks, in elements. */
|
---|
1223 | YYSIZE_T yysize = yyssp - yyss + 1;
|
---|
1224 |
|
---|
1225 | #ifdef yyoverflow
|
---|
1226 | {
|
---|
1227 | /* Give user a chance to reallocate the stack. Use copies of
|
---|
1228 | these so that the &'s don't force the real ones into
|
---|
1229 | memory. */
|
---|
1230 | YYSTYPE *yyvs1 = yyvs;
|
---|
1231 | yytype_int16 *yyss1 = yyss;
|
---|
1232 |
|
---|
1233 | /* Each stack pointer address is followed by the size of the
|
---|
1234 | data in use in that stack, in bytes. This used to be a
|
---|
1235 | conditional around just the two extra args, but that might
|
---|
1236 | be undefined if yyoverflow is a macro. */
|
---|
1237 | yyoverflow (YY_("memory exhausted"),
|
---|
1238 | &yyss1, yysize * sizeof (*yyssp),
|
---|
1239 | &yyvs1, yysize * sizeof (*yyvsp),
|
---|
1240 | &yystacksize);
|
---|
1241 |
|
---|
1242 | yyss = yyss1;
|
---|
1243 | yyvs = yyvs1;
|
---|
1244 | }
|
---|
1245 | #else /* no yyoverflow */
|
---|
1246 | # ifndef YYSTACK_RELOCATE
|
---|
1247 | goto yyexhaustedlab;
|
---|
1248 | # else
|
---|
1249 | /* Extend the stack our own way. */
|
---|
1250 | if (YYMAXDEPTH <= yystacksize)
|
---|
1251 | goto yyexhaustedlab;
|
---|
1252 | yystacksize *= 2;
|
---|
1253 | if (YYMAXDEPTH < yystacksize)
|
---|
1254 | yystacksize = YYMAXDEPTH;
|
---|
1255 |
|
---|
1256 | {
|
---|
1257 | yytype_int16 *yyss1 = yyss;
|
---|
1258 | union yyalloc *yyptr =
|
---|
1259 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
---|
1260 | if (! yyptr)
|
---|
1261 | goto yyexhaustedlab;
|
---|
1262 | YYSTACK_RELOCATE (yyss_alloc, yyss);
|
---|
1263 | YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
---|
1264 | # undef YYSTACK_RELOCATE
|
---|
1265 | if (yyss1 != yyssa)
|
---|
1266 | YYSTACK_FREE (yyss1);
|
---|
1267 | }
|
---|
1268 | # endif
|
---|
1269 | #endif /* no yyoverflow */
|
---|
1270 |
|
---|
1271 | yyssp = yyss + yysize - 1;
|
---|
1272 | yyvsp = yyvs + yysize - 1;
|
---|
1273 |
|
---|
1274 | YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
---|
1275 | (unsigned long int) yystacksize));
|
---|
1276 |
|
---|
1277 | if (yyss + yystacksize - 1 <= yyssp)
|
---|
1278 | YYABORT;
|
---|
1279 | }
|
---|
1280 |
|
---|
1281 | YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
---|
1282 |
|
---|
1283 | if (yystate == YYFINAL)
|
---|
1284 | YYACCEPT;
|
---|
1285 |
|
---|
1286 | goto yybackup;
|
---|
1287 |
|
---|
1288 | /*-----------.
|
---|
1289 | | yybackup. |
|
---|
1290 | `-----------*/
|
---|
1291 | yybackup:
|
---|
1292 |
|
---|
1293 | /* Do appropriate processing given the current state. Read a
|
---|
1294 | lookahead token if we need one and don't already have one. */
|
---|
1295 |
|
---|
1296 | /* First try to decide what to do without reference to lookahead token. */
|
---|
1297 | yyn = yypact[yystate];
|
---|
1298 | if (yyn == YYPACT_NINF)
|
---|
1299 | goto yydefault;
|
---|
1300 |
|
---|
1301 | /* Not known => get a lookahead token if don't already have one. */
|
---|
1302 |
|
---|
1303 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
---|
1304 | if (yychar == YYEMPTY)
|
---|
1305 | {
|
---|
1306 | YYDPRINTF ((stderr, "Reading a token: "));
|
---|
1307 | yychar = YYLEX;
|
---|
1308 | }
|
---|
1309 |
|
---|
1310 | if (yychar <= YYEOF)
|
---|
1311 | {
|
---|
1312 | yychar = yytoken = YYEOF;
|
---|
1313 | YYDPRINTF ((stderr, "Now at end of input.\n"));
|
---|
1314 | }
|
---|
1315 | else
|
---|
1316 | {
|
---|
1317 | yytoken = YYTRANSLATE (yychar);
|
---|
1318 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
---|
1319 | }
|
---|
1320 |
|
---|
1321 | /* If the proper action on seeing token YYTOKEN is to reduce or to
|
---|
1322 | detect an error, take that action. */
|
---|
1323 | yyn += yytoken;
|
---|
1324 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
|
---|
1325 | goto yydefault;
|
---|
1326 | yyn = yytable[yyn];
|
---|
1327 | if (yyn <= 0)
|
---|
1328 | {
|
---|
1329 | if (yyn == 0 || yyn == YYTABLE_NINF)
|
---|
1330 | goto yyerrlab;
|
---|
1331 | yyn = -yyn;
|
---|
1332 | goto yyreduce;
|
---|
1333 | }
|
---|
1334 |
|
---|
1335 | /* Count tokens shifted since error; after three, turn off error
|
---|
1336 | status. */
|
---|
1337 | if (yyerrstatus)
|
---|
1338 | yyerrstatus--;
|
---|
1339 |
|
---|
1340 | /* Shift the lookahead token. */
|
---|
1341 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
---|
1342 |
|
---|
1343 | /* Discard the shifted token. */
|
---|
1344 | yychar = YYEMPTY;
|
---|
1345 |
|
---|
1346 | yystate = yyn;
|
---|
1347 | *++yyvsp = yylval;
|
---|
1348 |
|
---|
1349 | goto yynewstate;
|
---|
1350 |
|
---|
1351 |
|
---|
1352 | /*-----------------------------------------------------------.
|
---|
1353 | | yydefault -- do the default action for the current state. |
|
---|
1354 | `-----------------------------------------------------------*/
|
---|
1355 | yydefault:
|
---|
1356 | yyn = yydefact[yystate];
|
---|
1357 | if (yyn == 0)
|
---|
1358 | goto yyerrlab;
|
---|
1359 | goto yyreduce;
|
---|
1360 |
|
---|
1361 |
|
---|
1362 | /*-----------------------------.
|
---|
1363 | | yyreduce -- Do a reduction. |
|
---|
1364 | `-----------------------------*/
|
---|
1365 | yyreduce:
|
---|
1366 | /* yyn is the number of a rule to reduce with. */
|
---|
1367 | yylen = yyr2[yyn];
|
---|
1368 |
|
---|
1369 | /* If YYLEN is nonzero, implement the default value of the action:
|
---|
1370 | `$$ = $1'.
|
---|
1371 |
|
---|
1372 | Otherwise, the following line sets YYVAL to garbage.
|
---|
1373 | This behavior is undocumented and Bison
|
---|
1374 | users should not rely upon it. Assigning to YYVAL
|
---|
1375 | unconditionally makes the parser a bit smaller, and it avoids a
|
---|
1376 | GCC warning that YYVAL may be used uninitialized. */
|
---|
1377 | yyval = yyvsp[1-yylen];
|
---|
1378 |
|
---|
1379 |
|
---|
1380 | YY_REDUCE_PRINT (yyn);
|
---|
1381 | switch (yyn)
|
---|
1382 | {
|
---|
1383 | case 2:
|
---|
1384 |
|
---|
1385 | /* Line 1455 of yacc.c */
|
---|
1386 | #line 73 "sel-gram.c"
|
---|
1387 | { _hx509_expr_input.expr = (yyvsp[(1) - (1)].expr); }
|
---|
1388 | break;
|
---|
1389 |
|
---|
1390 | case 3:
|
---|
1391 |
|
---|
1392 | /* Line 1455 of yacc.c */
|
---|
1393 | #line 75 "sel-gram.c"
|
---|
1394 | { (yyval.expr) = _hx509_make_expr(op_TRUE, NULL, NULL); }
|
---|
1395 | break;
|
---|
1396 |
|
---|
1397 | case 4:
|
---|
1398 |
|
---|
1399 | /* Line 1455 of yacc.c */
|
---|
1400 | #line 76 "sel-gram.c"
|
---|
1401 | { (yyval.expr) = _hx509_make_expr(op_FALSE, NULL, NULL); }
|
---|
1402 | break;
|
---|
1403 |
|
---|
1404 | case 5:
|
---|
1405 |
|
---|
1406 | /* Line 1455 of yacc.c */
|
---|
1407 | #line 77 "sel-gram.c"
|
---|
1408 | { (yyval.expr) = _hx509_make_expr(op_NOT, (yyvsp[(2) - (2)].expr), NULL); }
|
---|
1409 | break;
|
---|
1410 |
|
---|
1411 | case 6:
|
---|
1412 |
|
---|
1413 | /* Line 1455 of yacc.c */
|
---|
1414 | #line 78 "sel-gram.c"
|
---|
1415 | { (yyval.expr) = _hx509_make_expr(op_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
|
---|
1416 | break;
|
---|
1417 |
|
---|
1418 | case 7:
|
---|
1419 |
|
---|
1420 | /* Line 1455 of yacc.c */
|
---|
1421 | #line 79 "sel-gram.c"
|
---|
1422 | { (yyval.expr) = _hx509_make_expr(op_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
|
---|
1423 | break;
|
---|
1424 |
|
---|
1425 | case 8:
|
---|
1426 |
|
---|
1427 | /* Line 1455 of yacc.c */
|
---|
1428 | #line 80 "sel-gram.c"
|
---|
1429 | { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
|
---|
1430 | break;
|
---|
1431 |
|
---|
1432 | case 9:
|
---|
1433 |
|
---|
1434 | /* Line 1455 of yacc.c */
|
---|
1435 | #line 81 "sel-gram.c"
|
---|
1436 | { (yyval.expr) = _hx509_make_expr(op_COMP, (yyvsp[(1) - (1)].expr), NULL); }
|
---|
1437 | break;
|
---|
1438 |
|
---|
1439 | case 10:
|
---|
1440 |
|
---|
1441 | /* Line 1455 of yacc.c */
|
---|
1442 | #line 84 "sel-gram.c"
|
---|
1443 | { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (1)].expr), NULL); }
|
---|
1444 | break;
|
---|
1445 |
|
---|
1446 | case 11:
|
---|
1447 |
|
---|
1448 | /* Line 1455 of yacc.c */
|
---|
1449 | #line 85 "sel-gram.c"
|
---|
1450 | { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
|
---|
1451 | break;
|
---|
1452 |
|
---|
1453 | case 12:
|
---|
1454 |
|
---|
1455 | /* Line 1455 of yacc.c */
|
---|
1456 | #line 88 "sel-gram.c"
|
---|
1457 | { (yyval.expr) = _hx509_make_expr(comp_EQ, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); }
|
---|
1458 | break;
|
---|
1459 |
|
---|
1460 | case 13:
|
---|
1461 |
|
---|
1462 | /* Line 1455 of yacc.c */
|
---|
1463 | #line 89 "sel-gram.c"
|
---|
1464 | { (yyval.expr) = _hx509_make_expr(comp_NE, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); }
|
---|
1465 | break;
|
---|
1466 |
|
---|
1467 | case 14:
|
---|
1468 |
|
---|
1469 | /* Line 1455 of yacc.c */
|
---|
1470 | #line 90 "sel-gram.c"
|
---|
1471 | { (yyval.expr) = _hx509_make_expr(comp_TAILEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
|
---|
1472 | break;
|
---|
1473 |
|
---|
1474 | case 15:
|
---|
1475 |
|
---|
1476 | /* Line 1455 of yacc.c */
|
---|
1477 | #line 91 "sel-gram.c"
|
---|
1478 | { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (5)].expr), (yyvsp[(4) - (5)].expr)); }
|
---|
1479 | break;
|
---|
1480 |
|
---|
1481 | case 16:
|
---|
1482 |
|
---|
1483 | /* Line 1455 of yacc.c */
|
---|
1484 | #line 92 "sel-gram.c"
|
---|
1485 | { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
|
---|
1486 | break;
|
---|
1487 |
|
---|
1488 | case 17:
|
---|
1489 |
|
---|
1490 | /* Line 1455 of yacc.c */
|
---|
1491 | #line 95 "sel-gram.c"
|
---|
1492 | { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
|
---|
1493 | break;
|
---|
1494 |
|
---|
1495 | case 18:
|
---|
1496 |
|
---|
1497 | /* Line 1455 of yacc.c */
|
---|
1498 | #line 96 "sel-gram.c"
|
---|
1499 | { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
|
---|
1500 | break;
|
---|
1501 |
|
---|
1502 | case 19:
|
---|
1503 |
|
---|
1504 | /* Line 1455 of yacc.c */
|
---|
1505 | #line 97 "sel-gram.c"
|
---|
1506 | { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
|
---|
1507 | break;
|
---|
1508 |
|
---|
1509 | case 20:
|
---|
1510 |
|
---|
1511 | /* Line 1455 of yacc.c */
|
---|
1512 | #line 98 "sel-gram.c"
|
---|
1513 | { (yyval.expr) = (yyvsp[(1) - (1)].expr); }
|
---|
1514 | break;
|
---|
1515 |
|
---|
1516 | case 21:
|
---|
1517 |
|
---|
1518 | /* Line 1455 of yacc.c */
|
---|
1519 | #line 101 "sel-gram.c"
|
---|
1520 | { (yyval.expr) = _hx509_make_expr(expr_NUMBER, (yyvsp[(1) - (1)].string), NULL); }
|
---|
1521 | break;
|
---|
1522 |
|
---|
1523 | case 22:
|
---|
1524 |
|
---|
1525 | /* Line 1455 of yacc.c */
|
---|
1526 | #line 102 "sel-gram.c"
|
---|
1527 | { (yyval.expr) = _hx509_make_expr(expr_STRING, (yyvsp[(1) - (1)].string), NULL); }
|
---|
1528 | break;
|
---|
1529 |
|
---|
1530 | case 23:
|
---|
1531 |
|
---|
1532 | /* Line 1455 of yacc.c */
|
---|
1533 | #line 104 "sel-gram.c"
|
---|
1534 | {
|
---|
1535 | (yyval.expr) = _hx509_make_expr(expr_FUNCTION, (yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].expr)); }
|
---|
1536 | break;
|
---|
1537 |
|
---|
1538 | case 24:
|
---|
1539 |
|
---|
1540 | /* Line 1455 of yacc.c */
|
---|
1541 | #line 107 "sel-gram.c"
|
---|
1542 | { (yyval.expr) = (yyvsp[(3) - (4)].expr); }
|
---|
1543 | break;
|
---|
1544 |
|
---|
1545 | case 25:
|
---|
1546 |
|
---|
1547 | /* Line 1455 of yacc.c */
|
---|
1548 | #line 110 "sel-gram.c"
|
---|
1549 | {
|
---|
1550 | (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].expr)); }
|
---|
1551 | break;
|
---|
1552 |
|
---|
1553 | case 26:
|
---|
1554 |
|
---|
1555 | /* Line 1455 of yacc.c */
|
---|
1556 | #line 112 "sel-gram.c"
|
---|
1557 | {
|
---|
1558 | (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (1)].string), NULL); }
|
---|
1559 | break;
|
---|
1560 |
|
---|
1561 |
|
---|
1562 |
|
---|
1563 | /* Line 1455 of yacc.c */
|
---|
1564 | #line 1563 "sel-gram.c"
|
---|
1565 | default: break;
|
---|
1566 | }
|
---|
1567 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
---|
1568 |
|
---|
1569 | YYPOPSTACK (yylen);
|
---|
1570 | yylen = 0;
|
---|
1571 | YY_STACK_PRINT (yyss, yyssp);
|
---|
1572 |
|
---|
1573 | *++yyvsp = yyval;
|
---|
1574 |
|
---|
1575 | /* Now `shift' the result of the reduction. Determine what state
|
---|
1576 | that goes to, based on the state we popped back to and the rule
|
---|
1577 | number reduced by. */
|
---|
1578 |
|
---|
1579 | yyn = yyr1[yyn];
|
---|
1580 |
|
---|
1581 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
|
---|
1582 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
---|
1583 | yystate = yytable[yystate];
|
---|
1584 | else
|
---|
1585 | yystate = yydefgoto[yyn - YYNTOKENS];
|
---|
1586 |
|
---|
1587 | goto yynewstate;
|
---|
1588 |
|
---|
1589 |
|
---|
1590 | /*------------------------------------.
|
---|
1591 | | yyerrlab -- here on detecting error |
|
---|
1592 | `------------------------------------*/
|
---|
1593 | yyerrlab:
|
---|
1594 | /* If not already recovering from an error, report this error. */
|
---|
1595 | if (!yyerrstatus)
|
---|
1596 | {
|
---|
1597 | ++yynerrs;
|
---|
1598 | #if ! YYERROR_VERBOSE
|
---|
1599 | yyerror (YY_("syntax error"));
|
---|
1600 | #else
|
---|
1601 | {
|
---|
1602 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
|
---|
1603 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
|
---|
1604 | {
|
---|
1605 | YYSIZE_T yyalloc = 2 * yysize;
|
---|
1606 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
|
---|
1607 | yyalloc = YYSTACK_ALLOC_MAXIMUM;
|
---|
1608 | if (yymsg != yymsgbuf)
|
---|
1609 | YYSTACK_FREE (yymsg);
|
---|
1610 | yymsg = (char *) YYSTACK_ALLOC (yyalloc);
|
---|
1611 | if (yymsg)
|
---|
1612 | yymsg_alloc = yyalloc;
|
---|
1613 | else
|
---|
1614 | {
|
---|
1615 | yymsg = yymsgbuf;
|
---|
1616 | yymsg_alloc = sizeof yymsgbuf;
|
---|
1617 | }
|
---|
1618 | }
|
---|
1619 |
|
---|
1620 | if (0 < yysize && yysize <= yymsg_alloc)
|
---|
1621 | {
|
---|
1622 | (void) yysyntax_error (yymsg, yystate, yychar);
|
---|
1623 | yyerror (yymsg);
|
---|
1624 | }
|
---|
1625 | else
|
---|
1626 | {
|
---|
1627 | yyerror (YY_("syntax error"));
|
---|
1628 | if (yysize != 0)
|
---|
1629 | goto yyexhaustedlab;
|
---|
1630 | }
|
---|
1631 | }
|
---|
1632 | #endif
|
---|
1633 | }
|
---|
1634 |
|
---|
1635 |
|
---|
1636 |
|
---|
1637 | if (yyerrstatus == 3)
|
---|
1638 | {
|
---|
1639 | /* If just tried and failed to reuse lookahead token after an
|
---|
1640 | error, discard it. */
|
---|
1641 |
|
---|
1642 | if (yychar <= YYEOF)
|
---|
1643 | {
|
---|
1644 | /* Return failure if at end of input. */
|
---|
1645 | if (yychar == YYEOF)
|
---|
1646 | YYABORT;
|
---|
1647 | }
|
---|
1648 | else
|
---|
1649 | {
|
---|
1650 | yydestruct ("Error: discarding",
|
---|
1651 | yytoken, &yylval);
|
---|
1652 | yychar = YYEMPTY;
|
---|
1653 | }
|
---|
1654 | }
|
---|
1655 |
|
---|
1656 | /* Else will try to reuse lookahead token after shifting the error
|
---|
1657 | token. */
|
---|
1658 | goto yyerrlab1;
|
---|
1659 |
|
---|
1660 |
|
---|
1661 | /*---------------------------------------------------.
|
---|
1662 | | yyerrorlab -- error raised explicitly by YYERROR. |
|
---|
1663 | `---------------------------------------------------*/
|
---|
1664 | yyerrorlab:
|
---|
1665 |
|
---|
1666 | /* Pacify compilers like GCC when the user code never invokes
|
---|
1667 | YYERROR and the label yyerrorlab therefore never appears in user
|
---|
1668 | code. */
|
---|
1669 | if (/*CONSTCOND*/ 0)
|
---|
1670 | goto yyerrorlab;
|
---|
1671 |
|
---|
1672 | /* Do not reclaim the symbols of the rule which action triggered
|
---|
1673 | this YYERROR. */
|
---|
1674 | YYPOPSTACK (yylen);
|
---|
1675 | yylen = 0;
|
---|
1676 | YY_STACK_PRINT (yyss, yyssp);
|
---|
1677 | yystate = *yyssp;
|
---|
1678 | goto yyerrlab1;
|
---|
1679 |
|
---|
1680 |
|
---|
1681 | /*-------------------------------------------------------------.
|
---|
1682 | | yyerrlab1 -- common code for both syntax error and YYERROR. |
|
---|
1683 | `-------------------------------------------------------------*/
|
---|
1684 | yyerrlab1:
|
---|
1685 | yyerrstatus = 3; /* Each real token shifted decrements this. */
|
---|
1686 |
|
---|
1687 | for (;;)
|
---|
1688 | {
|
---|
1689 | yyn = yypact[yystate];
|
---|
1690 | if (yyn != YYPACT_NINF)
|
---|
1691 | {
|
---|
1692 | yyn += YYTERROR;
|
---|
1693 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
---|
1694 | {
|
---|
1695 | yyn = yytable[yyn];
|
---|
1696 | if (0 < yyn)
|
---|
1697 | break;
|
---|
1698 | }
|
---|
1699 | }
|
---|
1700 |
|
---|
1701 | /* Pop the current state because it cannot handle the error token. */
|
---|
1702 | if (yyssp == yyss)
|
---|
1703 | YYABORT;
|
---|
1704 |
|
---|
1705 |
|
---|
1706 | yydestruct ("Error: popping",
|
---|
1707 | yystos[yystate], yyvsp);
|
---|
1708 | YYPOPSTACK (1);
|
---|
1709 | yystate = *yyssp;
|
---|
1710 | YY_STACK_PRINT (yyss, yyssp);
|
---|
1711 | }
|
---|
1712 |
|
---|
1713 | *++yyvsp = yylval;
|
---|
1714 |
|
---|
1715 |
|
---|
1716 | /* Shift the error token. */
|
---|
1717 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
|
---|
1718 |
|
---|
1719 | yystate = yyn;
|
---|
1720 | goto yynewstate;
|
---|
1721 |
|
---|
1722 |
|
---|
1723 | /*-------------------------------------.
|
---|
1724 | | yyacceptlab -- YYACCEPT comes here. |
|
---|
1725 | `-------------------------------------*/
|
---|
1726 | yyacceptlab:
|
---|
1727 | yyresult = 0;
|
---|
1728 | goto yyreturn;
|
---|
1729 |
|
---|
1730 | /*-----------------------------------.
|
---|
1731 | | yyabortlab -- YYABORT comes here. |
|
---|
1732 | `-----------------------------------*/
|
---|
1733 | yyabortlab:
|
---|
1734 | yyresult = 1;
|
---|
1735 | goto yyreturn;
|
---|
1736 |
|
---|
1737 | #if !defined(yyoverflow) || YYERROR_VERBOSE
|
---|
1738 | /*-------------------------------------------------.
|
---|
1739 | | yyexhaustedlab -- memory exhaustion comes here. |
|
---|
1740 | `-------------------------------------------------*/
|
---|
1741 | yyexhaustedlab:
|
---|
1742 | yyerror (YY_("memory exhausted"));
|
---|
1743 | yyresult = 2;
|
---|
1744 | /* Fall through. */
|
---|
1745 | #endif
|
---|
1746 |
|
---|
1747 | yyreturn:
|
---|
1748 | if (yychar != YYEMPTY)
|
---|
1749 | yydestruct ("Cleanup: discarding lookahead",
|
---|
1750 | yytoken, &yylval);
|
---|
1751 | /* Do not reclaim the symbols of the rule which action triggered
|
---|
1752 | this YYABORT or YYACCEPT. */
|
---|
1753 | YYPOPSTACK (yylen);
|
---|
1754 | YY_STACK_PRINT (yyss, yyssp);
|
---|
1755 | while (yyssp != yyss)
|
---|
1756 | {
|
---|
1757 | yydestruct ("Cleanup: popping",
|
---|
1758 | yystos[*yyssp], yyvsp);
|
---|
1759 | YYPOPSTACK (1);
|
---|
1760 | }
|
---|
1761 | #ifndef yyoverflow
|
---|
1762 | if (yyss != yyssa)
|
---|
1763 | YYSTACK_FREE (yyss);
|
---|
1764 | #endif
|
---|
1765 | #if YYERROR_VERBOSE
|
---|
1766 | if (yymsg != yymsgbuf)
|
---|
1767 | YYSTACK_FREE (yymsg);
|
---|
1768 | #endif
|
---|
1769 | /* Make sure YYID is used. */
|
---|
1770 | return YYID (yyresult);
|
---|
1771 | }
|
---|
1772 |
|
---|
1773 |
|
---|
1774 |
|
---|