1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.7.12-4996"
50 #define YYSKELETON_NAME "yacc.c"
61 /* "%code top" blocks. */
62 /* Line 349 of yacc.c */
65 /*! \internal \file parser.cpp
66 * \brief Generated (from parser.y by Bison) parser for the selection language.
68 * \ingroup module_selection
70 /*! \internal \file parser.h
71 * \brief Generated (from parser.y by Bison) parser include file.
73 * \ingroup module_selection
78 /* Line 349 of yacc.c */
81 /* Substitute the variable and function names. */
82 #define yypush_parse _gmx_sel_yypush_parse
83 #define yypstate_new _gmx_sel_yypstate_new
84 #define yypstate_delete _gmx_sel_yypstate_delete
85 #define yypstate _gmx_sel_yypstate
86 #define yylex _gmx_sel_yylex
87 #define yyerror _gmx_sel_yyerror
88 #define yylval _gmx_sel_yylval
89 #define yychar _gmx_sel_yychar
90 #define yydebug _gmx_sel_yydebug
91 #define yynerrs _gmx_sel_yynerrs
93 /* Copy the first part of user declarations. */
94 /* Line 371 of yacc.c */
97 #include "gromacs/utility/scoped_ptr_sfree.h"
99 #include "parser_internal.h"
101 using gmx::scoped_ptr_sfree;
102 using gmx::SelectionParserValue;
103 using gmx::SelectionParserValueList;
104 using gmx::SelectionParserValueListPointer;
105 using gmx::SelectionParserParameter;
106 using gmx::SelectionParserParameterList;
107 using gmx::SelectionParserParameterListPointer;
108 using gmx::SelectionTreeElement;
109 using gmx::SelectionTreeElementPointer;
112 #pragma warning(disable: 4065)
115 /* Line 371 of yacc.c */
116 #line 117 "parser.cpp"
119 # if defined __cplusplus && 201103L <= __cplusplus
120 # define YY_NULL nullptr
126 /* Enabling verbose error messages. */
127 #ifdef YYERROR_VERBOSE
128 # undef YYERROR_VERBOSE
129 # define YYERROR_VERBOSE 1
131 # define YYERROR_VERBOSE 0
134 /* In a future release of Bison, this section will be replaced
135 by #include "parser.h". */
136 #ifndef YY__GMX_SEL_YY_PARSER_H_INCLUDED
137 # define YY__GMX_SEL_YY_PARSER_H_INCLUDED
138 /* Enabling traces. */
143 extern int _gmx_sel_yydebug;
145 /* "%code requires" blocks. */
146 /* Line 387 of yacc.c */
150 * This file is part of the GROMACS molecular simulation package.
152 * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
153 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
154 * and including many others, as listed in the AUTHORS file in the
155 * top-level source directory and at http://www.gromacs.org.
157 * GROMACS is free software; you can redistribute it and/or
158 * modify it under the terms of the GNU Lesser General Public License
159 * as published by the Free Software Foundation; either version 2.1
160 * of the License, or (at your option) any later version.
162 * GROMACS is distributed in the hope that it will be useful,
163 * but WITHOUT ANY WARRANTY; without even the implied warranty of
164 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
165 * Lesser General Public License for more details.
167 * You should have received a copy of the GNU Lesser General Public
168 * License along with GROMACS; if not, see
169 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
170 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
172 * If you want to redistribute modifications to GROMACS, please
173 * consider that scientific software is very special. Version
174 * control is crucial - bugs must be traceable. We will be happy to
175 * consider code for inclusion in the official distribution, but
176 * derived work must not be called official GROMACS. Details are found
177 * in the README & COPYING files - if they are missing, get the
178 * official version at http://www.gromacs.org.
180 * To help us fund GROMACS development, we humbly ask that you cite
181 * the research papers on the package. Check out http://www.gromacs.org.
184 /* Line 387 of yacc.c */
187 #include "parsetree.h"
191 /* Line 387 of yacc.c */
192 #line 193 "parser.cpp"
197 /* Put the tokens into the symbol table, so that GDB and other debuggers
208 VARIABLE_NUMERIC = 266,
209 VARIABLE_GROUP = 267,
211 KEYWORD_NUMERIC = 269,
215 METHOD_NUMERIC = 273,
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
236 typedef union YYSTYPE
238 /* Line 387 of yacc.c */
244 struct gmx_ana_selmethod_t *meth;
246 gmx::SelectionStringMatchType smt;
248 gmx::SelectionTreeElementPointer *sel;
249 gmx::SelectionParserValue *val;
250 gmx::SelectionParserValueListPointer *vlist;
251 gmx::SelectionParserParameter *param;
252 gmx::SelectionParserParameterListPointer *plist;
255 /* Line 387 of yacc.c */
256 #line 257 "parser.cpp"
258 # define YYSTYPE_IS_TRIVIAL 1
259 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
260 # define YYSTYPE_IS_DECLARED 1
264 #ifndef YYPUSH_MORE_DEFINED
265 # define YYPUSH_MORE_DEFINED
266 enum { YYPUSH_MORE = 4 };
269 typedef struct _gmx_sel_yypstate _gmx_sel_yypstate;
271 #if defined __STDC__ || defined __cplusplus
272 int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, void *scanner);
274 int _gmx_sel_yypush_parse ();
277 #if defined __STDC__ || defined __cplusplus
278 _gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
280 _gmx_sel_yypstate * _gmx_sel_yypstate_new ();
282 #if defined __STDC__ || defined __cplusplus
283 void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
285 void _gmx_sel_yypstate_delete ();
288 #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */
290 /* Copy the second part of user declarations. */
292 /* Line 390 of yacc.c */
293 #line 294 "parser.cpp"
300 typedef YYTYPE_UINT8 yytype_uint8;
302 typedef unsigned char yytype_uint8;
306 typedef YYTYPE_INT8 yytype_int8;
307 #elif (defined __STDC__ || defined __C99__FUNC__ \
308 || defined __cplusplus || defined _MSC_VER)
309 typedef signed char yytype_int8;
311 typedef short int yytype_int8;
315 typedef YYTYPE_UINT16 yytype_uint16;
317 typedef unsigned short int yytype_uint16;
321 typedef YYTYPE_INT16 yytype_int16;
323 typedef short int yytype_int16;
327 # ifdef __SIZE_TYPE__
328 # define YYSIZE_T __SIZE_TYPE__
329 # elif defined size_t
330 # define YYSIZE_T size_t
331 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
332 || defined __cplusplus || defined _MSC_VER)
333 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
334 # define YYSIZE_T size_t
336 # define YYSIZE_T unsigned int
340 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
343 # if defined YYENABLE_NLS && YYENABLE_NLS
345 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
346 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
350 # define YY_(Msgid) Msgid
354 #ifndef __attribute__
355 /* This feature is available in gcc versions 2.5 and later. */
356 # if (! defined __GNUC__ || __GNUC__ < 2 \
357 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
358 # define __attribute__(Spec) /* empty */
362 /* Suppress unused-variable warnings by "using" E. */
363 #if ! defined lint || defined __GNUC__
364 # define YYUSE(E) ((void) (E))
366 # define YYUSE(E) /* empty */
370 /* Identity function, used to suppress warnings about constant conditions. */
374 #if (defined __STDC__ || defined __C99__FUNC__ \
375 || defined __cplusplus || defined _MSC_VER)
388 #if ! defined yyoverflow || YYERROR_VERBOSE
390 /* The parser invokes alloca or malloc; define the necessary symbols. */
392 # ifdef YYSTACK_ALLOC
393 /* Pacify GCC's `empty if-body' warning. */
394 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
395 # ifndef YYSTACK_ALLOC_MAXIMUM
396 /* The OS might guarantee only one guard page at the bottom of the stack,
397 and a page size can be as small as 4096 bytes. So we cannot safely
398 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
399 to allow for a few compiler-allocated temporary stack slots. */
400 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
403 # define YYSTACK_ALLOC YYMALLOC
404 # define YYSTACK_FREE YYFREE
405 # ifndef YYSTACK_ALLOC_MAXIMUM
406 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
408 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
409 && ! ((defined YYMALLOC || defined malloc) \
410 && (defined YYFREE || defined free)))
411 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
412 # ifndef EXIT_SUCCESS
413 # define EXIT_SUCCESS 0
417 # define YYMALLOC malloc
418 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
419 || defined __cplusplus || defined _MSC_VER)
420 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
425 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
426 || defined __cplusplus || defined _MSC_VER)
427 void free (void *); /* INFRINGES ON USER NAME SPACE */
431 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
434 #if (! defined yyoverflow \
435 && (! defined __cplusplus \
436 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
438 /* A type that is properly aligned for any stack member. */
441 yytype_int16 yyss_alloc;
445 /* The size of the maximum gap between one aligned stack and the next. */
446 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
448 /* The size of an array large to enough to hold all stacks, each with
450 # define YYSTACK_BYTES(N) \
451 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
452 + YYSTACK_GAP_MAXIMUM)
454 # define YYCOPY_NEEDED 1
456 /* Relocate STACK from its old location to the new one. The
457 local variables YYSIZE and YYSTACKSIZE give the old and new number of
458 elements in the stack, and YYPTR gives the new location of the
459 stack. Advance YYPTR to a properly aligned location for the next
461 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
464 YYSIZE_T yynewbytes; \
465 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
466 Stack = &yyptr->Stack_alloc; \
467 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
468 yyptr += yynewbytes / sizeof (*yyptr); \
474 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
475 /* Copy COUNT objects from SRC to DST. The source and destination do
478 # if defined __GNUC__ && 1 < __GNUC__
479 # define YYCOPY(Dst, Src, Count) \
480 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
482 # define YYCOPY(Dst, Src, Count) \
486 for (yyi = 0; yyi < (Count); yyi++) \
487 (Dst)[yyi] = (Src)[yyi]; \
492 #endif /* !YYCOPY_NEEDED */
494 /* YYFINAL -- State number of the termination state. */
496 /* YYLAST -- Last index in YYTABLE. */
499 /* YYNTOKENS -- Number of terminals. */
501 /* YYNNTS -- Number of nonterminals. */
503 /* YYNRULES -- Number of rules. */
505 /* YYNRULES -- Number of states. */
506 #define YYNSTATES 149
508 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
510 #define YYMAXUTOK 288
512 #define YYTRANSLATE(YYX) \
513 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
515 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
516 static const yytype_uint8 yytranslate[] =
518 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 40, 41, 34, 32, 45, 33, 2, 35, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 39, 2, 43, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 44, 2, 46, 37, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 47, 2, 48, 42, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
544 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
545 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
546 25, 26, 27, 28, 29, 30, 31, 36, 38
550 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
552 static const yytype_uint8 yyprhs[] =
554 0, 0, 3, 4, 7, 10, 13, 14, 16, 18,
555 20, 23, 27, 31, 35, 37, 39, 43, 47, 49,
556 52, 54, 57, 59, 61, 63, 65, 68, 72, 76,
557 80, 84, 87, 90, 92, 94, 96, 98, 100, 103,
558 107, 112, 116, 120, 122, 124, 127, 131, 135, 139,
559 143, 147, 150, 154, 158, 160, 163, 171, 175, 178,
560 182, 184, 186, 188, 190, 193, 194, 197, 200, 202,
561 206, 207, 210, 214, 216, 220, 222, 225, 229, 231,
562 233, 235, 237, 239, 241, 243, 245, 247, 251, 255
565 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
566 static const yytype_int8 yyrhs[] =
568 50, 0, -1, -1, 50, 51, -1, 52, 8, -1,
569 1, 8, -1, -1, 4, -1, 57, -1, 53, -1,
570 57, 53, -1, 7, 39, 58, -1, 7, 39, 61,
571 -1, 7, 39, 63, -1, 63, -1, 58, -1, 40,
572 53, 41, -1, 53, 21, 64, -1, 4, -1, 33,
573 4, -1, 5, -1, 33, 5, -1, 54, -1, 55,
574 -1, 6, -1, 7, -1, 31, 58, -1, 58, 30,
575 58, -1, 58, 29, 58, -1, 40, 58, 41, -1,
576 61, 26, 61, -1, 9, 57, -1, 9, 4, -1,
577 22, -1, 16, -1, 42, -1, 43, -1, 39, -1,
578 59, 17, -1, 59, 15, 69, -1, 59, 15, 60,
579 69, -1, 59, 14, 69, -1, 59, 19, 64, -1,
580 4, -1, 5, -1, 59, 14, -1, 59, 18, 64,
581 -1, 61, 32, 61, -1, 61, 33, 61, -1, 61,
582 34, 61, -1, 61, 35, 61, -1, 33, 61, -1,
583 61, 37, 61, -1, 40, 61, 41, -1, 57, -1,
584 59, 15, -1, 44, 56, 45, 56, 45, 56, 46,
585 -1, 40, 63, 41, -1, 20, 64, -1, 16, 25,
586 58, -1, 12, -1, 11, -1, 13, -1, 65, -1,
587 65, 24, -1, -1, 65, 66, -1, 23, 67, -1,
588 68, -1, 47, 68, 48, -1, -1, 68, 71, -1,
589 68, 45, 71, -1, 70, -1, 47, 70, 48, -1,
590 72, -1, 70, 72, -1, 70, 45, 72, -1, 58,
591 -1, 63, -1, 61, -1, 62, -1, 73, -1, 54,
592 -1, 55, -1, 57, -1, 73, -1, 54, 10, 54,
593 -1, 54, 10, 55, -1, 55, 10, 56, -1
596 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
597 static const yytype_uint16 yyrline[] =
599 0, 196, 196, 201, 212, 213, 235, 240, 251, 263,
600 269, 276, 283, 290, 300, 301, 308, 309, 323, 324,
601 328, 329, 332, 333, 336, 337, 345, 356, 367, 378,
602 382, 393, 400, 409, 410, 415, 416, 417, 421, 429,
603 437, 445, 456, 471, 482, 496, 504, 515, 521, 527,
604 533, 539, 545, 551, 558, 569, 584, 593, 597, 607,
605 621, 629, 637, 650, 652, 658, 663, 674, 683, 684,
606 689, 694, 702, 713, 714, 718, 724, 732, 742, 748,
607 754, 760, 766, 770, 776, 782, 789, 793, 799, 805
611 #if YYDEBUG || YYERROR_VERBOSE || 0
612 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
613 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
614 static const char *const yytname[] =
616 "$end", "error", "$undefined", "INVALID", "TOK_INT", "TOK_REAL", "STR",
617 "IDENTIFIER", "CMD_SEP", "GROUP", "TO", "VARIABLE_NUMERIC",
618 "VARIABLE_GROUP", "VARIABLE_POS", "KEYWORD_NUMERIC", "KEYWORD_STR",
619 "KEYWORD_POS", "KEYWORD_GROUP", "METHOD_NUMERIC", "METHOD_GROUP",
620 "METHOD_POS", "MODIFIER", "EMPTY_POSMOD", "PARAM", "END_OF_METHOD", "OF",
621 "CMP_OP", "PARAM_REDUCT", "XOR", "OR", "AND", "NOT", "'+'", "'-'", "'*'",
622 "'/'", "UNARY_NEG", "'^'", "NUM_REDUCT", "'='", "'('", "')'", "'~'",
623 "'?'", "'['", "','", "']'", "'{'", "'}'", "$accept", "commands",
624 "command", "cmd_plain", "selection", "integer_number", "real_number",
625 "number", "string", "sel_expr", "pos_mod", "str_match_type", "num_expr",
626 "str_expr", "pos_expr", "method_params", "method_param_list",
627 "method_param", "value_list", "value_list_contents", "basic_value_list",
628 "basic_value_list_contents", "value_item", "basic_value_item",
629 "value_item_range", YY_NULL
634 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
636 static const yytype_uint16 yytoknum[] =
638 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
639 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
640 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
641 285, 286, 43, 45, 42, 47, 287, 94, 288, 61,
642 40, 41, 126, 63, 91, 44, 93, 123, 125
646 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
647 static const yytype_uint8 yyr1[] =
649 0, 49, 50, 50, 51, 51, 52, 52, 52, 52,
650 52, 52, 52, 52, 53, 53, 53, 53, 54, 54,
651 55, 55, 56, 56, 57, 57, 58, 58, 58, 58,
652 58, 58, 58, 59, 59, 60, 60, 60, 58, 58,
653 58, 58, 58, 61, 61, 61, 61, 61, 61, 61,
654 61, 61, 61, 61, 62, 62, 63, 63, 63, 63,
655 58, 61, 63, 64, 64, 65, 65, 66, 67, 67,
656 68, 68, 68, 69, 69, 70, 70, 70, 71, 71,
657 71, 71, 71, 72, 72, 72, 72, 73, 73, 73
660 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
661 static const yytype_uint8 yyr2[] =
663 0, 2, 0, 2, 2, 2, 0, 1, 1, 1,
664 2, 3, 3, 3, 1, 1, 3, 3, 1, 2,
665 1, 2, 1, 1, 1, 1, 2, 3, 3, 3,
666 3, 2, 2, 1, 1, 1, 1, 1, 2, 3,
667 4, 3, 3, 1, 1, 2, 3, 3, 3, 3,
668 3, 2, 3, 3, 1, 2, 7, 3, 2, 3,
669 1, 1, 1, 1, 2, 0, 2, 2, 1, 3,
670 0, 2, 3, 1, 3, 1, 2, 3, 1, 1,
671 1, 1, 1, 1, 1, 1, 1, 3, 3, 3
674 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
675 Performed when YYTABLE doesn't specify something else to do. Zero
676 means the default is an error. */
677 static const yytype_uint8 yydefact[] =
679 2, 0, 1, 0, 43, 44, 24, 25, 0, 61,
680 60, 62, 34, 65, 33, 0, 0, 0, 0, 3,
681 0, 9, 8, 15, 0, 0, 14, 5, 0, 32,
682 25, 31, 0, 58, 63, 43, 34, 0, 26, 0,
683 0, 51, 0, 15, 0, 14, 18, 20, 0, 22,
684 23, 0, 4, 65, 10, 0, 0, 45, 0, 38,
685 65, 65, 0, 0, 0, 0, 0, 0, 0, 11,
686 12, 13, 59, 70, 64, 66, 0, 0, 45, 16,
687 29, 53, 57, 19, 21, 0, 17, 28, 27, 0,
688 83, 84, 85, 41, 73, 75, 86, 37, 35, 36,
689 0, 39, 46, 42, 30, 47, 48, 49, 50, 52,
690 0, 70, 67, 68, 0, 0, 0, 0, 0, 76,
691 40, 0, 43, 44, 0, 0, 0, 0, 54, 78,
692 0, 80, 81, 79, 71, 82, 0, 74, 87, 88,
693 89, 77, 69, 43, 44, 72, 55, 0, 56
696 /* YYDEFGOTO[NTERM-NUM]. */
697 static const yytype_int16 yydefgoto[] =
699 -1, 1, 19, 20, 21, 90, 91, 51, 92, 129,
700 24, 100, 25, 132, 133, 33, 34, 75, 112, 113,
704 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
706 #define YYPACT_NINF -84
707 static const yytype_int16 yypact[] =
709 -84, 148, -84, 4, 6, -84, -84, -20, 189, -84,
710 -84, -84, 1, -84, -84, 322, 216, 285, 0, -84,
711 27, 16, 285, 22, 122, 173, -84, -84, 308, -84,
712 -84, -84, 322, -84, 71, -84, -84, 322, -84, 216,
713 49, 24, -11, -13, 232, 23, -84, -84, 140, -84,
714 -84, 21, -84, -84, 16, 322, 322, 40, 197, -84,
715 -84, -84, 216, 216, 216, 216, 216, 216, 308, 22,
716 173, -84, 22, 30, -84, -84, -13, 47, -84, -84,
717 -84, -84, -84, -84, -84, 0, -84, 56, -84, 85,
718 93, 99, -84, -84, 210, -84, -84, -84, -84, -84,
719 36, -84, -84, -84, 139, 94, 94, 24, 24, 24,
720 23, -84, -84, 241, 78, 17, 0, 0, 85, -84,
721 -84, 178, 116, 125, 338, 271, 93, 99, -84, 22,
722 349, 139, -84, -84, -84, -84, 0, -84, -84, -84,
723 -84, -84, -84, 133, 136, -84, 197, 104, -84
726 /* YYPGOTO[NTERM-NUM]. */
727 static const yytype_int8 yypgoto[] =
729 -84, -84, -84, -84, -4, -17, -15, -83, -1, 110,
730 9, -84, -8, -84, 10, 54, -84, -84, -84, 51,
731 -51, 62, 33, -79, -28
734 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
735 positive, shift that token. If negative, reduce the rule which
736 number is the opposite. If YYTABLE_NINF, syntax error. */
737 #define YYTABLE_NINF -22
738 static const yytype_int16 yytable[] =
740 22, 49, 114, 50, 46, 47, 93, 31, 41, 44,
741 53, 26, 27, 42, -7, 119, 55, 56, 54, 28,
742 70, 46, 47, 6, 30, 40, 32, 45, 80, 44,
743 79, 77, 26, 48, 140, 52, 119, 53, 71, 141,
744 46, 47, 6, 30, 46, 47, 6, 30, 40, 120,
745 48, 55, 56, 147, 104, 105, 106, 107, 108, 109,
746 44, 67, 118, 78, 82, 137, 85, 60, 49, 48,
747 50, 40, 40, 40, 40, 40, 40, 111, 110, 63,
748 64, 65, 66, 89, 67, 135, 56, 89, 81, 46,
749 47, 6, 30, 135, 73, 74, 126, 135, 127, 138,
750 49, 139, 50, 116, 126, 131, 127, 86, 126, 117,
751 127, 23, 128, 131, 102, 103, 41, 131, 48, 49,
752 128, 50, 130, 136, 128, 38, -18, 43, 65, 66,
753 130, 67, 23, 40, 130, -20, 57, 58, 69, 59,
754 60, 61, 72, -19, 83, 84, -21, 76, 2, 3,
755 148, 115, 4, 5, 6, 7, -6, 8, 145, 9,
756 10, 11, 121, 0, 12, 87, 88, 0, 13, 0,
757 14, 63, 64, 65, 66, 0, 67, 0, 76, 15,
758 0, 16, 122, 123, 6, 30, 0, 8, 17, 9,
759 10, 11, 18, 29, 12, 6, 30, 0, 13, 62,
760 14, 46, 47, 6, 30, 63, 64, 65, 66, 15,
761 67, 124, 0, 0, 46, 47, 6, 30, 68, 0,
762 35, 5, 18, 125, 0, 0, 142, 9, 0, 0,
763 48, 0, 36, 0, 0, 0, 97, 0, 14, 98,
764 99, 0, 0, 48, 89, 122, 123, 6, 30, 16,
765 8, 0, 9, 10, 11, 118, 39, 12, 62, 0,
766 0, 13, 0, 14, 63, 64, 65, 66, 0, 67,
767 0, 0, 15, 81, 124, 122, 123, 6, 30, 0,
768 8, 68, 9, 10, 11, 18, 125, 12, 0, 35,
769 5, 13, 0, 14, 8, 0, 9, 10, 11, 0,
770 0, 12, 15, 0, 124, 13, 0, 14, 0, 0,
771 0, 68, 35, 5, 0, 18, 15, 8, 16, 9,
772 10, 11, 0, 0, 12, 17, 35, 5, 13, 18,
773 14, 8, 0, 9, 10, 0, 0, 0, 36, 15,
774 0, 16, 143, 144, 14, 0, 0, 0, 68, 9,
775 0, 0, 18, 15, 36, 16, 0, 0, 0, 0,
776 14, 0, 37, 57, 146, 0, 59, 60, 61, 0,
777 0, 16, 0, 0, 0, 0, 0, 0, 39
780 #define yypact_value_is_default(Yystate) \
781 (!!((Yystate) == (-84)))
783 #define yytable_value_is_error(Yytable_value) \
786 static const yytype_int16 yycheck[] =
788 1, 18, 85, 18, 4, 5, 57, 8, 16, 17,
789 21, 1, 8, 17, 8, 94, 29, 30, 22, 39,
790 28, 4, 5, 6, 7, 16, 25, 17, 41, 37,
791 41, 39, 22, 33, 117, 8, 115, 21, 28, 118,
792 4, 5, 6, 7, 4, 5, 6, 7, 39, 100,
793 33, 29, 30, 136, 62, 63, 64, 65, 66, 67,
794 68, 37, 45, 14, 41, 48, 45, 18, 85, 33,
795 85, 62, 63, 64, 65, 66, 67, 47, 68, 32,
796 33, 34, 35, 47, 37, 113, 30, 47, 41, 4,
797 5, 6, 7, 121, 23, 24, 113, 125, 113, 116,
798 117, 116, 117, 10, 121, 113, 121, 53, 125, 10,
799 125, 1, 113, 121, 60, 61, 124, 125, 33, 136,
800 121, 136, 113, 45, 125, 15, 10, 17, 34, 35,
801 121, 37, 22, 124, 125, 10, 14, 15, 28, 17,
802 18, 19, 32, 10, 4, 5, 10, 37, 0, 1,
803 46, 89, 4, 5, 6, 7, 8, 9, 125, 11,
804 12, 13, 111, -1, 16, 55, 56, -1, 20, -1,
805 22, 32, 33, 34, 35, -1, 37, -1, 68, 31,
806 -1, 33, 4, 5, 6, 7, -1, 9, 40, 11,
807 12, 13, 44, 4, 16, 6, 7, -1, 20, 26,
808 22, 4, 5, 6, 7, 32, 33, 34, 35, 31,
809 37, 33, -1, -1, 4, 5, 6, 7, 40, -1,
810 4, 5, 44, 45, -1, -1, 48, 11, -1, -1,
811 33, -1, 16, -1, -1, -1, 39, -1, 22, 42,
812 43, -1, -1, 33, 47, 4, 5, 6, 7, 33,
813 9, -1, 11, 12, 13, 45, 40, 16, 26, -1,
814 -1, 20, -1, 22, 32, 33, 34, 35, -1, 37,
815 -1, -1, 31, 41, 33, 4, 5, 6, 7, -1,
816 9, 40, 11, 12, 13, 44, 45, 16, -1, 4,
817 5, 20, -1, 22, 9, -1, 11, 12, 13, -1,
818 -1, 16, 31, -1, 33, 20, -1, 22, -1, -1,
819 -1, 40, 4, 5, -1, 44, 31, 9, 33, 11,
820 12, 13, -1, -1, 16, 40, 4, 5, 20, 44,
821 22, 9, -1, 11, 12, -1, -1, -1, 16, 31,
822 -1, 33, 4, 5, 22, -1, -1, -1, 40, 11,
823 -1, -1, 44, 31, 16, 33, -1, -1, -1, -1,
824 22, -1, 40, 14, 15, -1, 17, 18, 19, -1,
825 -1, 33, -1, -1, -1, -1, -1, -1, 40
828 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
829 symbol of state STATE-NUM. */
830 static const yytype_uint8 yystos[] =
832 0, 50, 0, 1, 4, 5, 6, 7, 9, 11,
833 12, 13, 16, 20, 22, 31, 33, 40, 44, 51,
834 52, 53, 57, 58, 59, 61, 63, 8, 39, 4,
835 7, 57, 25, 64, 65, 4, 16, 40, 58, 40,
836 59, 61, 53, 58, 61, 63, 4, 5, 33, 54,
837 55, 56, 8, 21, 53, 29, 30, 14, 15, 17,
838 18, 19, 26, 32, 33, 34, 35, 37, 40, 58,
839 61, 63, 58, 23, 24, 66, 58, 61, 14, 41,
840 41, 41, 41, 4, 5, 45, 64, 58, 58, 47,
841 54, 55, 57, 69, 70, 72, 73, 39, 42, 43,
842 60, 69, 64, 64, 61, 61, 61, 61, 61, 61,
843 63, 47, 67, 68, 56, 70, 10, 10, 45, 72,
844 69, 68, 4, 5, 33, 45, 54, 55, 57, 58,
845 59, 61, 62, 63, 71, 73, 45, 48, 54, 55,
846 56, 72, 48, 4, 5, 71, 15, 56, 46
849 #define yyerrok (yyerrstatus = 0)
850 #define yyclearin (yychar = YYEMPTY)
854 #define YYACCEPT goto yyacceptlab
855 #define YYABORT goto yyabortlab
856 #define YYERROR goto yyerrorlab
859 /* Like YYERROR except do call yyerror. This remains here temporarily
860 to ease the transition to the new meaning of YYERROR, for GCC.
861 Once GCC version 2 has supplanted version 1, this can go. However,
862 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
863 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
866 #define YYFAIL goto yyerrlab
868 /* This is here to suppress warnings from the GCC cpp's
869 -Wunused-macros. Normally we don't worry about that warning, but
870 some users do, and we want to make it easy for users to remove
871 YYFAIL uses, which will produce warnings from Bison 2.5. */
874 #define YYRECOVERING() (!!yyerrstatus)
876 #define YYBACKUP(Token, Value) \
878 if (yychar == YYEMPTY) \
882 YYPOPSTACK (yylen); \
888 yyerror (scanner, YY_("syntax error: cannot back up")); \
893 /* Error token number */
895 #define YYERRCODE 256
898 /* This macro is provided for backward compatibility. */
899 #ifndef YY_LOCATION_PRINT
900 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
904 /* YYLEX -- calling `yylex' with the right arguments. */
906 # define YYLEX yylex (&yylval, YYLEX_PARAM)
908 # define YYLEX yylex (&yylval)
911 /* Enable debugging if requested. */
915 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
916 # define YYFPRINTF fprintf
919 # define YYDPRINTF(Args) \
925 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
929 YYFPRINTF (stderr, "%s ", Title); \
930 yy_symbol_print (stderr, \
931 Type, Value, scanner); \
932 YYFPRINTF (stderr, "\n"); \
937 /*--------------------------------.
938 | Print this symbol on YYOUTPUT. |
939 `--------------------------------*/
942 #if (defined __STDC__ || defined __C99__FUNC__ \
943 || defined __cplusplus || defined _MSC_VER)
945 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner)
948 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
951 YYSTYPE const * const yyvaluep;
955 FILE *yyo gmx_unused = yyoutput;
961 if (yytype < YYNTOKENS)
962 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
970 /*--------------------------------.
971 | Print this symbol on YYOUTPUT. |
972 `--------------------------------*/
974 #if (defined __STDC__ || defined __C99__FUNC__ \
975 || defined __cplusplus || defined _MSC_VER)
977 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner)
980 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
983 YYSTYPE const * const yyvaluep;
987 if (yytype < YYNTOKENS)
988 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
990 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
992 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
993 YYFPRINTF (yyoutput, ")");
996 /*------------------------------------------------------------------.
997 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
999 `------------------------------------------------------------------*/
1001 #if (defined __STDC__ || defined __C99__FUNC__ \
1002 || defined __cplusplus || defined _MSC_VER)
1004 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1007 yy_stack_print (yybottom, yytop)
1008 yytype_int16 *yybottom;
1009 yytype_int16 *yytop;
1012 YYFPRINTF (stderr, "Stack now");
1013 for (; yybottom <= yytop; yybottom++)
1015 int yybot = *yybottom;
1016 YYFPRINTF (stderr, " %d", yybot);
1018 YYFPRINTF (stderr, "\n");
1021 # define YY_STACK_PRINT(Bottom, Top) \
1024 yy_stack_print ((Bottom), (Top)); \
1028 /*------------------------------------------------.
1029 | Report that the YYRULE is going to be reduced. |
1030 `------------------------------------------------*/
1032 #if (defined __STDC__ || defined __C99__FUNC__ \
1033 || defined __cplusplus || defined _MSC_VER)
1035 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner)
1038 yy_reduce_print (yyvsp, yyrule, scanner)
1044 int yynrhs = yyr2[yyrule];
1046 unsigned long int yylno = yyrline[yyrule];
1047 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1049 /* The symbols being reduced. */
1050 for (yyi = 0; yyi < yynrhs; yyi++)
1052 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1053 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1054 &(yyvsp[(yyi + 1) - (yynrhs)])
1056 YYFPRINTF (stderr, "\n");
1060 # define YY_REDUCE_PRINT(Rule) \
1063 yy_reduce_print (yyvsp, Rule, scanner); \
1066 /* Nonzero means print parse trace. It is left uninitialized so that
1067 multiple parsers can coexist. */
1069 #else /* !YYDEBUG */
1070 # define YYDPRINTF(Args)
1071 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1072 # define YY_STACK_PRINT(Bottom, Top)
1073 # define YY_REDUCE_PRINT(Rule)
1074 #endif /* !YYDEBUG */
1077 /* YYINITDEPTH -- initial size of the parser's stacks. */
1079 # define YYINITDEPTH 200
1082 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1083 if the built-in stack extension method is used).
1085 Do not make this value too large; the results are undefined if
1086 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1087 evaluated with infinite-precision integer arithmetic. */
1090 # define YYMAXDEPTH 10000
1097 # if defined __GLIBC__ && defined _STRING_H
1098 # define yystrlen strlen
1100 /* Return the length of YYSTR. */
1101 #if (defined __STDC__ || defined __C99__FUNC__ \
1102 || defined __cplusplus || defined _MSC_VER)
1104 yystrlen (const char *yystr)
1112 for (yylen = 0; yystr[yylen]; yylen++)
1120 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1121 # define yystpcpy stpcpy
1123 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1125 #if (defined __STDC__ || defined __C99__FUNC__ \
1126 || defined __cplusplus || defined _MSC_VER)
1128 yystpcpy (char *yydest, const char *yysrc)
1131 yystpcpy (yydest, yysrc)
1137 const char *yys = yysrc;
1139 while ((*yyd++ = *yys++) != '\0')
1148 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1149 quotes and backslashes, so that it's suitable for yyerror. The
1150 heuristic is that double-quoting is unnecessary unless the string
1151 contains an apostrophe, a comma, or backslash (other than
1152 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1153 null, do not copy; instead, return the length of what the result
1156 yytnamerr (char *yyres, const char *yystr)
1161 char const *yyp = yystr;
1168 goto do_not_strip_quotes;
1172 goto do_not_strip_quotes;
1185 do_not_strip_quotes: ;
1189 return yystrlen (yystr);
1191 return yystpcpy (yyres, yystr) - yyres;
1195 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1196 about the unexpected token YYTOKEN for the state stack whose top is
1199 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1200 not large enough to hold the message. In that case, also set
1201 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1202 required number of bytes is too large to store. */
1204 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1205 yytype_int16 *yyssp, int yytoken)
1207 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1208 YYSIZE_T yysize = yysize0;
1209 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1210 /* Internationalized format string. */
1211 const char *yyformat = YY_NULL;
1212 /* Arguments of yyformat. */
1213 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1214 /* Number of reported tokens (one for the "unexpected", one per
1218 /* There are many possibilities here to consider:
1219 - Assume YYFAIL is not used. It's too flawed to consider. See
1220 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1221 for details. YYERROR is fine as it does not invoke this
1223 - If this state is a consistent state with a default action, then
1224 the only way this function was invoked is if the default action
1225 is an error action. In that case, don't check for expected
1226 tokens because there are none.
1227 - The only way there can be no lookahead present (in yychar) is if
1228 this state is a consistent state with a default action. Thus,
1229 detecting the absence of a lookahead is sufficient to determine
1230 that there is no unexpected or expected token to report. In that
1231 case, just report a simple "syntax error".
1232 - Don't assume there isn't a lookahead just because this state is a
1233 consistent state with a default action. There might have been a
1234 previous inconsistent state, consistent state with a non-default
1235 action, or user semantic action that manipulated yychar.
1236 - Of course, the expected token list depends on states to have
1237 correct lookahead information, and it depends on the parser not
1238 to perform extra reductions after fetching a lookahead from the
1239 scanner and before detecting a syntax error. Thus, state merging
1240 (from LALR or IELR) and default reductions corrupt the expected
1241 token list. However, the list is correct for canonical LR with
1242 one exception: it will still contain any token that will not be
1243 accepted due to an error action in a later state.
1245 if (yytoken != YYEMPTY)
1247 int yyn = yypact[*yyssp];
1248 yyarg[yycount++] = yytname[yytoken];
1249 if (!yypact_value_is_default (yyn))
1251 /* Start YYX at -YYN if negative to avoid negative indexes in
1252 YYCHECK. In other words, skip the first -YYN actions for
1253 this state because they are default actions. */
1254 int yyxbegin = yyn < 0 ? -yyn : 0;
1255 /* Stay within bounds of both yycheck and yytname. */
1256 int yychecklim = YYLAST - yyn + 1;
1257 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1260 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1261 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1262 && !yytable_value_is_error (yytable[yyx + yyn]))
1264 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1270 yyarg[yycount++] = yytname[yyx];
1272 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1273 if (! (yysize <= yysize1
1274 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1284 # define YYCASE_(N, S) \
1288 YYCASE_(0, YY_("syntax error"));
1289 YYCASE_(1, YY_("syntax error, unexpected %s"));
1290 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1291 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1292 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1293 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1298 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1299 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1304 if (*yymsg_alloc < yysize)
1306 *yymsg_alloc = 2 * yysize;
1307 if (! (yysize <= *yymsg_alloc
1308 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1309 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1313 /* Avoid sprintf, as that infringes on the user's name space.
1314 Don't have undefined behavior even if the translation
1315 produced a string with the wrong number of "%s"s. */
1319 while ((*yyp = *yyformat) != '\0')
1320 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1322 yyp += yytnamerr (yyp, yyarg[yyi++]);
1333 #endif /* YYERROR_VERBOSE */
1335 /*-----------------------------------------------.
1336 | Release the memory associated to this symbol. |
1337 `-----------------------------------------------*/
1340 #if (defined __STDC__ || defined __C99__FUNC__ \
1341 || defined __cplusplus || defined _MSC_VER)
1343 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner)
1346 yydestruct (yymsg, yytype, yyvaluep, scanner)
1358 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1363 /* Line 1393 of yacc.c */
1364 #line 176 "parser.y"
1365 { free(((*yyvaluep).str)); };
1366 /* Line 1393 of yacc.c */
1367 #line 1368 "parser.cpp"
1369 case 7: /* IDENTIFIER */
1370 /* Line 1393 of yacc.c */
1371 #line 176 "parser.y"
1372 { free(((*yyvaluep).str)); };
1373 /* Line 1393 of yacc.c */
1374 #line 1375 "parser.cpp"
1376 case 16: /* KEYWORD_POS */
1377 /* Line 1393 of yacc.c */
1378 #line 176 "parser.y"
1379 { free(((*yyvaluep).str)); };
1380 /* Line 1393 of yacc.c */
1381 #line 1382 "parser.cpp"
1383 case 23: /* PARAM */
1384 /* Line 1393 of yacc.c */
1385 #line 177 "parser.y"
1386 { if(((*yyvaluep).str)) free(((*yyvaluep).str)); };
1387 /* Line 1393 of yacc.c */
1388 #line 1389 "parser.cpp"
1390 case 26: /* CMP_OP */
1391 /* Line 1393 of yacc.c */
1392 #line 176 "parser.y"
1393 { free(((*yyvaluep).str)); };
1394 /* Line 1393 of yacc.c */
1395 #line 1396 "parser.cpp"
1397 case 50: /* commands */
1398 /* Line 1393 of yacc.c */
1399 #line 178 "parser.y"
1400 { delete ((*yyvaluep).sel); };
1401 /* Line 1393 of yacc.c */
1402 #line 1403 "parser.cpp"
1404 case 51: /* command */
1405 /* Line 1393 of yacc.c */
1406 #line 178 "parser.y"
1407 { delete ((*yyvaluep).sel); };
1408 /* Line 1393 of yacc.c */
1409 #line 1410 "parser.cpp"
1411 case 52: /* cmd_plain */
1412 /* Line 1393 of yacc.c */
1413 #line 178 "parser.y"
1414 { delete ((*yyvaluep).sel); };
1415 /* Line 1393 of yacc.c */
1416 #line 1417 "parser.cpp"
1418 case 53: /* selection */
1419 /* Line 1393 of yacc.c */
1420 #line 178 "parser.y"
1421 { delete ((*yyvaluep).sel); };
1422 /* Line 1393 of yacc.c */
1423 #line 1424 "parser.cpp"
1425 case 57: /* string */
1426 /* Line 1393 of yacc.c */
1427 #line 176 "parser.y"
1428 { free(((*yyvaluep).str)); };
1429 /* Line 1393 of yacc.c */
1430 #line 1431 "parser.cpp"
1432 case 58: /* sel_expr */
1433 /* Line 1393 of yacc.c */
1434 #line 179 "parser.y"
1435 { delete ((*yyvaluep).sel); };
1436 /* Line 1393 of yacc.c */
1437 #line 1438 "parser.cpp"
1439 case 59: /* pos_mod */
1440 /* Line 1393 of yacc.c */
1441 #line 177 "parser.y"
1442 { if(((*yyvaluep).str)) free(((*yyvaluep).str)); };
1443 /* Line 1393 of yacc.c */
1444 #line 1445 "parser.cpp"
1446 case 61: /* num_expr */
1447 /* Line 1393 of yacc.c */
1448 #line 179 "parser.y"
1449 { delete ((*yyvaluep).sel); };
1450 /* Line 1393 of yacc.c */
1451 #line 1452 "parser.cpp"
1453 case 62: /* str_expr */
1454 /* Line 1393 of yacc.c */
1455 #line 179 "parser.y"
1456 { delete ((*yyvaluep).sel); };
1457 /* Line 1393 of yacc.c */
1458 #line 1459 "parser.cpp"
1460 case 63: /* pos_expr */
1461 /* Line 1393 of yacc.c */
1462 #line 179 "parser.y"
1463 { delete ((*yyvaluep).sel); };
1464 /* Line 1393 of yacc.c */
1465 #line 1466 "parser.cpp"
1467 case 64: /* method_params */
1468 /* Line 1393 of yacc.c */
1469 #line 180 "parser.y"
1470 { delete ((*yyvaluep).plist); };
1471 /* Line 1393 of yacc.c */
1472 #line 1473 "parser.cpp"
1474 case 65: /* method_param_list */
1475 /* Line 1393 of yacc.c */
1476 #line 180 "parser.y"
1477 { delete ((*yyvaluep).plist); };
1478 /* Line 1393 of yacc.c */
1479 #line 1480 "parser.cpp"
1481 case 66: /* method_param */
1482 /* Line 1393 of yacc.c */
1483 #line 180 "parser.y"
1484 { delete ((*yyvaluep).param); };
1485 /* Line 1393 of yacc.c */
1486 #line 1487 "parser.cpp"
1488 case 67: /* value_list */
1489 /* Line 1393 of yacc.c */
1490 #line 181 "parser.y"
1491 { delete ((*yyvaluep).vlist); };
1492 /* Line 1393 of yacc.c */
1493 #line 1494 "parser.cpp"
1495 case 68: /* value_list_contents */
1496 /* Line 1393 of yacc.c */
1497 #line 181 "parser.y"
1498 { delete ((*yyvaluep).vlist); };
1499 /* Line 1393 of yacc.c */
1500 #line 1501 "parser.cpp"
1502 case 69: /* basic_value_list */
1503 /* Line 1393 of yacc.c */
1504 #line 181 "parser.y"
1505 { delete ((*yyvaluep).vlist); };
1506 /* Line 1393 of yacc.c */
1507 #line 1508 "parser.cpp"
1509 case 70: /* basic_value_list_contents */
1510 /* Line 1393 of yacc.c */
1511 #line 181 "parser.y"
1512 { delete ((*yyvaluep).vlist); };
1513 /* Line 1393 of yacc.c */
1514 #line 1515 "parser.cpp"
1516 case 71: /* value_item */
1517 /* Line 1393 of yacc.c */
1518 #line 182 "parser.y"
1519 { delete ((*yyvaluep).val); };
1520 /* Line 1393 of yacc.c */
1521 #line 1522 "parser.cpp"
1523 case 72: /* basic_value_item */
1524 /* Line 1393 of yacc.c */
1525 #line 182 "parser.y"
1526 { delete ((*yyvaluep).val); };
1527 /* Line 1393 of yacc.c */
1528 #line 1529 "parser.cpp"
1530 case 73: /* value_item_range */
1531 /* Line 1393 of yacc.c */
1532 #line 182 "parser.y"
1533 { delete ((*yyvaluep).val); };
1534 /* Line 1393 of yacc.c */
1535 #line 1536 "parser.cpp"
1547 /* Number of syntax errors so far. */
1551 /* Number of tokens to shift before error messages enabled. */
1554 /* The stacks and their tools:
1555 `yyss': related to states.
1556 `yyvs': related to semantic values.
1558 Refer to the stacks through separate pointers, to allow yyoverflow
1559 to reallocate them elsewhere. */
1561 /* The state stack. */
1562 yytype_int16 yyssa[YYINITDEPTH];
1564 yytype_int16 *yyssp;
1566 /* The semantic value stack. */
1567 YYSTYPE yyvsa[YYINITDEPTH];
1571 YYSIZE_T yystacksize;
1572 /* Used to determine if this is the first time this instance has
1577 /* Initialize the parser data structure. */
1578 #if (defined __STDC__ || defined __C99__FUNC__ \
1579 || defined __cplusplus || defined _MSC_VER)
1589 yyps = (yypstate *) malloc (sizeof *yyps);
1596 #if (defined __STDC__ || defined __C99__FUNC__ \
1597 || defined __cplusplus || defined _MSC_VER)
1599 yypstate_delete (yypstate *yyps)
1602 yypstate_delete (yyps)
1607 /* If the stack was reallocated but the parse did not complete, then the
1608 stack still needs to be freed. */
1609 if (!yyps->yynew && yyps->yyss != yyps->yyssa)
1610 YYSTACK_FREE (yyps->yyss);
1615 #define _gmx_sel_yynerrs yyps->_gmx_sel_yynerrs
1616 #define yystate yyps->yystate
1617 #define yyerrstatus yyps->yyerrstatus
1618 #define yyssa yyps->yyssa
1619 #define yyss yyps->yyss
1620 #define yyssp yyps->yyssp
1621 #define yyvsa yyps->yyvsa
1622 #define yyvs yyps->yyvs
1623 #define yyvsp yyps->yyvsp
1624 #define yystacksize yyps->yystacksize
1631 #if (defined __STDC__ || defined __C99__FUNC__ \
1632 || defined __cplusplus || defined _MSC_VER)
1634 yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, void *scanner)
1637 yypush_parse (yyps, yypushed_char, yypushed_val, scanner)
1640 YYSTYPE const *yypushed_val;
1644 /* The lookahead symbol. */
1648 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1649 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1650 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1651 _Pragma ("GCC diagnostic push") \
1652 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1653 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1654 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1655 _Pragma ("GCC diagnostic pop")
1657 /* Default value used for initialization, for pacifying older GCCs
1658 or non-GCC compilers. */
1659 static YYSTYPE yyval_default;
1660 # define YY_INITIAL_VALUE(Value) = Value
1662 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1663 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1664 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1666 #ifndef YY_INITIAL_VALUE
1667 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1670 /* The semantic value of the lookahead symbol. */
1671 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1675 /* Lookahead token as an internal (translated) token number. */
1677 /* The variables used to return semantic value and location from the
1682 /* Buffer for error messages, and its allocated size. */
1684 char *yymsg = yymsgbuf;
1685 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1688 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1690 /* The number of symbols on the RHS of the reduced rule.
1691 Keep to zero when no symbol should be popped. */
1696 yyn = yypact[yystate];
1697 goto yyread_pushed_token;
1700 yyssp = yyss = yyssa;
1701 yyvsp = yyvs = yyvsa;
1702 yystacksize = YYINITDEPTH;
1704 YYDPRINTF ((stderr, "Starting parse\n"));
1709 yychar = YYEMPTY; /* Cause a token to be read. */
1712 /*------------------------------------------------------------.
1713 | yynewstate -- Push a new state, which is found in yystate. |
1714 `------------------------------------------------------------*/
1716 /* In all cases, when you get here, the value and location stacks
1717 have just been pushed. So pushing a state here evens the stacks. */
1723 if (yyss + yystacksize - 1 <= yyssp)
1725 /* Get the current used size of the three stacks, in elements. */
1726 YYSIZE_T yysize = yyssp - yyss + 1;
1730 /* Give user a chance to reallocate the stack. Use copies of
1731 these so that the &'s don't force the real ones into
1733 YYSTYPE *yyvs1 = yyvs;
1734 yytype_int16 *yyss1 = yyss;
1736 /* Each stack pointer address is followed by the size of the
1737 data in use in that stack, in bytes. This used to be a
1738 conditional around just the two extra args, but that might
1739 be undefined if yyoverflow is a macro. */
1740 yyoverflow (YY_("memory exhausted"),
1741 &yyss1, yysize * sizeof (*yyssp),
1742 &yyvs1, yysize * sizeof (*yyvsp),
1748 #else /* no yyoverflow */
1749 # ifndef YYSTACK_RELOCATE
1750 goto yyexhaustedlab;
1752 /* Extend the stack our own way. */
1753 if (YYMAXDEPTH <= yystacksize)
1754 goto yyexhaustedlab;
1756 if (YYMAXDEPTH < yystacksize)
1757 yystacksize = YYMAXDEPTH;
1760 yytype_int16 *yyss1 = yyss;
1761 union yyalloc *yyptr =
1762 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1764 goto yyexhaustedlab;
1765 YYSTACK_RELOCATE (yyss_alloc, yyss);
1766 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1767 # undef YYSTACK_RELOCATE
1769 YYSTACK_FREE (yyss1);
1772 #endif /* no yyoverflow */
1774 yyssp = yyss + yysize - 1;
1775 yyvsp = yyvs + yysize - 1;
1777 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1778 (unsigned long int) yystacksize));
1780 if (yyss + yystacksize - 1 <= yyssp)
1784 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1786 if (yystate == YYFINAL)
1796 /* Do appropriate processing given the current state. Read a
1797 lookahead token if we need one and don't already have one. */
1799 /* First try to decide what to do without reference to lookahead token. */
1800 yyn = yypact[yystate];
1801 if (yypact_value_is_default (yyn))
1804 /* Not known => get a lookahead token if don't already have one. */
1806 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1807 if (yychar == YYEMPTY)
1811 YYDPRINTF ((stderr, "Return for a new token:\n"));
1812 yyresult = YYPUSH_MORE;
1816 yyread_pushed_token:
1817 YYDPRINTF ((stderr, "Reading a token: "));
1818 yychar = yypushed_char;
1820 yylval = *yypushed_val;
1823 if (yychar <= YYEOF)
1825 yychar = yytoken = YYEOF;
1826 YYDPRINTF ((stderr, "Now at end of input.\n"));
1830 yytoken = YYTRANSLATE (yychar);
1831 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1834 /* If the proper action on seeing token YYTOKEN is to reduce or to
1835 detect an error, take that action. */
1837 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1842 if (yytable_value_is_error (yyn))
1848 /* Count tokens shifted since error; after three, turn off error
1853 /* Shift the lookahead token. */
1854 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1856 /* Discard the shifted token. */
1860 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1862 YY_IGNORE_MAYBE_UNINITIALIZED_END
1867 /*-----------------------------------------------------------.
1868 | yydefault -- do the default action for the current state. |
1869 `-----------------------------------------------------------*/
1871 yyn = yydefact[yystate];
1877 /*-----------------------------.
1878 | yyreduce -- Do a reduction. |
1879 `-----------------------------*/
1881 /* yyn is the number of a rule to reduce with. */
1884 /* If YYLEN is nonzero, implement the default value of the action:
1887 Otherwise, the following line sets YYVAL to garbage.
1888 This behavior is undocumented and Bison
1889 users should not rely upon it. Assigning to YYVAL
1890 unconditionally makes the parser a bit smaller, and it avoids a
1891 GCC warning that YYVAL may be used uninitialized. */
1892 yyval = yyvsp[1-yylen];
1895 YY_REDUCE_PRINT (yyn);
1899 /* Line 1787 of yacc.c */
1900 #line 196 "parser.y"
1903 set_empty((yyval.sel));
1909 /* Line 1787 of yacc.c */
1910 #line 202 "parser.y"
1913 set((yyval.sel), _gmx_sel_append_selection(get((yyvsp[(2) - (2)].sel)), get((yyvsp[(1) - (2)].sel)), scanner));
1914 if (_gmx_sel_parser_should_finish(scanner))
1921 /* Line 1787 of yacc.c */
1922 #line 212 "parser.y"
1923 { (yyval.sel) = (yyvsp[(1) - (2)].sel); }
1927 /* Line 1787 of yacc.c */
1928 #line 214 "parser.y"
1931 _gmx_selparser_error(scanner, "invalid selection '%s'",
1932 _gmx_sel_lexer_pselstr(scanner));
1933 _gmx_sel_lexer_clear_method_stack(scanner);
1934 if (_gmx_sel_is_lexer_interactive(scanner))
1936 _gmx_sel_lexer_clear_pselstr(scanner);
1943 set_empty((yyval.sel));
1949 /* Line 1787 of yacc.c */
1950 #line 235 "parser.y"
1953 set_empty((yyval.sel));
1959 /* Line 1787 of yacc.c */
1960 #line 241 "parser.y"
1963 SelectionTreeElementPointer s
1964 = _gmx_sel_init_group_by_id((yyvsp[(1) - (1)].i), scanner);
1965 SelectionTreeElementPointer p
1966 = _gmx_sel_init_position(s, NULL, scanner);
1968 set((yyval.sel), _gmx_sel_init_selection(NULL, p, scanner));
1974 /* Line 1787 of yacc.c */
1975 #line 252 "parser.y"
1978 scoped_ptr_sfree nameGuard((yyvsp[(1) - (1)].str));
1979 SelectionTreeElementPointer s
1980 = _gmx_sel_init_group_by_name((yyvsp[(1) - (1)].str), scanner);
1981 SelectionTreeElementPointer p
1982 = _gmx_sel_init_position(s, NULL, scanner);
1984 set((yyval.sel), _gmx_sel_init_selection(NULL, p, scanner));
1990 /* Line 1787 of yacc.c */
1991 #line 264 "parser.y"
1994 set((yyval.sel), _gmx_sel_init_selection(NULL, get((yyvsp[(1) - (1)].sel)), scanner));
2000 /* Line 1787 of yacc.c */
2001 #line 270 "parser.y"
2004 scoped_ptr_sfree nameGuard((yyvsp[(1) - (2)].str));
2005 set((yyval.sel), _gmx_sel_init_selection((yyvsp[(1) - (2)].str), get((yyvsp[(2) - (2)].sel)), scanner));
2011 /* Line 1787 of yacc.c */
2012 #line 277 "parser.y"
2015 scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2016 set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2022 /* Line 1787 of yacc.c */
2023 #line 284 "parser.y"
2026 scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2027 set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2033 /* Line 1787 of yacc.c */
2034 #line 291 "parser.y"
2037 scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2038 set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2044 /* Line 1787 of yacc.c */
2045 #line 300 "parser.y"
2046 { (yyval.sel) = (yyvsp[(1) - (1)].sel); }
2050 /* Line 1787 of yacc.c */
2051 #line 302 "parser.y"
2054 set((yyval.sel), _gmx_sel_init_position(get((yyvsp[(1) - (1)].sel)), NULL, scanner));
2055 CHECK_SEL((yyval.sel));
2061 /* Line 1787 of yacc.c */
2062 #line 308 "parser.y"
2063 { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2067 /* Line 1787 of yacc.c */
2068 #line 310 "parser.y"
2071 set((yyval.sel), _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), get((yyvsp[(1) - (3)].sel)), scanner));
2072 CHECK_SEL((yyval.sel));
2078 /* Line 1787 of yacc.c */
2079 #line 323 "parser.y"
2080 { (yyval.i) = (yyvsp[(1) - (1)].i); }
2084 /* Line 1787 of yacc.c */
2085 #line 324 "parser.y"
2086 { (yyval.i) = -(yyvsp[(2) - (2)].i); }
2090 /* Line 1787 of yacc.c */
2091 #line 328 "parser.y"
2092 { (yyval.r) = (yyvsp[(1) - (1)].r); }
2096 /* Line 1787 of yacc.c */
2097 #line 329 "parser.y"
2098 { (yyval.r) = -(yyvsp[(2) - (2)].r); }
2102 /* Line 1787 of yacc.c */
2103 #line 332 "parser.y"
2104 { (yyval.r) = (yyvsp[(1) - (1)].i); }
2108 /* Line 1787 of yacc.c */
2109 #line 333 "parser.y"
2110 { (yyval.r) = (yyvsp[(1) - (1)].r); }
2114 /* Line 1787 of yacc.c */
2115 #line 336 "parser.y"
2116 { (yyval.str) = (yyvsp[(1) - (1)].str); }
2120 /* Line 1787 of yacc.c */
2121 #line 337 "parser.y"
2122 { (yyval.str) = (yyvsp[(1) - (1)].str); }
2126 /* Line 1787 of yacc.c */
2127 #line 346 "parser.y"
2130 SelectionTreeElementPointer arg(get((yyvsp[(2) - (2)].sel)));
2131 SelectionTreeElementPointer sel(
2132 new SelectionTreeElement(SEL_BOOLEAN));
2133 sel->u.boolt = BOOL_NOT;
2135 set((yyval.sel), sel);
2141 /* Line 1787 of yacc.c */
2142 #line 357 "parser.y"
2145 SelectionTreeElementPointer arg1(get((yyvsp[(1) - (3)].sel))), arg2(get((yyvsp[(3) - (3)].sel)));
2146 SelectionTreeElementPointer sel(
2147 new SelectionTreeElement(SEL_BOOLEAN));
2148 sel->u.boolt = BOOL_AND;
2149 sel->child = arg1; sel->child->next = arg2;
2150 set((yyval.sel), sel);
2156 /* Line 1787 of yacc.c */
2157 #line 368 "parser.y"
2160 SelectionTreeElementPointer arg1(get((yyvsp[(1) - (3)].sel))), arg2(get((yyvsp[(3) - (3)].sel)));
2161 SelectionTreeElementPointer sel(
2162 new SelectionTreeElement(SEL_BOOLEAN));
2163 sel->u.boolt = BOOL_OR;
2164 sel->child = arg1; sel->child->next = arg2;
2165 set((yyval.sel), sel);
2171 /* Line 1787 of yacc.c */
2172 #line 378 "parser.y"
2173 { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2177 /* Line 1787 of yacc.c */
2178 #line 383 "parser.y"
2181 scoped_ptr_sfree opGuard((yyvsp[(2) - (3)].str));
2182 set((yyval.sel), _gmx_sel_init_comparison(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), (yyvsp[(2) - (3)].str), scanner));
2183 CHECK_SEL((yyval.sel));
2189 /* Line 1787 of yacc.c */
2190 #line 394 "parser.y"
2193 scoped_ptr_sfree nameGuard((yyvsp[(2) - (2)].str));
2194 set((yyval.sel), _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner));
2200 /* Line 1787 of yacc.c */
2201 #line 401 "parser.y"
2204 set((yyval.sel), _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner));
2210 /* Line 1787 of yacc.c */
2211 #line 409 "parser.y"
2212 { (yyval.str) = NULL; }
2216 /* Line 1787 of yacc.c */
2217 #line 410 "parser.y"
2218 { (yyval.str) = (yyvsp[(1) - (1)].str); }
2222 /* Line 1787 of yacc.c */
2223 #line 415 "parser.y"
2224 { (yyval.smt) = gmx::eStringMatchType_RegularExpression; }
2228 /* Line 1787 of yacc.c */
2229 #line 416 "parser.y"
2230 { (yyval.smt) = gmx::eStringMatchType_Wildcard; }
2234 /* Line 1787 of yacc.c */
2235 #line 417 "parser.y"
2236 { (yyval.smt) = gmx::eStringMatchType_Exact; }
2240 /* Line 1787 of yacc.c */
2241 #line 422 "parser.y"
2244 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2245 set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2246 CHECK_SEL((yyval.sel));
2252 /* Line 1787 of yacc.c */
2253 #line 430 "parser.y"
2256 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2257 set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[(2) - (3)].meth), gmx::eStringMatchType_Auto, get((yyvsp[(3) - (3)].vlist)), (yyvsp[(1) - (3)].str), scanner));
2258 CHECK_SEL((yyval.sel));
2264 /* Line 1787 of yacc.c */
2265 #line 438 "parser.y"
2268 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (4)].str));
2269 set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[(2) - (4)].meth), (yyvsp[(3) - (4)].smt), get((yyvsp[(4) - (4)].vlist)), (yyvsp[(1) - (4)].str), scanner));
2270 CHECK_SEL((yyval.sel));
2276 /* Line 1787 of yacc.c */
2277 #line 446 "parser.y"
2280 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2281 set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].vlist)), (yyvsp[(1) - (3)].str), scanner));
2282 CHECK_SEL((yyval.sel));
2288 /* Line 1787 of yacc.c */
2289 #line 457 "parser.y"
2292 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2293 set((yyval.sel), _gmx_sel_init_method((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), (yyvsp[(1) - (3)].str), scanner));
2294 CHECK_SEL((yyval.sel));
2300 /* Line 1787 of yacc.c */
2301 #line 472 "parser.y"
2304 SelectionTreeElementPointer sel(
2305 new SelectionTreeElement(SEL_CONST));
2306 _gmx_selelem_set_vtype(sel, INT_VALUE);
2307 _gmx_selvalue_reserve(&sel->v, 1);
2308 sel->v.u.i[0] = (yyvsp[(1) - (1)].i);
2309 set((yyval.sel), sel);
2315 /* Line 1787 of yacc.c */
2316 #line 483 "parser.y"
2319 SelectionTreeElementPointer sel(
2320 new SelectionTreeElement(SEL_CONST));
2321 _gmx_selelem_set_vtype(sel, REAL_VALUE);
2322 _gmx_selvalue_reserve(&sel->v, 1);
2323 sel->v.u.r[0] = (yyvsp[(1) - (1)].r);
2324 set((yyval.sel), sel);
2330 /* Line 1787 of yacc.c */
2331 #line 497 "parser.y"
2334 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2335 set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2336 CHECK_SEL((yyval.sel));
2342 /* Line 1787 of yacc.c */
2343 #line 505 "parser.y"
2346 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2347 set((yyval.sel), _gmx_sel_init_method((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), (yyvsp[(1) - (3)].str), scanner));
2348 CHECK_SEL((yyval.sel));
2354 /* Line 1787 of yacc.c */
2355 #line 516 "parser.y"
2358 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '+', scanner));
2364 /* Line 1787 of yacc.c */
2365 #line 522 "parser.y"
2368 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '-', scanner));
2374 /* Line 1787 of yacc.c */
2375 #line 528 "parser.y"
2378 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '*', scanner));
2384 /* Line 1787 of yacc.c */
2385 #line 534 "parser.y"
2388 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '/', scanner));
2394 /* Line 1787 of yacc.c */
2395 #line 540 "parser.y"
2398 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(2) - (2)].sel)), SelectionTreeElementPointer(), '-', scanner));
2404 /* Line 1787 of yacc.c */
2405 #line 546 "parser.y"
2408 set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '^', scanner));
2414 /* Line 1787 of yacc.c */
2415 #line 551 "parser.y"
2416 { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2420 /* Line 1787 of yacc.c */
2421 #line 559 "parser.y"
2424 SelectionTreeElementPointer sel(
2425 new SelectionTreeElement(SEL_CONST));
2426 _gmx_selelem_set_vtype(sel, STR_VALUE);
2427 _gmx_selvalue_reserve(&sel->v, 1);
2428 sel->v.u.s[0] = (yyvsp[(1) - (1)].str);
2429 set((yyval.sel), sel);
2435 /* Line 1787 of yacc.c */
2436 #line 570 "parser.y"
2439 scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2440 set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2441 CHECK_SEL((yyval.sel));
2447 /* Line 1787 of yacc.c */
2448 #line 585 "parser.y"
2451 set((yyval.sel), _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r)));
2457 /* Line 1787 of yacc.c */
2458 #line 593 "parser.y"
2459 { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2463 /* Line 1787 of yacc.c */
2464 #line 598 "parser.y"
2467 set((yyval.sel), _gmx_sel_init_method((yyvsp[(1) - (2)].meth), get((yyvsp[(2) - (2)].plist)), NULL, scanner));
2468 CHECK_SEL((yyval.sel));
2474 /* Line 1787 of yacc.c */
2475 #line 608 "parser.y"
2478 scoped_ptr_sfree keywordGuard((yyvsp[(1) - (3)].str));
2479 set((yyval.sel), _gmx_sel_init_position(get((yyvsp[(3) - (3)].sel)), (yyvsp[(1) - (3)].str), scanner));
2480 CHECK_SEL((yyval.sel));
2486 /* Line 1787 of yacc.c */
2487 #line 622 "parser.y"
2490 set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2496 /* Line 1787 of yacc.c */
2497 #line 630 "parser.y"
2500 set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2506 /* Line 1787 of yacc.c */
2507 #line 638 "parser.y"
2510 set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2516 /* Line 1787 of yacc.c */
2517 #line 651 "parser.y"
2518 { (yyval.plist) = (yyvsp[(1) - (1)].plist); }
2522 /* Line 1787 of yacc.c */
2523 #line 653 "parser.y"
2524 { (yyval.plist) = (yyvsp[(1) - (2)].plist); }
2528 /* Line 1787 of yacc.c */
2529 #line 658 "parser.y"
2532 set((yyval.plist), SelectionParserParameter::createList());
2538 /* Line 1787 of yacc.c */
2539 #line 664 "parser.y"
2542 SelectionParserParameterListPointer list(get((yyvsp[(1) - (2)].plist)));
2543 list->push_back(get((yyvsp[(2) - (2)].param)));
2544 set((yyval.plist), move(list));
2550 /* Line 1787 of yacc.c */
2551 #line 675 "parser.y"
2554 scoped_ptr_sfree nameGuard((yyvsp[(1) - (2)].str));
2555 set((yyval.param), SelectionParserParameter::create((yyvsp[(1) - (2)].str), get((yyvsp[(2) - (2)].vlist))));
2561 /* Line 1787 of yacc.c */
2562 #line 683 "parser.y"
2563 { (yyval.vlist) = (yyvsp[(1) - (1)].vlist); }
2567 /* Line 1787 of yacc.c */
2568 #line 684 "parser.y"
2569 { (yyval.vlist) = (yyvsp[(2) - (3)].vlist); }
2573 /* Line 1787 of yacc.c */
2574 #line 689 "parser.y"
2577 set((yyval.vlist), SelectionParserValue::createList());
2583 /* Line 1787 of yacc.c */
2584 #line 695 "parser.y"
2587 SelectionParserValueListPointer list(get((yyvsp[(1) - (2)].vlist)));
2588 list->push_back(get((yyvsp[(2) - (2)].val)));
2589 set((yyval.vlist), move(list));
2595 /* Line 1787 of yacc.c */
2596 #line 703 "parser.y"
2599 SelectionParserValueListPointer list(get((yyvsp[(1) - (3)].vlist)));
2600 list->push_back(get((yyvsp[(3) - (3)].val)));
2601 set((yyval.vlist), move(list));
2607 /* Line 1787 of yacc.c */
2608 #line 713 "parser.y"
2609 { (yyval.vlist) = (yyvsp[(1) - (1)].vlist); }
2613 /* Line 1787 of yacc.c */
2614 #line 714 "parser.y"
2615 { (yyval.vlist) = (yyvsp[(2) - (3)].vlist); }
2619 /* Line 1787 of yacc.c */
2620 #line 719 "parser.y"
2623 set((yyval.vlist), SelectionParserValue::createList(get((yyvsp[(1) - (1)].val))));
2629 /* Line 1787 of yacc.c */
2630 #line 725 "parser.y"
2633 SelectionParserValueListPointer list(get((yyvsp[(1) - (2)].vlist)));
2634 list->push_back(get((yyvsp[(2) - (2)].val)));
2635 set((yyval.vlist), move(list));
2641 /* Line 1787 of yacc.c */
2642 #line 733 "parser.y"
2645 SelectionParserValueListPointer list(get((yyvsp[(1) - (3)].vlist)));
2646 list->push_back(get((yyvsp[(3) - (3)].val)));
2647 set((yyval.vlist), move(list));
2653 /* Line 1787 of yacc.c */
2654 #line 743 "parser.y"
2657 set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2663 /* Line 1787 of yacc.c */
2664 #line 749 "parser.y"
2667 set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2673 /* Line 1787 of yacc.c */
2674 #line 755 "parser.y"
2677 set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2683 /* Line 1787 of yacc.c */
2684 #line 761 "parser.y"
2687 set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2693 /* Line 1787 of yacc.c */
2694 #line 766 "parser.y"
2695 { (yyval.val) = (yyvsp[(1) - (1)].val); }
2699 /* Line 1787 of yacc.c */
2700 #line 771 "parser.y"
2703 set((yyval.val), SelectionParserValue::createInteger((yyvsp[(1) - (1)].i)));
2709 /* Line 1787 of yacc.c */
2710 #line 777 "parser.y"
2713 set((yyval.val), SelectionParserValue::createReal((yyvsp[(1) - (1)].r)));
2719 /* Line 1787 of yacc.c */
2720 #line 783 "parser.y"
2723 scoped_ptr_sfree stringGuard((yyvsp[(1) - (1)].str));
2724 set((yyval.val), SelectionParserValue::createString((yyvsp[(1) - (1)].str)));
2730 /* Line 1787 of yacc.c */
2731 #line 789 "parser.y"
2732 { (yyval.val) = (yyvsp[(1) - (1)].val); }
2736 /* Line 1787 of yacc.c */
2737 #line 794 "parser.y"
2740 set((yyval.val), SelectionParserValue::createIntegerRange((yyvsp[(1) - (3)].i), (yyvsp[(3) - (3)].i)));
2746 /* Line 1787 of yacc.c */
2747 #line 800 "parser.y"
2750 set((yyval.val), SelectionParserValue::createRealRange((yyvsp[(1) - (3)].i), (yyvsp[(3) - (3)].r)));
2756 /* Line 1787 of yacc.c */
2757 #line 806 "parser.y"
2760 set((yyval.val), SelectionParserValue::createRealRange((yyvsp[(1) - (3)].r), (yyvsp[(3) - (3)].r)));
2766 /* Line 1787 of yacc.c */
2767 #line 2768 "parser.cpp"
2770 /* User semantic actions sometimes alter yychar, and that requires
2771 that yytoken be updated with the new translation. We take the
2772 approach of translating immediately before every use of yytoken.
2773 One alternative is translating here after every semantic action,
2774 but that translation would be missed if the semantic action invokes
2775 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2776 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2777 incorrect destructor might then be invoked immediately. In the
2778 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2779 to an incorrect destructor call or verbose syntax error message
2780 before the lookahead is translated. */
2781 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2785 YY_STACK_PRINT (yyss, yyssp);
2789 /* Now `shift' the result of the reduction. Determine what state
2790 that goes to, based on the state we popped back to and the rule
2791 number reduced by. */
2795 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2796 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2797 yystate = yytable[yystate];
2799 yystate = yydefgoto[yyn - YYNTOKENS];
2804 /*------------------------------------.
2805 | yyerrlab -- here on detecting error |
2806 `------------------------------------*/
2808 /* Make sure we have latest lookahead translation. See comments at
2809 user semantic actions for why this is necessary. */
2810 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2812 /* If not already recovering from an error, report this error. */
2816 #if ! YYERROR_VERBOSE
2817 yyerror (scanner, YY_("syntax error"));
2819 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2822 char const *yymsgp = YY_("syntax error");
2823 int yysyntax_error_status;
2824 yysyntax_error_status = YYSYNTAX_ERROR;
2825 if (yysyntax_error_status == 0)
2827 else if (yysyntax_error_status == 1)
2829 if (yymsg != yymsgbuf)
2830 YYSTACK_FREE (yymsg);
2831 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2835 yymsg_alloc = sizeof yymsgbuf;
2836 yysyntax_error_status = 2;
2840 yysyntax_error_status = YYSYNTAX_ERROR;
2844 yyerror (scanner, yymsgp);
2845 if (yysyntax_error_status == 2)
2846 goto yyexhaustedlab;
2848 # undef YYSYNTAX_ERROR
2854 if (yyerrstatus == 3)
2856 /* If just tried and failed to reuse lookahead token after an
2857 error, discard it. */
2859 if (yychar <= YYEOF)
2861 /* Return failure if at end of input. */
2862 if (yychar == YYEOF)
2867 yydestruct ("Error: discarding",
2868 yytoken, &yylval, scanner);
2873 /* Else will try to reuse lookahead token after shifting the error
2878 /*---------------------------------------------------.
2879 | yyerrorlab -- error raised explicitly by YYERROR. |
2880 `---------------------------------------------------*/
2883 /* Pacify compilers like GCC when the user code never invokes
2884 YYERROR and the label yyerrorlab therefore never appears in user
2886 if (/*CONSTCOND*/ 0)
2889 /* Do not reclaim the symbols of the rule which action triggered
2893 YY_STACK_PRINT (yyss, yyssp);
2898 /*-------------------------------------------------------------.
2899 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2900 `-------------------------------------------------------------*/
2902 yyerrstatus = 3; /* Each real token shifted decrements this. */
2906 yyn = yypact[yystate];
2907 if (!yypact_value_is_default (yyn))
2910 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2918 /* Pop the current state because it cannot handle the error token. */
2923 yydestruct ("Error: popping",
2924 yystos[yystate], yyvsp, scanner);
2927 YY_STACK_PRINT (yyss, yyssp);
2930 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2932 YY_IGNORE_MAYBE_UNINITIALIZED_END
2935 /* Shift the error token. */
2936 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2942 /*-------------------------------------.
2943 | yyacceptlab -- YYACCEPT comes here. |
2944 `-------------------------------------*/
2949 /*-----------------------------------.
2950 | yyabortlab -- YYABORT comes here. |
2951 `-----------------------------------*/
2956 #if !defined yyoverflow || YYERROR_VERBOSE
2957 /*-------------------------------------------------.
2958 | yyexhaustedlab -- memory exhaustion comes here. |
2959 `-------------------------------------------------*/
2961 yyerror (scanner, YY_("memory exhausted"));
2967 if (yychar != YYEMPTY)
2969 /* Make sure we have latest lookahead translation. See comments at
2970 user semantic actions for why this is necessary. */
2971 yytoken = YYTRANSLATE (yychar);
2972 yydestruct ("Cleanup: discarding lookahead",
2973 yytoken, &yylval, scanner);
2975 /* Do not reclaim the symbols of the rule which action triggered
2976 this YYABORT or YYACCEPT. */
2978 YY_STACK_PRINT (yyss, yyssp);
2979 while (yyssp != yyss)
2981 yydestruct ("Cleanup: popping",
2982 yystos[*yyssp], yyvsp, scanner);
2987 YYSTACK_FREE (yyss);
2993 if (yymsg != yymsgbuf)
2994 YYSTACK_FREE (yymsg);
2996 /* Make sure YYID is used. */
2997 return YYID (yyresult);