Reduce preprocessor dependency in resourcedivision.cpp
[gromacs.git] / src / gromacs / selection / parser.h
blob51f723bcf63db5f736d1de21c4f4bf234aa5ebd5
1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison interface for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 #ifndef YY__GMX_SEL_YY_PARSER_H_INCLUDED
34 # define YY__GMX_SEL_YY_PARSER_H_INCLUDED
35 /* Debug traces. */
36 #ifndef YYDEBUG
37 # define YYDEBUG 1
38 #endif
39 #if YYDEBUG
40 extern int _gmx_sel_yydebug;
41 #endif
42 /* "%code requires" blocks. */
43 #line 1 "parser.y" /* yacc.c:1909 */
46 * This file is part of the GROMACS molecular simulation package.
48 * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
49 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
50 * and including many others, as listed in the AUTHORS file in the
51 * top-level source directory and at http://www.gromacs.org.
53 * GROMACS is free software; you can redistribute it and/or
54 * modify it under the terms of the GNU Lesser General Public License
55 * as published by the Free Software Foundation; either version 2.1
56 * of the License, or (at your option) any later version.
58 * GROMACS is distributed in the hope that it will be useful,
59 * but WITHOUT ANY WARRANTY; without even the implied warranty of
60 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61 * Lesser General Public License for more details.
63 * You should have received a copy of the GNU Lesser General Public
64 * License along with GROMACS; if not, see
65 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
66 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
68 * If you want to redistribute modifications to GROMACS, please
69 * consider that scientific software is very special. Version
70 * control is crucial - bugs must be traceable. We will be happy to
71 * consider code for inclusion in the official distribution, but
72 * derived work must not be called official GROMACS. Details are found
73 * in the README & COPYING files - if they are missing, get the
74 * official version at http://www.gromacs.org.
76 * To help us fund GROMACS development, we humbly ask that you cite
77 * the research papers on the package. Check out http://www.gromacs.org.
79 #line 76 "parser.y" /* yacc.c:1909 */
81 #include "parsetree.h"
82 #include "selelem.h"
84 #define YYLTYPE ::gmx::SelectionLocation
86 #line 87 "parser.h" /* yacc.c:1909 */
88 /* Token type. */
89 #ifndef YYTOKENTYPE
90 # define YYTOKENTYPE
91 enum yytokentype
93 INVALID = 258,
94 TOK_INT = 259,
95 TOK_REAL = 260,
96 STR = 261,
97 IDENTIFIER = 262,
98 CMD_SEP = 263,
99 GROUP = 264,
100 TO = 265,
101 VARIABLE_NUMERIC = 266,
102 VARIABLE_GROUP = 267,
103 VARIABLE_POS = 268,
104 KEYWORD_NUMERIC = 269,
105 KEYWORD_STR = 270,
106 KEYWORD_POS = 271,
107 KEYWORD_GROUP = 272,
108 METHOD_NUMERIC = 273,
109 METHOD_GROUP = 274,
110 METHOD_POS = 275,
111 MODIFIER = 276,
112 EMPTY_POSMOD = 277,
113 PARAM = 278,
114 END_OF_METHOD = 279,
115 OF = 280,
116 CMP_OP = 281,
117 PARAM_REDUCT = 282,
118 OR = 283,
119 XOR = 284,
120 AND = 285,
121 NOT = 286,
122 UNARY_NEG = 287,
123 NUM_REDUCT = 288
125 #endif
127 /* Value type. */
128 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
130 union YYSTYPE
132 #line 83 "parser.y" /* yacc.c:1909 */
134 int i;
135 real r;
136 char *str;
137 struct gmx_ana_selmethod_t *meth;
139 gmx::SelectionStringMatchType smt;
141 gmx::SelectionTreeElementPointer *sel;
142 gmx::SelectionParserValue *val;
143 gmx::SelectionParserValueListPointer *vlist;
144 gmx::SelectionParserParameter *param;
145 gmx::SelectionParserParameterListPointer *plist;
147 #line 148 "parser.h" /* yacc.c:1909 */
150 typedef union YYSTYPE YYSTYPE;
151 # define YYSTYPE_IS_TRIVIAL 1
152 # define YYSTYPE_IS_DECLARED 1
153 #endif
155 /* Location type. */
156 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
157 typedef struct YYLTYPE YYLTYPE;
158 struct YYLTYPE
160 int first_line;
161 int first_column;
162 int last_line;
163 int last_column;
165 # define YYLTYPE_IS_DECLARED 1
166 # define YYLTYPE_IS_TRIVIAL 1
167 #endif
171 #ifndef YYPUSH_MORE_DEFINED
172 # define YYPUSH_MORE_DEFINED
173 enum { YYPUSH_MORE = 4 };
174 #endif
176 typedef struct _gmx_sel_yypstate _gmx_sel_yypstate;
178 int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner);
180 _gmx_sel_yypstate * _gmx_sel_yypstate_new ();
181 void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
183 #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */