1 /* A Bison parser, made by GNU Bison 1.875. */
2
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
28
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
35
36 /* Identify Bison output. */
37 #define YYBISON 1
38
39 /* Skeleton name. */
40 #define YYSKELETON_NAME "yacc.c"
41
42 /* Pure parsers. */
43 #define YYPURE 1
44
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
47
48
49
50 /* Tokens. */
51 #ifndef YYTOKENTYPE
52 # define YYTOKENTYPE
53 /* Put the tokens into the symbol table, so that GDB and other debuggers
54 know about them. */
55 enum yytokentype {
56 SEL_TOKEN = 258,
57 SEL_ID = 259,
58 SEL_AS = 260,
59 SEL_AVG = 261,
60 SEL_MAX = 262,
61 SEL_MIN = 263,
62 SEL_SUM = 264,
63 SEL_COUNT = 265,
64 SEL_WEIGHT = 266,
65 SEL_DISTINCT = 267,
66 TOK_DIV = 268,
67 TOK_MOD = 269,
68 TOK_NEG = 270,
69 TOK_LTE = 271,
70 TOK_GTE = 272,
71 TOK_EQ = 273,
72 TOK_NE = 274,
73 TOK_CONST_STRING = 275,
74 TOK_OR = 276,
75 TOK_AND = 277,
76 TOK_NOT = 278
77 };
78 #endif
79 #define SEL_TOKEN 258
80 #define SEL_ID 259
81 #define SEL_AS 260
82 #define SEL_AVG 261
83 #define SEL_MAX 262
84 #define SEL_MIN 263
85 #define SEL_SUM 264
86 #define SEL_COUNT 265
87 #define SEL_WEIGHT 266
88 #define SEL_DISTINCT 267
89 #define TOK_DIV 268
90 #define TOK_MOD 269
91 #define TOK_NEG 270
92 #define TOK_LTE 271
93 #define TOK_GTE 272
94 #define TOK_EQ 273
95 #define TOK_NE 274
96 #define TOK_CONST_STRING 275
97 #define TOK_OR 276
98 #define TOK_AND 277
99 #define TOK_NOT 278
100
101
102
103
104 /* Copy the first part of user declarations. */
105
106
107 #if USE_WINDOWS
108 #pragma warning(push,1)
109 #pragma warning(disable:4702) // unreachable code
110 #endif
111
112
113 /* Enabling traces. */
114 #ifndef YYDEBUG
115 # define YYDEBUG 0
116 #endif
117
118 /* Enabling verbose error messages. */
119 #ifdef YYERROR_VERBOSE
120 # undef YYERROR_VERBOSE
121 # define YYERROR_VERBOSE 1
122 #else
123 # define YYERROR_VERBOSE 1
124 #endif
125
126 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
127 typedef int YYSTYPE;
128 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
129 # define YYSTYPE_IS_DECLARED 1
130 # define YYSTYPE_IS_TRIVIAL 1
131 #endif
132
133
134
135 /* Copy the second part of user declarations. */
136
137
138 /* Line 214 of yacc.c. */
139
140
141 #if ! defined (yyoverflow) || YYERROR_VERBOSE
142
143 /* The parser invokes alloca or malloc; define the necessary symbols. */
144
145 # if YYSTACK_USE_ALLOCA
146 # define YYSTACK_ALLOC alloca
147 # else
148 # ifndef YYSTACK_USE_ALLOCA
149 # if defined (alloca) || defined (_ALLOCA_H)
150 # define YYSTACK_ALLOC alloca
151 # else
152 # ifdef __GNUC__
153 # define YYSTACK_ALLOC __builtin_alloca
154 # endif
155 # endif
156 # endif
157 # endif
158
159 # ifdef YYSTACK_ALLOC
160 /* Pacify GCC's `empty if-body' warning. */
161 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
162 # else
163 # if defined (__STDC__) || defined (__cplusplus)
164 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
165 # define YYSIZE_T size_t
166 # endif
167 # define YYSTACK_ALLOC malloc
168 # define YYSTACK_FREE free
169 # endif
170 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
171
172
173 #if (! defined (yyoverflow) \
174 && (! defined (__cplusplus) \
175 || (YYSTYPE_IS_TRIVIAL)))
176
177 /* A type that is properly aligned for any stack member. */
178 union yyalloc
179 {
180 short yyss;
181 YYSTYPE yyvs;
182 };
183
184 /* The size of the maximum gap between one aligned stack and the next. */
185 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
186
187 /* The size of an array large to enough to hold all stacks, each with
188 N elements. */
189 # define YYSTACK_BYTES(N) \
190 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
191 + YYSTACK_GAP_MAXIMUM)
192
193 /* Copy COUNT objects from FROM to TO. The source and destination do
194 not overlap. */
195 # ifndef YYCOPY
196 # if 1 < __GNUC__
197 # define YYCOPY(To, From, Count) \
198 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
199 # else
200 # define YYCOPY(To, From, Count) \
201 do \
202 { \
203 register YYSIZE_T yyi; \
204 for (yyi = 0; yyi < (Count); yyi++) \
205 (To)[yyi] = (From)[yyi]; \
206 } \
207 while (0)
208 # endif
209 # endif
210
211 /* Relocate STACK from its old location to the new one. The
212 local variables YYSIZE and YYSTACKSIZE give the old and new number of
213 elements in the stack, and YYPTR gives the new location of the
214 stack. Advance YYPTR to a properly aligned location for the next
215 stack. */
216 # define YYSTACK_RELOCATE(Stack) \
217 do \
218 { \
219 YYSIZE_T yynewbytes; \
220 YYCOPY (&yyptr->Stack, Stack, yysize); \
221 Stack = &yyptr->Stack; \
222 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
223 yyptr += yynewbytes / sizeof (*yyptr); \
224 } \
225 while (0)
226
227 #endif
228
229 #if defined (__STDC__) || defined (__cplusplus)
230 typedef signed char yysigned_char;
231 #else
232 typedef short yysigned_char;
233 #endif
234
235 /* YYFINAL -- State number of the termination state. */
236 #define YYFINAL 31
237 /* YYLAST -- Last index in YYTABLE. */
238 #define YYLAST 420
239
240 /* YYNTOKENS -- Number of terminals. */
241 #define YYNTOKENS 36
242 /* YYNNTS -- Number of nonterminals. */
243 #define YYNNTS 10
244 /* YYNRULES -- Number of rules. */
245 #define YYNRULES 48
246 /* YYNRULES -- Number of states. */
247 #define YYNSTATES 105
248
249 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
250 #define YYUNDEFTOK 2
251 #define YYMAXUTOK 278
252
253 #define YYTRANSLATE(YYX) \
254 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
255
256 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
257 static const unsigned char yytranslate[] =
258 {
259 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
260 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
261 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
262 2, 2, 2, 2, 2, 2, 2, 31, 24, 2,
263 34, 35, 29, 27, 33, 28, 2, 30, 2, 2,
264 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
265 25, 2, 26, 2, 2, 2, 2, 2, 2, 2,
266 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
267 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
268 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
270 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
271 2, 2, 2, 2, 23, 2, 2, 2, 2, 2,
272 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
273 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
274 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
275 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
276 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
277 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
278 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
279 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
280 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
281 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
282 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
283 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
284 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
285 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
286 15, 16, 17, 18, 19, 20, 21, 22, 32
287 };
288
289 #if YYDEBUG
290 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
291 YYRHS. */
292 static const unsigned char yyprhs[] =
293 {
294 0, 0, 3, 5, 9, 11, 14, 15, 17, 20,
295 22, 27, 32, 37, 42, 47, 51, 57, 59, 62,
296 65, 69, 73, 77, 81, 85, 89, 93, 97, 101,
297 105, 109, 113, 117, 121, 125, 129, 133, 137, 139,
298 141, 143, 148, 152, 159, 166, 168, 172, 174
299 };
300
301 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
302 static const yysigned_char yyrhs[] =
303 {
304 37, 0, -1, 38, -1, 37, 33, 38, -1, 29,
305 -1, 40, 39, -1, -1, 3, -1, 5, 3, -1,
306 41, -1, 6, 34, 41, 35, -1, 7, 34, 41,
307 35, -1, 8, 34, 41, 35, -1, 9, 34, 41,
308 35, -1, 10, 34, 29, 35, -1, 11, 34, 35,
309 -1, 10, 34, 12, 3, 35, -1, 42, -1, 28,
310 41, -1, 32, 41, -1, 41, 27, 41, -1, 41,
311 28, 41, -1, 41, 29, 41, -1, 41, 30, 41,
312 -1, 41, 25, 41, -1, 41, 26, 41, -1, 41,
313 24, 41, -1, 41, 23, 41, -1, 41, 31, 41,
314 -1, 41, 13, 41, -1, 41, 14, 41, -1, 41,
315 16, 41, -1, 41, 17, 41, -1, 41, 18, 41,
316 -1, 41, 19, 41, -1, 41, 22, 41, -1, 41,
317 21, 41, -1, 34, 41, 35, -1, 43, -1, 4,
318 -1, 3, -1, 3, 34, 44, 35, -1, 3, 34,
319 35, -1, 8, 34, 41, 33, 41, 35, -1, 7,
320 34, 41, 33, 41, 35, -1, 45, -1, 44, 33,
321 45, -1, 41, -1, 20, -1
322 };
323
324 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
325 static const unsigned char yyrline[] =
326 {
327 0, 47, 47, 48, 52, 53, 55, 57, 58, 62,
328 63, 64, 65, 66, 67, 68, 69, 75, 76, 77,
329 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
330 88, 89, 90, 91, 92, 93, 94, 95, 96, 100,
331 101, 104, 105, 106, 107, 111, 112, 116, 117
332 };
333 #endif
334
335 #if YYDEBUG || YYERROR_VERBOSE
336 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
337 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
338 static const char *const yytname[] =
339 {
340 "$end", "error", "$undefined", "SEL_TOKEN", "SEL_ID", "SEL_AS", "SEL_AVG",
341 "SEL_MAX", "SEL_MIN", "SEL_SUM", "SEL_COUNT", "SEL_WEIGHT",
342 "SEL_DISTINCT", "TOK_DIV", "TOK_MOD", "TOK_NEG", "TOK_LTE", "TOK_GTE",
343 "TOK_EQ", "TOK_NE", "TOK_CONST_STRING", "TOK_OR", "TOK_AND", "'|'",
344 "'&'", "'<'", "'>'", "'+'", "'-'", "'*'", "'/'", "'%'", "TOK_NOT",
345 "','", "'('", "')'", "$accept", "select_list", "select_item",
346 "opt_alias", "select_expr", "expr", "select_atom", "function",
347 "arglist", "arg", 0
348 };
349 #endif
350
351 # ifdef YYPRINT
352 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
353 token YYLEX-NUM. */
354 static const unsigned short yytoknum[] =
355 {
356 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
357 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
358 275, 276, 277, 124, 38, 60, 62, 43, 45, 42,
359 47, 37, 278, 44, 40, 41
360 };
361 # endif
362
363 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
364 static const unsigned char yyr1[] =
365 {
366 0, 36, 37, 37, 38, 38, 39, 39, 39, 40,
367 40, 40, 40, 40, 40, 40, 40, 41, 41, 41,
368 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
369 41, 41, 41, 41, 41, 41, 41, 41, 41, 42,
370 42, 43, 43, 43, 43, 44, 44, 45, 45
371 };
372
373 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
374 static const unsigned char yyr2[] =
375 {
376 0, 2, 1, 3, 1, 2, 0, 1, 2, 1,
377 4, 4, 4, 4, 4, 3, 5, 1, 2, 2,
378 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
379 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
380 1, 4, 3, 6, 6, 1, 3, 1, 1
381 };
382
383 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
384 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
385 means the default is an error. */
386 static const unsigned char yydefact[] =
387 {
388 0, 40, 39, 0, 0, 0, 0, 0, 0, 0,
389 4, 0, 0, 0, 2, 6, 9, 17, 38, 0,
390 0, 0, 0, 0, 0, 0, 0, 0, 18, 19,
391 0, 1, 0, 7, 0, 5, 0, 0, 0, 0,
392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
393 0, 0, 0, 48, 42, 47, 0, 45, 0, 0,
394 0, 0, 0, 0, 15, 0, 0, 37, 3, 8,
395 29, 30, 31, 32, 33, 34, 36, 35, 27, 26,
396 24, 25, 20, 21, 22, 23, 28, 0, 41, 10,
397 0, 11, 0, 12, 13, 0, 14, 0, 0, 46,
398 0, 0, 16, 44, 43
399 };
400
401 /* YYDEFGOTO[NTERM-NUM]. */
402 static const yysigned_char yydefgoto[] =
403 {
404 -1, 13, 14, 35, 15, 16, 17, 18, 56, 57
405 };
406
407 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
408 STATE-NUM. */
409 #define YYPACT_NINF -34
410 static const short yypact[] =
411 {
412 57, -33, -34, -30, -18, 10, 13, 21, 24, 96,
413 -34, 96, 96, 15, -34, 48, 306, -34, -34, 42,
414 96, 96, 96, 96, -5, -10, 25, 35, -34, -34,
415 164, -34, 57, -34, 23, -34, 96, 96, 96, 96,
416 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
417 96, 96, 96, -34, -34, 306, 19, -34, 184, 118,
418 141, 204, 68, 37, -34, 96, 96, -34, -34, -34,
419 -34, -34, 389, 389, -8, -8, 325, 344, 363, 382,
420 389, 389, 81, 81, -34, -34, -34, 89, -34, -34,
421 96, -34, 96, -34, -34, 38, -34, 264, 285, -34,
422 224, 244, -34, -34, -34
423 };
424
425 /* YYPGOTO[NTERM-NUM]. */
426 static const yysigned_char yypgoto[] =
427 {
428 -34, -34, 43, -34, -34, -9, -34, -34, -34, -7
429 };
430
431 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
432 positive, shift that token. If negative, reduce the rule which
433 number is the opposite. If zero, do what YYDEFACT says.
434 If YYTABLE_NINF, syntax error. */
435 #define YYTABLE_NINF -1
436 static const unsigned char yytable[] =
437 {
438 28, 19, 29, 30, 20, 36, 37, 62, 38, 39,
439 55, 58, 59, 60, 61, 31, 21, 46, 47, 48,
440 49, 50, 51, 52, 63, 64, 69, 70, 71, 72,
441 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
442 83, 84, 85, 86, 22, 1, 2, 23, 32, 26,
443 27, 33, 87, 34, 88, 24, 97, 98, 25, 65,
444 1, 2, 53, 3, 4, 5, 6, 7, 8, 66,
445 9, 95, 96, 102, 11, 68, 12, 54, 55, 0,
446 99, 100, 0, 101, 0, 9, 10, 0, 0, 11,
447 0, 12, 1, 2, 36, 37, 26, 27, 0, 1,
448 2, 0, 0, 26, 27, 0, 0, 0, 0, 53,
449 50, 51, 52, 0, 0, 0, 0, 9, 0, 0,
450 0, 11, 0, 12, 9, 0, 0, 0, 11, 0,
451 12, 36, 37, 0, 38, 39, 40, 41, 0, 42,
452 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
453 0, 90, 0, 91, 36, 37, 0, 38, 39, 40,
454 41, 0, 42, 43, 44, 45, 46, 47, 48, 49,
455 50, 51, 52, 0, 92, 0, 93, 36, 37, 0,
456 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
457 47, 48, 49, 50, 51, 52, 0, 36, 37, 67,
458 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
459 47, 48, 49, 50, 51, 52, 0, 36, 37, 89,
460 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
461 47, 48, 49, 50, 51, 52, 0, 36, 37, 94,
462 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
463 47, 48, 49, 50, 51, 52, 0, 36, 37, 103,
464 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
465 47, 48, 49, 50, 51, 52, 0, 36, 37, 104,
466 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
467 47, 48, 49, 50, 51, 52, 0, 90, 36, 37,
468 0, 38, 39, 40, 41, 0, 42, 43, 44, 45,
469 46, 47, 48, 49, 50, 51, 52, 0, 92, 36,
470 37, 0, 38, 39, 40, 41, 0, 42, 43, 44,
471 45, 46, 47, 48, 49, 50, 51, 52, 36, 37,
472 0, 38, 39, 40, 41, 0, 0, 43, 44, 45,
473 46, 47, 48, 49, 50, 51, 52, 36, 37, 0,
474 38, 39, 40, 41, 0, 0, 0, 44, 45, 46,
475 47, 48, 49, 50, 51, 52, 36, 37, 0, 38,
476 39, 40, 41, 0, 0, 0, 0, 45, 46, 47,
477 48, 49, 50, 51, 52, 36, 37, 0, 38, 39,
478 40, 41, 36, 37, 0, 0, 0, 46, 47, 48,
479 49, 50, 51, 52, 0, 0, 48, 49, 50, 51,
480 52
481 };
482
483 static const yysigned_char yycheck[] =
484 {
485 9, 34, 11, 12, 34, 13, 14, 12, 16, 17,
486 19, 20, 21, 22, 23, 0, 34, 25, 26, 27,
487 28, 29, 30, 31, 29, 35, 3, 36, 37, 38,
488 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
489 49, 50, 51, 52, 34, 3, 4, 34, 33, 7,
490 8, 3, 33, 5, 35, 34, 65, 66, 34, 34,
491 3, 4, 20, 6, 7, 8, 9, 10, 11, 34,
492 28, 3, 35, 35, 32, 32, 34, 35, 87, -1,
493 87, 90, -1, 92, -1, 28, 29, -1, -1, 32,
494 -1, 34, 3, 4, 13, 14, 7, 8, -1, 3,
495 4, -1, -1, 7, 8, -1, -1, -1, -1, 20,
496 29, 30, 31, -1, -1, -1, -1, 28, -1, -1,
497 -1, 32, -1, 34, 28, -1, -1, -1, 32, -1,
498 34, 13, 14, -1, 16, 17, 18, 19, -1, 21,
499 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
500 -1, 33, -1, 35, 13, 14, -1, 16, 17, 18,
501 19, -1, 21, 22, 23, 24, 25, 26, 27, 28,
502 29, 30, 31, -1, 33, -1, 35, 13, 14, -1,
503 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
504 26, 27, 28, 29, 30, 31, -1, 13, 14, 35,
505 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
506 26, 27, 28, 29, 30, 31, -1, 13, 14, 35,
507 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
508 26, 27, 28, 29, 30, 31, -1, 13, 14, 35,
509 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
510 26, 27, 28, 29, 30, 31, -1, 13, 14, 35,
511 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
512 26, 27, 28, 29, 30, 31, -1, 13, 14, 35,
513 16, 17, 18, 19, -1, 21, 22, 23, 24, 25,
514 26, 27, 28, 29, 30, 31, -1, 33, 13, 14,
515 -1, 16, 17, 18, 19, -1, 21, 22, 23, 24,
516 25, 26, 27, 28, 29, 30, 31, -1, 33, 13,
517 14, -1, 16, 17, 18, 19, -1, 21, 22, 23,
518 24, 25, 26, 27, 28, 29, 30, 31, 13, 14,
519 -1, 16, 17, 18, 19, -1, -1, 22, 23, 24,
520 25, 26, 27, 28, 29, 30, 31, 13, 14, -1,
521 16, 17, 18, 19, -1, -1, -1, 23, 24, 25,
522 26, 27, 28, 29, 30, 31, 13, 14, -1, 16,
523 17, 18, 19, -1, -1, -1, -1, 24, 25, 26,
524 27, 28, 29, 30, 31, 13, 14, -1, 16, 17,
525 18, 19, 13, 14, -1, -1, -1, 25, 26, 27,
526 28, 29, 30, 31, -1, -1, 27, 28, 29, 30,
527 31
528 };
529
530 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
531 symbol of state STATE-NUM. */
532 static const unsigned char yystos[] =
533 {
534 0, 3, 4, 6, 7, 8, 9, 10, 11, 28,
535 29, 32, 34, 37, 38, 40, 41, 42, 43, 34,
536 34, 34, 34, 34, 34, 34, 7, 8, 41, 41,
537 41, 0, 33, 3, 5, 39, 13, 14, 16, 17,
538 18, 19, 21, 22, 23, 24, 25, 26, 27, 28,
539 29, 30, 31, 20, 35, 41, 44, 45, 41, 41,
540 41, 41, 12, 29, 35, 34, 34, 35, 38, 3,
541 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
542 41, 41, 41, 41, 41, 41, 41, 33, 35, 35,
543 33, 35, 33, 35, 35, 3, 35, 41, 41, 45,
544 41, 41, 35, 35, 35
545 };
546
547 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
548 # define YYSIZE_T __SIZE_TYPE__
549 #endif
550 #if ! defined (YYSIZE_T) && defined (size_t)
551 # define YYSIZE_T size_t
552 #endif
553 #if ! defined (YYSIZE_T)
554 # if defined (__STDC__) || defined (__cplusplus)
555 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
556 # define YYSIZE_T size_t
557 # endif
558 #endif
559 #if ! defined (YYSIZE_T)
560 # define YYSIZE_T unsigned int
561 #endif
562
563 #define yyerrok (yyerrstatus = 0)
564 #define yyclearin (yychar = YYEMPTY)
565 #define YYEMPTY (-2)
566 #define YYEOF 0
567
568 #define YYACCEPT goto yyacceptlab
569 #define YYABORT goto yyabortlab
570 #define YYERROR goto yyerrlab1
571
572 /* Like YYERROR except do call yyerror. This remains here temporarily
573 to ease the transition to the new meaning of YYERROR, for GCC.
574 Once GCC version 2 has supplanted version 1, this can go. */
575
576 #define YYFAIL goto yyerrlab
577
578 #define YYRECOVERING() (!!yyerrstatus)
579
580 #define YYBACKUP(Token, Value) \
581 do \
582 if (yychar == YYEMPTY && yylen == 1) \
583 { \
584 yychar = (Token); \
585 yylval = (Value); \
586 yytoken = YYTRANSLATE (yychar); \
587 YYPOPSTACK; \
588 goto yybackup; \
589 } \
590 else \
591 { \
592 yyerror (pParser, "syntax error: cannot back up");\
593 YYERROR; \
594 } \
595 while (0)
596
597 #define YYTERROR 1
598 #define YYERRCODE 256
599
600 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
601 are run). */
602
603 #ifndef YYLLOC_DEFAULT
604 # define YYLLOC_DEFAULT(Current, Rhs, N) \
605 Current.first_line = Rhs[1].first_line; \
606 Current.first_column = Rhs[1].first_column; \
607 Current.last_line = Rhs[N].last_line; \
608 Current.last_column = Rhs[N].last_column;
609 #endif
610
611 /* YYLEX -- calling `yylex' with the right arguments. */
612
613 #ifdef YYLEX_PARAM
614 # define YYLEX yylex (&yylval, YYLEX_PARAM)
615 #else
616 # define YYLEX yylex (&yylval, pParser)
617 #endif
618
619 /* Enable debugging if requested. */
620 #if YYDEBUG
621
622 # ifndef YYFPRINTF
623 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
624 # define YYFPRINTF fprintf
625 # endif
626
627 # define YYDPRINTF(Args) \
628 do { \
629 if (yydebug) \
630 YYFPRINTF Args; \
631 } while (0)
632
633 # define YYDSYMPRINT(Args) \
634 do { \
635 if (yydebug) \
636 yysymprint Args; \
637 } while (0)
638
639 # define YYDSYMPRINTF(Title, Token, Value, Location) \
640 do { \
641 if (yydebug) \
642 { \
643 YYFPRINTF (stderr, "%s ", Title); \
644 yysymprint (stderr, \
645 Token, Value); \
646 YYFPRINTF (stderr, "\n"); \
647 } \
648 } while (0)
649
650 /*------------------------------------------------------------------.
651 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
652 | TOP (cinluded). |
653 `------------------------------------------------------------------*/
654
655 #if defined (__STDC__) || defined (__cplusplus)
656 static void
yy_stack_print(short * bottom,short * top)657 yy_stack_print (short *bottom, short *top)
658 #else
659 static void
660 yy_stack_print (bottom, top)
661 short *bottom;
662 short *top;
663 #endif
664 {
665 YYFPRINTF (stderr, "Stack now");
666 for (/* Nothing. */; bottom <= top; ++bottom)
667 YYFPRINTF (stderr, " %d", *bottom);
668 YYFPRINTF (stderr, "\n");
669 }
670
671 # define YY_STACK_PRINT(Bottom, Top) \
672 do { \
673 if (yydebug) \
674 yy_stack_print ((Bottom), (Top)); \
675 } while (0)
676
677
678 /*------------------------------------------------.
679 | Report that the YYRULE is going to be reduced. |
680 `------------------------------------------------*/
681
682 #if defined (__STDC__) || defined (__cplusplus)
683 static void
yy_reduce_print(int yyrule)684 yy_reduce_print (int yyrule)
685 #else
686 static void
687 yy_reduce_print (yyrule)
688 int yyrule;
689 #endif
690 {
691 int yyi;
692 unsigned int yylineno = yyrline[yyrule];
693 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
694 yyrule - 1, yylineno);
695 /* Print the symbols being reduced, and their result. */
696 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
697 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
698 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
699 }
700
701 # define YY_REDUCE_PRINT(Rule) \
702 do { \
703 if (yydebug) \
704 yy_reduce_print (Rule); \
705 } while (0)
706
707 /* Nonzero means print parse trace. It is left uninitialized so that
708 multiple parsers can coexist. */
709 int yydebug;
710 #else /* !YYDEBUG */
711 # define YYDPRINTF(Args)
712 # define YYDSYMPRINT(Args)
713 # define YYDSYMPRINTF(Title, Token, Value, Location)
714 # define YY_STACK_PRINT(Bottom, Top)
715 # define YY_REDUCE_PRINT(Rule)
716 #endif /* !YYDEBUG */
717
718
719 /* YYINITDEPTH -- initial size of the parser's stacks. */
720 #ifndef YYINITDEPTH
721 # define YYINITDEPTH 200
722 #endif
723
724 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
725 if the built-in stack extension method is used).
726
727 Do not make this value too large; the results are undefined if
728 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
729 evaluated with infinite-precision integer arithmetic. */
730
731 #if YYMAXDEPTH == 0
732 # undef YYMAXDEPTH
733 #endif
734
735 #ifndef YYMAXDEPTH
736 # define YYMAXDEPTH 10000
737 #endif
738
739
740
741 #if YYERROR_VERBOSE
742
743 # ifndef yystrlen
744 # if defined (__GLIBC__) && defined (_STRING_H)
745 # define yystrlen strlen
746 # else
747 /* Return the length of YYSTR. */
748 static YYSIZE_T
749 # if defined (__STDC__) || defined (__cplusplus)
yystrlen(const char * yystr)750 yystrlen (const char *yystr)
751 # else
752 yystrlen (yystr)
753 const char *yystr;
754 # endif
755 {
756 register const char *yys = yystr;
757
758 while (*yys++ != '\0')
759 continue;
760
761 return yys - yystr - 1;
762 }
763 # endif
764 # endif
765
766 # ifndef yystpcpy
767 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
768 # define yystpcpy stpcpy
769 # else
770 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
771 YYDEST. */
772 static char *
773 # if defined (__STDC__) || defined (__cplusplus)
yystpcpy(char * yydest,const char * yysrc)774 yystpcpy (char *yydest, const char *yysrc)
775 # else
776 yystpcpy (yydest, yysrc)
777 char *yydest;
778 const char *yysrc;
779 # endif
780 {
781 register char *yyd = yydest;
782 register const char *yys = yysrc;
783
784 while ((*yyd++ = *yys++) != '\0')
785 continue;
786
787 return yyd - 1;
788 }
789 # endif
790 # endif
791
792 #endif /* !YYERROR_VERBOSE */
793
794
795
796 #if YYDEBUG
797 /*--------------------------------.
798 | Print this symbol on YYOUTPUT. |
799 `--------------------------------*/
800
801 #if defined (__STDC__) || defined (__cplusplus)
802 static void
yysymprint(FILE * yyoutput,int yytype,YYSTYPE * yyvaluep)803 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
804 #else
805 static void
806 yysymprint (yyoutput, yytype, yyvaluep)
807 FILE *yyoutput;
808 int yytype;
809 YYSTYPE *yyvaluep;
810 #endif
811 {
812 /* Pacify ``unused variable'' warnings. */
813 (void) yyvaluep;
814
815 if (yytype < YYNTOKENS)
816 {
817 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
818 # ifdef YYPRINT
819 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
820 # endif
821 }
822 else
823 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
824
825 switch (yytype)
826 {
827 default:
828 break;
829 }
830 YYFPRINTF (yyoutput, ")");
831 }
832
833 #endif /* ! YYDEBUG */
834 /*-----------------------------------------------.
835 | Release the memory associated to this symbol. |
836 `-----------------------------------------------*/
837
838 #if defined (__STDC__) || defined (__cplusplus)
839 static void
yydestruct(int yytype,YYSTYPE * yyvaluep)840 yydestruct (int yytype, YYSTYPE *yyvaluep)
841 #else
842 static void
843 yydestruct (yytype, yyvaluep)
844 int yytype;
845 YYSTYPE *yyvaluep;
846 #endif
847 {
848 /* Pacify ``unused variable'' warnings. */
849 (void) yyvaluep;
850
851 switch (yytype)
852 {
853
854 default:
855 break;
856 }
857 }
858
859
860 /* Prevent warnings from -Wmissing-prototypes. */
861
862 #ifdef YYPARSE_PARAM
863 # if defined (__STDC__) || defined (__cplusplus)
864 int yyparse (void *YYPARSE_PARAM);
865 # else
866 int yyparse ();
867 # endif
868 #else /* ! YYPARSE_PARAM */
869 #if defined (__STDC__) || defined (__cplusplus)
870 int yyparse ( SelectParser_t * pParser );
871 #else
872 int yyparse ();
873 #endif
874 #endif /* ! YYPARSE_PARAM */
875
876
877
878
879
880
881 /*----------.
882 | yyparse. |
883 `----------*/
884
885 #ifdef YYPARSE_PARAM
886 # if defined (__STDC__) || defined (__cplusplus)
yyparse(void * YYPARSE_PARAM)887 int yyparse (void *YYPARSE_PARAM)
888 # else
889 int yyparse (YYPARSE_PARAM)
890 void *YYPARSE_PARAM;
891 # endif
892 #else /* ! YYPARSE_PARAM */
893 #if defined (__STDC__) || defined (__cplusplus)
894 int
895 yyparse ( SelectParser_t * pParser )
896 #else
897 int
898 yyparse (pParser)
899 SelectParser_t * pParser ;
900 #endif
901 #endif
902 {
903 /* The lookahead symbol. */
904 int yychar;
905
906 /* The semantic value of the lookahead symbol. */
907 YYSTYPE yylval;
908
909 /* Number of syntax errors so far. */
910 int yynerrs;
911
912 register int yystate;
913 register int yyn;
914 int yyresult;
915 /* Number of tokens to shift before error messages enabled. */
916 int yyerrstatus;
917 /* Lookahead token as an internal (translated) token number. */
918 int yytoken = 0;
919
920 /* Three stacks and their tools:
921 `yyss': related to states,
922 `yyvs': related to semantic values,
923 `yyls': related to locations.
924
925 Refer to the stacks thru separate pointers, to allow yyoverflow
926 to reallocate them elsewhere. */
927
928 /* The state stack. */
929 short yyssa[YYINITDEPTH];
930 short *yyss = yyssa;
931 register short *yyssp;
932
933 /* The semantic value stack. */
934 YYSTYPE yyvsa[YYINITDEPTH];
935 YYSTYPE *yyvs = yyvsa;
936 register YYSTYPE *yyvsp;
937
938
939
940 #define YYPOPSTACK (yyvsp--, yyssp--)
941
942 YYSIZE_T yystacksize = YYINITDEPTH;
943
944 /* The variables used to return semantic value and location from the
945 action routines. */
946 YYSTYPE yyval;
947
948
949 /* When reducing, the number of symbols on the RHS of the reduced
950 rule. */
951 int yylen;
952
953 YYDPRINTF ((stderr, "Starting parse\n"));
954
955 yystate = 0;
956 yyerrstatus = 0;
957 yynerrs = 0;
958 yychar = YYEMPTY; /* Cause a token to be read. */
959
960 /* Initialize stack pointers.
961 Waste one element of value and location stack
962 so that they stay on the same level as the state stack.
963 The wasted elements are never initialized. */
964
965 yyssp = yyss;
966 yyvsp = yyvs;
967
968 goto yysetstate;
969
970 /*------------------------------------------------------------.
971 | yynewstate -- Push a new state, which is found in yystate. |
972 `------------------------------------------------------------*/
973 yynewstate:
974 /* In all cases, when you get here, the value and location stacks
975 have just been pushed. so pushing a state here evens the stacks.
976 */
977 yyssp++;
978
979 yysetstate:
980 *yyssp = yystate;
981
982 if (yyss + yystacksize - 1 <= yyssp)
983 {
984 /* Get the current used size of the three stacks, in elements. */
985 YYSIZE_T yysize = yyssp - yyss + 1;
986
987 #ifdef yyoverflow
988 {
989 /* Give user a chance to reallocate the stack. Use copies of
990 these so that the &'s don't force the real ones into
991 memory. */
992 YYSTYPE *yyvs1 = yyvs;
993 short *yyss1 = yyss;
994
995
996 /* Each stack pointer address is followed by the size of the
997 data in use in that stack, in bytes. This used to be a
998 conditional around just the two extra args, but that might
999 be undefined if yyoverflow is a macro. */
1000 yyoverflow ("parser stack overflow",
1001 &yyss1, yysize * sizeof (*yyssp),
1002 &yyvs1, yysize * sizeof (*yyvsp),
1003
1004 &yystacksize);
1005
1006 yyss = yyss1;
1007 yyvs = yyvs1;
1008 }
1009 #else /* no yyoverflow */
1010 # ifndef YYSTACK_RELOCATE
1011 goto yyoverflowlab;
1012 # else
1013 /* Extend the stack our own way. */
1014 if (YYMAXDEPTH <= yystacksize)
1015 goto yyoverflowlab;
1016 yystacksize *= 2;
1017 if (YYMAXDEPTH < yystacksize)
1018 yystacksize = YYMAXDEPTH;
1019
1020 {
1021 short *yyss1 = yyss;
1022 union yyalloc *yyptr =
1023 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1024 if (! yyptr)
1025 goto yyoverflowlab;
1026 YYSTACK_RELOCATE (yyss);
1027 YYSTACK_RELOCATE (yyvs);
1028
1029 # undef YYSTACK_RELOCATE
1030 if (yyss1 != yyssa)
1031 YYSTACK_FREE (yyss1);
1032 }
1033 # endif
1034 #endif /* no yyoverflow */
1035
1036 yyssp = yyss + yysize - 1;
1037 yyvsp = yyvs + yysize - 1;
1038
1039
1040 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1041 (unsigned long int) yystacksize));
1042
1043 if (yyss + yystacksize - 1 <= yyssp)
1044 YYABORT;
1045 }
1046
1047 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1048
1049 goto yybackup;
1050
1051 /*-----------.
1052 | yybackup. |
1053 `-----------*/
1054 yybackup:
1055
1056 /* Do appropriate processing given the current state. */
1057 /* Read a lookahead token if we need one and don't already have one. */
1058 /* yyresume: */
1059
1060 /* First try to decide what to do without reference to lookahead token. */
1061
1062 yyn = yypact[yystate];
1063 if (yyn == YYPACT_NINF)
1064 goto yydefault;
1065
1066 /* Not known => get a lookahead token if don't already have one. */
1067
1068 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1069 if (yychar == YYEMPTY)
1070 {
1071 YYDPRINTF ((stderr, "Reading a token: "));
1072 yychar = YYLEX;
1073 }
1074
1075 if (yychar <= YYEOF)
1076 {
1077 yychar = yytoken = YYEOF;
1078 YYDPRINTF ((stderr, "Now at end of input.\n"));
1079 }
1080 else
1081 {
1082 yytoken = YYTRANSLATE (yychar);
1083 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1084 }
1085
1086 /* If the proper action on seeing token YYTOKEN is to reduce or to
1087 detect an error, take that action. */
1088 yyn += yytoken;
1089 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1090 goto yydefault;
1091 yyn = yytable[yyn];
1092 if (yyn <= 0)
1093 {
1094 if (yyn == 0 || yyn == YYTABLE_NINF)
1095 goto yyerrlab;
1096 yyn = -yyn;
1097 goto yyreduce;
1098 }
1099
1100 if (yyn == YYFINAL)
1101 YYACCEPT;
1102
1103 /* Shift the lookahead token. */
1104 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1105
1106 /* Discard the token being shifted unless it is eof. */
1107 if (yychar != YYEOF)
1108 yychar = YYEMPTY;
1109
1110 *++yyvsp = yylval;
1111
1112
1113 /* Count tokens shifted since error; after three, turn off error
1114 status. */
1115 if (yyerrstatus)
1116 yyerrstatus--;
1117
1118 yystate = yyn;
1119 goto yynewstate;
1120
1121
1122 /*-----------------------------------------------------------.
1123 | yydefault -- do the default action for the current state. |
1124 `-----------------------------------------------------------*/
1125 yydefault:
1126 yyn = yydefact[yystate];
1127 if (yyn == 0)
1128 goto yyerrlab;
1129 goto yyreduce;
1130
1131
1132 /*-----------------------------.
1133 | yyreduce -- Do a reduction. |
1134 `-----------------------------*/
1135 yyreduce:
1136 /* yyn is the number of a rule to reduce with. */
1137 yylen = yyr2[yyn];
1138
1139 /* If YYLEN is nonzero, implement the default value of the action:
1140 `$$ = $1'.
1141
1142 Otherwise, the following line sets YYVAL to garbage.
1143 This behavior is undocumented and Bison
1144 users should not rely upon it. Assigning to YYVAL
1145 unconditionally makes the parser a bit smaller, and it avoids a
1146 GCC warning that YYVAL may be used uninitialized. */
1147 yyval = yyvsp[1-yylen];
1148
1149
1150 YY_REDUCE_PRINT (yyn);
1151 switch (yyn)
1152 {
1153 case 4:
1154
1155 { pParser->AddItem ( &yyvsp[0] ); ;}
1156 break;
1157
1158 case 7:
1159
1160 { pParser->AliasLastItem ( &yyvsp[0] ); ;}
1161 break;
1162
1163 case 8:
1164
1165 { pParser->AliasLastItem ( &yyvsp[0] ); ;}
1166 break;
1167
1168 case 9:
1169
1170 { pParser->AddItem ( &yyvsp[0] ); ;}
1171 break;
1172
1173 case 10:
1174
1175 { pParser->AddItem ( &yyvsp[-1], SPH_AGGR_AVG, &yyvsp[-3], &yyvsp[0] ); ;}
1176 break;
1177
1178 case 11:
1179
1180 { pParser->AddItem ( &yyvsp[-1], SPH_AGGR_MAX, &yyvsp[-3], &yyvsp[0] ); ;}
1181 break;
1182
1183 case 12:
1184
1185 { pParser->AddItem ( &yyvsp[-1], SPH_AGGR_MIN, &yyvsp[-3], &yyvsp[0] ); ;}
1186 break;
1187
1188 case 13:
1189
1190 { pParser->AddItem ( &yyvsp[-1], SPH_AGGR_SUM, &yyvsp[-3], &yyvsp[0] ); ;}
1191 break;
1192
1193 case 14:
1194
1195 { pParser->AddItem ( "count(*)", &yyvsp[-3], &yyvsp[0] ); ;}
1196 break;
1197
1198 case 15:
1199
1200 { pParser->AddItem ( "weight()", &yyvsp[-2], &yyvsp[0] ); ;}
1201 break;
1202
1203 case 16:
1204
1205 { pParser->AddItem ( "@distinct", &yyvsp[-4], &yyvsp[0] ); ;}
1206 break;
1207
1208 case 18:
1209
1210 { yyval = yyvsp[-1]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1211 break;
1212
1213 case 19:
1214
1215 { yyval = yyvsp[-1]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1216 break;
1217
1218 case 20:
1219
1220 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1221 break;
1222
1223 case 21:
1224
1225 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1226 break;
1227
1228 case 22:
1229
1230 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1231 break;
1232
1233 case 23:
1234
1235 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1236 break;
1237
1238 case 24:
1239
1240 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1241 break;
1242
1243 case 25:
1244
1245 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1246 break;
1247
1248 case 26:
1249
1250 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1251 break;
1252
1253 case 27:
1254
1255 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1256 break;
1257
1258 case 28:
1259
1260 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1261 break;
1262
1263 case 29:
1264
1265 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1266 break;
1267
1268 case 30:
1269
1270 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1271 break;
1272
1273 case 31:
1274
1275 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1276 break;
1277
1278 case 32:
1279
1280 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1281 break;
1282
1283 case 33:
1284
1285 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1286 break;
1287
1288 case 34:
1289
1290 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1291 break;
1292
1293 case 35:
1294
1295 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1296 break;
1297
1298 case 36:
1299
1300 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1301 break;
1302
1303 case 37:
1304
1305 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1306 break;
1307
1308 case 41:
1309
1310 { yyval = yyvsp[-3]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1311 break;
1312
1313 case 42:
1314
1315 { yyval = yyvsp[-2]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1316 break;
1317
1318 case 43:
1319
1320 { yyval = yyvsp[-5]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1321 break;
1322
1323 case 44:
1324
1325 { yyval = yyvsp[-5]; yyval.m_iEnd = yyvsp[0].m_iEnd; ;}
1326 break;
1327
1328
1329 }
1330
1331 /* Line 991 of yacc.c. */
1332
1333
1334 yyvsp -= yylen;
1335 yyssp -= yylen;
1336
1337
1338 YY_STACK_PRINT (yyss, yyssp);
1339
1340 *++yyvsp = yyval;
1341
1342
1343 /* Now `shift' the result of the reduction. Determine what state
1344 that goes to, based on the state we popped back to and the rule
1345 number reduced by. */
1346
1347 yyn = yyr1[yyn];
1348
1349 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1350 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1351 yystate = yytable[yystate];
1352 else
1353 yystate = yydefgoto[yyn - YYNTOKENS];
1354
1355 goto yynewstate;
1356
1357
1358 /*------------------------------------.
1359 | yyerrlab -- here on detecting error |
1360 `------------------------------------*/
1361 yyerrlab:
1362 /* If not already recovering from an error, report this error. */
1363 if (!yyerrstatus)
1364 {
1365 ++yynerrs;
1366 #if YYERROR_VERBOSE
1367 yyn = yypact[yystate];
1368
1369 if (YYPACT_NINF < yyn && yyn < YYLAST)
1370 {
1371 YYSIZE_T yysize = 0;
1372 int yytype = YYTRANSLATE (yychar);
1373 char *yymsg;
1374 int yyx, yycount;
1375
1376 yycount = 0;
1377 /* Start YYX at -YYN if negative to avoid negative indexes in
1378 YYCHECK. */
1379 for (yyx = yyn < 0 ? -yyn : 0;
1380 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1381 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1382 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1383 yysize += yystrlen ("syntax error, unexpected ") + 1;
1384 yysize += yystrlen (yytname[yytype]);
1385 yymsg = (char *) YYSTACK_ALLOC (yysize);
1386 if (yymsg != 0)
1387 {
1388 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1389 yyp = yystpcpy (yyp, yytname[yytype]);
1390
1391 if (yycount < 5)
1392 {
1393 yycount = 0;
1394 for (yyx = yyn < 0 ? -yyn : 0;
1395 yyx < (int) (sizeof (yytname) / sizeof (char *));
1396 yyx++)
1397 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1398 {
1399 const char *yyq = ! yycount ? ", expecting " : " or ";
1400 yyp = yystpcpy (yyp, yyq);
1401 yyp = yystpcpy (yyp, yytname[yyx]);
1402 yycount++;
1403 }
1404 }
1405 yyerror (pParser, yymsg);
1406 YYSTACK_FREE (yymsg);
1407 }
1408 else
1409 yyerror (pParser, "syntax error; also virtual memory exhausted");
1410 }
1411 else
1412 #endif /* YYERROR_VERBOSE */
1413 yyerror (pParser, "syntax error");
1414 }
1415
1416
1417
1418 if (yyerrstatus == 3)
1419 {
1420 /* If just tried and failed to reuse lookahead token after an
1421 error, discard it. */
1422
1423 /* Return failure if at end of input. */
1424 if (yychar == YYEOF)
1425 {
1426 /* Pop the error token. */
1427 YYPOPSTACK;
1428 /* Pop the rest of the stack. */
1429 while (yyss < yyssp)
1430 {
1431 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1432 yydestruct (yystos[*yyssp], yyvsp);
1433 YYPOPSTACK;
1434 }
1435 YYABORT;
1436 }
1437
1438 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1439 yydestruct (yytoken, &yylval);
1440 yychar = YYEMPTY;
1441
1442 }
1443
1444 /* Else will try to reuse lookahead token after shifting the error
1445 token. */
1446 goto yyerrlab2;
1447
1448
1449 /*----------------------------------------------------.
1450 | yyerrlab1 -- error raised explicitly by an action. |
1451 `----------------------------------------------------*/
1452 //yyerrlab1:
1453
1454 /* Suppress GCC warning that yyerrlab1 is unused when no action
1455 invokes YYERROR. */
1456 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
1457 // __attribute__ ((__unused__))
1458 #endif
1459
1460
1461 goto yyerrlab2;
1462
1463
1464 /*---------------------------------------------------------------.
1465 | yyerrlab2 -- pop states until the error token can be shifted. |
1466 `---------------------------------------------------------------*/
1467 yyerrlab2:
1468 yyerrstatus = 3; /* Each real token shifted decrements this. */
1469
1470 for (;;)
1471 {
1472 yyn = yypact[yystate];
1473 if (yyn != YYPACT_NINF)
1474 {
1475 yyn += YYTERROR;
1476 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1477 {
1478 yyn = yytable[yyn];
1479 if (0 < yyn)
1480 break;
1481 }
1482 }
1483
1484 /* Pop the current state because it cannot handle the error token. */
1485 if (yyssp == yyss)
1486 YYABORT;
1487
1488 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1489 yydestruct (yystos[yystate], yyvsp);
1490 yyvsp--;
1491 yystate = *--yyssp;
1492
1493 YY_STACK_PRINT (yyss, yyssp);
1494 }
1495
1496 if (yyn == YYFINAL)
1497 YYACCEPT;
1498
1499 YYDPRINTF ((stderr, "Shifting error token, "));
1500
1501 *++yyvsp = yylval;
1502
1503
1504 yystate = yyn;
1505 goto yynewstate;
1506
1507
1508 /*-------------------------------------.
1509 | yyacceptlab -- YYACCEPT comes here. |
1510 `-------------------------------------*/
1511 yyacceptlab:
1512 yyresult = 0;
1513 goto yyreturn;
1514
1515 /*-----------------------------------.
1516 | yyabortlab -- YYABORT comes here. |
1517 `-----------------------------------*/
1518 yyabortlab:
1519 yyresult = 1;
1520 goto yyreturn;
1521
1522 #ifndef yyoverflow
1523 /*----------------------------------------------.
1524 | yyoverflowlab -- parser overflow comes here. |
1525 `----------------------------------------------*/
1526 yyoverflowlab:
1527 yyerror (pParser, "parser stack overflow");
1528 yyresult = 2;
1529 /* Fall through. */
1530 #endif
1531
1532 yyreturn:
1533 #ifndef yyoverflow
1534 if (yyss != yyssa)
1535 YYSTACK_FREE (yyss);
1536 #endif
1537 return yyresult;
1538 }
1539
1540
1541
1542
1543
1544 #if USE_WINDOWS
1545 #pragma warning(pop)
1546 #endif
1547
1548