Reformat existing LGPL copyright notices.
[alexxy/gromacs.git] / src / gromacs / selection / parser.cpp
1 /* A Bison parser, made by GNU Bison 2.6.2.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6    
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.6.2"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 1
54
55 /* Push parsers.  */
56 #define YYPUSH 1
57
58 /* Pull parsers.  */
59 #define YYPULL 0
60
61
62 /* Substitute the variable and function names.  */
63 #define yypush_parse    _gmx_sel_yypush_parse
64 #define yypstate_new    _gmx_sel_yypstate_new
65 #define yypstate_delete _gmx_sel_yypstate_delete
66 #define yypstate        _gmx_sel_yypstate
67 #define yylex           _gmx_sel_yylex
68 #define yyerror         _gmx_sel_yyerror
69 #define yylval          _gmx_sel_yylval
70 #define yychar          _gmx_sel_yychar
71 #define yydebug         _gmx_sel_yydebug
72 #define yynerrs         _gmx_sel_yynerrs
73
74 /* Copy the first part of user declarations.  */
75 /* Line 336 of yacc.c  */
76 #line 43 "parser.y"
77
78 /*! \internal \file parser.cpp
79  * \brief Generated (from parser.y by Bison) parser for the selection language.
80  *
81  * \ingroup module_selection
82  */
83 /*! \internal \file parser.h
84  * \brief Generated (from parser.y by Bison) parser include file.
85  *
86  * \ingroup module_selection
87  */
88 #include "gromacs/legacyheaders/smalloc.h"
89
90 #include "parser_internal.h"
91
92 using gmx::scoped_ptr_sfree;
93 using gmx::SelectionParserValue;
94 using gmx::SelectionParserValueList;
95 using gmx::SelectionParserValueListPointer;
96 using gmx::SelectionParserParameter;
97 using gmx::SelectionParserParameterList;
98 using gmx::SelectionParserParameterListPointer;
99 using gmx::SelectionTreeElement;
100 using gmx::SelectionTreeElementPointer;
101
102 #ifdef _MSC_VER
103 #pragma warning(disable: 4065)
104 #endif
105
106 /* Line 336 of yacc.c  */
107 #line 108 "parser.cpp"
108
109 # ifndef YY_NULL
110 #  if defined __cplusplus && 201103L <= __cplusplus
111 #   define YY_NULL nullptr
112 #  else
113 #   define YY_NULL 0
114 #  endif
115 # endif
116
117 /* Enabling verbose error messages.  */
118 #ifdef YYERROR_VERBOSE
119 # undef YYERROR_VERBOSE
120 # define YYERROR_VERBOSE 1
121 #else
122 # define YYERROR_VERBOSE 0
123 #endif
124
125 /* In a future release of Bison, this section will be replaced
126    by #include "parser.h".  */
127 #ifndef _GMX_SEL_YY_PARSER_H
128 # define _GMX_SEL_YY_PARSER_H
129 /* Enabling traces.  */
130 #ifndef YYDEBUG
131 # define YYDEBUG 1
132 #endif
133 #if YYDEBUG
134 extern int _gmx_sel_yydebug;
135 #endif
136 /* "%code requires" blocks.  */
137 /* Line 350 of yacc.c  */
138 #line 1 "parser.y"
139
140 /*
141  * This file is part of the GROMACS molecular simulation package.
142  *
143  * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
144  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
145  * and including many others, as listed in the AUTHORS file in the
146  * top-level source directory and at http://www.gromacs.org.
147  *
148  * GROMACS is free software; you can redistribute it and/or
149  * modify it under the terms of the GNU Lesser General Public License
150  * as published by the Free Software Foundation; either version 2.1
151  * of the License, or (at your option) any later version.
152  *
153  * GROMACS is distributed in the hope that it will be useful,
154  * but WITHOUT ANY WARRANTY; without even the implied warranty of
155  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
156  * Lesser General Public License for more details.
157  *
158  * You should have received a copy of the GNU Lesser General Public
159  * License along with GROMACS; if not, see
160  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
161  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
162  *
163  * If you want to redistribute modifications to GROMACS, please
164  * consider that scientific software is very special. Version
165  * control is crucial - bugs must be traceable. We will be happy to
166  * consider code for inclusion in the official distribution, but
167  * derived work must not be called official GROMACS. Details are found
168  * in the README & COPYING files - if they are missing, get the
169  * official version at http://www.gromacs.org.
170  *
171  * To help us fund GROMACS development, we humbly ask that you cite
172  * the research papers on the package. Check out http://www.gromacs.org.
173  */
174
175 /* Line 350 of yacc.c  */
176 #line 73 "parser.y"
177
178 #include "parsetree.h"
179 #include "selelem.h"
180
181
182 /* Line 350 of yacc.c  */
183 #line 184 "parser.cpp"
184
185 /* Tokens.  */
186 #ifndef YYTOKENTYPE
187 # define YYTOKENTYPE
188    /* Put the tokens into the symbol table, so that GDB and other debuggers
189       know about them.  */
190    enum yytokentype {
191      INVALID = 258,
192      HELP = 259,
193      HELP_TOPIC = 260,
194      TOK_INT = 261,
195      TOK_REAL = 262,
196      STR = 263,
197      IDENTIFIER = 264,
198      CMD_SEP = 265,
199      GROUP = 266,
200      TO = 267,
201      VARIABLE_NUMERIC = 268,
202      VARIABLE_GROUP = 269,
203      VARIABLE_POS = 270,
204      KEYWORD_NUMERIC = 271,
205      KEYWORD_STR = 272,
206      KEYWORD_POS = 273,
207      KEYWORD_GROUP = 274,
208      METHOD_NUMERIC = 275,
209      METHOD_GROUP = 276,
210      METHOD_POS = 277,
211      MODIFIER = 278,
212      EMPTY_POSMOD = 279,
213      PARAM = 280,
214      END_OF_METHOD = 281,
215      OF = 282,
216      CMP_OP = 283,
217      PARAM_REDUCT = 284,
218      XOR = 285,
219      OR = 286,
220      AND = 287,
221      NOT = 288,
222      UNARY_NEG = 289,
223      NUM_REDUCT = 290
224    };
225 #endif
226
227
228 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
229 typedef union YYSTYPE
230 {
231 /* Line 350 of yacc.c  */
232 #line 78 "parser.y"
233
234     int                         i;
235     real                        r;
236     char                       *str;
237     struct gmx_ana_selmethod_t *meth;
238
239     gmx::SelectionStringMatchType                smt;
240
241     gmx::SelectionTreeElementPointer            *sel;
242     gmx::SelectionParserValue                   *val;
243     gmx::SelectionParserValueListPointer        *vlist;
244     gmx::SelectionParserParameter               *param;
245     gmx::SelectionParserParameterListPointer    *plist;
246
247
248 /* Line 350 of yacc.c  */
249 #line 250 "parser.cpp"
250 } YYSTYPE;
251 # define YYSTYPE_IS_TRIVIAL 1
252 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
253 # define YYSTYPE_IS_DECLARED 1
254 #endif
255
256
257 #ifndef YYPUSH_MORE_DEFINED
258 # define YYPUSH_MORE_DEFINED
259 enum { YYPUSH_MORE = 4 };
260 #endif
261
262 typedef struct _gmx_sel_yypstate _gmx_sel_yypstate;
263
264 #if defined __STDC__ || defined __cplusplus
265 int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, void *scanner);
266 #else
267 int _gmx_sel_yypush_parse ();
268 #endif
269
270 #if defined __STDC__ || defined __cplusplus
271 _gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
272 #else
273 _gmx_sel_yypstate * _gmx_sel_yypstate_new ();
274 #endif
275 #if defined __STDC__ || defined __cplusplus
276 void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
277 #else
278 void _gmx_sel_yypstate_delete ();
279 #endif
280
281 #endif /* !_GMX_SEL_YY_PARSER_H  */
282
283 /* Copy the second part of user declarations.  */
284
285 /* Line 353 of yacc.c  */
286 #line 287 "parser.cpp"
287
288 #ifdef short
289 # undef short
290 #endif
291
292 #ifdef YYTYPE_UINT8
293 typedef YYTYPE_UINT8 yytype_uint8;
294 #else
295 typedef unsigned char yytype_uint8;
296 #endif
297
298 #ifdef YYTYPE_INT8
299 typedef YYTYPE_INT8 yytype_int8;
300 #elif (defined __STDC__ || defined __C99__FUNC__ \
301      || defined __cplusplus || defined _MSC_VER)
302 typedef signed char yytype_int8;
303 #else
304 typedef short int yytype_int8;
305 #endif
306
307 #ifdef YYTYPE_UINT16
308 typedef YYTYPE_UINT16 yytype_uint16;
309 #else
310 typedef unsigned short int yytype_uint16;
311 #endif
312
313 #ifdef YYTYPE_INT16
314 typedef YYTYPE_INT16 yytype_int16;
315 #else
316 typedef short int yytype_int16;
317 #endif
318
319 #ifndef YYSIZE_T
320 # ifdef __SIZE_TYPE__
321 #  define YYSIZE_T __SIZE_TYPE__
322 # elif defined size_t
323 #  define YYSIZE_T size_t
324 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
325      || defined __cplusplus || defined _MSC_VER)
326 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
327 #  define YYSIZE_T size_t
328 # else
329 #  define YYSIZE_T unsigned int
330 # endif
331 #endif
332
333 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
334
335 #ifndef YY_
336 # if defined YYENABLE_NLS && YYENABLE_NLS
337 #  if ENABLE_NLS
338 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
339 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
340 #  endif
341 # endif
342 # ifndef YY_
343 #  define YY_(msgid) msgid
344 # endif
345 #endif
346
347 /* Suppress unused-variable warnings by "using" E.  */
348 #if ! defined lint || defined __GNUC__
349 # define YYUSE(e) ((void) (e))
350 #else
351 # define YYUSE(e) /* empty */
352 #endif
353
354 /* Identity function, used to suppress warnings about constant conditions.  */
355 #ifndef lint
356 # define YYID(n) (n)
357 #else
358 #if (defined __STDC__ || defined __C99__FUNC__ \
359      || defined __cplusplus || defined _MSC_VER)
360 static int
361 YYID (int yyi)
362 #else
363 static int
364 YYID (yyi)
365     int yyi;
366 #endif
367 {
368   return yyi;
369 }
370 #endif
371
372 #if ! defined yyoverflow || YYERROR_VERBOSE
373
374 /* The parser invokes alloca or malloc; define the necessary symbols.  */
375
376 # ifdef YYSTACK_ALLOC
377    /* Pacify GCC's `empty if-body' warning.  */
378 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
379 #  ifndef YYSTACK_ALLOC_MAXIMUM
380     /* The OS might guarantee only one guard page at the bottom of the stack,
381        and a page size can be as small as 4096 bytes.  So we cannot safely
382        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
383        to allow for a few compiler-allocated temporary stack slots.  */
384 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
385 #  endif
386 # else
387 #  define YYSTACK_ALLOC YYMALLOC
388 #  define YYSTACK_FREE YYFREE
389 #  ifndef YYSTACK_ALLOC_MAXIMUM
390 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
391 #  endif
392 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
393        && ! ((defined YYMALLOC || defined malloc) \
394              && (defined YYFREE || defined free)))
395 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
396 #   ifndef EXIT_SUCCESS
397 #    define EXIT_SUCCESS 0
398 #   endif
399 #  endif
400 #  ifndef YYMALLOC
401 #   define YYMALLOC malloc
402 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
403      || defined __cplusplus || defined _MSC_VER)
404 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
405 #   endif
406 #  endif
407 #  ifndef YYFREE
408 #   define YYFREE free
409 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
410      || defined __cplusplus || defined _MSC_VER)
411 void free (void *); /* INFRINGES ON USER NAME SPACE */
412 #   endif
413 #  endif
414 # endif
415 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
416
417
418 #if (! defined yyoverflow \
419      && (! defined __cplusplus \
420          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
421
422 /* A type that is properly aligned for any stack member.  */
423 union yyalloc
424 {
425   yytype_int16 yyss_alloc;
426   YYSTYPE yyvs_alloc;
427 };
428
429 /* The size of the maximum gap between one aligned stack and the next.  */
430 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
431
432 /* The size of an array large to enough to hold all stacks, each with
433    N elements.  */
434 # define YYSTACK_BYTES(N) \
435      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
436       + YYSTACK_GAP_MAXIMUM)
437
438 # define YYCOPY_NEEDED 1
439
440 /* Relocate STACK from its old location to the new one.  The
441    local variables YYSIZE and YYSTACKSIZE give the old and new number of
442    elements in the stack, and YYPTR gives the new location of the
443    stack.  Advance YYPTR to a properly aligned location for the next
444    stack.  */
445 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
446     do                                                                  \
447       {                                                                 \
448         YYSIZE_T yynewbytes;                                            \
449         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
450         Stack = &yyptr->Stack_alloc;                                    \
451         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
452         yyptr += yynewbytes / sizeof (*yyptr);                          \
453       }                                                                 \
454     while (YYID (0))
455
456 #endif
457
458 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
459 /* Copy COUNT objects from SRC to DST.  The source and destination do
460    not overlap.  */
461 # ifndef YYCOPY
462 #  if defined __GNUC__ && 1 < __GNUC__
463 #   define YYCOPY(Dst, Src, Count) \
464       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
465 #  else
466 #   define YYCOPY(Dst, Src, Count)              \
467       do                                        \
468         {                                       \
469           YYSIZE_T yyi;                         \
470           for (yyi = 0; yyi < (Count); yyi++)   \
471             (Dst)[yyi] = (Src)[yyi];            \
472         }                                       \
473       while (YYID (0))
474 #  endif
475 # endif
476 #endif /* !YYCOPY_NEEDED */
477
478 /* YYFINAL -- State number of the termination state.  */
479 #define YYFINAL  2
480 /* YYLAST -- Last index in YYTABLE.  */
481 #define YYLAST   361
482
483 /* YYNTOKENS -- Number of terminals.  */
484 #define YYNTOKENS  51
485 /* YYNNTS -- Number of nonterminals.  */
486 #define YYNNTS  27
487 /* YYNRULES -- Number of rules.  */
488 #define YYNRULES  93
489 /* YYNRULES -- Number of states.  */
490 #define YYNSTATES  153
491
492 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
493 #define YYUNDEFTOK  2
494 #define YYMAXUTOK   290
495
496 #define YYTRANSLATE(YYX)                                                \
497   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
498
499 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
500 static const yytype_uint8 yytranslate[] =
501 {
502        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
503        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
504        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
505        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
506       42,    43,    36,    34,    47,    35,     2,    37,     2,     2,
507        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
508        2,    41,     2,    45,     2,     2,     2,     2,     2,     2,
509        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
510        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
511        2,    46,     2,    48,    39,     2,     2,     2,     2,     2,
512        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
513        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
514        2,     2,     2,    49,     2,    50,    44,     2,     2,     2,
515        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
516        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
517        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
518        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
519        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
520        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
521        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
522        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
523        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
524        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
525        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
526        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
527        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
528        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
529       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
530       25,    26,    27,    28,    29,    30,    31,    32,    33,    38,
531       40
532 };
533
534 #if YYDEBUG
535 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
536    YYRHS.  */
537 static const yytype_uint16 yyprhs[] =
538 {
539        0,     0,     3,     4,     7,    10,    13,    14,    16,    18,
540       20,    22,    25,    29,    33,    37,    40,    41,    44,    46,
541       48,    52,    56,    58,    61,    63,    66,    68,    70,    72,
542       74,    77,    81,    85,    89,    93,    96,    99,   101,   103,
543      105,   107,   109,   112,   116,   121,   125,   129,   131,   133,
544      136,   140,   144,   148,   152,   156,   159,   163,   167,   169,
545      172,   180,   184,   187,   191,   193,   195,   197,   199,   202,
546      203,   206,   209,   211,   215,   216,   219,   223,   225,   229,
547      231,   234,   238,   240,   242,   244,   246,   248,   250,   252,
548      254,   256,   260,   264
549 };
550
551 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
552 static const yytype_int8 yyrhs[] =
553 {
554       52,     0,    -1,    -1,    52,    53,    -1,    54,    10,    -1,
555        1,    10,    -1,    -1,    55,    -1,     6,    -1,    61,    -1,
556       57,    -1,    61,    57,    -1,     9,    41,    62,    -1,     9,
557       41,    65,    -1,     9,    41,    67,    -1,     4,    56,    -1,
558       -1,    56,     5,    -1,    67,    -1,    62,    -1,    42,    57,
559       43,    -1,    57,    23,    68,    -1,     6,    -1,    35,     6,
560       -1,     7,    -1,    35,     7,    -1,    58,    -1,    59,    -1,
561        8,    -1,     9,    -1,    33,    62,    -1,    62,    32,    62,
562       -1,    62,    31,    62,    -1,    42,    62,    43,    -1,    65,
563       28,    65,    -1,    11,    61,    -1,    11,     6,    -1,    24,
564       -1,    18,    -1,    44,    -1,    45,    -1,    41,    -1,    63,
565       19,    -1,    63,    17,    73,    -1,    63,    17,    64,    73,
566       -1,    63,    16,    73,    -1,    63,    21,    68,    -1,     6,
567       -1,     7,    -1,    63,    16,    -1,    63,    20,    68,    -1,
568       65,    34,    65,    -1,    65,    35,    65,    -1,    65,    36,
569       65,    -1,    65,    37,    65,    -1,    35,    65,    -1,    65,
570       39,    65,    -1,    42,    65,    43,    -1,    61,    -1,    63,
571       17,    -1,    46,    60,    47,    60,    47,    60,    48,    -1,
572       42,    67,    43,    -1,    22,    68,    -1,    18,    27,    62,
573       -1,    14,    -1,    13,    -1,    15,    -1,    69,    -1,    69,
574       26,    -1,    -1,    69,    70,    -1,    25,    71,    -1,    72,
575       -1,    49,    72,    50,    -1,    -1,    72,    75,    -1,    72,
576       47,    75,    -1,    74,    -1,    49,    74,    50,    -1,    76,
577       -1,    74,    76,    -1,    74,    47,    76,    -1,    62,    -1,
578       67,    -1,    65,    -1,    66,    -1,    77,    -1,    58,    -1,
579       59,    -1,    61,    -1,    77,    -1,    58,    12,    58,    -1,
580       58,    12,    59,    -1,    59,    12,    60,    -1
581 };
582
583 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
584 static const yytype_uint16 yyrline[] =
585 {
586        0,   199,   199,   204,   215,   216,   238,   244,   250,   261,
587      273,   279,   286,   293,   300,   311,   320,   325,   336,   337,
588      344,   345,   359,   360,   364,   365,   368,   369,   372,   373,
589      381,   392,   403,   414,   418,   429,   436,   445,   446,   451,
590      452,   453,   457,   465,   473,   481,   492,   507,   518,   532,
591      540,   551,   557,   563,   569,   575,   581,   587,   594,   605,
592      620,   629,   633,   643,   657,   665,   673,   686,   688,   694,
593      699,   710,   719,   720,   725,   730,   738,   749,   750,   754,
594      760,   768,   778,   784,   790,   796,   802,   806,   812,   818,
595      825,   829,   835,   841
596 };
597 #endif
598
599 #if YYDEBUG || YYERROR_VERBOSE || 0
600 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
601    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
602 static const char *const yytname[] =
603 {
604   "$end", "error", "$undefined", "INVALID", "HELP", "HELP_TOPIC",
605   "TOK_INT", "TOK_REAL", "STR", "IDENTIFIER", "CMD_SEP", "GROUP", "TO",
606   "VARIABLE_NUMERIC", "VARIABLE_GROUP", "VARIABLE_POS", "KEYWORD_NUMERIC",
607   "KEYWORD_STR", "KEYWORD_POS", "KEYWORD_GROUP", "METHOD_NUMERIC",
608   "METHOD_GROUP", "METHOD_POS", "MODIFIER", "EMPTY_POSMOD", "PARAM",
609   "END_OF_METHOD", "OF", "CMP_OP", "PARAM_REDUCT", "XOR", "OR", "AND",
610   "NOT", "'+'", "'-'", "'*'", "'/'", "UNARY_NEG", "'^'", "NUM_REDUCT",
611   "'='", "'('", "')'", "'~'", "'?'", "'['", "','", "']'", "'{'", "'}'",
612   "$accept", "commands", "command", "cmd_plain", "help_request",
613   "help_topic", "selection", "integer_number", "real_number", "number",
614   "string", "sel_expr", "pos_mod", "str_match_type", "num_expr",
615   "str_expr", "pos_expr", "method_params", "method_param_list",
616   "method_param", "value_list", "value_list_contents", "basic_value_list",
617   "basic_value_list_contents", "value_item", "basic_value_item",
618   "value_item_range", YY_NULL
619 };
620 #endif
621
622 # ifdef YYPRINT
623 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
624    token YYLEX-NUM.  */
625 static const yytype_uint16 yytoknum[] =
626 {
627        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
628      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
629      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
630      285,   286,   287,   288,    43,    45,    42,    47,   289,    94,
631      290,    61,    40,    41,   126,    63,    91,    44,    93,   123,
632      125
633 };
634 # endif
635
636 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
637 static const yytype_uint8 yyr1[] =
638 {
639        0,    51,    52,    52,    53,    53,    54,    54,    54,    54,
640       54,    54,    54,    54,    54,    55,    56,    56,    57,    57,
641       57,    57,    58,    58,    59,    59,    60,    60,    61,    61,
642       62,    62,    62,    62,    62,    62,    62,    63,    63,    64,
643       64,    64,    62,    62,    62,    62,    62,    65,    65,    65,
644       65,    65,    65,    65,    65,    65,    65,    65,    66,    66,
645       67,    67,    67,    67,    62,    65,    67,    68,    68,    69,
646       69,    70,    71,    71,    72,    72,    72,    73,    73,    74,
647       74,    74,    75,    75,    75,    75,    75,    76,    76,    76,
648       76,    77,    77,    77
649 };
650
651 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
652 static const yytype_uint8 yyr2[] =
653 {
654        0,     2,     0,     2,     2,     2,     0,     1,     1,     1,
655        1,     2,     3,     3,     3,     2,     0,     2,     1,     1,
656        3,     3,     1,     2,     1,     2,     1,     1,     1,     1,
657        2,     3,     3,     3,     3,     2,     2,     1,     1,     1,
658        1,     1,     2,     3,     4,     3,     3,     1,     1,     2,
659        3,     3,     3,     3,     3,     2,     3,     3,     1,     2,
660        7,     3,     2,     3,     1,     1,     1,     1,     2,     0,
661        2,     2,     1,     3,     0,     2,     3,     1,     3,     1,
662        2,     3,     1,     1,     1,     1,     1,     1,     1,     1,
663        1,     3,     3,     3
664 };
665
666 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
667    Performed when YYTABLE doesn't specify something else to do.  Zero
668    means the default is an error.  */
669 static const yytype_uint8 yydefact[] =
670 {
671        2,     0,     1,     0,    16,    47,    48,    28,    29,     0,
672       65,    64,    66,    38,    69,    37,     0,     0,     0,     0,
673        3,     0,     7,    10,     9,    19,     0,     0,    18,     5,
674       15,     0,    36,    29,    35,     0,    62,    67,    47,    38,
675        0,    30,     0,     0,    55,     0,    19,     0,    18,    22,
676       24,     0,    26,    27,     0,     4,    69,    11,     0,     0,
677       49,     0,    42,    69,    69,     0,     0,     0,     0,     0,
678        0,    17,     0,    12,    13,    14,    63,    74,    68,    70,
679        0,     0,    49,    20,    33,    57,    61,    23,    25,     0,
680       21,    32,    31,     0,    87,    88,    89,    45,    77,    79,
681       90,    41,    39,    40,     0,    43,    50,    46,    34,    51,
682       52,    53,    54,    56,     0,    74,    71,    72,     0,     0,
683        0,     0,     0,    80,    44,     0,    47,    48,     0,     0,
684        0,     0,    58,    82,     0,    84,    85,    83,    75,    86,
685        0,    78,    91,    92,    93,    81,    73,    47,    48,    76,
686       59,     0,    60
687 };
688
689 /* YYDEFGOTO[NTERM-NUM].  */
690 static const yytype_int16 yydefgoto[] =
691 {
692       -1,     1,    20,    21,    22,    30,    23,    94,    95,    54,
693       96,   133,    26,   104,    27,   136,   137,    36,    37,    79,
694      116,   117,   105,    98,   138,    99,   100
695 };
696
697 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
698    STATE-NUM.  */
699 #define YYPACT_NINF -95
700 static const yytype_int16 yypact[] =
701 {
702      -95,   134,   -95,     2,   -95,     4,   -95,   -95,   -17,   145,
703      -95,   -95,   -95,     1,   -95,   -95,   283,   299,   246,    20,
704      -95,    23,   -95,    18,   246,    87,   323,   150,   -95,   -95,
705       44,   269,   -95,   -95,   -95,   283,   -95,    57,   -95,   -95,
706      283,   -95,   299,    78,    15,    19,   -22,   193,    58,   -95,
707      -95,   167,   -95,   -95,    59,   -95,   -95,    18,   283,   283,
708       81,    51,   -95,   -95,   -95,   299,   299,   299,   299,   299,
709      299,   -95,   269,    87,   150,   -95,    87,    61,   -95,   -95,
710      -22,   293,   -95,   -95,   -95,   -95,   -95,   -95,   -95,    20,
711      -95,    76,   -95,    11,   102,   108,   -95,   -95,   187,   -95,
712      -95,   -95,   -95,   -95,   153,   -95,   -95,   -95,   315,   161,
713      161,    15,    15,    15,    58,   -95,   -95,   202,    82,    -3,
714       20,    20,    11,   -95,   -95,   157,   119,   127,   313,   232,
715      102,   108,   -95,    87,   340,   315,   -95,   -95,   -95,   -95,
716       20,   -95,   -95,   -95,   -95,   -95,   -95,   138,   143,   -95,
717       51,    98,   -95
718 };
719
720 /* YYPGOTO[NTERM-NUM].  */
721 static const yytype_int8 yypgoto[] =
722 {
723      -95,   -95,   -95,   -95,   -95,   -95,    67,   -18,    -8,   -87,
724       -1,    21,     8,   -95,    -2,   -95,    12,    41,   -95,   -95,
725      -95,    42,   -53,    84,    53,   -50,   -94
726 };
727
728 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
729    positive, shift that token.  If negative, reduce the rule which
730    number is the opposite.  If YYTABLE_NINF, syntax error.  */
731 #define YYTABLE_NINF -26
732 static const yytype_int16 yytable[] =
733 {
734       24,    52,   118,    49,    50,     7,    33,    97,    34,    58,
735       59,    53,    29,    28,    -8,    44,    47,    49,    50,     7,
736       33,    84,    25,   139,    31,    43,    49,    50,    35,    74,
737       48,   139,    51,    55,   144,   139,    28,    41,    47,    46,
738       81,    56,    56,    75,   122,    25,    51,   141,   123,    71,
739       43,   124,    73,   151,    70,    51,    76,    49,    50,     7,
740       33,    80,    83,   108,   109,   110,   111,   112,   113,   123,
741       47,    52,   145,    43,    43,    43,    43,    43,    43,    91,
742       92,    53,    77,    78,   114,    45,    51,    49,    50,     7,
743       33,    57,   101,    80,    82,   102,   103,    90,    63,   130,
744       93,    86,   142,    52,   106,   107,    89,   130,    59,   131,
745      115,   130,   143,    53,   120,   135,   132,   131,    58,    59,
746      121,   131,    52,   135,   132,   134,    44,   135,   132,   140,
747       93,   -22,    53,   134,     2,     3,    43,   134,     4,   -24,
748        5,     6,     7,     8,    -6,     9,   152,    10,    11,    12,
749      -23,    32,    13,     7,    33,   -25,    14,   125,    15,    49,
750       50,     7,    33,   126,   127,     7,    33,    16,     9,    17,
751       10,    11,    12,    87,    88,    13,    18,   119,    65,    14,
752       19,    15,   149,     0,    66,    67,    68,    69,    51,    70,
753       16,     0,   128,    49,    50,     7,    33,    68,    69,    72,
754       70,     0,    93,    19,   129,     0,     0,   146,   126,   127,
755        7,    33,     0,     9,     0,    10,    11,    12,     0,     0,
756       13,    65,    51,     0,    14,     0,    15,    66,    67,    68,
757       69,     0,    70,     0,   122,    16,    85,   128,   126,   127,
758        7,    33,     0,     9,    72,    10,    11,    12,    19,   129,
759       13,     0,    38,     6,    14,     0,    15,     9,     0,    10,
760       11,    12,     0,     0,    13,    16,     0,   128,    14,     0,
761       15,     0,     0,     0,    72,    38,     6,     0,    19,    16,
762        9,    17,    10,    11,    12,     0,     0,    13,    18,    38,
763        6,    14,    19,    15,     9,     0,    10,    11,     0,     0,
764        0,    39,    16,     0,    17,    38,     6,    15,     0,     0,
765        0,    72,    10,     0,     0,    19,    16,    39,    17,   147,
766      148,     0,     0,    15,     0,    40,    10,    66,    67,    68,
767       69,    39,    70,     0,    17,     0,    85,    15,     0,    60,
768       61,    42,    62,    63,    64,     0,     0,     0,    17,    66,
769       67,    68,    69,     0,    70,    42,    60,   150,     0,    62,
770       63,    64
771 };
772
773 #define yypact_value_is_default(yystate) \
774   ((yystate) == (-95))
775
776 #define yytable_value_is_error(yytable_value) \
777   YYID (0)
778
779 static const yytype_int16 yycheck[] =
780 {
781        1,    19,    89,     6,     7,     8,     9,    60,     9,    31,
782       32,    19,    10,     1,    10,    17,    18,     6,     7,     8,
783        9,    43,     1,   117,    41,    17,     6,     7,    27,    31,
784       18,   125,    35,    10,   121,   129,    24,    16,    40,    18,
785       42,    23,    23,    31,    47,    24,    35,    50,    98,     5,
786       42,   104,    31,   140,    39,    35,    35,     6,     7,     8,
787        9,    40,    43,    65,    66,    67,    68,    69,    70,   119,
788       72,    89,   122,    65,    66,    67,    68,    69,    70,    58,
789       59,    89,    25,    26,    72,    18,    35,     6,     7,     8,
790        9,    24,    41,    72,    16,    44,    45,    56,    20,   117,
791       49,    43,   120,   121,    63,    64,    47,   125,    32,   117,
792       49,   129,   120,   121,    12,   117,   117,   125,    31,    32,
793       12,   129,   140,   125,   125,   117,   128,   129,   129,    47,
794       49,    12,   140,   125,     0,     1,   128,   129,     4,    12,
795        6,     7,     8,     9,    10,    11,    48,    13,    14,    15,
796       12,     6,    18,     8,     9,    12,    22,   115,    24,     6,
797        7,     8,     9,     6,     7,     8,     9,    33,    11,    35,
798       13,    14,    15,     6,     7,    18,    42,    93,    28,    22,
799       46,    24,   129,    -1,    34,    35,    36,    37,    35,    39,
800       33,    -1,    35,     6,     7,     8,     9,    36,    37,    42,
801       39,    -1,    49,    46,    47,    -1,    -1,    50,     6,     7,
802        8,     9,    -1,    11,    -1,    13,    14,    15,    -1,    -1,
803       18,    28,    35,    -1,    22,    -1,    24,    34,    35,    36,
804       37,    -1,    39,    -1,    47,    33,    43,    35,     6,     7,
805        8,     9,    -1,    11,    42,    13,    14,    15,    46,    47,
806       18,    -1,     6,     7,    22,    -1,    24,    11,    -1,    13,
807       14,    15,    -1,    -1,    18,    33,    -1,    35,    22,    -1,
808       24,    -1,    -1,    -1,    42,     6,     7,    -1,    46,    33,
809       11,    35,    13,    14,    15,    -1,    -1,    18,    42,     6,
810        7,    22,    46,    24,    11,    -1,    13,    14,    -1,    -1,
811       -1,    18,    33,    -1,    35,     6,     7,    24,    -1,    -1,
812       -1,    42,    13,    -1,    -1,    46,    33,    18,    35,     6,
813        7,    -1,    -1,    24,    -1,    42,    13,    34,    35,    36,
814       37,    18,    39,    -1,    35,    -1,    43,    24,    -1,    16,
815       17,    42,    19,    20,    21,    -1,    -1,    -1,    35,    34,
816       35,    36,    37,    -1,    39,    42,    16,    17,    -1,    19,
817       20,    21
818 };
819
820 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
821    symbol of state STATE-NUM.  */
822 static const yytype_uint8 yystos[] =
823 {
824        0,    52,     0,     1,     4,     6,     7,     8,     9,    11,
825       13,    14,    15,    18,    22,    24,    33,    35,    42,    46,
826       53,    54,    55,    57,    61,    62,    63,    65,    67,    10,
827       56,    41,     6,     9,    61,    27,    68,    69,     6,    18,
828       42,    62,    42,    63,    65,    57,    62,    65,    67,     6,
829        7,    35,    58,    59,    60,    10,    23,    57,    31,    32,
830       16,    17,    19,    20,    21,    28,    34,    35,    36,    37,
831       39,     5,    42,    62,    65,    67,    62,    25,    26,    70,
832       62,    65,    16,    43,    43,    43,    43,     6,     7,    47,
833       68,    62,    62,    49,    58,    59,    61,    73,    74,    76,
834       77,    41,    44,    45,    64,    73,    68,    68,    65,    65,
835       65,    65,    65,    65,    67,    49,    71,    72,    60,    74,
836       12,    12,    47,    76,    73,    72,     6,     7,    35,    47,
837       58,    59,    61,    62,    63,    65,    66,    67,    75,    77,
838       47,    50,    58,    59,    60,    76,    50,     6,     7,    75,
839       17,    60,    48
840 };
841
842 #define yyerrok         (yyerrstatus = 0)
843 #define yyclearin       (yychar = YYEMPTY)
844 #define YYEMPTY         (-2)
845 #define YYEOF           0
846
847 #define YYACCEPT        goto yyacceptlab
848 #define YYABORT         goto yyabortlab
849 #define YYERROR         goto yyerrorlab
850
851
852 /* Like YYERROR except do call yyerror.  This remains here temporarily
853    to ease the transition to the new meaning of YYERROR, for GCC.
854    Once GCC version 2 has supplanted version 1, this can go.  However,
855    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
856    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
857    discussed.  */
858
859 #define YYFAIL          goto yyerrlab
860 #if defined YYFAIL
861   /* This is here to suppress warnings from the GCC cpp's
862      -Wunused-macros.  Normally we don't worry about that warning, but
863      some users do, and we want to make it easy for users to remove
864      YYFAIL uses, which will produce warnings from Bison 2.5.  */
865 #endif
866
867 #define YYRECOVERING()  (!!yyerrstatus)
868
869 #define YYBACKUP(Token, Value)                                  \
870 do                                                              \
871   if (yychar == YYEMPTY)                                        \
872     {                                                           \
873       yychar = (Token);                                         \
874       yylval = (Value);                                         \
875       YYPOPSTACK (yylen);                                       \
876       yystate = *yyssp;                                         \
877       goto yybackup;                                            \
878     }                                                           \
879   else                                                          \
880     {                                                           \
881       yyerror (scanner, YY_("syntax error: cannot back up")); \
882       YYERROR;                                                  \
883     }                                                           \
884 while (YYID (0))
885
886
887 #define YYTERROR        1
888 #define YYERRCODE       256
889
890 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
891    If N is 0, then set CURRENT to the empty location which ends
892    the previous symbol: RHS[0] (always defined).  */
893
894 #ifndef YYLLOC_DEFAULT
895 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
896     do                                                                  \
897       if (YYID (N))                                                     \
898         {                                                               \
899           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
900           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
901           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
902           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
903         }                                                               \
904       else                                                              \
905         {                                                               \
906           (Current).first_line   = (Current).last_line   =              \
907             YYRHSLOC (Rhs, 0).last_line;                                \
908           (Current).first_column = (Current).last_column =              \
909             YYRHSLOC (Rhs, 0).last_column;                              \
910         }                                                               \
911     while (YYID (0))
912 #endif
913
914 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
915
916
917
918 /* This macro is provided for backward compatibility. */
919
920 #ifndef YY_LOCATION_PRINT
921 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
922 #endif
923
924
925 /* YYLEX -- calling `yylex' with the right arguments.  */
926
927 #ifdef YYLEX_PARAM
928 # define YYLEX yylex (&yylval, YYLEX_PARAM)
929 #else
930 # define YYLEX yylex (&yylval)
931 #endif
932
933 /* Enable debugging if requested.  */
934 #if YYDEBUG
935
936 # ifndef YYFPRINTF
937 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
938 #  define YYFPRINTF fprintf
939 # endif
940
941 # define YYDPRINTF(Args)                        \
942 do {                                            \
943   if (yydebug)                                  \
944     YYFPRINTF Args;                             \
945 } while (YYID (0))
946
947 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
948 do {                                                                      \
949   if (yydebug)                                                            \
950     {                                                                     \
951       YYFPRINTF (stderr, "%s ", Title);                                   \
952       yy_symbol_print (stderr,                                            \
953                   Type, Value, scanner); \
954       YYFPRINTF (stderr, "\n");                                           \
955     }                                                                     \
956 } while (YYID (0))
957
958
959 /*--------------------------------.
960 | Print this symbol on YYOUTPUT.  |
961 `--------------------------------*/
962
963 /*ARGSUSED*/
964 #if (defined __STDC__ || defined __C99__FUNC__ \
965      || defined __cplusplus || defined _MSC_VER)
966 static void
967 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner)
968 #else
969 static void
970 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
971     FILE *yyoutput;
972     int yytype;
973     YYSTYPE const * const yyvaluep;
974     void *scanner;
975 #endif
976 {
977   FILE *yyo = yyoutput;
978   YYUSE (yyo);
979   if (!yyvaluep)
980     return;
981   YYUSE (scanner);
982 # ifdef YYPRINT
983   if (yytype < YYNTOKENS)
984     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
985 # else
986   YYUSE (yyoutput);
987 # endif
988   switch (yytype)
989     {
990       default:
991         break;
992     }
993 }
994
995
996 /*--------------------------------.
997 | Print this symbol on YYOUTPUT.  |
998 `--------------------------------*/
999
1000 #if (defined __STDC__ || defined __C99__FUNC__ \
1001      || defined __cplusplus || defined _MSC_VER)
1002 static void
1003 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner)
1004 #else
1005 static void
1006 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
1007     FILE *yyoutput;
1008     int yytype;
1009     YYSTYPE const * const yyvaluep;
1010     void *scanner;
1011 #endif
1012 {
1013   if (yytype < YYNTOKENS)
1014     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1015   else
1016     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1017
1018   yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
1019   YYFPRINTF (yyoutput, ")");
1020 }
1021
1022 /*------------------------------------------------------------------.
1023 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1024 | TOP (included).                                                   |
1025 `------------------------------------------------------------------*/
1026
1027 #if (defined __STDC__ || defined __C99__FUNC__ \
1028      || defined __cplusplus || defined _MSC_VER)
1029 static void
1030 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1031 #else
1032 static void
1033 yy_stack_print (yybottom, yytop)
1034     yytype_int16 *yybottom;
1035     yytype_int16 *yytop;
1036 #endif
1037 {
1038   YYFPRINTF (stderr, "Stack now");
1039   for (; yybottom <= yytop; yybottom++)
1040     {
1041       int yybot = *yybottom;
1042       YYFPRINTF (stderr, " %d", yybot);
1043     }
1044   YYFPRINTF (stderr, "\n");
1045 }
1046
1047 # define YY_STACK_PRINT(Bottom, Top)                            \
1048 do {                                                            \
1049   if (yydebug)                                                  \
1050     yy_stack_print ((Bottom), (Top));                           \
1051 } while (YYID (0))
1052
1053
1054 /*------------------------------------------------.
1055 | Report that the YYRULE is going to be reduced.  |
1056 `------------------------------------------------*/
1057
1058 #if (defined __STDC__ || defined __C99__FUNC__ \
1059      || defined __cplusplus || defined _MSC_VER)
1060 static void
1061 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner)
1062 #else
1063 static void
1064 yy_reduce_print (yyvsp, yyrule, scanner)
1065     YYSTYPE *yyvsp;
1066     int yyrule;
1067     void *scanner;
1068 #endif
1069 {
1070   int yynrhs = yyr2[yyrule];
1071   int yyi;
1072   unsigned long int yylno = yyrline[yyrule];
1073   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1074              yyrule - 1, yylno);
1075   /* The symbols being reduced.  */
1076   for (yyi = 0; yyi < yynrhs; yyi++)
1077     {
1078       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1079       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1080                        &(yyvsp[(yyi + 1) - (yynrhs)])
1081                                        , scanner);
1082       YYFPRINTF (stderr, "\n");
1083     }
1084 }
1085
1086 # define YY_REDUCE_PRINT(Rule)          \
1087 do {                                    \
1088   if (yydebug)                          \
1089     yy_reduce_print (yyvsp, Rule, scanner); \
1090 } while (YYID (0))
1091
1092 /* Nonzero means print parse trace.  It is left uninitialized so that
1093    multiple parsers can coexist.  */
1094 int yydebug;
1095 #else /* !YYDEBUG */
1096 # define YYDPRINTF(Args)
1097 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1098 # define YY_STACK_PRINT(Bottom, Top)
1099 # define YY_REDUCE_PRINT(Rule)
1100 #endif /* !YYDEBUG */
1101
1102
1103 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1104 #ifndef YYINITDEPTH
1105 # define YYINITDEPTH 200
1106 #endif
1107
1108 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1109    if the built-in stack extension method is used).
1110
1111    Do not make this value too large; the results are undefined if
1112    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1113    evaluated with infinite-precision integer arithmetic.  */
1114
1115 #ifndef YYMAXDEPTH
1116 # define YYMAXDEPTH 10000
1117 #endif
1118
1119
1120 #if YYERROR_VERBOSE
1121
1122 # ifndef yystrlen
1123 #  if defined __GLIBC__ && defined _STRING_H
1124 #   define yystrlen strlen
1125 #  else
1126 /* Return the length of YYSTR.  */
1127 #if (defined __STDC__ || defined __C99__FUNC__ \
1128      || defined __cplusplus || defined _MSC_VER)
1129 static YYSIZE_T
1130 yystrlen (const char *yystr)
1131 #else
1132 static YYSIZE_T
1133 yystrlen (yystr)
1134     const char *yystr;
1135 #endif
1136 {
1137   YYSIZE_T yylen;
1138   for (yylen = 0; yystr[yylen]; yylen++)
1139     continue;
1140   return yylen;
1141 }
1142 #  endif
1143 # endif
1144
1145 # ifndef yystpcpy
1146 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1147 #   define yystpcpy stpcpy
1148 #  else
1149 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1150    YYDEST.  */
1151 #if (defined __STDC__ || defined __C99__FUNC__ \
1152      || defined __cplusplus || defined _MSC_VER)
1153 static char *
1154 yystpcpy (char *yydest, const char *yysrc)
1155 #else
1156 static char *
1157 yystpcpy (yydest, yysrc)
1158     char *yydest;
1159     const char *yysrc;
1160 #endif
1161 {
1162   char *yyd = yydest;
1163   const char *yys = yysrc;
1164
1165   while ((*yyd++ = *yys++) != '\0')
1166     continue;
1167
1168   return yyd - 1;
1169 }
1170 #  endif
1171 # endif
1172
1173 # ifndef yytnamerr
1174 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1175    quotes and backslashes, so that it's suitable for yyerror.  The
1176    heuristic is that double-quoting is unnecessary unless the string
1177    contains an apostrophe, a comma, or backslash (other than
1178    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1179    null, do not copy; instead, return the length of what the result
1180    would have been.  */
1181 static YYSIZE_T
1182 yytnamerr (char *yyres, const char *yystr)
1183 {
1184   if (*yystr == '"')
1185     {
1186       YYSIZE_T yyn = 0;
1187       char const *yyp = yystr;
1188
1189       for (;;)
1190         switch (*++yyp)
1191           {
1192           case '\'':
1193           case ',':
1194             goto do_not_strip_quotes;
1195
1196           case '\\':
1197             if (*++yyp != '\\')
1198               goto do_not_strip_quotes;
1199             /* Fall through.  */
1200           default:
1201             if (yyres)
1202               yyres[yyn] = *yyp;
1203             yyn++;
1204             break;
1205
1206           case '"':
1207             if (yyres)
1208               yyres[yyn] = '\0';
1209             return yyn;
1210           }
1211     do_not_strip_quotes: ;
1212     }
1213
1214   if (! yyres)
1215     return yystrlen (yystr);
1216
1217   return yystpcpy (yyres, yystr) - yyres;
1218 }
1219 # endif
1220
1221 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1222    about the unexpected token YYTOKEN for the state stack whose top is
1223    YYSSP.
1224
1225    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1226    not large enough to hold the message.  In that case, also set
1227    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1228    required number of bytes is too large to store.  */
1229 static int
1230 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1231                 yytype_int16 *yyssp, int yytoken)
1232 {
1233   YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1234   YYSIZE_T yysize = yysize0;
1235   YYSIZE_T yysize1;
1236   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1237   /* Internationalized format string. */
1238   const char *yyformat = YY_NULL;
1239   /* Arguments of yyformat. */
1240   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1241   /* Number of reported tokens (one for the "unexpected", one per
1242      "expected"). */
1243   int yycount = 0;
1244
1245   /* There are many possibilities here to consider:
1246      - Assume YYFAIL is not used.  It's too flawed to consider.  See
1247        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1248        for details.  YYERROR is fine as it does not invoke this
1249        function.
1250      - If this state is a consistent state with a default action, then
1251        the only way this function was invoked is if the default action
1252        is an error action.  In that case, don't check for expected
1253        tokens because there are none.
1254      - The only way there can be no lookahead present (in yychar) is if
1255        this state is a consistent state with a default action.  Thus,
1256        detecting the absence of a lookahead is sufficient to determine
1257        that there is no unexpected or expected token to report.  In that
1258        case, just report a simple "syntax error".
1259      - Don't assume there isn't a lookahead just because this state is a
1260        consistent state with a default action.  There might have been a
1261        previous inconsistent state, consistent state with a non-default
1262        action, or user semantic action that manipulated yychar.
1263      - Of course, the expected token list depends on states to have
1264        correct lookahead information, and it depends on the parser not
1265        to perform extra reductions after fetching a lookahead from the
1266        scanner and before detecting a syntax error.  Thus, state merging
1267        (from LALR or IELR) and default reductions corrupt the expected
1268        token list.  However, the list is correct for canonical LR with
1269        one exception: it will still contain any token that will not be
1270        accepted due to an error action in a later state.
1271   */
1272   if (yytoken != YYEMPTY)
1273     {
1274       int yyn = yypact[*yyssp];
1275       yyarg[yycount++] = yytname[yytoken];
1276       if (!yypact_value_is_default (yyn))
1277         {
1278           /* Start YYX at -YYN if negative to avoid negative indexes in
1279              YYCHECK.  In other words, skip the first -YYN actions for
1280              this state because they are default actions.  */
1281           int yyxbegin = yyn < 0 ? -yyn : 0;
1282           /* Stay within bounds of both yycheck and yytname.  */
1283           int yychecklim = YYLAST - yyn + 1;
1284           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1285           int yyx;
1286
1287           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1288             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1289                 && !yytable_value_is_error (yytable[yyx + yyn]))
1290               {
1291                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1292                   {
1293                     yycount = 1;
1294                     yysize = yysize0;
1295                     break;
1296                   }
1297                 yyarg[yycount++] = yytname[yyx];
1298                 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1299                 if (! (yysize <= yysize1
1300                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1301                   return 2;
1302                 yysize = yysize1;
1303               }
1304         }
1305     }
1306
1307   switch (yycount)
1308     {
1309 # define YYCASE_(N, S)                      \
1310       case N:                               \
1311         yyformat = S;                       \
1312       break
1313       YYCASE_(0, YY_("syntax error"));
1314       YYCASE_(1, YY_("syntax error, unexpected %s"));
1315       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1316       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1317       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1318       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1319 # undef YYCASE_
1320     }
1321
1322   yysize1 = yysize + yystrlen (yyformat);
1323   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1324     return 2;
1325   yysize = yysize1;
1326
1327   if (*yymsg_alloc < yysize)
1328     {
1329       *yymsg_alloc = 2 * yysize;
1330       if (! (yysize <= *yymsg_alloc
1331              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1332         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1333       return 1;
1334     }
1335
1336   /* Avoid sprintf, as that infringes on the user's name space.
1337      Don't have undefined behavior even if the translation
1338      produced a string with the wrong number of "%s"s.  */
1339   {
1340     char *yyp = *yymsg;
1341     int yyi = 0;
1342     while ((*yyp = *yyformat) != '\0')
1343       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1344         {
1345           yyp += yytnamerr (yyp, yyarg[yyi++]);
1346           yyformat += 2;
1347         }
1348       else
1349         {
1350           yyp++;
1351           yyformat++;
1352         }
1353   }
1354   return 0;
1355 }
1356 #endif /* YYERROR_VERBOSE */
1357
1358 /*-----------------------------------------------.
1359 | Release the memory associated to this symbol.  |
1360 `-----------------------------------------------*/
1361
1362 /*ARGSUSED*/
1363 #if (defined __STDC__ || defined __C99__FUNC__ \
1364      || defined __cplusplus || defined _MSC_VER)
1365 static void
1366 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner)
1367 #else
1368 static void
1369 yydestruct (yymsg, yytype, yyvaluep, scanner)
1370     const char *yymsg;
1371     int yytype;
1372     YYSTYPE *yyvaluep;
1373     void *scanner;
1374 #endif
1375 {
1376   YYUSE (yyvaluep);
1377   YYUSE (scanner);
1378
1379   if (!yymsg)
1380     yymsg = "Deleting";
1381   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1382
1383   switch (yytype)
1384     {
1385       case 5: /* HELP_TOPIC */
1386 /* Line 1381 of yacc.c  */
1387 #line 178 "parser.y"
1388         { free(((*yyvaluep).str));        };
1389 /* Line 1381 of yacc.c  */
1390 #line 1391 "parser.cpp"
1391         break;
1392       case 8: /* STR */
1393 /* Line 1381 of yacc.c  */
1394 #line 178 "parser.y"
1395         { free(((*yyvaluep).str));        };
1396 /* Line 1381 of yacc.c  */
1397 #line 1398 "parser.cpp"
1398         break;
1399       case 9: /* IDENTIFIER */
1400 /* Line 1381 of yacc.c  */
1401 #line 178 "parser.y"
1402         { free(((*yyvaluep).str));        };
1403 /* Line 1381 of yacc.c  */
1404 #line 1405 "parser.cpp"
1405         break;
1406       case 18: /* KEYWORD_POS */
1407 /* Line 1381 of yacc.c  */
1408 #line 178 "parser.y"
1409         { free(((*yyvaluep).str));        };
1410 /* Line 1381 of yacc.c  */
1411 #line 1412 "parser.cpp"
1412         break;
1413       case 25: /* PARAM */
1414 /* Line 1381 of yacc.c  */
1415 #line 179 "parser.y"
1416         { if(((*yyvaluep).str)) free(((*yyvaluep).str)); };
1417 /* Line 1381 of yacc.c  */
1418 #line 1419 "parser.cpp"
1419         break;
1420       case 28: /* CMP_OP */
1421 /* Line 1381 of yacc.c  */
1422 #line 178 "parser.y"
1423         { free(((*yyvaluep).str));        };
1424 /* Line 1381 of yacc.c  */
1425 #line 1426 "parser.cpp"
1426         break;
1427       case 52: /* commands */
1428 /* Line 1381 of yacc.c  */
1429 #line 180 "parser.y"
1430         { delete ((*yyvaluep).sel);       };
1431 /* Line 1381 of yacc.c  */
1432 #line 1433 "parser.cpp"
1433         break;
1434       case 53: /* command */
1435 /* Line 1381 of yacc.c  */
1436 #line 180 "parser.y"
1437         { delete ((*yyvaluep).sel);       };
1438 /* Line 1381 of yacc.c  */
1439 #line 1440 "parser.cpp"
1440         break;
1441       case 54: /* cmd_plain */
1442 /* Line 1381 of yacc.c  */
1443 #line 180 "parser.y"
1444         { delete ((*yyvaluep).sel);       };
1445 /* Line 1381 of yacc.c  */
1446 #line 1447 "parser.cpp"
1447         break;
1448       case 56: /* help_topic */
1449 /* Line 1381 of yacc.c  */
1450 #line 185 "parser.y"
1451         { delete ((*yyvaluep).vlist);       };
1452 /* Line 1381 of yacc.c  */
1453 #line 1454 "parser.cpp"
1454         break;
1455       case 57: /* selection */
1456 /* Line 1381 of yacc.c  */
1457 #line 180 "parser.y"
1458         { delete ((*yyvaluep).sel);       };
1459 /* Line 1381 of yacc.c  */
1460 #line 1461 "parser.cpp"
1461         break;
1462       case 61: /* string */
1463 /* Line 1381 of yacc.c  */
1464 #line 178 "parser.y"
1465         { free(((*yyvaluep).str));        };
1466 /* Line 1381 of yacc.c  */
1467 #line 1468 "parser.cpp"
1468         break;
1469       case 62: /* sel_expr */
1470 /* Line 1381 of yacc.c  */
1471 #line 181 "parser.y"
1472         { delete ((*yyvaluep).sel);       };
1473 /* Line 1381 of yacc.c  */
1474 #line 1475 "parser.cpp"
1475         break;
1476       case 63: /* pos_mod */
1477 /* Line 1381 of yacc.c  */
1478 #line 179 "parser.y"
1479         { if(((*yyvaluep).str)) free(((*yyvaluep).str)); };
1480 /* Line 1381 of yacc.c  */
1481 #line 1482 "parser.cpp"
1482         break;
1483       case 65: /* num_expr */
1484 /* Line 1381 of yacc.c  */
1485 #line 181 "parser.y"
1486         { delete ((*yyvaluep).sel);       };
1487 /* Line 1381 of yacc.c  */
1488 #line 1489 "parser.cpp"
1489         break;
1490       case 66: /* str_expr */
1491 /* Line 1381 of yacc.c  */
1492 #line 181 "parser.y"
1493         { delete ((*yyvaluep).sel);       };
1494 /* Line 1381 of yacc.c  */
1495 #line 1496 "parser.cpp"
1496         break;
1497       case 67: /* pos_expr */
1498 /* Line 1381 of yacc.c  */
1499 #line 181 "parser.y"
1500         { delete ((*yyvaluep).sel);       };
1501 /* Line 1381 of yacc.c  */
1502 #line 1503 "parser.cpp"
1503         break;
1504       case 68: /* method_params */
1505 /* Line 1381 of yacc.c  */
1506 #line 182 "parser.y"
1507         { delete ((*yyvaluep).plist);       };
1508 /* Line 1381 of yacc.c  */
1509 #line 1510 "parser.cpp"
1510         break;
1511       case 69: /* method_param_list */
1512 /* Line 1381 of yacc.c  */
1513 #line 182 "parser.y"
1514         { delete ((*yyvaluep).plist);       };
1515 /* Line 1381 of yacc.c  */
1516 #line 1517 "parser.cpp"
1517         break;
1518       case 70: /* method_param */
1519 /* Line 1381 of yacc.c  */
1520 #line 182 "parser.y"
1521         { delete ((*yyvaluep).param);       };
1522 /* Line 1381 of yacc.c  */
1523 #line 1524 "parser.cpp"
1524         break;
1525       case 71: /* value_list */
1526 /* Line 1381 of yacc.c  */
1527 #line 183 "parser.y"
1528         { delete ((*yyvaluep).vlist);       };
1529 /* Line 1381 of yacc.c  */
1530 #line 1531 "parser.cpp"
1531         break;
1532       case 72: /* value_list_contents */
1533 /* Line 1381 of yacc.c  */
1534 #line 183 "parser.y"
1535         { delete ((*yyvaluep).vlist);       };
1536 /* Line 1381 of yacc.c  */
1537 #line 1538 "parser.cpp"
1538         break;
1539       case 73: /* basic_value_list */
1540 /* Line 1381 of yacc.c  */
1541 #line 183 "parser.y"
1542         { delete ((*yyvaluep).vlist);       };
1543 /* Line 1381 of yacc.c  */
1544 #line 1545 "parser.cpp"
1545         break;
1546       case 74: /* basic_value_list_contents */
1547 /* Line 1381 of yacc.c  */
1548 #line 183 "parser.y"
1549         { delete ((*yyvaluep).vlist);       };
1550 /* Line 1381 of yacc.c  */
1551 #line 1552 "parser.cpp"
1552         break;
1553       case 75: /* value_item */
1554 /* Line 1381 of yacc.c  */
1555 #line 184 "parser.y"
1556         { delete ((*yyvaluep).val);       };
1557 /* Line 1381 of yacc.c  */
1558 #line 1559 "parser.cpp"
1559         break;
1560       case 76: /* basic_value_item */
1561 /* Line 1381 of yacc.c  */
1562 #line 184 "parser.y"
1563         { delete ((*yyvaluep).val);       };
1564 /* Line 1381 of yacc.c  */
1565 #line 1566 "parser.cpp"
1566         break;
1567       case 77: /* value_item_range */
1568 /* Line 1381 of yacc.c  */
1569 #line 184 "parser.y"
1570         { delete ((*yyvaluep).val);       };
1571 /* Line 1381 of yacc.c  */
1572 #line 1573 "parser.cpp"
1573         break;
1574
1575       default:
1576         break;
1577     }
1578 }
1579
1580
1581
1582 struct yypstate
1583   {
1584     /* Number of syntax errors so far.  */
1585     int yynerrs;
1586
1587     int yystate;
1588     /* Number of tokens to shift before error messages enabled.  */
1589     int yyerrstatus;
1590
1591     /* The stacks and their tools:
1592        `yyss': related to states.
1593        `yyvs': related to semantic values.
1594
1595        Refer to the stacks through separate pointers, to allow yyoverflow
1596        to reallocate them elsewhere.  */
1597
1598     /* The state stack.  */
1599     yytype_int16 yyssa[YYINITDEPTH];
1600     yytype_int16 *yyss;
1601     yytype_int16 *yyssp;
1602
1603     /* The semantic value stack.  */
1604     YYSTYPE yyvsa[YYINITDEPTH];
1605     YYSTYPE *yyvs;
1606     YYSTYPE *yyvsp;
1607
1608     YYSIZE_T yystacksize;
1609     /* Used to determine if this is the first time this instance has
1610        been used.  */
1611     int yynew;
1612   };
1613
1614 /* Initialize the parser data structure.  */
1615 #if (defined __STDC__ || defined __C99__FUNC__ \
1616      || defined __cplusplus || defined _MSC_VER)
1617 yypstate *
1618 yypstate_new (void)
1619 #else
1620 yypstate *
1621 yypstate_new ()
1622
1623 #endif
1624 {
1625   yypstate *yyps;
1626   yyps = (yypstate *) malloc (sizeof *yyps);
1627   if (!yyps)
1628     return YY_NULL;
1629   yyps->yynew = 1;
1630   return yyps;
1631 }
1632
1633 #if (defined __STDC__ || defined __C99__FUNC__ \
1634      || defined __cplusplus || defined _MSC_VER)
1635 void
1636 yypstate_delete (yypstate *yyps)
1637 #else
1638 void
1639 yypstate_delete (yyps)
1640     yypstate *yyps;
1641 #endif
1642 {
1643 #ifndef yyoverflow
1644   /* If the stack was reallocated but the parse did not complete, then the
1645      stack still needs to be freed.  */
1646   if (!yyps->yynew && yyps->yyss != yyps->yyssa)
1647     YYSTACK_FREE (yyps->yyss);
1648 #endif
1649   free (yyps);
1650 }
1651
1652 #define _gmx_sel_yynerrs yyps->_gmx_sel_yynerrs
1653 #define yystate yyps->yystate
1654 #define yyerrstatus yyps->yyerrstatus
1655 #define yyssa yyps->yyssa
1656 #define yyss yyps->yyss
1657 #define yyssp yyps->yyssp
1658 #define yyvsa yyps->yyvsa
1659 #define yyvs yyps->yyvs
1660 #define yyvsp yyps->yyvsp
1661 #define yystacksize yyps->yystacksize
1662
1663
1664 /*---------------.
1665 | yypush_parse.  |
1666 `---------------*/
1667
1668 #if (defined __STDC__ || defined __C99__FUNC__ \
1669      || defined __cplusplus || defined _MSC_VER)
1670 int
1671 yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, void *scanner)
1672 #else
1673 int
1674 yypush_parse (yyps, yypushed_char, yypushed_val, scanner)
1675     yypstate *yyps;
1676     int yypushed_char;
1677     YYSTYPE const *yypushed_val;
1678     void *scanner;
1679 #endif
1680 {
1681 /* The lookahead symbol.  */
1682 int yychar;
1683
1684 /* The semantic value of the lookahead symbol.  */
1685 YYSTYPE yylval;
1686
1687   int yyn;
1688   int yyresult;
1689   /* Lookahead token as an internal (translated) token number.  */
1690   int yytoken;
1691   /* The variables used to return semantic value and location from the
1692      action routines.  */
1693   YYSTYPE yyval;
1694
1695 #if YYERROR_VERBOSE
1696   /* Buffer for error messages, and its allocated size.  */
1697   char yymsgbuf[128];
1698   char *yymsg = yymsgbuf;
1699   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1700 #endif
1701
1702 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1703
1704   /* The number of symbols on the RHS of the reduced rule.
1705      Keep to zero when no symbol should be popped.  */
1706   int yylen = 0;
1707
1708   if (!yyps->yynew)
1709     {
1710       yyn = yypact[yystate];
1711       goto yyread_pushed_token;
1712     }
1713
1714   yytoken = 0;
1715   yyss = yyssa;
1716   yyvs = yyvsa;
1717   yystacksize = YYINITDEPTH;
1718
1719   YYDPRINTF ((stderr, "Starting parse\n"));
1720
1721   yystate = 0;
1722   yyerrstatus = 0;
1723   yynerrs = 0;
1724   yychar = YYEMPTY; /* Cause a token to be read.  */
1725
1726   /* Initialize stack pointers.
1727      Waste one element of value and location stack
1728      so that they stay on the same level as the state stack.
1729      The wasted elements are never initialized.  */
1730   yyssp = yyss;
1731   yyvsp = yyvs;
1732   goto yysetstate;
1733
1734 /*------------------------------------------------------------.
1735 | yynewstate -- Push a new state, which is found in yystate.  |
1736 `------------------------------------------------------------*/
1737  yynewstate:
1738   /* In all cases, when you get here, the value and location stacks
1739      have just been pushed.  So pushing a state here evens the stacks.  */
1740   yyssp++;
1741
1742  yysetstate:
1743   *yyssp = yystate;
1744
1745   if (yyss + yystacksize - 1 <= yyssp)
1746     {
1747       /* Get the current used size of the three stacks, in elements.  */
1748       YYSIZE_T yysize = yyssp - yyss + 1;
1749
1750 #ifdef yyoverflow
1751       {
1752         /* Give user a chance to reallocate the stack.  Use copies of
1753            these so that the &'s don't force the real ones into
1754            memory.  */
1755         YYSTYPE *yyvs1 = yyvs;
1756         yytype_int16 *yyss1 = yyss;
1757
1758         /* Each stack pointer address is followed by the size of the
1759            data in use in that stack, in bytes.  This used to be a
1760            conditional around just the two extra args, but that might
1761            be undefined if yyoverflow is a macro.  */
1762         yyoverflow (YY_("memory exhausted"),
1763                     &yyss1, yysize * sizeof (*yyssp),
1764                     &yyvs1, yysize * sizeof (*yyvsp),
1765                     &yystacksize);
1766
1767         yyss = yyss1;
1768         yyvs = yyvs1;
1769       }
1770 #else /* no yyoverflow */
1771 # ifndef YYSTACK_RELOCATE
1772       goto yyexhaustedlab;
1773 # else
1774       /* Extend the stack our own way.  */
1775       if (YYMAXDEPTH <= yystacksize)
1776         goto yyexhaustedlab;
1777       yystacksize *= 2;
1778       if (YYMAXDEPTH < yystacksize)
1779         yystacksize = YYMAXDEPTH;
1780
1781       {
1782         yytype_int16 *yyss1 = yyss;
1783         union yyalloc *yyptr =
1784           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1785         if (! yyptr)
1786           goto yyexhaustedlab;
1787         YYSTACK_RELOCATE (yyss_alloc, yyss);
1788         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1789 #  undef YYSTACK_RELOCATE
1790         if (yyss1 != yyssa)
1791           YYSTACK_FREE (yyss1);
1792       }
1793 # endif
1794 #endif /* no yyoverflow */
1795
1796       yyssp = yyss + yysize - 1;
1797       yyvsp = yyvs + yysize - 1;
1798
1799       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1800                   (unsigned long int) yystacksize));
1801
1802       if (yyss + yystacksize - 1 <= yyssp)
1803         YYABORT;
1804     }
1805
1806   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1807
1808   if (yystate == YYFINAL)
1809     YYACCEPT;
1810
1811   goto yybackup;
1812
1813 /*-----------.
1814 | yybackup.  |
1815 `-----------*/
1816 yybackup:
1817
1818   /* Do appropriate processing given the current state.  Read a
1819      lookahead token if we need one and don't already have one.  */
1820
1821   /* First try to decide what to do without reference to lookahead token.  */
1822   yyn = yypact[yystate];
1823   if (yypact_value_is_default (yyn))
1824     goto yydefault;
1825
1826   /* Not known => get a lookahead token if don't already have one.  */
1827
1828   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1829   if (yychar == YYEMPTY)
1830     {
1831       if (!yyps->yynew)
1832         {
1833           YYDPRINTF ((stderr, "Return for a new token:\n"));
1834           yyresult = YYPUSH_MORE;
1835           goto yypushreturn;
1836         }
1837       yyps->yynew = 0;
1838 yyread_pushed_token:
1839       YYDPRINTF ((stderr, "Reading a token: "));
1840       yychar = yypushed_char;
1841       if (yypushed_val)
1842         yylval = *yypushed_val;
1843     }
1844
1845   if (yychar <= YYEOF)
1846     {
1847       yychar = yytoken = YYEOF;
1848       YYDPRINTF ((stderr, "Now at end of input.\n"));
1849     }
1850   else
1851     {
1852       yytoken = YYTRANSLATE (yychar);
1853       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1854     }
1855
1856   /* If the proper action on seeing token YYTOKEN is to reduce or to
1857      detect an error, take that action.  */
1858   yyn += yytoken;
1859   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1860     goto yydefault;
1861   yyn = yytable[yyn];
1862   if (yyn <= 0)
1863     {
1864       if (yytable_value_is_error (yyn))
1865         goto yyerrlab;
1866       yyn = -yyn;
1867       goto yyreduce;
1868     }
1869
1870   /* Count tokens shifted since error; after three, turn off error
1871      status.  */
1872   if (yyerrstatus)
1873     yyerrstatus--;
1874
1875   /* Shift the lookahead token.  */
1876   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1877
1878   /* Discard the shifted token.  */
1879   yychar = YYEMPTY;
1880
1881   yystate = yyn;
1882   *++yyvsp = yylval;
1883
1884   goto yynewstate;
1885
1886
1887 /*-----------------------------------------------------------.
1888 | yydefault -- do the default action for the current state.  |
1889 `-----------------------------------------------------------*/
1890 yydefault:
1891   yyn = yydefact[yystate];
1892   if (yyn == 0)
1893     goto yyerrlab;
1894   goto yyreduce;
1895
1896
1897 /*-----------------------------.
1898 | yyreduce -- Do a reduction.  |
1899 `-----------------------------*/
1900 yyreduce:
1901   /* yyn is the number of a rule to reduce with.  */
1902   yylen = yyr2[yyn];
1903
1904   /* If YYLEN is nonzero, implement the default value of the action:
1905      `$$ = $1'.
1906
1907      Otherwise, the following line sets YYVAL to garbage.
1908      This behavior is undocumented and Bison
1909      users should not rely upon it.  Assigning to YYVAL
1910      unconditionally makes the parser a bit smaller, and it avoids a
1911      GCC warning that YYVAL may be used uninitialized.  */
1912   yyval = yyvsp[1-yylen];
1913
1914
1915   YY_REDUCE_PRINT (yyn);
1916   switch (yyn)
1917     {
1918         case 2:
1919 /* Line 1787 of yacc.c  */
1920 #line 199 "parser.y"
1921     {
1922                  BEGIN_ACTION;
1923                  set_empty((yyval.sel));
1924                  END_ACTION;
1925              }
1926     break;
1927
1928   case 3:
1929 /* Line 1787 of yacc.c  */
1930 #line 205 "parser.y"
1931     {
1932                  BEGIN_ACTION;
1933                  set((yyval.sel), _gmx_sel_append_selection(get((yyvsp[(2) - (2)].sel)), get((yyvsp[(1) - (2)].sel)), scanner));
1934                  if (_gmx_sel_parser_should_finish(scanner))
1935                      YYACCEPT;
1936                  END_ACTION;
1937              }
1938     break;
1939
1940   case 4:
1941 /* Line 1787 of yacc.c  */
1942 #line 215 "parser.y"
1943     { (yyval.sel) = (yyvsp[(1) - (2)].sel); }
1944     break;
1945
1946   case 5:
1947 /* Line 1787 of yacc.c  */
1948 #line 217 "parser.y"
1949     {
1950                  BEGIN_ACTION;
1951                  _gmx_selparser_error(scanner, "invalid selection '%s'",
1952                                       _gmx_sel_lexer_pselstr(scanner));
1953                  _gmx_sel_lexer_clear_method_stack(scanner);
1954                  if (_gmx_sel_is_lexer_interactive(scanner))
1955                  {
1956                      _gmx_sel_lexer_clear_pselstr(scanner);
1957                      yyerrok;
1958                  }
1959                  else
1960                  {
1961                      YYABORT;
1962                  }
1963                  set_empty((yyval.sel));
1964                  END_ACTION;
1965              }
1966     break;
1967
1968   case 6:
1969 /* Line 1787 of yacc.c  */
1970 #line 238 "parser.y"
1971     {
1972                  BEGIN_ACTION;
1973                  _gmx_sel_handle_empty_cmd(scanner);
1974                  set_empty((yyval.sel));
1975                  END_ACTION;
1976              }
1977     break;
1978
1979   case 7:
1980 /* Line 1787 of yacc.c  */
1981 #line 245 "parser.y"
1982     {
1983                  BEGIN_ACTION;
1984                  set_empty((yyval.sel));
1985                  END_ACTION;
1986              }
1987     break;
1988
1989   case 8:
1990 /* Line 1787 of yacc.c  */
1991 #line 251 "parser.y"
1992     {
1993                  BEGIN_ACTION;
1994                  SelectionTreeElementPointer s
1995                         = _gmx_sel_init_group_by_id((yyvsp[(1) - (1)].i), scanner);
1996                  SelectionTreeElementPointer p
1997                         = _gmx_sel_init_position(s, NULL, scanner);
1998                  if (!p) YYERROR;
1999                  set((yyval.sel), _gmx_sel_init_selection(NULL, p, scanner));
2000                  END_ACTION;
2001              }
2002     break;
2003
2004   case 9:
2005 /* Line 1787 of yacc.c  */
2006 #line 262 "parser.y"
2007     {
2008                  BEGIN_ACTION;
2009                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (1)].str));
2010                  SelectionTreeElementPointer s
2011                         = _gmx_sel_init_group_by_name((yyvsp[(1) - (1)].str), scanner);
2012                  SelectionTreeElementPointer p
2013                         = _gmx_sel_init_position(s, NULL, scanner);
2014                  if (!p) YYERROR;
2015                  set((yyval.sel), _gmx_sel_init_selection(NULL, p, scanner));
2016                  END_ACTION;
2017              }
2018     break;
2019
2020   case 10:
2021 /* Line 1787 of yacc.c  */
2022 #line 274 "parser.y"
2023     {
2024                  BEGIN_ACTION;
2025                  set((yyval.sel), _gmx_sel_init_selection(NULL, get((yyvsp[(1) - (1)].sel)), scanner));
2026                  END_ACTION;
2027              }
2028     break;
2029
2030   case 11:
2031 /* Line 1787 of yacc.c  */
2032 #line 280 "parser.y"
2033     {
2034                  BEGIN_ACTION;
2035                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (2)].str));
2036                  set((yyval.sel), _gmx_sel_init_selection((yyvsp[(1) - (2)].str), get((yyvsp[(2) - (2)].sel)), scanner));
2037                  END_ACTION;
2038              }
2039     break;
2040
2041   case 12:
2042 /* Line 1787 of yacc.c  */
2043 #line 287 "parser.y"
2044     {
2045                  BEGIN_ACTION;
2046                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2047                  set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2048                  END_ACTION;
2049              }
2050     break;
2051
2052   case 13:
2053 /* Line 1787 of yacc.c  */
2054 #line 294 "parser.y"
2055     {
2056                  BEGIN_ACTION;
2057                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2058                  set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2059                  END_ACTION;
2060              }
2061     break;
2062
2063   case 14:
2064 /* Line 1787 of yacc.c  */
2065 #line 301 "parser.y"
2066     {
2067                  BEGIN_ACTION;
2068                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (3)].str));
2069                  set((yyval.sel), _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), get((yyvsp[(3) - (3)].sel)), scanner));
2070                  END_ACTION;
2071              }
2072     break;
2073
2074   case 15:
2075 /* Line 1787 of yacc.c  */
2076 #line 312 "parser.y"
2077     {
2078                  BEGIN_ACTION;
2079                  _gmx_sel_handle_help_cmd(get((yyvsp[(2) - (2)].vlist)), scanner);
2080                  END_ACTION;
2081              }
2082     break;
2083
2084   case 16:
2085 /* Line 1787 of yacc.c  */
2086 #line 320 "parser.y"
2087     {
2088                  BEGIN_ACTION;
2089                  set((yyval.vlist), SelectionParserValue::createList());
2090                  END_ACTION;
2091              }
2092     break;
2093
2094   case 17:
2095 /* Line 1787 of yacc.c  */
2096 #line 326 "parser.y"
2097     {
2098                  BEGIN_ACTION;
2099                  SelectionParserValueListPointer list(get((yyvsp[(1) - (2)].vlist)));
2100                  list->push_back(SelectionParserValue::createString((yyvsp[(2) - (2)].str)));
2101                  set((yyval.vlist), move(list));
2102                  END_ACTION;
2103              }
2104     break;
2105
2106   case 18:
2107 /* Line 1787 of yacc.c  */
2108 #line 336 "parser.y"
2109     { (yyval.sel) = (yyvsp[(1) - (1)].sel); }
2110     break;
2111
2112   case 19:
2113 /* Line 1787 of yacc.c  */
2114 #line 338 "parser.y"
2115     {
2116                  BEGIN_ACTION;
2117                  set((yyval.sel), _gmx_sel_init_position(get((yyvsp[(1) - (1)].sel)), NULL, scanner));
2118                  CHECK_SEL((yyval.sel));
2119                  END_ACTION;
2120              }
2121     break;
2122
2123   case 20:
2124 /* Line 1787 of yacc.c  */
2125 #line 344 "parser.y"
2126     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2127     break;
2128
2129   case 21:
2130 /* Line 1787 of yacc.c  */
2131 #line 346 "parser.y"
2132     {
2133                  BEGIN_ACTION;
2134                  set((yyval.sel), _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), get((yyvsp[(1) - (3)].sel)), scanner));
2135                  CHECK_SEL((yyval.sel));
2136                  END_ACTION;
2137              }
2138     break;
2139
2140   case 22:
2141 /* Line 1787 of yacc.c  */
2142 #line 359 "parser.y"
2143     { (yyval.i) = (yyvsp[(1) - (1)].i); }
2144     break;
2145
2146   case 23:
2147 /* Line 1787 of yacc.c  */
2148 #line 360 "parser.y"
2149     { (yyval.i) = -(yyvsp[(2) - (2)].i); }
2150     break;
2151
2152   case 24:
2153 /* Line 1787 of yacc.c  */
2154 #line 364 "parser.y"
2155     { (yyval.r) = (yyvsp[(1) - (1)].r); }
2156     break;
2157
2158   case 25:
2159 /* Line 1787 of yacc.c  */
2160 #line 365 "parser.y"
2161     { (yyval.r) = -(yyvsp[(2) - (2)].r); }
2162     break;
2163
2164   case 26:
2165 /* Line 1787 of yacc.c  */
2166 #line 368 "parser.y"
2167     { (yyval.r) = (yyvsp[(1) - (1)].i); }
2168     break;
2169
2170   case 27:
2171 /* Line 1787 of yacc.c  */
2172 #line 369 "parser.y"
2173     { (yyval.r) = (yyvsp[(1) - (1)].r); }
2174     break;
2175
2176   case 28:
2177 /* Line 1787 of yacc.c  */
2178 #line 372 "parser.y"
2179     { (yyval.str) = (yyvsp[(1) - (1)].str); }
2180     break;
2181
2182   case 29:
2183 /* Line 1787 of yacc.c  */
2184 #line 373 "parser.y"
2185     { (yyval.str) = (yyvsp[(1) - (1)].str); }
2186     break;
2187
2188   case 30:
2189 /* Line 1787 of yacc.c  */
2190 #line 382 "parser.y"
2191     {
2192                  BEGIN_ACTION;
2193                  SelectionTreeElementPointer arg(get((yyvsp[(2) - (2)].sel)));
2194                  SelectionTreeElementPointer sel(
2195                         new SelectionTreeElement(SEL_BOOLEAN));
2196                  sel->u.boolt = BOOL_NOT;
2197                  sel->child = arg;
2198                  set((yyval.sel), sel);
2199                  END_ACTION;
2200              }
2201     break;
2202
2203   case 31:
2204 /* Line 1787 of yacc.c  */
2205 #line 393 "parser.y"
2206     {
2207                  BEGIN_ACTION;
2208                  SelectionTreeElementPointer arg1(get((yyvsp[(1) - (3)].sel))), arg2(get((yyvsp[(3) - (3)].sel)));
2209                  SelectionTreeElementPointer sel(
2210                         new SelectionTreeElement(SEL_BOOLEAN));
2211                  sel->u.boolt = BOOL_AND;
2212                  sel->child = arg1; sel->child->next = arg2;
2213                  set((yyval.sel), sel);
2214                  END_ACTION;
2215              }
2216     break;
2217
2218   case 32:
2219 /* Line 1787 of yacc.c  */
2220 #line 404 "parser.y"
2221     {
2222                  BEGIN_ACTION;
2223                  SelectionTreeElementPointer arg1(get((yyvsp[(1) - (3)].sel))), arg2(get((yyvsp[(3) - (3)].sel)));
2224                  SelectionTreeElementPointer sel(
2225                         new SelectionTreeElement(SEL_BOOLEAN));
2226                  sel->u.boolt = BOOL_OR;
2227                  sel->child = arg1; sel->child->next = arg2;
2228                  set((yyval.sel), sel);
2229                  END_ACTION;
2230              }
2231     break;
2232
2233   case 33:
2234 /* Line 1787 of yacc.c  */
2235 #line 414 "parser.y"
2236     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2237     break;
2238
2239   case 34:
2240 /* Line 1787 of yacc.c  */
2241 #line 419 "parser.y"
2242     {
2243                  BEGIN_ACTION;
2244                  scoped_ptr_sfree opGuard((yyvsp[(2) - (3)].str));
2245                  set((yyval.sel), _gmx_sel_init_comparison(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), (yyvsp[(2) - (3)].str), scanner));
2246                  CHECK_SEL((yyval.sel));
2247                  END_ACTION;
2248              }
2249     break;
2250
2251   case 35:
2252 /* Line 1787 of yacc.c  */
2253 #line 430 "parser.y"
2254     {
2255                  BEGIN_ACTION;
2256                  scoped_ptr_sfree nameGuard((yyvsp[(2) - (2)].str));
2257                  set((yyval.sel), _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner));
2258                  END_ACTION;
2259              }
2260     break;
2261
2262   case 36:
2263 /* Line 1787 of yacc.c  */
2264 #line 437 "parser.y"
2265     {
2266                  BEGIN_ACTION;
2267                  set((yyval.sel), _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner));
2268                  END_ACTION;
2269              }
2270     break;
2271
2272   case 37:
2273 /* Line 1787 of yacc.c  */
2274 #line 445 "parser.y"
2275     { (yyval.str) = NULL; }
2276     break;
2277
2278   case 38:
2279 /* Line 1787 of yacc.c  */
2280 #line 446 "parser.y"
2281     { (yyval.str) = (yyvsp[(1) - (1)].str);   }
2282     break;
2283
2284   case 39:
2285 /* Line 1787 of yacc.c  */
2286 #line 451 "parser.y"
2287     { (yyval.smt) = gmx::eStringMatchType_RegularExpression; }
2288     break;
2289
2290   case 40:
2291 /* Line 1787 of yacc.c  */
2292 #line 452 "parser.y"
2293     { (yyval.smt) = gmx::eStringMatchType_Wildcard; }
2294     break;
2295
2296   case 41:
2297 /* Line 1787 of yacc.c  */
2298 #line 453 "parser.y"
2299     { (yyval.smt) = gmx::eStringMatchType_Exact; }
2300     break;
2301
2302   case 42:
2303 /* Line 1787 of yacc.c  */
2304 #line 458 "parser.y"
2305     {
2306                  BEGIN_ACTION;
2307                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2308                  set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2309                  CHECK_SEL((yyval.sel));
2310                  END_ACTION;
2311              }
2312     break;
2313
2314   case 43:
2315 /* Line 1787 of yacc.c  */
2316 #line 466 "parser.y"
2317     {
2318                  BEGIN_ACTION;
2319                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2320                  set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[(2) - (3)].meth), gmx::eStringMatchType_Auto, get((yyvsp[(3) - (3)].vlist)), (yyvsp[(1) - (3)].str), scanner));
2321                  CHECK_SEL((yyval.sel));
2322                  END_ACTION;
2323              }
2324     break;
2325
2326   case 44:
2327 /* Line 1787 of yacc.c  */
2328 #line 474 "parser.y"
2329     {
2330                  BEGIN_ACTION;
2331                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (4)].str));
2332                  set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[(2) - (4)].meth), (yyvsp[(3) - (4)].smt), get((yyvsp[(4) - (4)].vlist)), (yyvsp[(1) - (4)].str), scanner));
2333                  CHECK_SEL((yyval.sel));
2334                  END_ACTION;
2335              }
2336     break;
2337
2338   case 45:
2339 /* Line 1787 of yacc.c  */
2340 #line 482 "parser.y"
2341     {
2342                  BEGIN_ACTION;
2343                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2344                  set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].vlist)), (yyvsp[(1) - (3)].str), scanner));
2345                  CHECK_SEL((yyval.sel));
2346                  END_ACTION;
2347              }
2348     break;
2349
2350   case 46:
2351 /* Line 1787 of yacc.c  */
2352 #line 493 "parser.y"
2353     {
2354                  BEGIN_ACTION;
2355                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2356                  set((yyval.sel), _gmx_sel_init_method((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), (yyvsp[(1) - (3)].str), scanner));
2357                  CHECK_SEL((yyval.sel));
2358                  END_ACTION;
2359              }
2360     break;
2361
2362   case 47:
2363 /* Line 1787 of yacc.c  */
2364 #line 508 "parser.y"
2365     {
2366                  BEGIN_ACTION;
2367                  SelectionTreeElementPointer sel(
2368                         new SelectionTreeElement(SEL_CONST));
2369                  _gmx_selelem_set_vtype(sel, INT_VALUE);
2370                  _gmx_selvalue_reserve(&sel->v, 1);
2371                  sel->v.u.i[0] = (yyvsp[(1) - (1)].i);
2372                  set((yyval.sel), sel);
2373                  END_ACTION;
2374              }
2375     break;
2376
2377   case 48:
2378 /* Line 1787 of yacc.c  */
2379 #line 519 "parser.y"
2380     {
2381                  BEGIN_ACTION;
2382                  SelectionTreeElementPointer sel(
2383                         new SelectionTreeElement(SEL_CONST));
2384                  _gmx_selelem_set_vtype(sel, REAL_VALUE);
2385                  _gmx_selvalue_reserve(&sel->v, 1);
2386                  sel->v.u.r[0] = (yyvsp[(1) - (1)].r);
2387                  set((yyval.sel), sel);
2388                  END_ACTION;
2389              }
2390     break;
2391
2392   case 49:
2393 /* Line 1787 of yacc.c  */
2394 #line 533 "parser.y"
2395     {
2396                  BEGIN_ACTION;
2397                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2398                  set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2399                  CHECK_SEL((yyval.sel));
2400                  END_ACTION;
2401              }
2402     break;
2403
2404   case 50:
2405 /* Line 1787 of yacc.c  */
2406 #line 541 "parser.y"
2407     {
2408                  BEGIN_ACTION;
2409                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (3)].str));
2410                  set((yyval.sel), _gmx_sel_init_method((yyvsp[(2) - (3)].meth), get((yyvsp[(3) - (3)].plist)), (yyvsp[(1) - (3)].str), scanner));
2411                  CHECK_SEL((yyval.sel));
2412                  END_ACTION;
2413              }
2414     break;
2415
2416   case 51:
2417 /* Line 1787 of yacc.c  */
2418 #line 552 "parser.y"
2419     {
2420                  BEGIN_ACTION;
2421                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '+', scanner));
2422                  END_ACTION;
2423              }
2424     break;
2425
2426   case 52:
2427 /* Line 1787 of yacc.c  */
2428 #line 558 "parser.y"
2429     {
2430                  BEGIN_ACTION;
2431                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '-', scanner));
2432                  END_ACTION;
2433              }
2434     break;
2435
2436   case 53:
2437 /* Line 1787 of yacc.c  */
2438 #line 564 "parser.y"
2439     {
2440                  BEGIN_ACTION;
2441                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '*', scanner));
2442                  END_ACTION;
2443              }
2444     break;
2445
2446   case 54:
2447 /* Line 1787 of yacc.c  */
2448 #line 570 "parser.y"
2449     {
2450                  BEGIN_ACTION;
2451                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '/', scanner));
2452                  END_ACTION;
2453              }
2454     break;
2455
2456   case 55:
2457 /* Line 1787 of yacc.c  */
2458 #line 576 "parser.y"
2459     {
2460                  BEGIN_ACTION;
2461                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(2) - (2)].sel)), SelectionTreeElementPointer(), '-', scanner));
2462                  END_ACTION;
2463              }
2464     break;
2465
2466   case 56:
2467 /* Line 1787 of yacc.c  */
2468 #line 582 "parser.y"
2469     {
2470                  BEGIN_ACTION;
2471                  set((yyval.sel), _gmx_sel_init_arithmetic(get((yyvsp[(1) - (3)].sel)), get((yyvsp[(3) - (3)].sel)), '^', scanner));
2472                  END_ACTION;
2473              }
2474     break;
2475
2476   case 57:
2477 /* Line 1787 of yacc.c  */
2478 #line 587 "parser.y"
2479     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2480     break;
2481
2482   case 58:
2483 /* Line 1787 of yacc.c  */
2484 #line 595 "parser.y"
2485     {
2486                  BEGIN_ACTION;
2487                  SelectionTreeElementPointer sel(
2488                         new SelectionTreeElement(SEL_CONST));
2489                  _gmx_selelem_set_vtype(sel, STR_VALUE);
2490                  _gmx_selvalue_reserve(&sel->v, 1);
2491                  sel->v.u.s[0] = (yyvsp[(1) - (1)].str);
2492                  set((yyval.sel), sel);
2493                  END_ACTION;
2494              }
2495     break;
2496
2497   case 59:
2498 /* Line 1787 of yacc.c  */
2499 #line 606 "parser.y"
2500     {
2501                  BEGIN_ACTION;
2502                  scoped_ptr_sfree posmodGuard((yyvsp[(1) - (2)].str));
2503                  set((yyval.sel), _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), SelectionParserValueListPointer(), (yyvsp[(1) - (2)].str), scanner));
2504                  CHECK_SEL((yyval.sel));
2505                  END_ACTION;
2506              }
2507     break;
2508
2509   case 60:
2510 /* Line 1787 of yacc.c  */
2511 #line 621 "parser.y"
2512     {
2513                  BEGIN_ACTION;
2514                  set((yyval.sel), _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r)));
2515                  END_ACTION;
2516              }
2517     break;
2518
2519   case 61:
2520 /* Line 1787 of yacc.c  */
2521 #line 629 "parser.y"
2522     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
2523     break;
2524
2525   case 62:
2526 /* Line 1787 of yacc.c  */
2527 #line 634 "parser.y"
2528     {
2529                  BEGIN_ACTION;
2530                  set((yyval.sel), _gmx_sel_init_method((yyvsp[(1) - (2)].meth), get((yyvsp[(2) - (2)].plist)), NULL, scanner));
2531                  CHECK_SEL((yyval.sel));
2532                  END_ACTION;
2533              }
2534     break;
2535
2536   case 63:
2537 /* Line 1787 of yacc.c  */
2538 #line 644 "parser.y"
2539     {
2540                  BEGIN_ACTION;
2541                  scoped_ptr_sfree keywordGuard((yyvsp[(1) - (3)].str));
2542                  set((yyval.sel), _gmx_sel_init_position(get((yyvsp[(3) - (3)].sel)), (yyvsp[(1) - (3)].str), scanner));
2543                  CHECK_SEL((yyval.sel));
2544                  END_ACTION;
2545              }
2546     break;
2547
2548   case 64:
2549 /* Line 1787 of yacc.c  */
2550 #line 658 "parser.y"
2551     {
2552                  BEGIN_ACTION;
2553                  set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2554                  END_ACTION;
2555              }
2556     break;
2557
2558   case 65:
2559 /* Line 1787 of yacc.c  */
2560 #line 666 "parser.y"
2561     {
2562                  BEGIN_ACTION;
2563                  set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2564                  END_ACTION;
2565              }
2566     break;
2567
2568   case 66:
2569 /* Line 1787 of yacc.c  */
2570 #line 674 "parser.y"
2571     {
2572                  BEGIN_ACTION;
2573                  set((yyval.sel), _gmx_sel_init_variable_ref(get((yyvsp[(1) - (1)].sel))));
2574                  END_ACTION;
2575              }
2576     break;
2577
2578   case 67:
2579 /* Line 1787 of yacc.c  */
2580 #line 687 "parser.y"
2581     { (yyval.plist) = (yyvsp[(1) - (1)].plist); }
2582     break;
2583
2584   case 68:
2585 /* Line 1787 of yacc.c  */
2586 #line 689 "parser.y"
2587     { (yyval.plist) = (yyvsp[(1) - (2)].plist); }
2588     break;
2589
2590   case 69:
2591 /* Line 1787 of yacc.c  */
2592 #line 694 "parser.y"
2593     {
2594                  BEGIN_ACTION;
2595                  set((yyval.plist), SelectionParserParameter::createList());
2596                  END_ACTION;
2597              }
2598     break;
2599
2600   case 70:
2601 /* Line 1787 of yacc.c  */
2602 #line 700 "parser.y"
2603     {
2604                  BEGIN_ACTION;
2605                  SelectionParserParameterListPointer list(get((yyvsp[(1) - (2)].plist)));
2606                  list->push_back(get((yyvsp[(2) - (2)].param)));
2607                  set((yyval.plist), move(list));
2608                  END_ACTION;
2609              }
2610     break;
2611
2612   case 71:
2613 /* Line 1787 of yacc.c  */
2614 #line 711 "parser.y"
2615     {
2616                  BEGIN_ACTION;
2617                  scoped_ptr_sfree nameGuard((yyvsp[(1) - (2)].str));
2618                  set((yyval.param), SelectionParserParameter::create((yyvsp[(1) - (2)].str), get((yyvsp[(2) - (2)].vlist))));
2619                  END_ACTION;
2620              }
2621     break;
2622
2623   case 72:
2624 /* Line 1787 of yacc.c  */
2625 #line 719 "parser.y"
2626     { (yyval.vlist) = (yyvsp[(1) - (1)].vlist);   }
2627     break;
2628
2629   case 73:
2630 /* Line 1787 of yacc.c  */
2631 #line 720 "parser.y"
2632     { (yyval.vlist) = (yyvsp[(2) - (3)].vlist);   }
2633     break;
2634
2635   case 74:
2636 /* Line 1787 of yacc.c  */
2637 #line 725 "parser.y"
2638     {
2639                  BEGIN_ACTION;
2640                  set((yyval.vlist), SelectionParserValue::createList());
2641                  END_ACTION;
2642              }
2643     break;
2644
2645   case 75:
2646 /* Line 1787 of yacc.c  */
2647 #line 731 "parser.y"
2648     {
2649                  BEGIN_ACTION;
2650                  SelectionParserValueListPointer list(get((yyvsp[(1) - (2)].vlist)));
2651                  list->push_back(get((yyvsp[(2) - (2)].val)));
2652                  set((yyval.vlist), move(list));
2653                  END_ACTION;
2654              }
2655     break;
2656
2657   case 76:
2658 /* Line 1787 of yacc.c  */
2659 #line 739 "parser.y"
2660     {
2661                  BEGIN_ACTION;
2662                  SelectionParserValueListPointer list(get((yyvsp[(1) - (3)].vlist)));
2663                  list->push_back(get((yyvsp[(3) - (3)].val)));
2664                  set((yyval.vlist), move(list));
2665                  END_ACTION;
2666              }
2667     break;
2668
2669   case 77:
2670 /* Line 1787 of yacc.c  */
2671 #line 749 "parser.y"
2672     { (yyval.vlist) = (yyvsp[(1) - (1)].vlist); }
2673     break;
2674
2675   case 78:
2676 /* Line 1787 of yacc.c  */
2677 #line 750 "parser.y"
2678     { (yyval.vlist) = (yyvsp[(2) - (3)].vlist); }
2679     break;
2680
2681   case 79:
2682 /* Line 1787 of yacc.c  */
2683 #line 755 "parser.y"
2684     {
2685                  BEGIN_ACTION;
2686                  set((yyval.vlist), SelectionParserValue::createList(get((yyvsp[(1) - (1)].val))));
2687                  END_ACTION;
2688              }
2689     break;
2690
2691   case 80:
2692 /* Line 1787 of yacc.c  */
2693 #line 761 "parser.y"
2694     {
2695                  BEGIN_ACTION;
2696                  SelectionParserValueListPointer list(get((yyvsp[(1) - (2)].vlist)));
2697                  list->push_back(get((yyvsp[(2) - (2)].val)));
2698                  set((yyval.vlist), move(list));
2699                  END_ACTION;
2700              }
2701     break;
2702
2703   case 81:
2704 /* Line 1787 of yacc.c  */
2705 #line 769 "parser.y"
2706     {
2707                  BEGIN_ACTION;
2708                  SelectionParserValueListPointer list(get((yyvsp[(1) - (3)].vlist)));
2709                  list->push_back(get((yyvsp[(3) - (3)].val)));
2710                  set((yyval.vlist), move(list));
2711                  END_ACTION;
2712              }
2713     break;
2714
2715   case 82:
2716 /* Line 1787 of yacc.c  */
2717 #line 779 "parser.y"
2718     {
2719                  BEGIN_ACTION;
2720                  set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2721                  END_ACTION;
2722              }
2723     break;
2724
2725   case 83:
2726 /* Line 1787 of yacc.c  */
2727 #line 785 "parser.y"
2728     {
2729                  BEGIN_ACTION;
2730                  set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2731                  END_ACTION;
2732              }
2733     break;
2734
2735   case 84:
2736 /* Line 1787 of yacc.c  */
2737 #line 791 "parser.y"
2738     {
2739                  BEGIN_ACTION;
2740                  set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2741                  END_ACTION;
2742              }
2743     break;
2744
2745   case 85:
2746 /* Line 1787 of yacc.c  */
2747 #line 797 "parser.y"
2748     {
2749                  BEGIN_ACTION;
2750                  set((yyval.val), SelectionParserValue::createExpr(get((yyvsp[(1) - (1)].sel))));
2751                  END_ACTION;
2752              }
2753     break;
2754
2755   case 86:
2756 /* Line 1787 of yacc.c  */
2757 #line 802 "parser.y"
2758     { (yyval.val) = (yyvsp[(1) - (1)].val); }
2759     break;
2760
2761   case 87:
2762 /* Line 1787 of yacc.c  */
2763 #line 807 "parser.y"
2764     {
2765                  BEGIN_ACTION;
2766                  set((yyval.val), SelectionParserValue::createInteger((yyvsp[(1) - (1)].i)));
2767                  END_ACTION;
2768              }
2769     break;
2770
2771   case 88:
2772 /* Line 1787 of yacc.c  */
2773 #line 813 "parser.y"
2774     {
2775                  BEGIN_ACTION;
2776                  set((yyval.val), SelectionParserValue::createReal((yyvsp[(1) - (1)].r)));
2777                  END_ACTION;
2778              }
2779     break;
2780
2781   case 89:
2782 /* Line 1787 of yacc.c  */
2783 #line 819 "parser.y"
2784     {
2785                  BEGIN_ACTION;
2786                  scoped_ptr_sfree stringGuard((yyvsp[(1) - (1)].str));
2787                  set((yyval.val), SelectionParserValue::createString((yyvsp[(1) - (1)].str)));
2788                  END_ACTION;
2789              }
2790     break;
2791
2792   case 90:
2793 /* Line 1787 of yacc.c  */
2794 #line 825 "parser.y"
2795     { (yyval.val) = (yyvsp[(1) - (1)].val); }
2796     break;
2797
2798   case 91:
2799 /* Line 1787 of yacc.c  */
2800 #line 830 "parser.y"
2801     {
2802                  BEGIN_ACTION;
2803                  set((yyval.val), SelectionParserValue::createIntegerRange((yyvsp[(1) - (3)].i), (yyvsp[(3) - (3)].i)));
2804                  END_ACTION;
2805              }
2806     break;
2807
2808   case 92:
2809 /* Line 1787 of yacc.c  */
2810 #line 836 "parser.y"
2811     {
2812                  BEGIN_ACTION;
2813                  set((yyval.val), SelectionParserValue::createRealRange((yyvsp[(1) - (3)].i), (yyvsp[(3) - (3)].r)));
2814                  END_ACTION;
2815              }
2816     break;
2817
2818   case 93:
2819 /* Line 1787 of yacc.c  */
2820 #line 842 "parser.y"
2821     {
2822                  BEGIN_ACTION;
2823                  set((yyval.val), SelectionParserValue::createRealRange((yyvsp[(1) - (3)].r), (yyvsp[(3) - (3)].r)));
2824                  END_ACTION;
2825              }
2826     break;
2827
2828
2829 /* Line 1787 of yacc.c  */
2830 #line 2831 "parser.cpp"
2831       default: break;
2832     }
2833   /* User semantic actions sometimes alter yychar, and that requires
2834      that yytoken be updated with the new translation.  We take the
2835      approach of translating immediately before every use of yytoken.
2836      One alternative is translating here after every semantic action,
2837      but that translation would be missed if the semantic action invokes
2838      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2839      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
2840      incorrect destructor might then be invoked immediately.  In the
2841      case of YYERROR or YYBACKUP, subsequent parser actions might lead
2842      to an incorrect destructor call or verbose syntax error message
2843      before the lookahead is translated.  */
2844   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2845
2846   YYPOPSTACK (yylen);
2847   yylen = 0;
2848   YY_STACK_PRINT (yyss, yyssp);
2849
2850   *++yyvsp = yyval;
2851
2852   /* Now `shift' the result of the reduction.  Determine what state
2853      that goes to, based on the state we popped back to and the rule
2854      number reduced by.  */
2855
2856   yyn = yyr1[yyn];
2857
2858   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2859   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2860     yystate = yytable[yystate];
2861   else
2862     yystate = yydefgoto[yyn - YYNTOKENS];
2863
2864   goto yynewstate;
2865
2866
2867 /*------------------------------------.
2868 | yyerrlab -- here on detecting error |
2869 `------------------------------------*/
2870 yyerrlab:
2871   /* Make sure we have latest lookahead translation.  See comments at
2872      user semantic actions for why this is necessary.  */
2873   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2874
2875   /* If not already recovering from an error, report this error.  */
2876   if (!yyerrstatus)
2877     {
2878       ++yynerrs;
2879 #if ! YYERROR_VERBOSE
2880       yyerror (scanner, YY_("syntax error"));
2881 #else
2882 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2883                                         yyssp, yytoken)
2884       {
2885         char const *yymsgp = YY_("syntax error");
2886         int yysyntax_error_status;
2887         yysyntax_error_status = YYSYNTAX_ERROR;
2888         if (yysyntax_error_status == 0)
2889           yymsgp = yymsg;
2890         else if (yysyntax_error_status == 1)
2891           {
2892             if (yymsg != yymsgbuf)
2893               YYSTACK_FREE (yymsg);
2894             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2895             if (!yymsg)
2896               {
2897                 yymsg = yymsgbuf;
2898                 yymsg_alloc = sizeof yymsgbuf;
2899                 yysyntax_error_status = 2;
2900               }
2901             else
2902               {
2903                 yysyntax_error_status = YYSYNTAX_ERROR;
2904                 yymsgp = yymsg;
2905               }
2906           }
2907         yyerror (scanner, yymsgp);
2908         if (yysyntax_error_status == 2)
2909           goto yyexhaustedlab;
2910       }
2911 # undef YYSYNTAX_ERROR
2912 #endif
2913     }
2914
2915
2916
2917   if (yyerrstatus == 3)
2918     {
2919       /* If just tried and failed to reuse lookahead token after an
2920          error, discard it.  */
2921
2922       if (yychar <= YYEOF)
2923         {
2924           /* Return failure if at end of input.  */
2925           if (yychar == YYEOF)
2926             YYABORT;
2927         }
2928       else
2929         {
2930           yydestruct ("Error: discarding",
2931                       yytoken, &yylval, scanner);
2932           yychar = YYEMPTY;
2933         }
2934     }
2935
2936   /* Else will try to reuse lookahead token after shifting the error
2937      token.  */
2938   goto yyerrlab1;
2939
2940
2941 /*---------------------------------------------------.
2942 | yyerrorlab -- error raised explicitly by YYERROR.  |
2943 `---------------------------------------------------*/
2944 yyerrorlab:
2945
2946   /* Pacify compilers like GCC when the user code never invokes
2947      YYERROR and the label yyerrorlab therefore never appears in user
2948      code.  */
2949   if (/*CONSTCOND*/ 0)
2950      goto yyerrorlab;
2951
2952   /* Do not reclaim the symbols of the rule which action triggered
2953      this YYERROR.  */
2954   YYPOPSTACK (yylen);
2955   yylen = 0;
2956   YY_STACK_PRINT (yyss, yyssp);
2957   yystate = *yyssp;
2958   goto yyerrlab1;
2959
2960
2961 /*-------------------------------------------------------------.
2962 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2963 `-------------------------------------------------------------*/
2964 yyerrlab1:
2965   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2966
2967   for (;;)
2968     {
2969       yyn = yypact[yystate];
2970       if (!yypact_value_is_default (yyn))
2971         {
2972           yyn += YYTERROR;
2973           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2974             {
2975               yyn = yytable[yyn];
2976               if (0 < yyn)
2977                 break;
2978             }
2979         }
2980
2981       /* Pop the current state because it cannot handle the error token.  */
2982       if (yyssp == yyss)
2983         YYABORT;
2984
2985
2986       yydestruct ("Error: popping",
2987                   yystos[yystate], yyvsp, scanner);
2988       YYPOPSTACK (1);
2989       yystate = *yyssp;
2990       YY_STACK_PRINT (yyss, yyssp);
2991     }
2992
2993   *++yyvsp = yylval;
2994
2995
2996   /* Shift the error token.  */
2997   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2998
2999   yystate = yyn;
3000   goto yynewstate;
3001
3002
3003 /*-------------------------------------.
3004 | yyacceptlab -- YYACCEPT comes here.  |
3005 `-------------------------------------*/
3006 yyacceptlab:
3007   yyresult = 0;
3008   goto yyreturn;
3009
3010 /*-----------------------------------.
3011 | yyabortlab -- YYABORT comes here.  |
3012 `-----------------------------------*/
3013 yyabortlab:
3014   yyresult = 1;
3015   goto yyreturn;
3016
3017 #if !defined yyoverflow || YYERROR_VERBOSE
3018 /*-------------------------------------------------.
3019 | yyexhaustedlab -- memory exhaustion comes here.  |
3020 `-------------------------------------------------*/
3021 yyexhaustedlab:
3022   yyerror (scanner, YY_("memory exhausted"));
3023   yyresult = 2;
3024   /* Fall through.  */
3025 #endif
3026
3027 yyreturn:
3028   if (yychar != YYEMPTY)
3029     {
3030       /* Make sure we have latest lookahead translation.  See comments at
3031          user semantic actions for why this is necessary.  */
3032       yytoken = YYTRANSLATE (yychar);
3033       yydestruct ("Cleanup: discarding lookahead",
3034                   yytoken, &yylval, scanner);
3035     }
3036   /* Do not reclaim the symbols of the rule which action triggered
3037      this YYABORT or YYACCEPT.  */
3038   YYPOPSTACK (yylen);
3039   YY_STACK_PRINT (yyss, yyssp);
3040   while (yyssp != yyss)
3041     {
3042       yydestruct ("Cleanup: popping",
3043                   yystos[*yyssp], yyvsp, scanner);
3044       YYPOPSTACK (1);
3045     }
3046 #ifndef yyoverflow
3047   if (yyss != yyssa)
3048     YYSTACK_FREE (yyss);
3049 #endif
3050   yyps->yynew = 1;
3051
3052 yypushreturn:
3053 #if YYERROR_VERBOSE
3054   if (yymsg != yymsgbuf)
3055     YYSTACK_FREE (yymsg);
3056 #endif
3057   /* Make sure YYID is used.  */
3058   return YYID (yyresult);
3059 }
3060
3061