00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #define YYBISON 1
00048
00049
00050 #define YYBISON_VERSION "2.3"
00051
00052
00053 #define YYSKELETON_NAME "yacc.c"
00054
00055
00056 #define YYPURE 1
00057
00058
00059 #define YYLSP_NEEDED 1
00060
00061
00062 #define yyparse osrlparse
00063 #define yylex osrllex
00064 #define yyerror osrlerror
00065 #define yylval osrllval
00066 #define yychar osrlchar
00067 #define yydebug osrldebug
00068 #define yynerrs osrlnerrs
00069 #define yylloc osrllloc
00070
00071
00072 #ifndef YYTOKENTYPE
00073 # define YYTOKENTYPE
00074
00075
00076 enum yytokentype {
00077 ATTRIBUTETEXT = 258,
00078 ELEMENTTEXT = 259,
00079 INTEGER = 260,
00080 DOUBLE = 261,
00081 QUOTE = 262,
00082 GREATERTHAN = 263,
00083 ENDOFELEMENT = 264,
00084 OSRLSTART = 265,
00085 OSRLATTRIBUTETEXT = 266,
00086 OSRLEND = 267,
00087 RESULTHEADERSTART = 268,
00088 RESULTHEADEREND = 269,
00089 SERVICEURISTARTANDEND = 270,
00090 SERVICEURISTART = 271,
00091 SERVICEURIEND = 272,
00092 SERVICENAMESTARTANDEND = 273,
00093 SERVICENAMESTART = 274,
00094 SERVICENAMEEND = 275,
00095 INSTANCENAMESTARTANDEND = 276,
00096 INSTANCENAMESTART = 277,
00097 INSTANCENAMEEND = 278,
00098 JOBIDSTARTANDEND = 279,
00099 JOBIDSTART = 280,
00100 JOBIDEND = 281,
00101 RESULTDATASTART = 282,
00102 RESULTDATAEND = 283,
00103 RESULTDATASTARTANDEND = 284,
00104 OPTIMIZATIONSTART = 285,
00105 OPTIMIZATIONEND = 286,
00106 SOLUTIONSTART = 287,
00107 SOLUTIONEND = 288,
00108 VALUESSTART = 289,
00109 VALUESEND = 290,
00110 DUALVALUESSTART = 291,
00111 DUALVALUESEND = 292,
00112 VARIABLESSTART = 293,
00113 VARIABLESEND = 294,
00114 VARSTART = 295,
00115 VAREND = 296,
00116 OBJECTIVESSTART = 297,
00117 OBJECTIVESEND = 298,
00118 OBJSTART = 299,
00119 OBJEND = 300,
00120 CONSTRAINTSSTART = 301,
00121 CONSTRAINTSEND = 302,
00122 CONSTART = 303,
00123 CONEND = 304,
00124 STATUSSTART = 305,
00125 STATUSEND = 306,
00126 GENERALSTATUSSTART = 307,
00127 GENERALSTATUSEND = 308,
00128 MESSAGESTART = 309,
00129 MESSAGEEND = 310,
00130 MESSAGESTARTANDEND = 311,
00131 OTHERSTART = 312,
00132 OTHEREND = 313,
00133 NUMBEROFSOLUTIONSATT = 314,
00134 NUMBEROFVARIABLESATT = 315,
00135 NUMBEROFCONSTRAINTSATT = 316,
00136 NUMBEROFOBJECTIVESATT = 317,
00137 OBJECTIVEIDXATT = 318,
00138 IDXATT = 319,
00139 TYPEATT = 320,
00140 DESCRIPTIONATT = 321,
00141 NAMEATT = 322,
00142 DUMMY = 323
00143 };
00144 #endif
00145
00146 #define ATTRIBUTETEXT 258
00147 #define ELEMENTTEXT 259
00148 #define INTEGER 260
00149 #define DOUBLE 261
00150 #define QUOTE 262
00151 #define GREATERTHAN 263
00152 #define ENDOFELEMENT 264
00153 #define OSRLSTART 265
00154 #define OSRLATTRIBUTETEXT 266
00155 #define OSRLEND 267
00156 #define RESULTHEADERSTART 268
00157 #define RESULTHEADEREND 269
00158 #define SERVICEURISTARTANDEND 270
00159 #define SERVICEURISTART 271
00160 #define SERVICEURIEND 272
00161 #define SERVICENAMESTARTANDEND 273
00162 #define SERVICENAMESTART 274
00163 #define SERVICENAMEEND 275
00164 #define INSTANCENAMESTARTANDEND 276
00165 #define INSTANCENAMESTART 277
00166 #define INSTANCENAMEEND 278
00167 #define JOBIDSTARTANDEND 279
00168 #define JOBIDSTART 280
00169 #define JOBIDEND 281
00170 #define RESULTDATASTART 282
00171 #define RESULTDATAEND 283
00172 #define RESULTDATASTARTANDEND 284
00173 #define OPTIMIZATIONSTART 285
00174 #define OPTIMIZATIONEND 286
00175 #define SOLUTIONSTART 287
00176 #define SOLUTIONEND 288
00177 #define VALUESSTART 289
00178 #define VALUESEND 290
00179 #define DUALVALUESSTART 291
00180 #define DUALVALUESEND 292
00181 #define VARIABLESSTART 293
00182 #define VARIABLESEND 294
00183 #define VARSTART 295
00184 #define VAREND 296
00185 #define OBJECTIVESSTART 297
00186 #define OBJECTIVESEND 298
00187 #define OBJSTART 299
00188 #define OBJEND 300
00189 #define CONSTRAINTSSTART 301
00190 #define CONSTRAINTSEND 302
00191 #define CONSTART 303
00192 #define CONEND 304
00193 #define STATUSSTART 305
00194 #define STATUSEND 306
00195 #define GENERALSTATUSSTART 307
00196 #define GENERALSTATUSEND 308
00197 #define MESSAGESTART 309
00198 #define MESSAGEEND 310
00199 #define MESSAGESTARTANDEND 311
00200 #define OTHERSTART 312
00201 #define OTHEREND 313
00202 #define NUMBEROFSOLUTIONSATT 314
00203 #define NUMBEROFVARIABLESATT 315
00204 #define NUMBEROFCONSTRAINTSATT 316
00205 #define NUMBEROFOBJECTIVESATT 317
00206 #define OBJECTIVEIDXATT 318
00207 #define IDXATT 319
00208 #define TYPEATT 320
00209 #define DESCRIPTIONATT 321
00210 #define NAMEATT 322
00211 #define DUMMY 323
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223 #include "ErrorClass.h"
00224 #include "OSResult.h"
00225 #include "OSrLParserData.h"
00226 #include <iostream>
00227 #include <sstream>
00228
00229
00230 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00231 YY_BUFFER_STATE osrl_scan_string (const char *yy_str , void* yyscanner );
00232 int osrllex_init(void** ptr_yy_globals);
00233 int osrllex_destroy (void* yyscanner );
00234 int osrlget_lineno( void* yyscanner);
00235 char *osrlget_text (void* yyscanner );
00236 void osrlset_lineno (int line_number , void* yyscanner );
00237 OSResult *yygetOSResult( std::string parsestring) ;
00238
00239
00240
00241
00242
00243 #ifndef YYDEBUG
00244 # define YYDEBUG 0
00245 #endif
00246
00247
00248 #ifdef YYERROR_VERBOSE
00249 # undef YYERROR_VERBOSE
00250 # define YYERROR_VERBOSE 1
00251 #else
00252 # define YYERROR_VERBOSE 0
00253 #endif
00254
00255
00256 #ifndef YYTOKEN_TABLE
00257 # define YYTOKEN_TABLE 0
00258 #endif
00259
00260 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00261 typedef union YYSTYPE
00262
00263 {
00264 double dval;
00265 int ival;
00266 char* charval;
00267 }
00268
00269
00270 YYSTYPE;
00271 # define yystype YYSTYPE
00272 # define YYSTYPE_IS_DECLARED 1
00273 # define YYSTYPE_IS_TRIVIAL 1
00274 #endif
00275
00276 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
00277 typedef struct YYLTYPE
00278 {
00279 int first_line;
00280 int first_column;
00281 int last_line;
00282 int last_column;
00283 } YYLTYPE;
00284 # define yyltype YYLTYPE
00285 # define YYLTYPE_IS_DECLARED 1
00286 # define YYLTYPE_IS_TRIVIAL 1
00287 #endif
00288
00289
00290
00291
00292
00293
00294 void osrlerror(YYLTYPE* type, OSResult *osresult, OSrLParserData *parserData ,const char* errormsg );
00295 int osrllex(YYSTYPE* lvalp, YYLTYPE* llocp, void* scanner);
00296
00297 #define scanner parserData->scanner
00298
00299
00300
00301
00302
00303 #ifdef short
00304 # undef short
00305 #endif
00306
00307 #ifdef YYTYPE_UINT8
00308 typedef YYTYPE_UINT8 yytype_uint8;
00309 #else
00310 typedef unsigned char yytype_uint8;
00311 #endif
00312
00313 #ifdef YYTYPE_INT8
00314 typedef YYTYPE_INT8 yytype_int8;
00315 #elif (defined __STDC__ || defined __C99__FUNC__ \
00316 || defined __cplusplus || defined _MSC_VER)
00317 typedef signed char yytype_int8;
00318 #else
00319 typedef short int yytype_int8;
00320 #endif
00321
00322 #ifdef YYTYPE_UINT16
00323 typedef YYTYPE_UINT16 yytype_uint16;
00324 #else
00325 typedef unsigned short int yytype_uint16;
00326 #endif
00327
00328 #ifdef YYTYPE_INT16
00329 typedef YYTYPE_INT16 yytype_int16;
00330 #else
00331 typedef short int yytype_int16;
00332 #endif
00333
00334 #ifndef YYSIZE_T
00335 # ifdef __SIZE_TYPE__
00336 # define YYSIZE_T __SIZE_TYPE__
00337 # elif defined size_t
00338 # define YYSIZE_T size_t
00339 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00340 || defined __cplusplus || defined _MSC_VER)
00341 # include <stddef.h>
00342 # define YYSIZE_T size_t
00343 # else
00344 # define YYSIZE_T unsigned int
00345 # endif
00346 #endif
00347
00348 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00349
00350 #ifndef YY_
00351 # if YYENABLE_NLS
00352 # if ENABLE_NLS
00353 # include <libintl.h>
00354 # define YY_(msgid) dgettext ("bison-runtime", msgid)
00355 # endif
00356 # endif
00357 # ifndef YY_
00358 # define YY_(msgid) msgid
00359 # endif
00360 #endif
00361
00362
00363 #if ! defined lint || defined __GNUC__
00364 # define YYUSE(e) ((void) (e))
00365 #else
00366 # define YYUSE(e)
00367 #endif
00368
00369
00370 #ifndef lint
00371 # define YYID(n) (n)
00372 #else
00373 #if (defined __STDC__ || defined __C99__FUNC__ \
00374 || defined __cplusplus || defined _MSC_VER)
00375 static int
00376 YYID (int i)
00377 #else
00378 static int
00379 YYID (i)
00380 int i;
00381 #endif
00382 {
00383 return i;
00384 }
00385 #endif
00386
00387 #if ! defined yyoverflow || YYERROR_VERBOSE
00388
00389
00390
00391 # ifdef YYSTACK_USE_ALLOCA
00392 # if YYSTACK_USE_ALLOCA
00393 # ifdef __GNUC__
00394 # define YYSTACK_ALLOC __builtin_alloca
00395 # elif defined __BUILTIN_VA_ARG_INCR
00396 # include <alloca.h>
00397 # elif defined _AIX
00398 # define YYSTACK_ALLOC __alloca
00399 # elif defined _MSC_VER
00400 # include <malloc.h>
00401 # define alloca _alloca
00402 # else
00403 # define YYSTACK_ALLOC alloca
00404 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00405 || defined __cplusplus || defined _MSC_VER)
00406 # include <stdlib.h>
00407 # ifndef _STDLIB_H
00408 # define _STDLIB_H 1
00409 # endif
00410 # endif
00411 # endif
00412 # endif
00413 # endif
00414
00415 # ifdef YYSTACK_ALLOC
00416
00417 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
00418 # ifndef YYSTACK_ALLOC_MAXIMUM
00419
00420
00421
00422
00423 # define YYSTACK_ALLOC_MAXIMUM 4032
00424 # endif
00425 # else
00426 # define YYSTACK_ALLOC YYMALLOC
00427 # define YYSTACK_FREE YYFREE
00428 # ifndef YYSTACK_ALLOC_MAXIMUM
00429 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00430 # endif
00431 # if (defined __cplusplus && ! defined _STDLIB_H \
00432 && ! ((defined YYMALLOC || defined malloc) \
00433 && (defined YYFREE || defined free)))
00434 # include <stdlib.h>
00435 # ifndef _STDLIB_H
00436 # define _STDLIB_H 1
00437 # endif
00438 # endif
00439 # ifndef YYMALLOC
00440 # define YYMALLOC malloc
00441 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00442 || defined __cplusplus || defined _MSC_VER)
00443 void *malloc (YYSIZE_T);
00444 # endif
00445 # endif
00446 # ifndef YYFREE
00447 # define YYFREE free
00448 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00449 || defined __cplusplus || defined _MSC_VER)
00450 void free (void *);
00451 # endif
00452 # endif
00453 # endif
00454 #endif
00455
00456
00457 #if (! defined yyoverflow \
00458 && (! defined __cplusplus \
00459 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
00460 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00461
00462
00463 union yyalloc
00464 {
00465 yytype_int16 yyss;
00466 YYSTYPE yyvs;
00467 YYLTYPE yyls;
00468 };
00469
00470
00471 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00472
00473
00474
00475 # define YYSTACK_BYTES(N) \
00476 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
00477 + 2 * YYSTACK_GAP_MAXIMUM)
00478
00479
00480
00481 # ifndef YYCOPY
00482 # if defined __GNUC__ && 1 < __GNUC__
00483 # define YYCOPY(To, From, Count) \
00484 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00485 # else
00486 # define YYCOPY(To, From, Count) \
00487 do \
00488 { \
00489 YYSIZE_T yyi; \
00490 for (yyi = 0; yyi < (Count); yyi++) \
00491 (To)[yyi] = (From)[yyi]; \
00492 } \
00493 while (YYID (0))
00494 # endif
00495 # endif
00496
00497
00498
00499
00500
00501
00502 # define YYSTACK_RELOCATE(Stack) \
00503 do \
00504 { \
00505 YYSIZE_T yynewbytes; \
00506 YYCOPY (&yyptr->Stack, Stack, yysize); \
00507 Stack = &yyptr->Stack; \
00508 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00509 yyptr += yynewbytes / sizeof (*yyptr); \
00510 } \
00511 while (YYID (0))
00512
00513 #endif
00514
00515
00516 #define YYFINAL 6
00517
00518 #define YYLAST 172
00519
00520
00521 #define YYNTOKENS 73
00522
00523 #define YYNNTS 56
00524
00525 #define YYNRULES 114
00526
00527 #define YYNSTATES 218
00528
00529
00530 #define YYUNDEFTOK 2
00531 #define YYMAXUTOK 323
00532
00533 #define YYTRANSLATE(YYX) \
00534 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00535
00536
00537 static const yytype_uint8 yytranslate[] =
00538 {
00539 0, 2, 2, 2, 2, 2, 2, 2, 2, 70,
00540 72, 2, 2, 71, 2, 2, 2, 2, 2, 2,
00541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00542 2, 2, 69, 2, 2, 2, 2, 2, 2, 2,
00543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00564 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
00565 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
00566 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00567 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00568 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
00569 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
00570 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
00571 65, 66, 67, 68
00572 };
00573
00574 #if YYDEBUG
00575
00576
00577 static const yytype_uint16 yyprhs[] =
00578 {
00579 0, 0, 3, 4, 10, 13, 17, 26, 31, 35,
00580 37, 40, 44, 48, 49, 51, 55, 58, 59, 61,
00581 65, 68, 69, 71, 75, 78, 79, 81, 85, 88,
00582 89, 91, 95, 98, 100, 106, 109, 110, 112, 113,
00583 115, 116, 121, 123, 126, 127, 130, 133, 136, 139,
00584 142, 145, 148, 151, 154, 156, 159, 163, 173, 174,
00585 178, 183, 187, 189, 192, 196, 200, 201, 205, 208,
00586 209, 218, 220, 223, 229, 235, 236, 239, 240, 241,
00587 249, 251, 254, 260, 266, 272, 274, 277, 281, 285,
00588 286, 295, 297, 300, 306, 312, 313, 322, 324, 327,
00589 333, 339, 343, 344, 346, 347, 349, 351, 354, 357,
00590 359, 361, 363, 365, 366
00591 };
00592
00593
00594 static const yytype_int16 yyrhs[] =
00595 {
00596 74, 0, -1, -1, 76, 77, 86, 75, 12, -1,
00597 10, 8, -1, 10, 11, 8, -1, 13, 78, 81,
00598 82, 83, 84, 85, 14, -1, 52, 79, 8, 53,
00599 -1, 52, 79, 9, -1, 80, -1, 79, 80, -1,
00600 65, 3, 126, -1, 66, 3, 126, -1, -1, 15,
00601 -1, 16, 4, 17, -1, 16, 17, -1, -1, 18,
00602 -1, 19, 4, 20, -1, 19, 20, -1, -1, 21,
00603 -1, 22, 4, 23, -1, 22, 23, -1, -1, 24,
00604 -1, 25, 4, 26, -1, 25, 26, -1, -1, 56,
00605 -1, 54, 4, 55, -1, 54, 55, -1, 29, -1,
00606 27, 88, 89, 87, 28, -1, 27, 28, -1, -1,
00607 68, -1, -1, 68, -1, -1, 30, 92, 90, 91,
00608 -1, 9, -1, 8, 98, -1, -1, 92, 93, -1,
00609 94, 126, -1, 95, 126, -1, 96, 126, -1, 97,
00610 126, -1, 59, 5, -1, 60, 5, -1, 61, 5,
00611 -1, 62, 5, -1, 31, -1, 99, 31, -1, 98,
00612 99, 31, -1, 32, 100, 8, 101, 104, 105, 116,
00613 119, 125, -1, -1, 63, 5, 126, -1, 50, 102,
00614 8, 51, -1, 50, 102, 9, -1, 103, -1, 102,
00615 103, -1, 65, 3, 126, -1, 66, 3, 126, -1,
00616 -1, 54, 4, 55, -1, 54, 55, -1, -1, 38,
00617 8, 34, 8, 106, 35, 108, 39, -1, 107, -1,
00618 106, 107, -1, 40, 122, 8, 6, 41, -1, 40,
00619 122, 8, 5, 41, -1, -1, 108, 109, -1, -1,
00620 -1, 57, 110, 114, 8, 111, 112, 58, -1, 113,
00621 -1, 112, 113, -1, 40, 122, 8, 4, 41, -1,
00622 40, 122, 8, 6, 41, -1, 40, 122, 8, 5,
00623 41, -1, 115, -1, 114, 115, -1, 67, 3, 126,
00624 -1, 66, 3, 126, -1, -1, 42, 8, 34, 8,
00625 117, 35, 123, 43, -1, 118, -1, 117, 118, -1,
00626 44, 122, 8, 6, 45, -1, 44, 122, 8, 5,
00627 45, -1, -1, 46, 8, 36, 8, 120, 37, 124,
00628 47, -1, 121, -1, 120, 121, -1, 48, 122, 8,
00629 6, 49, -1, 48, 122, 8, 5, 49, -1, 64,
00630 5, 126, -1, -1, 68, -1, -1, 68, -1, 33,
00631 -1, 68, 33, -1, 128, 7, -1, 69, -1, 70,
00632 -1, 71, -1, 72, -1, -1, 128, 127, -1
00633 };
00634
00635
00636 static const yytype_uint16 yyrline[] =
00637 {
00638 0, 105, 105, 104, 122, 123, 127, 129, 130, 132,
00639 133, 135, 136, 139, 140, 141, 142, 145, 146, 147,
00640 148, 150, 151, 152, 153, 155, 156, 157, 158, 160,
00641 161, 162, 163, 165, 166, 167, 169, 170, 172, 173,
00642 176, 175, 203, 204, 206, 207, 209, 210, 211, 212,
00643 216, 218, 220, 222, 226, 227, 228, 231, 237, 238,
00644 241, 242, 245, 246, 248, 249, 251, 252, 253, 255,
00645 256, 259, 260, 262, 266, 273, 274, 276, 279, 276,
00646 283, 284, 286, 291, 297, 305, 306, 308, 309, 312,
00647 313, 315, 316, 318, 320, 323, 324, 326, 327, 329,
00648 332, 339, 345, 346, 348, 349, 351, 352, 358, 360,
00649 361, 362, 363, 365, 366
00650 };
00651 #endif
00652
00653 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00654
00655
00656 static const char *const yytname[] =
00657 {
00658 "$end", "error", "$undefined", "ATTRIBUTETEXT", "ELEMENTTEXT",
00659 "INTEGER", "DOUBLE", "QUOTE", "GREATERTHAN", "ENDOFELEMENT", "OSRLSTART",
00660 "OSRLATTRIBUTETEXT", "OSRLEND", "RESULTHEADERSTART", "RESULTHEADEREND",
00661 "SERVICEURISTARTANDEND", "SERVICEURISTART", "SERVICEURIEND",
00662 "SERVICENAMESTARTANDEND", "SERVICENAMESTART", "SERVICENAMEEND",
00663 "INSTANCENAMESTARTANDEND", "INSTANCENAMESTART", "INSTANCENAMEEND",
00664 "JOBIDSTARTANDEND", "JOBIDSTART", "JOBIDEND", "RESULTDATASTART",
00665 "RESULTDATAEND", "RESULTDATASTARTANDEND", "OPTIMIZATIONSTART",
00666 "OPTIMIZATIONEND", "SOLUTIONSTART", "SOLUTIONEND", "VALUESSTART",
00667 "VALUESEND", "DUALVALUESSTART", "DUALVALUESEND", "VARIABLESSTART",
00668 "VARIABLESEND", "VARSTART", "VAREND", "OBJECTIVESSTART", "OBJECTIVESEND",
00669 "OBJSTART", "OBJEND", "CONSTRAINTSSTART", "CONSTRAINTSEND", "CONSTART",
00670 "CONEND", "STATUSSTART", "STATUSEND", "GENERALSTATUSSTART",
00671 "GENERALSTATUSEND", "MESSAGESTART", "MESSAGEEND", "MESSAGESTARTANDEND",
00672 "OTHERSTART", "OTHEREND", "NUMBEROFSOLUTIONSATT", "NUMBEROFVARIABLESATT",
00673 "NUMBEROFCONSTRAINTSATT", "NUMBEROFOBJECTIVESATT", "OBJECTIVEIDXATT",
00674 "IDXATT", "TYPEATT", "DESCRIPTIONATT", "NAMEATT", "DUMMY", "' '",
00675 "'\\t'", "'\\r'", "'\\n'", "$accept", "osrldoc", "@1", "osrlstart",
00676 "resultHeader", "generalStatus", "anotherGeneralStatusATT",
00677 "generalstatusatt", "serviceURI", "serviceName", "instanceName", "jobID",
00678 "headerMessage", "resultData", "otherResultData", "statistics",
00679 "optimization", "@2", "optend", "anotherOptATT", "optatt",
00680 "optnumsolatt", "optnumvaratt", "optnumconatt", "optnumobjatt",
00681 "solution", "anothersolution", "objectiveIDXATT", "status",
00682 "anotherStatusATT", "statusatt", "message", "variables", "var",
00683 "anothervar", "otherVariables", "otherVariableResult", "@3", "@4",
00684 "othervar", "anotherothervar", "anotherotherVarATT", "otheratt",
00685 "objectives", "obj", "anotherobj", "constraints", "con", "anothercon",
00686 "anIDXATT", "otherObjectives", "otherConstraints", "otherSolution",
00687 "quote", "xmlWhiteSpaceChar", "xmlWhiteSpace", 0
00688 };
00689 #endif
00690
00691 # ifdef YYPRINT
00692
00693
00694 static const yytype_uint16 yytoknum[] =
00695 {
00696 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
00697 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
00698 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
00699 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
00700 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
00701 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
00702 315, 316, 317, 318, 319, 320, 321, 322, 323, 32,
00703 9, 13, 10
00704 };
00705 # endif
00706
00707
00708 static const yytype_uint8 yyr1[] =
00709 {
00710 0, 73, 75, 74, 76, 76, 77, 78, 78, 79,
00711 79, 80, 80, 81, 81, 81, 81, 82, 82, 82,
00712 82, 83, 83, 83, 83, 84, 84, 84, 84, 85,
00713 85, 85, 85, 86, 86, 86, 87, 87, 88, 88,
00714 90, 89, 91, 91, 92, 92, 93, 93, 93, 93,
00715 94, 95, 96, 97, 98, 98, 98, 99, 100, 100,
00716 101, 101, 102, 102, 103, 103, 104, 104, 104, 105,
00717 105, 106, 106, 107, 107, 108, 108, 110, 111, 109,
00718 112, 112, 113, 113, 113, 114, 114, 115, 115, 116,
00719 116, 117, 117, 118, 118, 119, 119, 120, 120, 121,
00720 121, 122, 123, 123, 124, 124, 125, 125, 126, 127,
00721 127, 127, 127, 128, 128
00722 };
00723
00724
00725 static const yytype_uint8 yyr2[] =
00726 {
00727 0, 2, 0, 5, 2, 3, 8, 4, 3, 1,
00728 2, 3, 3, 0, 1, 3, 2, 0, 1, 3,
00729 2, 0, 1, 3, 2, 0, 1, 3, 2, 0,
00730 1, 3, 2, 1, 5, 2, 0, 1, 0, 1,
00731 0, 4, 1, 2, 0, 2, 2, 2, 2, 2,
00732 2, 2, 2, 2, 1, 2, 3, 9, 0, 3,
00733 4, 3, 1, 2, 3, 3, 0, 3, 2, 0,
00734 8, 1, 2, 5, 5, 0, 2, 0, 0, 7,
00735 1, 2, 5, 5, 5, 1, 2, 3, 3, 0,
00736 8, 1, 2, 5, 5, 0, 8, 1, 2, 5,
00737 5, 3, 0, 1, 0, 1, 1, 2, 2, 1,
00738 1, 1, 1, 0, 2
00739 };
00740
00741
00742
00743
00744 static const yytype_uint8 yydefact[] =
00745 {
00746 0, 0, 0, 0, 4, 0, 1, 0, 0, 5,
00747 0, 13, 38, 33, 2, 0, 0, 0, 9, 14,
00748 0, 17, 35, 39, 0, 0, 113, 113, 0, 8,
00749 10, 0, 16, 18, 0, 21, 44, 36, 3, 11,
00750 0, 12, 7, 15, 0, 20, 22, 0, 25, 40,
00751 37, 0, 108, 109, 110, 111, 112, 114, 19, 0,
00752 24, 26, 0, 29, 0, 0, 0, 0, 0, 45,
00753 113, 113, 113, 113, 34, 23, 0, 28, 0, 30,
00754 0, 50, 51, 52, 53, 0, 42, 41, 46, 47,
00755 48, 49, 27, 0, 32, 6, 54, 58, 43, 0,
00756 31, 0, 0, 0, 55, 113, 0, 56, 59, 0,
00757 66, 0, 0, 0, 62, 0, 69, 113, 113, 0,
00758 61, 63, 0, 68, 0, 89, 64, 65, 60, 67,
00759 0, 0, 95, 0, 0, 0, 0, 0, 0, 0,
00760 106, 0, 57, 0, 0, 71, 0, 0, 107, 0,
00761 0, 75, 72, 0, 0, 91, 0, 113, 0, 0,
00762 0, 102, 92, 0, 0, 97, 101, 0, 0, 70,
00763 77, 76, 0, 103, 0, 0, 104, 98, 74, 73,
00764 0, 0, 0, 90, 0, 105, 0, 0, 0, 0,
00765 85, 94, 93, 0, 0, 96, 113, 113, 78, 86,
00766 100, 99, 88, 87, 0, 0, 0, 80, 0, 79,
00767 81, 0, 0, 0, 0, 82, 84, 83
00768 };
00769
00770
00771 static const yytype_int16 yydefgoto[] =
00772 {
00773 -1, 2, 25, 3, 8, 11, 17, 18, 21, 35,
00774 48, 63, 80, 14, 51, 24, 37, 68, 87, 49,
00775 69, 70, 71, 72, 73, 98, 99, 102, 110, 113,
00776 114, 116, 125, 144, 145, 159, 171, 180, 204, 206,
00777 207, 189, 190, 132, 154, 155, 136, 164, 165, 150,
00778 174, 186, 142, 39, 57, 40
00779 };
00780
00781
00782
00783 #define YYPACT_NINF -150
00784 static const yytype_int16 yypact[] =
00785 {
00786 13, 14, 27, 17, -150, 34, -150, 25, 28, -150,
00787 6, 44, -20, -150, -150, 51, 76, 2, -150, -150,
00788 16, 55, -150, -150, 64, 35, -150, -150, 46, -150,
00789 -150, 84, -150, -150, 12, 54, -150, 36, -150, -150,
00790 -6, -150, -150, -150, 80, -150, -150, 11, 56, -10,
00791 -150, 75, -150, -150, -150, -150, -150, -150, -150, 79,
00792 -150, -150, 5, -15, 100, 101, 102, 103, 74, -150,
00793 -150, -150, -150, -150, -150, -150, 85, -150, -2, -150,
00794 95, -150, -150, -150, -150, 53, -150, -150, -150, -150,
00795 -150, -150, -150, 57, -150, -150, -150, 47, 81, 86,
00796 -150, 109, 107, 88, -150, -150, 66, -150, -150, 21,
00797 67, 115, 117, 4, -150, 3, 89, -150, -150, 71,
00798 -150, -150, 68, -150, 116, 90, -150, -150, -150, -150,
00799 91, 118, 82, 121, 97, 125, -28, 94, 127, 104,
00800 -150, 105, -150, 72, -14, -150, 93, 131, -150, 136,
00801 134, -150, -150, 72, -16, -150, 96, -150, 83, -33,
00802 135, 77, -150, 72, -19, -150, -150, 106, 108, -150,
00803 -150, -150, 87, -150, 110, 138, 98, -150, -150, -150,
00804 29, 111, 112, -150, 92, -150, 113, 145, 147, -5,
00805 -150, -150, -150, 114, 119, -150, -150, -150, -150, -150,
00806 -150, -150, -150, -150, 122, 72, -23, -150, 143, -150,
00807 -150, 32, 120, 123, 124, -150, -150, -150
00808 };
00809
00810
00811 static const yytype_int16 yypgoto[] =
00812 {
00813 -150, -150, -150, -150, -150, -150, -150, 137, -150, -150,
00814 -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
00815 -150, -150, -150, -150, -150, -150, 60, -150, -150, -150,
00816 39, -150, -150, -150, 15, -150, -150, -150, -150, -150,
00817 -51, -150, -22, -150, -150, 18, -150, -150, 7, -149,
00818 -150, -150, -150, -27, -150, -150
00819 };
00820
00821
00822
00823
00824
00825 #define YYTABLE_NINF -1
00826 static const yytype_uint8 yytable[] =
00827 {
00828 41, 52, 93, 198, 160, 140, 169, 122, 22, 76,
00829 28, 29, 119, 120, 175, 59, 44, 205, 176, 161,
00830 31, 151, 4, 1, 170, 5, 143, 6, 153, 163,
00831 7, 77, 45, 32, 60, 209, 212, 213, 214, 78,
00832 141, 79, 9, 88, 89, 90, 91, 38, 23, 64,
00833 65, 66, 67, 94, 26, 12, 208, 13, 123, 19,
00834 20, 187, 188, 53, 54, 55, 56, 15, 16, 111,
00835 112, 15, 16, 33, 34, 46, 47, 10, 108, 27,
00836 61, 62, 85, 86, 96, 97, 111, 112, 167, 168,
00837 126, 127, 181, 182, 36, 187, 188, 193, 194, 42,
00838 58, 43, 75, 74, 50, 81, 82, 83, 84, 95,
00839 101, 92, 100, 97, 105, 106, 109, 104, 117, 107,
00840 118, 115, 128, 129, 130, 133, 134, 124, 135, 137,
00841 166, 138, 131, 139, 143, 146, 149, 153, 148, 156,
00842 147, 157, 158, 172, 163, 173, 184, 178, 196, 179,
00843 197, 211, 121, 183, 30, 210, 191, 192, 103, 152,
00844 195, 215, 205, 200, 216, 217, 185, 199, 201, 202,
00845 203, 177, 162
00846 };
00847
00848 static const yytype_uint8 yycheck[] =
00849 {
00850 27, 7, 4, 8, 153, 33, 39, 4, 28, 4,
00851 8, 9, 8, 9, 163, 4, 4, 40, 37, 35,
00852 4, 35, 8, 10, 57, 11, 40, 0, 44, 48,
00853 13, 26, 20, 17, 23, 58, 4, 5, 6, 54,
00854 68, 56, 8, 70, 71, 72, 73, 12, 68, 59,
00855 60, 61, 62, 55, 3, 27, 205, 29, 55, 15,
00856 16, 66, 67, 69, 70, 71, 72, 65, 66, 65,
00857 66, 65, 66, 18, 19, 21, 22, 52, 105, 3,
00858 24, 25, 8, 9, 31, 32, 65, 66, 5, 6,
00859 117, 118, 5, 6, 30, 66, 67, 5, 6, 53,
00860 20, 17, 23, 28, 68, 5, 5, 5, 5, 14,
00861 63, 26, 55, 32, 5, 8, 50, 31, 3, 31,
00862 3, 54, 51, 55, 8, 34, 8, 38, 46, 8,
00863 157, 34, 42, 8, 40, 8, 64, 44, 33, 8,
00864 36, 5, 8, 8, 48, 68, 8, 41, 3, 41,
00865 3, 8, 113, 43, 17, 206, 45, 45, 98, 144,
00866 47, 41, 40, 49, 41, 41, 68, 189, 49, 196,
00867 197, 164, 154
00868 };
00869
00870
00871
00872 static const yytype_uint8 yystos[] =
00873 {
00874 0, 10, 74, 76, 8, 11, 0, 13, 77, 8,
00875 52, 78, 27, 29, 86, 65, 66, 79, 80, 15,
00876 16, 81, 28, 68, 88, 75, 3, 3, 8, 9,
00877 80, 4, 17, 18, 19, 82, 30, 89, 12, 126,
00878 128, 126, 53, 17, 4, 20, 21, 22, 83, 92,
00879 68, 87, 7, 69, 70, 71, 72, 127, 20, 4,
00880 23, 24, 25, 84, 59, 60, 61, 62, 90, 93,
00881 94, 95, 96, 97, 28, 23, 4, 26, 54, 56,
00882 85, 5, 5, 5, 5, 8, 9, 91, 126, 126,
00883 126, 126, 26, 4, 55, 14, 31, 32, 98, 99,
00884 55, 63, 100, 99, 31, 5, 8, 31, 126, 50,
00885 101, 65, 66, 102, 103, 54, 104, 3, 3, 8,
00886 9, 103, 4, 55, 38, 105, 126, 126, 51, 55,
00887 8, 42, 116, 34, 8, 46, 119, 8, 34, 8,
00888 33, 68, 125, 40, 106, 107, 8, 36, 33, 64,
00889 122, 35, 107, 44, 117, 118, 8, 5, 8, 108,
00890 122, 35, 118, 48, 120, 121, 126, 5, 6, 39,
00891 57, 109, 8, 68, 123, 122, 37, 121, 41, 41,
00892 110, 5, 6, 43, 8, 68, 124, 66, 67, 114,
00893 115, 45, 45, 5, 6, 47, 3, 3, 8, 115,
00894 49, 49, 126, 126, 111, 40, 112, 113, 122, 58,
00895 113, 8, 4, 5, 6, 41, 41, 41
00896 };
00897
00898 #define yyerrok (yyerrstatus = 0)
00899 #define yyclearin (yychar = YYEMPTY)
00900 #define YYEMPTY (-2)
00901 #define YYEOF 0
00902
00903 #define YYACCEPT goto yyacceptlab
00904 #define YYABORT goto yyabortlab
00905 #define YYERROR goto yyerrorlab
00906
00907
00908
00909
00910
00911
00912 #define YYFAIL goto yyerrlab
00913
00914 #define YYRECOVERING() (!!yyerrstatus)
00915
00916 #define YYBACKUP(Token, Value) \
00917 do \
00918 if (yychar == YYEMPTY && yylen == 1) \
00919 { \
00920 yychar = (Token); \
00921 yylval = (Value); \
00922 yytoken = YYTRANSLATE (yychar); \
00923 YYPOPSTACK (1); \
00924 goto yybackup; \
00925 } \
00926 else \
00927 { \
00928 yyerror (&yylloc, osresult, parserData, YY_("syntax error: cannot back up")); \
00929 YYERROR; \
00930 } \
00931 while (YYID (0))
00932
00933
00934 #define YYTERROR 1
00935 #define YYERRCODE 256
00936
00937
00938
00939
00940
00941
00942 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00943 #ifndef YYLLOC_DEFAULT
00944 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00945 do \
00946 if (YYID (N)) \
00947 { \
00948 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
00949 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
00950 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
00951 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
00952 } \
00953 else \
00954 { \
00955 (Current).first_line = (Current).last_line = \
00956 YYRHSLOC (Rhs, 0).last_line; \
00957 (Current).first_column = (Current).last_column = \
00958 YYRHSLOC (Rhs, 0).last_column; \
00959 } \
00960 while (YYID (0))
00961 #endif
00962
00963
00964
00965
00966
00967
00968 #ifndef YY_LOCATION_PRINT
00969 # if YYLTYPE_IS_TRIVIAL
00970 # define YY_LOCATION_PRINT(File, Loc) \
00971 fprintf (File, "%d.%d-%d.%d", \
00972 (Loc).first_line, (Loc).first_column, \
00973 (Loc).last_line, (Loc).last_column)
00974 # else
00975 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00976 # endif
00977 #endif
00978
00979
00980
00981
00982 #ifdef YYLEX_PARAM
00983 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
00984 #else
00985 # define YYLEX yylex (&yylval, &yylloc, scanner)
00986 #endif
00987
00988
00989 #if YYDEBUG
00990
00991 # ifndef YYFPRINTF
00992 # include <stdio.h>
00993 # define YYFPRINTF fprintf
00994 # endif
00995
00996 # define YYDPRINTF(Args) \
00997 do { \
00998 if (yydebug) \
00999 YYFPRINTF Args; \
01000 } while (YYID (0))
01001
01002 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
01003 do { \
01004 if (yydebug) \
01005 { \
01006 YYFPRINTF (stderr, "%s ", Title); \
01007 yy_symbol_print (stderr, \
01008 Type, Value, Location, osresult, parserData); \
01009 YYFPRINTF (stderr, "\n"); \
01010 } \
01011 } while (YYID (0))
01012
01013
01014
01015
01016
01017
01018
01019 #if (defined __STDC__ || defined __C99__FUNC__ \
01020 || defined __cplusplus || defined _MSC_VER)
01021 static void
01022 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, OSResult *osresult, OSrLParserData *parserData)
01023 #else
01024 static void
01025 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, osresult, parserData)
01026 FILE *yyoutput;
01027 int yytype;
01028 YYSTYPE const * const yyvaluep;
01029 YYLTYPE const * const yylocationp;
01030 OSResult *osresult;
01031 OSrLParserData *parserData;
01032 #endif
01033 {
01034 if (!yyvaluep)
01035 return;
01036 YYUSE (yylocationp);
01037 YYUSE (osresult);
01038 YYUSE (parserData);
01039 # ifdef YYPRINT
01040 if (yytype < YYNTOKENS)
01041 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
01042 # else
01043 YYUSE (yyoutput);
01044 # endif
01045 switch (yytype)
01046 {
01047 default:
01048 break;
01049 }
01050 }
01051
01052
01053
01054
01055
01056
01057 #if (defined __STDC__ || defined __C99__FUNC__ \
01058 || defined __cplusplus || defined _MSC_VER)
01059 static void
01060 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, OSResult *osresult, OSrLParserData *parserData)
01061 #else
01062 static void
01063 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, osresult, parserData)
01064 FILE *yyoutput;
01065 int yytype;
01066 YYSTYPE const * const yyvaluep;
01067 YYLTYPE const * const yylocationp;
01068 OSResult *osresult;
01069 OSrLParserData *parserData;
01070 #endif
01071 {
01072 if (yytype < YYNTOKENS)
01073 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
01074 else
01075 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
01076
01077 YY_LOCATION_PRINT (yyoutput, *yylocationp);
01078 YYFPRINTF (yyoutput, ": ");
01079 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, osresult, parserData);
01080 YYFPRINTF (yyoutput, ")");
01081 }
01082
01083
01084
01085
01086
01087
01088 #if (defined __STDC__ || defined __C99__FUNC__ \
01089 || defined __cplusplus || defined _MSC_VER)
01090 static void
01091 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
01092 #else
01093 static void
01094 yy_stack_print (bottom, top)
01095 yytype_int16 *bottom;
01096 yytype_int16 *top;
01097 #endif
01098 {
01099 YYFPRINTF (stderr, "Stack now");
01100 for (; bottom <= top; ++bottom)
01101 YYFPRINTF (stderr, " %d", *bottom);
01102 YYFPRINTF (stderr, "\n");
01103 }
01104
01105 # define YY_STACK_PRINT(Bottom, Top) \
01106 do { \
01107 if (yydebug) \
01108 yy_stack_print ((Bottom), (Top)); \
01109 } while (YYID (0))
01110
01111
01112
01113
01114
01115
01116 #if (defined __STDC__ || defined __C99__FUNC__ \
01117 || defined __cplusplus || defined _MSC_VER)
01118 static void
01119 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, OSResult *osresult, OSrLParserData *parserData)
01120 #else
01121 static void
01122 yy_reduce_print (yyvsp, yylsp, yyrule, osresult, parserData)
01123 YYSTYPE *yyvsp;
01124 YYLTYPE *yylsp;
01125 int yyrule;
01126 OSResult *osresult;
01127 OSrLParserData *parserData;
01128 #endif
01129 {
01130 int yynrhs = yyr2[yyrule];
01131 int yyi;
01132 unsigned long int yylno = yyrline[yyrule];
01133 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
01134 yyrule - 1, yylno);
01135
01136 for (yyi = 0; yyi < yynrhs; yyi++)
01137 {
01138 fprintf (stderr, " $%d = ", yyi + 1);
01139 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
01140 &(yyvsp[(yyi + 1) - (yynrhs)])
01141 , &(yylsp[(yyi + 1) - (yynrhs)]) , osresult, parserData);
01142 fprintf (stderr, "\n");
01143 }
01144 }
01145
01146 # define YY_REDUCE_PRINT(Rule) \
01147 do { \
01148 if (yydebug) \
01149 yy_reduce_print (yyvsp, yylsp, Rule, osresult, parserData); \
01150 } while (YYID (0))
01151
01152
01153
01154 int yydebug;
01155 #else
01156 # define YYDPRINTF(Args)
01157 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
01158 # define YY_STACK_PRINT(Bottom, Top)
01159 # define YY_REDUCE_PRINT(Rule)
01160 #endif
01161
01162
01163
01164 #ifndef YYINITDEPTH
01165 # define YYINITDEPTH 200
01166 #endif
01167
01168
01169
01170
01171
01172
01173
01174
01175 #ifndef YYMAXDEPTH
01176 # define YYMAXDEPTH 10000
01177 #endif
01178
01179
01180
01181 #if YYERROR_VERBOSE
01182
01183 # ifndef yystrlen
01184 # if defined __GLIBC__ && defined _STRING_H
01185 # define yystrlen strlen
01186 # else
01187
01188 #if (defined __STDC__ || defined __C99__FUNC__ \
01189 || defined __cplusplus || defined _MSC_VER)
01190 static YYSIZE_T
01191 yystrlen (const char *yystr)
01192 #else
01193 static YYSIZE_T
01194 yystrlen (yystr)
01195 const char *yystr;
01196 #endif
01197 {
01198 YYSIZE_T yylen;
01199 for (yylen = 0; yystr[yylen]; yylen++)
01200 continue;
01201 return yylen;
01202 }
01203 # endif
01204 # endif
01205
01206 # ifndef yystpcpy
01207 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
01208 # define yystpcpy stpcpy
01209 # else
01210
01211
01212 #if (defined __STDC__ || defined __C99__FUNC__ \
01213 || defined __cplusplus || defined _MSC_VER)
01214 static char *
01215 yystpcpy (char *yydest, const char *yysrc)
01216 #else
01217 static char *
01218 yystpcpy (yydest, yysrc)
01219 char *yydest;
01220 const char *yysrc;
01221 #endif
01222 {
01223 char *yyd = yydest;
01224 const char *yys = yysrc;
01225
01226 while ((*yyd++ = *yys++) != '\0')
01227 continue;
01228
01229 return yyd - 1;
01230 }
01231 # endif
01232 # endif
01233
01234 # ifndef yytnamerr
01235
01236
01237
01238
01239
01240
01241
01242 static YYSIZE_T
01243 yytnamerr (char *yyres, const char *yystr)
01244 {
01245 if (*yystr == '"')
01246 {
01247 YYSIZE_T yyn = 0;
01248 char const *yyp = yystr;
01249
01250 for (;;)
01251 switch (*++yyp)
01252 {
01253 case '\'':
01254 case ',':
01255 goto do_not_strip_quotes;
01256
01257 case '\\':
01258 if (*++yyp != '\\')
01259 goto do_not_strip_quotes;
01260
01261 default:
01262 if (yyres)
01263 yyres[yyn] = *yyp;
01264 yyn++;
01265 break;
01266
01267 case '"':
01268 if (yyres)
01269 yyres[yyn] = '\0';
01270 return yyn;
01271 }
01272 do_not_strip_quotes: ;
01273 }
01274
01275 if (! yyres)
01276 return yystrlen (yystr);
01277
01278 return yystpcpy (yyres, yystr) - yyres;
01279 }
01280 # endif
01281
01282
01283
01284
01285
01286
01287
01288
01289 static YYSIZE_T
01290 yysyntax_error (char *yyresult, int yystate, int yychar)
01291 {
01292 int yyn = yypact[yystate];
01293
01294 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
01295 return 0;
01296 else
01297 {
01298 int yytype = YYTRANSLATE (yychar);
01299 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
01300 YYSIZE_T yysize = yysize0;
01301 YYSIZE_T yysize1;
01302 int yysize_overflow = 0;
01303 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
01304 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
01305 int yyx;
01306
01307 # if 0
01308
01309
01310 YY_("syntax error, unexpected %s");
01311 YY_("syntax error, unexpected %s, expecting %s");
01312 YY_("syntax error, unexpected %s, expecting %s or %s");
01313 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
01314 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
01315 # endif
01316 char *yyfmt;
01317 char const *yyf;
01318 static char const yyunexpected[] = "syntax error, unexpected %s";
01319 static char const yyexpecting[] = ", expecting %s";
01320 static char const yyor[] = " or %s";
01321 char yyformat[sizeof yyunexpected
01322 + sizeof yyexpecting - 1
01323 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
01324 * (sizeof yyor - 1))];
01325 char const *yyprefix = yyexpecting;
01326
01327
01328
01329 int yyxbegin = yyn < 0 ? -yyn : 0;
01330
01331
01332 int yychecklim = YYLAST - yyn + 1;
01333 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
01334 int yycount = 1;
01335
01336 yyarg[0] = yytname[yytype];
01337 yyfmt = yystpcpy (yyformat, yyunexpected);
01338
01339 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01340 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01341 {
01342 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01343 {
01344 yycount = 1;
01345 yysize = yysize0;
01346 yyformat[sizeof yyunexpected - 1] = '\0';
01347 break;
01348 }
01349 yyarg[yycount++] = yytname[yyx];
01350 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01351 yysize_overflow |= (yysize1 < yysize);
01352 yysize = yysize1;
01353 yyfmt = yystpcpy (yyfmt, yyprefix);
01354 yyprefix = yyor;
01355 }
01356
01357 yyf = YY_(yyformat);
01358 yysize1 = yysize + yystrlen (yyf);
01359 yysize_overflow |= (yysize1 < yysize);
01360 yysize = yysize1;
01361
01362 if (yysize_overflow)
01363 return YYSIZE_MAXIMUM;
01364
01365 if (yyresult)
01366 {
01367
01368
01369
01370 char *yyp = yyresult;
01371 int yyi = 0;
01372 while ((*yyp = *yyf) != '\0')
01373 {
01374 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01375 {
01376 yyp += yytnamerr (yyp, yyarg[yyi++]);
01377 yyf += 2;
01378 }
01379 else
01380 {
01381 yyp++;
01382 yyf++;
01383 }
01384 }
01385 }
01386 return yysize;
01387 }
01388 }
01389 #endif
01390
01391
01392
01393
01394
01395
01396
01397 #if (defined __STDC__ || defined __C99__FUNC__ \
01398 || defined __cplusplus || defined _MSC_VER)
01399 static void
01400 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, OSResult *osresult, OSrLParserData *parserData)
01401 #else
01402 static void
01403 yydestruct (yymsg, yytype, yyvaluep, yylocationp, osresult, parserData)
01404 const char *yymsg;
01405 int yytype;
01406 YYSTYPE *yyvaluep;
01407 YYLTYPE *yylocationp;
01408 OSResult *osresult;
01409 OSrLParserData *parserData;
01410 #endif
01411 {
01412 YYUSE (yyvaluep);
01413 YYUSE (yylocationp);
01414 YYUSE (osresult);
01415 YYUSE (parserData);
01416
01417 if (!yymsg)
01418 yymsg = "Deleting";
01419 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01420
01421 switch (yytype)
01422 {
01423
01424 default:
01425 break;
01426 }
01427 }
01428
01429
01430
01431
01432 #ifdef YYPARSE_PARAM
01433 #if defined __STDC__ || defined __cplusplus
01434 int yyparse (void *YYPARSE_PARAM);
01435 #else
01436 int yyparse ();
01437 #endif
01438 #else
01439 #if defined __STDC__ || defined __cplusplus
01440 int yyparse (OSResult *osresult, OSrLParserData *parserData);
01441 #else
01442 int yyparse ();
01443 #endif
01444 #endif
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454
01455 #ifdef YYPARSE_PARAM
01456 #if (defined __STDC__ || defined __C99__FUNC__ \
01457 || defined __cplusplus || defined _MSC_VER)
01458 int
01459 yyparse (void *YYPARSE_PARAM)
01460 #else
01461 int
01462 yyparse (YYPARSE_PARAM)
01463 void *YYPARSE_PARAM;
01464 #endif
01465 #else
01466 #if (defined __STDC__ || defined __C99__FUNC__ \
01467 || defined __cplusplus || defined _MSC_VER)
01468 int
01469 yyparse (OSResult *osresult, OSrLParserData *parserData)
01470 #else
01471 int
01472 yyparse (osresult, parserData)
01473 OSResult *osresult;
01474 OSrLParserData *parserData;
01475 #endif
01476 #endif
01477 {
01478
01479 int yychar;
01480
01481
01482 YYSTYPE yylval;
01483
01484
01485 int yynerrs;
01486
01487 YYLTYPE yylloc;
01488
01489 int yystate;
01490 int yyn;
01491 int yyresult;
01492
01493 int yyerrstatus;
01494
01495 int yytoken = 0;
01496 #if YYERROR_VERBOSE
01497
01498 char yymsgbuf[128];
01499 char *yymsg = yymsgbuf;
01500 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01501 #endif
01502
01503
01504
01505
01506
01507
01508
01509
01510
01511
01512 yytype_int16 yyssa[YYINITDEPTH];
01513 yytype_int16 *yyss = yyssa;
01514 yytype_int16 *yyssp;
01515
01516
01517 YYSTYPE yyvsa[YYINITDEPTH];
01518 YYSTYPE *yyvs = yyvsa;
01519 YYSTYPE *yyvsp;
01520
01521
01522 YYLTYPE yylsa[YYINITDEPTH];
01523 YYLTYPE *yyls = yylsa;
01524 YYLTYPE *yylsp;
01525
01526 YYLTYPE yyerror_range[2];
01527
01528 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
01529
01530 YYSIZE_T yystacksize = YYINITDEPTH;
01531
01532
01533
01534 YYSTYPE yyval;
01535 YYLTYPE yyloc;
01536
01537
01538
01539 int yylen = 0;
01540
01541 YYDPRINTF ((stderr, "Starting parse\n"));
01542
01543 yystate = 0;
01544 yyerrstatus = 0;
01545 yynerrs = 0;
01546 yychar = YYEMPTY;
01547
01548
01549
01550
01551
01552
01553 yyssp = yyss;
01554 yyvsp = yyvs;
01555 yylsp = yyls;
01556 #if YYLTYPE_IS_TRIVIAL
01557
01558 yylloc.first_line = yylloc.last_line = 1;
01559 yylloc.first_column = yylloc.last_column = 0;
01560 #endif
01561
01562 goto yysetstate;
01563
01564
01565
01566
01567 yynewstate:
01568
01569
01570 yyssp++;
01571
01572 yysetstate:
01573 *yyssp = yystate;
01574
01575 if (yyss + yystacksize - 1 <= yyssp)
01576 {
01577
01578 YYSIZE_T yysize = yyssp - yyss + 1;
01579
01580 #ifdef yyoverflow
01581 {
01582
01583
01584
01585 YYSTYPE *yyvs1 = yyvs;
01586 yytype_int16 *yyss1 = yyss;
01587 YYLTYPE *yyls1 = yyls;
01588
01589
01590
01591
01592
01593 yyoverflow (YY_("memory exhausted"),
01594 &yyss1, yysize * sizeof (*yyssp),
01595 &yyvs1, yysize * sizeof (*yyvsp),
01596 &yyls1, yysize * sizeof (*yylsp),
01597 &yystacksize);
01598 yyls = yyls1;
01599 yyss = yyss1;
01600 yyvs = yyvs1;
01601 }
01602 #else
01603 # ifndef YYSTACK_RELOCATE
01604 goto yyexhaustedlab;
01605 # else
01606
01607 if (YYMAXDEPTH <= yystacksize)
01608 goto yyexhaustedlab;
01609 yystacksize *= 2;
01610 if (YYMAXDEPTH < yystacksize)
01611 yystacksize = YYMAXDEPTH;
01612
01613 {
01614 yytype_int16 *yyss1 = yyss;
01615 union yyalloc *yyptr =
01616 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01617 if (! yyptr)
01618 goto yyexhaustedlab;
01619 YYSTACK_RELOCATE (yyss);
01620 YYSTACK_RELOCATE (yyvs);
01621 YYSTACK_RELOCATE (yyls);
01622 # undef YYSTACK_RELOCATE
01623 if (yyss1 != yyssa)
01624 YYSTACK_FREE (yyss1);
01625 }
01626 # endif
01627 #endif
01628
01629 yyssp = yyss + yysize - 1;
01630 yyvsp = yyvs + yysize - 1;
01631 yylsp = yyls + yysize - 1;
01632
01633 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01634 (unsigned long int) yystacksize));
01635
01636 if (yyss + yystacksize - 1 <= yyssp)
01637 YYABORT;
01638 }
01639
01640 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01641
01642 goto yybackup;
01643
01644
01645
01646
01647 yybackup:
01648
01649
01650
01651
01652
01653 yyn = yypact[yystate];
01654 if (yyn == YYPACT_NINF)
01655 goto yydefault;
01656
01657
01658
01659
01660 if (yychar == YYEMPTY)
01661 {
01662 YYDPRINTF ((stderr, "Reading a token: "));
01663 yychar = YYLEX;
01664 }
01665
01666 if (yychar <= YYEOF)
01667 {
01668 yychar = yytoken = YYEOF;
01669 YYDPRINTF ((stderr, "Now at end of input.\n"));
01670 }
01671 else
01672 {
01673 yytoken = YYTRANSLATE (yychar);
01674 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01675 }
01676
01677
01678
01679 yyn += yytoken;
01680 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01681 goto yydefault;
01682 yyn = yytable[yyn];
01683 if (yyn <= 0)
01684 {
01685 if (yyn == 0 || yyn == YYTABLE_NINF)
01686 goto yyerrlab;
01687 yyn = -yyn;
01688 goto yyreduce;
01689 }
01690
01691 if (yyn == YYFINAL)
01692 YYACCEPT;
01693
01694
01695
01696 if (yyerrstatus)
01697 yyerrstatus--;
01698
01699
01700 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01701
01702
01703 if (yychar != YYEOF)
01704 yychar = YYEMPTY;
01705
01706 yystate = yyn;
01707 *++yyvsp = yylval;
01708 *++yylsp = yylloc;
01709 goto yynewstate;
01710
01711
01712
01713
01714
01715 yydefault:
01716 yyn = yydefact[yystate];
01717 if (yyn == 0)
01718 goto yyerrlab;
01719 goto yyreduce;
01720
01721
01722
01723
01724
01725 yyreduce:
01726
01727 yylen = yyr2[yyn];
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737 yyval = yyvsp[1-yylen];
01738
01739
01740 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01741 YY_REDUCE_PRINT (yyn);
01742 switch (yyn)
01743 {
01744 case 2:
01745
01746 {
01747 if(parserData->numberOfSolutions > 0){
01748 for(int solIdx = 0; solIdx < parserData->numberOfSolutions; solIdx++){
01749 osresult->setSolutionStatus(solIdx, parserData->statusType, parserData->statusDescription);
01750 osresult->setPrimalVariableValues(solIdx, parserData->primalSolution[ solIdx]);
01751 osresult->setNumberOfOtherVariableResult(solIdx, parserData->numberOfOtherVariableResult);
01752 for(int k = 0; k < parserData->numberOfOtherVariableResult; k++){
01753 osresult->setAnOtherVariableResult(solIdx, k, parserData->otherVarVec[ k]->name, parserData->otherVarVec[ k]->description, parserData->otherVarVec[ k]->otherVarText);
01754 }
01755 osresult->setDualVariableValues(solIdx, parserData->dualSolution[ solIdx]);
01756 osresult->setObjectiveValues(solIdx, parserData->objectiveValues[ solIdx]);
01757 osresult->setSolutionObjectiveIndex(solIdx, *(parserData->objectiveIdx + solIdx));
01758 }
01759 }
01760 }
01761 break;
01762
01763 case 7:
01764
01765 {if(parserData->generalStatusTypePresent == false) osrlerror(NULL, NULL, NULL, "a type attribute required for generalStatus element");}
01766 break;
01767
01768 case 8:
01769
01770 {if(parserData->generalStatusTypePresent == false) osrlerror(NULL, NULL, NULL, "a type attribute required for generalStatus element"); parserData->generalStatusTypePresent = false;}
01771 break;
01772
01773 case 11:
01774
01775 { osresult->setGeneralStatusType((yyvsp[(2) - (3)].charval)); parserData->generalStatusTypePresent = true;}
01776 break;
01777
01778 case 12:
01779
01780 { osresult->setGeneralStatusDescription((yyvsp[(2) - (3)].charval)); }
01781 break;
01782
01783 case 15:
01784
01785 {osresult->setServiceURI( (yyvsp[(2) - (3)].charval));}
01786 break;
01787
01788 case 19:
01789
01790 {osresult->setServiceName( (yyvsp[(2) - (3)].charval));}
01791 break;
01792
01793 case 23:
01794
01795 {osresult->setInstanceName( (yyvsp[(2) - (3)].charval)) ;}
01796 break;
01797
01798 case 27:
01799
01800 {osresult->setJobID( (yyvsp[(2) - (3)].charval));}
01801 break;
01802
01803 case 31:
01804
01805 {osresult->setGeneralMessage( (yyvsp[(2) - (3)].charval));}
01806 break;
01807
01808 case 40:
01809
01810 {
01811
01812 if(parserData->numberOfSolutions > 0){
01813 parserData->primalSolution = new double* [parserData->numberOfSolutions];
01814 parserData->dualSolution = new double*[ parserData->numberOfSolutions];
01815 parserData->objectiveValues = new double*[ parserData->numberOfSolutions];
01816 parserData->objectiveIdx = new int[ parserData->numberOfSolutions];
01817 if( parserData->numberOfVariables > 0){
01818 for(int i = 0; i < parserData->numberOfSolutions; i++){
01819 parserData->primalSolution[ i] = new double[ parserData->numberOfVariables];
01820 }
01821 }
01822 if( parserData->numberOfConstraints > 0){
01823 for(int i = 0; i < parserData->numberOfSolutions; i++){
01824 parserData->dualSolution[ i] = new double[ parserData->numberOfConstraints];
01825 }
01826 }
01827 if( parserData->numberOfObjectives > 0){
01828 for(int i = 0; i < parserData->numberOfSolutions; i++){
01829 parserData->objectiveValues[ i] = new double[ parserData->numberOfObjectives];
01830 }
01831 }
01832 }
01833 }
01834 break;
01835
01836 case 50:
01837
01838 {parserData->numberOfSolutions = (yyvsp[(2) - (2)].ival); osresult->setSolutionNumber((yyvsp[(2) - (2)].ival));}
01839 break;
01840
01841 case 51:
01842
01843 {parserData->numberOfVariables = (yyvsp[(2) - (2)].ival); osresult->setVariableNumber((yyvsp[(2) - (2)].ival)); }
01844 break;
01845
01846 case 52:
01847
01848 {parserData->numberOfConstraints = (yyvsp[(2) - (2)].ival); osresult->setConstraintNumber((yyvsp[(2) - (2)].ival));}
01849 break;
01850
01851 case 53:
01852
01853 {parserData->numberOfObjectives = (yyvsp[(2) - (2)].ival); osresult->setObjectiveNumber((yyvsp[(2) - (2)].ival));}
01854 break;
01855
01856 case 57:
01857
01858 {parserData->solutionIdx++;}
01859 break;
01860
01861 case 59:
01862
01863 {if((yyvsp[(2) - (3)].ival) >= 0) osrlerror(NULL, NULL, NULL, "objective index must be nonpositive");
01864 *(parserData->objectiveIdx + parserData->solutionIdx) = (yyvsp[(2) - (3)].ival);}
01865 break;
01866
01867 case 60:
01868
01869 {if(parserData->statusTypePresent == false) osrlerror(NULL, NULL, NULL, "a type attribute required for status element"); osresult->setSolutionStatus(parserData->solutionIdx, parserData->statusType, parserData->statusDescription);}
01870 break;
01871
01872 case 61:
01873
01874 {if(parserData->statusTypePresent == false) osrlerror(NULL, NULL, NULL, "a type attribute required for status element"); parserData->statusTypePresent = false; osresult->setSolutionStatus(parserData->solutionIdx, parserData->statusType, parserData->statusDescription);}
01875 break;
01876
01877 case 64:
01878
01879 {parserData->statusType = (yyvsp[(2) - (3)].charval); parserData->statusTypePresent = true;}
01880 break;
01881
01882 case 65:
01883
01884 {parserData->statusDescription = (yyvsp[(2) - (3)].charval);}
01885 break;
01886
01887 case 73:
01888
01889 {
01890 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfVariables - 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of variables");
01891 *(parserData->primalSolution[parserData->solutionIdx] + parserData->kounter ) = (yyvsp[(4) - (5)].dval);
01892 }
01893 break;
01894
01895 case 74:
01896
01897 {
01898 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfVariables - 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of variables");
01899 *(parserData->primalSolution[parserData->solutionIdx] + parserData->kounter) = (yyvsp[(4) - (5)].ival);
01900 }
01901 break;
01902
01903 case 77:
01904
01905 {
01906 parserData->numberOfOtherVariableResult++;
01907 parserData->otherVarStruct = new OtherVariableResultStruct();
01908 parserData->otherVarStruct->otherVarText = new std::string[parserData->numberOfVariables];}
01909 break;
01910
01911 case 78:
01912
01913 {if(parserData->otherNamePresent == false) osrlerror(NULL, NULL, NULL, "other element requires name attribute");
01914 parserData->otherNamePresent = false;
01915 }
01916 break;
01917
01918 case 79:
01919
01920 {parserData->otherVarVec.push_back( parserData->otherVarStruct);}
01921 break;
01922
01923 case 82:
01924
01925 {
01926 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfVariables - 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of variables");
01927 parserData->otherVarStruct->otherVarText[parserData->kounter] = (yyvsp[(4) - (5)].charval);
01928 }
01929 break;
01930
01931 case 83:
01932
01933 {
01934 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfVariables - 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of variables");
01935 std::ostringstream outStr;
01936 outStr << (yyvsp[(4) - (5)].dval);
01937 parserData->otherVarStruct->otherVarText[parserData->kounter] = outStr.str();
01938 }
01939 break;
01940
01941 case 84:
01942
01943 {
01944 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfVariables - 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of variables");
01945 std::ostringstream outStr;
01946 outStr << (yyvsp[(4) - (5)].ival);
01947 parserData->otherVarStruct->otherVarText[parserData->kounter] = outStr.str();
01948 }
01949 break;
01950
01951 case 87:
01952
01953 { parserData->otherNamePresent = true; parserData->otherVarStruct->name = (yyvsp[(2) - (3)].charval);}
01954 break;
01955
01956 case 88:
01957
01958 { parserData->otherVarStruct->description = (yyvsp[(2) - (3)].charval);}
01959 break;
01960
01961 case 93:
01962
01963 { *(parserData->objectiveValues[parserData->solutionIdx] + (parserData->kounter + parserData->numberOfObjectives)) = (yyvsp[(4) - (5)].dval);
01964 }
01965 break;
01966
01967 case 94:
01968
01969 { *(parserData->objectiveValues[parserData->solutionIdx] + (parserData->kounter + parserData->numberOfObjectives)) = (yyvsp[(4) - (5)].ival);}
01970 break;
01971
01972 case 99:
01973
01974 {
01975 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfConstraints- 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of constraints");
01976 *(parserData->dualSolution[parserData->solutionIdx] + parserData->kounter) = (yyvsp[(4) - (5)].dval);}
01977 break;
01978
01979 case 100:
01980
01981 {
01982 if(parserData->kounter < 0 || parserData->kounter > parserData->numberOfConstraints- 1) osrlerror(NULL, NULL, NULL, "index must be greater than 0 and less than the number of constraints");
01983 *(parserData->dualSolution[parserData->solutionIdx] + parserData->kounter) = (yyvsp[(4) - (5)].ival);}
01984 break;
01985
01986 case 101:
01987
01988 {parserData->kounter = (yyvsp[(2) - (3)].ival);}
01989 break;
01990
01991
01992
01993
01994 default: break;
01995 }
01996 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01997
01998 YYPOPSTACK (yylen);
01999 yylen = 0;
02000 YY_STACK_PRINT (yyss, yyssp);
02001
02002 *++yyvsp = yyval;
02003 *++yylsp = yyloc;
02004
02005
02006
02007
02008
02009 yyn = yyr1[yyn];
02010
02011 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
02012 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
02013 yystate = yytable[yystate];
02014 else
02015 yystate = yydefgoto[yyn - YYNTOKENS];
02016
02017 goto yynewstate;
02018
02019
02020
02021
02022
02023 yyerrlab:
02024
02025 if (!yyerrstatus)
02026 {
02027 ++yynerrs;
02028 #if ! YYERROR_VERBOSE
02029 yyerror (&yylloc, osresult, parserData, YY_("syntax error"));
02030 #else
02031 {
02032 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
02033 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
02034 {
02035 YYSIZE_T yyalloc = 2 * yysize;
02036 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
02037 yyalloc = YYSTACK_ALLOC_MAXIMUM;
02038 if (yymsg != yymsgbuf)
02039 YYSTACK_FREE (yymsg);
02040 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
02041 if (yymsg)
02042 yymsg_alloc = yyalloc;
02043 else
02044 {
02045 yymsg = yymsgbuf;
02046 yymsg_alloc = sizeof yymsgbuf;
02047 }
02048 }
02049
02050 if (0 < yysize && yysize <= yymsg_alloc)
02051 {
02052 (void) yysyntax_error (yymsg, yystate, yychar);
02053 yyerror (&yylloc, osresult, parserData, yymsg);
02054 }
02055 else
02056 {
02057 yyerror (&yylloc, osresult, parserData, YY_("syntax error"));
02058 if (yysize != 0)
02059 goto yyexhaustedlab;
02060 }
02061 }
02062 #endif
02063 }
02064
02065 yyerror_range[0] = yylloc;
02066
02067 if (yyerrstatus == 3)
02068 {
02069
02070
02071
02072 if (yychar <= YYEOF)
02073 {
02074
02075 if (yychar == YYEOF)
02076 YYABORT;
02077 }
02078 else
02079 {
02080 yydestruct ("Error: discarding",
02081 yytoken, &yylval, &yylloc, osresult, parserData);
02082 yychar = YYEMPTY;
02083 }
02084 }
02085
02086
02087
02088 goto yyerrlab1;
02089
02090
02091
02092
02093
02094 yyerrorlab:
02095
02096
02097
02098
02099 if ( 0)
02100 goto yyerrorlab;
02101
02102 yyerror_range[0] = yylsp[1-yylen];
02103
02104
02105 YYPOPSTACK (yylen);
02106 yylen = 0;
02107 YY_STACK_PRINT (yyss, yyssp);
02108 yystate = *yyssp;
02109 goto yyerrlab1;
02110
02111
02112
02113
02114
02115 yyerrlab1:
02116 yyerrstatus = 3;
02117
02118 for (;;)
02119 {
02120 yyn = yypact[yystate];
02121 if (yyn != YYPACT_NINF)
02122 {
02123 yyn += YYTERROR;
02124 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02125 {
02126 yyn = yytable[yyn];
02127 if (0 < yyn)
02128 break;
02129 }
02130 }
02131
02132
02133 if (yyssp == yyss)
02134 YYABORT;
02135
02136 yyerror_range[0] = *yylsp;
02137 yydestruct ("Error: popping",
02138 yystos[yystate], yyvsp, yylsp, osresult, parserData);
02139 YYPOPSTACK (1);
02140 yystate = *yyssp;
02141 YY_STACK_PRINT (yyss, yyssp);
02142 }
02143
02144 if (yyn == YYFINAL)
02145 YYACCEPT;
02146
02147 *++yyvsp = yylval;
02148
02149 yyerror_range[1] = yylloc;
02150
02151
02152 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
02153 *++yylsp = yyloc;
02154
02155
02156 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
02157
02158 yystate = yyn;
02159 goto yynewstate;
02160
02161
02162
02163
02164
02165 yyacceptlab:
02166 yyresult = 0;
02167 goto yyreturn;
02168
02169
02170
02171
02172 yyabortlab:
02173 yyresult = 1;
02174 goto yyreturn;
02175
02176 #ifndef yyoverflow
02177
02178
02179
02180 yyexhaustedlab:
02181 yyerror (&yylloc, osresult, parserData, YY_("memory exhausted"));
02182 yyresult = 2;
02183
02184 #endif
02185
02186 yyreturn:
02187 if (yychar != YYEOF && yychar != YYEMPTY)
02188 yydestruct ("Cleanup: discarding lookahead",
02189 yytoken, &yylval, &yylloc, osresult, parserData);
02190
02191
02192 YYPOPSTACK (yylen);
02193 YY_STACK_PRINT (yyss, yyssp);
02194 while (yyssp != yyss)
02195 {
02196 yydestruct ("Cleanup: popping",
02197 yystos[*yyssp], yyvsp, yylsp, osresult, parserData);
02198 YYPOPSTACK (1);
02199 }
02200 #ifndef yyoverflow
02201 if (yyss != yyssa)
02202 YYSTACK_FREE (yyss);
02203 #endif
02204 #if YYERROR_VERBOSE
02205 if (yymsg != yymsgbuf)
02206 YYSTACK_FREE (yymsg);
02207 #endif
02208
02209 return YYID (yyresult);
02210 }
02211
02212
02213
02214
02215
02216 void osrlerror(YYLTYPE* mytype, OSResult *osresult, OSrLParserData* parserData, const char* errormsg )
02217 {
02218 std::ostringstream outStr;
02219 std::string error = errormsg;
02220 error = "Input is either not valid or well formed: " + error;
02221 outStr << error << std::endl;
02222 outStr << "See line number: " << osrlget_lineno( scanner) << std::endl;
02223 outStr << "The offending text is: " << osrlget_text ( scanner ) << std::endl;
02224 error = outStr.str();
02225 throw ErrorClass( error);
02226 }
02227
02228 OSResult *yygetOSResult(std::string parsestring){
02229 try{
02230 OSResult* osresult = NULL;
02231 osresult = new OSResult();
02232 OSrLParserData *parserData = NULL;
02233 parserData = new OSrLParserData();
02234
02235 osrllex_init( &scanner);
02236 osrl_scan_string( parsestring.c_str(), scanner);
02237 osrlset_lineno (1 , scanner );
02238
02239
02240
02241 if( osrlparse( osresult, parserData) != 0) {
02242 osrllex_destroy(scanner);
02243 delete parserData;
02244 throw ErrorClass( "Error parsing the OSiL");
02245 }
02246 osrllex_destroy(scanner);
02247 delete parserData;
02248 return osresult;
02249 }
02250 catch(const ErrorClass& eclass){
02251 throw ErrorClass( eclass.errormsg);
02252 }
02253 }
02254
02255