2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2012, by the GROMACS development team, led by
5 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
6 * others, as listed in the AUTHORS file in the top-level source
7 * directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
35 /* A Bison parser, made by GNU Bison 2.3. */
37 /* Skeleton implementation for Bison's Yacc-like parsers in C
39 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
40 Free Software Foundation, Inc.
42 This program is free software; you can redistribute it and/or modify
43 it under the terms of the GNU General Public License as published by
44 the Free Software Foundation; either version 2, or (at your option)
47 This program is distributed in the hope that it will be useful,
48 but WITHOUT ANY WARRANTY; without even the implied warranty of
49 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 GNU General Public License for more details.
52 You should have received a copy of the GNU General Public License
53 along with this program; if not, write to the Free Software
54 Foundation, Inc., 51 Franklin Street, Fifth Floor,
55 Boston, MA 02110-1301, USA. */
57 /* As a special exception, you may create a larger work that contains
58 part or all of the Bison parser skeleton and distribute that work
59 under terms of your choice, so long as that work isn't itself a
60 parser generator using the skeleton or a modified version thereof
61 as a parser skeleton. Alternatively, if you modify or redistribute
62 the parser skeleton itself, you may (at your option) remove this
63 special exception, which will cause the skeleton and the resulting
64 Bison output files to be licensed under the GNU General Public
65 License without this special exception.
67 This special exception was added by the Free Software Foundation in
68 version 2.2 of Bison. */
70 /* C LALR(1) parser skeleton written by Richard Stallman, by
71 simplifying the original so-called "semantic" parser. */
73 /* All symbols defined below should begin with yy or YY, to avoid
74 infringing on user name space. This should be done even for local
75 variables, as they might otherwise be expanded by user macros.
76 There are some unavoidable exceptions within include files to
77 define necessary library symbols; they are noted "INFRINGES ON
78 USER NAME SPACE" below. */
80 /* Identify Bison output. */
84 #define YYBISON_VERSION "2.3"
87 #define YYSKELETON_NAME "yacc.c"
92 /* Using locations. */
93 #define YYLSP_NEEDED 0
95 /* Substitute the variable and function names. */
96 #define yyparse _gmx_sel_yybparse
97 #define yylex _gmx_sel_yyblex
98 #define yyerror _gmx_sel_yyberror
99 #define yylval _gmx_sel_yyblval
100 #define yychar _gmx_sel_yybchar
101 #define yydebug _gmx_sel_yybdebug
102 #define yynerrs _gmx_sel_yybnerrs
108 /* Put the tokens into the symbol table, so that GDB and other debuggers
121 VARIABLE_NUMERIC = 268,
122 VARIABLE_GROUP = 269,
124 KEYWORD_NUMERIC = 271,
128 METHOD_NUMERIC = 275,
149 #define HELP_TOPIC 260
153 #define IDENTIFIER 264
157 #define VARIABLE_NUMERIC 268
158 #define VARIABLE_GROUP 269
159 #define VARIABLE_POS 270
160 #define KEYWORD_NUMERIC 271
161 #define KEYWORD_STR 272
162 #define KEYWORD_POS 273
163 #define KEYWORD_GROUP 274
164 #define METHOD_NUMERIC 275
165 #define METHOD_GROUP 276
166 #define METHOD_POS 277
168 #define EMPTY_POSMOD 279
170 #define END_OF_METHOD 281
173 #define PARAM_REDUCT 284
178 #define UNARY_NEG 289
179 #define NUM_REDUCT 290
184 /* Copy the first part of user declarations. */
187 /*! \internal \file parser.c
188 * \brief Generated (from parser.y by Bison) parser for the selection language.
190 /*! \internal \file parser.h
191 * \brief Generated (from parser.y by Bison) parser include file.
199 #include "parsetree.h"
204 static t_selexpr_value *
205 process_value_list(t_selexpr_value *values, int *nr);
206 static t_selexpr_param *
207 process_param_list(t_selexpr_param *params);
210 yyerror(yyscan_t, char const *s);
212 // Work around compiler warnings that result from bison not correctly
213 // dealing with stdlib.h with ICC on Windows.
214 #if (defined __INTEL_COMPILER && defined _WIN32)
215 #define YYMALLOC malloc
220 /* Enabling traces. */
225 /* Enabling verbose error messages. */
226 #ifdef YYERROR_VERBOSE
227 # undef YYERROR_VERBOSE
228 # define YYERROR_VERBOSE 1
230 # define YYERROR_VERBOSE 0
233 /* Enabling the token table. */
234 #ifndef YYTOKEN_TABLE
235 # define YYTOKEN_TABLE 0
238 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
239 typedef union YYSTYPE
245 struct gmx_ana_selmethod_t *meth;
247 struct t_selelem *sel;
249 struct t_selexpr_value *val;
250 struct t_selexpr_param *param;
252 /* Line 193 of yacc.c. */
255 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
256 # define YYSTYPE_IS_DECLARED 1
257 # define YYSTYPE_IS_TRIVIAL 1
262 /* Copy the second part of user declarations. */
265 /* Line 216 of yacc.c. */
273 typedef YYTYPE_UINT8 yytype_uint8;
275 typedef unsigned char yytype_uint8;
279 typedef YYTYPE_INT8 yytype_int8;
280 #elif (defined __STDC__ || defined __C99__FUNC__ \
281 || defined __cplusplus || defined _MSC_VER)
282 typedef signed char yytype_int8;
284 typedef short int yytype_int8;
288 typedef YYTYPE_UINT16 yytype_uint16;
290 typedef unsigned short int yytype_uint16;
294 typedef YYTYPE_INT16 yytype_int16;
296 typedef short int yytype_int16;
300 # ifdef __SIZE_TYPE__
301 # define YYSIZE_T __SIZE_TYPE__
302 # elif defined size_t
303 # define YYSIZE_T size_t
304 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
305 || defined __cplusplus || defined _MSC_VER)
306 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
307 # define YYSIZE_T size_t
309 # define YYSIZE_T unsigned int
313 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
316 # if defined YYENABLE_NLS && YYENABLE_NLS
318 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
319 # define YY_(msgid) dgettext ("bison-runtime", msgid)
323 # define YY_(msgid) msgid
327 /* Suppress unused-variable warnings by "using" E. */
328 #if ! defined lint || defined __GNUC__
329 # define YYUSE(e) ((void) (e))
331 # define YYUSE(e) /* empty */
334 /* Identity function, used to suppress warnings about constant conditions. */
338 #if (defined __STDC__ || defined __C99__FUNC__ \
339 || defined __cplusplus || defined _MSC_VER)
352 #if ! defined yyoverflow || YYERROR_VERBOSE
354 /* The parser invokes alloca or malloc; define the necessary symbols. */
356 # ifdef YYSTACK_USE_ALLOCA
357 # if YYSTACK_USE_ALLOCA
359 # define YYSTACK_ALLOC __builtin_alloca
360 # elif defined __BUILTIN_VA_ARG_INCR
361 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
363 # define YYSTACK_ALLOC __alloca
364 # elif defined _MSC_VER
365 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
366 # define alloca _alloca
368 # define YYSTACK_ALLOC alloca
369 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
370 || defined __cplusplus || defined _MSC_VER)
371 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
380 # ifdef YYSTACK_ALLOC
381 /* Pacify GCC's `empty if-body' warning. */
382 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
383 # ifndef YYSTACK_ALLOC_MAXIMUM
384 /* The OS might guarantee only one guard page at the bottom of the stack,
385 and a page size can be as small as 4096 bytes. So we cannot safely
386 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
387 to allow for a few compiler-allocated temporary stack slots. */
388 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
391 # define YYSTACK_ALLOC YYMALLOC
392 # define YYSTACK_FREE YYFREE
393 # ifndef YYSTACK_ALLOC_MAXIMUM
394 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
396 # if (defined __cplusplus && ! defined _STDLIB_H \
397 && ! ((defined YYMALLOC || defined malloc) \
398 && (defined YYFREE || defined free)))
399 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
405 # define YYMALLOC malloc
406 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
407 || defined __cplusplus || defined _MSC_VER)
408 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
413 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
414 || defined __cplusplus || defined _MSC_VER)
415 void free (void *); /* INFRINGES ON USER NAME SPACE */
419 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
422 #if (! defined yyoverflow \
423 && (! defined __cplusplus \
424 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
426 /* A type that is properly aligned for any stack member. */
433 /* The size of the maximum gap between one aligned stack and the next. */
434 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
436 /* The size of an array large to enough to hold all stacks, each with
438 # define YYSTACK_BYTES(N) \
439 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
440 + YYSTACK_GAP_MAXIMUM)
442 /* Copy COUNT objects from FROM to TO. The source and destination do
445 # if defined __GNUC__ && 1 < __GNUC__
446 # define YYCOPY(To, From, Count) \
447 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
449 # define YYCOPY(To, From, Count) \
453 for (yyi = 0; yyi < (Count); yyi++) \
454 (To)[yyi] = (From)[yyi]; \
460 /* Relocate STACK from its old location to the new one. The
461 local variables YYSIZE and YYSTACKSIZE give the old and new number of
462 elements in the stack, and YYPTR gives the new location of the
463 stack. Advance YYPTR to a properly aligned location for the next
465 # define YYSTACK_RELOCATE(Stack) \
468 YYSIZE_T yynewbytes; \
469 YYCOPY (&yyptr->Stack, Stack, yysize); \
470 Stack = &yyptr->Stack; \
471 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
472 yyptr += yynewbytes / sizeof (*yyptr); \
478 /* YYFINAL -- State number of the termination state. */
480 /* YYLAST -- Last index in YYTABLE. */
483 /* YYNTOKENS -- Number of terminals. */
485 /* YYNNTS -- Number of nonterminals. */
487 /* YYNRULES -- Number of rules. */
489 /* YYNRULES -- Number of states. */
490 #define YYNSTATES 150
492 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
494 #define YYMAXUTOK 290
496 #define YYTRANSLATE(YYX) \
497 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
499 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
500 static const yytype_uint8 yytranslate[] =
502 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506 42, 43, 36, 34, 45, 35, 2, 37, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 41, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511 2, 44, 2, 46, 39, 2, 2, 2, 2, 2,
512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 47, 2, 48, 2, 2, 2, 2,
515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 1, 2, 3, 4,
528 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
529 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
530 25, 26, 27, 28, 29, 30, 31, 32, 33, 38,
535 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
537 static const yytype_uint16 yyprhs[] =
539 0, 0, 3, 4, 7, 10, 13, 14, 16, 18,
540 20, 22, 25, 29, 33, 37, 39, 41, 44, 47,
541 49, 51, 55, 59, 61, 64, 66, 69, 71, 73,
542 75, 77, 80, 84, 88, 92, 96, 99, 102, 104,
543 106, 109, 113, 117, 121, 123, 125, 128, 132, 136,
544 140, 144, 148, 151, 155, 159, 161, 164, 172, 176,
545 179, 183, 185, 187, 189, 191, 194, 195, 198, 201,
546 202, 204, 208, 210, 213, 217, 219, 223, 225, 228,
547 232, 234, 236, 238, 240, 242, 244, 246, 248, 250,
551 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
552 static const yytype_int8 yyrhs[] =
554 50, 0, -1, -1, 50, 51, -1, 52, 10, -1,
555 1, 10, -1, -1, 53, -1, 6, -1, 59, -1,
556 55, -1, 59, 55, -1, 9, 41, 60, -1, 9,
557 41, 62, -1, 9, 41, 64, -1, 4, -1, 54,
558 -1, 4, 5, -1, 54, 5, -1, 64, -1, 60,
559 -1, 42, 55, 43, -1, 55, 23, 65, -1, 6,
560 -1, 35, 6, -1, 7, -1, 35, 7, -1, 56,
561 -1, 57, -1, 8, -1, 9, -1, 33, 60, -1,
562 60, 32, 60, -1, 60, 31, 60, -1, 42, 60,
563 43, -1, 62, 28, 62, -1, 11, 59, -1, 11,
564 6, -1, 24, -1, 18, -1, 61, 19, -1, 61,
565 17, 70, -1, 61, 16, 70, -1, 61, 21, 65,
566 -1, 6, -1, 7, -1, 61, 16, -1, 61, 20,
567 65, -1, 62, 34, 62, -1, 62, 35, 62, -1,
568 62, 36, 62, -1, 62, 37, 62, -1, 35, 62,
569 -1, 62, 39, 62, -1, 42, 62, 43, -1, 59,
570 -1, 61, 17, -1, 44, 58, 45, 58, 45, 58,
571 46, -1, 42, 64, 43, -1, 22, 65, -1, 18,
572 27, 60, -1, 14, -1, 13, -1, 15, -1, 66,
573 -1, 66, 26, -1, -1, 66, 67, -1, 25, 68,
574 -1, -1, 69, -1, 47, 69, 48, -1, 72, -1,
575 69, 72, -1, 69, 45, 72, -1, 71, -1, 47,
576 71, 48, -1, 73, -1, 71, 73, -1, 71, 45,
577 73, -1, 60, -1, 64, -1, 62, -1, 63, -1,
578 74, -1, 56, -1, 57, -1, 59, -1, 74, -1,
579 56, 12, 56, -1, 56, 12, 57, -1, 57, 12,
583 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
584 static const yytype_uint16 yyrline[] =
586 0, 188, 188, 189, 198, 199, 219, 223, 224, 233,
587 243, 245, 247, 249, 251, 257, 258, 261, 262, 266,
588 267, 272, 273, 285, 286, 290, 291, 294, 295, 298,
589 299, 307, 313, 319, 331, 335, 343, 349, 357, 358,
590 362, 367, 372, 380, 392, 399, 409, 414, 422, 424,
591 426, 428, 430, 432, 434, 441, 448, 460, 465, 469,
592 477, 488, 492, 496, 505, 507, 512, 513, 518, 525,
593 526, 527, 531, 532, 534, 539, 540, 544, 545, 547,
594 551, 553, 555, 557, 559, 563, 568, 573, 578, 582,
599 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
600 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
601 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
602 static const char *const yytname[] =
604 "$end", "error", "$undefined", "INVALID", "HELP", "HELP_TOPIC",
605 "TOK_INT", "TOK_REAL", "STR", "IDENTIFIER", "CMD_SEP", "GROUP", "TO",
606 "VARIABLE_NUMERIC", "VARIABLE_GROUP", "VARIABLE_POS", "KEYWORD_NUMERIC",
607 "KEYWORD_STR", "KEYWORD_POS", "KEYWORD_GROUP", "METHOD_NUMERIC",
608 "METHOD_GROUP", "METHOD_POS", "MODIFIER", "EMPTY_POSMOD", "PARAM",
609 "END_OF_METHOD", "OF", "CMP_OP", "PARAM_REDUCT", "XOR", "OR", "AND",
610 "NOT", "'+'", "'-'", "'*'", "'/'", "UNARY_NEG", "'^'", "NUM_REDUCT",
611 "'='", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "$accept",
612 "commands", "command", "cmd_plain", "help_request", "help_topic",
613 "selection", "integer_number", "real_number", "number", "string",
614 "sel_expr", "pos_mod", "num_expr", "str_expr", "pos_expr",
615 "method_params", "method_param_list", "method_param", "value_list",
616 "value_list_contents", "basic_value_list", "basic_value_list_contents",
617 "value_item", "basic_value_item", "value_item_range", 0
622 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
624 static const yytype_uint16 yytoknum[] =
626 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
627 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
628 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
629 285, 286, 287, 288, 43, 45, 42, 47, 289, 94,
630 290, 61, 40, 41, 91, 44, 93, 123, 125
634 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
635 static const yytype_uint8 yyr1[] =
637 0, 49, 50, 50, 51, 51, 52, 52, 52, 52,
638 52, 52, 52, 52, 52, 53, 53, 54, 54, 55,
639 55, 55, 55, 56, 56, 57, 57, 58, 58, 59,
640 59, 60, 60, 60, 60, 60, 60, 60, 61, 61,
641 60, 60, 60, 60, 62, 62, 62, 62, 62, 62,
642 62, 62, 62, 62, 62, 63, 63, 64, 64, 64,
643 64, 60, 62, 64, 65, 65, 66, 66, 67, 68,
644 68, 68, 69, 69, 69, 70, 70, 71, 71, 71,
645 72, 72, 72, 72, 72, 73, 73, 73, 73, 74,
649 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
650 static const yytype_uint8 yyr2[] =
652 0, 2, 0, 2, 2, 2, 0, 1, 1, 1,
653 1, 2, 3, 3, 3, 1, 1, 2, 2, 1,
654 1, 3, 3, 1, 2, 1, 2, 1, 1, 1,
655 1, 2, 3, 3, 3, 3, 2, 2, 1, 1,
656 2, 3, 3, 3, 1, 1, 2, 3, 3, 3,
657 3, 3, 2, 3, 3, 1, 2, 7, 3, 2,
658 3, 1, 1, 1, 1, 2, 0, 2, 2, 0,
659 1, 3, 1, 2, 3, 1, 3, 1, 2, 3,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
664 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
665 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
666 means the default is an error. */
667 static const yytype_uint8 yydefact[] =
669 2, 0, 1, 0, 15, 44, 45, 29, 30, 0,
670 62, 61, 63, 39, 66, 38, 0, 0, 0, 0,
671 3, 0, 7, 16, 10, 9, 20, 0, 0, 19,
672 5, 17, 0, 37, 30, 36, 0, 59, 64, 44,
673 39, 0, 31, 0, 0, 52, 0, 20, 0, 19,
674 23, 25, 0, 27, 28, 0, 4, 18, 66, 11,
675 0, 0, 46, 0, 40, 66, 66, 0, 0, 0,
676 0, 0, 0, 0, 12, 13, 14, 60, 69, 65,
677 67, 0, 0, 46, 21, 34, 54, 58, 24, 26,
678 0, 22, 33, 32, 0, 85, 86, 87, 42, 75,
679 77, 88, 41, 47, 43, 35, 48, 49, 50, 51,
680 53, 0, 44, 45, 0, 0, 0, 0, 55, 80,
681 0, 82, 83, 81, 68, 70, 72, 84, 0, 0,
682 0, 0, 0, 78, 44, 45, 0, 56, 0, 73,
683 0, 76, 89, 90, 91, 79, 71, 74, 0, 57
686 /* YYDEFGOTO[NTERM-NUM]. */
687 static const yytype_int8 yydefgoto[] =
689 -1, 1, 20, 21, 22, 23, 24, 95, 96, 55,
690 97, 119, 27, 28, 122, 123, 37, 38, 80, 124,
691 125, 102, 99, 126, 100, 101
694 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
696 #define YYPACT_NINF -93
697 static const yytype_int16 yypact[] =
699 -93, 155, -93, 10, 19, 26, -93, -93, -3, 73,
700 -93, -93, -93, 22, -93, -93, 356, 372, 317, 11,
701 -93, 79, -93, 86, 70, 317, 29, 384, 180, -93,
702 -93, -93, 342, -93, -93, -93, 356, -93, 6, -93,
703 -93, 356, -93, 372, -10, 57, -20, -17, 256, 54,
704 -93, -93, 88, -93, -93, 55, -93, -93, -93, 70,
705 356, 356, 197, 174, -93, -93, -93, 372, 372, 372,
706 372, 372, 372, 342, 29, 180, -93, 29, 221, -93,
707 -93, -17, 223, -93, -93, -93, -93, -93, -93, -93,
708 11, -93, 69, -93, 78, 90, 94, -93, -93, 244,
709 -93, -93, -93, -93, -93, 267, 36, 36, 57, 57,
710 57, 54, 95, 96, 375, 303, 90, 94, -93, 29,
711 392, 267, -93, -93, -93, 263, -93, -93, 71, 35,
712 11, 11, 78, -93, 105, 106, 178, 174, 303, -93,
713 11, -93, -93, -93, -93, -93, -93, -93, 80, -93
716 /* YYPGOTO[NTERM-NUM]. */
717 static const yytype_int8 yypgoto[] =
719 -93, -93, -93, -93, -93, -93, -13, 0, 14, -81,
720 -1, 87, -4, -16, -93, 3, -36, -93, -93, -93,
721 12, 81, 39, -91, -92, -67
724 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
725 positive, shift that token. If negative, reduce the rule which
726 number is the opposite. If zero, do what YYDEFACT says.
727 If YYTABLE_NINF, syntax error. */
728 #define YYTABLE_NINF -27
729 static const yytype_int16 yytable[] =
731 25, 45, 48, 58, 29, 46, 83, 133, 35, 128,
732 65, 127, 59, 44, 60, 61, 75, 50, 51, 53,
733 30, 49, 91, 84, 31, 48, 85, 82, 29, 103,
734 104, 78, 79, 54, 139, 76, -8, 133, 32, 44,
735 145, 50, 51, 7, 34, 139, 52, 147, 127, 36,
736 144, 105, 106, 107, 108, 109, 110, 48, 127, 148,
737 60, 61, 121, 44, 44, 44, 44, 44, 44, 127,
738 52, 127, 70, 71, 120, 72, 111, 118, 116, 33,
739 132, 7, 34, 141, 50, 51, 7, 34, 26, 56,
740 53, 57, 117, 58, 88, 89, 72, 87, 45, 121,
741 90, 61, 130, 42, 54, 47, 131, -23, -25, 121,
742 44, 120, 26, 52, 118, 116, 140, -24, -26, 74,
743 121, 120, 121, 77, 118, 116, 149, 136, 81, 117,
744 142, 53, 120, 129, 120, 118, 116, 118, 116, 117,
745 53, 0, 0, 98, 143, 54, 0, 92, 93, 0,
746 117, 0, 117, 0, 54, 2, 3, 0, 0, 4,
747 81, 5, 6, 7, 8, -6, 9, 0, 10, 11,
748 12, 0, 0, 13, 0, 0, 0, 14, 0, 15,
749 50, 51, 7, 34, 112, 113, 7, 34, 16, 9,
750 17, 10, 11, 12, 0, 0, 13, 18, 0, 19,
751 14, 0, 15, 50, 51, 7, 34, 0, 67, 52,
752 0, 16, 0, 114, 68, 69, 70, 71, 0, 72,
753 73, 94, 19, 138, 0, 0, 146, 112, 113, 7,
754 34, 0, 9, 0, 10, 11, 12, 0, 0, 13,
755 0, 0, 0, 14, 94, 15, 0, 0, 0, 0,
756 50, 51, 7, 34, 16, 0, 114, 68, 69, 70,
757 71, 0, 72, 73, 0, 19, 86, 0, 115, 112,
758 113, 7, 34, 0, 9, 0, 10, 11, 12, 52,
759 0, 13, 0, 0, 67, 14, 0, 15, 0, 132,
760 68, 69, 70, 71, 0, 72, 16, 0, 114, 86,
761 0, 68, 69, 70, 71, 73, 72, 19, 138, 112,
762 113, 7, 34, 0, 9, 0, 10, 11, 12, 0,
763 0, 13, 0, 39, 6, 14, 0, 15, 9, 0,
764 10, 11, 12, 0, 0, 13, 16, 0, 114, 14,
765 0, 15, 0, 0, 0, 73, 0, 19, 39, 6,
766 16, 0, 17, 9, 0, 10, 11, 12, 0, 18,
767 13, 19, 39, 6, 14, 0, 15, 9, 0, 10,
768 11, 0, 0, 0, 40, 16, 0, 17, 39, 6,
769 15, 134, 135, 0, 73, 10, 19, 0, 10, 16,
770 40, 17, 0, 40, 0, 0, 15, 0, 41, 15,
771 62, 63, 0, 64, 65, 66, 0, 17, 62, 137,
772 17, 64, 65, 66, 43, 0, 0, 43
775 static const yytype_int16 yycheck[] =
777 1, 17, 18, 23, 1, 18, 16, 99, 9, 90,
778 20, 78, 25, 17, 31, 32, 32, 6, 7, 19,
779 10, 18, 58, 43, 5, 41, 43, 43, 25, 65,
780 66, 25, 26, 19, 125, 32, 10, 129, 41, 43,
781 132, 6, 7, 8, 9, 136, 35, 138, 115, 27,
782 131, 67, 68, 69, 70, 71, 72, 73, 125, 140,
783 31, 32, 78, 67, 68, 69, 70, 71, 72, 136,
784 35, 138, 36, 37, 78, 39, 73, 78, 78, 6,
785 45, 8, 9, 48, 6, 7, 8, 9, 1, 10,
786 90, 5, 78, 23, 6, 7, 39, 43, 114, 115,
787 45, 32, 12, 16, 90, 18, 12, 12, 12, 125,
788 114, 115, 25, 35, 115, 115, 45, 12, 12, 32,
789 136, 125, 138, 36, 125, 125, 46, 115, 41, 115,
790 130, 131, 136, 94, 138, 136, 136, 138, 138, 125,
791 140, -1, -1, 62, 130, 131, -1, 60, 61, -1,
792 136, -1, 138, -1, 140, 0, 1, -1, -1, 4,
793 73, 6, 7, 8, 9, 10, 11, -1, 13, 14,
794 15, -1, -1, 18, -1, -1, -1, 22, -1, 24,
795 6, 7, 8, 9, 6, 7, 8, 9, 33, 11,
796 35, 13, 14, 15, -1, -1, 18, 42, -1, 44,
797 22, -1, 24, 6, 7, 8, 9, -1, 28, 35,
798 -1, 33, -1, 35, 34, 35, 36, 37, -1, 39,
799 42, 47, 44, 45, -1, -1, 48, 6, 7, 8,
800 9, -1, 11, -1, 13, 14, 15, -1, -1, 18,
801 -1, -1, -1, 22, 47, 24, -1, -1, -1, -1,
802 6, 7, 8, 9, 33, -1, 35, 34, 35, 36,
803 37, -1, 39, 42, -1, 44, 43, -1, 47, 6,
804 7, 8, 9, -1, 11, -1, 13, 14, 15, 35,
805 -1, 18, -1, -1, 28, 22, -1, 24, -1, 45,
806 34, 35, 36, 37, -1, 39, 33, -1, 35, 43,
807 -1, 34, 35, 36, 37, 42, 39, 44, 45, 6,
808 7, 8, 9, -1, 11, -1, 13, 14, 15, -1,
809 -1, 18, -1, 6, 7, 22, -1, 24, 11, -1,
810 13, 14, 15, -1, -1, 18, 33, -1, 35, 22,
811 -1, 24, -1, -1, -1, 42, -1, 44, 6, 7,
812 33, -1, 35, 11, -1, 13, 14, 15, -1, 42,
813 18, 44, 6, 7, 22, -1, 24, 11, -1, 13,
814 14, -1, -1, -1, 18, 33, -1, 35, 6, 7,
815 24, 6, 7, -1, 42, 13, 44, -1, 13, 33,
816 18, 35, -1, 18, -1, -1, 24, -1, 42, 24,
817 16, 17, -1, 19, 20, 21, -1, 35, 16, 17,
818 35, 19, 20, 21, 42, -1, -1, 42
821 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
822 symbol of state STATE-NUM. */
823 static const yytype_uint8 yystos[] =
825 0, 50, 0, 1, 4, 6, 7, 8, 9, 11,
826 13, 14, 15, 18, 22, 24, 33, 35, 42, 44,
827 51, 52, 53, 54, 55, 59, 60, 61, 62, 64,
828 10, 5, 41, 6, 9, 59, 27, 65, 66, 6,
829 18, 42, 60, 42, 61, 62, 55, 60, 62, 64,
830 6, 7, 35, 56, 57, 58, 10, 5, 23, 55,
831 31, 32, 16, 17, 19, 20, 21, 28, 34, 35,
832 36, 37, 39, 42, 60, 62, 64, 60, 25, 26,
833 67, 60, 62, 16, 43, 43, 43, 43, 6, 7,
834 45, 65, 60, 60, 47, 56, 57, 59, 70, 71,
835 73, 74, 70, 65, 65, 62, 62, 62, 62, 62,
836 62, 64, 6, 7, 35, 47, 56, 57, 59, 60,
837 61, 62, 63, 64, 68, 69, 72, 74, 58, 71,
838 12, 12, 45, 73, 6, 7, 69, 17, 45, 72,
839 45, 48, 56, 57, 58, 73, 48, 72, 58, 46
842 #define yyerrok (yyerrstatus = 0)
843 #define yyclearin (yychar = YYEMPTY)
847 #define YYACCEPT goto yyacceptlab
848 #define YYABORT goto yyabortlab
849 #define YYERROR goto yyerrorlab
852 /* Like YYERROR except do call yyerror. This remains here temporarily
853 to ease the transition to the new meaning of YYERROR, for GCC.
854 Once GCC version 2 has supplanted version 1, this can go. */
856 #define YYFAIL goto yyerrlab
858 #define YYRECOVERING() (!!yyerrstatus)
860 #define YYBACKUP(Token, Value) \
862 if (yychar == YYEMPTY && yylen == 1) \
866 yytoken = YYTRANSLATE (yychar); \
872 yyerror (scanner, YY_("syntax error: cannot back up")); \
879 #define YYERRCODE 256
882 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
883 If N is 0, then set CURRENT to the empty location which ends
884 the previous symbol: RHS[0] (always defined). */
886 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
887 #ifndef YYLLOC_DEFAULT
888 # define YYLLOC_DEFAULT(Current, Rhs, N) \
892 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
893 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
894 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
895 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
899 (Current).first_line = (Current).last_line = \
900 YYRHSLOC (Rhs, 0).last_line; \
901 (Current).first_column = (Current).last_column = \
902 YYRHSLOC (Rhs, 0).last_column; \
908 /* YY_LOCATION_PRINT -- Print the location on the stream.
909 This macro was not mandated originally: define only if we know
910 we won't break user code: when these are the locations we know. */
912 #ifndef YY_LOCATION_PRINT
913 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
914 # define YY_LOCATION_PRINT(File, Loc) \
915 fprintf (File, "%d.%d-%d.%d", \
916 (Loc).first_line, (Loc).first_column, \
917 (Loc).last_line, (Loc).last_column)
919 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
924 /* YYLEX -- calling `yylex' with the right arguments. */
927 # define YYLEX yylex (&yylval, YYLEX_PARAM)
929 # define YYLEX yylex (&yylval, scanner)
932 /* Enable debugging if requested. */
936 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
937 # define YYFPRINTF fprintf
940 # define YYDPRINTF(Args) \
946 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
950 YYFPRINTF (stderr, "%s ", Title); \
951 yy_symbol_print (stderr, \
952 Type, Value, scanner); \
953 YYFPRINTF (stderr, "\n"); \
958 /*--------------------------------.
959 | Print this symbol on YYOUTPUT. |
960 `--------------------------------*/
963 #if (defined __STDC__ || defined __C99__FUNC__ \
964 || defined __cplusplus || defined _MSC_VER)
966 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner)
969 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
972 YYSTYPE const * const yyvaluep;
980 if (yytype < YYNTOKENS)
981 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
993 /*--------------------------------.
994 | Print this symbol on YYOUTPUT. |
995 `--------------------------------*/
997 #if (defined __STDC__ || defined __C99__FUNC__ \
998 || defined __cplusplus || defined _MSC_VER)
1000 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner)
1003 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
1006 YYSTYPE const * const yyvaluep;
1010 if (yytype < YYNTOKENS)
1011 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1013 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1015 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
1016 YYFPRINTF (yyoutput, ")");
1019 /*------------------------------------------------------------------.
1020 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1022 `------------------------------------------------------------------*/
1024 #if (defined __STDC__ || defined __C99__FUNC__ \
1025 || defined __cplusplus || defined _MSC_VER)
1027 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1030 yy_stack_print (bottom, top)
1031 yytype_int16 *bottom;
1035 YYFPRINTF (stderr, "Stack now");
1036 for (; bottom <= top; ++bottom)
1037 YYFPRINTF (stderr, " %d", *bottom);
1038 YYFPRINTF (stderr, "\n");
1041 # define YY_STACK_PRINT(Bottom, Top) \
1044 yy_stack_print ((Bottom), (Top)); \
1048 /*------------------------------------------------.
1049 | Report that the YYRULE is going to be reduced. |
1050 `------------------------------------------------*/
1052 #if (defined __STDC__ || defined __C99__FUNC__ \
1053 || defined __cplusplus || defined _MSC_VER)
1055 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, yyscan_t scanner)
1058 yy_reduce_print (yyvsp, yyrule, scanner)
1064 int yynrhs = yyr2[yyrule];
1066 unsigned long int yylno = yyrline[yyrule];
1067 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1069 /* The symbols being reduced. */
1070 for (yyi = 0; yyi < yynrhs; yyi++)
1072 fprintf (stderr, " $%d = ", yyi + 1);
1073 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1074 &(yyvsp[(yyi + 1) - (yynrhs)])
1076 fprintf (stderr, "\n");
1080 # define YY_REDUCE_PRINT(Rule) \
1083 yy_reduce_print (yyvsp, Rule, scanner); \
1086 /* Nonzero means print parse trace. It is left uninitialized so that
1087 multiple parsers can coexist. */
1089 #else /* !YYDEBUG */
1090 # define YYDPRINTF(Args)
1091 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1092 # define YY_STACK_PRINT(Bottom, Top)
1093 # define YY_REDUCE_PRINT(Rule)
1094 #endif /* !YYDEBUG */
1097 /* YYINITDEPTH -- initial size of the parser's stacks. */
1099 # define YYINITDEPTH 200
1102 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1103 if the built-in stack extension method is used).
1105 Do not make this value too large; the results are undefined if
1106 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1107 evaluated with infinite-precision integer arithmetic. */
1110 # define YYMAXDEPTH 10000
1118 # if defined __GLIBC__ && defined _STRING_H
1119 # define yystrlen strlen
1121 /* Return the length of YYSTR. */
1122 #if (defined __STDC__ || defined __C99__FUNC__ \
1123 || defined __cplusplus || defined _MSC_VER)
1125 yystrlen (const char *yystr)
1133 for (yylen = 0; yystr[yylen]; yylen++)
1141 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1142 # define yystpcpy stpcpy
1144 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1146 #if (defined __STDC__ || defined __C99__FUNC__ \
1147 || defined __cplusplus || defined _MSC_VER)
1149 yystpcpy (char *yydest, const char *yysrc)
1152 yystpcpy (yydest, yysrc)
1158 const char *yys = yysrc;
1160 while ((*yyd++ = *yys++) != '\0')
1169 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1170 quotes and backslashes, so that it's suitable for yyerror. The
1171 heuristic is that double-quoting is unnecessary unless the string
1172 contains an apostrophe, a comma, or backslash (other than
1173 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1174 null, do not copy; instead, return the length of what the result
1177 yytnamerr (char *yyres, const char *yystr)
1182 char const *yyp = yystr;
1189 goto do_not_strip_quotes;
1193 goto do_not_strip_quotes;
1206 do_not_strip_quotes: ;
1210 return yystrlen (yystr);
1212 return yystpcpy (yyres, yystr) - yyres;
1216 /* Copy into YYRESULT an error message about the unexpected token
1217 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1218 including the terminating null byte. If YYRESULT is null, do not
1219 copy anything; just return the number of bytes that would be
1220 copied. As a special case, return 0 if an ordinary "syntax error"
1221 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1222 size calculation. */
1224 yysyntax_error (char *yyresult, int yystate, int yychar)
1226 int yyn = yypact[yystate];
1228 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1232 int yytype = YYTRANSLATE (yychar);
1233 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1234 YYSIZE_T yysize = yysize0;
1236 int yysize_overflow = 0;
1237 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1238 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1242 /* This is so xgettext sees the translatable formats that are
1243 constructed on the fly. */
1244 YY_("syntax error, unexpected %s");
1245 YY_("syntax error, unexpected %s, expecting %s");
1246 YY_("syntax error, unexpected %s, expecting %s or %s");
1247 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1248 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1252 static char const yyunexpected[] = "syntax error, unexpected %s";
1253 static char const yyexpecting[] = ", expecting %s";
1254 static char const yyor[] = " or %s";
1255 char yyformat[sizeof yyunexpected
1256 + sizeof yyexpecting - 1
1257 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1258 * (sizeof yyor - 1))];
1259 char const *yyprefix = yyexpecting;
1261 /* Start YYX at -YYN if negative to avoid negative indexes in
1263 int yyxbegin = yyn < 0 ? -yyn : 0;
1265 /* Stay within bounds of both yycheck and yytname. */
1266 int yychecklim = YYLAST - yyn + 1;
1267 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1270 yyarg[0] = yytname[yytype];
1271 yyfmt = yystpcpy (yyformat, yyunexpected);
1273 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1274 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1276 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1280 yyformat[sizeof yyunexpected - 1] = '\0';
1283 yyarg[yycount++] = yytname[yyx];
1284 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1285 yysize_overflow |= (yysize1 < yysize);
1287 yyfmt = yystpcpy (yyfmt, yyprefix);
1291 yyf = YY_(yyformat);
1292 yysize1 = yysize + yystrlen (yyf);
1293 yysize_overflow |= (yysize1 < yysize);
1296 if (yysize_overflow)
1297 return YYSIZE_MAXIMUM;
1301 /* Avoid sprintf, as that infringes on the user's name space.
1302 Don't have undefined behavior even if the translation
1303 produced a string with the wrong number of "%s"s. */
1304 char *yyp = yyresult;
1306 while ((*yyp = *yyf) != '\0')
1308 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1310 yyp += yytnamerr (yyp, yyarg[yyi++]);
1323 #endif /* YYERROR_VERBOSE */
1326 /*-----------------------------------------------.
1327 | Release the memory associated to this symbol. |
1328 `-----------------------------------------------*/
1331 #if (defined __STDC__ || defined __C99__FUNC__ \
1332 || defined __cplusplus || defined _MSC_VER)
1334 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t scanner)
1337 yydestruct (yymsg, yytype, yyvaluep, scanner)
1349 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1353 case 5: /* "HELP_TOPIC" */
1354 #line 167 "parser.y"
1355 { free((yyvaluep->str)); };
1356 #line 1323 "parser.c"
1359 #line 167 "parser.y"
1360 { free((yyvaluep->str)); };
1361 #line 1328 "parser.c"
1363 case 9: /* "IDENTIFIER" */
1364 #line 167 "parser.y"
1365 { free((yyvaluep->str)); };
1366 #line 1333 "parser.c"
1368 case 25: /* "PARAM" */
1369 #line 168 "parser.y"
1370 { if((yyvaluep->str)) free((yyvaluep->str)); };
1371 #line 1338 "parser.c"
1373 case 28: /* "CMP_OP" */
1374 #line 167 "parser.y"
1375 { free((yyvaluep->str)); };
1376 #line 1343 "parser.c"
1378 case 51: /* "command" */
1379 #line 169 "parser.y"
1380 { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
1381 #line 1348 "parser.c"
1383 case 52: /* "cmd_plain" */
1384 #line 169 "parser.y"
1385 { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
1386 #line 1353 "parser.c"
1388 case 55: /* "selection" */
1389 #line 170 "parser.y"
1390 { _gmx_selelem_free_chain((yyvaluep->sel)); };
1391 #line 1358 "parser.c"
1393 case 59: /* "string" */
1394 #line 167 "parser.y"
1395 { free((yyvaluep->str)); };
1396 #line 1363 "parser.c"
1398 case 60: /* "sel_expr" */
1399 #line 171 "parser.y"
1400 { _gmx_selelem_free((yyvaluep->sel)); };
1401 #line 1368 "parser.c"
1403 case 62: /* "num_expr" */
1404 #line 171 "parser.y"
1405 { _gmx_selelem_free((yyvaluep->sel)); };
1406 #line 1373 "parser.c"
1408 case 63: /* "str_expr" */
1409 #line 171 "parser.y"
1410 { _gmx_selelem_free((yyvaluep->sel)); };
1411 #line 1378 "parser.c"
1413 case 64: /* "pos_expr" */
1414 #line 171 "parser.y"
1415 { _gmx_selelem_free((yyvaluep->sel)); };
1416 #line 1383 "parser.c"
1418 case 65: /* "method_params" */
1419 #line 172 "parser.y"
1420 { _gmx_selexpr_free_params((yyvaluep->param)); };
1421 #line 1388 "parser.c"
1423 case 66: /* "method_param_list" */
1424 #line 172 "parser.y"
1425 { _gmx_selexpr_free_params((yyvaluep->param)); };
1426 #line 1393 "parser.c"
1428 case 67: /* "method_param" */
1429 #line 172 "parser.y"
1430 { _gmx_selexpr_free_params((yyvaluep->param)); };
1431 #line 1398 "parser.c"
1433 case 68: /* "value_list" */
1434 #line 173 "parser.y"
1435 { _gmx_selexpr_free_values((yyvaluep->val)); };
1436 #line 1403 "parser.c"
1438 case 69: /* "value_list_contents" */
1439 #line 173 "parser.y"
1440 { _gmx_selexpr_free_values((yyvaluep->val)); };
1441 #line 1408 "parser.c"
1443 case 70: /* "basic_value_list" */
1444 #line 174 "parser.y"
1445 { _gmx_selexpr_free_values((yyvaluep->val)); };
1446 #line 1413 "parser.c"
1448 case 71: /* "basic_value_list_contents" */
1449 #line 174 "parser.y"
1450 { _gmx_selexpr_free_values((yyvaluep->val)); };
1451 #line 1418 "parser.c"
1453 case 72: /* "value_item" */
1454 #line 173 "parser.y"
1455 { _gmx_selexpr_free_values((yyvaluep->val)); };
1456 #line 1423 "parser.c"
1458 case 73: /* "basic_value_item" */
1459 #line 174 "parser.y"
1460 { _gmx_selexpr_free_values((yyvaluep->val)); };
1461 #line 1428 "parser.c"
1463 case 74: /* "value_item_range" */
1464 #line 173 "parser.y"
1465 { _gmx_selexpr_free_values((yyvaluep->val)); };
1466 #line 1433 "parser.c"
1475 /* Prevent warnings from -Wmissing-prototypes. */
1477 #ifdef YYPARSE_PARAM
1478 #if defined __STDC__ || defined __cplusplus
1479 int yyparse (void *YYPARSE_PARAM);
1483 #else /* ! YYPARSE_PARAM */
1484 #if defined __STDC__ || defined __cplusplus
1485 int yyparse (yyscan_t scanner);
1489 #endif /* ! YYPARSE_PARAM */
1500 #ifdef YYPARSE_PARAM
1501 #if (defined __STDC__ || defined __C99__FUNC__ \
1502 || defined __cplusplus || defined _MSC_VER)
1504 yyparse (void *YYPARSE_PARAM)
1507 yyparse (YYPARSE_PARAM)
1508 void *YYPARSE_PARAM;
1510 #else /* ! YYPARSE_PARAM */
1511 #if (defined __STDC__ || defined __C99__FUNC__ \
1512 || defined __cplusplus || defined _MSC_VER)
1514 yyparse (yyscan_t scanner)
1522 /* The look-ahead symbol. */
1525 /* The semantic value of the look-ahead symbol. */
1528 /* Number of syntax errors so far. */
1534 /* Number of tokens to shift before error messages enabled. */
1536 /* Look-ahead token as an internal (translated) token number. */
1539 /* Buffer for error messages, and its allocated size. */
1541 char *yymsg = yymsgbuf;
1542 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1545 /* Three stacks and their tools:
1546 `yyss': related to states,
1547 `yyvs': related to semantic values,
1548 `yyls': related to locations.
1550 Refer to the stacks thru separate pointers, to allow yyoverflow
1551 to reallocate them elsewhere. */
1553 /* The state stack. */
1554 yytype_int16 yyssa[YYINITDEPTH];
1555 yytype_int16 *yyss = yyssa;
1556 yytype_int16 *yyssp;
1558 /* The semantic value stack. */
1559 YYSTYPE yyvsa[YYINITDEPTH];
1560 YYSTYPE *yyvs = yyvsa;
1565 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1567 YYSIZE_T yystacksize = YYINITDEPTH;
1569 /* The variables used to return semantic value and location from the
1574 /* The number of symbols on the RHS of the reduced rule.
1575 Keep to zero when no symbol should be popped. */
1578 YYDPRINTF ((stderr, "Starting parse\n"));
1583 yychar = YYEMPTY; /* Cause a token to be read. */
1585 /* Initialize stack pointers.
1586 Waste one element of value and location stack
1587 so that they stay on the same level as the state stack.
1588 The wasted elements are never initialized. */
1595 /*------------------------------------------------------------.
1596 | yynewstate -- Push a new state, which is found in yystate. |
1597 `------------------------------------------------------------*/
1599 /* In all cases, when you get here, the value and location stacks
1600 have just been pushed. So pushing a state here evens the stacks. */
1606 if (yyss + yystacksize - 1 <= yyssp)
1608 /* Get the current used size of the three stacks, in elements. */
1609 YYSIZE_T yysize = yyssp - yyss + 1;
1613 /* Give user a chance to reallocate the stack. Use copies of
1614 these so that the &'s don't force the real ones into
1616 YYSTYPE *yyvs1 = yyvs;
1617 yytype_int16 *yyss1 = yyss;
1620 /* Each stack pointer address is followed by the size of the
1621 data in use in that stack, in bytes. This used to be a
1622 conditional around just the two extra args, but that might
1623 be undefined if yyoverflow is a macro. */
1624 yyoverflow (YY_("memory exhausted"),
1625 &yyss1, yysize * sizeof (*yyssp),
1626 &yyvs1, yysize * sizeof (*yyvsp),
1633 #else /* no yyoverflow */
1634 # ifndef YYSTACK_RELOCATE
1635 goto yyexhaustedlab;
1637 /* Extend the stack our own way. */
1638 if (YYMAXDEPTH <= yystacksize)
1639 goto yyexhaustedlab;
1641 if (YYMAXDEPTH < yystacksize)
1642 yystacksize = YYMAXDEPTH;
1645 yytype_int16 *yyss1 = yyss;
1646 union yyalloc *yyptr =
1647 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1649 goto yyexhaustedlab;
1650 YYSTACK_RELOCATE (yyss);
1651 YYSTACK_RELOCATE (yyvs);
1653 # undef YYSTACK_RELOCATE
1655 YYSTACK_FREE (yyss1);
1658 #endif /* no yyoverflow */
1660 yyssp = yyss + yysize - 1;
1661 yyvsp = yyvs + yysize - 1;
1664 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1665 (unsigned long int) yystacksize));
1667 if (yyss + yystacksize - 1 <= yyssp)
1671 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1680 /* Do appropriate processing given the current state. Read a
1681 look-ahead token if we need one and don't already have one. */
1683 /* First try to decide what to do without reference to look-ahead token. */
1684 yyn = yypact[yystate];
1685 if (yyn == YYPACT_NINF)
1688 /* Not known => get a look-ahead token if don't already have one. */
1690 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1691 if (yychar == YYEMPTY)
1693 YYDPRINTF ((stderr, "Reading a token: "));
1697 if (yychar <= YYEOF)
1699 yychar = yytoken = YYEOF;
1700 YYDPRINTF ((stderr, "Now at end of input.\n"));
1704 yytoken = YYTRANSLATE (yychar);
1705 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1708 /* If the proper action on seeing token YYTOKEN is to reduce or to
1709 detect an error, take that action. */
1711 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1716 if (yyn == 0 || yyn == YYTABLE_NINF)
1725 /* Count tokens shifted since error; after three, turn off error
1730 /* Shift the look-ahead token. */
1731 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1733 /* Discard the shifted token unless it is eof. */
1734 if (yychar != YYEOF)
1743 /*-----------------------------------------------------------.
1744 | yydefault -- do the default action for the current state. |
1745 `-----------------------------------------------------------*/
1747 yyn = yydefact[yystate];
1753 /*-----------------------------.
1754 | yyreduce -- Do a reduction. |
1755 `-----------------------------*/
1757 /* yyn is the number of a rule to reduce with. */
1760 /* If YYLEN is nonzero, implement the default value of the action:
1763 Otherwise, the following line sets YYVAL to garbage.
1764 This behavior is undocumented and Bison
1765 users should not rely upon it. Assigning to YYVAL
1766 unconditionally makes the parser a bit smaller, and it avoids a
1767 GCC warning that YYVAL may be used uninitialized. */
1768 yyval = yyvsp[1-yylen];
1771 YY_REDUCE_PRINT (yyn);
1775 #line 188 "parser.y"
1776 { (yyval.sel) = NULL ;}
1780 #line 190 "parser.y"
1782 (yyval.sel) = _gmx_sel_append_selection((yyvsp[(2) - (2)].sel), (yyvsp[(1) - (2)].sel), scanner);
1783 if (_gmx_sel_parser_should_finish(scanner))
1789 #line 198 "parser.y"
1790 { (yyval.sel) = (yyvsp[(1) - (2)].sel); ;}
1794 #line 200 "parser.y"
1797 _gmx_selparser_error("invalid selection '%s'",
1798 _gmx_sel_lexer_pselstr(scanner));
1799 _gmx_sel_lexer_clear_method_stack(scanner);
1800 if (_gmx_sel_is_lexer_interactive(scanner))
1802 _gmx_sel_lexer_clear_pselstr(scanner);
1813 #line 219 "parser.y"
1816 _gmx_sel_handle_empty_cmd(scanner);
1821 #line 223 "parser.y"
1822 { (yyval.sel) = NULL; ;}
1826 #line 225 "parser.y"
1829 s = _gmx_sel_init_group_by_id((yyvsp[(1) - (1)].i), scanner);
1830 if (s == NULL) YYERROR;
1831 p = _gmx_sel_init_position(s, NULL, scanner);
1832 if (p == NULL) YYERROR;
1833 (yyval.sel) = _gmx_sel_init_selection(strdup(s->name), p, scanner);
1838 #line 234 "parser.y"
1841 s = _gmx_sel_init_group_by_name((yyvsp[(1) - (1)].str), scanner);
1842 free((yyvsp[(1) - (1)].str));
1843 if (s == NULL) YYERROR;
1844 p = _gmx_sel_init_position(s, NULL, scanner);
1845 if (p == NULL) YYERROR;
1846 (yyval.sel) = _gmx_sel_init_selection(strdup(s->name), p, scanner);
1851 #line 244 "parser.y"
1852 { (yyval.sel) = _gmx_sel_init_selection(NULL, (yyvsp[(1) - (1)].sel), scanner); ;}
1856 #line 246 "parser.y"
1857 { (yyval.sel) = _gmx_sel_init_selection((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].sel), scanner); ;}
1861 #line 248 "parser.y"
1862 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1866 #line 250 "parser.y"
1867 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1871 #line 252 "parser.y"
1872 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1876 #line 257 "parser.y"
1877 { _gmx_sel_handle_help_cmd(NULL, scanner); ;}
1881 #line 261 "parser.y"
1882 { _gmx_sel_handle_help_cmd((yyvsp[(2) - (2)].str), scanner); ;}
1886 #line 262 "parser.y"
1887 { _gmx_sel_handle_help_cmd((yyvsp[(2) - (2)].str), scanner); ;}
1891 #line 266 "parser.y"
1892 { (yyval.sel) = (yyvsp[(1) - (1)].sel); ;}
1896 #line 268 "parser.y"
1898 (yyval.sel) = _gmx_sel_init_position((yyvsp[(1) - (1)].sel), NULL, scanner);
1899 if ((yyval.sel) == NULL) YYERROR;
1904 #line 272 "parser.y"
1905 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
1909 #line 274 "parser.y"
1911 (yyval.sel) = _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].sel), scanner);
1912 if ((yyval.sel) == NULL) YYERROR;
1917 #line 285 "parser.y"
1918 { (yyval.r) = (yyvsp[(1) - (1)].i); ;}
1922 #line 286 "parser.y"
1923 { (yyval.r) = -(yyvsp[(2) - (2)].i); ;}
1927 #line 290 "parser.y"
1928 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1932 #line 291 "parser.y"
1933 { (yyval.r) = -(yyvsp[(2) - (2)].r); ;}
1937 #line 294 "parser.y"
1938 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1942 #line 295 "parser.y"
1943 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1947 #line 298 "parser.y"
1948 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
1952 #line 299 "parser.y"
1953 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
1957 #line 308 "parser.y"
1959 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1960 (yyval.sel)->u.boolt = BOOL_NOT;
1961 (yyval.sel)->child = (yyvsp[(2) - (2)].sel);
1966 #line 314 "parser.y"
1968 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1969 (yyval.sel)->u.boolt = BOOL_AND;
1970 (yyval.sel)->child = (yyvsp[(1) - (3)].sel); (yyval.sel)->child->next = (yyvsp[(3) - (3)].sel);
1975 #line 320 "parser.y"
1977 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1978 (yyval.sel)->u.boolt = BOOL_OR;
1979 (yyval.sel)->child = (yyvsp[(1) - (3)].sel); (yyval.sel)->child->next = (yyvsp[(3) - (3)].sel);
1984 #line 331 "parser.y"
1985 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
1989 #line 336 "parser.y"
1991 (yyval.sel) = _gmx_sel_init_comparison((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), (yyvsp[(2) - (3)].str), scanner);
1992 if ((yyval.sel) == NULL) YYERROR;
1997 #line 344 "parser.y"
1999 (yyval.sel) = _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner);
2000 free((yyvsp[(2) - (2)].str));
2001 if ((yyval.sel) == NULL) YYERROR;
2006 #line 350 "parser.y"
2008 (yyval.sel) = _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner);
2009 if ((yyval.sel) == NULL) YYERROR;
2014 #line 357 "parser.y"
2015 { (yyval.str) = NULL; ;}
2019 #line 358 "parser.y"
2020 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
2024 #line 363 "parser.y"
2026 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
2027 if ((yyval.sel) == NULL) YYERROR;
2032 #line 368 "parser.y"
2034 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
2035 if ((yyval.sel) == NULL) YYERROR;
2040 #line 373 "parser.y"
2042 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
2043 if ((yyval.sel) == NULL) YYERROR;
2048 #line 381 "parser.y"
2050 (yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
2051 if ((yyval.sel) == NULL) YYERROR;
2056 #line 393 "parser.y"
2058 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2059 _gmx_selelem_set_vtype((yyval.sel), INT_VALUE);
2060 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2061 (yyval.sel)->v.u.i[0] = (yyvsp[(1) - (1)].i);
2066 #line 400 "parser.y"
2068 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2069 _gmx_selelem_set_vtype((yyval.sel), REAL_VALUE);
2070 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2071 (yyval.sel)->v.u.r[0] = (yyvsp[(1) - (1)].r);
2076 #line 410 "parser.y"
2078 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
2079 if ((yyval.sel) == NULL) YYERROR;
2084 #line 415 "parser.y"
2086 (yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
2087 if ((yyval.sel) == NULL) YYERROR;
2092 #line 423 "parser.y"
2093 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '+', scanner); ;}
2097 #line 425 "parser.y"
2098 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '-', scanner); ;}
2102 #line 427 "parser.y"
2103 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '*', scanner); ;}
2107 #line 429 "parser.y"
2108 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '/', scanner); ;}
2112 #line 431 "parser.y"
2113 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(2) - (2)].sel), NULL, '-', scanner); ;}
2117 #line 433 "parser.y"
2118 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '^', scanner); ;}
2122 #line 434 "parser.y"
2123 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
2127 #line 442 "parser.y"
2129 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2130 _gmx_selelem_set_vtype((yyval.sel), STR_VALUE);
2131 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2132 (yyval.sel)->v.u.s[0] = (yyvsp[(1) - (1)].str);
2137 #line 449 "parser.y"
2139 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
2140 if ((yyval.sel) == NULL) YYERROR;
2145 #line 461 "parser.y"
2146 { (yyval.sel) = _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r)); ;}
2150 #line 465 "parser.y"
2151 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
2155 #line 470 "parser.y"
2157 (yyval.sel) = _gmx_sel_init_method((yyvsp[(1) - (2)].meth), (yyvsp[(2) - (2)].param), NULL, scanner);
2158 if ((yyval.sel) == NULL) YYERROR;
2163 #line 478 "parser.y"
2165 (yyval.sel) = _gmx_sel_init_position((yyvsp[(3) - (3)].sel), (yyvsp[(1) - (3)].str), scanner);
2166 if ((yyval.sel) == NULL) YYERROR;
2171 #line 489 "parser.y"
2172 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2176 #line 493 "parser.y"
2177 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2181 #line 497 "parser.y"
2182 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2186 #line 506 "parser.y"
2187 { (yyval.param) = process_param_list((yyvsp[(1) - (1)].param)); ;}
2191 #line 508 "parser.y"
2192 { (yyval.param) = process_param_list((yyvsp[(1) - (2)].param)); ;}
2196 #line 512 "parser.y"
2197 { (yyval.param) = NULL; ;}
2201 #line 514 "parser.y"
2202 { (yyvsp[(2) - (2)].param)->next = (yyvsp[(1) - (2)].param); (yyval.param) = (yyvsp[(2) - (2)].param); ;}
2206 #line 519 "parser.y"
2208 (yyval.param) = _gmx_selexpr_create_param((yyvsp[(1) - (2)].str));
2209 (yyval.param)->value = process_value_list((yyvsp[(2) - (2)].val), &(yyval.param)->nval);
2214 #line 525 "parser.y"
2215 { (yyval.val) = NULL; ;}
2219 #line 526 "parser.y"
2220 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2224 #line 527 "parser.y"
2225 { (yyval.val) = (yyvsp[(2) - (3)].val); ;}
2229 #line 531 "parser.y"
2230 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2234 #line 533 "parser.y"
2235 { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); ;}
2239 #line 535 "parser.y"
2240 { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); ;}
2244 #line 539 "parser.y"
2245 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2249 #line 540 "parser.y"
2250 { (yyval.val) = (yyvsp[(2) - (3)].val); ;}
2254 #line 544 "parser.y"
2255 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2259 #line 546 "parser.y"
2260 { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); ;}
2264 #line 548 "parser.y"
2265 { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); ;}
2269 #line 552 "parser.y"
2270 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2274 #line 554 "parser.y"
2275 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2279 #line 556 "parser.y"
2280 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2284 #line 558 "parser.y"
2285 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2289 #line 559 "parser.y"
2290 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2294 #line 564 "parser.y"
2296 (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
2297 (yyval.val)->u.i.i1 = (yyval.val)->u.i.i2 = (yyvsp[(1) - (1)].r);
2302 #line 569 "parser.y"
2304 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2305 (yyval.val)->u.r.r1 = (yyval.val)->u.r.r2 = (yyvsp[(1) - (1)].r);
2310 #line 574 "parser.y"
2312 (yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
2313 (yyval.val)->u.s = (yyvsp[(1) - (1)].str);
2318 #line 578 "parser.y"
2319 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2323 #line 583 "parser.y"
2325 (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
2326 (yyval.val)->u.i.i1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.i.i2 = (yyvsp[(3) - (3)].r);
2331 #line 588 "parser.y"
2333 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2334 (yyval.val)->u.r.r1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.r.r2 = (yyvsp[(3) - (3)].r);
2339 #line 593 "parser.y"
2341 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2342 (yyval.val)->u.r.r1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.r.r2 = (yyvsp[(3) - (3)].r);
2347 /* Line 1267 of yacc.c. */
2348 #line 2315 "parser.c"
2351 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2355 YY_STACK_PRINT (yyss, yyssp);
2360 /* Now `shift' the result of the reduction. Determine what state
2361 that goes to, based on the state we popped back to and the rule
2362 number reduced by. */
2366 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2367 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2368 yystate = yytable[yystate];
2370 yystate = yydefgoto[yyn - YYNTOKENS];
2375 /*------------------------------------.
2376 | yyerrlab -- here on detecting error |
2377 `------------------------------------*/
2379 /* If not already recovering from an error, report this error. */
2383 #if ! YYERROR_VERBOSE
2384 yyerror (scanner, YY_("syntax error"));
2387 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2388 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2390 YYSIZE_T yyalloc = 2 * yysize;
2391 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2392 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2393 if (yymsg != yymsgbuf)
2394 YYSTACK_FREE (yymsg);
2395 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2397 yymsg_alloc = yyalloc;
2401 yymsg_alloc = sizeof yymsgbuf;
2405 if (0 < yysize && yysize <= yymsg_alloc)
2407 (void) yysyntax_error (yymsg, yystate, yychar);
2408 yyerror (scanner, yymsg);
2412 yyerror (scanner, YY_("syntax error"));
2414 goto yyexhaustedlab;
2422 if (yyerrstatus == 3)
2424 /* If just tried and failed to reuse look-ahead token after an
2425 error, discard it. */
2427 if (yychar <= YYEOF)
2429 /* Return failure if at end of input. */
2430 if (yychar == YYEOF)
2435 yydestruct ("Error: discarding",
2436 yytoken, &yylval, scanner);
2441 /* Else will try to reuse look-ahead token after shifting the error
2446 /*---------------------------------------------------.
2447 | yyerrorlab -- error raised explicitly by YYERROR. |
2448 `---------------------------------------------------*/
2451 /* Pacify compilers like GCC when the user code never invokes
2452 YYERROR and the label yyerrorlab therefore never appears in user
2454 if (/*CONSTCOND*/ 0)
2457 /* Do not reclaim the symbols of the rule which action triggered
2461 YY_STACK_PRINT (yyss, yyssp);
2466 /*-------------------------------------------------------------.
2467 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2468 `-------------------------------------------------------------*/
2470 yyerrstatus = 3; /* Each real token shifted decrements this. */
2474 yyn = yypact[yystate];
2475 if (yyn != YYPACT_NINF)
2478 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2486 /* Pop the current state because it cannot handle the error token. */
2491 yydestruct ("Error: popping",
2492 yystos[yystate], yyvsp, scanner);
2495 YY_STACK_PRINT (yyss, yyssp);
2504 /* Shift the error token. */
2505 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2511 /*-------------------------------------.
2512 | yyacceptlab -- YYACCEPT comes here. |
2513 `-------------------------------------*/
2518 /*-----------------------------------.
2519 | yyabortlab -- YYABORT comes here. |
2520 `-----------------------------------*/
2526 /*-------------------------------------------------.
2527 | yyexhaustedlab -- memory exhaustion comes here. |
2528 `-------------------------------------------------*/
2530 yyerror (scanner, YY_("memory exhausted"));
2536 if (yychar != YYEOF && yychar != YYEMPTY)
2537 yydestruct ("Cleanup: discarding lookahead",
2538 yytoken, &yylval, scanner);
2539 /* Do not reclaim the symbols of the rule which action triggered
2540 this YYABORT or YYACCEPT. */
2542 YY_STACK_PRINT (yyss, yyssp);
2543 while (yyssp != yyss)
2545 yydestruct ("Cleanup: popping",
2546 yystos[*yyssp], yyvsp, scanner);
2551 YYSTACK_FREE (yyss);
2554 if (yymsg != yymsgbuf)
2555 YYSTACK_FREE (yymsg);
2557 /* Make sure YYID is used. */
2558 return YYID (yyresult);
2562 #line 599 "parser.y"
2565 static t_selexpr_value *
2566 process_value_list(t_selexpr_value *values, int *nr)
2568 t_selexpr_value *val, *pval, *nval;
2570 /* Count values (if needed) and reverse list */
2593 static t_selexpr_param *
2594 process_param_list(t_selexpr_param *params)
2596 t_selexpr_param *par, *ppar, *npar;
2614 yyerror(yyscan_t scanner, char const *s)
2616 _gmx_selparser_error("%s", s);