1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
61 /* Substitute the variable and function names. */
62 #define yyparse _gmx_sel_yybparse
63 #define yylex _gmx_sel_yyblex
64 #define yyerror _gmx_sel_yyberror
65 #define yylval _gmx_sel_yyblval
66 #define yychar _gmx_sel_yybchar
67 #define yydebug _gmx_sel_yybdebug
68 #define yynerrs _gmx_sel_yybnerrs
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
87 VARIABLE_NUMERIC = 268,
90 KEYWORD_NUMERIC = 271,
115 #define HELP_TOPIC 260
119 #define IDENTIFIER 264
123 #define VARIABLE_NUMERIC 268
124 #define VARIABLE_GROUP 269
125 #define VARIABLE_POS 270
126 #define KEYWORD_NUMERIC 271
127 #define KEYWORD_STR 272
128 #define KEYWORD_POS 273
129 #define KEYWORD_GROUP 274
130 #define METHOD_NUMERIC 275
131 #define METHOD_GROUP 276
132 #define METHOD_POS 277
134 #define EMPTY_POSMOD 279
136 #define END_OF_METHOD 281
139 #define PARAM_REDUCT 284
144 #define UNARY_NEG 289
145 #define NUM_REDUCT 290
150 /* Copy the first part of user declarations. */
153 /*! \internal \file parser.cpp
154 * \brief Generated (from parser.y by Bison) parser for the selection language.
156 * \ingroup module_selection
158 /*! \internal \file parser.h
159 * \brief Generated (from parser.y by Bison) parser include file.
161 * \ingroup module_selection
170 #include "parsetree.h"
175 static t_selexpr_value *
176 process_value_list(t_selexpr_value *values, int *nr);
177 static t_selexpr_param *
178 process_param_list(t_selexpr_param *params);
181 yyerror(yyscan_t, char const *s);
184 /* Enabling traces. */
189 /* Enabling verbose error messages. */
190 #ifdef YYERROR_VERBOSE
191 # undef YYERROR_VERBOSE
192 # define YYERROR_VERBOSE 1
194 # define YYERROR_VERBOSE 0
197 /* Enabling the token table. */
198 #ifndef YYTOKEN_TABLE
199 # define YYTOKEN_TABLE 0
202 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
203 typedef union YYSTYPE
209 struct gmx_ana_selmethod_t *meth;
211 struct t_selelem *sel;
213 struct t_selexpr_value *val;
214 struct t_selexpr_param *param;
216 /* Line 187 of yacc.c. */
217 #line 218 "parser.cpp"
219 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
220 # define YYSTYPE_IS_DECLARED 1
221 # define YYSTYPE_IS_TRIVIAL 1
226 /* Copy the second part of user declarations. */
229 /* Line 216 of yacc.c. */
230 #line 231 "parser.cpp"
237 typedef YYTYPE_UINT8 yytype_uint8;
239 typedef unsigned char yytype_uint8;
243 typedef YYTYPE_INT8 yytype_int8;
244 #elif (defined __STDC__ || defined __C99__FUNC__ \
245 || defined __cplusplus || defined _MSC_VER)
246 typedef signed char yytype_int8;
248 typedef short int yytype_int8;
252 typedef YYTYPE_UINT16 yytype_uint16;
254 typedef unsigned short int yytype_uint16;
258 typedef YYTYPE_INT16 yytype_int16;
260 typedef short int yytype_int16;
264 # ifdef __SIZE_TYPE__
265 # define YYSIZE_T __SIZE_TYPE__
266 # elif defined size_t
267 # define YYSIZE_T size_t
268 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
269 || defined __cplusplus || defined _MSC_VER)
270 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
271 # define YYSIZE_T size_t
273 # define YYSIZE_T unsigned int
277 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
282 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
283 # define YY_(msgid) dgettext ("bison-runtime", msgid)
287 # define YY_(msgid) msgid
291 /* Suppress unused-variable warnings by "using" E. */
292 #if ! defined lint || defined __GNUC__
293 # define YYUSE(e) ((void) (e))
295 # define YYUSE(e) /* empty */
298 /* Identity function, used to suppress warnings about constant conditions. */
302 #if (defined __STDC__ || defined __C99__FUNC__ \
303 || defined __cplusplus || defined _MSC_VER)
316 #if ! defined yyoverflow || YYERROR_VERBOSE
318 /* The parser invokes alloca or malloc; define the necessary symbols. */
320 # ifdef YYSTACK_USE_ALLOCA
321 # if YYSTACK_USE_ALLOCA
323 # define YYSTACK_ALLOC __builtin_alloca
324 # elif defined __BUILTIN_VA_ARG_INCR
325 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
327 # define YYSTACK_ALLOC __alloca
328 # elif defined _MSC_VER
329 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
330 # define alloca _alloca
332 # define YYSTACK_ALLOC alloca
333 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
334 || defined __cplusplus || defined _MSC_VER)
335 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
344 # ifdef YYSTACK_ALLOC
345 /* Pacify GCC's `empty if-body' warning. */
346 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
347 # ifndef YYSTACK_ALLOC_MAXIMUM
348 /* The OS might guarantee only one guard page at the bottom of the stack,
349 and a page size can be as small as 4096 bytes. So we cannot safely
350 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
351 to allow for a few compiler-allocated temporary stack slots. */
352 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
355 # define YYSTACK_ALLOC YYMALLOC
356 # define YYSTACK_FREE YYFREE
357 # ifndef YYSTACK_ALLOC_MAXIMUM
358 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
360 # if (defined __cplusplus && ! defined _STDLIB_H \
361 && ! ((defined YYMALLOC || defined malloc) \
362 && (defined YYFREE || defined free)))
363 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
369 # define YYMALLOC malloc
370 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
371 || defined __cplusplus || defined _MSC_VER)
372 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
377 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
378 || defined __cplusplus || defined _MSC_VER)
379 void free (void *); /* INFRINGES ON USER NAME SPACE */
383 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
386 #if (! defined yyoverflow \
387 && (! defined __cplusplus \
388 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
390 /* A type that is properly aligned for any stack member. */
397 /* The size of the maximum gap between one aligned stack and the next. */
398 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
400 /* The size of an array large to enough to hold all stacks, each with
402 # define YYSTACK_BYTES(N) \
403 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
404 + YYSTACK_GAP_MAXIMUM)
406 /* Copy COUNT objects from FROM to TO. The source and destination do
409 # if defined __GNUC__ && 1 < __GNUC__
410 # define YYCOPY(To, From, Count) \
411 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
413 # define YYCOPY(To, From, Count) \
417 for (yyi = 0; yyi < (Count); yyi++) \
418 (To)[yyi] = (From)[yyi]; \
424 /* Relocate STACK from its old location to the new one. The
425 local variables YYSIZE and YYSTACKSIZE give the old and new number of
426 elements in the stack, and YYPTR gives the new location of the
427 stack. Advance YYPTR to a properly aligned location for the next
429 # define YYSTACK_RELOCATE(Stack) \
432 YYSIZE_T yynewbytes; \
433 YYCOPY (&yyptr->Stack, Stack, yysize); \
434 Stack = &yyptr->Stack; \
435 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
436 yyptr += yynewbytes / sizeof (*yyptr); \
442 /* YYFINAL -- State number of the termination state. */
444 /* YYLAST -- Last index in YYTABLE. */
447 /* YYNTOKENS -- Number of terminals. */
449 /* YYNNTS -- Number of nonterminals. */
451 /* YYNRULES -- Number of rules. */
453 /* YYNRULES -- Number of states. */
454 #define YYNSTATES 150
456 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
458 #define YYMAXUTOK 290
460 #define YYTRANSLATE(YYX) \
461 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
463 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
464 static const yytype_uint8 yytranslate[] =
466 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 42, 43, 36, 34, 45, 35, 2, 37, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 41, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 44, 2, 46, 39, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 47, 2, 48, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
492 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
493 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
494 25, 26, 27, 28, 29, 30, 31, 32, 33, 38,
499 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
501 static const yytype_uint16 yyprhs[] =
503 0, 0, 3, 4, 7, 10, 13, 14, 16, 18,
504 20, 22, 25, 29, 33, 37, 39, 41, 44, 47,
505 49, 51, 55, 59, 61, 64, 66, 69, 71, 73,
506 75, 77, 80, 84, 88, 92, 96, 99, 102, 104,
507 106, 109, 113, 117, 121, 123, 125, 128, 132, 136,
508 140, 144, 148, 151, 155, 159, 161, 164, 172, 176,
509 179, 183, 185, 187, 189, 191, 194, 195, 198, 201,
510 202, 204, 208, 210, 213, 217, 219, 223, 225, 228,
511 232, 234, 236, 238, 240, 242, 244, 246, 248, 250,
515 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
516 static const yytype_int8 yyrhs[] =
518 50, 0, -1, -1, 50, 51, -1, 52, 10, -1,
519 1, 10, -1, -1, 53, -1, 6, -1, 59, -1,
520 55, -1, 59, 55, -1, 9, 41, 60, -1, 9,
521 41, 62, -1, 9, 41, 64, -1, 4, -1, 54,
522 -1, 4, 5, -1, 54, 5, -1, 64, -1, 60,
523 -1, 42, 55, 43, -1, 55, 23, 65, -1, 6,
524 -1, 35, 6, -1, 7, -1, 35, 7, -1, 56,
525 -1, 57, -1, 8, -1, 9, -1, 33, 60, -1,
526 60, 32, 60, -1, 60, 31, 60, -1, 42, 60,
527 43, -1, 62, 28, 62, -1, 11, 59, -1, 11,
528 6, -1, 24, -1, 18, -1, 61, 19, -1, 61,
529 17, 70, -1, 61, 16, 70, -1, 61, 21, 65,
530 -1, 6, -1, 7, -1, 61, 16, -1, 61, 20,
531 65, -1, 62, 34, 62, -1, 62, 35, 62, -1,
532 62, 36, 62, -1, 62, 37, 62, -1, 35, 62,
533 -1, 62, 39, 62, -1, 42, 62, 43, -1, 59,
534 -1, 61, 17, -1, 44, 58, 45, 58, 45, 58,
535 46, -1, 42, 64, 43, -1, 22, 65, -1, 18,
536 27, 60, -1, 14, -1, 13, -1, 15, -1, 66,
537 -1, 66, 26, -1, -1, 66, 67, -1, 25, 68,
538 -1, -1, 69, -1, 47, 69, 48, -1, 72, -1,
539 69, 72, -1, 69, 45, 72, -1, 71, -1, 47,
540 71, 48, -1, 73, -1, 71, 73, -1, 71, 45,
541 73, -1, 60, -1, 64, -1, 62, -1, 63, -1,
542 74, -1, 56, -1, 57, -1, 59, -1, 74, -1,
543 56, 12, 56, -1, 56, 12, 57, -1, 57, 12,
547 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
548 static const yytype_uint16 yyrline[] =
550 0, 189, 189, 190, 199, 200, 220, 224, 225, 234,
551 244, 246, 248, 250, 252, 258, 259, 262, 263, 267,
552 268, 273, 274, 286, 287, 291, 292, 295, 296, 299,
553 300, 308, 314, 320, 332, 336, 344, 350, 358, 359,
554 363, 368, 373, 381, 393, 400, 410, 415, 423, 425,
555 427, 429, 431, 433, 435, 442, 449, 461, 466, 470,
556 478, 489, 493, 497, 506, 508, 513, 514, 519, 526,
557 527, 528, 532, 533, 535, 540, 541, 545, 546, 548,
558 552, 554, 556, 558, 560, 564, 569, 574, 579, 583,
563 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
564 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
565 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
566 static const char *const yytname[] =
568 "$end", "error", "$undefined", "INVALID", "HELP", "HELP_TOPIC",
569 "TOK_INT", "TOK_REAL", "STR", "IDENTIFIER", "CMD_SEP", "GROUP", "TO",
570 "VARIABLE_NUMERIC", "VARIABLE_GROUP", "VARIABLE_POS", "KEYWORD_NUMERIC",
571 "KEYWORD_STR", "KEYWORD_POS", "KEYWORD_GROUP", "METHOD_NUMERIC",
572 "METHOD_GROUP", "METHOD_POS", "MODIFIER", "EMPTY_POSMOD", "PARAM",
573 "END_OF_METHOD", "OF", "CMP_OP", "PARAM_REDUCT", "XOR", "OR", "AND",
574 "NOT", "'+'", "'-'", "'*'", "'/'", "UNARY_NEG", "'^'", "NUM_REDUCT",
575 "'='", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "$accept",
576 "commands", "command", "cmd_plain", "help_request", "help_topic",
577 "selection", "integer_number", "real_number", "number", "string",
578 "sel_expr", "pos_mod", "num_expr", "str_expr", "pos_expr",
579 "method_params", "method_param_list", "method_param", "value_list",
580 "value_list_contents", "basic_value_list", "basic_value_list_contents",
581 "value_item", "basic_value_item", "value_item_range", 0
586 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
588 static const yytype_uint16 yytoknum[] =
590 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
591 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
592 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
593 285, 286, 287, 288, 43, 45, 42, 47, 289, 94,
594 290, 61, 40, 41, 91, 44, 93, 123, 125
598 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
599 static const yytype_uint8 yyr1[] =
601 0, 49, 50, 50, 51, 51, 52, 52, 52, 52,
602 52, 52, 52, 52, 52, 53, 53, 54, 54, 55,
603 55, 55, 55, 56, 56, 57, 57, 58, 58, 59,
604 59, 60, 60, 60, 60, 60, 60, 60, 61, 61,
605 60, 60, 60, 60, 62, 62, 62, 62, 62, 62,
606 62, 62, 62, 62, 62, 63, 63, 64, 64, 64,
607 64, 60, 62, 64, 65, 65, 66, 66, 67, 68,
608 68, 68, 69, 69, 69, 70, 70, 71, 71, 71,
609 72, 72, 72, 72, 72, 73, 73, 73, 73, 74,
613 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
614 static const yytype_uint8 yyr2[] =
616 0, 2, 0, 2, 2, 2, 0, 1, 1, 1,
617 1, 2, 3, 3, 3, 1, 1, 2, 2, 1,
618 1, 3, 3, 1, 2, 1, 2, 1, 1, 1,
619 1, 2, 3, 3, 3, 3, 2, 2, 1, 1,
620 2, 3, 3, 3, 1, 1, 2, 3, 3, 3,
621 3, 3, 2, 3, 3, 1, 2, 7, 3, 2,
622 3, 1, 1, 1, 1, 2, 0, 2, 2, 0,
623 1, 3, 1, 2, 3, 1, 3, 1, 2, 3,
624 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
628 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
629 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
630 means the default is an error. */
631 static const yytype_uint8 yydefact[] =
633 2, 0, 1, 0, 15, 44, 45, 29, 30, 0,
634 62, 61, 63, 39, 66, 38, 0, 0, 0, 0,
635 3, 0, 7, 16, 10, 9, 20, 0, 0, 19,
636 5, 17, 0, 37, 30, 36, 0, 59, 64, 44,
637 39, 0, 31, 0, 0, 52, 0, 20, 0, 19,
638 23, 25, 0, 27, 28, 0, 4, 18, 66, 11,
639 0, 0, 46, 0, 40, 66, 66, 0, 0, 0,
640 0, 0, 0, 0, 12, 13, 14, 60, 69, 65,
641 67, 0, 0, 46, 21, 34, 54, 58, 24, 26,
642 0, 22, 33, 32, 0, 85, 86, 87, 42, 75,
643 77, 88, 41, 47, 43, 35, 48, 49, 50, 51,
644 53, 0, 44, 45, 0, 0, 0, 0, 55, 80,
645 0, 82, 83, 81, 68, 70, 72, 84, 0, 0,
646 0, 0, 0, 78, 44, 45, 0, 56, 0, 73,
647 0, 76, 89, 90, 91, 79, 71, 74, 0, 57
650 /* YYDEFGOTO[NTERM-NUM]. */
651 static const yytype_int8 yydefgoto[] =
653 -1, 1, 20, 21, 22, 23, 24, 95, 96, 55,
654 97, 119, 27, 28, 122, 123, 37, 38, 80, 124,
655 125, 102, 99, 126, 100, 101
658 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
660 #define YYPACT_NINF -93
661 static const yytype_int16 yypact[] =
663 -93, 155, -93, 10, 19, 26, -93, -93, -3, 73,
664 -93, -93, -93, 22, -93, -93, 356, 372, 317, 11,
665 -93, 79, -93, 86, 70, 317, 29, 384, 180, -93,
666 -93, -93, 342, -93, -93, -93, 356, -93, 6, -93,
667 -93, 356, -93, 372, -10, 57, -20, -17, 256, 54,
668 -93, -93, 88, -93, -93, 55, -93, -93, -93, 70,
669 356, 356, 197, 174, -93, -93, -93, 372, 372, 372,
670 372, 372, 372, 342, 29, 180, -93, 29, 221, -93,
671 -93, -17, 223, -93, -93, -93, -93, -93, -93, -93,
672 11, -93, 69, -93, 78, 90, 94, -93, -93, 244,
673 -93, -93, -93, -93, -93, 267, 36, 36, 57, 57,
674 57, 54, 95, 96, 375, 303, 90, 94, -93, 29,
675 392, 267, -93, -93, -93, 263, -93, -93, 71, 35,
676 11, 11, 78, -93, 105, 106, 178, 174, 303, -93,
677 11, -93, -93, -93, -93, -93, -93, -93, 80, -93
680 /* YYPGOTO[NTERM-NUM]. */
681 static const yytype_int8 yypgoto[] =
683 -93, -93, -93, -93, -93, -93, -13, 0, 14, -81,
684 -1, 87, -4, -16, -93, 3, -36, -93, -93, -93,
685 12, 81, 39, -91, -92, -67
688 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
689 positive, shift that token. If negative, reduce the rule which
690 number is the opposite. If zero, do what YYDEFACT says.
691 If YYTABLE_NINF, syntax error. */
692 #define YYTABLE_NINF -27
693 static const yytype_int16 yytable[] =
695 25, 45, 48, 58, 29, 46, 83, 133, 35, 128,
696 65, 127, 59, 44, 60, 61, 75, 50, 51, 53,
697 30, 49, 91, 84, 31, 48, 85, 82, 29, 103,
698 104, 78, 79, 54, 139, 76, -8, 133, 32, 44,
699 145, 50, 51, 7, 34, 139, 52, 147, 127, 36,
700 144, 105, 106, 107, 108, 109, 110, 48, 127, 148,
701 60, 61, 121, 44, 44, 44, 44, 44, 44, 127,
702 52, 127, 70, 71, 120, 72, 111, 118, 116, 33,
703 132, 7, 34, 141, 50, 51, 7, 34, 26, 56,
704 53, 57, 117, 58, 88, 89, 72, 87, 45, 121,
705 90, 61, 130, 42, 54, 47, 131, -23, -25, 121,
706 44, 120, 26, 52, 118, 116, 140, -24, -26, 74,
707 121, 120, 121, 77, 118, 116, 149, 136, 81, 117,
708 142, 53, 120, 129, 120, 118, 116, 118, 116, 117,
709 53, 0, 0, 98, 143, 54, 0, 92, 93, 0,
710 117, 0, 117, 0, 54, 2, 3, 0, 0, 4,
711 81, 5, 6, 7, 8, -6, 9, 0, 10, 11,
712 12, 0, 0, 13, 0, 0, 0, 14, 0, 15,
713 50, 51, 7, 34, 112, 113, 7, 34, 16, 9,
714 17, 10, 11, 12, 0, 0, 13, 18, 0, 19,
715 14, 0, 15, 50, 51, 7, 34, 0, 67, 52,
716 0, 16, 0, 114, 68, 69, 70, 71, 0, 72,
717 73, 94, 19, 138, 0, 0, 146, 112, 113, 7,
718 34, 0, 9, 0, 10, 11, 12, 0, 0, 13,
719 0, 0, 0, 14, 94, 15, 0, 0, 0, 0,
720 50, 51, 7, 34, 16, 0, 114, 68, 69, 70,
721 71, 0, 72, 73, 0, 19, 86, 0, 115, 112,
722 113, 7, 34, 0, 9, 0, 10, 11, 12, 52,
723 0, 13, 0, 0, 67, 14, 0, 15, 0, 132,
724 68, 69, 70, 71, 0, 72, 16, 0, 114, 86,
725 0, 68, 69, 70, 71, 73, 72, 19, 138, 112,
726 113, 7, 34, 0, 9, 0, 10, 11, 12, 0,
727 0, 13, 0, 39, 6, 14, 0, 15, 9, 0,
728 10, 11, 12, 0, 0, 13, 16, 0, 114, 14,
729 0, 15, 0, 0, 0, 73, 0, 19, 39, 6,
730 16, 0, 17, 9, 0, 10, 11, 12, 0, 18,
731 13, 19, 39, 6, 14, 0, 15, 9, 0, 10,
732 11, 0, 0, 0, 40, 16, 0, 17, 39, 6,
733 15, 134, 135, 0, 73, 10, 19, 0, 10, 16,
734 40, 17, 0, 40, 0, 0, 15, 0, 41, 15,
735 62, 63, 0, 64, 65, 66, 0, 17, 62, 137,
736 17, 64, 65, 66, 43, 0, 0, 43
739 static const yytype_int16 yycheck[] =
741 1, 17, 18, 23, 1, 18, 16, 99, 9, 90,
742 20, 78, 25, 17, 31, 32, 32, 6, 7, 19,
743 10, 18, 58, 43, 5, 41, 43, 43, 25, 65,
744 66, 25, 26, 19, 125, 32, 10, 129, 41, 43,
745 132, 6, 7, 8, 9, 136, 35, 138, 115, 27,
746 131, 67, 68, 69, 70, 71, 72, 73, 125, 140,
747 31, 32, 78, 67, 68, 69, 70, 71, 72, 136,
748 35, 138, 36, 37, 78, 39, 73, 78, 78, 6,
749 45, 8, 9, 48, 6, 7, 8, 9, 1, 10,
750 90, 5, 78, 23, 6, 7, 39, 43, 114, 115,
751 45, 32, 12, 16, 90, 18, 12, 12, 12, 125,
752 114, 115, 25, 35, 115, 115, 45, 12, 12, 32,
753 136, 125, 138, 36, 125, 125, 46, 115, 41, 115,
754 130, 131, 136, 94, 138, 136, 136, 138, 138, 125,
755 140, -1, -1, 62, 130, 131, -1, 60, 61, -1,
756 136, -1, 138, -1, 140, 0, 1, -1, -1, 4,
757 73, 6, 7, 8, 9, 10, 11, -1, 13, 14,
758 15, -1, -1, 18, -1, -1, -1, 22, -1, 24,
759 6, 7, 8, 9, 6, 7, 8, 9, 33, 11,
760 35, 13, 14, 15, -1, -1, 18, 42, -1, 44,
761 22, -1, 24, 6, 7, 8, 9, -1, 28, 35,
762 -1, 33, -1, 35, 34, 35, 36, 37, -1, 39,
763 42, 47, 44, 45, -1, -1, 48, 6, 7, 8,
764 9, -1, 11, -1, 13, 14, 15, -1, -1, 18,
765 -1, -1, -1, 22, 47, 24, -1, -1, -1, -1,
766 6, 7, 8, 9, 33, -1, 35, 34, 35, 36,
767 37, -1, 39, 42, -1, 44, 43, -1, 47, 6,
768 7, 8, 9, -1, 11, -1, 13, 14, 15, 35,
769 -1, 18, -1, -1, 28, 22, -1, 24, -1, 45,
770 34, 35, 36, 37, -1, 39, 33, -1, 35, 43,
771 -1, 34, 35, 36, 37, 42, 39, 44, 45, 6,
772 7, 8, 9, -1, 11, -1, 13, 14, 15, -1,
773 -1, 18, -1, 6, 7, 22, -1, 24, 11, -1,
774 13, 14, 15, -1, -1, 18, 33, -1, 35, 22,
775 -1, 24, -1, -1, -1, 42, -1, 44, 6, 7,
776 33, -1, 35, 11, -1, 13, 14, 15, -1, 42,
777 18, 44, 6, 7, 22, -1, 24, 11, -1, 13,
778 14, -1, -1, -1, 18, 33, -1, 35, 6, 7,
779 24, 6, 7, -1, 42, 13, 44, -1, 13, 33,
780 18, 35, -1, 18, -1, -1, 24, -1, 42, 24,
781 16, 17, -1, 19, 20, 21, -1, 35, 16, 17,
782 35, 19, 20, 21, 42, -1, -1, 42
785 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
786 symbol of state STATE-NUM. */
787 static const yytype_uint8 yystos[] =
789 0, 50, 0, 1, 4, 6, 7, 8, 9, 11,
790 13, 14, 15, 18, 22, 24, 33, 35, 42, 44,
791 51, 52, 53, 54, 55, 59, 60, 61, 62, 64,
792 10, 5, 41, 6, 9, 59, 27, 65, 66, 6,
793 18, 42, 60, 42, 61, 62, 55, 60, 62, 64,
794 6, 7, 35, 56, 57, 58, 10, 5, 23, 55,
795 31, 32, 16, 17, 19, 20, 21, 28, 34, 35,
796 36, 37, 39, 42, 60, 62, 64, 60, 25, 26,
797 67, 60, 62, 16, 43, 43, 43, 43, 6, 7,
798 45, 65, 60, 60, 47, 56, 57, 59, 70, 71,
799 73, 74, 70, 65, 65, 62, 62, 62, 62, 62,
800 62, 64, 6, 7, 35, 47, 56, 57, 59, 60,
801 61, 62, 63, 64, 68, 69, 72, 74, 58, 71,
802 12, 12, 45, 73, 6, 7, 69, 17, 45, 72,
803 45, 48, 56, 57, 58, 73, 48, 72, 58, 46
806 #define yyerrok (yyerrstatus = 0)
807 #define yyclearin (yychar = YYEMPTY)
811 #define YYACCEPT goto yyacceptlab
812 #define YYABORT goto yyabortlab
813 #define YYERROR goto yyerrorlab
816 /* Like YYERROR except do call yyerror. This remains here temporarily
817 to ease the transition to the new meaning of YYERROR, for GCC.
818 Once GCC version 2 has supplanted version 1, this can go. */
820 #define YYFAIL goto yyerrlab
822 #define YYRECOVERING() (!!yyerrstatus)
824 #define YYBACKUP(Token, Value) \
826 if (yychar == YYEMPTY && yylen == 1) \
830 yytoken = YYTRANSLATE (yychar); \
836 yyerror (scanner, YY_("syntax error: cannot back up")); \
843 #define YYERRCODE 256
846 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
847 If N is 0, then set CURRENT to the empty location which ends
848 the previous symbol: RHS[0] (always defined). */
850 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
851 #ifndef YYLLOC_DEFAULT
852 # define YYLLOC_DEFAULT(Current, Rhs, N) \
856 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
857 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
858 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
859 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
863 (Current).first_line = (Current).last_line = \
864 YYRHSLOC (Rhs, 0).last_line; \
865 (Current).first_column = (Current).last_column = \
866 YYRHSLOC (Rhs, 0).last_column; \
872 /* YY_LOCATION_PRINT -- Print the location on the stream.
873 This macro was not mandated originally: define only if we know
874 we won't break user code: when these are the locations we know. */
876 #ifndef YY_LOCATION_PRINT
877 # if YYLTYPE_IS_TRIVIAL
878 # define YY_LOCATION_PRINT(File, Loc) \
879 fprintf (File, "%d.%d-%d.%d", \
880 (Loc).first_line, (Loc).first_column, \
881 (Loc).last_line, (Loc).last_column)
883 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
888 /* YYLEX -- calling `yylex' with the right arguments. */
891 # define YYLEX yylex (&yylval, YYLEX_PARAM)
893 # define YYLEX yylex (&yylval, scanner)
896 /* Enable debugging if requested. */
900 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
901 # define YYFPRINTF fprintf
904 # define YYDPRINTF(Args) \
910 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
914 YYFPRINTF (stderr, "%s ", Title); \
915 yy_symbol_print (stderr, \
916 Type, Value, scanner); \
917 YYFPRINTF (stderr, "\n"); \
922 /*--------------------------------.
923 | Print this symbol on YYOUTPUT. |
924 `--------------------------------*/
927 #if (defined __STDC__ || defined __C99__FUNC__ \
928 || defined __cplusplus || defined _MSC_VER)
930 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner)
933 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
936 YYSTYPE const * const yyvaluep;
944 if (yytype < YYNTOKENS)
945 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
957 /*--------------------------------.
958 | Print this symbol on YYOUTPUT. |
959 `--------------------------------*/
961 #if (defined __STDC__ || defined __C99__FUNC__ \
962 || defined __cplusplus || defined _MSC_VER)
964 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner)
967 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
970 YYSTYPE const * const yyvaluep;
974 if (yytype < YYNTOKENS)
975 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
977 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
979 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
980 YYFPRINTF (yyoutput, ")");
983 /*------------------------------------------------------------------.
984 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
986 `------------------------------------------------------------------*/
988 #if (defined __STDC__ || defined __C99__FUNC__ \
989 || defined __cplusplus || defined _MSC_VER)
991 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
994 yy_stack_print (bottom, top)
995 yytype_int16 *bottom;
999 YYFPRINTF (stderr, "Stack now");
1000 for (; bottom <= top; ++bottom)
1001 YYFPRINTF (stderr, " %d", *bottom);
1002 YYFPRINTF (stderr, "\n");
1005 # define YY_STACK_PRINT(Bottom, Top) \
1008 yy_stack_print ((Bottom), (Top)); \
1012 /*------------------------------------------------.
1013 | Report that the YYRULE is going to be reduced. |
1014 `------------------------------------------------*/
1016 #if (defined __STDC__ || defined __C99__FUNC__ \
1017 || defined __cplusplus || defined _MSC_VER)
1019 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, yyscan_t scanner)
1022 yy_reduce_print (yyvsp, yyrule, scanner)
1028 int yynrhs = yyr2[yyrule];
1030 unsigned long int yylno = yyrline[yyrule];
1031 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1033 /* The symbols being reduced. */
1034 for (yyi = 0; yyi < yynrhs; yyi++)
1036 fprintf (stderr, " $%d = ", yyi + 1);
1037 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1038 &(yyvsp[(yyi + 1) - (yynrhs)])
1040 fprintf (stderr, "\n");
1044 # define YY_REDUCE_PRINT(Rule) \
1047 yy_reduce_print (yyvsp, Rule, scanner); \
1050 /* Nonzero means print parse trace. It is left uninitialized so that
1051 multiple parsers can coexist. */
1053 #else /* !YYDEBUG */
1054 # define YYDPRINTF(Args)
1055 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1056 # define YY_STACK_PRINT(Bottom, Top)
1057 # define YY_REDUCE_PRINT(Rule)
1058 #endif /* !YYDEBUG */
1061 /* YYINITDEPTH -- initial size of the parser's stacks. */
1063 # define YYINITDEPTH 200
1066 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1067 if the built-in stack extension method is used).
1069 Do not make this value too large; the results are undefined if
1070 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1071 evaluated with infinite-precision integer arithmetic. */
1074 # define YYMAXDEPTH 10000
1082 # if defined __GLIBC__ && defined _STRING_H
1083 # define yystrlen strlen
1085 /* Return the length of YYSTR. */
1086 #if (defined __STDC__ || defined __C99__FUNC__ \
1087 || defined __cplusplus || defined _MSC_VER)
1089 yystrlen (const char *yystr)
1097 for (yylen = 0; yystr[yylen]; yylen++)
1105 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1106 # define yystpcpy stpcpy
1108 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1110 #if (defined __STDC__ || defined __C99__FUNC__ \
1111 || defined __cplusplus || defined _MSC_VER)
1113 yystpcpy (char *yydest, const char *yysrc)
1116 yystpcpy (yydest, yysrc)
1122 const char *yys = yysrc;
1124 while ((*yyd++ = *yys++) != '\0')
1133 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1134 quotes and backslashes, so that it's suitable for yyerror. The
1135 heuristic is that double-quoting is unnecessary unless the string
1136 contains an apostrophe, a comma, or backslash (other than
1137 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1138 null, do not copy; instead, return the length of what the result
1141 yytnamerr (char *yyres, const char *yystr)
1146 char const *yyp = yystr;
1153 goto do_not_strip_quotes;
1157 goto do_not_strip_quotes;
1170 do_not_strip_quotes: ;
1174 return yystrlen (yystr);
1176 return yystpcpy (yyres, yystr) - yyres;
1180 /* Copy into YYRESULT an error message about the unexpected token
1181 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1182 including the terminating null byte. If YYRESULT is null, do not
1183 copy anything; just return the number of bytes that would be
1184 copied. As a special case, return 0 if an ordinary "syntax error"
1185 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1186 size calculation. */
1188 yysyntax_error (char *yyresult, int yystate, int yychar)
1190 int yyn = yypact[yystate];
1192 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1196 int yytype = YYTRANSLATE (yychar);
1197 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1198 YYSIZE_T yysize = yysize0;
1200 int yysize_overflow = 0;
1201 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1202 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1206 /* This is so xgettext sees the translatable formats that are
1207 constructed on the fly. */
1208 YY_("syntax error, unexpected %s");
1209 YY_("syntax error, unexpected %s, expecting %s");
1210 YY_("syntax error, unexpected %s, expecting %s or %s");
1211 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1212 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1216 static char const yyunexpected[] = "syntax error, unexpected %s";
1217 static char const yyexpecting[] = ", expecting %s";
1218 static char const yyor[] = " or %s";
1219 char yyformat[sizeof yyunexpected
1220 + sizeof yyexpecting - 1
1221 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1222 * (sizeof yyor - 1))];
1223 char const *yyprefix = yyexpecting;
1225 /* Start YYX at -YYN if negative to avoid negative indexes in
1227 int yyxbegin = yyn < 0 ? -yyn : 0;
1229 /* Stay within bounds of both yycheck and yytname. */
1230 int yychecklim = YYLAST - yyn + 1;
1231 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1234 yyarg[0] = yytname[yytype];
1235 yyfmt = yystpcpy (yyformat, yyunexpected);
1237 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1238 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1240 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1244 yyformat[sizeof yyunexpected - 1] = '\0';
1247 yyarg[yycount++] = yytname[yyx];
1248 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1249 yysize_overflow |= (yysize1 < yysize);
1251 yyfmt = yystpcpy (yyfmt, yyprefix);
1255 yyf = YY_(yyformat);
1256 yysize1 = yysize + yystrlen (yyf);
1257 yysize_overflow |= (yysize1 < yysize);
1260 if (yysize_overflow)
1261 return YYSIZE_MAXIMUM;
1265 /* Avoid sprintf, as that infringes on the user's name space.
1266 Don't have undefined behavior even if the translation
1267 produced a string with the wrong number of "%s"s. */
1268 char *yyp = yyresult;
1270 while ((*yyp = *yyf) != '\0')
1272 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1274 yyp += yytnamerr (yyp, yyarg[yyi++]);
1287 #endif /* YYERROR_VERBOSE */
1290 /*-----------------------------------------------.
1291 | Release the memory associated to this symbol. |
1292 `-----------------------------------------------*/
1295 #if (defined __STDC__ || defined __C99__FUNC__ \
1296 || defined __cplusplus || defined _MSC_VER)
1298 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t scanner)
1301 yydestruct (yymsg, yytype, yyvaluep, scanner)
1313 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1317 case 5: /* "HELP_TOPIC" */
1318 #line 168 "parser.y"
1319 { free((yyvaluep->str)); };
1320 #line 1321 "parser.cpp"
1323 #line 168 "parser.y"
1324 { free((yyvaluep->str)); };
1325 #line 1326 "parser.cpp"
1327 case 9: /* "IDENTIFIER" */
1328 #line 168 "parser.y"
1329 { free((yyvaluep->str)); };
1330 #line 1331 "parser.cpp"
1332 case 25: /* "PARAM" */
1333 #line 169 "parser.y"
1334 { if((yyvaluep->str)) free((yyvaluep->str)); };
1335 #line 1336 "parser.cpp"
1337 case 28: /* "CMP_OP" */
1338 #line 168 "parser.y"
1339 { free((yyvaluep->str)); };
1340 #line 1341 "parser.cpp"
1342 case 51: /* "command" */
1343 #line 170 "parser.y"
1344 { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
1345 #line 1346 "parser.cpp"
1347 case 52: /* "cmd_plain" */
1348 #line 170 "parser.y"
1349 { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
1350 #line 1351 "parser.cpp"
1352 case 55: /* "selection" */
1353 #line 171 "parser.y"
1354 { _gmx_selelem_free_chain((yyvaluep->sel)); };
1355 #line 1356 "parser.cpp"
1357 case 59: /* "string" */
1358 #line 168 "parser.y"
1359 { free((yyvaluep->str)); };
1360 #line 1361 "parser.cpp"
1362 case 60: /* "sel_expr" */
1363 #line 172 "parser.y"
1364 { _gmx_selelem_free((yyvaluep->sel)); };
1365 #line 1366 "parser.cpp"
1367 case 62: /* "num_expr" */
1368 #line 172 "parser.y"
1369 { _gmx_selelem_free((yyvaluep->sel)); };
1370 #line 1371 "parser.cpp"
1372 case 63: /* "str_expr" */
1373 #line 172 "parser.y"
1374 { _gmx_selelem_free((yyvaluep->sel)); };
1375 #line 1376 "parser.cpp"
1377 case 64: /* "pos_expr" */
1378 #line 172 "parser.y"
1379 { _gmx_selelem_free((yyvaluep->sel)); };
1380 #line 1381 "parser.cpp"
1382 case 65: /* "method_params" */
1383 #line 173 "parser.y"
1384 { _gmx_selexpr_free_params((yyvaluep->param)); };
1385 #line 1386 "parser.cpp"
1387 case 66: /* "method_param_list" */
1388 #line 173 "parser.y"
1389 { _gmx_selexpr_free_params((yyvaluep->param)); };
1390 #line 1391 "parser.cpp"
1392 case 67: /* "method_param" */
1393 #line 173 "parser.y"
1394 { _gmx_selexpr_free_params((yyvaluep->param)); };
1395 #line 1396 "parser.cpp"
1397 case 68: /* "value_list" */
1398 #line 174 "parser.y"
1399 { _gmx_selexpr_free_values((yyvaluep->val)); };
1400 #line 1401 "parser.cpp"
1402 case 69: /* "value_list_contents" */
1403 #line 174 "parser.y"
1404 { _gmx_selexpr_free_values((yyvaluep->val)); };
1405 #line 1406 "parser.cpp"
1407 case 70: /* "basic_value_list" */
1408 #line 175 "parser.y"
1409 { _gmx_selexpr_free_values((yyvaluep->val)); };
1410 #line 1411 "parser.cpp"
1412 case 71: /* "basic_value_list_contents" */
1413 #line 175 "parser.y"
1414 { _gmx_selexpr_free_values((yyvaluep->val)); };
1415 #line 1416 "parser.cpp"
1417 case 72: /* "value_item" */
1418 #line 174 "parser.y"
1419 { _gmx_selexpr_free_values((yyvaluep->val)); };
1420 #line 1421 "parser.cpp"
1422 case 73: /* "basic_value_item" */
1423 #line 175 "parser.y"
1424 { _gmx_selexpr_free_values((yyvaluep->val)); };
1425 #line 1426 "parser.cpp"
1427 case 74: /* "value_item_range" */
1428 #line 174 "parser.y"
1429 { _gmx_selexpr_free_values((yyvaluep->val)); };
1430 #line 1431 "parser.cpp"
1439 /* Prevent warnings from -Wmissing-prototypes. */
1441 #ifdef YYPARSE_PARAM
1442 #if defined __STDC__ || defined __cplusplus
1443 int yyparse (void *YYPARSE_PARAM);
1447 #else /* ! YYPARSE_PARAM */
1448 #if defined __STDC__ || defined __cplusplus
1449 int yyparse (yyscan_t scanner);
1453 #endif /* ! YYPARSE_PARAM */
1464 #ifdef YYPARSE_PARAM
1465 #if (defined __STDC__ || defined __C99__FUNC__ \
1466 || defined __cplusplus || defined _MSC_VER)
1468 yyparse (void *YYPARSE_PARAM)
1471 yyparse (YYPARSE_PARAM)
1472 void *YYPARSE_PARAM;
1474 #else /* ! YYPARSE_PARAM */
1475 #if (defined __STDC__ || defined __C99__FUNC__ \
1476 || defined __cplusplus || defined _MSC_VER)
1478 yyparse (yyscan_t scanner)
1486 /* The look-ahead symbol. */
1489 /* The semantic value of the look-ahead symbol. */
1492 /* Number of syntax errors so far. */
1498 /* Number of tokens to shift before error messages enabled. */
1500 /* Look-ahead token as an internal (translated) token number. */
1503 /* Buffer for error messages, and its allocated size. */
1505 char *yymsg = yymsgbuf;
1506 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1509 /* Three stacks and their tools:
1510 `yyss': related to states,
1511 `yyvs': related to semantic values,
1512 `yyls': related to locations.
1514 Refer to the stacks thru separate pointers, to allow yyoverflow
1515 to reallocate them elsewhere. */
1517 /* The state stack. */
1518 yytype_int16 yyssa[YYINITDEPTH];
1519 yytype_int16 *yyss = yyssa;
1520 yytype_int16 *yyssp;
1522 /* The semantic value stack. */
1523 YYSTYPE yyvsa[YYINITDEPTH];
1524 YYSTYPE *yyvs = yyvsa;
1529 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1531 YYSIZE_T yystacksize = YYINITDEPTH;
1533 /* The variables used to return semantic value and location from the
1538 /* The number of symbols on the RHS of the reduced rule.
1539 Keep to zero when no symbol should be popped. */
1542 YYDPRINTF ((stderr, "Starting parse\n"));
1547 yychar = YYEMPTY; /* Cause a token to be read. */
1549 /* Initialize stack pointers.
1550 Waste one element of value and location stack
1551 so that they stay on the same level as the state stack.
1552 The wasted elements are never initialized. */
1559 /*------------------------------------------------------------.
1560 | yynewstate -- Push a new state, which is found in yystate. |
1561 `------------------------------------------------------------*/
1563 /* In all cases, when you get here, the value and location stacks
1564 have just been pushed. So pushing a state here evens the stacks. */
1570 if (yyss + yystacksize - 1 <= yyssp)
1572 /* Get the current used size of the three stacks, in elements. */
1573 YYSIZE_T yysize = yyssp - yyss + 1;
1577 /* Give user a chance to reallocate the stack. Use copies of
1578 these so that the &'s don't force the real ones into
1580 YYSTYPE *yyvs1 = yyvs;
1581 yytype_int16 *yyss1 = yyss;
1584 /* Each stack pointer address is followed by the size of the
1585 data in use in that stack, in bytes. This used to be a
1586 conditional around just the two extra args, but that might
1587 be undefined if yyoverflow is a macro. */
1588 yyoverflow (YY_("memory exhausted"),
1589 &yyss1, yysize * sizeof (*yyssp),
1590 &yyvs1, yysize * sizeof (*yyvsp),
1597 #else /* no yyoverflow */
1598 # ifndef YYSTACK_RELOCATE
1599 goto yyexhaustedlab;
1601 /* Extend the stack our own way. */
1602 if (YYMAXDEPTH <= yystacksize)
1603 goto yyexhaustedlab;
1605 if (YYMAXDEPTH < yystacksize)
1606 yystacksize = YYMAXDEPTH;
1609 yytype_int16 *yyss1 = yyss;
1610 union yyalloc *yyptr =
1611 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1613 goto yyexhaustedlab;
1614 YYSTACK_RELOCATE (yyss);
1615 YYSTACK_RELOCATE (yyvs);
1617 # undef YYSTACK_RELOCATE
1619 YYSTACK_FREE (yyss1);
1622 #endif /* no yyoverflow */
1624 yyssp = yyss + yysize - 1;
1625 yyvsp = yyvs + yysize - 1;
1628 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1629 (unsigned long int) yystacksize));
1631 if (yyss + yystacksize - 1 <= yyssp)
1635 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1644 /* Do appropriate processing given the current state. Read a
1645 look-ahead token if we need one and don't already have one. */
1647 /* First try to decide what to do without reference to look-ahead token. */
1648 yyn = yypact[yystate];
1649 if (yyn == YYPACT_NINF)
1652 /* Not known => get a look-ahead token if don't already have one. */
1654 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1655 if (yychar == YYEMPTY)
1657 YYDPRINTF ((stderr, "Reading a token: "));
1661 if (yychar <= YYEOF)
1663 yychar = yytoken = YYEOF;
1664 YYDPRINTF ((stderr, "Now at end of input.\n"));
1668 yytoken = YYTRANSLATE (yychar);
1669 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1672 /* If the proper action on seeing token YYTOKEN is to reduce or to
1673 detect an error, take that action. */
1675 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1680 if (yyn == 0 || yyn == YYTABLE_NINF)
1689 /* Count tokens shifted since error; after three, turn off error
1694 /* Shift the look-ahead token. */
1695 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1697 /* Discard the shifted token unless it is eof. */
1698 if (yychar != YYEOF)
1707 /*-----------------------------------------------------------.
1708 | yydefault -- do the default action for the current state. |
1709 `-----------------------------------------------------------*/
1711 yyn = yydefact[yystate];
1717 /*-----------------------------.
1718 | yyreduce -- Do a reduction. |
1719 `-----------------------------*/
1721 /* yyn is the number of a rule to reduce with. */
1724 /* If YYLEN is nonzero, implement the default value of the action:
1727 Otherwise, the following line sets YYVAL to garbage.
1728 This behavior is undocumented and Bison
1729 users should not rely upon it. Assigning to YYVAL
1730 unconditionally makes the parser a bit smaller, and it avoids a
1731 GCC warning that YYVAL may be used uninitialized. */
1732 yyval = yyvsp[1-yylen];
1735 YY_REDUCE_PRINT (yyn);
1739 #line 189 "parser.y"
1740 { (yyval.sel) = NULL ;}
1744 #line 191 "parser.y"
1746 (yyval.sel) = _gmx_sel_append_selection((yyvsp[(2) - (2)].sel), (yyvsp[(1) - (2)].sel), scanner);
1747 if (_gmx_sel_parser_should_finish(scanner))
1753 #line 199 "parser.y"
1754 { (yyval.sel) = (yyvsp[(1) - (2)].sel); ;}
1758 #line 201 "parser.y"
1761 _gmx_selparser_error("invalid selection '%s'",
1762 _gmx_sel_lexer_pselstr(scanner));
1763 _gmx_sel_lexer_clear_method_stack(scanner);
1764 if (_gmx_sel_is_lexer_interactive(scanner))
1766 _gmx_sel_lexer_clear_pselstr(scanner);
1777 #line 220 "parser.y"
1780 _gmx_sel_handle_empty_cmd(scanner);
1785 #line 224 "parser.y"
1786 { (yyval.sel) = NULL; ;}
1790 #line 226 "parser.y"
1793 s = _gmx_sel_init_group_by_id((yyvsp[(1) - (1)].i), scanner);
1794 if (s == NULL) YYERROR;
1795 p = _gmx_sel_init_position(s, NULL, scanner);
1796 if (p == NULL) YYERROR;
1797 (yyval.sel) = _gmx_sel_init_selection(strdup(s->name), p, scanner);
1802 #line 235 "parser.y"
1805 s = _gmx_sel_init_group_by_name((yyvsp[(1) - (1)].str), scanner);
1806 free((yyvsp[(1) - (1)].str));
1807 if (s == NULL) YYERROR;
1808 p = _gmx_sel_init_position(s, NULL, scanner);
1809 if (p == NULL) YYERROR;
1810 (yyval.sel) = _gmx_sel_init_selection(strdup(s->name), p, scanner);
1815 #line 245 "parser.y"
1816 { (yyval.sel) = _gmx_sel_init_selection(NULL, (yyvsp[(1) - (1)].sel), scanner); ;}
1820 #line 247 "parser.y"
1821 { (yyval.sel) = _gmx_sel_init_selection((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].sel), scanner); ;}
1825 #line 249 "parser.y"
1826 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1830 #line 251 "parser.y"
1831 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1835 #line 253 "parser.y"
1836 { (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner); ;}
1840 #line 258 "parser.y"
1841 { _gmx_sel_handle_help_cmd(NULL, scanner); ;}
1845 #line 262 "parser.y"
1846 { _gmx_sel_handle_help_cmd((yyvsp[(2) - (2)].str), scanner); ;}
1850 #line 263 "parser.y"
1851 { _gmx_sel_handle_help_cmd((yyvsp[(2) - (2)].str), scanner); ;}
1855 #line 267 "parser.y"
1856 { (yyval.sel) = (yyvsp[(1) - (1)].sel); ;}
1860 #line 269 "parser.y"
1862 (yyval.sel) = _gmx_sel_init_position((yyvsp[(1) - (1)].sel), NULL, scanner);
1863 if ((yyval.sel) == NULL) YYERROR;
1868 #line 273 "parser.y"
1869 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
1873 #line 275 "parser.y"
1875 (yyval.sel) = _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].sel), scanner);
1876 if ((yyval.sel) == NULL) YYERROR;
1881 #line 286 "parser.y"
1882 { (yyval.r) = (yyvsp[(1) - (1)].i); ;}
1886 #line 287 "parser.y"
1887 { (yyval.r) = -(yyvsp[(2) - (2)].i); ;}
1891 #line 291 "parser.y"
1892 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1896 #line 292 "parser.y"
1897 { (yyval.r) = -(yyvsp[(2) - (2)].r); ;}
1901 #line 295 "parser.y"
1902 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1906 #line 296 "parser.y"
1907 { (yyval.r) = (yyvsp[(1) - (1)].r); ;}
1911 #line 299 "parser.y"
1912 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
1916 #line 300 "parser.y"
1917 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
1921 #line 309 "parser.y"
1923 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1924 (yyval.sel)->u.boolt = BOOL_NOT;
1925 (yyval.sel)->child = (yyvsp[(2) - (2)].sel);
1930 #line 315 "parser.y"
1932 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1933 (yyval.sel)->u.boolt = BOOL_AND;
1934 (yyval.sel)->child = (yyvsp[(1) - (3)].sel); (yyval.sel)->child->next = (yyvsp[(3) - (3)].sel);
1939 #line 321 "parser.y"
1941 (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
1942 (yyval.sel)->u.boolt = BOOL_OR;
1943 (yyval.sel)->child = (yyvsp[(1) - (3)].sel); (yyval.sel)->child->next = (yyvsp[(3) - (3)].sel);
1948 #line 332 "parser.y"
1949 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
1953 #line 337 "parser.y"
1955 (yyval.sel) = _gmx_sel_init_comparison((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), (yyvsp[(2) - (3)].str), scanner);
1956 if ((yyval.sel) == NULL) YYERROR;
1961 #line 345 "parser.y"
1963 (yyval.sel) = _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner);
1964 free((yyvsp[(2) - (2)].str));
1965 if ((yyval.sel) == NULL) YYERROR;
1970 #line 351 "parser.y"
1972 (yyval.sel) = _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner);
1973 if ((yyval.sel) == NULL) YYERROR;
1978 #line 358 "parser.y"
1979 { (yyval.str) = NULL; ;}
1983 #line 359 "parser.y"
1984 { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
1988 #line 364 "parser.y"
1990 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
1991 if ((yyval.sel) == NULL) YYERROR;
1996 #line 369 "parser.y"
1998 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
1999 if ((yyval.sel) == NULL) YYERROR;
2004 #line 374 "parser.y"
2006 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
2007 if ((yyval.sel) == NULL) YYERROR;
2012 #line 382 "parser.y"
2014 (yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
2015 if ((yyval.sel) == NULL) YYERROR;
2020 #line 394 "parser.y"
2022 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2023 _gmx_selelem_set_vtype((yyval.sel), INT_VALUE);
2024 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2025 (yyval.sel)->v.u.i[0] = (yyvsp[(1) - (1)].i);
2030 #line 401 "parser.y"
2032 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2033 _gmx_selelem_set_vtype((yyval.sel), REAL_VALUE);
2034 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2035 (yyval.sel)->v.u.r[0] = (yyvsp[(1) - (1)].r);
2040 #line 411 "parser.y"
2042 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
2043 if ((yyval.sel) == NULL) YYERROR;
2048 #line 416 "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 424 "parser.y"
2057 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '+', scanner); ;}
2061 #line 426 "parser.y"
2062 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '-', scanner); ;}
2066 #line 428 "parser.y"
2067 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '*', scanner); ;}
2071 #line 430 "parser.y"
2072 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '/', scanner); ;}
2076 #line 432 "parser.y"
2077 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(2) - (2)].sel), NULL, '-', scanner); ;}
2081 #line 434 "parser.y"
2082 { (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '^', scanner); ;}
2086 #line 435 "parser.y"
2087 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
2091 #line 443 "parser.y"
2093 (yyval.sel) = _gmx_selelem_create(SEL_CONST);
2094 _gmx_selelem_set_vtype((yyval.sel), STR_VALUE);
2095 _gmx_selvalue_reserve(&(yyval.sel)->v, 1);
2096 (yyval.sel)->v.u.s[0] = (yyvsp[(1) - (1)].str);
2101 #line 450 "parser.y"
2103 (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
2104 if ((yyval.sel) == NULL) YYERROR;
2109 #line 462 "parser.y"
2110 { (yyval.sel) = _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r)); ;}
2114 #line 466 "parser.y"
2115 { (yyval.sel) = (yyvsp[(2) - (3)].sel); ;}
2119 #line 471 "parser.y"
2121 (yyval.sel) = _gmx_sel_init_method((yyvsp[(1) - (2)].meth), (yyvsp[(2) - (2)].param), NULL, scanner);
2122 if ((yyval.sel) == NULL) YYERROR;
2127 #line 479 "parser.y"
2129 (yyval.sel) = _gmx_sel_init_position((yyvsp[(3) - (3)].sel), (yyvsp[(1) - (3)].str), scanner);
2130 if ((yyval.sel) == NULL) YYERROR;
2135 #line 490 "parser.y"
2136 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2140 #line 494 "parser.y"
2141 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2145 #line 498 "parser.y"
2146 { (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel)); ;}
2150 #line 507 "parser.y"
2151 { (yyval.param) = process_param_list((yyvsp[(1) - (1)].param)); ;}
2155 #line 509 "parser.y"
2156 { (yyval.param) = process_param_list((yyvsp[(1) - (2)].param)); ;}
2160 #line 513 "parser.y"
2161 { (yyval.param) = NULL; ;}
2165 #line 515 "parser.y"
2166 { (yyvsp[(2) - (2)].param)->next = (yyvsp[(1) - (2)].param); (yyval.param) = (yyvsp[(2) - (2)].param); ;}
2170 #line 520 "parser.y"
2172 (yyval.param) = _gmx_selexpr_create_param((yyvsp[(1) - (2)].str));
2173 (yyval.param)->value = process_value_list((yyvsp[(2) - (2)].val), &(yyval.param)->nval);
2178 #line 526 "parser.y"
2179 { (yyval.val) = NULL; ;}
2183 #line 527 "parser.y"
2184 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2188 #line 528 "parser.y"
2189 { (yyval.val) = (yyvsp[(2) - (3)].val); ;}
2193 #line 532 "parser.y"
2194 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2198 #line 534 "parser.y"
2199 { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); ;}
2203 #line 536 "parser.y"
2204 { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); ;}
2208 #line 540 "parser.y"
2209 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2213 #line 541 "parser.y"
2214 { (yyval.val) = (yyvsp[(2) - (3)].val); ;}
2218 #line 545 "parser.y"
2219 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2223 #line 547 "parser.y"
2224 { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); ;}
2228 #line 549 "parser.y"
2229 { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); ;}
2233 #line 553 "parser.y"
2234 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2238 #line 555 "parser.y"
2239 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2243 #line 557 "parser.y"
2244 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2248 #line 559 "parser.y"
2249 { (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel)); ;}
2253 #line 560 "parser.y"
2254 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2258 #line 565 "parser.y"
2260 (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
2261 (yyval.val)->u.i.i1 = (yyval.val)->u.i.i2 = (yyvsp[(1) - (1)].r);
2266 #line 570 "parser.y"
2268 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2269 (yyval.val)->u.r.r1 = (yyval.val)->u.r.r2 = (yyvsp[(1) - (1)].r);
2274 #line 575 "parser.y"
2276 (yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
2277 (yyval.val)->u.s = (yyvsp[(1) - (1)].str);
2282 #line 579 "parser.y"
2283 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
2287 #line 584 "parser.y"
2289 (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
2290 (yyval.val)->u.i.i1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.i.i2 = (yyvsp[(3) - (3)].r);
2295 #line 589 "parser.y"
2297 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2298 (yyval.val)->u.r.r1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.r.r2 = (yyvsp[(3) - (3)].r);
2303 #line 594 "parser.y"
2305 (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
2306 (yyval.val)->u.r.r1 = (yyvsp[(1) - (3)].r); (yyval.val)->u.r.r2 = (yyvsp[(3) - (3)].r);
2311 /* Line 1267 of yacc.c. */
2312 #line 2313 "parser.cpp"
2315 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2319 YY_STACK_PRINT (yyss, yyssp);
2324 /* Now `shift' the result of the reduction. Determine what state
2325 that goes to, based on the state we popped back to and the rule
2326 number reduced by. */
2330 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2331 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2332 yystate = yytable[yystate];
2334 yystate = yydefgoto[yyn - YYNTOKENS];
2339 /*------------------------------------.
2340 | yyerrlab -- here on detecting error |
2341 `------------------------------------*/
2343 /* If not already recovering from an error, report this error. */
2347 #if ! YYERROR_VERBOSE
2348 yyerror (scanner, YY_("syntax error"));
2351 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2352 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2354 YYSIZE_T yyalloc = 2 * yysize;
2355 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2356 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2357 if (yymsg != yymsgbuf)
2358 YYSTACK_FREE (yymsg);
2359 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2361 yymsg_alloc = yyalloc;
2365 yymsg_alloc = sizeof yymsgbuf;
2369 if (0 < yysize && yysize <= yymsg_alloc)
2371 (void) yysyntax_error (yymsg, yystate, yychar);
2372 yyerror (scanner, yymsg);
2376 yyerror (scanner, YY_("syntax error"));
2378 goto yyexhaustedlab;
2386 if (yyerrstatus == 3)
2388 /* If just tried and failed to reuse look-ahead token after an
2389 error, discard it. */
2391 if (yychar <= YYEOF)
2393 /* Return failure if at end of input. */
2394 if (yychar == YYEOF)
2399 yydestruct ("Error: discarding",
2400 yytoken, &yylval, scanner);
2405 /* Else will try to reuse look-ahead token after shifting the error
2410 /*---------------------------------------------------.
2411 | yyerrorlab -- error raised explicitly by YYERROR. |
2412 `---------------------------------------------------*/
2415 /* Pacify compilers like GCC when the user code never invokes
2416 YYERROR and the label yyerrorlab therefore never appears in user
2418 if (/*CONSTCOND*/ 0)
2421 /* Do not reclaim the symbols of the rule which action triggered
2425 YY_STACK_PRINT (yyss, yyssp);
2430 /*-------------------------------------------------------------.
2431 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2432 `-------------------------------------------------------------*/
2434 yyerrstatus = 3; /* Each real token shifted decrements this. */
2438 yyn = yypact[yystate];
2439 if (yyn != YYPACT_NINF)
2442 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2450 /* Pop the current state because it cannot handle the error token. */
2455 yydestruct ("Error: popping",
2456 yystos[yystate], yyvsp, scanner);
2459 YY_STACK_PRINT (yyss, yyssp);
2468 /* Shift the error token. */
2469 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2475 /*-------------------------------------.
2476 | yyacceptlab -- YYACCEPT comes here. |
2477 `-------------------------------------*/
2482 /*-----------------------------------.
2483 | yyabortlab -- YYABORT comes here. |
2484 `-----------------------------------*/
2490 /*-------------------------------------------------.
2491 | yyexhaustedlab -- memory exhaustion comes here. |
2492 `-------------------------------------------------*/
2494 yyerror (scanner, YY_("memory exhausted"));
2500 if (yychar != YYEOF && yychar != YYEMPTY)
2501 yydestruct ("Cleanup: discarding lookahead",
2502 yytoken, &yylval, scanner);
2503 /* Do not reclaim the symbols of the rule which action triggered
2504 this YYABORT or YYACCEPT. */
2506 YY_STACK_PRINT (yyss, yyssp);
2507 while (yyssp != yyss)
2509 yydestruct ("Cleanup: popping",
2510 yystos[*yyssp], yyvsp, scanner);
2515 YYSTACK_FREE (yyss);
2518 if (yymsg != yymsgbuf)
2519 YYSTACK_FREE (yymsg);
2521 /* Make sure YYID is used. */
2522 return YYID (yyresult);
2526 #line 600 "parser.y"
2529 static t_selexpr_value *
2530 process_value_list(t_selexpr_value *values, int *nr)
2532 t_selexpr_value *val, *pval, *nval;
2534 /* Count values (if needed) and reverse list */
2557 static t_selexpr_param *
2558 process_param_list(t_selexpr_param *params)
2560 t_selexpr_param *par, *ppar, *npar;
2578 yyerror(yyscan_t scanner, char const *s)
2580 _gmx_selparser_error("%s", s);