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.c
154 * \brief Generated (from parser.y by Bison) parser for the selection language.
156 /*! \internal \file parser.h
157 * \brief Generated (from parser.y by Bison) parser include file.
166 #include "parsetree.h"
171 static t_selexpr_value
*
172 process_value_list(t_selexpr_value
*values
, int *nr
);
173 static t_selexpr_param
*
174 process_param_list(t_selexpr_param
*params
);
177 yyerror(yyscan_t
, char const *s
);
180 /* Enabling traces. */
185 /* Enabling verbose error messages. */
186 #ifdef YYERROR_VERBOSE
187 # undef YYERROR_VERBOSE
188 # define YYERROR_VERBOSE 1
190 # define YYERROR_VERBOSE 0
193 /* Enabling the token table. */
194 #ifndef YYTOKEN_TABLE
195 # define YYTOKEN_TABLE 0
198 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
199 typedef union YYSTYPE
205 struct gmx_ana_selmethod_t
*meth
;
207 struct t_selelem
*sel
;
209 struct t_selexpr_value
*val
;
210 struct t_selexpr_param
*param
;
212 /* Line 187 of yacc.c. */
215 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
216 # define YYSTYPE_IS_DECLARED 1
217 # define YYSTYPE_IS_TRIVIAL 1
222 /* Copy the second part of user declarations. */
225 /* Line 216 of yacc.c. */
233 typedef YYTYPE_UINT8 yytype_uint8
;
235 typedef unsigned char yytype_uint8
;
239 typedef YYTYPE_INT8 yytype_int8
;
240 #elif (defined __STDC__ || defined __C99__FUNC__ \
241 || defined __cplusplus || defined _MSC_VER)
242 typedef signed char yytype_int8
;
244 typedef short int yytype_int8
;
248 typedef YYTYPE_UINT16 yytype_uint16
;
250 typedef unsigned short int yytype_uint16
;
254 typedef YYTYPE_INT16 yytype_int16
;
256 typedef short int yytype_int16
;
260 # ifdef __SIZE_TYPE__
261 # define YYSIZE_T __SIZE_TYPE__
262 # elif defined size_t
263 # define YYSIZE_T size_t
264 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
265 || defined __cplusplus || defined _MSC_VER)
266 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
267 # define YYSIZE_T size_t
269 # define YYSIZE_T unsigned int
273 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
278 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
279 # define YY_(msgid) dgettext ("bison-runtime", msgid)
283 # define YY_(msgid) msgid
287 /* Suppress unused-variable warnings by "using" E. */
288 #if ! defined lint || defined __GNUC__
289 # define YYUSE(e) ((void) (e))
291 # define YYUSE(e) /* empty */
294 /* Identity function, used to suppress warnings about constant conditions. */
298 #if (defined __STDC__ || defined __C99__FUNC__ \
299 || defined __cplusplus || defined _MSC_VER)
312 #if ! defined yyoverflow || YYERROR_VERBOSE
314 /* The parser invokes alloca or malloc; define the necessary symbols. */
316 # ifdef YYSTACK_USE_ALLOCA
317 # if YYSTACK_USE_ALLOCA
319 # define YYSTACK_ALLOC __builtin_alloca
320 # elif defined __BUILTIN_VA_ARG_INCR
321 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
323 # define YYSTACK_ALLOC __alloca
324 # elif defined _MSC_VER
325 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
326 # define alloca _alloca
328 # define YYSTACK_ALLOC alloca
329 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
330 || defined __cplusplus || defined _MSC_VER)
331 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
340 # ifdef YYSTACK_ALLOC
341 /* Pacify GCC's `empty if-body' warning. */
342 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
343 # ifndef YYSTACK_ALLOC_MAXIMUM
344 /* The OS might guarantee only one guard page at the bottom of the stack,
345 and a page size can be as small as 4096 bytes. So we cannot safely
346 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
347 to allow for a few compiler-allocated temporary stack slots. */
348 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
351 # define YYSTACK_ALLOC YYMALLOC
352 # define YYSTACK_FREE YYFREE
353 # ifndef YYSTACK_ALLOC_MAXIMUM
354 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
356 # if (defined __cplusplus && ! defined _STDLIB_H \
357 && ! ((defined YYMALLOC || defined malloc) \
358 && (defined YYFREE || defined free)))
359 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
365 # define YYMALLOC malloc
366 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
367 || defined __cplusplus || defined _MSC_VER)
368 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
373 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
374 || defined __cplusplus || defined _MSC_VER)
375 void free (void *); /* INFRINGES ON USER NAME SPACE */
379 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
382 #if (! defined yyoverflow \
383 && (! defined __cplusplus \
384 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
386 /* A type that is properly aligned for any stack member. */
393 /* The size of the maximum gap between one aligned stack and the next. */
394 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
396 /* The size of an array large to enough to hold all stacks, each with
398 # define YYSTACK_BYTES(N) \
399 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
400 + YYSTACK_GAP_MAXIMUM)
402 /* Copy COUNT objects from FROM to TO. The source and destination do
405 # if defined __GNUC__ && 1 < __GNUC__
406 # define YYCOPY(To, From, Count) \
407 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
409 # define YYCOPY(To, From, Count) \
413 for (yyi = 0; yyi < (Count); yyi++) \
414 (To)[yyi] = (From)[yyi]; \
420 /* Relocate STACK from its old location to the new one. The
421 local variables YYSIZE and YYSTACKSIZE give the old and new number of
422 elements in the stack, and YYPTR gives the new location of the
423 stack. Advance YYPTR to a properly aligned location for the next
425 # define YYSTACK_RELOCATE(Stack) \
428 YYSIZE_T yynewbytes; \
429 YYCOPY (&yyptr->Stack, Stack, yysize); \
430 Stack = &yyptr->Stack; \
431 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
432 yyptr += yynewbytes / sizeof (*yyptr); \
438 /* YYFINAL -- State number of the termination state. */
440 /* YYLAST -- Last index in YYTABLE. */
443 /* YYNTOKENS -- Number of terminals. */
445 /* YYNNTS -- Number of nonterminals. */
447 /* YYNRULES -- Number of rules. */
449 /* YYNRULES -- Number of states. */
450 #define YYNSTATES 150
452 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
454 #define YYMAXUTOK 290
456 #define YYTRANSLATE(YYX) \
457 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
459 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
460 static const yytype_uint8 yytranslate
[] =
462 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 42, 43, 36, 34, 45, 35, 2, 37, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 41, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 44, 2, 46, 39, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 47, 2, 48, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 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, 2, 2, 2, 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, 1, 2, 3, 4,
488 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
489 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
490 25, 26, 27, 28, 29, 30, 31, 32, 33, 38,
495 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
497 static const yytype_uint16 yyprhs
[] =
499 0, 0, 3, 4, 7, 10, 13, 14, 16, 18,
500 20, 22, 25, 29, 33, 37, 39, 41, 44, 47,
501 49, 51, 55, 59, 61, 64, 66, 69, 71, 73,
502 75, 77, 80, 84, 88, 92, 96, 99, 102, 104,
503 106, 109, 113, 117, 121, 123, 125, 128, 132, 136,
504 140, 144, 148, 151, 155, 159, 161, 164, 172, 176,
505 179, 183, 185, 187, 189, 191, 194, 195, 198, 201,
506 202, 204, 208, 210, 213, 217, 219, 223, 225, 228,
507 232, 234, 236, 238, 240, 242, 244, 246, 248, 250,
511 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
512 static const yytype_int8 yyrhs
[] =
514 50, 0, -1, -1, 50, 51, -1, 52, 10, -1,
515 1, 10, -1, -1, 53, -1, 6, -1, 59, -1,
516 55, -1, 59, 55, -1, 9, 41, 60, -1, 9,
517 41, 62, -1, 9, 41, 64, -1, 4, -1, 54,
518 -1, 4, 5, -1, 54, 5, -1, 64, -1, 60,
519 -1, 42, 55, 43, -1, 55, 23, 65, -1, 6,
520 -1, 35, 6, -1, 7, -1, 35, 7, -1, 56,
521 -1, 57, -1, 8, -1, 9, -1, 33, 60, -1,
522 60, 32, 60, -1, 60, 31, 60, -1, 42, 60,
523 43, -1, 62, 28, 62, -1, 11, 59, -1, 11,
524 6, -1, 24, -1, 18, -1, 61, 19, -1, 61,
525 17, 70, -1, 61, 16, 70, -1, 61, 21, 65,
526 -1, 6, -1, 7, -1, 61, 16, -1, 61, 20,
527 65, -1, 62, 34, 62, -1, 62, 35, 62, -1,
528 62, 36, 62, -1, 62, 37, 62, -1, 35, 62,
529 -1, 62, 39, 62, -1, 42, 62, 43, -1, 59,
530 -1, 61, 17, -1, 44, 58, 45, 58, 45, 58,
531 46, -1, 42, 64, 43, -1, 22, 65, -1, 18,
532 27, 60, -1, 14, -1, 13, -1, 15, -1, 66,
533 -1, 66, 26, -1, -1, 66, 67, -1, 25, 68,
534 -1, -1, 69, -1, 47, 69, 48, -1, 72, -1,
535 69, 72, -1, 69, 45, 72, -1, 71, -1, 47,
536 71, 48, -1, 73, -1, 71, 73, -1, 71, 45,
537 73, -1, 60, -1, 64, -1, 62, -1, 63, -1,
538 74, -1, 56, -1, 57, -1, 59, -1, 74, -1,
539 56, 12, 56, -1, 56, 12, 57, -1, 57, 12,
543 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
544 static const yytype_uint16 yyrline
[] =
546 0, 182, 182, 183, 192, 193, 213, 217, 218, 227,
547 237, 239, 241, 243, 245, 251, 252, 255, 256, 260,
548 261, 266, 267, 279, 280, 284, 285, 288, 289, 292,
549 293, 301, 307, 313, 325, 329, 337, 343, 351, 352,
550 356, 361, 366, 374, 386, 393, 403, 408, 416, 418,
551 420, 422, 424, 426, 428, 435, 442, 454, 459, 463,
552 471, 482, 486, 490, 499, 501, 506, 507, 512, 519,
553 520, 521, 525, 526, 528, 533, 534, 538, 539, 541,
554 545, 547, 549, 551, 553, 557, 562, 567, 572, 576,
559 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
560 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
561 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
562 static const char *const yytname
[] =
564 "$end", "error", "$undefined", "INVALID", "HELP", "HELP_TOPIC",
565 "TOK_INT", "TOK_REAL", "STR", "IDENTIFIER", "CMD_SEP", "GROUP", "TO",
566 "VARIABLE_NUMERIC", "VARIABLE_GROUP", "VARIABLE_POS", "KEYWORD_NUMERIC",
567 "KEYWORD_STR", "KEYWORD_POS", "KEYWORD_GROUP", "METHOD_NUMERIC",
568 "METHOD_GROUP", "METHOD_POS", "MODIFIER", "EMPTY_POSMOD", "PARAM",
569 "END_OF_METHOD", "OF", "CMP_OP", "PARAM_REDUCT", "XOR", "OR", "AND",
570 "NOT", "'+'", "'-'", "'*'", "'/'", "UNARY_NEG", "'^'", "NUM_REDUCT",
571 "'='", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "$accept",
572 "commands", "command", "cmd_plain", "help_request", "help_topic",
573 "selection", "integer_number", "real_number", "number", "string",
574 "sel_expr", "pos_mod", "num_expr", "str_expr", "pos_expr",
575 "method_params", "method_param_list", "method_param", "value_list",
576 "value_list_contents", "basic_value_list", "basic_value_list_contents",
577 "value_item", "basic_value_item", "value_item_range", 0
582 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
584 static const yytype_uint16 yytoknum
[] =
586 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
587 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
588 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
589 285, 286, 287, 288, 43, 45, 42, 47, 289, 94,
590 290, 61, 40, 41, 91, 44, 93, 123, 125
594 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
595 static const yytype_uint8 yyr1
[] =
597 0, 49, 50, 50, 51, 51, 52, 52, 52, 52,
598 52, 52, 52, 52, 52, 53, 53, 54, 54, 55,
599 55, 55, 55, 56, 56, 57, 57, 58, 58, 59,
600 59, 60, 60, 60, 60, 60, 60, 60, 61, 61,
601 60, 60, 60, 60, 62, 62, 62, 62, 62, 62,
602 62, 62, 62, 62, 62, 63, 63, 64, 64, 64,
603 64, 60, 62, 64, 65, 65, 66, 66, 67, 68,
604 68, 68, 69, 69, 69, 70, 70, 71, 71, 71,
605 72, 72, 72, 72, 72, 73, 73, 73, 73, 74,
609 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
610 static const yytype_uint8 yyr2
[] =
612 0, 2, 0, 2, 2, 2, 0, 1, 1, 1,
613 1, 2, 3, 3, 3, 1, 1, 2, 2, 1,
614 1, 3, 3, 1, 2, 1, 2, 1, 1, 1,
615 1, 2, 3, 3, 3, 3, 2, 2, 1, 1,
616 2, 3, 3, 3, 1, 1, 2, 3, 3, 3,
617 3, 3, 2, 3, 3, 1, 2, 7, 3, 2,
618 3, 1, 1, 1, 1, 2, 0, 2, 2, 0,
619 1, 3, 1, 2, 3, 1, 3, 1, 2, 3,
620 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
624 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
625 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
626 means the default is an error. */
627 static const yytype_uint8 yydefact
[] =
629 2, 0, 1, 0, 15, 44, 45, 29, 30, 0,
630 62, 61, 63, 39, 66, 38, 0, 0, 0, 0,
631 3, 0, 7, 16, 10, 9, 20, 0, 0, 19,
632 5, 17, 0, 37, 30, 36, 0, 59, 64, 44,
633 39, 0, 31, 0, 0, 52, 0, 20, 0, 19,
634 23, 25, 0, 27, 28, 0, 4, 18, 66, 11,
635 0, 0, 46, 0, 40, 66, 66, 0, 0, 0,
636 0, 0, 0, 0, 12, 13, 14, 60, 69, 65,
637 67, 0, 0, 46, 21, 34, 54, 58, 24, 26,
638 0, 22, 33, 32, 0, 85, 86, 87, 42, 75,
639 77, 88, 41, 47, 43, 35, 48, 49, 50, 51,
640 53, 0, 44, 45, 0, 0, 0, 0, 55, 80,
641 0, 82, 83, 81, 68, 70, 72, 84, 0, 0,
642 0, 0, 0, 78, 44, 45, 0, 56, 0, 73,
643 0, 76, 89, 90, 91, 79, 71, 74, 0, 57
646 /* YYDEFGOTO[NTERM-NUM]. */
647 static const yytype_int8 yydefgoto
[] =
649 -1, 1, 20, 21, 22, 23, 24, 95, 96, 55,
650 97, 119, 27, 28, 122, 123, 37, 38, 80, 124,
651 125, 102, 99, 126, 100, 101
654 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
656 #define YYPACT_NINF -93
657 static const yytype_int16 yypact
[] =
659 -93, 155, -93, 10, 19, 26, -93, -93, -3, 73,
660 -93, -93, -93, 22, -93, -93, 356, 372, 317, 11,
661 -93, 79, -93, 86, 70, 317, 29, 384, 180, -93,
662 -93, -93, 342, -93, -93, -93, 356, -93, 6, -93,
663 -93, 356, -93, 372, -10, 57, -20, -17, 256, 54,
664 -93, -93, 88, -93, -93, 55, -93, -93, -93, 70,
665 356, 356, 197, 174, -93, -93, -93, 372, 372, 372,
666 372, 372, 372, 342, 29, 180, -93, 29, 221, -93,
667 -93, -17, 223, -93, -93, -93, -93, -93, -93, -93,
668 11, -93, 69, -93, 78, 90, 94, -93, -93, 244,
669 -93, -93, -93, -93, -93, 267, 36, 36, 57, 57,
670 57, 54, 95, 96, 375, 303, 90, 94, -93, 29,
671 392, 267, -93, -93, -93, 263, -93, -93, 71, 35,
672 11, 11, 78, -93, 105, 106, 178, 174, 303, -93,
673 11, -93, -93, -93, -93, -93, -93, -93, 80, -93
676 /* YYPGOTO[NTERM-NUM]. */
677 static const yytype_int8 yypgoto
[] =
679 -93, -93, -93, -93, -93, -93, -13, 0, 14, -81,
680 -1, 87, -4, -16, -93, 3, -36, -93, -93, -93,
681 12, 81, 39, -91, -92, -67
684 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
685 positive, shift that token. If negative, reduce the rule which
686 number is the opposite. If zero, do what YYDEFACT says.
687 If YYTABLE_NINF, syntax error. */
688 #define YYTABLE_NINF -27
689 static const yytype_int16 yytable
[] =
691 25, 45, 48, 58, 29, 46, 83, 133, 35, 128,
692 65, 127, 59, 44, 60, 61, 75, 50, 51, 53,
693 30, 49, 91, 84, 31, 48, 85, 82, 29, 103,
694 104, 78, 79, 54, 139, 76, -8, 133, 32, 44,
695 145, 50, 51, 7, 34, 139, 52, 147, 127, 36,
696 144, 105, 106, 107, 108, 109, 110, 48, 127, 148,
697 60, 61, 121, 44, 44, 44, 44, 44, 44, 127,
698 52, 127, 70, 71, 120, 72, 111, 118, 116, 33,
699 132, 7, 34, 141, 50, 51, 7, 34, 26, 56,
700 53, 57, 117, 58, 88, 89, 72, 87, 45, 121,
701 90, 61, 130, 42, 54, 47, 131, -23, -25, 121,
702 44, 120, 26, 52, 118, 116, 140, -24, -26, 74,
703 121, 120, 121, 77, 118, 116, 149, 136, 81, 117,
704 142, 53, 120, 129, 120, 118, 116, 118, 116, 117,
705 53, 0, 0, 98, 143, 54, 0, 92, 93, 0,
706 117, 0, 117, 0, 54, 2, 3, 0, 0, 4,
707 81, 5, 6, 7, 8, -6, 9, 0, 10, 11,
708 12, 0, 0, 13, 0, 0, 0, 14, 0, 15,
709 50, 51, 7, 34, 112, 113, 7, 34, 16, 9,
710 17, 10, 11, 12, 0, 0, 13, 18, 0, 19,
711 14, 0, 15, 50, 51, 7, 34, 0, 67, 52,
712 0, 16, 0, 114, 68, 69, 70, 71, 0, 72,
713 73, 94, 19, 138, 0, 0, 146, 112, 113, 7,
714 34, 0, 9, 0, 10, 11, 12, 0, 0, 13,
715 0, 0, 0, 14, 94, 15, 0, 0, 0, 0,
716 50, 51, 7, 34, 16, 0, 114, 68, 69, 70,
717 71, 0, 72, 73, 0, 19, 86, 0, 115, 112,
718 113, 7, 34, 0, 9, 0, 10, 11, 12, 52,
719 0, 13, 0, 0, 67, 14, 0, 15, 0, 132,
720 68, 69, 70, 71, 0, 72, 16, 0, 114, 86,
721 0, 68, 69, 70, 71, 73, 72, 19, 138, 112,
722 113, 7, 34, 0, 9, 0, 10, 11, 12, 0,
723 0, 13, 0, 39, 6, 14, 0, 15, 9, 0,
724 10, 11, 12, 0, 0, 13, 16, 0, 114, 14,
725 0, 15, 0, 0, 0, 73, 0, 19, 39, 6,
726 16, 0, 17, 9, 0, 10, 11, 12, 0, 18,
727 13, 19, 39, 6, 14, 0, 15, 9, 0, 10,
728 11, 0, 0, 0, 40, 16, 0, 17, 39, 6,
729 15, 134, 135, 0, 73, 10, 19, 0, 10, 16,
730 40, 17, 0, 40, 0, 0, 15, 0, 41, 15,
731 62, 63, 0, 64, 65, 66, 0, 17, 62, 137,
732 17, 64, 65, 66, 43, 0, 0, 43
735 static const yytype_int16 yycheck
[] =
737 1, 17, 18, 23, 1, 18, 16, 99, 9, 90,
738 20, 78, 25, 17, 31, 32, 32, 6, 7, 19,
739 10, 18, 58, 43, 5, 41, 43, 43, 25, 65,
740 66, 25, 26, 19, 125, 32, 10, 129, 41, 43,
741 132, 6, 7, 8, 9, 136, 35, 138, 115, 27,
742 131, 67, 68, 69, 70, 71, 72, 73, 125, 140,
743 31, 32, 78, 67, 68, 69, 70, 71, 72, 136,
744 35, 138, 36, 37, 78, 39, 73, 78, 78, 6,
745 45, 8, 9, 48, 6, 7, 8, 9, 1, 10,
746 90, 5, 78, 23, 6, 7, 39, 43, 114, 115,
747 45, 32, 12, 16, 90, 18, 12, 12, 12, 125,
748 114, 115, 25, 35, 115, 115, 45, 12, 12, 32,
749 136, 125, 138, 36, 125, 125, 46, 115, 41, 115,
750 130, 131, 136, 94, 138, 136, 136, 138, 138, 125,
751 140, -1, -1, 62, 130, 131, -1, 60, 61, -1,
752 136, -1, 138, -1, 140, 0, 1, -1, -1, 4,
753 73, 6, 7, 8, 9, 10, 11, -1, 13, 14,
754 15, -1, -1, 18, -1, -1, -1, 22, -1, 24,
755 6, 7, 8, 9, 6, 7, 8, 9, 33, 11,
756 35, 13, 14, 15, -1, -1, 18, 42, -1, 44,
757 22, -1, 24, 6, 7, 8, 9, -1, 28, 35,
758 -1, 33, -1, 35, 34, 35, 36, 37, -1, 39,
759 42, 47, 44, 45, -1, -1, 48, 6, 7, 8,
760 9, -1, 11, -1, 13, 14, 15, -1, -1, 18,
761 -1, -1, -1, 22, 47, 24, -1, -1, -1, -1,
762 6, 7, 8, 9, 33, -1, 35, 34, 35, 36,
763 37, -1, 39, 42, -1, 44, 43, -1, 47, 6,
764 7, 8, 9, -1, 11, -1, 13, 14, 15, 35,
765 -1, 18, -1, -1, 28, 22, -1, 24, -1, 45,
766 34, 35, 36, 37, -1, 39, 33, -1, 35, 43,
767 -1, 34, 35, 36, 37, 42, 39, 44, 45, 6,
768 7, 8, 9, -1, 11, -1, 13, 14, 15, -1,
769 -1, 18, -1, 6, 7, 22, -1, 24, 11, -1,
770 13, 14, 15, -1, -1, 18, 33, -1, 35, 22,
771 -1, 24, -1, -1, -1, 42, -1, 44, 6, 7,
772 33, -1, 35, 11, -1, 13, 14, 15, -1, 42,
773 18, 44, 6, 7, 22, -1, 24, 11, -1, 13,
774 14, -1, -1, -1, 18, 33, -1, 35, 6, 7,
775 24, 6, 7, -1, 42, 13, 44, -1, 13, 33,
776 18, 35, -1, 18, -1, -1, 24, -1, 42, 24,
777 16, 17, -1, 19, 20, 21, -1, 35, 16, 17,
778 35, 19, 20, 21, 42, -1, -1, 42
781 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
782 symbol of state STATE-NUM. */
783 static const yytype_uint8 yystos
[] =
785 0, 50, 0, 1, 4, 6, 7, 8, 9, 11,
786 13, 14, 15, 18, 22, 24, 33, 35, 42, 44,
787 51, 52, 53, 54, 55, 59, 60, 61, 62, 64,
788 10, 5, 41, 6, 9, 59, 27, 65, 66, 6,
789 18, 42, 60, 42, 61, 62, 55, 60, 62, 64,
790 6, 7, 35, 56, 57, 58, 10, 5, 23, 55,
791 31, 32, 16, 17, 19, 20, 21, 28, 34, 35,
792 36, 37, 39, 42, 60, 62, 64, 60, 25, 26,
793 67, 60, 62, 16, 43, 43, 43, 43, 6, 7,
794 45, 65, 60, 60, 47, 56, 57, 59, 70, 71,
795 73, 74, 70, 65, 65, 62, 62, 62, 62, 62,
796 62, 64, 6, 7, 35, 47, 56, 57, 59, 60,
797 61, 62, 63, 64, 68, 69, 72, 74, 58, 71,
798 12, 12, 45, 73, 6, 7, 69, 17, 45, 72,
799 45, 48, 56, 57, 58, 73, 48, 72, 58, 46
802 #define yyerrok (yyerrstatus = 0)
803 #define yyclearin (yychar = YYEMPTY)
807 #define YYACCEPT goto yyacceptlab
808 #define YYABORT goto yyabortlab
809 #define YYERROR goto yyerrorlab
812 /* Like YYERROR except do call yyerror. This remains here temporarily
813 to ease the transition to the new meaning of YYERROR, for GCC.
814 Once GCC version 2 has supplanted version 1, this can go. */
816 #define YYFAIL goto yyerrlab
818 #define YYRECOVERING() (!!yyerrstatus)
820 #define YYBACKUP(Token, Value) \
822 if (yychar == YYEMPTY && yylen == 1) \
826 yytoken = YYTRANSLATE (yychar); \
832 yyerror (scanner, YY_("syntax error: cannot back up")); \
839 #define YYERRCODE 256
842 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
843 If N is 0, then set CURRENT to the empty location which ends
844 the previous symbol: RHS[0] (always defined). */
846 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
847 #ifndef YYLLOC_DEFAULT
848 # define YYLLOC_DEFAULT(Current, Rhs, N) \
852 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
853 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
854 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
855 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
859 (Current).first_line = (Current).last_line = \
860 YYRHSLOC (Rhs, 0).last_line; \
861 (Current).first_column = (Current).last_column = \
862 YYRHSLOC (Rhs, 0).last_column; \
868 /* YY_LOCATION_PRINT -- Print the location on the stream.
869 This macro was not mandated originally: define only if we know
870 we won't break user code: when these are the locations we know. */
872 #ifndef YY_LOCATION_PRINT
873 # if YYLTYPE_IS_TRIVIAL
874 # define YY_LOCATION_PRINT(File, Loc) \
875 fprintf (File, "%d.%d-%d.%d", \
876 (Loc).first_line, (Loc).first_column, \
877 (Loc).last_line, (Loc).last_column)
879 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
884 /* YYLEX -- calling `yylex' with the right arguments. */
887 # define YYLEX yylex (&yylval, YYLEX_PARAM)
889 # define YYLEX yylex (&yylval, scanner)
892 /* Enable debugging if requested. */
896 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
897 # define YYFPRINTF fprintf
900 # define YYDPRINTF(Args) \
906 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
910 YYFPRINTF (stderr, "%s ", Title); \
911 yy_symbol_print (stderr, \
912 Type, Value, scanner); \
913 YYFPRINTF (stderr, "\n"); \
918 /*--------------------------------.
919 | Print this symbol on YYOUTPUT. |
920 `--------------------------------*/
923 #if (defined __STDC__ || defined __C99__FUNC__ \
924 || defined __cplusplus || defined _MSC_VER)
926 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, yyscan_t scanner
)
929 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, scanner
)
932 YYSTYPE
const * const yyvaluep
;
940 if (yytype
< YYNTOKENS
)
941 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
953 /*--------------------------------.
954 | Print this symbol on YYOUTPUT. |
955 `--------------------------------*/
957 #if (defined __STDC__ || defined __C99__FUNC__ \
958 || defined __cplusplus || defined _MSC_VER)
960 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, yyscan_t scanner
)
963 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, scanner
)
966 YYSTYPE
const * const yyvaluep
;
970 if (yytype
< YYNTOKENS
)
971 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
973 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
975 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, scanner
);
976 YYFPRINTF (yyoutput
, ")");
979 /*------------------------------------------------------------------.
980 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
982 `------------------------------------------------------------------*/
984 #if (defined __STDC__ || defined __C99__FUNC__ \
985 || defined __cplusplus || defined _MSC_VER)
987 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
990 yy_stack_print (bottom
, top
)
991 yytype_int16
*bottom
;
995 YYFPRINTF (stderr
, "Stack now");
996 for (; bottom
<= top
; ++bottom
)
997 YYFPRINTF (stderr
, " %d", *bottom
);
998 YYFPRINTF (stderr
, "\n");
1001 # define YY_STACK_PRINT(Bottom, Top) \
1004 yy_stack_print ((Bottom), (Top)); \
1008 /*------------------------------------------------.
1009 | Report that the YYRULE is going to be reduced. |
1010 `------------------------------------------------*/
1012 #if (defined __STDC__ || defined __C99__FUNC__ \
1013 || defined __cplusplus || defined _MSC_VER)
1015 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
, yyscan_t scanner
)
1018 yy_reduce_print (yyvsp
, yyrule
, scanner
)
1024 int yynrhs
= yyr2
[yyrule
];
1026 unsigned long int yylno
= yyrline
[yyrule
];
1027 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1029 /* The symbols being reduced. */
1030 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1032 fprintf (stderr
, " $%d = ", yyi
+ 1);
1033 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1034 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1036 fprintf (stderr
, "\n");
1040 # define YY_REDUCE_PRINT(Rule) \
1043 yy_reduce_print (yyvsp, Rule, scanner); \
1046 /* Nonzero means print parse trace. It is left uninitialized so that
1047 multiple parsers can coexist. */
1049 #else /* !YYDEBUG */
1050 # define YYDPRINTF(Args)
1051 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1052 # define YY_STACK_PRINT(Bottom, Top)
1053 # define YY_REDUCE_PRINT(Rule)
1054 #endif /* !YYDEBUG */
1057 /* YYINITDEPTH -- initial size of the parser's stacks. */
1059 # define YYINITDEPTH 200
1062 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1063 if the built-in stack extension method is used).
1065 Do not make this value too large; the results are undefined if
1066 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1067 evaluated with infinite-precision integer arithmetic. */
1070 # define YYMAXDEPTH 10000
1078 # if defined __GLIBC__ && defined _STRING_H
1079 # define yystrlen strlen
1081 /* Return the length of YYSTR. */
1082 #if (defined __STDC__ || defined __C99__FUNC__ \
1083 || defined __cplusplus || defined _MSC_VER)
1085 yystrlen (const char *yystr
)
1093 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1101 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1102 # define yystpcpy stpcpy
1104 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1106 #if (defined __STDC__ || defined __C99__FUNC__ \
1107 || defined __cplusplus || defined _MSC_VER)
1109 yystpcpy (char *yydest
, const char *yysrc
)
1112 yystpcpy (yydest
, yysrc
)
1118 const char *yys
= yysrc
;
1120 while ((*yyd
++ = *yys
++) != '\0')
1129 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1130 quotes and backslashes, so that it's suitable for yyerror. The
1131 heuristic is that double-quoting is unnecessary unless the string
1132 contains an apostrophe, a comma, or backslash (other than
1133 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1134 null, do not copy; instead, return the length of what the result
1137 yytnamerr (char *yyres
, const char *yystr
)
1142 char const *yyp
= yystr
;
1149 goto do_not_strip_quotes
;
1153 goto do_not_strip_quotes
;
1166 do_not_strip_quotes
: ;
1170 return yystrlen (yystr
);
1172 return yystpcpy (yyres
, yystr
) - yyres
;
1176 /* Copy into YYRESULT an error message about the unexpected token
1177 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1178 including the terminating null byte. If YYRESULT is null, do not
1179 copy anything; just return the number of bytes that would be
1180 copied. As a special case, return 0 if an ordinary "syntax error"
1181 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1182 size calculation. */
1184 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1186 int yyn
= yypact
[yystate
];
1188 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1192 int yytype
= YYTRANSLATE (yychar
);
1193 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1194 YYSIZE_T yysize
= yysize0
;
1196 int yysize_overflow
= 0;
1197 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1198 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1202 /* This is so xgettext sees the translatable formats that are
1203 constructed on the fly. */
1204 YY_("syntax error, unexpected %s");
1205 YY_("syntax error, unexpected %s, expecting %s");
1206 YY_("syntax error, unexpected %s, expecting %s or %s");
1207 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1208 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1212 static char const yyunexpected
[] = "syntax error, unexpected %s";
1213 static char const yyexpecting
[] = ", expecting %s";
1214 static char const yyor
[] = " or %s";
1215 char yyformat
[sizeof yyunexpected
1216 + sizeof yyexpecting
- 1
1217 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1218 * (sizeof yyor
- 1))];
1219 char const *yyprefix
= yyexpecting
;
1221 /* Start YYX at -YYN if negative to avoid negative indexes in
1223 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1225 /* Stay within bounds of both yycheck and yytname. */
1226 int yychecklim
= YYLAST
- yyn
+ 1;
1227 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1230 yyarg
[0] = yytname
[yytype
];
1231 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1233 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1234 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1236 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1240 yyformat
[sizeof yyunexpected
- 1] = '\0';
1243 yyarg
[yycount
++] = yytname
[yyx
];
1244 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1245 yysize_overflow
|= (yysize1
< yysize
);
1247 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1251 yyf
= YY_(yyformat
);
1252 yysize1
= yysize
+ yystrlen (yyf
);
1253 yysize_overflow
|= (yysize1
< yysize
);
1256 if (yysize_overflow
)
1257 return YYSIZE_MAXIMUM
;
1261 /* Avoid sprintf, as that infringes on the user's name space.
1262 Don't have undefined behavior even if the translation
1263 produced a string with the wrong number of "%s"s. */
1264 char *yyp
= yyresult
;
1266 while ((*yyp
= *yyf
) != '\0')
1268 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1270 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1283 #endif /* YYERROR_VERBOSE */
1286 /*-----------------------------------------------.
1287 | Release the memory associated to this symbol. |
1288 `-----------------------------------------------*/
1291 #if (defined __STDC__ || defined __C99__FUNC__ \
1292 || defined __cplusplus || defined _MSC_VER)
1294 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, yyscan_t scanner
)
1297 yydestruct (yymsg
, yytype
, yyvaluep
, scanner
)
1309 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1313 case 5: /* "HELP_TOPIC" */
1314 #line 161 "parser.y"
1315 { free((yyvaluep
->str
)); };
1316 #line 1317 "parser.c"
1319 #line 161 "parser.y"
1320 { free((yyvaluep
->str
)); };
1321 #line 1322 "parser.c"
1323 case 9: /* "IDENTIFIER" */
1324 #line 161 "parser.y"
1325 { free((yyvaluep
->str
)); };
1326 #line 1327 "parser.c"
1328 case 25: /* "PARAM" */
1329 #line 162 "parser.y"
1330 { if((yyvaluep
->str
)) free((yyvaluep
->str
)); };
1331 #line 1332 "parser.c"
1333 case 28: /* "CMP_OP" */
1334 #line 161 "parser.y"
1335 { free((yyvaluep
->str
)); };
1336 #line 1337 "parser.c"
1338 case 51: /* "command" */
1339 #line 163 "parser.y"
1340 { if((yyvaluep
->sel
)) _gmx_selelem_free((yyvaluep
->sel
)); };
1341 #line 1342 "parser.c"
1343 case 52: /* "cmd_plain" */
1344 #line 163 "parser.y"
1345 { if((yyvaluep
->sel
)) _gmx_selelem_free((yyvaluep
->sel
)); };
1346 #line 1347 "parser.c"
1348 case 55: /* "selection" */
1349 #line 164 "parser.y"
1350 { _gmx_selelem_free_chain((yyvaluep
->sel
)); };
1351 #line 1352 "parser.c"
1353 case 59: /* "string" */
1354 #line 161 "parser.y"
1355 { free((yyvaluep
->str
)); };
1356 #line 1357 "parser.c"
1358 case 60: /* "sel_expr" */
1359 #line 165 "parser.y"
1360 { _gmx_selelem_free((yyvaluep
->sel
)); };
1361 #line 1362 "parser.c"
1363 case 62: /* "num_expr" */
1364 #line 165 "parser.y"
1365 { _gmx_selelem_free((yyvaluep
->sel
)); };
1366 #line 1367 "parser.c"
1368 case 63: /* "str_expr" */
1369 #line 165 "parser.y"
1370 { _gmx_selelem_free((yyvaluep
->sel
)); };
1371 #line 1372 "parser.c"
1373 case 64: /* "pos_expr" */
1374 #line 165 "parser.y"
1375 { _gmx_selelem_free((yyvaluep
->sel
)); };
1376 #line 1377 "parser.c"
1378 case 65: /* "method_params" */
1379 #line 166 "parser.y"
1380 { _gmx_selexpr_free_params((yyvaluep
->param
)); };
1381 #line 1382 "parser.c"
1383 case 66: /* "method_param_list" */
1384 #line 166 "parser.y"
1385 { _gmx_selexpr_free_params((yyvaluep
->param
)); };
1386 #line 1387 "parser.c"
1388 case 67: /* "method_param" */
1389 #line 166 "parser.y"
1390 { _gmx_selexpr_free_params((yyvaluep
->param
)); };
1391 #line 1392 "parser.c"
1393 case 68: /* "value_list" */
1394 #line 167 "parser.y"
1395 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1396 #line 1397 "parser.c"
1398 case 69: /* "value_list_contents" */
1399 #line 167 "parser.y"
1400 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1401 #line 1402 "parser.c"
1403 case 70: /* "basic_value_list" */
1404 #line 168 "parser.y"
1405 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1406 #line 1407 "parser.c"
1408 case 71: /* "basic_value_list_contents" */
1409 #line 168 "parser.y"
1410 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1411 #line 1412 "parser.c"
1413 case 72: /* "value_item" */
1414 #line 167 "parser.y"
1415 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1416 #line 1417 "parser.c"
1418 case 73: /* "basic_value_item" */
1419 #line 168 "parser.y"
1420 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1421 #line 1422 "parser.c"
1423 case 74: /* "value_item_range" */
1424 #line 167 "parser.y"
1425 { _gmx_selexpr_free_values((yyvaluep
->val
)); };
1426 #line 1427 "parser.c"
1435 /* Prevent warnings from -Wmissing-prototypes. */
1437 #ifdef YYPARSE_PARAM
1438 #if defined __STDC__ || defined __cplusplus
1439 int yyparse (void *YYPARSE_PARAM
);
1443 #else /* ! YYPARSE_PARAM */
1444 #if defined __STDC__ || defined __cplusplus
1445 int yyparse (yyscan_t scanner
);
1449 #endif /* ! YYPARSE_PARAM */
1460 #ifdef YYPARSE_PARAM
1461 #if (defined __STDC__ || defined __C99__FUNC__ \
1462 || defined __cplusplus || defined _MSC_VER)
1464 yyparse (void *YYPARSE_PARAM
)
1467 yyparse (YYPARSE_PARAM
)
1468 void *YYPARSE_PARAM
;
1470 #else /* ! YYPARSE_PARAM */
1471 #if (defined __STDC__ || defined __C99__FUNC__ \
1472 || defined __cplusplus || defined _MSC_VER)
1474 yyparse (yyscan_t scanner
)
1482 /* The look-ahead symbol. */
1485 /* The semantic value of the look-ahead symbol. */
1488 /* Number of syntax errors so far. */
1494 /* Number of tokens to shift before error messages enabled. */
1496 /* Look-ahead token as an internal (translated) token number. */
1499 /* Buffer for error messages, and its allocated size. */
1501 char *yymsg
= yymsgbuf
;
1502 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1505 /* Three stacks and their tools:
1506 `yyss': related to states,
1507 `yyvs': related to semantic values,
1508 `yyls': related to locations.
1510 Refer to the stacks thru separate pointers, to allow yyoverflow
1511 to reallocate them elsewhere. */
1513 /* The state stack. */
1514 yytype_int16 yyssa
[YYINITDEPTH
];
1515 yytype_int16
*yyss
= yyssa
;
1516 yytype_int16
*yyssp
;
1518 /* The semantic value stack. */
1519 YYSTYPE yyvsa
[YYINITDEPTH
];
1520 YYSTYPE
*yyvs
= yyvsa
;
1525 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1527 YYSIZE_T yystacksize
= YYINITDEPTH
;
1529 /* The variables used to return semantic value and location from the
1534 /* The number of symbols on the RHS of the reduced rule.
1535 Keep to zero when no symbol should be popped. */
1538 YYDPRINTF ((stderr
, "Starting parse\n"));
1543 yychar
= YYEMPTY
; /* Cause a token to be read. */
1545 /* Initialize stack pointers.
1546 Waste one element of value and location stack
1547 so that they stay on the same level as the state stack.
1548 The wasted elements are never initialized. */
1555 /*------------------------------------------------------------.
1556 | yynewstate -- Push a new state, which is found in yystate. |
1557 `------------------------------------------------------------*/
1559 /* In all cases, when you get here, the value and location stacks
1560 have just been pushed. So pushing a state here evens the stacks. */
1566 if (yyss
+ yystacksize
- 1 <= yyssp
)
1568 /* Get the current used size of the three stacks, in elements. */
1569 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1573 /* Give user a chance to reallocate the stack. Use copies of
1574 these so that the &'s don't force the real ones into
1576 YYSTYPE
*yyvs1
= yyvs
;
1577 yytype_int16
*yyss1
= yyss
;
1580 /* Each stack pointer address is followed by the size of the
1581 data in use in that stack, in bytes. This used to be a
1582 conditional around just the two extra args, but that might
1583 be undefined if yyoverflow is a macro. */
1584 yyoverflow (YY_("memory exhausted"),
1585 &yyss1
, yysize
* sizeof (*yyssp
),
1586 &yyvs1
, yysize
* sizeof (*yyvsp
),
1593 #else /* no yyoverflow */
1594 # ifndef YYSTACK_RELOCATE
1595 goto yyexhaustedlab
;
1597 /* Extend the stack our own way. */
1598 if (YYMAXDEPTH
<= yystacksize
)
1599 goto yyexhaustedlab
;
1601 if (YYMAXDEPTH
< yystacksize
)
1602 yystacksize
= YYMAXDEPTH
;
1605 yytype_int16
*yyss1
= yyss
;
1606 union yyalloc
*yyptr
=
1607 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1609 goto yyexhaustedlab
;
1610 YYSTACK_RELOCATE (yyss
);
1611 YYSTACK_RELOCATE (yyvs
);
1613 # undef YYSTACK_RELOCATE
1615 YYSTACK_FREE (yyss1
);
1618 #endif /* no yyoverflow */
1620 yyssp
= yyss
+ yysize
- 1;
1621 yyvsp
= yyvs
+ yysize
- 1;
1624 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1625 (unsigned long int) yystacksize
));
1627 if (yyss
+ yystacksize
- 1 <= yyssp
)
1631 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1640 /* Do appropriate processing given the current state. Read a
1641 look-ahead token if we need one and don't already have one. */
1643 /* First try to decide what to do without reference to look-ahead token. */
1644 yyn
= yypact
[yystate
];
1645 if (yyn
== YYPACT_NINF
)
1648 /* Not known => get a look-ahead token if don't already have one. */
1650 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1651 if (yychar
== YYEMPTY
)
1653 YYDPRINTF ((stderr
, "Reading a token: "));
1657 if (yychar
<= YYEOF
)
1659 yychar
= yytoken
= YYEOF
;
1660 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1664 yytoken
= YYTRANSLATE (yychar
);
1665 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1668 /* If the proper action on seeing token YYTOKEN is to reduce or to
1669 detect an error, take that action. */
1671 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1676 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1685 /* Count tokens shifted since error; after three, turn off error
1690 /* Shift the look-ahead token. */
1691 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1693 /* Discard the shifted token unless it is eof. */
1694 if (yychar
!= YYEOF
)
1703 /*-----------------------------------------------------------.
1704 | yydefault -- do the default action for the current state. |
1705 `-----------------------------------------------------------*/
1707 yyn
= yydefact
[yystate
];
1713 /*-----------------------------.
1714 | yyreduce -- Do a reduction. |
1715 `-----------------------------*/
1717 /* yyn is the number of a rule to reduce with. */
1720 /* If YYLEN is nonzero, implement the default value of the action:
1723 Otherwise, the following line sets YYVAL to garbage.
1724 This behavior is undocumented and Bison
1725 users should not rely upon it. Assigning to YYVAL
1726 unconditionally makes the parser a bit smaller, and it avoids a
1727 GCC warning that YYVAL may be used uninitialized. */
1728 yyval
= yyvsp
[1-yylen
];
1731 YY_REDUCE_PRINT (yyn
);
1735 #line 182 "parser.y"
1736 { (yyval
.sel
) = NULL
;}
1740 #line 184 "parser.y"
1742 (yyval
.sel
) = _gmx_sel_append_selection((yyvsp
[(2) - (2)].sel
), (yyvsp
[(1) - (2)].sel
), scanner
);
1743 if (_gmx_sel_parser_should_finish(scanner
))
1749 #line 192 "parser.y"
1750 { (yyval
.sel
) = (yyvsp
[(1) - (2)].sel
); ;}
1754 #line 194 "parser.y"
1757 _gmx_selparser_error("invalid selection '%s'",
1758 _gmx_sel_lexer_pselstr(scanner
));
1759 _gmx_sel_lexer_clear_method_stack(scanner
);
1760 if (_gmx_sel_is_lexer_interactive(scanner
))
1762 _gmx_sel_lexer_clear_pselstr(scanner
);
1773 #line 213 "parser.y"
1776 _gmx_sel_handle_empty_cmd(scanner
);
1781 #line 217 "parser.y"
1782 { (yyval
.sel
) = NULL
; ;}
1786 #line 219 "parser.y"
1789 s
= _gmx_sel_init_group_by_id((yyvsp
[(1) - (1)].i
), scanner
);
1790 if (s
== NULL
) YYERROR
;
1791 p
= _gmx_sel_init_position(s
, NULL
, scanner
);
1792 if (p
== NULL
) YYERROR
;
1793 (yyval
.sel
) = _gmx_sel_init_selection(strdup(s
->name
), p
, scanner
);
1798 #line 228 "parser.y"
1801 s
= _gmx_sel_init_group_by_name((yyvsp
[(1) - (1)].str
), scanner
);
1802 free((yyvsp
[(1) - (1)].str
));
1803 if (s
== NULL
) YYERROR
;
1804 p
= _gmx_sel_init_position(s
, NULL
, scanner
);
1805 if (p
== NULL
) YYERROR
;
1806 (yyval
.sel
) = _gmx_sel_init_selection(strdup(s
->name
), p
, scanner
);
1811 #line 238 "parser.y"
1812 { (yyval
.sel
) = _gmx_sel_init_selection(NULL
, (yyvsp
[(1) - (1)].sel
), scanner
); ;}
1816 #line 240 "parser.y"
1817 { (yyval
.sel
) = _gmx_sel_init_selection((yyvsp
[(1) - (2)].str
), (yyvsp
[(2) - (2)].sel
), scanner
); ;}
1821 #line 242 "parser.y"
1822 { (yyval
.sel
) = _gmx_sel_assign_variable((yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].sel
), scanner
); ;}
1826 #line 244 "parser.y"
1827 { (yyval
.sel
) = _gmx_sel_assign_variable((yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].sel
), scanner
); ;}
1831 #line 246 "parser.y"
1832 { (yyval
.sel
) = _gmx_sel_assign_variable((yyvsp
[(1) - (3)].str
), (yyvsp
[(3) - (3)].sel
), scanner
); ;}
1836 #line 251 "parser.y"
1837 { _gmx_sel_handle_help_cmd(NULL
, scanner
); ;}
1841 #line 255 "parser.y"
1842 { _gmx_sel_handle_help_cmd((yyvsp
[(2) - (2)].str
), scanner
); ;}
1846 #line 256 "parser.y"
1847 { _gmx_sel_handle_help_cmd((yyvsp
[(2) - (2)].str
), scanner
); ;}
1851 #line 260 "parser.y"
1852 { (yyval
.sel
) = (yyvsp
[(1) - (1)].sel
); ;}
1856 #line 262 "parser.y"
1858 (yyval
.sel
) = _gmx_sel_init_position((yyvsp
[(1) - (1)].sel
), NULL
, scanner
);
1859 if ((yyval
.sel
) == NULL
) YYERROR
;
1864 #line 266 "parser.y"
1865 { (yyval
.sel
) = (yyvsp
[(2) - (3)].sel
); ;}
1869 #line 268 "parser.y"
1871 (yyval
.sel
) = _gmx_sel_init_modifier((yyvsp
[(2) - (3)].meth
), (yyvsp
[(3) - (3)].param
), (yyvsp
[(1) - (3)].sel
), scanner
);
1872 if ((yyval
.sel
) == NULL
) YYERROR
;
1877 #line 279 "parser.y"
1878 { (yyval
.r
) = (yyvsp
[(1) - (1)].i
); ;}
1882 #line 280 "parser.y"
1883 { (yyval
.r
) = -(yyvsp
[(2) - (2)].i
); ;}
1887 #line 284 "parser.y"
1888 { (yyval
.r
) = (yyvsp
[(1) - (1)].r
); ;}
1892 #line 285 "parser.y"
1893 { (yyval
.r
) = -(yyvsp
[(2) - (2)].r
); ;}
1897 #line 288 "parser.y"
1898 { (yyval
.r
) = (yyvsp
[(1) - (1)].r
); ;}
1902 #line 289 "parser.y"
1903 { (yyval
.r
) = (yyvsp
[(1) - (1)].r
); ;}
1907 #line 292 "parser.y"
1908 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
1912 #line 293 "parser.y"
1913 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
1917 #line 302 "parser.y"
1919 (yyval
.sel
) = _gmx_selelem_create(SEL_BOOLEAN
);
1920 (yyval
.sel
)->u
.boolt
= BOOL_NOT
;
1921 (yyval
.sel
)->child
= (yyvsp
[(2) - (2)].sel
);
1926 #line 308 "parser.y"
1928 (yyval
.sel
) = _gmx_selelem_create(SEL_BOOLEAN
);
1929 (yyval
.sel
)->u
.boolt
= BOOL_AND
;
1930 (yyval
.sel
)->child
= (yyvsp
[(1) - (3)].sel
); (yyval
.sel
)->child
->next
= (yyvsp
[(3) - (3)].sel
);
1935 #line 314 "parser.y"
1937 (yyval
.sel
) = _gmx_selelem_create(SEL_BOOLEAN
);
1938 (yyval
.sel
)->u
.boolt
= BOOL_OR
;
1939 (yyval
.sel
)->child
= (yyvsp
[(1) - (3)].sel
); (yyval
.sel
)->child
->next
= (yyvsp
[(3) - (3)].sel
);
1944 #line 325 "parser.y"
1945 { (yyval
.sel
) = (yyvsp
[(2) - (3)].sel
); ;}
1949 #line 330 "parser.y"
1951 (yyval
.sel
) = _gmx_sel_init_comparison((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), (yyvsp
[(2) - (3)].str
), scanner
);
1952 if ((yyval
.sel
) == NULL
) YYERROR
;
1957 #line 338 "parser.y"
1959 (yyval
.sel
) = _gmx_sel_init_group_by_name((yyvsp
[(2) - (2)].str
), scanner
);
1960 free((yyvsp
[(2) - (2)].str
));
1961 if ((yyval
.sel
) == NULL
) YYERROR
;
1966 #line 344 "parser.y"
1968 (yyval
.sel
) = _gmx_sel_init_group_by_id((yyvsp
[(2) - (2)].i
), scanner
);
1969 if ((yyval
.sel
) == NULL
) YYERROR
;
1974 #line 351 "parser.y"
1975 { (yyval
.str
) = NULL
; ;}
1979 #line 352 "parser.y"
1980 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
1984 #line 357 "parser.y"
1986 (yyval
.sel
) = _gmx_sel_init_keyword((yyvsp
[(2) - (2)].meth
), NULL
, (yyvsp
[(1) - (2)].str
), scanner
);
1987 if ((yyval
.sel
) == NULL
) YYERROR
;
1992 #line 362 "parser.y"
1994 (yyval
.sel
) = _gmx_sel_init_keyword((yyvsp
[(2) - (3)].meth
), process_value_list((yyvsp
[(3) - (3)].val
), NULL
), (yyvsp
[(1) - (3)].str
), scanner
);
1995 if ((yyval
.sel
) == NULL
) YYERROR
;
2000 #line 367 "parser.y"
2002 (yyval
.sel
) = _gmx_sel_init_keyword((yyvsp
[(2) - (3)].meth
), process_value_list((yyvsp
[(3) - (3)].val
), NULL
), (yyvsp
[(1) - (3)].str
), scanner
);
2003 if ((yyval
.sel
) == NULL
) YYERROR
;
2008 #line 375 "parser.y"
2010 (yyval
.sel
) = _gmx_sel_init_method((yyvsp
[(2) - (3)].meth
), (yyvsp
[(3) - (3)].param
), (yyvsp
[(1) - (3)].str
), scanner
);
2011 if ((yyval
.sel
) == NULL
) YYERROR
;
2016 #line 387 "parser.y"
2018 (yyval
.sel
) = _gmx_selelem_create(SEL_CONST
);
2019 _gmx_selelem_set_vtype((yyval
.sel
), INT_VALUE
);
2020 _gmx_selvalue_reserve(&(yyval
.sel
)->v
, 1);
2021 (yyval
.sel
)->v
.u
.i
[0] = (yyvsp
[(1) - (1)].i
);
2026 #line 394 "parser.y"
2028 (yyval
.sel
) = _gmx_selelem_create(SEL_CONST
);
2029 _gmx_selelem_set_vtype((yyval
.sel
), REAL_VALUE
);
2030 _gmx_selvalue_reserve(&(yyval
.sel
)->v
, 1);
2031 (yyval
.sel
)->v
.u
.r
[0] = (yyvsp
[(1) - (1)].r
);
2036 #line 404 "parser.y"
2038 (yyval
.sel
) = _gmx_sel_init_keyword((yyvsp
[(2) - (2)].meth
), NULL
, (yyvsp
[(1) - (2)].str
), scanner
);
2039 if ((yyval
.sel
) == NULL
) YYERROR
;
2044 #line 409 "parser.y"
2046 (yyval
.sel
) = _gmx_sel_init_method((yyvsp
[(2) - (3)].meth
), (yyvsp
[(3) - (3)].param
), (yyvsp
[(1) - (3)].str
), scanner
);
2047 if ((yyval
.sel
) == NULL
) YYERROR
;
2052 #line 417 "parser.y"
2053 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), '+', scanner
); ;}
2057 #line 419 "parser.y"
2058 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), '-', scanner
); ;}
2062 #line 421 "parser.y"
2063 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), '*', scanner
); ;}
2067 #line 423 "parser.y"
2068 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), '/', scanner
); ;}
2072 #line 425 "parser.y"
2073 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(2) - (2)].sel
), NULL
, '-', scanner
); ;}
2077 #line 427 "parser.y"
2078 { (yyval
.sel
) = _gmx_sel_init_arithmetic((yyvsp
[(1) - (3)].sel
), (yyvsp
[(3) - (3)].sel
), '^', scanner
); ;}
2082 #line 428 "parser.y"
2083 { (yyval
.sel
) = (yyvsp
[(2) - (3)].sel
); ;}
2087 #line 436 "parser.y"
2089 (yyval
.sel
) = _gmx_selelem_create(SEL_CONST
);
2090 _gmx_selelem_set_vtype((yyval
.sel
), STR_VALUE
);
2091 _gmx_selvalue_reserve(&(yyval
.sel
)->v
, 1);
2092 (yyval
.sel
)->v
.u
.s
[0] = (yyvsp
[(1) - (1)].str
);
2097 #line 443 "parser.y"
2099 (yyval
.sel
) = _gmx_sel_init_keyword((yyvsp
[(2) - (2)].meth
), NULL
, (yyvsp
[(1) - (2)].str
), scanner
);
2100 if ((yyval
.sel
) == NULL
) YYERROR
;
2105 #line 455 "parser.y"
2106 { (yyval
.sel
) = _gmx_sel_init_const_position((yyvsp
[(2) - (7)].r
), (yyvsp
[(4) - (7)].r
), (yyvsp
[(6) - (7)].r
)); ;}
2110 #line 459 "parser.y"
2111 { (yyval
.sel
) = (yyvsp
[(2) - (3)].sel
); ;}
2115 #line 464 "parser.y"
2117 (yyval
.sel
) = _gmx_sel_init_method((yyvsp
[(1) - (2)].meth
), (yyvsp
[(2) - (2)].param
), NULL
, scanner
);
2118 if ((yyval
.sel
) == NULL
) YYERROR
;
2123 #line 472 "parser.y"
2125 (yyval
.sel
) = _gmx_sel_init_position((yyvsp
[(3) - (3)].sel
), (yyvsp
[(1) - (3)].str
), scanner
);
2126 if ((yyval
.sel
) == NULL
) YYERROR
;
2131 #line 483 "parser.y"
2132 { (yyval
.sel
) = _gmx_sel_init_variable_ref((yyvsp
[(1) - (1)].sel
)); ;}
2136 #line 487 "parser.y"
2137 { (yyval
.sel
) = _gmx_sel_init_variable_ref((yyvsp
[(1) - (1)].sel
)); ;}
2141 #line 491 "parser.y"
2142 { (yyval
.sel
) = _gmx_sel_init_variable_ref((yyvsp
[(1) - (1)].sel
)); ;}
2146 #line 500 "parser.y"
2147 { (yyval
.param
) = process_param_list((yyvsp
[(1) - (1)].param
)); ;}
2151 #line 502 "parser.y"
2152 { (yyval
.param
) = process_param_list((yyvsp
[(1) - (2)].param
)); ;}
2156 #line 506 "parser.y"
2157 { (yyval
.param
) = NULL
; ;}
2161 #line 508 "parser.y"
2162 { (yyvsp
[(2) - (2)].param
)->next
= (yyvsp
[(1) - (2)].param
); (yyval
.param
) = (yyvsp
[(2) - (2)].param
); ;}
2166 #line 513 "parser.y"
2168 (yyval
.param
) = _gmx_selexpr_create_param((yyvsp
[(1) - (2)].str
));
2169 (yyval
.param
)->value
= process_value_list((yyvsp
[(2) - (2)].val
), &(yyval
.param
)->nval
);
2174 #line 519 "parser.y"
2175 { (yyval
.val
) = NULL
; ;}
2179 #line 520 "parser.y"
2180 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2184 #line 521 "parser.y"
2185 { (yyval
.val
) = (yyvsp
[(2) - (3)].val
); ;}
2189 #line 525 "parser.y"
2190 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2194 #line 527 "parser.y"
2195 { (yyvsp
[(2) - (2)].val
)->next
= (yyvsp
[(1) - (2)].val
); (yyval
.val
) = (yyvsp
[(2) - (2)].val
); ;}
2199 #line 529 "parser.y"
2200 { (yyvsp
[(3) - (3)].val
)->next
= (yyvsp
[(1) - (3)].val
); (yyval
.val
) = (yyvsp
[(3) - (3)].val
); ;}
2204 #line 533 "parser.y"
2205 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2209 #line 534 "parser.y"
2210 { (yyval
.val
) = (yyvsp
[(2) - (3)].val
); ;}
2214 #line 538 "parser.y"
2215 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2219 #line 540 "parser.y"
2220 { (yyvsp
[(2) - (2)].val
)->next
= (yyvsp
[(1) - (2)].val
); (yyval
.val
) = (yyvsp
[(2) - (2)].val
); ;}
2224 #line 542 "parser.y"
2225 { (yyvsp
[(3) - (3)].val
)->next
= (yyvsp
[(1) - (3)].val
); (yyval
.val
) = (yyvsp
[(3) - (3)].val
); ;}
2229 #line 546 "parser.y"
2230 { (yyval
.val
) = _gmx_selexpr_create_value_expr((yyvsp
[(1) - (1)].sel
)); ;}
2234 #line 548 "parser.y"
2235 { (yyval
.val
) = _gmx_selexpr_create_value_expr((yyvsp
[(1) - (1)].sel
)); ;}
2239 #line 550 "parser.y"
2240 { (yyval
.val
) = _gmx_selexpr_create_value_expr((yyvsp
[(1) - (1)].sel
)); ;}
2244 #line 552 "parser.y"
2245 { (yyval
.val
) = _gmx_selexpr_create_value_expr((yyvsp
[(1) - (1)].sel
)); ;}
2249 #line 553 "parser.y"
2250 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2254 #line 558 "parser.y"
2256 (yyval
.val
) = _gmx_selexpr_create_value(INT_VALUE
);
2257 (yyval
.val
)->u
.i
.i1
= (yyval
.val
)->u
.i
.i2
= (yyvsp
[(1) - (1)].r
);
2262 #line 563 "parser.y"
2264 (yyval
.val
) = _gmx_selexpr_create_value(REAL_VALUE
);
2265 (yyval
.val
)->u
.r
.r1
= (yyval
.val
)->u
.r
.r2
= (yyvsp
[(1) - (1)].r
);
2270 #line 568 "parser.y"
2272 (yyval
.val
) = _gmx_selexpr_create_value(STR_VALUE
);
2273 (yyval
.val
)->u
.s
= (yyvsp
[(1) - (1)].str
);
2278 #line 572 "parser.y"
2279 { (yyval
.val
) = (yyvsp
[(1) - (1)].val
); ;}
2283 #line 577 "parser.y"
2285 (yyval
.val
) = _gmx_selexpr_create_value(INT_VALUE
);
2286 (yyval
.val
)->u
.i
.i1
= (yyvsp
[(1) - (3)].r
); (yyval
.val
)->u
.i
.i2
= (yyvsp
[(3) - (3)].r
);
2291 #line 582 "parser.y"
2293 (yyval
.val
) = _gmx_selexpr_create_value(REAL_VALUE
);
2294 (yyval
.val
)->u
.r
.r1
= (yyvsp
[(1) - (3)].r
); (yyval
.val
)->u
.r
.r2
= (yyvsp
[(3) - (3)].r
);
2299 #line 587 "parser.y"
2301 (yyval
.val
) = _gmx_selexpr_create_value(REAL_VALUE
);
2302 (yyval
.val
)->u
.r
.r1
= (yyvsp
[(1) - (3)].r
); (yyval
.val
)->u
.r
.r2
= (yyvsp
[(3) - (3)].r
);
2307 /* Line 1267 of yacc.c. */
2308 #line 2309 "parser.c"
2311 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2315 YY_STACK_PRINT (yyss
, yyssp
);
2320 /* Now `shift' the result of the reduction. Determine what state
2321 that goes to, based on the state we popped back to and the rule
2322 number reduced by. */
2326 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2327 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2328 yystate
= yytable
[yystate
];
2330 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2335 /*------------------------------------.
2336 | yyerrlab -- here on detecting error |
2337 `------------------------------------*/
2339 /* If not already recovering from an error, report this error. */
2343 #if ! YYERROR_VERBOSE
2344 yyerror (scanner
, YY_("syntax error"));
2347 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2348 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2350 YYSIZE_T yyalloc
= 2 * yysize
;
2351 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2352 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
2353 if (yymsg
!= yymsgbuf
)
2354 YYSTACK_FREE (yymsg
);
2355 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
2357 yymsg_alloc
= yyalloc
;
2361 yymsg_alloc
= sizeof yymsgbuf
;
2365 if (0 < yysize
&& yysize
<= yymsg_alloc
)
2367 (void) yysyntax_error (yymsg
, yystate
, yychar
);
2368 yyerror (scanner
, yymsg
);
2372 yyerror (scanner
, YY_("syntax error"));
2374 goto yyexhaustedlab
;
2382 if (yyerrstatus
== 3)
2384 /* If just tried and failed to reuse look-ahead token after an
2385 error, discard it. */
2387 if (yychar
<= YYEOF
)
2389 /* Return failure if at end of input. */
2390 if (yychar
== YYEOF
)
2395 yydestruct ("Error: discarding",
2396 yytoken
, &yylval
, scanner
);
2401 /* Else will try to reuse look-ahead token after shifting the error
2406 /*---------------------------------------------------.
2407 | yyerrorlab -- error raised explicitly by YYERROR. |
2408 `---------------------------------------------------*/
2411 /* Pacify compilers like GCC when the user code never invokes
2412 YYERROR and the label yyerrorlab therefore never appears in user
2414 if (/*CONSTCOND*/ 0)
2417 /* Do not reclaim the symbols of the rule which action triggered
2421 YY_STACK_PRINT (yyss
, yyssp
);
2426 /*-------------------------------------------------------------.
2427 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2428 `-------------------------------------------------------------*/
2430 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2434 yyn
= yypact
[yystate
];
2435 if (yyn
!= YYPACT_NINF
)
2438 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2446 /* Pop the current state because it cannot handle the error token. */
2451 yydestruct ("Error: popping",
2452 yystos
[yystate
], yyvsp
, scanner
);
2455 YY_STACK_PRINT (yyss
, yyssp
);
2464 /* Shift the error token. */
2465 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2471 /*-------------------------------------.
2472 | yyacceptlab -- YYACCEPT comes here. |
2473 `-------------------------------------*/
2478 /*-----------------------------------.
2479 | yyabortlab -- YYABORT comes here. |
2480 `-----------------------------------*/
2486 /*-------------------------------------------------.
2487 | yyexhaustedlab -- memory exhaustion comes here. |
2488 `-------------------------------------------------*/
2490 yyerror (scanner
, YY_("memory exhausted"));
2496 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
2497 yydestruct ("Cleanup: discarding lookahead",
2498 yytoken
, &yylval
, scanner
);
2499 /* Do not reclaim the symbols of the rule which action triggered
2500 this YYABORT or YYACCEPT. */
2502 YY_STACK_PRINT (yyss
, yyssp
);
2503 while (yyssp
!= yyss
)
2505 yydestruct ("Cleanup: popping",
2506 yystos
[*yyssp
], yyvsp
, scanner
);
2511 YYSTACK_FREE (yyss
);
2514 if (yymsg
!= yymsgbuf
)
2515 YYSTACK_FREE (yymsg
);
2517 /* Make sure YYID is used. */
2518 return YYID (yyresult
);
2522 #line 593 "parser.y"
2525 static t_selexpr_value
*
2526 process_value_list(t_selexpr_value
*values
, int *nr
)
2528 t_selexpr_value
*val
, *pval
, *nval
;
2530 /* Count values (if needed) and reverse list */
2553 static t_selexpr_param
*
2554 process_param_list(t_selexpr_param
*params
)
2556 t_selexpr_param
*par
, *ppar
, *npar
;
2574 yyerror(yyscan_t scanner
, char const *s
)
2576 _gmx_selparser_error("%s", s
);