- Timestamp:
- 05/05/17 16:51:58 (7 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/inputs/COMPLETE/context_surface.xml
r1126 r1127 6 6 <field id="field_A_srf" name="field_A_srf" long_name="Champ en degC" operation="average" unit="degC" /> 7 7 <field id="field_A_srf_2" field_ref="field_A_srf" /> 8 <!-- field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> field_A_srf + 273.15 </field --> 9 <field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> </field> 8 <field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> field_A_srf + 273.15 </field> 10 9 <field id="field_A_srf_K_2" field_ref="field_A_srf_K" /> 11 10 <field id="field_A_srf_max" name="field_A_srf_max" field_ref="field_A_srf" long_name="maximum field_A_srf" operation="maximum" /> … … 23 22 <field field_ref="field_A_srf_K" /> 24 23 <field field_ref="field_A_srf_K_2" name="field_A_srf_K_2" /> <!-- Should be identical to field_A_srf_K --> 25 < !--field field_ref="field_A_srf_K" name="field_A_srf_K_3">field_A_srf_K</field> --><!-- Should be identical to field_A_srf_K -->26 < !--field field_ref="field_A_srf_K_2" name="field_A_srf_K_max_mean" long_name="Maximum of hourly average over 6h" operation="maximum" freq_op="1h"> @field_A_srf_K </field> -->24 <field field_ref="field_A_srf_K" name="field_A_srf_K_3">field_A_srf_K</field> <!-- Should be identical to field_A_srf_K --> 25 <field field_ref="field_A_srf_K_2" name="field_A_srf_K_max_mean" long_name="Maximum of hourly average over 6h" operation="maximum" freq_op="1h"> @field_A_srf_K </field> 27 26 <field field_ref="field_A_srf" name="field_A_srf_min" operation="minimum" /> 28 27 <field field_ref="field_A_srf_2" name="field_A_srf_min_2" operation="minimum" /> <!-- Should be identical to field_A_srf_min --> 29 28 <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" /> 30 29 <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" /> 31 < !-- field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h"> @field_A_srf_max </field> -->32 < !--variable id="my_global_attribute" type="string">file_6h</variable> -->30 <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h"> @field_A_srf_max </field> 31 <variable id="my_global_attribute" type="string">file_6h</variable> 33 32 </file> 34 33 … … 44 43 <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" /> 45 44 <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" /> 46 < !--field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h"> @field_A_srf_max </field> -->45 <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h"> @field_A_srf_max </field> 47 46 <variable id="my_global_attribute" type="string" >file_1d</variable> 48 47 </file> -
XIOS/dev/branch_yushan/src/node/field.cpp
r1070 r1127 26 26 namespace xios{ 27 27 28 /// ////////////////////// D éfinitions ////////////////////// ///28 /// ////////////////////// Dfinitions ////////////////////// /// 29 29 30 30 CField::CField(void) -
XIOS/dev/branch_yushan/src/parse_expr/yacc_parser.cpp
r1037 r1127 1 /* A Bison parser, made by GNU Bison 3.0.2. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 1 2 /* A Bison parser, made by GNU Bison 2.4.1. */ 3 4 /* Skeleton implementation for Bison's Yacc-like parsers in C 5 6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 Free Software Foundation, Inc. 8 7 9 This program is free software: you can redistribute it and/or modify 8 10 it under the terms of the GNU General Public License as published by 9 11 the Free Software Foundation, either version 3 of the License, or 10 12 (at your option) any later version. 11 13 12 14 This program is distributed in the hope that it will be useful, 13 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 17 GNU General Public License for more details. 16 18 17 19 You should have received a copy of the GNU General Public License 18 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ … … 27 29 Bison output files to be licensed under the GNU General Public 28 30 License without this special exception. 29 31 30 32 This special exception was added by the Free Software Foundation in 31 33 version 2.2 of Bison. */ … … 45 47 46 48 /* Bison version. */ 47 #define YYBISON_VERSION " 3.0.2"49 #define YYBISON_VERSION "2.4.1" 48 50 49 51 /* Skeleton name. */ … … 59 61 #define YYPULL 1 60 62 63 /* Using locations. */ 64 #define YYLSP_NEEDED 0 61 65 62 66 63 67 64 68 /* Copy the first part of user declarations. */ 65 #line 1 "yacc_parser.yacc" /* yacc.c:339 */ 69 70 /* Line 189 of yacc.c */ 71 #line 1 "yacc_parser.yacc" 66 72 67 73 #include "filter_expr_node.hpp" … … 80 86 } 81 87 82 IFilterExprNode* parsed; 83 std::string globalInputText; 84 size_t globalReadOffset = 0; 85 88 static IFilterExprNode* parsed; 89 static std::string globalInputText; 90 static std::string *globalInputText_ptr = 0; 91 static size_t globalReadOffset = 0; 92 #pragma omp threadprivate(parsed, globalInputText_ptr, globalReadOffset) 93 86 94 int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead) 87 95 { 96 if(globalInputText_ptr == 0) globalInputText_ptr = new std::string; 88 97 size_t numBytesToRead = maxBytesToRead; 89 size_t bytesRemaining = globalInputText.length()-globalReadOffset; 98 //size_t bytesRemaining = globalInputText.length()-globalReadOffset; 99 size_t bytesRemaining = (*globalInputText_ptr).length()-globalReadOffset; 90 100 size_t i; 91 101 if (numBytesToRead > bytesRemaining) numBytesToRead = bytesRemaining; 92 for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i]; 102 //for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i]; 103 for (i = 0; i < numBytesToRead; i++) buffer[i] = (*globalInputText_ptr).c_str()[globalReadOffset + i]; 93 104 *numBytesRead = numBytesToRead; 94 105 globalReadOffset += numBytesToRead; … … 96 107 } 97 108 98 #line 99 "yacc_parser.cpp" /* yacc.c:339 */ 99 100 # ifndef YY_NULLPTR 101 # if defined __cplusplus && 201103L <= __cplusplus 102 # define YY_NULLPTR nullptr 103 # else 104 # define YY_NULLPTR 0 105 # endif 106 # endif 109 110 /* Line 189 of yacc.c */ 111 #line 112 "yacc_parser.cpp" 112 113 /* Enabling traces. */ 114 #ifndef YYDEBUG 115 # define YYDEBUG 0 116 #endif 107 117 108 118 /* Enabling verbose error messages. */ … … 114 124 #endif 115 125 116 /* In a future release of Bison, this section will be replaced 117 by #include "yacc_parser.hpp". */ 118 #ifndef YY_YY_YACC_PARSER_HPP_INCLUDED 119 # define YY_YY_YACC_PARSER_HPP_INCLUDED 120 /* Debug traces. */ 121 #ifndef YYDEBUG 122 # define YYDEBUG 0 123 #endif 124 #if YYDEBUG 125 extern int yydebug; 126 #endif 127 128 /* Token type. */ 126 /* Enabling the token table. */ 127 #ifndef YYTOKEN_TABLE 128 # define YYTOKEN_TABLE 0 129 #endif 130 131 132 /* Tokens. */ 129 133 #ifndef YYTOKENTYPE 130 134 # define YYTOKENTYPE 131 enum yytokentype 132 { 133 NUMBER = 258, 134 VAR = 259, 135 ID = 260, 136 AVERAGE = 261, 137 PLUS = 262, 138 MINUS = 263, 139 TIMES = 264, 140 DIVIDE = 265, 141 POWER = 266, 142 EQ = 267, 143 LT = 268, 144 GT = 269, 145 LE = 270, 146 GE = 271, 147 LEFT_PARENTHESIS = 272, 148 RIGHT_PARENTHESIS = 273, 149 END = 274, 150 NEG = 275 151 }; 152 #endif 153 154 /* Value type. */ 135 /* Put the tokens into the symbol table, so that GDB and other debuggers 136 know about them. */ 137 enum yytokentype { 138 NUMBER = 258, 139 VAR = 259, 140 ID = 260, 141 AVERAGE = 261, 142 PLUS = 262, 143 MINUS = 263, 144 TIMES = 264, 145 DIVIDE = 265, 146 POWER = 266, 147 EQ = 267, 148 LT = 268, 149 GT = 269, 150 LE = 270, 151 GE = 271, 152 LEFT_PARENTHESIS = 272, 153 RIGHT_PARENTHESIS = 273, 154 END = 274, 155 NEG = 275 156 }; 157 #endif 158 159 160 155 161 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 156 typedef union YYSTYPE YYSTYPE; 157 union YYSTYPE 158 { 159 #line 35 "yacc_parser.yacc" /* yacc.c:355 */ 162 typedef union YYSTYPE 163 { 164 165 /* Line 214 of yacc.c */ 166 #line 40 "yacc_parser.yacc" 160 167 161 168 std::string* str; /* symbol table index */ … … 163 170 xios::IFilterExprNode* filterNode; 164 171 165 #line 166 "yacc_parser.cpp" /* yacc.c:355 */ 166 }; 172 173 174 /* Line 214 of yacc.c */ 175 #line 176 "yacc_parser.cpp" 176 } YYSTYPE; 167 177 # define YYSTYPE_IS_TRIVIAL 1 178 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 168 179 # define YYSTYPE_IS_DECLARED 1 169 180 #endif 170 181 171 182 172 extern YYSTYPE yylval;173 174 int yyparse (void);175 176 #endif /* !YY_YY_YACC_PARSER_HPP_INCLUDED */177 178 183 /* Copy the second part of user declarations. */ 179 184 180 #line 181 "yacc_parser.cpp" /* yacc.c:358 */ 185 186 /* Line 264 of yacc.c */ 187 #line 188 "yacc_parser.cpp" 181 188 182 189 #ifdef short … … 192 199 #ifdef YYTYPE_INT8 193 200 typedef YYTYPE_INT8 yytype_int8; 201 #elif (defined __STDC__ || defined __C99__FUNC__ \ 202 || defined __cplusplus || defined _MSC_VER) 203 typedef signed char yytype_int8; 194 204 #else 195 typedef s igned charyytype_int8;205 typedef short int yytype_int8; 196 206 #endif 197 207 … … 213 223 # elif defined size_t 214 224 # define YYSIZE_T size_t 215 # elif ! defined YYSIZE_T 225 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 226 || defined __cplusplus || defined _MSC_VER) 216 227 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 217 228 # define YYSIZE_T size_t … … 224 235 225 236 #ifndef YY_ 226 # if defined YYENABLE_NLS &&YYENABLE_NLS237 # if YYENABLE_NLS 227 238 # if ENABLE_NLS 228 239 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 229 # define YY_( Msgid) dgettext ("bison-runtime", Msgid)240 # define YY_(msgid) dgettext ("bison-runtime", msgid) 230 241 # endif 231 242 # endif 232 243 # ifndef YY_ 233 # define YY_(Msgid) Msgid 234 # endif 235 #endif 236 237 #ifndef YY_ATTRIBUTE 238 # if (defined __GNUC__ \ 239 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 240 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 241 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 242 # else 243 # define YY_ATTRIBUTE(Spec) /* empty */ 244 # endif 245 #endif 246 247 #ifndef YY_ATTRIBUTE_PURE 248 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 249 #endif 250 251 #ifndef YY_ATTRIBUTE_UNUSED 252 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 253 #endif 254 255 #if !defined _Noreturn \ 256 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 257 # if defined _MSC_VER && 1200 <= _MSC_VER 258 # define _Noreturn __declspec (noreturn) 259 # else 260 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 244 # define YY_(msgid) msgid 261 245 # endif 262 246 #endif … … 264 248 /* Suppress unused-variable warnings by "using" E. */ 265 249 #if ! defined lint || defined __GNUC__ 266 # define YYUSE( E) ((void) (E))250 # define YYUSE(e) ((void) (e)) 267 251 #else 268 # define YYUSE(E) /* empty */ 269 #endif 270 271 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 272 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 273 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 274 _Pragma ("GCC diagnostic push") \ 275 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 276 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 277 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 278 _Pragma ("GCC diagnostic pop") 252 # define YYUSE(e) /* empty */ 253 #endif 254 255 /* Identity function, used to suppress warnings about constant conditions. */ 256 #ifndef lint 257 # define YYID(n) (n) 279 258 #else 280 # define YY_INITIAL_VALUE(Value) Value 281 #endif 282 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 283 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 284 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 285 #endif 286 #ifndef YY_INITIAL_VALUE 287 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 288 #endif 289 259 #if (defined __STDC__ || defined __C99__FUNC__ \ 260 || defined __cplusplus || defined _MSC_VER) 261 static int 262 YYID (int yyi) 263 #else 264 static int 265 YYID (yyi) 266 int yyi; 267 #endif 268 { 269 return yyi; 270 } 271 #endif 290 272 291 273 #if ! defined yyoverflow || YYERROR_VERBOSE … … 306 288 # else 307 289 # define YYSTACK_ALLOC alloca 308 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 290 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 291 || defined __cplusplus || defined _MSC_VER) 309 292 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 310 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 311 # ifndef EXIT_SUCCESS 312 # define EXIT_SUCCESS 0 293 # ifndef _STDLIB_H 294 # define _STDLIB_H 1 313 295 # endif 314 296 # endif … … 318 300 319 301 # ifdef YYSTACK_ALLOC 320 /* Pacify GCC's 'empty if-body' warning. */321 # define YYSTACK_FREE(Ptr) do { /* empty */; } while ( 0)302 /* Pacify GCC's `empty if-body' warning. */ 303 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 322 304 # ifndef YYSTACK_ALLOC_MAXIMUM 323 305 /* The OS might guarantee only one guard page at the bottom of the stack, … … 333 315 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 334 316 # endif 335 # if (defined __cplusplus && ! defined EXIT_SUCCESS\317 # if (defined __cplusplus && ! defined _STDLIB_H \ 336 318 && ! ((defined YYMALLOC || defined malloc) \ 337 319 && (defined YYFREE || defined free))) 338 320 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 339 # ifndef EXIT_SUCCESS340 # define EXIT_SUCCESS 0321 # ifndef _STDLIB_H 322 # define _STDLIB_H 1 341 323 # endif 342 324 # endif 343 325 # ifndef YYMALLOC 344 326 # define YYMALLOC malloc 345 # if ! defined malloc && ! defined EXIT_SUCCESS 327 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 328 || defined __cplusplus || defined _MSC_VER) 346 329 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 347 330 # endif … … 349 332 # ifndef YYFREE 350 333 # define YYFREE free 351 # if ! defined free && ! defined EXIT_SUCCESS 334 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 335 || defined __cplusplus || defined _MSC_VER) 352 336 void free (void *); /* INFRINGES ON USER NAME SPACE */ 353 337 # endif … … 359 343 #if (! defined yyoverflow \ 360 344 && (! defined __cplusplus \ 361 345 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 362 346 363 347 /* A type that is properly aligned for any stack member. */ … … 377 361 + YYSTACK_GAP_MAXIMUM) 378 362 379 # define YYCOPY_NEEDED 1 363 /* Copy COUNT objects from FROM to TO. The source and destination do 364 not overlap. */ 365 # ifndef YYCOPY 366 # if defined __GNUC__ && 1 < __GNUC__ 367 # define YYCOPY(To, From, Count) \ 368 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 369 # else 370 # define YYCOPY(To, From, Count) \ 371 do \ 372 { \ 373 YYSIZE_T yyi; \ 374 for (yyi = 0; yyi < (Count); yyi++) \ 375 (To)[yyi] = (From)[yyi]; \ 376 } \ 377 while (YYID (0)) 378 # endif 379 # endif 380 380 381 381 /* Relocate STACK from its old location to the new one. The … … 384 384 stack. Advance YYPTR to a properly aligned location for the next 385 385 stack. */ 386 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 387 do \ 388 { \ 389 YYSIZE_T yynewbytes; \ 390 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 391 Stack = &yyptr->Stack_alloc; \ 392 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 393 yyptr += yynewbytes / sizeof (*yyptr); \ 394 } \ 395 while (0) 396 397 #endif 398 399 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 400 /* Copy COUNT objects from SRC to DST. The source and destination do 401 not overlap. */ 402 # ifndef YYCOPY 403 # if defined __GNUC__ && 1 < __GNUC__ 404 # define YYCOPY(Dst, Src, Count) \ 405 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 406 # else 407 # define YYCOPY(Dst, Src, Count) \ 408 do \ 409 { \ 410 YYSIZE_T yyi; \ 411 for (yyi = 0; yyi < (Count); yyi++) \ 412 (Dst)[yyi] = (Src)[yyi]; \ 413 } \ 414 while (0) 415 # endif 416 # endif 417 #endif /* !YYCOPY_NEEDED */ 386 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 387 do \ 388 { \ 389 YYSIZE_T yynewbytes; \ 390 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 391 Stack = &yyptr->Stack_alloc; \ 392 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 393 yyptr += yynewbytes / sizeof (*yyptr); \ 394 } \ 395 while (YYID (0)) 396 397 #endif 418 398 419 399 /* YYFINAL -- State number of the termination state. */ … … 428 408 /* YYNRULES -- Number of rules. */ 429 409 #define YYNRULES 52 430 /* YYN STATES -- Number of states. */410 /* YYNRULES -- Number of states. */ 431 411 #define YYNSTATES 108 432 412 433 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned 434 by yylex, with out-of-bounds checking. */ 413 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 435 414 #define YYUNDEFTOK 2 436 415 #define YYMAXUTOK 275 437 416 438 #define YYTRANSLATE(YYX) 417 #define YYTRANSLATE(YYX) \ 439 418 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 440 419 441 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 442 as returned by yylex, without out-of-bounds checking. */ 420 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 443 421 static const yytype_uint8 yytranslate[] = 444 422 { … … 474 452 475 453 #if YYDEBUG 476 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 454 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 455 YYRHS. */ 456 static const yytype_uint8 yyprhs[] = 457 { 458 0, 0, 3, 5, 8, 10, 12, 16, 20, 24, 459 28, 31, 35, 39, 43, 47, 51, 55, 59, 64, 460 66, 68, 72, 76, 80, 84, 87, 91, 95, 99, 461 103, 107, 111, 115, 119, 123, 127, 131, 135, 139, 462 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 463 183, 187, 191 464 }; 465 466 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 467 static const yytype_int8 yyrhs[] = 468 { 469 22, 0, -1, 19, -1, 24, 19, -1, 3, -1, 470 4, -1, 23, 7, 23, -1, 23, 8, 23, -1, 471 23, 9, 23, -1, 23, 10, 23, -1, 8, 23, 472 -1, 23, 11, 23, -1, 23, 12, 23, -1, 23, 473 13, 23, -1, 23, 14, 23, -1, 23, 15, 23, 474 -1, 23, 16, 23, -1, 17, 23, 18, -1, 5, 475 17, 23, 18, -1, 5, -1, 6, -1, 24, 7, 476 24, -1, 24, 8, 24, -1, 24, 9, 24, -1, 477 24, 10, 24, -1, 8, 24, -1, 24, 11, 24, 478 -1, 24, 12, 24, -1, 24, 13, 24, -1, 24, 479 14, 24, -1, 24, 15, 24, -1, 24, 16, 24, 480 -1, 17, 24, 18, -1, 24, 7, 23, -1, 23, 481 7, 24, -1, 24, 8, 23, -1, 23, 8, 24, 482 -1, 24, 9, 23, -1, 23, 9, 24, -1, 24, 483 10, 23, -1, 23, 10, 24, -1, 24, 11, 23, 484 -1, 24, 12, 23, -1, 23, 12, 24, -1, 24, 485 13, 23, -1, 23, 13, 24, -1, 24, 14, 23, 486 -1, 23, 14, 24, -1, 24, 15, 23, -1, 23, 487 15, 24, -1, 24, 16, 23, -1, 23, 16, 24, 488 -1, 5, 17, 24, 18, -1 489 }; 490 491 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 477 492 static const yytype_uint8 yyrline[] = 478 493 { 479 0, 6 1, 61, 62, 66, 67, 68, 69, 70, 71,480 7 2, 73, 74, 75, 76, 77, 78, 79, 80, 84,481 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,482 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,483 1 05, 106, 107, 108, 109, 110, 111, 112, 113, 114,484 1 15, 116, 117494 0, 66, 66, 67, 71, 72, 73, 74, 75, 76, 495 77, 78, 79, 80, 81, 82, 83, 84, 85, 89, 496 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 497 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 498 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 499 120, 121, 122 485 500 }; 486 501 #endif 487 502 488 #if YYDEBUG || YYERROR_VERBOSE || 0503 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 489 504 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 490 505 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ … … 494 509 "MINUS", "TIMES", "DIVIDE", "POWER", "EQ", "LT", "GT", "LE", "GE", 495 510 "LEFT_PARENTHESIS", "RIGHT_PARENTHESIS", "END", "NEG", "$accept", "Line", 496 "Expression", "Field_expr", YY_NULLPTR511 "Expression", "Field_expr", 0 497 512 }; 498 513 #endif 499 514 500 515 # ifdef YYPRINT 501 /* YYTOKNUM[ NUM] -- (External) token number corresponding to the502 (internal) symbol number NUM (which must be that of a token). */516 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 517 token YYLEX-NUM. */ 503 518 static const yytype_uint16 yytoknum[] = 504 519 { … … 509 524 # endif 510 525 526 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 527 static const yytype_uint8 yyr1[] = 528 { 529 0, 21, 22, 22, 23, 23, 23, 23, 23, 23, 530 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 531 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 532 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 533 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 534 24, 24, 24 535 }; 536 537 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 538 static const yytype_uint8 yyr2[] = 539 { 540 0, 2, 1, 2, 1, 1, 3, 3, 3, 3, 541 2, 3, 3, 3, 3, 3, 3, 3, 4, 1, 542 1, 3, 3, 3, 3, 2, 3, 3, 3, 3, 543 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 544 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 545 3, 3, 4 546 }; 547 548 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 549 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 550 means the default is an error. */ 551 static const yytype_uint8 yydefact[] = 552 { 553 0, 4, 5, 19, 20, 0, 0, 2, 0, 0, 554 0, 0, 10, 25, 0, 0, 1, 0, 0, 0, 555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 556 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 557 17, 32, 6, 34, 7, 36, 8, 38, 9, 40, 558 0, 0, 0, 11, 12, 43, 13, 45, 14, 47, 559 15, 49, 16, 51, 33, 21, 35, 22, 37, 23, 560 39, 24, 41, 26, 42, 27, 44, 28, 46, 29, 561 48, 30, 50, 31, 18, 52, 0, 10, 0, 0, 562 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 563 7, 8, 9, 12, 13, 14, 15, 16 564 }; 565 566 /* YYDEFGOTO[NTERM-NUM]. */ 567 static const yytype_int8 yydefgoto[] = 568 { 569 -1, 8, 9, 10 570 }; 571 572 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 573 STATE-NUM. */ 511 574 #define YYPACT_NINF -13 512 513 #define yypact_value_is_default(Yystate) \514 (!!((Yystate) == (-13)))515 516 #define YYTABLE_NINF -1517 518 #define yytable_value_is_error(Yytable_value) \519 0520 521 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing522 STATE-NUM. */523 575 static const yytype_int16 yypact[] = 524 576 { … … 536 588 }; 537 589 538 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 539 Performed when YYTABLE does not specify something else to do. Zero 540 means the default is an error. */ 541 static const yytype_uint8 yydefact[] = 542 { 543 0, 4, 5, 19, 20, 0, 0, 2, 0, 0, 544 0, 0, 10, 25, 0, 0, 1, 0, 0, 0, 545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 546 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 547 17, 32, 6, 34, 7, 36, 8, 38, 9, 40, 548 0, 0, 0, 11, 12, 43, 13, 45, 14, 47, 549 15, 49, 16, 51, 33, 21, 35, 22, 37, 23, 550 39, 24, 41, 26, 42, 27, 44, 28, 46, 29, 551 48, 30, 50, 31, 18, 52, 0, 10, 0, 0, 552 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 553 7, 8, 9, 12, 13, 14, 15, 16 554 }; 555 556 /* YYPGOTO[NTERM-NUM]. */ 590 /* YYPGOTO[NTERM-NUM]. */ 557 591 static const yytype_int8 yypgoto[] = 558 592 { … … 560 594 }; 561 595 562 /* YYDEFGOTO[NTERM-NUM]. */ 563 static const yytype_int8 yydefgoto[] = 564 { 565 -1, 8, 9, 10 566 }; 567 568 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 569 positive, shift that token. If negative, reduce the rule whose 570 number is the opposite. If YYTABLE_NINF, syntax error. */ 596 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 597 positive, shift that token. If negative, reduce the rule which 598 number is the opposite. If zero, do what YYDEFACT says. 599 If YYTABLE_NINF, syntax error. */ 600 #define YYTABLE_NINF -1 571 601 static const yytype_uint8 yytable[] = 572 602 { … … 619 649 }; 620 650 621 622 651 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 652 symbol of state STATE-NUM. */ 623 653 static const yytype_uint8 yystos[] = 624 654 { … … 636 666 }; 637 667 638 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 639 static const yytype_uint8 yyr1[] = 640 { 641 0, 21, 22, 22, 23, 23, 23, 23, 23, 23, 642 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 643 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 644 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 645 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 646 24, 24, 24 647 }; 648 649 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 650 static const yytype_uint8 yyr2[] = 651 { 652 0, 2, 1, 2, 1, 1, 3, 3, 3, 3, 653 2, 3, 3, 3, 3, 3, 3, 3, 4, 1, 654 1, 3, 3, 3, 3, 2, 3, 3, 3, 3, 655 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 656 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 657 3, 3, 4 658 }; 659 660 661 #define yyerrok (yyerrstatus = 0) 662 #define yyclearin (yychar = YYEMPTY) 663 #define YYEMPTY (-2) 664 #define YYEOF 0 665 666 #define YYACCEPT goto yyacceptlab 667 #define YYABORT goto yyabortlab 668 #define YYERROR goto yyerrorlab 669 668 #define yyerrok (yyerrstatus = 0) 669 #define yyclearin (yychar = YYEMPTY) 670 #define YYEMPTY (-2) 671 #define YYEOF 0 672 673 #define YYACCEPT goto yyacceptlab 674 #define YYABORT goto yyabortlab 675 #define YYERROR goto yyerrorlab 676 677 678 /* Like YYERROR except do call yyerror. This remains here temporarily 679 to ease the transition to the new meaning of YYERROR, for GCC. 680 Once GCC version 2 has supplanted version 1, this can go. */ 681 682 #define YYFAIL goto yyerrlab 670 683 671 684 #define YYRECOVERING() (!!yyerrstatus) 672 685 673 #define YYBACKUP(Token, Value) 674 do 675 if (yychar == YYEMPTY )\676 { 677 yychar = (Token); 678 yylval = (Value); 679 YYPOPSTACK (yylen);\680 yystate = *yyssp;\681 goto yybackup; 682 } 683 else 684 { 686 #define YYBACKUP(Token, Value) \ 687 do \ 688 if (yychar == YYEMPTY && yylen == 1) \ 689 { \ 690 yychar = (Token); \ 691 yylval = (Value); \ 692 yytoken = YYTRANSLATE (yychar); \ 693 YYPOPSTACK (1); \ 694 goto yybackup; \ 695 } \ 696 else \ 697 { \ 685 698 yyerror (YY_("syntax error: cannot back up")); \ 686 YYERROR; \ 687 } \ 688 while (0) 689 690 /* Error token number */ 691 #define YYTERROR 1 692 #define YYERRCODE 256 693 694 699 YYERROR; \ 700 } \ 701 while (YYID (0)) 702 703 704 #define YYTERROR 1 705 #define YYERRCODE 256 706 707 708 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 709 If N is 0, then set CURRENT to the empty location which ends 710 the previous symbol: RHS[0] (always defined). */ 711 712 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 713 #ifndef YYLLOC_DEFAULT 714 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 715 do \ 716 if (YYID (N)) \ 717 { \ 718 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 719 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 720 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 721 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 722 } \ 723 else \ 724 { \ 725 (Current).first_line = (Current).last_line = \ 726 YYRHSLOC (Rhs, 0).last_line; \ 727 (Current).first_column = (Current).last_column = \ 728 YYRHSLOC (Rhs, 0).last_column; \ 729 } \ 730 while (YYID (0)) 731 #endif 732 733 734 /* YY_LOCATION_PRINT -- Print the location on the stream. 735 This macro was not mandated originally: define only if we know 736 we won't break user code: when these are the locations we know. */ 737 738 #ifndef YY_LOCATION_PRINT 739 # if YYLTYPE_IS_TRIVIAL 740 # define YY_LOCATION_PRINT(File, Loc) \ 741 fprintf (File, "%d.%d-%d.%d", \ 742 (Loc).first_line, (Loc).first_column, \ 743 (Loc).last_line, (Loc).last_column) 744 # else 745 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 746 # endif 747 #endif 748 749 750 /* YYLEX -- calling `yylex' with the right arguments. */ 751 752 #ifdef YYLEX_PARAM 753 # define YYLEX yylex (YYLEX_PARAM) 754 #else 755 # define YYLEX yylex () 756 #endif 695 757 696 758 /* Enable debugging if requested. */ … … 702 764 # endif 703 765 704 # define YYDPRINTF(Args) \ 705 do { \ 706 if (yydebug) \ 707 YYFPRINTF Args; \ 708 } while (0) 709 710 /* This macro is provided for backward compatibility. */ 711 #ifndef YY_LOCATION_PRINT 712 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 713 #endif 714 715 716 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 717 do { \ 718 if (yydebug) \ 719 { \ 720 YYFPRINTF (stderr, "%s ", Title); \ 721 yy_symbol_print (stderr, \ 722 Type, Value); \ 723 YYFPRINTF (stderr, "\n"); \ 724 } \ 725 } while (0) 726 727 728 /*----------------------------------------. 729 | Print this symbol's value on YYOUTPUT. | 730 `----------------------------------------*/ 731 766 # define YYDPRINTF(Args) \ 767 do { \ 768 if (yydebug) \ 769 YYFPRINTF Args; \ 770 } while (YYID (0)) 771 772 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 773 do { \ 774 if (yydebug) \ 775 { \ 776 YYFPRINTF (stderr, "%s ", Title); \ 777 yy_symbol_print (stderr, \ 778 Type, Value); \ 779 YYFPRINTF (stderr, "\n"); \ 780 } \ 781 } while (YYID (0)) 782 783 784 /*--------------------------------. 785 | Print this symbol on YYOUTPUT. | 786 `--------------------------------*/ 787 788 /*ARGSUSED*/ 789 #if (defined __STDC__ || defined __C99__FUNC__ \ 790 || defined __cplusplus || defined _MSC_VER) 732 791 static void 733 792 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 734 { 735 FILE *yyo = yyoutput; 736 YYUSE (yyo); 793 #else 794 static void 795 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 796 FILE *yyoutput; 797 int yytype; 798 YYSTYPE const * const yyvaluep; 799 #endif 800 { 737 801 if (!yyvaluep) 738 802 return; … … 740 804 if (yytype < YYNTOKENS) 741 805 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 806 # else 807 YYUSE (yyoutput); 742 808 # endif 743 YYUSE (yytype); 809 switch (yytype) 810 { 811 default: 812 break; 813 } 744 814 } 745 815 … … 749 819 `--------------------------------*/ 750 820 821 #if (defined __STDC__ || defined __C99__FUNC__ \ 822 || defined __cplusplus || defined _MSC_VER) 751 823 static void 752 824 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 753 { 754 YYFPRINTF (yyoutput, "%s %s (", 755 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 825 #else 826 static void 827 yy_symbol_print (yyoutput, yytype, yyvaluep) 828 FILE *yyoutput; 829 int yytype; 830 YYSTYPE const * const yyvaluep; 831 #endif 832 { 833 if (yytype < YYNTOKENS) 834 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 835 else 836 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 756 837 757 838 yy_symbol_value_print (yyoutput, yytype, yyvaluep); … … 764 845 `------------------------------------------------------------------*/ 765 846 847 #if (defined __STDC__ || defined __C99__FUNC__ \ 848 || defined __cplusplus || defined _MSC_VER) 766 849 static void 767 850 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 851 #else 852 static void 853 yy_stack_print (yybottom, yytop) 854 yytype_int16 *yybottom; 855 yytype_int16 *yytop; 856 #endif 768 857 { 769 858 YYFPRINTF (stderr, "Stack now"); … … 776 865 } 777 866 778 # define YY_STACK_PRINT(Bottom, Top) 779 do { 780 if (yydebug) 781 yy_stack_print ((Bottom), (Top)); 782 } while ( 0)867 # define YY_STACK_PRINT(Bottom, Top) \ 868 do { \ 869 if (yydebug) \ 870 yy_stack_print ((Bottom), (Top)); \ 871 } while (YYID (0)) 783 872 784 873 … … 787 876 `------------------------------------------------*/ 788 877 878 #if (defined __STDC__ || defined __C99__FUNC__ \ 879 || defined __cplusplus || defined _MSC_VER) 789 880 static void 790 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 791 { 792 unsigned long int yylno = yyrline[yyrule]; 881 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 882 #else 883 static void 884 yy_reduce_print (yyvsp, yyrule) 885 YYSTYPE *yyvsp; 886 int yyrule; 887 #endif 888 { 793 889 int yynrhs = yyr2[yyrule]; 794 890 int yyi; 891 unsigned long int yylno = yyrline[yyrule]; 795 892 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 796 893 yyrule - 1, yylno); 797 894 /* The symbols being reduced. */ 798 895 for (yyi = 0; yyi < yynrhs; yyi++) 799 896 { 800 897 YYFPRINTF (stderr, " $%d = ", yyi + 1); 801 yy_symbol_print (stderr, 802 yystos[yyssp[yyi + 1 - yynrhs]], 803 &(yyvsp[(yyi + 1) - (yynrhs)]) 804 ); 898 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 899 &(yyvsp[(yyi + 1) - (yynrhs)]) 900 ); 805 901 YYFPRINTF (stderr, "\n"); 806 902 } 807 903 } 808 904 809 # define YY_REDUCE_PRINT(Rule) 810 do { 811 if (yydebug) 812 yy_reduce_print (yy ssp, yyvsp, Rule); \813 } while ( 0)905 # define YY_REDUCE_PRINT(Rule) \ 906 do { \ 907 if (yydebug) \ 908 yy_reduce_print (yyvsp, Rule); \ 909 } while (YYID (0)) 814 910 815 911 /* Nonzero means print parse trace. It is left uninitialized so that … … 825 921 826 922 /* YYINITDEPTH -- initial size of the parser's stacks. */ 827 #ifndef 923 #ifndef YYINITDEPTH 828 924 # define YYINITDEPTH 200 829 925 #endif … … 839 935 # define YYMAXDEPTH 10000 840 936 #endif 937 938 841 939 842 940 … … 848 946 # else 849 947 /* Return the length of YYSTR. */ 948 #if (defined __STDC__ || defined __C99__FUNC__ \ 949 || defined __cplusplus || defined _MSC_VER) 850 950 static YYSIZE_T 851 951 yystrlen (const char *yystr) 952 #else 953 static YYSIZE_T 954 yystrlen (yystr) 955 const char *yystr; 956 #endif 852 957 { 853 958 YYSIZE_T yylen; … … 865 970 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 866 971 YYDEST. */ 972 #if (defined __STDC__ || defined __C99__FUNC__ \ 973 || defined __cplusplus || defined _MSC_VER) 867 974 static char * 868 975 yystpcpy (char *yydest, const char *yysrc) 976 #else 977 static char * 978 yystpcpy (yydest, yysrc) 979 char *yydest; 980 const char *yysrc; 981 #endif 869 982 { 870 983 char *yyd = yydest; … … 896 1009 897 1010 for (;;) 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 1011 switch (*++yyp) 1012 { 1013 case '\'': 1014 case ',': 1015 goto do_not_strip_quotes; 1016 1017 case '\\': 1018 if (*++yyp != '\\') 1019 goto do_not_strip_quotes; 1020 /* Fall through. */ 1021 default: 1022 if (yyres) 1023 yyres[yyn] = *yyp; 1024 yyn++; 1025 break; 1026 1027 case '"': 1028 if (yyres) 1029 yyres[yyn] = '\0'; 1030 return yyn; 1031 } 919 1032 do_not_strip_quotes: ; 920 1033 } … … 927 1040 # endif 928 1041 929 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 930 about the unexpected token YYTOKEN for the state stack whose top is 931 YYSSP. 932 933 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 934 not large enough to hold the message. In that case, also set 935 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 936 required number of bytes is too large to store. */ 937 static int 938 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 939 yytype_int16 *yyssp, int yytoken) 940 { 941 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 942 YYSIZE_T yysize = yysize0; 943 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 944 /* Internationalized format string. */ 945 const char *yyformat = YY_NULLPTR; 946 /* Arguments of yyformat. */ 947 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 948 /* Number of reported tokens (one for the "unexpected", one per 949 "expected"). */ 950 int yycount = 0; 951 952 /* There are many possibilities here to consider: 953 - If this state is a consistent state with a default action, then 954 the only way this function was invoked is if the default action 955 is an error action. In that case, don't check for expected 956 tokens because there are none. 957 - The only way there can be no lookahead present (in yychar) is if 958 this state is a consistent state with a default action. Thus, 959 detecting the absence of a lookahead is sufficient to determine 960 that there is no unexpected or expected token to report. In that 961 case, just report a simple "syntax error". 962 - Don't assume there isn't a lookahead just because this state is a 963 consistent state with a default action. There might have been a 964 previous inconsistent state, consistent state with a non-default 965 action, or user semantic action that manipulated yychar. 966 - Of course, the expected token list depends on states to have 967 correct lookahead information, and it depends on the parser not 968 to perform extra reductions after fetching a lookahead from the 969 scanner and before detecting a syntax error. Thus, state merging 970 (from LALR or IELR) and default reductions corrupt the expected 971 token list. However, the list is correct for canonical LR with 972 one exception: it will still contain any token that will not be 973 accepted due to an error action in a later state. 974 */ 975 if (yytoken != YYEMPTY) 1042 /* Copy into YYRESULT an error message about the unexpected token 1043 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1044 including the terminating null byte. If YYRESULT is null, do not 1045 copy anything; just return the number of bytes that would be 1046 copied. As a special case, return 0 if an ordinary "syntax error" 1047 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1048 size calculation. */ 1049 static YYSIZE_T 1050 yysyntax_error (char *yyresult, int yystate, int yychar) 1051 { 1052 int yyn = yypact[yystate]; 1053 1054 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1055 return 0; 1056 else 976 1057 { 977 int yyn = yypact[*yyssp]; 978 yyarg[yycount++] = yytname[yytoken]; 979 if (!yypact_value_is_default (yyn)) 980 { 981 /* Start YYX at -YYN if negative to avoid negative indexes in 982 YYCHECK. In other words, skip the first -YYN actions for 983 this state because they are default actions. */ 984 int yyxbegin = yyn < 0 ? -yyn : 0; 985 /* Stay within bounds of both yycheck and yytname. */ 986 int yychecklim = YYLAST - yyn + 1; 987 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 988 int yyx; 989 990 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 991 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 992 && !yytable_value_is_error (yytable[yyx + yyn])) 993 { 994 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 995 { 996 yycount = 1; 997 yysize = yysize0; 998 break; 999 } 1000 yyarg[yycount++] = yytname[yyx]; 1001 { 1002 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 1003 if (! (yysize <= yysize1 1004 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1005 return 2; 1006 yysize = yysize1; 1007 } 1008 } 1009 } 1058 int yytype = YYTRANSLATE (yychar); 1059 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1060 YYSIZE_T yysize = yysize0; 1061 YYSIZE_T yysize1; 1062 int yysize_overflow = 0; 1063 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1064 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1065 int yyx; 1066 1067 # if 0 1068 /* This is so xgettext sees the translatable formats that are 1069 constructed on the fly. */ 1070 YY_("syntax error, unexpected %s"); 1071 YY_("syntax error, unexpected %s, expecting %s"); 1072 YY_("syntax error, unexpected %s, expecting %s or %s"); 1073 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1074 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1075 # endif 1076 char *yyfmt; 1077 char const *yyf; 1078 static char const yyunexpected[] = "syntax error, unexpected %s"; 1079 static char const yyexpecting[] = ", expecting %s"; 1080 static char const yyor[] = " or %s"; 1081 char yyformat[sizeof yyunexpected 1082 + sizeof yyexpecting - 1 1083 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1084 * (sizeof yyor - 1))]; 1085 char const *yyprefix = yyexpecting; 1086 1087 /* Start YYX at -YYN if negative to avoid negative indexes in 1088 YYCHECK. */ 1089 int yyxbegin = yyn < 0 ? -yyn : 0; 1090 1091 /* Stay within bounds of both yycheck and yytname. */ 1092 int yychecklim = YYLAST - yyn + 1; 1093 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1094 int yycount = 1; 1095 1096 yyarg[0] = yytname[yytype]; 1097 yyfmt = yystpcpy (yyformat, yyunexpected); 1098 1099 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1100 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1101 { 1102 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1103 { 1104 yycount = 1; 1105 yysize = yysize0; 1106 yyformat[sizeof yyunexpected - 1] = '\0'; 1107 break; 1108 } 1109 yyarg[yycount++] = yytname[yyx]; 1110 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1111 yysize_overflow |= (yysize1 < yysize); 1112 yysize = yysize1; 1113 yyfmt = yystpcpy (yyfmt, yyprefix); 1114 yyprefix = yyor; 1115 } 1116 1117 yyf = YY_(yyformat); 1118 yysize1 = yysize + yystrlen (yyf); 1119 yysize_overflow |= (yysize1 < yysize); 1120 yysize = yysize1; 1121 1122 if (yysize_overflow) 1123 return YYSIZE_MAXIMUM; 1124 1125 if (yyresult) 1126 { 1127 /* Avoid sprintf, as that infringes on the user's name space. 1128 Don't have undefined behavior even if the translation 1129 produced a string with the wrong number of "%s"s. */ 1130 char *yyp = yyresult; 1131 int yyi = 0; 1132 while ((*yyp = *yyf) != '\0') 1133 { 1134 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1135 { 1136 yyp += yytnamerr (yyp, yyarg[yyi++]); 1137 yyf += 2; 1138 } 1139 else 1140 { 1141 yyp++; 1142 yyf++; 1143 } 1144 } 1145 } 1146 return yysize; 1010 1147 } 1011 1012 switch (yycount)1013 {1014 # define YYCASE_(N, S) \1015 case N: \1016 yyformat = S; \1017 break1018 YYCASE_(0, YY_("syntax error"));1019 YYCASE_(1, YY_("syntax error, unexpected %s"));1020 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));1021 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));1022 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));1023 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));1024 # undef YYCASE_1025 }1026 1027 {1028 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);1029 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))1030 return 2;1031 yysize = yysize1;1032 }1033 1034 if (*yymsg_alloc < yysize)1035 {1036 *yymsg_alloc = 2 * yysize;1037 if (! (yysize <= *yymsg_alloc1038 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))1039 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;1040 return 1;1041 }1042 1043 /* Avoid sprintf, as that infringes on the user's name space.1044 Don't have undefined behavior even if the translation1045 produced a string with the wrong number of "%s"s. */1046 {1047 char *yyp = *yymsg;1048 int yyi = 0;1049 while ((*yyp = *yyformat) != '\0')1050 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)1051 {1052 yyp += yytnamerr (yyp, yyarg[yyi++]);1053 yyformat += 2;1054 }1055 else1056 {1057 yyp++;1058 yyformat++;1059 }1060 }1061 return 0;1062 1148 } 1063 1149 #endif /* YYERROR_VERBOSE */ 1150 1151 1064 1152 1065 1153 /*-----------------------------------------------. … … 1067 1155 `-----------------------------------------------*/ 1068 1156 1157 /*ARGSUSED*/ 1158 #if (defined __STDC__ || defined __C99__FUNC__ \ 1159 || defined __cplusplus || defined _MSC_VER) 1069 1160 static void 1070 1161 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1162 #else 1163 static void 1164 yydestruct (yymsg, yytype, yyvaluep) 1165 const char *yymsg; 1166 int yytype; 1167 YYSTYPE *yyvaluep; 1168 #endif 1071 1169 { 1072 1170 YYUSE (yyvaluep); 1171 1073 1172 if (!yymsg) 1074 1173 yymsg = "Deleting"; 1075 1174 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1076 1175 1077 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1078 YYUSE (yytype); 1079 YY_IGNORE_MAYBE_UNINITIALIZED_END 1176 switch (yytype) 1177 { 1178 1179 default: 1180 break; 1181 } 1080 1182 } 1081 1183 1082 1184 /* Prevent warnings from -Wmissing-prototypes. */ 1185 #ifdef YYPARSE_PARAM 1186 #if defined __STDC__ || defined __cplusplus 1187 int yyparse (void *YYPARSE_PARAM); 1188 #else 1189 int yyparse (); 1190 #endif 1191 #else /* ! YYPARSE_PARAM */ 1192 #if defined __STDC__ || defined __cplusplus 1193 int yyparse (void); 1194 #else 1195 int yyparse (); 1196 #endif 1197 #endif /* ! YYPARSE_PARAM */ 1083 1198 1084 1199 … … 1088 1203 /* The semantic value of the lookahead symbol. */ 1089 1204 YYSTYPE yylval; 1205 1090 1206 /* Number of syntax errors so far. */ 1091 1207 int yynerrs; 1092 1208 1093 1209 1094 /*----------. 1095 | yyparse. | 1096 `----------*/ 1097 1210 1211 /*-------------------------. 1212 | yyparse or yypush_parse. | 1213 `-------------------------*/ 1214 1215 #ifdef YYPARSE_PARAM 1216 #if (defined __STDC__ || defined __C99__FUNC__ \ 1217 || defined __cplusplus || defined _MSC_VER) 1218 int 1219 yyparse (void *YYPARSE_PARAM) 1220 #else 1221 int 1222 yyparse (YYPARSE_PARAM) 1223 void *YYPARSE_PARAM; 1224 #endif 1225 #else /* ! YYPARSE_PARAM */ 1226 #if (defined __STDC__ || defined __C99__FUNC__ \ 1227 || defined __cplusplus || defined _MSC_VER) 1098 1228 int 1099 1229 yyparse (void) 1100 { 1230 #else 1231 int 1232 yyparse () 1233 1234 #endif 1235 #endif 1236 { 1237 1238 1101 1239 int yystate; 1102 1240 /* Number of tokens to shift before error messages enabled. */ … … 1104 1242 1105 1243 /* The stacks and their tools: 1106 'yyss': related to states.1107 'yyvs': related to semantic values.1108 1109 Refer to the stacks thr oughseparate pointers, to allow yyoverflow1244 `yyss': related to states. 1245 `yyvs': related to semantic values. 1246 1247 Refer to the stacks thru separate pointers, to allow yyoverflow 1110 1248 to reallocate them elsewhere. */ 1111 1249 … … 1125 1263 int yyresult; 1126 1264 /* Lookahead token as an internal (translated) token number. */ 1127 int yytoken = 0;1265 int yytoken; 1128 1266 /* The variables used to return semantic value and location from the 1129 1267 action routines. */ … … 1143 1281 int yylen = 0; 1144 1282 1145 yyssp = yyss = yyssa; 1146 yyvsp = yyvs = yyvsa; 1283 yytoken = 0; 1284 yyss = yyssa; 1285 yyvs = yyvsa; 1147 1286 yystacksize = YYINITDEPTH; 1148 1287 … … 1153 1292 yynerrs = 0; 1154 1293 yychar = YYEMPTY; /* Cause a token to be read. */ 1294 1295 /* Initialize stack pointers. 1296 Waste one element of value and location stack 1297 so that they stay on the same level as the state stack. 1298 The wasted elements are never initialized. */ 1299 yyssp = yyss; 1300 yyvsp = yyvs; 1301 1155 1302 goto yysetstate; 1156 1303 … … 1173 1320 #ifdef yyoverflow 1174 1321 { 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1322 /* Give user a chance to reallocate the stack. Use copies of 1323 these so that the &'s don't force the real ones into 1324 memory. */ 1325 YYSTYPE *yyvs1 = yyvs; 1326 yytype_int16 *yyss1 = yyss; 1327 1328 /* Each stack pointer address is followed by the size of the 1329 data in use in that stack, in bytes. This used to be a 1330 conditional around just the two extra args, but that might 1331 be undefined if yyoverflow is a macro. */ 1332 yyoverflow (YY_("memory exhausted"), 1333 &yyss1, yysize * sizeof (*yyssp), 1334 &yyvs1, yysize * sizeof (*yyvsp), 1335 &yystacksize); 1336 1337 yyss = yyss1; 1338 yyvs = yyvs1; 1192 1339 } 1193 1340 #else /* no yyoverflow */ … … 1197 1344 /* Extend the stack our own way. */ 1198 1345 if (YYMAXDEPTH <= yystacksize) 1199 1346 goto yyexhaustedlab; 1200 1347 yystacksize *= 2; 1201 1348 if (YYMAXDEPTH < yystacksize) 1202 1349 yystacksize = YYMAXDEPTH; 1203 1350 1204 1351 { 1205 1206 1207 1208 1209 1210 1211 1352 yytype_int16 *yyss1 = yyss; 1353 union yyalloc *yyptr = 1354 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1355 if (! yyptr) 1356 goto yyexhaustedlab; 1357 YYSTACK_RELOCATE (yyss_alloc, yyss); 1358 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1212 1359 # undef YYSTACK_RELOCATE 1213 1214 1360 if (yyss1 != yyssa) 1361 YYSTACK_FREE (yyss1); 1215 1362 } 1216 1363 # endif … … 1221 1368 1222 1369 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1223 1370 (unsigned long int) yystacksize)); 1224 1371 1225 1372 if (yyss + yystacksize - 1 <= yyssp) 1226 1373 YYABORT; 1227 1374 } 1228 1375 … … 1244 1391 /* First try to decide what to do without reference to lookahead token. */ 1245 1392 yyn = yypact[yystate]; 1246 if (yy pact_value_is_default (yyn))1393 if (yyn == YYPACT_NINF) 1247 1394 goto yydefault; 1248 1395 … … 1253 1400 { 1254 1401 YYDPRINTF ((stderr, "Reading a token: ")); 1255 yychar = yylex ();1402 yychar = YYLEX; 1256 1403 } 1257 1404 … … 1275 1422 if (yyn <= 0) 1276 1423 { 1277 if (yy table_value_is_error (yyn))1278 1424 if (yyn == 0 || yyn == YYTABLE_NINF) 1425 goto yyerrlab; 1279 1426 yyn = -yyn; 1280 1427 goto yyreduce; … … 1293 1440 1294 1441 yystate = yyn; 1295 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN1296 1442 *++yyvsp = yylval; 1297 YY_IGNORE_MAYBE_UNINITIALIZED_END1298 1443 1299 1444 goto yynewstate; … … 1318 1463 1319 1464 /* If YYLEN is nonzero, implement the default value of the action: 1320 '$$ = $1'.1465 `$$ = $1'. 1321 1466 1322 1467 Otherwise, the following line sets YYVAL to garbage. … … 1332 1477 { 1333 1478 case 2: 1334 #line 61 "yacc_parser.yacc" /* yacc.c:1646 */ 1335 { /* Nothing to do */ } 1336 #line 1337 "yacc_parser.cpp" /* yacc.c:1646 */ 1479 1480 /* Line 1455 of yacc.c */ 1481 #line 66 "yacc_parser.yacc" 1482 { /* Nothing to do */ ;} 1337 1483 break; 1338 1484 1339 1485 case 3: 1340 #line 62 "yacc_parser.yacc" /* yacc.c:1646 */ 1341 { parsed = (yyvsp[-1].filterNode); } 1342 #line 1343 "yacc_parser.cpp" /* yacc.c:1646 */ 1486 1487 /* Line 1455 of yacc.c */ 1488 #line 67 "yacc_parser.yacc" 1489 { parsed = (yyvsp[(1) - (2)].filterNode); ;} 1343 1490 break; 1344 1491 1345 1492 case 4: 1346 #line 66 "yacc_parser.yacc" /* yacc.c:1646 */ 1347 { (yyval.scalarNode) = new CScalarValExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); } 1348 #line 1349 "yacc_parser.cpp" /* yacc.c:1646 */ 1493 1494 /* Line 1455 of yacc.c */ 1495 #line 71 "yacc_parser.yacc" 1496 { (yyval.scalarNode) = new CScalarValExprNode(*(yyvsp[(1) - (1)].str)); delete (yyvsp[(1) - (1)].str); ;} 1349 1497 break; 1350 1498 1351 1499 case 5: 1352 #line 67 "yacc_parser.yacc" /* yacc.c:1646 */ 1353 { (yyval.scalarNode) = new CScalarVarExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); } 1354 #line 1355 "yacc_parser.cpp" /* yacc.c:1646 */ 1500 1501 /* Line 1455 of yacc.c */ 1502 #line 72 "yacc_parser.yacc" 1503 { (yyval.scalarNode) = new CScalarVarExprNode(*(yyvsp[(1) - (1)].str)); delete (yyvsp[(1) - (1)].str); ;} 1355 1504 break; 1356 1505 1357 1506 case 6: 1358 #line 68 "yacc_parser.yacc" /* yacc.c:1646 */ 1359 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "add", (yyvsp[0].scalarNode)); } 1360 #line 1361 "yacc_parser.cpp" /* yacc.c:1646 */ 1507 1508 /* Line 1455 of yacc.c */ 1509 #line 73 "yacc_parser.yacc" 1510 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "add", (yyvsp[(3) - (3)].scalarNode)); ;} 1361 1511 break; 1362 1512 1363 1513 case 7: 1364 #line 69 "yacc_parser.yacc" /* yacc.c:1646 */ 1365 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "minus", (yyvsp[0].scalarNode)); } 1366 #line 1367 "yacc_parser.cpp" /* yacc.c:1646 */ 1514 1515 /* Line 1455 of yacc.c */ 1516 #line 74 "yacc_parser.yacc" 1517 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "minus", (yyvsp[(3) - (3)].scalarNode)); ;} 1367 1518 break; 1368 1519 1369 1520 case 8: 1370 #line 70 "yacc_parser.yacc" /* yacc.c:1646 */ 1371 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "mult", (yyvsp[0].scalarNode)); } 1372 #line 1373 "yacc_parser.cpp" /* yacc.c:1646 */ 1521 1522 /* Line 1455 of yacc.c */ 1523 #line 75 "yacc_parser.yacc" 1524 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "mult", (yyvsp[(3) - (3)].scalarNode)); ;} 1373 1525 break; 1374 1526 1375 1527 case 9: 1376 #line 71 "yacc_parser.yacc" /* yacc.c:1646 */ 1377 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "div", (yyvsp[0].scalarNode)); } 1378 #line 1379 "yacc_parser.cpp" /* yacc.c:1646 */ 1528 1529 /* Line 1455 of yacc.c */ 1530 #line 76 "yacc_parser.yacc" 1531 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "div", (yyvsp[(3) - (3)].scalarNode)); ;} 1379 1532 break; 1380 1533 1381 1534 case 10: 1382 #line 72 "yacc_parser.yacc" /* yacc.c:1646 */ 1383 { (yyval.scalarNode) = new CScalarUnaryOpExprNode("neg", (yyvsp[0].scalarNode)); } 1384 #line 1385 "yacc_parser.cpp" /* yacc.c:1646 */ 1535 1536 /* Line 1455 of yacc.c */ 1537 #line 77 "yacc_parser.yacc" 1538 { (yyval.scalarNode) = new CScalarUnaryOpExprNode("neg", (yyvsp[(2) - (2)].scalarNode)); ;} 1385 1539 break; 1386 1540 1387 1541 case 11: 1388 #line 73 "yacc_parser.yacc" /* yacc.c:1646 */ 1389 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "pow", (yyvsp[0].scalarNode)); } 1390 #line 1391 "yacc_parser.cpp" /* yacc.c:1646 */ 1542 1543 /* Line 1455 of yacc.c */ 1544 #line 78 "yacc_parser.yacc" 1545 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "pow", (yyvsp[(3) - (3)].scalarNode)); ;} 1391 1546 break; 1392 1547 1393 1548 case 12: 1394 #line 74 "yacc_parser.yacc" /* yacc.c:1646 */ 1395 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "eq", (yyvsp[0].scalarNode)); } 1396 #line 1397 "yacc_parser.cpp" /* yacc.c:1646 */ 1549 1550 /* Line 1455 of yacc.c */ 1551 #line 79 "yacc_parser.yacc" 1552 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "eq", (yyvsp[(3) - (3)].scalarNode)); ;} 1397 1553 break; 1398 1554 1399 1555 case 13: 1400 #line 75 "yacc_parser.yacc" /* yacc.c:1646 */ 1401 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "lt", (yyvsp[0].scalarNode)); } 1402 #line 1403 "yacc_parser.cpp" /* yacc.c:1646 */ 1556 1557 /* Line 1455 of yacc.c */ 1558 #line 80 "yacc_parser.yacc" 1559 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "lt", (yyvsp[(3) - (3)].scalarNode)); ;} 1403 1560 break; 1404 1561 1405 1562 case 14: 1406 #line 76 "yacc_parser.yacc" /* yacc.c:1646 */ 1407 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "gt", (yyvsp[0].scalarNode)); } 1408 #line 1409 "yacc_parser.cpp" /* yacc.c:1646 */ 1563 1564 /* Line 1455 of yacc.c */ 1565 #line 81 "yacc_parser.yacc" 1566 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "gt", (yyvsp[(3) - (3)].scalarNode)); ;} 1409 1567 break; 1410 1568 1411 1569 case 15: 1412 #line 77 "yacc_parser.yacc" /* yacc.c:1646 */ 1413 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "le", (yyvsp[0].scalarNode)); } 1414 #line 1415 "yacc_parser.cpp" /* yacc.c:1646 */ 1570 1571 /* Line 1455 of yacc.c */ 1572 #line 82 "yacc_parser.yacc" 1573 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "le", (yyvsp[(3) - (3)].scalarNode)); ;} 1415 1574 break; 1416 1575 1417 1576 case 16: 1418 #line 78 "yacc_parser.yacc" /* yacc.c:1646 */ 1419 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "ge", (yyvsp[0].scalarNode)); } 1420 #line 1421 "yacc_parser.cpp" /* yacc.c:1646 */ 1577 1578 /* Line 1455 of yacc.c */ 1579 #line 83 "yacc_parser.yacc" 1580 { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[(1) - (3)].scalarNode), "ge", (yyvsp[(3) - (3)].scalarNode)); ;} 1421 1581 break; 1422 1582 1423 1583 case 17: 1424 #line 79 "yacc_parser.yacc" /* yacc.c:1646 */ 1425 { (yyval.scalarNode) = (yyvsp[-1].scalarNode); } 1426 #line 1427 "yacc_parser.cpp" /* yacc.c:1646 */ 1584 1585 /* Line 1455 of yacc.c */ 1586 #line 84 "yacc_parser.yacc" 1587 { (yyval.scalarNode) = (yyvsp[(2) - (3)].scalarNode); ;} 1427 1588 break; 1428 1589 1429 1590 case 18: 1430 #line 80 "yacc_parser.yacc" /* yacc.c:1646 */ 1431 { (yyval.scalarNode) = new CScalarUnaryOpExprNode(*(yyvsp[-3].str), (yyvsp[-1].scalarNode)); delete (yyvsp[-3].str); } 1432 #line 1433 "yacc_parser.cpp" /* yacc.c:1646 */ 1591 1592 /* Line 1455 of yacc.c */ 1593 #line 85 "yacc_parser.yacc" 1594 { (yyval.scalarNode) = new CScalarUnaryOpExprNode(*(yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].scalarNode)); delete (yyvsp[(1) - (4)].str); ;} 1433 1595 break; 1434 1596 1435 1597 case 19: 1436 #line 84 "yacc_parser.yacc" /* yacc.c:1646 */ 1437 { (yyval.filterNode) = new CFilterFieldExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); } 1438 #line 1439 "yacc_parser.cpp" /* yacc.c:1646 */ 1598 1599 /* Line 1455 of yacc.c */ 1600 #line 89 "yacc_parser.yacc" 1601 { (yyval.filterNode) = new CFilterFieldExprNode(*(yyvsp[(1) - (1)].str)); delete (yyvsp[(1) - (1)].str); ;} 1439 1602 break; 1440 1603 1441 1604 case 20: 1442 #line 85 "yacc_parser.yacc" /* yacc.c:1646 */ 1443 { (yyval.filterNode) = new CFilterTemporalFieldExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); } 1444 #line 1445 "yacc_parser.cpp" /* yacc.c:1646 */ 1605 1606 /* Line 1455 of yacc.c */ 1607 #line 90 "yacc_parser.yacc" 1608 { (yyval.filterNode) = new CFilterTemporalFieldExprNode(*(yyvsp[(1) - (1)].str)); delete (yyvsp[(1) - (1)].str); ;} 1445 1609 break; 1446 1610 1447 1611 case 21: 1448 #line 86 "yacc_parser.yacc" /* yacc.c:1646 */ 1449 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "add", (yyvsp[0].filterNode)); } 1450 #line 1451 "yacc_parser.cpp" /* yacc.c:1646 */ 1612 1613 /* Line 1455 of yacc.c */ 1614 #line 91 "yacc_parser.yacc" 1615 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "add", (yyvsp[(3) - (3)].filterNode)); ;} 1451 1616 break; 1452 1617 1453 1618 case 22: 1454 #line 87 "yacc_parser.yacc" /* yacc.c:1646 */ 1455 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "minus", (yyvsp[0].filterNode)); } 1456 #line 1457 "yacc_parser.cpp" /* yacc.c:1646 */ 1619 1620 /* Line 1455 of yacc.c */ 1621 #line 92 "yacc_parser.yacc" 1622 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "minus", (yyvsp[(3) - (3)].filterNode)); ;} 1457 1623 break; 1458 1624 1459 1625 case 23: 1460 #line 88 "yacc_parser.yacc" /* yacc.c:1646 */ 1461 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "mult", (yyvsp[0].filterNode)); } 1462 #line 1463 "yacc_parser.cpp" /* yacc.c:1646 */ 1626 1627 /* Line 1455 of yacc.c */ 1628 #line 93 "yacc_parser.yacc" 1629 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "mult", (yyvsp[(3) - (3)].filterNode)); ;} 1463 1630 break; 1464 1631 1465 1632 case 24: 1466 #line 89 "yacc_parser.yacc" /* yacc.c:1646 */ 1467 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "div", (yyvsp[0].filterNode)); } 1468 #line 1469 "yacc_parser.cpp" /* yacc.c:1646 */ 1633 1634 /* Line 1455 of yacc.c */ 1635 #line 94 "yacc_parser.yacc" 1636 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "div", (yyvsp[(3) - (3)].filterNode)); ;} 1469 1637 break; 1470 1638 1471 1639 case 25: 1472 #line 90 "yacc_parser.yacc" /* yacc.c:1646 */ 1473 { (yyval.filterNode) = new CFilterUnaryOpExprNode("neg", (yyvsp[0].filterNode)); } 1474 #line 1475 "yacc_parser.cpp" /* yacc.c:1646 */ 1640 1641 /* Line 1455 of yacc.c */ 1642 #line 95 "yacc_parser.yacc" 1643 { (yyval.filterNode) = new CFilterUnaryOpExprNode("neg", (yyvsp[(2) - (2)].filterNode)); ;} 1475 1644 break; 1476 1645 1477 1646 case 26: 1478 #line 91 "yacc_parser.yacc" /* yacc.c:1646 */ 1479 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "pow", (yyvsp[0].filterNode)); } 1480 #line 1481 "yacc_parser.cpp" /* yacc.c:1646 */ 1647 1648 /* Line 1455 of yacc.c */ 1649 #line 96 "yacc_parser.yacc" 1650 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "pow", (yyvsp[(3) - (3)].filterNode)); ;} 1481 1651 break; 1482 1652 1483 1653 case 27: 1484 #line 92 "yacc_parser.yacc" /* yacc.c:1646 */ 1485 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "eq", (yyvsp[0].filterNode)); } 1486 #line 1487 "yacc_parser.cpp" /* yacc.c:1646 */ 1654 1655 /* Line 1455 of yacc.c */ 1656 #line 97 "yacc_parser.yacc" 1657 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "eq", (yyvsp[(3) - (3)].filterNode)); ;} 1487 1658 break; 1488 1659 1489 1660 case 28: 1490 #line 93 "yacc_parser.yacc" /* yacc.c:1646 */ 1491 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "lt", (yyvsp[0].filterNode)); } 1492 #line 1493 "yacc_parser.cpp" /* yacc.c:1646 */ 1661 1662 /* Line 1455 of yacc.c */ 1663 #line 98 "yacc_parser.yacc" 1664 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "lt", (yyvsp[(3) - (3)].filterNode)); ;} 1493 1665 break; 1494 1666 1495 1667 case 29: 1496 #line 94 "yacc_parser.yacc" /* yacc.c:1646 */ 1497 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "gt", (yyvsp[0].filterNode)); } 1498 #line 1499 "yacc_parser.cpp" /* yacc.c:1646 */ 1668 1669 /* Line 1455 of yacc.c */ 1670 #line 99 "yacc_parser.yacc" 1671 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "gt", (yyvsp[(3) - (3)].filterNode)); ;} 1499 1672 break; 1500 1673 1501 1674 case 30: 1502 #line 95 "yacc_parser.yacc" /* yacc.c:1646 */ 1503 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "le", (yyvsp[0].filterNode)); } 1504 #line 1505 "yacc_parser.cpp" /* yacc.c:1646 */ 1675 1676 /* Line 1455 of yacc.c */ 1677 #line 100 "yacc_parser.yacc" 1678 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "le", (yyvsp[(3) - (3)].filterNode)); ;} 1505 1679 break; 1506 1680 1507 1681 case 31: 1508 #line 96 "yacc_parser.yacc" /* yacc.c:1646 */ 1509 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "ge", (yyvsp[0].filterNode)); } 1510 #line 1511 "yacc_parser.cpp" /* yacc.c:1646 */ 1682 1683 /* Line 1455 of yacc.c */ 1684 #line 101 "yacc_parser.yacc" 1685 { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[(1) - (3)].filterNode), "ge", (yyvsp[(3) - (3)].filterNode)); ;} 1511 1686 break; 1512 1687 1513 1688 case 32: 1514 #line 97 "yacc_parser.yacc" /* yacc.c:1646 */ 1515 { (yyval.filterNode) = (yyvsp[-1].filterNode); } 1516 #line 1517 "yacc_parser.cpp" /* yacc.c:1646 */ 1689 1690 /* Line 1455 of yacc.c */ 1691 #line 102 "yacc_parser.yacc" 1692 { (yyval.filterNode) = (yyvsp[(2) - (3)].filterNode); ;} 1517 1693 break; 1518 1694 1519 1695 case 33: 1520 #line 98 "yacc_parser.yacc" /* yacc.c:1646 */ 1521 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "add", (yyvsp[0].scalarNode)); } 1522 #line 1523 "yacc_parser.cpp" /* yacc.c:1646 */ 1696 1697 /* Line 1455 of yacc.c */ 1698 #line 103 "yacc_parser.yacc" 1699 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "add", (yyvsp[(3) - (3)].scalarNode)); ;} 1523 1700 break; 1524 1701 1525 1702 case 34: 1526 #line 99 "yacc_parser.yacc" /* yacc.c:1646 */ 1527 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "add", (yyvsp[0].filterNode)); } 1528 #line 1529 "yacc_parser.cpp" /* yacc.c:1646 */ 1703 1704 /* Line 1455 of yacc.c */ 1705 #line 104 "yacc_parser.yacc" 1706 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "add", (yyvsp[(3) - (3)].filterNode)); ;} 1529 1707 break; 1530 1708 1531 1709 case 35: 1532 #line 100 "yacc_parser.yacc" /* yacc.c:1646 */ 1533 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "minus", (yyvsp[0].scalarNode)); } 1534 #line 1535 "yacc_parser.cpp" /* yacc.c:1646 */ 1710 1711 /* Line 1455 of yacc.c */ 1712 #line 105 "yacc_parser.yacc" 1713 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "minus", (yyvsp[(3) - (3)].scalarNode)); ;} 1535 1714 break; 1536 1715 1537 1716 case 36: 1538 #line 101 "yacc_parser.yacc" /* yacc.c:1646 */ 1539 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "minus", (yyvsp[0].filterNode)); } 1540 #line 1541 "yacc_parser.cpp" /* yacc.c:1646 */ 1717 1718 /* Line 1455 of yacc.c */ 1719 #line 106 "yacc_parser.yacc" 1720 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "minus", (yyvsp[(3) - (3)].filterNode)); ;} 1541 1721 break; 1542 1722 1543 1723 case 37: 1544 #line 102 "yacc_parser.yacc" /* yacc.c:1646 */ 1545 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "mult", (yyvsp[0].scalarNode)); } 1546 #line 1547 "yacc_parser.cpp" /* yacc.c:1646 */ 1724 1725 /* Line 1455 of yacc.c */ 1726 #line 107 "yacc_parser.yacc" 1727 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "mult", (yyvsp[(3) - (3)].scalarNode)); ;} 1547 1728 break; 1548 1729 1549 1730 case 38: 1550 #line 103 "yacc_parser.yacc" /* yacc.c:1646 */ 1551 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "mult", (yyvsp[0].filterNode)); } 1552 #line 1553 "yacc_parser.cpp" /* yacc.c:1646 */ 1731 1732 /* Line 1455 of yacc.c */ 1733 #line 108 "yacc_parser.yacc" 1734 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "mult", (yyvsp[(3) - (3)].filterNode)); ;} 1553 1735 break; 1554 1736 1555 1737 case 39: 1556 #line 104 "yacc_parser.yacc" /* yacc.c:1646 */ 1557 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "div", (yyvsp[0].scalarNode)); } 1558 #line 1559 "yacc_parser.cpp" /* yacc.c:1646 */ 1738 1739 /* Line 1455 of yacc.c */ 1740 #line 109 "yacc_parser.yacc" 1741 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "div", (yyvsp[(3) - (3)].scalarNode)); ;} 1559 1742 break; 1560 1743 1561 1744 case 40: 1562 #line 105 "yacc_parser.yacc" /* yacc.c:1646 */ 1563 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "div", (yyvsp[0].filterNode)); } 1564 #line 1565 "yacc_parser.cpp" /* yacc.c:1646 */ 1745 1746 /* Line 1455 of yacc.c */ 1747 #line 110 "yacc_parser.yacc" 1748 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "div", (yyvsp[(3) - (3)].filterNode)); ;} 1565 1749 break; 1566 1750 1567 1751 case 41: 1568 #line 106 "yacc_parser.yacc" /* yacc.c:1646 */ 1569 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "pow", (yyvsp[0].scalarNode)); } 1570 #line 1571 "yacc_parser.cpp" /* yacc.c:1646 */ 1752 1753 /* Line 1455 of yacc.c */ 1754 #line 111 "yacc_parser.yacc" 1755 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "pow", (yyvsp[(3) - (3)].scalarNode)); ;} 1571 1756 break; 1572 1757 1573 1758 case 42: 1574 #line 107 "yacc_parser.yacc" /* yacc.c:1646 */ 1575 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "eq", (yyvsp[0].scalarNode)); } 1576 #line 1577 "yacc_parser.cpp" /* yacc.c:1646 */ 1759 1760 /* Line 1455 of yacc.c */ 1761 #line 112 "yacc_parser.yacc" 1762 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "eq", (yyvsp[(3) - (3)].scalarNode)); ;} 1577 1763 break; 1578 1764 1579 1765 case 43: 1580 #line 108 "yacc_parser.yacc" /* yacc.c:1646 */ 1581 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "eq", (yyvsp[0].filterNode)); } 1582 #line 1583 "yacc_parser.cpp" /* yacc.c:1646 */ 1766 1767 /* Line 1455 of yacc.c */ 1768 #line 113 "yacc_parser.yacc" 1769 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "eq", (yyvsp[(3) - (3)].filterNode)); ;} 1583 1770 break; 1584 1771 1585 1772 case 44: 1586 #line 109 "yacc_parser.yacc" /* yacc.c:1646 */ 1587 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "lt", (yyvsp[0].scalarNode)); } 1588 #line 1589 "yacc_parser.cpp" /* yacc.c:1646 */ 1773 1774 /* Line 1455 of yacc.c */ 1775 #line 114 "yacc_parser.yacc" 1776 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "lt", (yyvsp[(3) - (3)].scalarNode)); ;} 1589 1777 break; 1590 1778 1591 1779 case 45: 1592 #line 110 "yacc_parser.yacc" /* yacc.c:1646 */ 1593 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "lt", (yyvsp[0].filterNode)); } 1594 #line 1595 "yacc_parser.cpp" /* yacc.c:1646 */ 1780 1781 /* Line 1455 of yacc.c */ 1782 #line 115 "yacc_parser.yacc" 1783 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "lt", (yyvsp[(3) - (3)].filterNode)); ;} 1595 1784 break; 1596 1785 1597 1786 case 46: 1598 #line 111 "yacc_parser.yacc" /* yacc.c:1646 */ 1599 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "gt", (yyvsp[0].scalarNode)); } 1600 #line 1601 "yacc_parser.cpp" /* yacc.c:1646 */ 1787 1788 /* Line 1455 of yacc.c */ 1789 #line 116 "yacc_parser.yacc" 1790 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "gt", (yyvsp[(3) - (3)].scalarNode)); ;} 1601 1791 break; 1602 1792 1603 1793 case 47: 1604 #line 112 "yacc_parser.yacc" /* yacc.c:1646 */ 1605 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "gt", (yyvsp[0].filterNode)); } 1606 #line 1607 "yacc_parser.cpp" /* yacc.c:1646 */ 1794 1795 /* Line 1455 of yacc.c */ 1796 #line 117 "yacc_parser.yacc" 1797 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "gt", (yyvsp[(3) - (3)].filterNode)); ;} 1607 1798 break; 1608 1799 1609 1800 case 48: 1610 #line 113 "yacc_parser.yacc" /* yacc.c:1646 */ 1611 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "le", (yyvsp[0].scalarNode)); } 1612 #line 1613 "yacc_parser.cpp" /* yacc.c:1646 */ 1801 1802 /* Line 1455 of yacc.c */ 1803 #line 118 "yacc_parser.yacc" 1804 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "le", (yyvsp[(3) - (3)].scalarNode)); ;} 1613 1805 break; 1614 1806 1615 1807 case 49: 1616 #line 114 "yacc_parser.yacc" /* yacc.c:1646 */ 1617 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "le", (yyvsp[0].filterNode)); } 1618 #line 1619 "yacc_parser.cpp" /* yacc.c:1646 */ 1808 1809 /* Line 1455 of yacc.c */ 1810 #line 119 "yacc_parser.yacc" 1811 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "le", (yyvsp[(3) - (3)].filterNode)); ;} 1619 1812 break; 1620 1813 1621 1814 case 50: 1622 #line 115 "yacc_parser.yacc" /* yacc.c:1646 */ 1623 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "ge", (yyvsp[0].scalarNode)); } 1624 #line 1625 "yacc_parser.cpp" /* yacc.c:1646 */ 1815 1816 /* Line 1455 of yacc.c */ 1817 #line 120 "yacc_parser.yacc" 1818 { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[(1) - (3)].filterNode), "ge", (yyvsp[(3) - (3)].scalarNode)); ;} 1625 1819 break; 1626 1820 1627 1821 case 51: 1628 #line 116 "yacc_parser.yacc" /* yacc.c:1646 */ 1629 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "ge", (yyvsp[0].filterNode)); } 1630 #line 1631 "yacc_parser.cpp" /* yacc.c:1646 */ 1822 1823 /* Line 1455 of yacc.c */ 1824 #line 121 "yacc_parser.yacc" 1825 { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[(1) - (3)].scalarNode), "ge", (yyvsp[(3) - (3)].filterNode)); ;} 1631 1826 break; 1632 1827 1633 1828 case 52: 1634 #line 117 "yacc_parser.yacc" /* yacc.c:1646 */ 1635 { (yyval.filterNode) = new CFilterUnaryOpExprNode(*(yyvsp[-3].str), (yyvsp[-1].filterNode)); delete (yyvsp[-3].str); } 1636 #line 1637 "yacc_parser.cpp" /* yacc.c:1646 */ 1637 break; 1638 1639 1640 #line 1641 "yacc_parser.cpp" /* yacc.c:1646 */ 1829 1830 /* Line 1455 of yacc.c */ 1831 #line 122 "yacc_parser.yacc" 1832 { (yyval.filterNode) = new CFilterUnaryOpExprNode(*(yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].filterNode)); delete (yyvsp[(1) - (4)].str); ;} 1833 break; 1834 1835 1836 1837 /* Line 1455 of yacc.c */ 1838 #line 1837 "yacc_parser.cpp" 1641 1839 default: break; 1642 1840 } 1643 /* User semantic actions sometimes alter yychar, and that requires1644 that yytoken be updated with the new translation. We take the1645 approach of translating immediately before every use of yytoken.1646 One alternative is translating here after every semantic action,1647 but that translation would be missed if the semantic action invokes1648 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or1649 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an1650 incorrect destructor might then be invoked immediately. In the1651 case of YYERROR or YYBACKUP, subsequent parser actions might lead1652 to an incorrect destructor call or verbose syntax error message1653 before the lookahead is translated. */1654 1841 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1655 1842 … … 1660 1847 *++yyvsp = yyval; 1661 1848 1662 /* Now 'shift' the result of the reduction. Determine what state1849 /* Now `shift' the result of the reduction. Determine what state 1663 1850 that goes to, based on the state we popped back to and the rule 1664 1851 number reduced by. */ … … 1675 1862 1676 1863 1677 /*------------------------------------ --.1678 | yyerrlab -- here on detecting error .|1679 `------------------------------------ --*/1864 /*------------------------------------. 1865 | yyerrlab -- here on detecting error | 1866 `------------------------------------*/ 1680 1867 yyerrlab: 1681 /* Make sure we have latest lookahead translation. See comments at1682 user semantic actions for why this is necessary. */1683 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);1684 1685 1868 /* If not already recovering from an error, report this error. */ 1686 1869 if (!yyerrstatus) … … 1690 1873 yyerror (YY_("syntax error")); 1691 1874 #else 1692 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \1693 yyssp, yytoken)1694 1875 { 1695 char const *yymsgp = YY_("syntax error"); 1696 int yysyntax_error_status; 1697 yysyntax_error_status = YYSYNTAX_ERROR; 1698 if (yysyntax_error_status == 0) 1699 yymsgp = yymsg; 1700 else if (yysyntax_error_status == 1) 1701 { 1702 if (yymsg != yymsgbuf) 1703 YYSTACK_FREE (yymsg); 1704 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1705 if (!yymsg) 1706 { 1707 yymsg = yymsgbuf; 1708 yymsg_alloc = sizeof yymsgbuf; 1709 yysyntax_error_status = 2; 1710 } 1711 else 1712 { 1713 yysyntax_error_status = YYSYNTAX_ERROR; 1714 yymsgp = yymsg; 1715 } 1716 } 1717 yyerror (yymsgp); 1718 if (yysyntax_error_status == 2) 1719 goto yyexhaustedlab; 1876 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1877 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1878 { 1879 YYSIZE_T yyalloc = 2 * yysize; 1880 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1881 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1882 if (yymsg != yymsgbuf) 1883 YYSTACK_FREE (yymsg); 1884 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1885 if (yymsg) 1886 yymsg_alloc = yyalloc; 1887 else 1888 { 1889 yymsg = yymsgbuf; 1890 yymsg_alloc = sizeof yymsgbuf; 1891 } 1892 } 1893 1894 if (0 < yysize && yysize <= yymsg_alloc) 1895 { 1896 (void) yysyntax_error (yymsg, yystate, yychar); 1897 yyerror (yymsg); 1898 } 1899 else 1900 { 1901 yyerror (YY_("syntax error")); 1902 if (yysize != 0) 1903 goto yyexhaustedlab; 1904 } 1720 1905 } 1721 # undef YYSYNTAX_ERROR1722 1906 #endif 1723 1907 } … … 1728 1912 { 1729 1913 /* If just tried and failed to reuse lookahead token after an 1730 1914 error, discard it. */ 1731 1915 1732 1916 if (yychar <= YYEOF) 1733 1734 1735 1736 1737 1917 { 1918 /* Return failure if at end of input. */ 1919 if (yychar == YYEOF) 1920 YYABORT; 1921 } 1738 1922 else 1739 1740 1741 1742 1743 1923 { 1924 yydestruct ("Error: discarding", 1925 yytoken, &yylval); 1926 yychar = YYEMPTY; 1927 } 1744 1928 } 1745 1929 … … 1760 1944 goto yyerrorlab; 1761 1945 1762 /* Do not reclaim the symbols of the rule wh oseaction triggered1946 /* Do not reclaim the symbols of the rule which action triggered 1763 1947 this YYERROR. */ 1764 1948 YYPOPSTACK (yylen); … … 1773 1957 `-------------------------------------------------------------*/ 1774 1958 yyerrlab1: 1775 yyerrstatus = 3; 1959 yyerrstatus = 3; /* Each real token shifted decrements this. */ 1776 1960 1777 1961 for (;;) 1778 1962 { 1779 1963 yyn = yypact[yystate]; 1780 if ( !yypact_value_is_default (yyn))1781 1782 1783 1784 1785 1786 1787 1788 1789 1964 if (yyn != YYPACT_NINF) 1965 { 1966 yyn += YYTERROR; 1967 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 1968 { 1969 yyn = yytable[yyn]; 1970 if (0 < yyn) 1971 break; 1972 } 1973 } 1790 1974 1791 1975 /* Pop the current state because it cannot handle the error token. */ 1792 1976 if (yyssp == yyss) 1793 1977 YYABORT; 1794 1978 1795 1979 1796 1980 yydestruct ("Error: popping", 1797 1981 yystos[yystate], yyvsp); 1798 1982 YYPOPSTACK (1); 1799 1983 yystate = *yyssp; … … 1801 1985 } 1802 1986 1803 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN1804 1987 *++yyvsp = yylval; 1805 YY_IGNORE_MAYBE_UNINITIALIZED_END1806 1988 1807 1989 … … 1827 2009 goto yyreturn; 1828 2010 1829 #if !defined yyoverflow|| YYERROR_VERBOSE2011 #if !defined(yyoverflow) || YYERROR_VERBOSE 1830 2012 /*-------------------------------------------------. 1831 2013 | yyexhaustedlab -- memory exhaustion comes here. | … … 1839 2021 yyreturn: 1840 2022 if (yychar != YYEMPTY) 1841 { 1842 /* Make sure we have latest lookahead translation. See comments at 1843 user semantic actions for why this is necessary. */ 1844 yytoken = YYTRANSLATE (yychar); 1845 yydestruct ("Cleanup: discarding lookahead", 1846 yytoken, &yylval); 1847 } 1848 /* Do not reclaim the symbols of the rule whose action triggered 2023 yydestruct ("Cleanup: discarding lookahead", 2024 yytoken, &yylval); 2025 /* Do not reclaim the symbols of the rule which action triggered 1849 2026 this YYABORT or YYACCEPT. */ 1850 2027 YYPOPSTACK (yylen); … … 1853 2030 { 1854 2031 yydestruct ("Cleanup: popping", 1855 2032 yystos[*yyssp], yyvsp); 1856 2033 YYPOPSTACK (1); 1857 2034 } … … 1864 2041 YYSTACK_FREE (yymsg); 1865 2042 #endif 1866 return yyresult; 2043 /* Make sure YYID is used. */ 2044 return YYID (yyresult); 1867 2045 } 1868 #line 119 "yacc_parser.yacc" /* yacc.c:1906 */ 2046 2047 2048 2049 /* Line 1675 of yacc.c */ 2050 #line 124 "yacc_parser.yacc" 1869 2051 1870 2052 … … 1881 2063 IFilterExprNode* parseExpr(const string& strExpr) 1882 2064 { 1883 globalInputText = strExpr; 1884 globalReadOffset = 0; 1885 yyparse(); 2065 #pragma omp critical (_parser) 2066 { 2067 //globalInputText = strExpr; 2068 if(globalInputText_ptr == 0) globalInputText_ptr = new std::string; 2069 (*globalInputText_ptr).assign (strExpr); 2070 globalReadOffset = 0; 2071 yyparse(); 2072 } 1886 2073 return parsed; 1887 2074 } … … 1889 2076 1890 2077 2078 -
XIOS/dev/branch_yushan/src/parse_expr/yacc_parser.hpp
r1037 r1127 1 /* A Bison parser, made by GNU Bison 3.0.2. */2 1 3 /* Bison interface for Yacc-like parsers in C2 /* A Bison parser, made by GNU Bison 2.4.1. */ 4 3 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 4 /* Skeleton interface for Bison's Yacc-like parsers in C 5 6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 Free Software Foundation, Inc. 8 7 9 This program is free software: you can redistribute it and/or modify 8 10 it under the terms of the GNU General Public License as published by 9 11 the Free Software Foundation, either version 3 of the License, or 10 12 (at your option) any later version. 11 13 12 14 This program is distributed in the hope that it will be useful, 13 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 17 GNU General Public License for more details. 16 18 17 19 You should have received a copy of the GNU General Public License 18 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ … … 27 29 Bison output files to be licensed under the GNU General Public 28 30 License without this special exception. 29 31 30 32 This special exception was added by the Free Software Foundation in 31 33 version 2.2 of Bison. */ 32 34 33 #ifndef YY_YY_YACC_PARSER_HPP_INCLUDED 34 # define YY_YY_YACC_PARSER_HPP_INCLUDED 35 /* Debug traces. */ 36 #ifndef YYDEBUG 37 # define YYDEBUG 0 38 #endif 39 #if YYDEBUG 40 extern int yydebug; 35 36 /* Tokens. */ 37 #ifndef YYTOKENTYPE 38 # define YYTOKENTYPE 39 /* Put the tokens into the symbol table, so that GDB and other debuggers 40 know about them. */ 41 enum yytokentype { 42 NUMBER = 258, 43 VAR = 259, 44 ID = 260, 45 AVERAGE = 261, 46 PLUS = 262, 47 MINUS = 263, 48 TIMES = 264, 49 DIVIDE = 265, 50 POWER = 266, 51 EQ = 267, 52 LT = 268, 53 GT = 269, 54 LE = 270, 55 GE = 271, 56 LEFT_PARENTHESIS = 272, 57 RIGHT_PARENTHESIS = 273, 58 END = 274, 59 NEG = 275 60 }; 41 61 #endif 42 62 43 /* Token type. */44 #ifndef YYTOKENTYPE45 # define YYTOKENTYPE46 enum yytokentype47 {48 NUMBER = 258,49 VAR = 259,50 ID = 260,51 AVERAGE = 261,52 PLUS = 262,53 MINUS = 263,54 TIMES = 264,55 DIVIDE = 265,56 POWER = 266,57 EQ = 267,58 LT = 268,59 GT = 269,60 LE = 270,61 GE = 271,62 LEFT_PARENTHESIS = 272,63 RIGHT_PARENTHESIS = 273,64 END = 274,65 NEG = 27566 };67 #endif68 63 69 /* Value type. */ 64 70 65 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 71 typedef union YYSTYPE YYSTYPE; 72 union YYSTYPE 66 typedef union YYSTYPE 73 67 { 74 #line 35 "yacc_parser.yacc" /* yacc.c:1909 */ 68 69 /* Line 1676 of yacc.c */ 70 #line 40 "yacc_parser.yacc" 75 71 76 72 std::string* str; /* symbol table index */ … … 78 74 xios::IFilterExprNode* filterNode; 79 75 80 #line 81 "yacc_parser.hpp" /* yacc.c:1909 */ 81 }; 76 77 78 /* Line 1676 of yacc.c */ 79 #line 80 "yacc_parser.hpp" 80 } YYSTYPE; 82 81 # define YYSTYPE_IS_TRIVIAL 1 82 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 83 83 # define YYSTYPE_IS_DECLARED 1 84 84 #endif 85 85 86 87 86 extern YYSTYPE yylval; 88 87 89 int yyparse (void);90 88 91 #endif /* !YY_YY_YACC_PARSER_HPP_INCLUDED */ -
XIOS/dev/branch_yushan/src/parse_expr/yacc_parser.yacc
r1037 r1127 15 15 } 16 16 17 IFilterExprNode* parsed; 18 std::string globalInputText; 19 size_t globalReadOffset = 0; 20 17 static IFilterExprNode* parsed; 18 static std::string globalInputText; 19 static std::string *globalInputText_ptr = 0; 20 static size_t globalReadOffset = 0; 21 #pragma omp threadprivate(parsed, globalInputText_ptr, globalReadOffset) 22 21 23 int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead) 22 24 { 25 if(globalInputText_ptr == 0) globalInputText_ptr = new std::string; 23 26 size_t numBytesToRead = maxBytesToRead; 24 size_t bytesRemaining = globalInputText.length()-globalReadOffset; 27 //size_t bytesRemaining = globalInputText.length()-globalReadOffset; 28 size_t bytesRemaining = (*globalInputText_ptr).length()-globalReadOffset; 25 29 size_t i; 26 30 if (numBytesToRead > bytesRemaining) numBytesToRead = bytesRemaining; 27 for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i]; 31 //for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i]; 32 for (i = 0; i < numBytesToRead; i++) buffer[i] = (*globalInputText_ptr).c_str()[globalReadOffset + i]; 28 33 *numBytesRead = numBytesToRead; 29 34 globalReadOffset += numBytesToRead; … … 131 136 IFilterExprNode* parseExpr(const string& strExpr) 132 137 { 133 globalInputText = strExpr; 134 globalReadOffset = 0; 135 yyparse(); 138 #pragma omp critical (_parser) 139 { 140 //globalInputText = strExpr; 141 if(globalInputText_ptr == 0) globalInputText_ptr = new std::string; 142 (*globalInputText_ptr).assign (strExpr); 143 globalReadOffset = 0; 144 yyparse(); 145 } 136 146 return parsed; 137 147 } -
XIOS/dev/branch_yushan/src/test/test_complete_omp.f90
r1126 r1127 45 45 CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr) 46 46 CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr) 47 if(rank < size- 1) then47 if(rank < size-2) then 48 48 49 49 !$omp parallel default(private)
Note: See TracChangeset
for help on using the changeset viewer.