OSParseosil.tab.cpp
Go to the documentation of this file.
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 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 
22 /* As a special exception, you may create a larger work that contains
23  part or all of the Bison parser skeleton and distribute that work
24  under terms of your choice, so long as that work isn't itself a
25  parser generator using the skeleton or a modified version thereof
26  as a parser skeleton. Alternatively, if you modify or redistribute
27  the parser skeleton itself, you may (at your option) remove this
28  special exception, which will cause the skeleton and the resulting
29  Bison output files to be licensed under the GNU General Public
30  License without this special exception.
31 
32  This special exception was added by the Free Software Foundation in
33  version 2.2 of Bison. */
34 
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36  simplifying the original so-called "semantic" parser. */
37 
38 /* All symbols defined below should begin with yy or YY, to avoid
39  infringing on user name space. This should be done even for local
40  variables, as they might otherwise be expanded by user macros.
41  There are some unavoidable exceptions within include files to
42  define necessary library symbols; they are noted "INFRINGES ON
43  USER NAME SPACE" below. */
44 
45 /* Identify Bison output. */
46 #define YYBISON 1
47 
48 /* Bison version. */
49 #define YYBISON_VERSION "2.4.1"
50 
51 /* Skeleton name. */
52 #define YYSKELETON_NAME "yacc.c"
53 
54 /* Pure parsers. */
55 #define YYPURE 1
56 
57 /* Push parsers. */
58 #define YYPUSH 0
59 
60 /* Pull parsers. */
61 #define YYPULL 1
62 
63 /* Using locations. */
64 #define YYLSP_NEEDED 1
65 
66 /* Substitute the variable and function names. */
67 #define yyparse osilparse
68 #define yylex osillex
69 #define yyerror osilerror
70 #define yylval osillval
71 #define yychar osilchar
72 #define yydebug osildebug
73 #define yynerrs osilnerrs
74 #define yylloc osillloc
75 
76 /* Copy the first part of user declarations. */
77 
78 
79 
80 #include <string>
81 #include <iostream>
82 #include <sstream>
83 #include <algorithm>
84 
85 #include "OSInstance.h"
86 #include "OSGeneral.h"
87 #include "OSnLNode.h"
88 #include "OSErrorClass.h"
89 #include "OSParameters.h"
90 #include "OSiLParserData.h"
91 #include "OSgLParserData.h"
92 #include "OSnLParserData.h"
93 #include "OSBase64.h"
94 #include "OSMathUtil.h"
95 #include "OSConfig.h"
96 
97 #define OSINSTANCE_AVAILABLE
98 
99 //#define CHECK_PARSE_TIME
100 
101 //#define DEBUG
102 
103 #ifdef DEBUG
104 #define YYDEBUG 1
105 #endif
106 
107 #ifdef HAVE_CTIME
108 # include <ctime>
109 #else
110 # ifdef HAVE_TIME_H
111 # include <time.h>
112 # else
113 # error "don't have header file for time"
114 # endif
115 #endif
116 
117 #ifdef HAVE_CSTRING
118 # include <cstring>
119 #else
120 # ifdef HAVE_STRING_H
121 # include <string.h>
122 # else
123 # error "don't have header file for string"
124 # endif
125 #endif
126 
127 #ifdef HAVE_CSTDIO
128 # include <cstdio>
129 #else
130 # ifdef HAVE_STDIO_H
131 # include <stdio.h>
132 # else
133 # error "don't have header file for stdio"
134 # endif
135 #endif
136 
137 using std::cout;
138 using std::endl;
139 using std::ostringstream;
140 
141 
143 YY_BUFFER_STATE osil_scan_string (const char *yy_str , void* yyscanner );
144 int osillex_init(void** ptr_yy_globals);
145 int osillex_destroy (void* yyscanner );
146 void osilset_extra (OSiLParserData* parserData , void* yyscanner );
147 int osilget_lineno( void* yyscanner);
148 char *osilget_text (void* yyscanner );
149 void osilset_lineno (int line_number , void* yyscanner );
154 
155 //
156 
157 double atofmod1(int* osillineno, const char *ch1, const char *ch2 );
158 int atoimod1(int* osillineno, const char *ch1, const char *ch2);
159 // we distinguish a newline from other whitespace
160 // so that we can report proper line numbers in case of error
161 void osilerror_wrapper( const char* ch, int* osillineno, const char* errormsg);
162 bool isnewline(char c, int* osillineno);
163 bool parseVariables(const char **pchar, OSInstance *osinstance, int* osillineno);
164 bool parseObjectives(const char **pchar, OSInstance *osinstance, int* osillineno);
165 bool parseObjCoef(const char **pchar, int objcount, OSInstance *osinstance, int* osillineno);
166 bool parseConstraints(const char **pchar, OSInstance *osinstance, int* osillineno);
167 bool parseLinearConstraintCoefficients(const char **pchar, OSInstance *osinstance, int* osillineno);
168 bool parseStart(const char **pchar, OSInstance *osinstance, int* osillineno);
169 bool parseRowIdx(const char **pchar, OSInstance *osinstance, int* osillineno);
170 bool parseColIdx(const char **pchar, OSInstance *osinstance, int* osillineno);
171 bool parseValue(const char **pchar, OSInstance *osinstance, int* osillineno);
172 bool parseInstanceHeader(const char **pchar, OSInstance *osinstance, int* osillineno);
173 bool parseInstanceData( const char **pchar, OSInstance *osinstance, int* osillineno);
174 char *parseBase64( const char **p, int *dataSize, int* osillineno);
175 
176 #define ISWHITESPACE( char_) ((char_) == ' ' || \
177  (char_) == '\t' || (char_) == '\r')
178 
179 #define ISDIGIT(_c) ((_c) >= '0' && (_c) <= '9')
180 
181 #define GETATTRIBUTETEXT \
182  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
183  if( *ch != '=') { osilerror_wrapper( ch, osillineno, "found an attribute not defined"); return false;} \
184  ch++; \
185  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
186  if(*ch == '\"'){ \
187  ch++; \
188  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
189  *p = ch; \
190  for( ; *ch != '\"'; ch++); \
191  }\
192  else{\
193  if(*ch == '\'') { \
194  ch++; \
195  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
196  *p = ch; \
197  for( ; *ch != '\''; ch++); \
198  } \
199  else { osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return false;} \
200  }\
201  numChar = ch - *p; \
202  attText = new char[numChar + 1]; \
203  for(ki = 0; ki < numChar; ki++) attText[ki] = *((*p)++); \
204  attText[ki] = '\0'; \
205  attTextEnd = &attText[ki];
206 
207 #define GAIL printf("GAIL ANN HONDA\n")
208 
209 
210 
211 #define ECHOCHECK \
212  GAIL; \
213  printf("%c", ch[-2]); \
214  printf("%c", ch[-1]); \
215  printf("%c", ch[0]); \
216  printf("%c", ch[1]); \
217  printf("%c", ch[2]); \
218  printf("%c", ch[3]); \
219  printf("%c", ch[4]); \
220  printf("%c", ch[5]); \
221  printf("%c \n", ch[6]); \
222  GAIL;
223 
224 
225 
226 /* Enabling traces. */
227 #ifndef YYDEBUG
228 # define YYDEBUG 0
229 #endif
230 
231 /* Enabling verbose error messages. */
232 #ifdef YYERROR_VERBOSE
233 # undef YYERROR_VERBOSE
234 # define YYERROR_VERBOSE 1
235 #else
236 # define YYERROR_VERBOSE 1
237 #endif
238 
239 /* Enabling the token table. */
240 #ifndef YYTOKEN_TABLE
241 # define YYTOKEN_TABLE 0
242 #endif
243 
244 
245 /* Tokens. */
246 #ifndef YYTOKENTYPE
247 # define YYTOKENTYPE
248  /* Put the tokens into the symbol table, so that GDB and other debuggers
249  know about them. */
250  enum yytokentype {
252  ELEMENTTEXT = 259,
253  ITEMTEXT = 260,
254  INTEGER = 261,
255  DOUBLE = 262,
256  QUOTE = 263,
257  TWOQUOTES = 264,
259  GREATERTHAN = 266,
265  IDXONEATT = 272,
266  IDXTWOATT = 273,
267  HORIZONATT = 274,
268  STARTATT = 275,
269  STARTIDXATT = 276,
287  OSILEND = 294,
292  QTERMSTART = 299,
293  QTERMEND = 300,
294  CONESSTART = 301,
295  CONESEND = 302,
315  DUALCONEEND = 322,
321  FACTORSEND = 328,
326  STAGESSTART = 333,
327  STAGESEND = 334,
328  STAGESTART = 335,
329  STAGEEND = 336,
331  INTERVALEND = 338,
332  HEADERSTART = 339,
333  HEADEREND = 340,
335  FILENAMEEND = 342,
355  INDEXESEND = 362,
356  VALUESSTART = 363,
357  VALUESEND = 364,
359  NONZEROSEND = 366,
360  ELSTART = 367,
361  ELEND = 368,
364  ITEMEMPTY = 371,
365  ITEMSTART = 372,
366  ITEMEND = 373,
368  BASE64START = 375,
369  BASE64END = 376,
374  CATEGORYATT = 381,
378  SOLVERATT = 385,
380  NAMEATT = 387,
382  TYPEATT = 389,
384  ENUMTYPEATT = 391,
386  SHAPEATT = 393,
388  UNITATT = 395,
390  VALUEATT = 397,
394  CONTYPEATT = 401,
396  OBJTYPEATT = 403,
398  VARTYPEATT = 405,
408  SYMMETRYATT = 415,
410  ROWMAJORATT = 417,
443  IDXATT = 450,
444  INCRATT = 451,
445  MULTATT = 452,
446  SIZEOFATT = 453,
447  COEFATT = 454,
448  CONSTANTATT = 455,
450  MATRICESEND = 457,
451  MATRIXSTART = 458,
452  MATRIXEND = 459,
455  BLOCKSSTART = 462,
456  BLOCKSEND = 463,
457  BLOCKSTART = 464,
458  BLOCKEND = 465,
464  ELEMENTSEND = 471,
481  INDEXSTART = 488,
482  INDEXEND = 489,
483  VALUESTART = 490,
484  VALUEEND = 491,
485  VARIDXSTART = 492,
486  VARIDXEND = 493,
503  CONSTART = 510,
504  CONEND = 511,
507  OBJSTART = 514,
508  OBJEND = 515,
511  VARSTART = 518,
512  VAREND = 519,
516  GENERALEND = 523,
517  SYSTEMSTART = 524,
518  SYSTEMEND = 525,
520  SERVICEEND = 527,
521  JOBSTART = 528,
522  JOBEND = 529,
528  ATLOWEREND = 535,
530  ATUPPEREND = 537,
531  BASICSTART = 538,
532  BASICEND = 539,
533  ISFREESTART = 540,
534  ISFREEEND = 541,
538  UNKNOWNEND = 545,
545  JOBIDSTART = 552,
546  JOBIDEND = 553,
547  OTHERSTART = 554,
548  OTHEREND = 555,
549  DUMMY = 556,
553  NLSTART = 560,
554  NLEND = 561,
558  EXPRSTART = 565,
559  EXPREND = 566,
563  POWERSTART = 570,
564  POWEREND = 571,
565  PLUSSTART = 572,
566  PLUSEND = 573,
567  MINUSSTART = 574,
568  MINUSEND = 575,
569  DIVIDESTART = 576,
570  DIVIDEEND = 577,
571  LNSTART = 578,
572  LNEND = 579,
573  SQRTSTART = 580,
574  SQRTEND = 581,
575  SUMSTART = 582,
576  SUMEND = 583,
578  PRODUCTEND = 585,
579  EXPSTART = 586,
580  EXPEND = 587,
581  NEGATESTART = 588,
582  NEGATEEND = 589,
583  IFSTART = 590,
584  IFEND = 591,
585  SQUARESTART = 592,
586  SQUAREEND = 593,
587  COSSTART = 594,
588  COSEND = 595,
589  SINSTART = 596,
590  SINEND = 597,
592  VARIABLEEND = 599,
593  ABSSTART = 600,
594  ABSEND = 601,
595  ERFSTART = 602,
596  ERFEND = 603,
597  MAXSTART = 604,
598  MAXEND = 605,
600  ALLDIFFEND = 607,
601  MINSTART = 608,
602  MINEND = 609,
603  ESTART = 610,
604  EEND = 611,
605  PISTART = 612,
606  PIEND = 613,
607  TIMESSTART = 614,
608  TIMESEND = 615,
609  NUMBERSTART = 616,
610  NUMBEREND = 617,
651  EMPTYIDATT = 658,
652  IDATT = 659
653  };
654 #endif
655 /* Tokens. */
656 #define ATTRIBUTETEXT 258
657 #define ELEMENTTEXT 259
658 #define ITEMTEXT 260
659 #define INTEGER 261
660 #define DOUBLE 262
661 #define QUOTE 263
662 #define TWOQUOTES 264
663 #define ENDOFELEMENT 265
664 #define GREATERTHAN 266
665 #define EMPTYSEMIDEFINITENESSATT 267
666 #define SEMIDEFINITENESSATT 268
667 #define NUMBEROFQTERMSATT 269
668 #define NUMBEROFCONESATT 270
669 #define NUMBEROFSTAGESATT 271
670 #define IDXONEATT 272
671 #define IDXTWOATT 273
672 #define HORIZONATT 274
673 #define STARTATT 275
674 #define STARTIDXATT 276
675 #define MATRIXIDXATT 277
676 #define LBMATRIXIDXATT 278
677 #define LBCONEIDXATT 279
678 #define UBMATRIXIDXATT 280
679 #define UBCONEIDXATT 281
680 #define TEMPLATEMATRIXIDXATT 282
681 #define REFERENCEMATRIXIDXATT 283
682 #define VARREFERENCEMATRIXIDXATT 284
683 #define OBJREFERENCEMATRIXIDXATT 285
684 #define CONREFERENCEMATRIXIDXATT 286
685 #define ORDERCONEIDXATT 287
686 #define CONSTANTMATRIXIDXATT 288
687 #define NORMSCALEFACTORATT 289
688 #define DISTORTIONMATRIXIDXATT 290
689 #define AXISDIRECTIONATT 291
690 #define FIRSTAXISDIRECTIONATT 292
691 #define SECONDAXISDIRECTIONATT 293
692 #define OSILEND 294
693 #define INSTANCEDATAEND 295
694 #define INSTANCEDATASTARTEND 296
695 #define QUADRATICCOEFFICIENTSSTART 297
696 #define QUADRATICCOEFFICIENTSEND 298
697 #define QTERMSTART 299
698 #define QTERMEND 300
699 #define CONESSTART 301
700 #define CONESEND 302
701 #define NONNEGATIVECONESTART 303
702 #define NONNEGATIVECONEEND 304
703 #define NONPOSITIVECONESTART 305
704 #define NONPOSITIVECONEEND 306
705 #define ORTHANTCONESTART 307
706 #define ORTHANTCONEEND 308
707 #define POLYHEDRALCONESTART 309
708 #define POLYHEDRALCONEEND 310
709 #define QUADRATICCONESTART 311
710 #define QUADRATICCONEEND 312
711 #define ROTATEDQUADRATICCONESTART 313
712 #define ROTATEDQUADRATICCONEEND 314
713 #define SEMIDEFINITECONESTART 315
714 #define SEMIDEFINITECONEEND 316
715 #define PRODUCTCONESTART 317
716 #define PRODUCTCONEEND 318
717 #define INTERSECTIONCONESTART 319
718 #define INTERSECTIONCONEEND 320
719 #define DUALCONESTART 321
720 #define DUALCONEEND 322
721 #define POLARCONESTART 323
722 #define POLARCONEEND 324
723 #define DIRECTIONSTART 325
724 #define DIRECTIONEND 326
725 #define FACTORSSTART 327
726 #define FACTORSEND 328
727 #define COMPONENTSSTART 329
728 #define COMPONENTSEND 330
729 #define TIMEDOMAINSTART 331
730 #define TIMEDOMAINEND 332
731 #define STAGESSTART 333
732 #define STAGESEND 334
733 #define STAGESTART 335
734 #define STAGEEND 336
735 #define INTERVALSTART 337
736 #define INTERVALEND 338
737 #define HEADERSTART 339
738 #define HEADEREND 340
739 #define FILENAMESTART 341
740 #define FILENAMEEND 342
741 #define FILENAMEEMPTY 343
742 #define FILENAMESTARTANDEND 344
743 #define FILESOURCESTART 345
744 #define FILESOURCEEND 346
745 #define FILESOURCEEMPTY 347
746 #define FILESOURCESTARTANDEND 348
747 #define FILEDESCRIPTIONSTART 349
748 #define FILEDESCRIPTIONEND 350
749 #define FILEDESCRIPTIONEMPTY 351
750 #define FILEDESCRIPTIONSTARTANDEND 352
751 #define FILECREATORSTART 353
752 #define FILECREATOREND 354
753 #define FILECREATOREMPTY 355
754 #define FILECREATORSTARTANDEND 356
755 #define FILELICENCESTART 357
756 #define FILELICENCEEND 358
757 #define FILELICENCEEMPTY 359
758 #define FILELICENCESTARTANDEND 360
759 #define INDEXESSTART 361
760 #define INDEXESEND 362
761 #define VALUESSTART 363
762 #define VALUESEND 364
763 #define NONZEROSSTART 365
764 #define NONZEROSEND 366
765 #define ELSTART 367
766 #define ELEND 368
767 #define ENUMERATIONSTART 369
768 #define ENUMERATIONEND 370
769 #define ITEMEMPTY 371
770 #define ITEMSTART 372
771 #define ITEMEND 373
772 #define ITEMSTARTANDEND 374
773 #define BASE64START 375
774 #define BASE64END 376
775 #define NUMBEROFELATT 377
776 #define NUMBEROFENUMERATIONSATT 378
777 #define NUMBEROFITEMSATT 379
778 #define EMPTYCATEGORYATT 380
779 #define CATEGORYATT 381
780 #define EMPTYDESCRIPTIONATT 382
781 #define DESCRIPTIONATT 383
782 #define EMPTYSOLVERATT 384
783 #define SOLVERATT 385
784 #define EMPTYNAMEATT 386
785 #define NAMEATT 387
786 #define EMPTYTYPEATT 388
787 #define TYPEATT 389
788 #define EMPTYENUMTYPEATT 390
789 #define ENUMTYPEATT 391
790 #define EMPTYSHAPEATT 392
791 #define SHAPEATT 393
792 #define EMPTYUNITATT 394
793 #define UNITATT 395
794 #define EMPTYVALUEATT 396
795 #define VALUEATT 397
796 #define EMPTYVALUETYPEATT 398
797 #define VALUETYPEATT 399
798 #define EMPTYCONTYPEATT 400
799 #define CONTYPEATT 401
800 #define EMPTYOBJTYPEATT 402
801 #define OBJTYPEATT 403
802 #define EMPTYVARTYPEATT 404
803 #define VARTYPEATT 405
804 #define EMPTYMATRIXCONTYPEATT 406
805 #define MATRIXCONTYPEATT 407
806 #define EMPTYMATRIXOBJTYPEATT 408
807 #define MATRIXOBJTYPEATT 409
808 #define EMPTYMATRIXVARTYPEATT 410
809 #define MATRIXVARTYPEATT 411
810 #define EMPTYMATRIXTYPEATT 412
811 #define MATRIXTYPEATT 413
812 #define EMPTYSYMMETRYATT 414
813 #define SYMMETRYATT 415
814 #define EMPTYROWMAJORATT 416
815 #define ROWMAJORATT 417
816 #define EMPTYBASETRANSPOSEATT 418
817 #define BASETRANSPOSEATT 419
818 #define NUMBEROFBLOCKSATT 420
819 #define NUMBEROFCOLUMNSATT 421
820 #define NUMBEROFROWSATT 422
821 #define NUMBEROFMATRICESATT 423
822 #define NUMBEROFVALUESATT 424
823 #define NUMBEROFCONSTRAINTSATT 425
824 #define NUMBEROFCONATT 426
825 #define NUMBEROFCONIDXATT 427
826 #define NUMBEROFOBJECTIVESATT 428
827 #define NUMBEROFOBJATT 429
828 #define NUMBEROFOBJIDXATT 430
829 #define NUMBEROFVARIABLESATT 431
830 #define NUMBEROFVARATT 432
831 #define NUMBEROFVARIDXATT 433
832 #define NUMBEROFMATRIXCONATT 434
833 #define NUMBEROFMATRIXOBJATT 435
834 #define NUMBEROFMATRIXVARATT 436
835 #define BASEMATRIXIDXATT 437
836 #define TARGETMATRIXFIRSTROWATT 438
837 #define TARGETMATRIXFIRSTCOLATT 439
838 #define BASEMATRIXSTARTROWATT 440
839 #define BASEMATRIXSTARTCOLATT 441
840 #define BASEMATRIXENDROWATT 442
841 #define BASEMATRIXENDCOLATT 443
842 #define SCALARMULTIPLIERATT 444
843 #define BLOCKROWIDXATT 445
844 #define BLOCKCOLIDXATT 446
845 #define MATRIXVARIDXATT 447
846 #define MATRIXOBJIDXATT 448
847 #define MATRIXCONIDXATT 449
848 #define IDXATT 450
849 #define INCRATT 451
850 #define MULTATT 452
851 #define SIZEOFATT 453
852 #define COEFATT 454
853 #define CONSTANTATT 455
854 #define MATRICESSTART 456
855 #define MATRICESEND 457
856 #define MATRIXSTART 458
857 #define MATRIXEND 459
858 #define BASEMATRIXEND 460
859 #define BASEMATRIXSTART 461
860 #define BLOCKSSTART 462
861 #define BLOCKSEND 463
862 #define BLOCKSTART 464
863 #define BLOCKEND 465
864 #define COLOFFSETSTART 466
865 #define COLOFFSETEND 467
866 #define ROWOFFSETSTART 468
867 #define ROWOFFSETEND 469
868 #define ELEMENTSSTART 470
869 #define ELEMENTSEND 471
870 #define CONSTANTELEMENTSSTART 472
871 #define CONSTANTELEMENTSEND 473
872 #define VARREFERENCEELEMENTSSTART 474
873 #define VARREFERENCEELEMENTSEND 475
874 #define LINEARELEMENTSSTART 476
875 #define LINEARELEMENTSEND 477
876 #define GENERALELEMENTSSTART 478
877 #define GENERALELEMENTSEND 479
878 #define CONREFERENCEELEMENTSSTART 480
879 #define CONREFERENCEELEMENTSEND 481
880 #define OBJREFERENCEELEMENTSSTART 482
881 #define OBJREFERENCEELEMENTSEND 483
882 #define STRINGVALUEDELEMENTSSTART 484
883 #define STRINGVALUEDELEMENTSEND 485
884 #define STARTVECTORSTART 486
885 #define STARTVECTOREND 487
886 #define INDEXSTART 488
887 #define INDEXEND 489
888 #define VALUESTART 490
889 #define VALUEEND 491
890 #define VARIDXSTART 492
891 #define VARIDXEND 493
892 #define TRANSFORMATIONSTART 494
893 #define TRANSFORMATIONEND 495
894 #define MATRIXPROGRAMMINGSTART 496
895 #define MATRIXPROGRAMMINGEND 497
896 #define MATRIXVARIABLESSTART 498
897 #define MATRIXVARIABLESEND 499
898 #define MATRIXVARSTART 500
899 #define MATRIXVAREND 501
900 #define MATRIXOBJECTIVESSTART 502
901 #define MATRIXOBJECTIVESEND 503
902 #define MATRIXOBJSTART 504
903 #define MATRIXOBJEND 505
904 #define MATRIXCONSTRAINTSSTART 506
905 #define MATRIXCONSTRAINTSEND 507
906 #define MATRIXCONSTART 508
907 #define MATRIXCONEND 509
908 #define CONSTART 510
909 #define CONEND 511
910 #define CONSTRAINTSSTART 512
911 #define CONSTRAINTSEND 513
912 #define OBJSTART 514
913 #define OBJEND 515
914 #define OBJECTIVESSTART 516
915 #define OBJECTIVESEND 517
916 #define VARSTART 518
917 #define VAREND 519
918 #define VARIABLESSTART 520
919 #define VARIABLESEND 521
920 #define GENERALSTART 522
921 #define GENERALEND 523
922 #define SYSTEMSTART 524
923 #define SYSTEMEND 525
924 #define SERVICESTART 526
925 #define SERVICEEND 527
926 #define JOBSTART 528
927 #define JOBEND 529
928 #define OPTIMIZATIONSTART 530
929 #define OPTIMIZATIONEND 531
930 #define ATEQUALITYSTART 532
931 #define ATEQUALITYEND 533
932 #define ATLOWERSTART 534
933 #define ATLOWEREND 535
934 #define ATUPPERSTART 536
935 #define ATUPPEREND 537
936 #define BASICSTART 538
937 #define BASICEND 539
938 #define ISFREESTART 540
939 #define ISFREEEND 541
940 #define SUPERBASICSTART 542
941 #define SUPERBASICEND 543
942 #define UNKNOWNSTART 544
943 #define UNKNOWNEND 545
944 #define SERVICEURISTART 546
945 #define SERVICEURIEND 547
946 #define SERVICENAMESTART 548
947 #define SERVICENAMEEND 549
948 #define INSTANCENAMESTART 550
949 #define INSTANCENAMEEND 551
950 #define JOBIDSTART 552
951 #define JOBIDEND 553
952 #define OTHERSTART 554
953 #define OTHEREND 555
954 #define DUMMY 556
955 #define NONLINEAREXPRESSIONSSTART 557
956 #define NONLINEAREXPRESSIONSEND 558
957 #define NUMBEROFNONLINEAREXPRESSIONS 559
958 #define NLSTART 560
959 #define NLEND 561
960 #define MATRIXEXPRESSIONSSTART 562
961 #define MATRIXEXPRESSIONSEND 563
962 #define NUMBEROFEXPR 564
963 #define EXPRSTART 565
964 #define EXPREND 566
965 #define NUMBEROFMATRIXTERMSATT 567
966 #define MATRIXTERMSTART 568
967 #define MATRIXTERMEND 569
968 #define POWERSTART 570
969 #define POWEREND 571
970 #define PLUSSTART 572
971 #define PLUSEND 573
972 #define MINUSSTART 574
973 #define MINUSEND 575
974 #define DIVIDESTART 576
975 #define DIVIDEEND 577
976 #define LNSTART 578
977 #define LNEND 579
978 #define SQRTSTART 580
979 #define SQRTEND 581
980 #define SUMSTART 582
981 #define SUMEND 583
982 #define PRODUCTSTART 584
983 #define PRODUCTEND 585
984 #define EXPSTART 586
985 #define EXPEND 587
986 #define NEGATESTART 588
987 #define NEGATEEND 589
988 #define IFSTART 590
989 #define IFEND 591
990 #define SQUARESTART 592
991 #define SQUAREEND 593
992 #define COSSTART 594
993 #define COSEND 595
994 #define SINSTART 596
995 #define SINEND 597
996 #define VARIABLESTART 598
997 #define VARIABLEEND 599
998 #define ABSSTART 600
999 #define ABSEND 601
1000 #define ERFSTART 602
1001 #define ERFEND 603
1002 #define MAXSTART 604
1003 #define MAXEND 605
1004 #define ALLDIFFSTART 606
1005 #define ALLDIFFEND 607
1006 #define MINSTART 608
1007 #define MINEND 609
1008 #define ESTART 610
1009 #define EEND 611
1010 #define PISTART 612
1011 #define PIEND 613
1012 #define TIMESSTART 614
1013 #define TIMESEND 615
1014 #define NUMBERSTART 616
1015 #define NUMBEREND 617
1016 #define MATRIXDETERMINANTSTART 618
1017 #define MATRIXDETERMINANTEND 619
1018 #define MATRIXTRACESTART 620
1019 #define MATRIXTRACEEND 621
1020 #define MATRIXTOSCALARSTART 622
1021 #define MATRIXTOSCALAREND 623
1022 #define MATRIXDIAGONALSTART 624
1023 #define MATRIXDIAGONALEND 625
1024 #define MATRIXDOTTIMESSTART 626
1025 #define MATRIXDOTTIMESEND 627
1026 #define MATRIXLOWERTRIANGLESTART 628
1027 #define MATRIXLOWERTRIANGLEEND 629
1028 #define MATRIXUPPERTRIANGLESTART 630
1029 #define MATRIXUPPERTRIANGLEEND 631
1030 #define MATRIXMERGESTART 632
1031 #define MATRIXMERGEEND 633
1032 #define MATRIXMINUSSTART 634
1033 #define MATRIXMINUSEND 635
1034 #define MATRIXNEGATESTART 636
1035 #define MATRIXNEGATEEND 637
1036 #define MATRIXPLUSSTART 638
1037 #define MATRIXPLUSEND 639
1038 #define MATRIXTIMESSTART 640
1039 #define MATRIXTIMESEND 641
1040 #define MATRIXPRODUCTSTART 642
1041 #define MATRIXPRODUCTEND 643
1042 #define MATRIXSCALARTIMESSTART 644
1043 #define MATRIXSCALARTIMESEND 645
1044 #define MATRIXSUBMATRIXATSTART 646
1045 #define MATRIXSUBMATRIXATEND 647
1046 #define MATRIXTRANSPOSESTART 648
1047 #define MATRIXTRANSPOSEEND 649
1048 #define MATRIXREFERENCESTART 650
1049 #define MATRIXREFERENCEEND 651
1050 #define IDENTITYMATRIXSTART 652
1051 #define IDENTITYMATRIXEND 653
1052 #define MATRIXINVERSESTART 654
1053 #define MATRIXINVERSEEND 655
1054 #define EMPTYINCLUDEDIAGONALATT 656
1055 #define INCLUDEDIAGONALATT 657
1056 #define EMPTYIDATT 658
1057 #define IDATT 659
1058 
1059 
1060 
1061 
1062 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1063 typedef union YYSTYPE
1064 {
1065 
1066 
1067  double dval;
1068  int ival;
1069  char* sval;
1070 
1071 
1072 
1073 
1074 } YYSTYPE;
1075 # define YYSTYPE_IS_TRIVIAL 1
1076 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1077 # define YYSTYPE_IS_DECLARED 1
1078 #endif
1079 
1080 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1081 typedef struct YYLTYPE
1082 {
1087 } YYLTYPE;
1088 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
1089 # define YYLTYPE_IS_DECLARED 1
1090 # define YYLTYPE_IS_TRIVIAL 1
1091 #endif
1092 
1093 
1094 /* Copy the second part of user declarations. */
1095 
1096 
1097 int osillex(YYSTYPE* lvalp, YYLTYPE* llocp, void* scanner );
1100 
1101 #define scanner parserData->scanner
1102 
1103 
1104 
1105 #ifdef short
1106 # undef short
1107 #endif
1108 
1109 #ifdef YYTYPE_UINT8
1110 typedef YYTYPE_UINT8 yytype_uint8;
1111 #else
1112 typedef unsigned char yytype_uint8;
1113 #endif
1114 
1115 #ifdef YYTYPE_INT8
1116 typedef YYTYPE_INT8 yytype_int8;
1117 #elif (defined __STDC__ || defined __C99__FUNC__ \
1118  || defined __cplusplus || defined _MSC_VER)
1119 typedef signed char yytype_int8;
1120 #else
1121 typedef short int yytype_int8;
1122 #endif
1123 
1124 #ifdef YYTYPE_UINT16
1125 typedef YYTYPE_UINT16 yytype_uint16;
1126 #else
1127 typedef unsigned short int yytype_uint16;
1128 #endif
1129 
1130 #ifdef YYTYPE_INT16
1131 typedef YYTYPE_INT16 yytype_int16;
1132 #else
1133 typedef short int yytype_int16;
1134 #endif
1135 
1136 #ifndef YYSIZE_T
1137 # ifdef __SIZE_TYPE__
1138 # define YYSIZE_T __SIZE_TYPE__
1139 # elif defined size_t
1140 # define YYSIZE_T size_t
1141 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1142  || defined __cplusplus || defined _MSC_VER)
1143 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1144 # define YYSIZE_T size_t
1145 # else
1146 # define YYSIZE_T unsigned int
1147 # endif
1148 #endif
1149 
1150 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1151 
1152 #ifndef YY_
1153 # if YYENABLE_NLS
1154 # if ENABLE_NLS
1155 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1156 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1157 # endif
1158 # endif
1159 # ifndef YY_
1160 # define YY_(msgid) msgid
1161 # endif
1162 #endif
1163 
1164 /* Suppress unused-variable warnings by "using" E. */
1165 #if ! defined lint || defined __GNUC__
1166 # define YYUSE(e) ((void) (e))
1167 #else
1168 # define YYUSE(e) /* empty */
1169 #endif
1170 
1171 /* Identity function, used to suppress warnings about constant conditions. */
1172 #ifndef lint
1173 # define YYID(n) (n)
1174 #else
1175 #if (defined __STDC__ || defined __C99__FUNC__ \
1176  || defined __cplusplus || defined _MSC_VER)
1177 static int
1178 YYID (int yyi)
1179 #else
1180 static int
1181 YYID (yyi)
1182  int yyi;
1183 #endif
1184 {
1185  return yyi;
1186 }
1187 #endif
1188 
1189 #if ! defined yyoverflow || YYERROR_VERBOSE
1190 
1191 /* The parser invokes alloca or malloc; define the necessary symbols. */
1192 
1193 # ifdef YYSTACK_USE_ALLOCA
1194 # if YYSTACK_USE_ALLOCA
1195 # ifdef __GNUC__
1196 # define YYSTACK_ALLOC __builtin_alloca
1197 # elif defined __BUILTIN_VA_ARG_INCR
1198 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1199 # elif defined _AIX
1200 # define YYSTACK_ALLOC __alloca
1201 # elif defined _MSC_VER
1202 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1203 # define alloca _alloca
1204 # else
1205 # define YYSTACK_ALLOC alloca
1206 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1207  || defined __cplusplus || defined _MSC_VER)
1208 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1209 # ifndef _STDLIB_H
1210 # define _STDLIB_H 1
1211 # endif
1212 # endif
1213 # endif
1214 # endif
1215 # endif
1216 
1217 # ifdef YYSTACK_ALLOC
1218  /* Pacify GCC's `empty if-body' warning. */
1219 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1220 # ifndef YYSTACK_ALLOC_MAXIMUM
1221  /* The OS might guarantee only one guard page at the bottom of the stack,
1222  and a page size can be as small as 4096 bytes. So we cannot safely
1223  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1224  to allow for a few compiler-allocated temporary stack slots. */
1225 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1226 # endif
1227 # else
1228 # define YYSTACK_ALLOC YYMALLOC
1229 # define YYSTACK_FREE YYFREE
1230 # ifndef YYSTACK_ALLOC_MAXIMUM
1231 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1232 # endif
1233 # if (defined __cplusplus && ! defined _STDLIB_H \
1234  && ! ((defined YYMALLOC || defined malloc) \
1235  && (defined YYFREE || defined free)))
1236 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1237 # ifndef _STDLIB_H
1238 # define _STDLIB_H 1
1239 # endif
1240 # endif
1241 # ifndef YYMALLOC
1242 # define YYMALLOC malloc
1243 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1244  || defined __cplusplus || defined _MSC_VER)
1245 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1246 # endif
1247 # endif
1248 # ifndef YYFREE
1249 # define YYFREE free
1250 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1251  || defined __cplusplus || defined _MSC_VER)
1252 void free (void *); /* INFRINGES ON USER NAME SPACE */
1253 # endif
1254 # endif
1255 # endif
1256 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1257 
1258 
1259 #if (! defined yyoverflow \
1260  && (! defined __cplusplus \
1261  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1262  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1263 
1264 /* A type that is properly aligned for any stack member. */
1265 union yyalloc
1266 {
1267  yytype_int16 yyss_alloc;
1270 };
1271 
1272 /* The size of the maximum gap between one aligned stack and the next. */
1273 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1274 
1275 /* The size of an array large to enough to hold all stacks, each with
1276  N elements. */
1277 # define YYSTACK_BYTES(N) \
1278  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1279  + 2 * YYSTACK_GAP_MAXIMUM)
1280 
1281 /* Copy COUNT objects from FROM to TO. The source and destination do
1282  not overlap. */
1283 # ifndef YYCOPY
1284 # if defined __GNUC__ && 1 < __GNUC__
1285 # define YYCOPY(To, From, Count) \
1286  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1287 # else
1288 # define YYCOPY(To, From, Count) \
1289  do \
1290  { \
1291  YYSIZE_T yyi; \
1292  for (yyi = 0; yyi < (Count); yyi++) \
1293  (To)[yyi] = (From)[yyi]; \
1294  } \
1295  while (YYID (0))
1296 # endif
1297 # endif
1298 
1299 /* Relocate STACK from its old location to the new one. The
1300  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1301  elements in the stack, and YYPTR gives the new location of the
1302  stack. Advance YYPTR to a properly aligned location for the next
1303  stack. */
1304 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1305  do \
1306  { \
1307  YYSIZE_T yynewbytes; \
1308  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1309  Stack = &yyptr->Stack_alloc; \
1310  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1311  yyptr += yynewbytes / sizeof (*yyptr); \
1312  } \
1313  while (YYID (0))
1314 
1315 #endif
1316 
1317 /* YYFINAL -- State number of the termination state. */
1318 #define YYFINAL 5
1319 /* YYLAST -- Last index in YYTABLE. */
1320 #define YYLAST 1213
1321 
1322 /* YYNTOKENS -- Number of terminals. */
1323 #define YYNTOKENS 409
1324 /* YYNNTS -- Number of nonterminals. */
1325 #define YYNNTS 640
1326 /* YYNRULES -- Number of rules. */
1327 #define YYNRULES 965
1328 /* YYNRULES -- Number of states. */
1329 #define YYNSTATES 1498
1330 
1331 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1332 #define YYUNDEFTOK 2
1333 #define YYMAXUTOK 659
1334 
1335 #define YYTRANSLATE(YYX) \
1336  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1337 
1338 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1339 static const yytype_uint16 yytranslate[] =
1340 {
1341  0, 2, 2, 2, 2, 2, 2, 2, 2, 406,
1342  408, 2, 2, 407, 2, 2, 2, 2, 2, 2,
1343  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1344  2, 2, 405, 2, 2, 2, 2, 2, 2, 2,
1345  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1346  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1347  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1348  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1349  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1350  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1351  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1352  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1353  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1354  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1355  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1356  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1357  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1358  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1359  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1360  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1361  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1362  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1363  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1364  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1365  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1366  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1367  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1368  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1369  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1370  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1371  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1372  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1373  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1374  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1375  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1376  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1377  105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1378  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1379  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1380  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1381  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1382  155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1383  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1384  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1385  185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
1386  195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
1387  205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
1388  215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
1389  225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
1390  235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
1391  245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
1392  255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1393  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1394  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1395  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1396  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1397  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1398  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1399  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1400  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1401  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1402  355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1403  365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1404  375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1405  385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1406  395, 396, 397, 398, 399, 400, 401, 402, 403, 404
1407 };
1408 
1409 #if YYDEBUG
1410 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1411  YYRHS. */
1412 static const yytype_uint16 yyprhs[] =
1413 {
1414  0, 0, 3, 12, 14, 16, 18, 20, 21, 22,
1415  27, 29, 35, 36, 39, 43, 45, 47, 50, 51,
1416  54, 56, 58, 60, 62, 67, 72, 77, 82, 83,
1417  87, 89, 91, 93, 95, 97, 101, 102, 105, 106,
1418  110, 112, 114, 116, 118, 120, 124, 125, 128, 130,
1419  132, 134, 136, 138, 140, 142, 144, 146, 150, 152,
1420  154, 155, 158, 160, 162, 164, 166, 169, 173, 175,
1421  177, 178, 181, 183, 185, 187, 189, 192, 196, 198,
1422  200, 201, 204, 206, 208, 210, 212, 216, 218, 219,
1423  222, 226, 228, 230, 231, 234, 236, 238, 240, 243,
1424  245, 249, 251, 253, 254, 257, 259, 261, 263, 265,
1425  270, 272, 275, 279, 281, 283, 284, 287, 289, 291,
1426  293, 295, 297, 299, 301, 304, 308, 310, 312, 313,
1427  316, 318, 320, 322, 324, 326, 328, 330, 332, 335,
1428  339, 341, 343, 344, 347, 349, 351, 353, 355, 357,
1429  360, 364, 366, 368, 369, 372, 374, 376, 378, 382,
1430  386, 388, 390, 392, 394, 396, 400, 402, 404, 406,
1431  410, 412, 414, 415, 418, 420, 422, 424, 428, 432,
1432  434, 436, 438, 440, 442, 446, 448, 450, 452, 453,
1433  456, 458, 460, 462, 464, 471, 472, 476, 478, 480,
1434  482, 484, 486, 490, 492, 493, 496, 500, 502, 504,
1435  505, 508, 510, 512, 514, 516, 518, 520, 522, 524,
1436  526, 528, 530, 532, 535, 536, 540, 542, 544, 546,
1437  548, 550, 554, 556, 557, 560, 564, 566, 568, 569,
1438  572, 574, 576, 578, 580, 582, 584, 586, 588, 590,
1439  593, 594, 598, 600, 602, 604, 606, 608, 612, 614,
1440  615, 618, 622, 624, 626, 627, 630, 632, 634, 636,
1441  638, 640, 642, 644, 646, 648, 650, 653, 654, 657,
1442  659, 661, 663, 665, 668, 672, 676, 681, 683, 689,
1443  691, 694, 695, 700, 701, 705, 707, 711, 715, 716,
1444  720, 721, 724, 726, 728, 733, 738, 740, 744, 746,
1445  749, 751, 754, 755, 760, 765, 767, 770, 771, 775,
1446  776, 779, 781, 783, 788, 793, 795, 799, 801, 804,
1447  806, 809, 810, 815, 820, 822, 825, 826, 830, 831,
1448  834, 836, 838, 843, 845, 849, 851, 854, 856, 859,
1449  860, 865, 870, 872, 875, 876, 881, 883, 886, 887,
1450  890, 892, 894, 899, 904, 909, 914, 919, 924, 929,
1451  934, 939, 944, 949, 954, 959, 963, 968, 973, 978,
1452  983, 988, 993, 998, 1003, 1008, 1013, 1018, 1022, 1026,
1453  1029, 1030, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1046,
1454  1049, 1053, 1055, 1057, 1058, 1061, 1063, 1065, 1069, 1073,
1455  1075, 1077, 1080, 1082, 1086, 1088, 1090, 1091, 1094, 1098,
1456  1100, 1101, 1103, 1107, 1111, 1113, 1115, 1118, 1120, 1124,
1457  1128, 1130, 1132, 1133, 1136, 1138, 1140, 1142, 1144, 1146,
1458  1148, 1150, 1152, 1154, 1156, 1158, 1162, 1165, 1166, 1170,
1459  1172, 1174, 1175, 1178, 1180, 1182, 1184, 1186, 1188, 1190,
1460  1192, 1194, 1196, 1199, 1201, 1202, 1205, 1207, 1209, 1211,
1461  1213, 1215, 1217, 1219, 1221, 1226, 1228, 1230, 1231, 1234,
1462  1236, 1238, 1242, 1243, 1246, 1249, 1251, 1253, 1255, 1257,
1463  1261, 1263, 1266, 1268, 1270, 1272, 1274, 1278, 1280, 1283,
1464  1285, 1287, 1289, 1291, 1295, 1297, 1302, 1304, 1306, 1307,
1465  1310, 1312, 1314, 1318, 1319, 1322, 1325, 1327, 1329, 1331,
1466  1333, 1337, 1339, 1344, 1346, 1348, 1349, 1352, 1354, 1356,
1467  1360, 1361, 1364, 1365, 1368, 1370, 1372, 1374, 1376, 1380,
1468  1382, 1383, 1386, 1390, 1392, 1394, 1395, 1398, 1400, 1402,
1469  1404, 1406, 1408, 1412, 1413, 1416, 1420, 1422, 1423, 1425,
1470  1429, 1434, 1436, 1438, 1439, 1442, 1444, 1446, 1450, 1451,
1471  1454, 1455, 1458, 1460, 1462, 1464, 1466, 1470, 1471, 1474,
1472  1477, 1479, 1481, 1483, 1485, 1489, 1494, 1496, 1498, 1499,
1473  1502, 1504, 1506, 1510, 1511, 1514, 1517, 1519, 1521, 1523,
1474  1525, 1529, 1531, 1536, 1538, 1540, 1541, 1544, 1546, 1548,
1475  1552, 1553, 1556, 1557, 1560, 1562, 1564, 1566, 1568, 1572,
1476  1573, 1576, 1580, 1582, 1583, 1586, 1588, 1590, 1592, 1596,
1477  1602, 1604, 1605, 1607, 1609, 1613, 1615, 1617, 1623, 1625,
1478  1629, 1631, 1633, 1635, 1637, 1639, 1643, 1645, 1649, 1651,
1479  1653, 1655, 1657, 1659, 1663, 1665, 1666, 1669, 1673, 1675,
1480  1677, 1678, 1681, 1683, 1685, 1687, 1689, 1691, 1693, 1695,
1481  1699, 1702, 1707, 1712, 1717, 1722, 1727, 1732, 1737, 1742,
1482  1747, 1752, 1757, 1762, 1767, 1772, 1777, 1782, 1787, 1792,
1483  1797, 1802, 1807, 1812, 1814, 1816, 1818, 1822, 1824, 1826,
1484  1828, 1832, 1834, 1836, 1838, 1842, 1844, 1846, 1848, 1852,
1485  1854, 1856, 1858, 1862, 1864, 1866, 1868, 1872, 1874, 1876,
1486  1878, 1882, 1884, 1886, 1888, 1892, 1894, 1896, 1898, 1902,
1487  1903, 1908, 1910, 1916, 1917, 1920, 1926, 1928, 1930, 1931,
1488  1934, 1936, 1938, 1940, 1942, 1944, 1946, 1948, 1950, 1952,
1489  1954, 1956, 1958, 1960, 1962, 1964, 1966, 1968, 1970, 1972,
1490  1974, 1976, 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992,
1491  1993, 1997, 1999, 2002, 2003, 2007, 2009, 2012, 2013, 2019,
1492  2020, 2026, 2027, 2033, 2034, 2039, 2040, 2046, 2047, 2053,
1493  2054, 2059, 2060, 2065, 2066, 2071, 2072, 2077, 2078, 2083,
1494  2084, 2089, 2093, 2095, 2097, 2098, 2103, 2104, 2111, 2112,
1495  2117, 2118, 2123, 2124, 2129, 2133, 2135, 2137, 2140, 2141,
1496  2144, 2146, 2148, 2150, 2151, 2156, 2157, 2162, 2164, 2167,
1497  2168, 2173, 2174, 2177, 2179, 2181, 2186, 2191, 2192, 2197,
1498  2198, 2201, 2202, 2207, 2208, 2211, 2212, 2217, 2218, 2221,
1499  2222, 2227, 2228, 2231, 2232, 2237, 2238, 2241, 2243, 2245,
1500  2247, 2249, 2251, 2253, 2255, 2257, 2259, 2261, 2263, 2265,
1501  2267, 2269, 2271, 2273, 2275, 2277, 2279, 2283, 2285, 2287,
1502  2290, 2295, 2299, 2301, 2303, 2306, 2311, 2315, 2317, 2319,
1503  2322, 2327, 2331, 2333, 2335, 2338, 2343, 2346, 2348, 2351,
1504  2354, 2356, 2360, 2363, 2365, 2368, 2371, 2373, 2376, 2381,
1505  2383, 2384, 2386, 2389, 2394, 2396, 2397, 2399, 2402, 2406,
1506  2409, 2411, 2413, 2416, 2419, 2421, 2425, 2428, 2430, 2433,
1507  2436, 2438, 2442, 2445, 2447, 2451, 2452, 2457, 2458, 2461,
1508  2464, 2466, 2470, 2473, 2475, 2482, 2485, 2487, 2490, 2491,
1509  2495, 2497, 2499, 2504, 2506, 2508, 2510, 2514, 2515, 2518,
1510  2524, 2526, 2528, 2529, 2532, 2534
1511 };
1512 
1513 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1514 static const yytype_int16 yyrhs[] =
1515 {
1516  410, 0, -1, 414, 889, 427, 434, 524, 571, 411,
1517  412, -1, 41, -1, 40, -1, 413, -1, 39, -1,
1518  -1, -1, 415, 416, 417, 43, -1, 42, -1, 14,
1519  8, 6, 8, 11, -1, -1, 417, 418, -1, 419,
1520  421, 420, -1, 44, -1, 10, -1, 11, 45, -1,
1521  -1, 421, 422, -1, 423, -1, 424, -1, 425, -1,
1522  426, -1, 17, 8, 6, 8, -1, 18, 8, 6,
1523  8, -1, 199, 8, 650, 8, -1, 195, 8, 6,
1524  8, -1, -1, 428, 429, 430, -1, 201, -1, 628,
1525  -1, 431, -1, 432, -1, 10, -1, 11, 433, 202,
1526  -1, -1, 433, 676, -1, -1, 435, 436, 437, -1,
1527  46, -1, 629, -1, 438, -1, 439, -1, 10, -1,
1528  11, 440, 47, -1, -1, 440, 441, -1, 442, -1,
1529  448, -1, 454, -1, 469, -1, 476, -1, 482, -1,
1530  488, -1, 494, -1, 509, -1, 443, 444, 447, -1,
1531  48, -1, 445, -1, -1, 445, 446, -1, 843, -1,
1532  841, -1, 865, -1, 10, -1, 11, 49, -1, 449,
1533  450, 453, -1, 50, -1, 451, -1, -1, 451, 452,
1534  -1, 843, -1, 841, -1, 865, -1, 10, -1, 11,
1535  51, -1, 455, 456, 459, -1, 52, -1, 457, -1,
1536  -1, 457, 458, -1, 843, -1, 841, -1, 865, -1,
1537  10, -1, 11, 460, 468, -1, 461, -1, -1, 461,
1538  462, -1, 463, 464, 467, -1, 70, -1, 465, -1,
1539  -1, 465, 466, -1, 877, -1, 858, -1, 10, -1,
1540  11, 71, -1, 53, -1, 470, 471, 475, -1, 54,
1541  -1, 472, -1, -1, 472, 473, -1, 843, -1, 841,
1542  -1, 474, -1, 865, -1, 28, 8, 6, 8, -1,
1543  10, -1, 11, 55, -1, 477, 478, 481, -1, 56,
1544  -1, 479, -1, -1, 479, 480, -1, 843, -1, 841,
1545  -1, 865, -1, 634, -1, 633, -1, 635, -1, 10,
1546  -1, 11, 57, -1, 483, 484, 487, -1, 58, -1,
1547  485, -1, -1, 485, 486, -1, 843, -1, 841, -1,
1548  865, -1, 634, -1, 633, -1, 636, -1, 637, -1,
1549  10, -1, 11, 59, -1, 489, 490, 493, -1, 60,
1550  -1, 491, -1, -1, 491, 492, -1, 843, -1, 841,
1551  -1, 865, -1, 638, -1, 10, -1, 11, 61, -1,
1552  495, 496, 499, -1, 62, -1, 497, -1, -1, 497,
1553  498, -1, 843, -1, 841, -1, 865, -1, 11, 500,
1554  508, -1, 501, 502, 503, -1, 72, -1, 842, -1,
1555  504, -1, 505, -1, 10, -1, 11, 506, 507, -1,
1556  654, -1, 73, -1, 63, -1, 510, 511, 514, -1,
1557  64, -1, 512, -1, -1, 512, 513, -1, 843, -1,
1558  841, -1, 865, -1, 11, 515, 523, -1, 516, 517,
1559  518, -1, 74, -1, 842, -1, 519, -1, 520, -1,
1560  10, -1, 11, 521, 522, -1, 654, -1, 75, -1,
1561  65, -1, -1, 525, 526, -1, 241, -1, 527, -1,
1562  528, -1, 10, -1, 11, 529, 543, 557, 1036, 242,
1563  -1, -1, 530, 531, 532, -1, 243, -1, 630, -1,
1564  533, -1, 534, -1, 10, -1, 11, 536, 535, -1,
1565  244, -1, -1, 536, 537, -1, 538, 539, 542, -1,
1566  245, -1, 540, -1, -1, 540, 541, -1, 843, -1,
1567  841, -1, 643, -1, 644, -1, 640, -1, 647, -1,
1568  641, -1, 648, -1, 865, -1, 886, -1, 858, -1,
1569  10, -1, 11, 246, -1, -1, 544, 545, 546, -1,
1570  247, -1, 631, -1, 547, -1, 548, -1, 10, -1,
1571  11, 550, 549, -1, 248, -1, -1, 550, 551, -1,
1572  552, 553, 556, -1, 249, -1, 554, -1, -1, 554,
1573  555, -1, 843, -1, 841, -1, 643, -1, 645, -1,
1574  649, -1, 642, -1, 865, -1, 858, -1, 10, -1,
1575  11, 250, -1, -1, 558, 559, 560, -1, 251, -1,
1576  632, -1, 561, -1, 562, -1, 10, -1, 11, 564,
1577  563, -1, 252, -1, -1, 564, 565, -1, 566, 567,
1578  570, -1, 253, -1, 568, -1, -1, 568, 569, -1,
1579  843, -1, 841, -1, 643, -1, 646, -1, 640, -1,
1580  647, -1, 641, -1, 648, -1, 865, -1, 10, -1,
1581  11, 254, -1, -1, 572, 573, -1, 76, -1, 574,
1582  -1, 575, -1, 10, -1, 11, 77, -1, 11, 576,
1583  77, -1, 11, 620, 77, -1, 577, 578, 579, 79,
1584  -1, 78, -1, 16, 8, 6, 8, 11, -1, 580,
1585  -1, 579, 580, -1, -1, 581, 80, 582, 583, -1,
1586  -1, 132, 3, 8, -1, 10, -1, 11, 584, 81,
1587  -1, 585, 597, 609, -1, -1, 265, 586, 590, -1,
1588  -1, 586, 587, -1, 588, -1, 589, -1, 176, 8,
1589  6, 8, -1, 21, 8, 6, 8, -1, 591, -1,
1590  11, 592, 266, -1, 10, -1, 11, 266, -1, 593,
1591  -1, 592, 593, -1, -1, 594, 263, 595, 596, -1,
1592  195, 8, 6, 8, -1, 10, -1, 11, 264, -1,
1593  -1, 257, 598, 602, -1, -1, 598, 599, -1, 600,
1594  -1, 601, -1, 170, 8, 6, 8, -1, 21, 8,
1595  6, 8, -1, 603, -1, 11, 604, 258, -1, 10,
1596  -1, 11, 258, -1, 605, -1, 604, 605, -1, -1,
1597  606, 255, 607, 608, -1, 195, 8, 6, 8, -1,
1598  10, -1, 11, 256, -1, -1, 261, 610, 613, -1,
1599  -1, 610, 611, -1, 612, -1, 625, -1, 173, 8,
1600  6, 8, -1, 614, -1, 11, 615, 262, -1, 10,
1601  -1, 11, 262, -1, 616, -1, 615, 616, -1, -1,
1602  617, 259, 618, 619, -1, 195, 8, 6, 8, -1,
1603  10, -1, 11, 260, -1, -1, 621, 82, 623, 622,
1604  -1, 10, -1, 11, 83, -1, -1, 623, 624, -1,
1605  626, -1, 627, -1, 21, 8, 6, 8, -1, 19,
1606  8, 650, 8, -1, 20, 8, 650, 8, -1, 168,
1607  8, 6, 8, -1, 15, 8, 6, 8, -1, 181,
1608  8, 6, 8, -1, 180, 8, 6, 8, -1, 179,
1609  8, 6, 8, -1, 34, 8, 650, 8, -1, 35,
1610  8, 6, 8, -1, 36, 8, 6, 8, -1, 37,
1611  8, 6, 8, -1, 38, 8, 6, 8, -1, 13,
1612  3, 8, -1, 22, 8, 6, 8, -1, 23, 8,
1613  6, 8, -1, 25, 8, 6, 8, -1, 33, 8,
1614  6, 8, -1, 27, 8, 6, 8, -1, 29, 8,
1615  6, 8, -1, 30, 8, 6, 8, -1, 31, 8,
1616  6, 8, -1, 24, 8, 6, 8, -1, 26, 8,
1617  6, 8, -1, 32, 8, 6, 8, -1, 652, 6,
1618  652, -1, 652, 7, 652, -1, 652, 8, -1, -1,
1619  652, 653, -1, 405, -1, 406, -1, 407, -1, 408,
1620  -1, 655, -1, 662, -1, -1, 655, 656, -1, 657,
1621  658, 661, -1, 112, -1, 659, -1, -1, 659, 660,
1622  -1, 858, -1, 857, -1, 11, 6, 113, -1, 120,
1623  846, 663, -1, 664, -1, 665, -1, 11, 121, -1,
1624  10, -1, 11, 4, 121, -1, 667, -1, 672, -1,
1625  -1, 667, 668, -1, 669, 670, 671, -1, 112, -1,
1626  -1, 858, -1, 11, 650, 113, -1, 120, 846, 673,
1627  -1, 674, -1, 675, -1, 11, 121, -1, 10, -1,
1628  11, 4, 121, -1, 677, 678, 681, -1, 203, -1,
1629  679, -1, -1, 679, 680, -1, 874, -1, 843, -1,
1630  841, -1, 865, -1, 877, -1, 245, -1, 249, -1,
1631  253, -1, 682, -1, 683, -1, 10, -1, 11, 684,
1632  204, -1, 685, 691, -1, -1, 686, 687, 690, -1,
1633  206, -1, 688, -1, -1, 688, 689, -1, 847, -1,
1634  860, -1, 861, -1, 848, -1, 849, -1, 850, -1,
1635  851, -1, 862, -1, 859, -1, 11, 205, -1, 10,
1636  -1, -1, 691, 692, -1, 693, -1, 718, -1, 731,
1637  -1, 758, -1, 776, -1, 789, -1, 807, -1, 811,
1638  -1, 694, 695, 11, 698, -1, 217, -1, 696, -1,
1639  -1, 696, 697, -1, 844, -1, 868, -1, 700, 699,
1640  218, -1, -1, 706, 712, -1, 701, 702, -1, 231,
1641  -1, 703, -1, 704, -1, 10, -1, 11, 705, 232,
1642  -1, 654, -1, 707, 708, -1, 233, -1, 709, -1,
1643  710, -1, 10, -1, 11, 711, 234, -1, 654, -1,
1644  713, 714, -1, 235, -1, 715, -1, 716, -1, 10,
1645  -1, 11, 717, 236, -1, 666, -1, 719, 720, 11,
1646  723, -1, 219, -1, 721, -1, -1, 721, 722, -1,
1647  844, -1, 868, -1, 700, 724, 220, -1, -1, 706,
1648  725, -1, 726, 727, -1, 235, -1, 728, -1, 729,
1649  -1, 10, -1, 11, 730, 236, -1, 654, -1, 732,
1650  733, 11, 736, -1, 221, -1, 734, -1, -1, 734,
1651  735, -1, 844, -1, 868, -1, 700, 737, 222, -1,
1652  -1, 706, 738, -1, -1, 739, 740, -1, 235, -1,
1653  741, -1, 742, -1, 10, -1, 11, 743, 236, -1,
1654  744, -1, -1, 744, 745, -1, 746, 747, 750, -1,
1655  112, -1, 748, -1, -1, 748, 749, -1, 845, -1,
1656  855, -1, 751, -1, 752, -1, 10, -1, 11, 753,
1657  113, -1, -1, 753, 754, -1, 755, 756, 757, -1,
1658  237, -1, -1, 854, -1, 11, 6, 238, -1, 759,
1659  760, 11, 763, -1, 223, -1, 761, -1, -1, 761,
1660  762, -1, 844, -1, 868, -1, 700, 764, 224, -1,
1661  -1, 706, 765, -1, -1, 766, 767, -1, 235, -1,
1662  768, -1, 769, -1, 10, -1, 11, 770, 236, -1,
1663  -1, 770, 771, -1, 772, 773, -1, 112, -1, 774,
1664  -1, 775, -1, 10, -1, 11, 898, 113, -1, 777,
1665  778, 11, 781, -1, 227, -1, 779, -1, -1, 779,
1666  780, -1, 844, -1, 868, -1, 700, 782, 228, -1,
1667  -1, 706, 783, -1, 784, 785, -1, 235, -1, 786,
1668  -1, 787, -1, 10, -1, 11, 788, 236, -1, 654,
1669  -1, 790, 791, 11, 794, -1, 225, -1, 792, -1,
1670  -1, 792, 793, -1, 844, -1, 868, -1, 700, 795,
1671  226, -1, -1, 706, 796, -1, -1, 797, 798, -1,
1672  235, -1, 799, -1, 800, -1, 10, -1, 11, 801,
1673  236, -1, -1, 801, 802, -1, 803, 804, 806, -1,
1674  112, -1, -1, 804, 805, -1, 883, -1, 858, -1,
1675  857, -1, 11, 6, 113, -1, 808, 809, 11, 972,
1676  810, -1, 239, -1, -1, 871, -1, 240, -1, 812,
1677  813, 814, -1, 207, -1, 840, -1, 11, 816, 823,
1678  830, 815, -1, 208, -1, 817, 818, 819, -1, 211,
1679  -1, 842, -1, 820, -1, 821, -1, 10, -1, 11,
1680  822, 212, -1, 654, -1, 824, 825, 826, -1, 213,
1681  -1, 842, -1, 827, -1, 828, -1, 10, -1, 11,
1682  829, 214, -1, 654, -1, -1, 830, 831, -1, 832,
1683  833, 836, -1, 209, -1, 834, -1, -1, 834, 835,
1684  -1, 852, -1, 853, -1, 874, -1, 877, -1, 837,
1685  -1, 838, -1, 10, -1, 11, 839, 210, -1, 685,
1686  691, -1, 165, 8, 6, 8, -1, 166, 8, 6,
1687  8, -1, 122, 8, 6, 8, -1, 167, 8, 6,
1688  8, -1, 169, 8, 6, 8, -1, 178, 8, 6,
1689  8, -1, 198, 8, 6, 8, -1, 182, 8, 6,
1690  8, -1, 185, 8, 6, 8, -1, 186, 8, 6,
1691  8, -1, 187, 8, 6, 8, -1, 188, 8, 6,
1692  8, -1, 190, 651, 6, 651, -1, 191, 651, 6,
1693  651, -1, 199, 8, 650, 8, -1, 200, 8, 650,
1694  8, -1, 195, 8, 6, 8, -1, 196, 8, 6,
1695  8, -1, 197, 8, 6, 8, -1, 189, 8, 650,
1696  8, -1, 183, 8, 6, 8, -1, 184, 8, 6,
1697  8, -1, 863, -1, 864, -1, 163, -1, 164, 3,
1698  651, -1, 866, -1, 867, -1, 131, -1, 132, 3,
1699  8, -1, 869, -1, 870, -1, 161, -1, 162, 3,
1700  8, -1, 872, -1, 873, -1, 137, -1, 138, 3,
1701  8, -1, 875, -1, 876, -1, 159, -1, 160, 3,
1702  8, -1, 878, -1, 879, -1, 133, -1, 134, 3,
1703  8, -1, 881, -1, 882, -1, 141, -1, 142, 3,
1704  8, -1, 884, -1, 885, -1, 143, -1, 144, 3,
1705  8, -1, 887, -1, 888, -1, 149, -1, 150, 3,
1706  8, -1, -1, 890, 891, 892, 303, -1, 302, -1,
1707  304, 8, 6, 8, 11, -1, -1, 892, 893, -1,
1708  894, 895, 11, 898, 306, -1, 305, -1, 896, -1,
1709  -1, 896, 897, -1, 856, -1, 871, -1, 942, -1,
1710  949, -1, 905, -1, 907, -1, 957, -1, 909, -1,
1711  911, -1, 913, -1, 915, -1, 969, -1, 917, -1,
1712  919, -1, 921, -1, 925, -1, 923, -1, 927, -1,
1713  934, -1, 929, -1, 932, -1, 963, -1, 966, -1,
1714  899, -1, 902, -1, 960, -1, 936, -1, 938, -1,
1715  940, -1, -1, 355, 900, 901, -1, 10, -1, 11,
1716  356, -1, -1, 357, 903, 904, -1, 10, -1, 11,
1717  358, -1, -1, 359, 906, 898, 898, 360, -1, -1,
1718  317, 908, 898, 898, 318, -1, -1, 319, 910, 898,
1719  898, 320, -1, -1, 333, 912, 898, 334, -1, -1,
1720  321, 914, 898, 898, 322, -1, -1, 315, 916, 898,
1721  898, 316, -1, -1, 323, 918, 898, 324, -1, -1,
1722  325, 920, 898, 326, -1, -1, 337, 922, 898, 338,
1723  -1, -1, 339, 924, 898, 340, -1, -1, 341, 926,
1724  898, 342, -1, -1, 331, 928, 898, 332, -1, 930,
1725  898, 931, -1, 345, -1, 346, -1, -1, 347, 933,
1726  898, 348, -1, -1, 335, 935, 898, 898, 898, 336,
1727  -1, -1, 363, 937, 972, 364, -1, -1, 365, 939,
1728  972, 366, -1, -1, 367, 941, 972, 368, -1, 943,
1729  945, 944, -1, 361, -1, 10, -1, 11, 362, -1,
1730  -1, 945, 946, -1, 877, -1, 880, -1, 947, -1,
1731  -1, 404, 3, 948, 8, -1, -1, 343, 950, 953,
1732  951, -1, 10, -1, 11, 344, -1, -1, 11, 898,
1733  952, 344, -1, -1, 953, 954, -1, 955, -1, 956,
1734  -1, 199, 8, 650, 8, -1, 195, 8, 6, 8,
1735  -1, -1, 327, 958, 959, 328, -1, -1, 959, 898,
1736  -1, -1, 351, 961, 962, 352, -1, -1, 962, 898,
1737  -1, -1, 349, 964, 965, 350, -1, -1, 965, 898,
1738  -1, -1, 353, 967, 968, 354, -1, -1, 968, 898,
1739  -1, -1, 329, 970, 971, 330, -1, -1, 971, 898,
1740  -1, 973, -1, 976, -1, 980, -1, 984, -1, 988,
1741  -1, 991, -1, 997, -1, 1000, -1, 1004, -1, 1009,
1742  -1, 1012, -1, 1015, -1, 1018, -1, 1021, -1, 1024,
1743  -1, 1027, -1, 1030, -1, 1033, -1, 994, -1, 974,
1744  639, 975, -1, 395, -1, 10, -1, 11, 396, -1,
1745  195, 8, 6, 8, -1, 977, 979, 978, -1, 245,
1746  -1, 10, -1, 11, 246, -1, 195, 8, 6, 8,
1747  -1, 981, 983, 982, -1, 249, -1, 10, -1, 11,
1748  250, -1, 195, 8, 6, 8, -1, 985, 987, 986,
1749  -1, 253, -1, 10, -1, 11, 254, -1, 195, 8,
1750  6, 8, -1, 989, 990, -1, 369, -1, 972, 370,
1751  -1, 992, 993, -1, 371, -1, 972, 972, 372, -1,
1752  995, 996, -1, 397, -1, 898, 398, -1, 998, 999,
1753  -1, 399, -1, 972, 400, -1, 1001, 1002, 11, 1003,
1754  -1, 373, -1, -1, 1008, -1, 972, 374, -1, 1005,
1755  1006, 11, 1007, -1, 375, -1, -1, 1008, -1, 972,
1756  376, -1, 402, 3, 8, -1, 1010, 1011, -1, 377,
1757  -1, 10, -1, 11, 378, -1, 1013, 1014, -1, 379,
1758  -1, 972, 972, 380, -1, 1016, 1017, -1, 381, -1,
1759  972, 382, -1, 1019, 1020, -1, 383, -1, 972, 972,
1760  384, -1, 1022, 1023, -1, 385, -1, 972, 972, 386,
1761  -1, -1, 387, 1025, 1026, 388, -1, -1, 1026, 972,
1762  -1, 1028, 1029, -1, 389, -1, 898, 972, 390, -1,
1763  1031, 1032, -1, 391, -1, 898, 898, 898, 898, 972,
1764  392, -1, 1034, 1035, -1, 393, -1, 972, 394, -1,
1765  -1, 1037, 1038, 1040, -1, 307, -1, 1039, -1, 309,
1766  8, 6, 8, -1, 1041, -1, 1042, -1, 10, -1,
1767  11, 1043, 308, -1, -1, 1043, 1044, -1, 1045, 1046,
1768  11, 972, 311, -1, 310, -1, 1047, -1, -1, 1047,
1769  1048, -1, 856, -1, 871, -1
1770 };
1771 
1772 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1773 static const yytype_uint16 yyrline[] =
1774 {
1775  0, 426, 426, 429, 430, 432, 441, 442, 445, 446,
1776  450, 455, 465, 465, 467, 480, 486, 487, 490, 491,
1777  494, 497, 500, 503, 509, 516, 523, 531, 536, 536,
1778  544, 550, 562, 562, 564, 566, 573, 573, 576, 576,
1779  582, 588, 600, 600, 602, 604, 608, 608, 616, 617,
1780  618, 619, 620, 621, 623, 630, 631, 636, 638, 647,
1781  649, 649, 652, 657, 662, 667, 667, 669, 672, 681,
1782  683, 683, 686, 691, 696, 701, 701, 704, 706, 715,
1783  725, 725, 728, 733, 738, 744, 744, 750, 752, 752,
1784  754, 756, 763, 801, 802, 804, 804, 806, 806, 808,
1785  810, 812, 821, 823, 823, 826, 831, 836, 841, 846,
1786  857, 857, 861, 863, 875, 877, 877, 880, 885, 890,
1787  894, 899, 904, 911, 911, 913, 915, 928, 930, 930,
1788  933, 938, 943, 948, 953, 958, 963, 970, 970, 974,
1789  976, 986, 988, 988, 991, 996, 1001, 1005, 1012, 1012,
1790  1026, 1028, 1037, 1039, 1039, 1042, 1047, 1052, 1057, 1059,
1791  1061, 1067, 1073, 1073, 1075, 1077, 1079, 1081, 1095, 1098,
1792  1100, 1109, 1111, 1111, 1114, 1119, 1124, 1129, 1131, 1133,
1793  1139, 1145, 1145, 1147, 1149, 1151, 1153, 1167, 1176, 1176,
1794  1178, 1183, 1183, 1185, 1188, 1190, 1190, 1197, 1202, 1212,
1795  1212, 1214, 1216, 1218, 1220, 1220, 1222, 1227, 1243, 1291,
1796  1291, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302,
1797  1303, 1304, 1307, 1308, 1310, 1310, 1316, 1321, 1331, 1331,
1798  1333, 1335, 1337, 1339, 1339, 1341, 1346, 1359, 1392, 1392,
1799  1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1405, 1406,
1800  1409, 1409, 1415, 1420, 1430, 1430, 1432, 1434, 1436, 1438,
1801  1438, 1440, 1445, 1460, 1499, 1499, 1502, 1503, 1504, 1505,
1802  1506, 1507, 1508, 1509, 1510, 1513, 1514, 1557, 1557, 1559,
1803  1561, 1561, 1563, 1564, 1567, 1568, 1571, 1622, 1624, 1638,
1804  1639, 1641, 1641, 1665, 1666, 1669, 1670, 1672, 1674, 1675,
1805  1679, 1680, 1682, 1683, 1685, 1704, 1715, 1722, 1727, 1728,
1806  1730, 1731, 1733, 1733, 1736, 1748, 1749, 1751, 1752, 1756,
1807  1757, 1759, 1760, 1762, 1781, 1792, 1799, 1804, 1805, 1807,
1808  1808, 1810, 1810, 1813, 1825, 1826, 1828, 1838, 1842, 1843,
1809  1845, 1846, 1848, 1867, 1874, 1879, 1880, 1882, 1883, 1885,
1810  1885, 1888, 1900, 1901, 1906, 1906, 1914, 1915, 1917, 1918,
1811  1920, 1924, 1930, 1941, 1946, 1961, 1972, 1983, 1991, 1999,
1812  2018, 2029, 2040, 2052, 2063, 2074, 2086, 2097, 2109, 2121,
1813  2133, 2145, 2157, 2169, 2181, 2193, 2205, 2232, 2233, 2240,
1814  2242, 2242, 2244, 2245, 2246, 2247, 2411, 2419, 2421, 2421,
1815  2423, 2425, 2434, 2436, 2436, 2438, 2438, 2440, 2456, 2459,
1816  2459, 2461, 2461, 2464, 2495, 2503, 2505, 2505, 2507, 2509,
1817  2517, 2517, 2519, 2535, 2537, 2537, 2539, 2539, 2541, 2818,
1818  2869, 2892, 2910, 2910, 2913, 2914, 2915, 2916, 2917, 2921,
1819  2979, 3037, 3096, 3096, 3098, 3100, 3140, 3142, 3142, 3147,
1820  3165, 3192, 3192, 3195, 3196, 3197, 3198, 3199, 3200, 3201,
1821  3202, 3203, 3206, 3206, 3208, 3208, 3213, 3213, 3213, 3213,
1822  3214, 3214, 3214, 3214, 3216, 3218, 3227, 3233, 3233, 3236,
1823  3242, 3248, 3250, 3250, 3256, 3266, 3276, 3276, 3278, 3280,
1824  3282, 3285, 3296, 3303, 3303, 3305, 3307, 3309, 3315, 3325,
1825  3332, 3332, 3334, 3336, 3338, 3341, 3343, 3352, 3358, 3358,
1826  3361, 3367, 3373, 3375, 3375, 3377, 3387, 3394, 3394, 3396,
1827  3398, 3400, 3402, 3404, 3413, 3419, 3419, 3422, 3428, 3434,
1828  3436, 3436, 3439, 3444, 3455, 3470, 3470, 3472, 3474, 3476,
1829  3478, 3478, 3480, 3487, 3494, 3507, 3507, 3510, 3511, 3513,
1830  3513, 3515, 3517, 3519, 3519, 3522, 3524, 3532, 3532, 3537,
1831  3544, 3546, 3555, 3561, 3561, 3564, 3570, 3576, 3578, 3578,
1832  3580, 3581, 3583, 3598, 3598, 3600, 3602, 3604, 3604, 3606,
1833  3608, 3623, 3623, 3625, 3627, 3637, 3639, 3648, 3654, 3654,
1834  3657, 3663, 3669, 3671, 3671, 3673, 3683, 3690, 3690, 3692,
1835  3694, 3696, 3699, 3701, 3710, 3716, 3716, 3719, 3725, 3731,
1836  3733, 3733, 3736, 3741, 3752, 3767, 3767, 3769, 3771, 3773,
1837  3773, 3775, 3783, 3795, 3795, 3798, 3799, 3800, 3818, 3851,
1838  3854, 3872, 3872, 3883, 3890, 3900, 3908, 3914, 3916, 3930,
1839  3942, 3948, 3954, 3954, 3956, 3958, 3960, 3962, 3972, 3978,
1840  3984, 3984, 3986, 3988, 3990, 3992, 3992, 3997, 4002, 4014,
1841  4016, 4016, 4019, 4020, 4021, 4029, 4036, 4036, 4038, 4040,
1842  4046, 4060, 4071, 4115, 4238, 4249, 4271, 4295, 4306, 4320,
1843  4335, 4350, 4362, 4374, 4392, 4410, 4423, 4436, 4446, 4483,
1844  4494, 4504, 4516, 4530, 4530, 4532, 4542, 4704, 4704, 4706,
1845  4713, 4740, 4740, 4742, 4751, 4765, 4765, 4767, 4774, 4801,
1846  4801, 4803, 4810, 4819, 4819, 4821, 4828, 4855, 4855, 4859,
1847  4867, 4876, 4876, 4878, 4885, 4894, 4894, 4896, 4903, 4942,
1848  4943, 4949, 4955, 4976, 4977, 4979, 4987, 5006, 5013, 5013,
1849  5016, 5022, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039,
1850  5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049,
1851  5050, 5051, 5052, 5053, 5054, 5055, 5057, 5058, 5059, 5063,
1852  5063, 5066, 5067, 5069, 5069, 5072, 5073, 5077, 5077, 5082,
1853  5082, 5087, 5087, 5092, 5092, 5097, 5097, 5102, 5102, 5107,
1854  5107, 5112, 5112, 5117, 5117, 5122, 5122, 5127, 5127, 5132,
1855  5132, 5137, 5139, 5145, 5152, 5152, 5158, 5158, 5170, 5170,
1856  5175, 5175, 5180, 5180, 5190, 5197, 5203, 5204, 5206, 5207,
1857  5210, 5214, 5218, 5222, 5221, 5240, 5239, 5246, 5247, 5249,
1858  5248, 5255, 5256, 5259, 5265, 5273, 5280, 5298, 5298, 5309,
1859  5309, 5312, 5312, 5326, 5327, 5330, 5330, 5343, 5344, 5347,
1860  5347, 5360, 5361, 5364, 5364, 5374, 5375, 5381, 5382, 5383,
1861  5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5393,
1862  5394, 5395, 5396, 5397, 5398, 5399, 5402, 5407, 5414, 5415,
1863  5417, 5425, 5430, 5437, 5438, 5440, 5447, 5452, 5459, 5460,
1864  5462, 5469, 5474, 5481, 5482, 5484, 5491, 5493, 5499, 5501,
1865  5503, 5509, 5511, 5513, 5519, 5521, 5523, 5529, 5531, 5533,
1866  5539, 5539, 5544, 5546, 5548, 5554, 5554, 5559, 5561, 5570,
1867  5572, 5577, 5577, 5579, 5581, 5587, 5590, 5592, 5598, 5601,
1868  5603, 5609, 5612, 5614, 5620, 5624, 5623, 5635, 5635, 5642,
1869  5644, 5650, 5652, 5654, 5660, 5663, 5665, 5671, 5681, 5681,
1870  5687, 5695, 5697, 5717, 5717, 5719, 5721, 5723, 5723, 5725,
1871  5735, 5754, 5760, 5760, 5763, 5771
1872 };
1873 #endif
1874 
1875 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1876 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1877  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1878 static const char *const yytname[] =
1879 {
1880  "$end", "error", "$undefined", "ATTRIBUTETEXT", "ELEMENTTEXT",
1881  "ITEMTEXT", "INTEGER", "DOUBLE", "QUOTE", "TWOQUOTES", "ENDOFELEMENT",
1882  "GREATERTHAN", "EMPTYSEMIDEFINITENESSATT", "SEMIDEFINITENESSATT",
1883  "NUMBEROFQTERMSATT", "NUMBEROFCONESATT", "NUMBEROFSTAGESATT",
1884  "IDXONEATT", "IDXTWOATT", "HORIZONATT", "STARTATT", "STARTIDXATT",
1885  "MATRIXIDXATT", "LBMATRIXIDXATT", "LBCONEIDXATT", "UBMATRIXIDXATT",
1886  "UBCONEIDXATT", "TEMPLATEMATRIXIDXATT", "REFERENCEMATRIXIDXATT",
1887  "VARREFERENCEMATRIXIDXATT", "OBJREFERENCEMATRIXIDXATT",
1888  "CONREFERENCEMATRIXIDXATT", "ORDERCONEIDXATT", "CONSTANTMATRIXIDXATT",
1889  "NORMSCALEFACTORATT", "DISTORTIONMATRIXIDXATT", "AXISDIRECTIONATT",
1890  "FIRSTAXISDIRECTIONATT", "SECONDAXISDIRECTIONATT", "OSILEND",
1891  "INSTANCEDATAEND", "INSTANCEDATASTARTEND", "QUADRATICCOEFFICIENTSSTART",
1892  "QUADRATICCOEFFICIENTSEND", "QTERMSTART", "QTERMEND", "CONESSTART",
1893  "CONESEND", "NONNEGATIVECONESTART", "NONNEGATIVECONEEND",
1894  "NONPOSITIVECONESTART", "NONPOSITIVECONEEND", "ORTHANTCONESTART",
1895  "ORTHANTCONEEND", "POLYHEDRALCONESTART", "POLYHEDRALCONEEND",
1896  "QUADRATICCONESTART", "QUADRATICCONEEND", "ROTATEDQUADRATICCONESTART",
1897  "ROTATEDQUADRATICCONEEND", "SEMIDEFINITECONESTART",
1898  "SEMIDEFINITECONEEND", "PRODUCTCONESTART", "PRODUCTCONEEND",
1899  "INTERSECTIONCONESTART", "INTERSECTIONCONEEND", "DUALCONESTART",
1900  "DUALCONEEND", "POLARCONESTART", "POLARCONEEND", "DIRECTIONSTART",
1901  "DIRECTIONEND", "FACTORSSTART", "FACTORSEND", "COMPONENTSSTART",
1902  "COMPONENTSEND", "TIMEDOMAINSTART", "TIMEDOMAINEND", "STAGESSTART",
1903  "STAGESEND", "STAGESTART", "STAGEEND", "INTERVALSTART", "INTERVALEND",
1904  "HEADERSTART", "HEADEREND", "FILENAMESTART", "FILENAMEEND",
1905  "FILENAMEEMPTY", "FILENAMESTARTANDEND", "FILESOURCESTART",
1906  "FILESOURCEEND", "FILESOURCEEMPTY", "FILESOURCESTARTANDEND",
1907  "FILEDESCRIPTIONSTART", "FILEDESCRIPTIONEND", "FILEDESCRIPTIONEMPTY",
1908  "FILEDESCRIPTIONSTARTANDEND", "FILECREATORSTART", "FILECREATOREND",
1909  "FILECREATOREMPTY", "FILECREATORSTARTANDEND", "FILELICENCESTART",
1910  "FILELICENCEEND", "FILELICENCEEMPTY", "FILELICENCESTARTANDEND",
1911  "INDEXESSTART", "INDEXESEND", "VALUESSTART", "VALUESEND",
1912  "NONZEROSSTART", "NONZEROSEND", "ELSTART", "ELEND", "ENUMERATIONSTART",
1913  "ENUMERATIONEND", "ITEMEMPTY", "ITEMSTART", "ITEMEND", "ITEMSTARTANDEND",
1914  "BASE64START", "BASE64END", "NUMBEROFELATT", "NUMBEROFENUMERATIONSATT",
1915  "NUMBEROFITEMSATT", "EMPTYCATEGORYATT", "CATEGORYATT",
1916  "EMPTYDESCRIPTIONATT", "DESCRIPTIONATT", "EMPTYSOLVERATT", "SOLVERATT",
1917  "EMPTYNAMEATT", "NAMEATT", "EMPTYTYPEATT", "TYPEATT", "EMPTYENUMTYPEATT",
1918  "ENUMTYPEATT", "EMPTYSHAPEATT", "SHAPEATT", "EMPTYUNITATT", "UNITATT",
1919  "EMPTYVALUEATT", "VALUEATT", "EMPTYVALUETYPEATT", "VALUETYPEATT",
1920  "EMPTYCONTYPEATT", "CONTYPEATT", "EMPTYOBJTYPEATT", "OBJTYPEATT",
1921  "EMPTYVARTYPEATT", "VARTYPEATT", "EMPTYMATRIXCONTYPEATT",
1922  "MATRIXCONTYPEATT", "EMPTYMATRIXOBJTYPEATT", "MATRIXOBJTYPEATT",
1923  "EMPTYMATRIXVARTYPEATT", "MATRIXVARTYPEATT", "EMPTYMATRIXTYPEATT",
1924  "MATRIXTYPEATT", "EMPTYSYMMETRYATT", "SYMMETRYATT", "EMPTYROWMAJORATT",
1925  "ROWMAJORATT", "EMPTYBASETRANSPOSEATT", "BASETRANSPOSEATT",
1926  "NUMBEROFBLOCKSATT", "NUMBEROFCOLUMNSATT", "NUMBEROFROWSATT",
1927  "NUMBEROFMATRICESATT", "NUMBEROFVALUESATT", "NUMBEROFCONSTRAINTSATT",
1928  "NUMBEROFCONATT", "NUMBEROFCONIDXATT", "NUMBEROFOBJECTIVESATT",
1929  "NUMBEROFOBJATT", "NUMBEROFOBJIDXATT", "NUMBEROFVARIABLESATT",
1930  "NUMBEROFVARATT", "NUMBEROFVARIDXATT", "NUMBEROFMATRIXCONATT",
1931  "NUMBEROFMATRIXOBJATT", "NUMBEROFMATRIXVARATT", "BASEMATRIXIDXATT",
1932  "TARGETMATRIXFIRSTROWATT", "TARGETMATRIXFIRSTCOLATT",
1933  "BASEMATRIXSTARTROWATT", "BASEMATRIXSTARTCOLATT", "BASEMATRIXENDROWATT",
1934  "BASEMATRIXENDCOLATT", "SCALARMULTIPLIERATT", "BLOCKROWIDXATT",
1935  "BLOCKCOLIDXATT", "MATRIXVARIDXATT", "MATRIXOBJIDXATT",
1936  "MATRIXCONIDXATT", "IDXATT", "INCRATT", "MULTATT", "SIZEOFATT",
1937  "COEFATT", "CONSTANTATT", "MATRICESSTART", "MATRICESEND", "MATRIXSTART",
1938  "MATRIXEND", "BASEMATRIXEND", "BASEMATRIXSTART", "BLOCKSSTART",
1939  "BLOCKSEND", "BLOCKSTART", "BLOCKEND", "COLOFFSETSTART", "COLOFFSETEND",
1940  "ROWOFFSETSTART", "ROWOFFSETEND", "ELEMENTSSTART", "ELEMENTSEND",
1941  "CONSTANTELEMENTSSTART", "CONSTANTELEMENTSEND",
1942  "VARREFERENCEELEMENTSSTART", "VARREFERENCEELEMENTSEND",
1943  "LINEARELEMENTSSTART", "LINEARELEMENTSEND", "GENERALELEMENTSSTART",
1944  "GENERALELEMENTSEND", "CONREFERENCEELEMENTSSTART",
1945  "CONREFERENCEELEMENTSEND", "OBJREFERENCEELEMENTSSTART",
1946  "OBJREFERENCEELEMENTSEND", "STRINGVALUEDELEMENTSSTART",
1947  "STRINGVALUEDELEMENTSEND", "STARTVECTORSTART", "STARTVECTOREND",
1948  "INDEXSTART", "INDEXEND", "VALUESTART", "VALUEEND", "VARIDXSTART",
1949  "VARIDXEND", "TRANSFORMATIONSTART", "TRANSFORMATIONEND",
1950  "MATRIXPROGRAMMINGSTART", "MATRIXPROGRAMMINGEND", "MATRIXVARIABLESSTART",
1951  "MATRIXVARIABLESEND", "MATRIXVARSTART", "MATRIXVAREND",
1952  "MATRIXOBJECTIVESSTART", "MATRIXOBJECTIVESEND", "MATRIXOBJSTART",
1953  "MATRIXOBJEND", "MATRIXCONSTRAINTSSTART", "MATRIXCONSTRAINTSEND",
1954  "MATRIXCONSTART", "MATRIXCONEND", "CONSTART", "CONEND",
1955  "CONSTRAINTSSTART", "CONSTRAINTSEND", "OBJSTART", "OBJEND",
1956  "OBJECTIVESSTART", "OBJECTIVESEND", "VARSTART", "VAREND",
1957  "VARIABLESSTART", "VARIABLESEND", "GENERALSTART", "GENERALEND",
1958  "SYSTEMSTART", "SYSTEMEND", "SERVICESTART", "SERVICEEND", "JOBSTART",
1959  "JOBEND", "OPTIMIZATIONSTART", "OPTIMIZATIONEND", "ATEQUALITYSTART",
1960  "ATEQUALITYEND", "ATLOWERSTART", "ATLOWEREND", "ATUPPERSTART",
1961  "ATUPPEREND", "BASICSTART", "BASICEND", "ISFREESTART", "ISFREEEND",
1962  "SUPERBASICSTART", "SUPERBASICEND", "UNKNOWNSTART", "UNKNOWNEND",
1963  "SERVICEURISTART", "SERVICEURIEND", "SERVICENAMESTART", "SERVICENAMEEND",
1964  "INSTANCENAMESTART", "INSTANCENAMEEND", "JOBIDSTART", "JOBIDEND",
1965  "OTHERSTART", "OTHEREND", "DUMMY", "NONLINEAREXPRESSIONSSTART",
1966  "NONLINEAREXPRESSIONSEND", "NUMBEROFNONLINEAREXPRESSIONS", "NLSTART",
1967  "NLEND", "MATRIXEXPRESSIONSSTART", "MATRIXEXPRESSIONSEND",
1968  "NUMBEROFEXPR", "EXPRSTART", "EXPREND", "NUMBEROFMATRIXTERMSATT",
1969  "MATRIXTERMSTART", "MATRIXTERMEND", "POWERSTART", "POWEREND",
1970  "PLUSSTART", "PLUSEND", "MINUSSTART", "MINUSEND", "DIVIDESTART",
1971  "DIVIDEEND", "LNSTART", "LNEND", "SQRTSTART", "SQRTEND", "SUMSTART",
1972  "SUMEND", "PRODUCTSTART", "PRODUCTEND", "EXPSTART", "EXPEND",
1973  "NEGATESTART", "NEGATEEND", "IFSTART", "IFEND", "SQUARESTART",
1974  "SQUAREEND", "COSSTART", "COSEND", "SINSTART", "SINEND", "VARIABLESTART",
1975  "VARIABLEEND", "ABSSTART", "ABSEND", "ERFSTART", "ERFEND", "MAXSTART",
1976  "MAXEND", "ALLDIFFSTART", "ALLDIFFEND", "MINSTART", "MINEND", "ESTART",
1977  "EEND", "PISTART", "PIEND", "TIMESSTART", "TIMESEND", "NUMBERSTART",
1978  "NUMBEREND", "MATRIXDETERMINANTSTART", "MATRIXDETERMINANTEND",
1979  "MATRIXTRACESTART", "MATRIXTRACEEND", "MATRIXTOSCALARSTART",
1980  "MATRIXTOSCALAREND", "MATRIXDIAGONALSTART", "MATRIXDIAGONALEND",
1981  "MATRIXDOTTIMESSTART", "MATRIXDOTTIMESEND", "MATRIXLOWERTRIANGLESTART",
1982  "MATRIXLOWERTRIANGLEEND", "MATRIXUPPERTRIANGLESTART",
1983  "MATRIXUPPERTRIANGLEEND", "MATRIXMERGESTART", "MATRIXMERGEEND",
1984  "MATRIXMINUSSTART", "MATRIXMINUSEND", "MATRIXNEGATESTART",
1985  "MATRIXNEGATEEND", "MATRIXPLUSSTART", "MATRIXPLUSEND",
1986  "MATRIXTIMESSTART", "MATRIXTIMESEND", "MATRIXPRODUCTSTART",
1987  "MATRIXPRODUCTEND", "MATRIXSCALARTIMESSTART", "MATRIXSCALARTIMESEND",
1988  "MATRIXSUBMATRIXATSTART", "MATRIXSUBMATRIXATEND", "MATRIXTRANSPOSESTART",
1989  "MATRIXTRANSPOSEEND", "MATRIXREFERENCESTART", "MATRIXREFERENCEEND",
1990  "IDENTITYMATRIXSTART", "IDENTITYMATRIXEND", "MATRIXINVERSESTART",
1991  "MATRIXINVERSEEND", "EMPTYINCLUDEDIAGONALATT", "INCLUDEDIAGONALATT",
1992  "EMPTYIDATT", "IDATT", "' '", "'\\t'", "'\\r'", "'\\n'", "$accept",
1993  "osildoc", "theInstanceEnd", "osilEnd", "osilEnding",
1994  "quadraticCoefficients", "quadraticCoefficientsStart",
1995  "osilQuadnumberATT", "qTermlist", "qterm", "qtermStart", "qtermend",
1996  "anotherqTermATT", "qtermatt", "osilQtermidxOneATT",
1997  "osilQtermidxTwoATT", "osilQtermcoefATT", "osilQtermidxATT", "matrices",
1998  "matricesStart", "matricesAttributes", "matricesContent",
1999  "matricesEmpty", "matricesLaden", "matrixList", "cones", "conesStart",
2000  "conesAttributes", "conesContent", "conesEmpty", "conesLaden",
2001  "coneList", "cone", "nonnegativeCone", "nonnegativeConeStart",
2002  "nonnegativeConeAttributes", "nonnegativeConeAttList",
2003  "nonnegativeConeAtt", "nonnegativeConeEnd", "nonpositiveCone",
2004  "nonpositiveConeStart", "nonpositiveConeAttributes",
2005  "nonpositiveConeAttList", "nonpositiveConeAtt", "nonpositiveConeEnd",
2006  "generalOrthantCone", "generalOrthantConeStart",
2007  "generalOrthantConeAttributes", "generalOrthantConeAttList",
2008  "generalOrthantConeAtt", "generalOrthantConeContent",
2009  "generalOrthantConeDirectionList", "generalOrthantConeDirections",
2010  "generalOrthantConeDirection", "generalOrthantConeDirectionStart",
2011  "generalOrthantConeDirectionAttributes",
2012  "generalOrthantConeDirectionAttributeList",
2013  "generalOrthantConeDirectionAtt", "generalOrthantConeDirectionEnd",
2014  "generalOrthantConeEnd", "polyhedralCone", "polyhedralConeStart",
2015  "polyhedralConeAttributes", "polyhedralConeAttList", "polyhedralConeAtt",
2016  "referenceMatrixATT", "polyhedralConeEnd", "quadraticCone",
2017  "quadraticConeStart", "quadraticConeAttributes", "quadraticConeAttList",
2018  "quadraticConeAtt", "quadraticConeEnd", "rotatedQuadraticCone",
2019  "rotatedQuadraticConeStart", "rotatedQuadraticConeAttributes",
2020  "rotatedQuadraticConeAttList", "rotatedQuadraticConeAtt",
2021  "rotatedQuadraticConeEnd", "semidefiniteCone", "semidefiniteConeStart",
2022  "semidefiniteConeAttributes", "semidefiniteConeAttList",
2023  "semidefiniteConeAtt", "semidefiniteConeEnd", "productCone",
2024  "productConeStart", "productConeAttributes", "productConeAttList",
2025  "productConeAtt", "productConeContent", "productConeFactors",
2026  "productConeFactorsStart", "productConeFactorsAttributes",
2027  "productConeFactorsContent", "productConeFactorsEmpty",
2028  "productConeFactorsLaden", "productConeFactorList",
2029  "productConeFactorsEnd", "productConeEnd", "intersectionCone",
2030  "intersectionConeStart", "intersectionConeAttributes",
2031  "intersectionConeAttList", "intersectionConeAtt",
2032  "intersectionConeContent", "intersectionConeComponents",
2033  "intersectionConeComponentsStart",
2034  "intersectionConeComponentsAttributes",
2035  "intersectionConeComponentsContent", "intersectionConeComponentsEmpty",
2036  "intersectionConeComponentsLaden", "intersectionConeComponentList",
2037  "intersectionConeComponentsEnd", "intersectionConeEnd",
2038  "matrixProgramming", "matrixProgrammingStart",
2039  "matrixProgrammingContent", "matrixProgrammingEmpty",
2040  "matrixProgrammingLaden", "matrixVariables", "matrixVariablesStart",
2041  "matrixVariablesAttributes", "matrixVariablesContent",
2042  "matrixVariablesEmpty", "matrixVariablesLaden", "matrixVariablesEnd",
2043  "matrixVarList", "matrixVar", "matrixVarStart", "matrixVarAttributes",
2044  "matrixVarAttList", "matrixVarAtt", "matrixVarEnd", "matrixObjectives",
2045  "matrixObjectivesStart", "matrixObjectivesAttributes",
2046  "matrixObjectivesContent", "matrixObjectivesEmpty",
2047  "matrixObjectivesLaden", "matrixObjectivesEnd", "matrixObjList",
2048  "matrixObj", "matrixObjStart", "matrixObjAttributes", "matrixObjAttList",
2049  "matrixObjAtt", "matrixObjEnd", "matrixConstraints",
2050  "matrixConstraintsStart", "matrixConstraintsAttributes",
2051  "matrixConstraintsContent", "matrixConstraintsEmpty",
2052  "matrixConstraintsLaden", "matrixConstraintsEnd", "matrixConList",
2053  "matrixCon", "matrixConStart", "matrixConAttributes", "matrixConAttList",
2054  "matrixConAtt", "matrixConEnd", "timeDomain", "timeDomainStart",
2055  "timeDomainContent", "timeDomainEmpty", "timeDomainLaden", "stages",
2056  "stagesstart", "osilNumberofstagesATT", "stagelist", "stage", "$@1",
2057  "osilStagenameATT", "stageend", "stagecontent", "stagevariables",
2058  "anotherstagevarATT", "stagevaratt", "osilNumberofstagevariablesATT",
2059  "osilStagevarstartidxATT", "restofstagevariables", "emptyvarlist",
2060  "stagevarlist", "stagevar", "$@2", "osilStagevaridxATT", "stagevarend",
2061  "stageconstraints", "anotherstageconATT", "stageconatt",
2062  "osilNumberofstageconstraintsATT", "osilStageconstartidxATT",
2063  "restofstageconstraints", "emptyconlist", "stageconlist", "stagecon",
2064  "$@3", "osilStageconidxATT", "stageconend", "stageobjectives",
2065  "anotherstageobjATT", "stageobjatt", "osilNumberofstageobjectivesATT",
2066  "restofstageobjectives", "emptyobjlist", "stageobjlist", "stageobj",
2067  "$@4", "osilStageobjidxATT", "stageobjend", "interval", "$@5",
2068  "intervalend", "anotherIntervalATT", "intervalatt",
2069  "osilStageobjstartidxATT", "osilIntervalhorizonATT",
2070  "osilIntervalstartATT", "numberOfMatricesATT", "numberOfConesATT",
2071  "numberOfMatrixVarATT", "numberOfMatrixObjATT", "numberOfMatrixConATT",
2072  "normScaleFactorATT", "distortionMatrixIdxATT", "axisDirectionATT",
2073  "firstAxisDirectionATT", "secondAxisDirectionATT", "semidefinitenessATT",
2074  "matrixIdxATT", "lbMatrixIdxATT", "ubMatrixIdxATT",
2075  "constantMatrixIdxATT", "templateMatrixIdxATT",
2076  "varReferenceMatrixIdxATT", "objReferenceMatrixIdxATT",
2077  "conReferenceMatrixIdxATT", "lbConeIdxATT", "ubConeIdxATT",
2078  "orderConeIdxATT", "aNumber", "quote", "xmlWhiteSpace",
2079  "xmlWhiteSpaceChar", "osglIntArrayData", "osglIntVectorElArray",
2080  "osglIntVectorEl", "osglIntVectorElStart", "osglIntVectorElAttributes",
2081  "osglIntVectorElAttList", "osglIntVectorElAtt", "osglIntVectorElContent",
2082  "osglIntVectorBase64", "osglIntVectorBase64Content",
2083  "osglIntVectorBase64Empty", "osglIntVectorBase64Laden",
2084  "osglDblArrayData", "osglDblVectorElArray", "osglDblVectorEl",
2085  "osglDblVectorElStart", "osglDblVectorElAttributes",
2086  "osglDblVectorElContent", "osglDblVectorBase64",
2087  "osglDblVectorBase64Content", "osglDblVectorBase64Empty",
2088  "osglDblVectorBase64Laden", "osglMatrix", "matrixStart",
2089  "matrixAttributes", "matrixAttributeList", "matrixAttribute",
2090  "matrixContent", "matrixEmpty", "matrixLaden", "matrixBody",
2091  "baseMatrix", "baseMatrixStart", "baseMatrixAttributes",
2092  "baseMatrixAttList", "baseMatrixAtt", "baseMatrixEnd",
2093  "matrixConstructorList", "matrixConstructor", "constantElements",
2094  "constantElementsStart", "constantElementsAttributes",
2095  "constantElementsAttList", "constantElementsAtt",
2096  "constantElementsContent", "constantElementsNonzeros",
2097  "matrixElementsStartVector", "matrixElementsStartVectorStart",
2098  "matrixElementsStartVectorContent", "matrixElementsStartVectorEmpty",
2099  "matrixElementsStartVectorLaden", "matrixElementsStartVectorBody",
2100  "matrixElementsIndexVector", "matrixElementsIndexStart",
2101  "matrixElementsIndexContent", "matrixElementsIndexEmpty",
2102  "matrixElementsIndexLaden", "matrixElementsIndexBody",
2103  "constantElementsValues", "constantElementsValueStart",
2104  "constantElementsValueContent", "constantElementsValueEmpty",
2105  "constantElementsValueLaden", "constantElementsValueBody",
2106  "varReferenceElements", "varReferenceElementsStart",
2107  "varReferenceElementsAttributes", "varReferenceElementsAttList",
2108  "varReferenceElementsAtt", "varReferenceElementsContent",
2109  "varReferenceElementsNonzeros", "varReferenceElementsValues",
2110  "varReferenceElementsValuesStart", "varReferenceElementsValuesContent",
2111  "varReferenceElementsValuesEmpty", "varReferenceElementsValuesLaden",
2112  "varReferenceElementsValuesBody", "linearElements",
2113  "linearElementsStart", "linearElementsAttributes",
2114  "linearElementsAttList", "linearElementsAtt", "linearElementsContent",
2115  "linearElementsNonzeros", "linearElementsValues",
2116  "linearElementsValuesStart", "linearElementsValuesContent",
2117  "linearElementsValuesEmpty", "linearElementsValuesLaden",
2118  "linearElementsValuesBody", "linearElementsValuesElList",
2119  "linearElementsValuesEl", "linearElementsValuesElStart",
2120  "linearElementsValuesElAttributes", "linearElementsValuesElAttList",
2121  "linearElementsValuesElAtt", "linearElementsValuesElContent",
2122  "linearElementsValuesElEmpty", "linearElementsValuesElLaden",
2123  "linearElementsValuesVarIdxList", "linearElementsValuesVarIdx",
2124  "linearElementsValuesVarIdxStart", "LinearElementsValuesVarIdxCoefATT",
2125  "linearElementsValuesVarIdxContent", "generalElements",
2126  "generalElementsStart", "generalElementsAttributes",
2127  "generalElementsAttList", "generalElementsAtt", "generalElementsContent",
2128  "generalElementsNonzeros", "generalElementsValues",
2129  "generalElementsValuesStart", "generalElementsValuesContent",
2130  "generalElementsValuesEmpty", "generalElementsValuesLaden",
2131  "generalElementsElList", "generalElementsEl", "generalElementsElStart",
2132  "generalElementsElContent", "generalElementsElEmpty",
2133  "generalElementsElLaden", "objReferenceElements",
2134  "objReferenceElementsStart", "objReferenceElementsAttributes",
2135  "objReferenceElementsAttList", "objReferenceElementsAtt",
2136  "objReferenceElementsContent", "objReferenceElementsNonzeros",
2137  "objReferenceElementsValues", "objReferenceElementsValuesStart",
2138  "objReferenceElementsValuesContent", "objReferenceElementsValuesEmpty",
2139  "objReferenceElementsValuesLaden", "objReferenceElementsValuesBody",
2140  "conReferenceElements", "conReferenceElementsStart",
2141  "conReferenceElementsAttributes", "conReferenceElementsAttList",
2142  "conReferenceElementsAtt", "conReferenceElementsContent",
2143  "conReferenceElementsNonzeros", "conReferenceElementsValues",
2144  "conReferenceElementsValuesStart", "conReferenceElementsValuesContent",
2145  "conReferenceElementsValuesEmpty", "conReferenceElementsValuesLaden",
2146  "conReferenceElementsElList", "conReferenceElementsEl",
2147  "conReferenceElementsElStart", "conReferenceElementsElAttributeList",
2148  "conReferenceElementsElAttribute", "conReferenceElementsElContent",
2149  "matrixTransformation", "matrixTransformationStart",
2150  "matrixTransformationShapeATT", "matrixTransformationEnd",
2151  "matrixBlocks", "matrixBlocksStart", "matrixBlocksAttributes",
2152  "matrixBlocksContent", "matrixBlocksEnd", "colOffsets", "colOffsetStart",
2153  "colOffsetNumberOfElAttribute", "colOffsetContent", "colOffsetEmpty",
2154  "colOffsetLaden", "colOffsetBody", "rowOffsets", "rowOffsetStart",
2155  "rowOffsetNumberOfElAttribute", "rowOffsetContent", "rowOffsetEmpty",
2156  "rowOffsetLaden", "rowOffsetBody", "blockList", "matrixBlock",
2157  "matrixBlockStart", "matrixBlockAttributes", "matrixBlockAttList",
2158  "matrixBlockAtt", "matrixBlockContent", "blockEmpty", "blockLaden",
2159  "blockBody", "osglNumberOfBlocksATT", "osglNumberOfColumnsATT",
2160  "osglNumberOfElATT", "osglNumberOfRowsATT", "osglNumberOfValuesATT",
2161  "osglNumberOfVarIdxATT", "osglBase64SizeATT", "osglBaseMatrixIdxATT",
2162  "osglBaseMatrixStartRowATT", "osglBaseMatrixStartColATT",
2163  "osglBaseMatrixEndRowATT", "osglBaseMatrixEndColATT",
2164  "osglBlockRowIdxATT", "osglBlockColIdxATT", "osglCoefATT",
2165  "osglConstantATT", "osglIdxATT", "osglIncrATT", "osglMultATT",
2166  "osglScalarMultiplierATT", "osglTargetMatrixFirstRowATT",
2167  "osglTargetMatrixFirstColATT", "osglBaseTransposeATT",
2168  "baseTransposeAttEmpty", "baseTransposeAttContent", "osglNameATT",
2169  "nameAttEmpty", "nameAttContent", "osglRowMajorATT", "rowMajorAttEmpty",
2170  "rowMajorAttContent", "osglShapeATT", "shapeAttEmpty", "shape",
2171  "osglSymmetryATT", "symmetryAttEmpty", "symmetryAttContent",
2172  "osglTypeATT", "typeAttEmpty", "typeAttContent", "osglValueATT",
2173  "valueAttEmpty", "valueAttContent", "osglValueTypeATT",
2174  "valueTypeAttEmpty", "valueTypeAttContent", "osglVarTypeATT",
2175  "varTypeAttEmpty", "varTypeAttContent", "nonlinearExpressions",
2176  "nonlinearExpressionsStart", "nlnumberatt", "nlnodes",
2177  "scalarExpressionTree", "nlstart", "nlAttributes", "nlAttributeList",
2178  "nlAttribute", "nlnode", "E", "$@6", "eend", "PI", "$@7", "piend",
2179  "times", "$@8", "plus", "$@9", "minus", "$@10", "negate", "$@11",
2180  "divide", "$@12", "power", "$@13", "ln", "$@14", "sqrt", "$@15",
2181  "square", "$@16", "cos", "$@17", "sin", "$@18", "exp", "$@19", "abs",
2182  "absStart", "absEnd", "erf", "$@20", "if", "$@21", "matrixDeterminant",
2183  "$@22", "matrixTrace", "$@23", "matrixToScalar", "$@24", "number",
2184  "numberStart", "numberEnd", "numberAttributeList", "numberAttribute",
2185  "numberidATT", "$@25", "variable", "$@26", "variableend", "$@27",
2186  "anotherVariableATT", "variableATT", "variablecoefATT", "variableidxATT",
2187  "sum", "$@28", "anothersumnlnode", "allDiff", "$@29",
2188  "anotherallDiffnlnode", "max", "$@30", "anothermaxnlnode", "min", "$@31",
2189  "anotherminnlnode", "product", "$@32", "anotherproductnlnode",
2190  "OSnLMNode", "matrixReference", "matrixReferenceStart",
2191  "matrixReferenceEnd", "matrixVarReference", "matrixVarReferenceStart",
2192  "matrixVarReferenceEnd", "matrixVarIdxATT", "matrixObjReference",
2193  "matrixObjReferenceStart", "matrixObjReferenceEnd", "matrixObjIdxATT",
2194  "matrixConReference", "matrixConReferenceStart", "matrixConReferenceEnd",
2195  "matrixConIdxATT", "matrixDiagonal", "matrixDiagonalStart",
2196  "matrixDiagonalContent", "matrixDotTimes", "matrixDotTimesStart",
2197  "matrixDotTimesContent", "identityMatrix", "identityMatrixStart",
2198  "identityMatrixContent", "matrixInverse", "matrixInverseStart",
2199  "matrixInverseContent", "matrixLowerTriangle",
2200  "matrixLowerTriangleStart", "matrixLowerTriangleAttribute",
2201  "matrixLowerTriangleContent", "matrixUpperTriangle",
2202  "matrixUpperTriangleStart", "matrixUpperTriangleAttribute",
2203  "matrixUpperTriangleContent", "includeDiagonalATT", "matrixMerge",
2204  "matrixMergeStart", "matrixMergeEnd", "matrixMinus", "matrixMinusStart",
2205  "matrixMinusContent", "matrixNegate", "matrixNegateStart",
2206  "matrixNegateContent", "matrixPlus", "matrixPlusStart",
2207  "matrixPlusContent", "matrixTimes", "matrixTimesStart",
2208  "matrixTimesContent", "matrixProduct", "$@33",
2209  "anothermatrixproductnode", "matrixScalarTimes",
2210  "matrixScalarTimesStart", "matrixScalarTimesContent",
2211  "matrixSubMatrixAt", "matrixSubMatrixAtStart",
2212  "matrixSubMatrixAtContent", "matrixTranspose", "matrixTransposeStart",
2213  "matrixTransposeContent", "matrixExpressions", "matrixExpressionsStart",
2214  "matrixExpressionsAtt", "numberOfExprATT", "matrixExpressionsContent",
2215  "matrixExpressionsEmpty", "matrixExpressionsLaden", "matrixExprList",
2216  "matrixExpr", "matrixExprStart", "matrixExprAttributes",
2217  "matrixExprAttributeList", "exprAttribute", 0
2218 };
2219 #endif
2220 
2221 # ifdef YYPRINT
2222 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2223  token YYLEX-NUM. */
2224 static const yytype_uint16 yytoknum[] =
2225 {
2226  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2227  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2228  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2229  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2230  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2231  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2232  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2233  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2234  335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2235  345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
2236  355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
2237  365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
2238  375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
2239  385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
2240  395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
2241  405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
2242  415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
2243  425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
2244  435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
2245  445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
2246  455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
2247  465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
2248  475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
2249  485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
2250  495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
2251  505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
2252  515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
2253  525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
2254  535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
2255  545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
2256  555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
2257  565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
2258  575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
2259  585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
2260  595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
2261  605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
2262  615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
2263  625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
2264  635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
2265  645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
2266  655, 656, 657, 658, 659, 32, 9, 13, 10
2267 };
2268 # endif
2269 
2270 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2271 static const yytype_uint16 yyr1[] =
2272 {
2273  0, 409, 410, 411, 411, 412, 413, 413, 414, 414,
2274  415, 416, 417, 417, 418, 419, 420, 420, 421, 421,
2275  422, 422, 422, 422, 423, 424, 425, 426, 427, 427,
2276  428, 429, 430, 430, 431, 432, 433, 433, 434, 434,
2277  435, 436, 437, 437, 438, 439, 440, 440, 441, 441,
2278  441, 441, 441, 441, 441, 441, 441, 442, 443, 444,
2279  445, 445, 446, 446, 446, 447, 447, 448, 449, 450,
2280  451, 451, 452, 452, 452, 453, 453, 454, 455, 456,
2281  457, 457, 458, 458, 458, 459, 459, 460, 461, 461,
2282  462, 463, 464, 465, 465, 466, 466, 467, 467, 468,
2283  469, 470, 471, 472, 472, 473, 473, 473, 473, 474,
2284  475, 475, 476, 477, 478, 479, 479, 480, 480, 480,
2285  480, 480, 480, 481, 481, 482, 483, 484, 485, 485,
2286  486, 486, 486, 486, 486, 486, 486, 487, 487, 488,
2287  489, 490, 491, 491, 492, 492, 492, 492, 493, 493,
2288  494, 495, 496, 497, 497, 498, 498, 498, 499, 500,
2289  501, 502, 503, 503, 504, 505, 506, 507, 508, 509,
2290  510, 511, 512, 512, 513, 513, 513, 514, 515, 516,
2291  517, 518, 518, 519, 520, 521, 522, 523, 524, 524,
2292  525, 526, 526, 527, 528, 529, 529, 530, 531, 532,
2293  532, 533, 534, 535, 536, 536, 537, 538, 539, 540,
2294  540, 541, 541, 541, 541, 541, 541, 541, 541, 541,
2295  541, 541, 542, 542, 543, 543, 544, 545, 546, 546,
2296  547, 548, 549, 550, 550, 551, 552, 553, 554, 554,
2297  555, 555, 555, 555, 555, 555, 555, 555, 556, 556,
2298  557, 557, 558, 559, 560, 560, 561, 562, 563, 564,
2299  564, 565, 566, 567, 568, 568, 569, 569, 569, 569,
2300  569, 569, 569, 569, 569, 570, 570, 571, 571, 572,
2301  573, 573, 574, 574, 575, 575, 576, 577, 578, 579,
2302  579, 581, 580, 582, 582, 583, 583, 584, 585, 585,
2303  586, 586, 587, 587, 588, 589, 590, 590, 591, 591,
2304  592, 592, 594, 593, 595, 596, 596, 597, 597, 598,
2305  598, 599, 599, 600, 601, 602, 602, 603, 603, 604,
2306  604, 606, 605, 607, 608, 608, 609, 609, 610, 610,
2307  611, 611, 612, 613, 613, 614, 614, 615, 615, 617,
2308  616, 618, 619, 619, 621, 620, 622, 622, 623, 623,
2309  624, 624, 625, 626, 627, 628, 629, 630, 631, 632,
2310  633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
2311  643, 644, 645, 646, 647, 648, 649, 650, 650, 651,
2312  652, 652, 653, 653, 653, 653, 654, 654, 655, 655,
2313  656, 657, 658, 659, 659, 660, 660, 661, 662, 663,
2314  663, 664, 664, 665, 666, 666, 667, 667, 668, 669,
2315  670, 670, 671, 672, 673, 673, 674, 674, 675, 676,
2316  677, 678, 679, 679, 680, 680, 680, 680, 680, 538,
2317  552, 566, 681, 681, 682, 683, 684, 685, 685, 686,
2318  687, 688, 688, 689, 689, 689, 689, 689, 689, 689,
2319  689, 689, 690, 690, 691, 691, 692, 692, 692, 692,
2320  692, 692, 692, 692, 693, 694, 695, 696, 696, 697,
2321  697, 698, 699, 699, 700, 701, 702, 702, 703, 704,
2322  705, 706, 707, 708, 708, 709, 710, 711, 712, 713,
2323  714, 714, 715, 716, 717, 718, 719, 720, 721, 721,
2324  722, 722, 723, 724, 724, 725, 726, 727, 727, 728,
2325  729, 730, 731, 732, 733, 734, 734, 735, 735, 736,
2326  737, 737, 738, 738, 739, 740, 740, 741, 742, 743,
2327  744, 744, 745, 746, 747, 748, 748, 749, 749, 750,
2328  750, 751, 752, 753, 753, 754, 755, 756, 756, 757,
2329  758, 759, 760, 761, 761, 762, 762, 763, 764, 764,
2330  765, 765, 766, 767, 767, 768, 769, 770, 770, 771,
2331  772, 773, 773, 774, 775, 776, 777, 778, 779, 779,
2332  780, 780, 781, 782, 782, 783, 784, 785, 785, 786,
2333  787, 788, 789, 790, 791, 792, 792, 793, 793, 794,
2334  795, 795, 796, 796, 797, 798, 798, 799, 800, 801,
2335  801, 802, 803, 804, 804, 805, 805, 805, 806, 807,
2336  808, 809, 809, 810, 811, 812, 813, 814, 815, 816,
2337  817, 818, 819, 819, 820, 821, 822, 823, 824, 825,
2338  826, 826, 827, 828, 829, 830, 830, 831, 832, 833,
2339  834, 834, 835, 835, 835, 835, 836, 836, 837, 838,
2340  839, 840, 841, 842, 843, 844, 845, 846, 847, 848,
2341  849, 850, 851, 852, 853, 854, 855, 856, 857, 858,
2342  859, 860, 861, 862, 862, 863, 864, 865, 865, 866,
2343  867, 868, 868, 869, 870, 871, 871, 872, 873, 874,
2344  874, 875, 876, 877, 877, 878, 879, 880, 880, 881,
2345  882, 883, 883, 884, 885, 886, 886, 887, 888, 889,
2346  889, 890, 891, 892, 892, 893, 894, 895, 896, 896,
2347  897, 897, 898, 898, 898, 898, 898, 898, 898, 898,
2348  898, 898, 898, 898, 898, 898, 898, 898, 898, 898,
2349  898, 898, 898, 898, 898, 898, 898, 898, 898, 900,
2350  899, 901, 901, 903, 902, 904, 904, 906, 905, 908,
2351  907, 910, 909, 912, 911, 914, 913, 916, 915, 918,
2352  917, 920, 919, 922, 921, 924, 923, 926, 925, 928,
2353  927, 929, 930, 931, 933, 932, 935, 934, 937, 936,
2354  939, 938, 941, 940, 942, 943, 944, 944, 945, 945,
2355  946, 946, 946, 948, 947, 950, 949, 951, 951, 952,
2356  951, 953, 953, 954, 954, 955, 956, 958, 957, 959,
2357  959, 961, 960, 962, 962, 964, 963, 965, 965, 967,
2358  966, 968, 968, 970, 969, 971, 971, 972, 972, 972,
2359  972, 972, 972, 972, 972, 972, 972, 972, 972, 972,
2360  972, 972, 972, 972, 972, 972, 973, 974, 975, 975,
2361  639, 976, 977, 978, 978, 979, 980, 981, 982, 982,
2362  983, 984, 985, 986, 986, 987, 988, 989, 990, 991,
2363  992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
2364  1002, 1002, 1003, 1004, 1005, 1006, 1006, 1007, 1008, 1009,
2365  1010, 1011, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018,
2366  1019, 1020, 1021, 1022, 1023, 1025, 1024, 1026, 1026, 1027,
2367  1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1036,
2368  1037, 1038, 1039, 1040, 1040, 1041, 1042, 1043, 1043, 1044,
2369  1045, 1046, 1047, 1047, 1048, 1048
2370 };
2371 
2372 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2373 static const yytype_uint8 yyr2[] =
2374 {
2375  0, 2, 8, 1, 1, 1, 1, 0, 0, 4,
2376  1, 5, 0, 2, 3, 1, 1, 2, 0, 2,
2377  1, 1, 1, 1, 4, 4, 4, 4, 0, 3,
2378  1, 1, 1, 1, 1, 3, 0, 2, 0, 3,
2379  1, 1, 1, 1, 1, 3, 0, 2, 1, 1,
2380  1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
2381  0, 2, 1, 1, 1, 1, 2, 3, 1, 1,
2382  0, 2, 1, 1, 1, 1, 2, 3, 1, 1,
2383  0, 2, 1, 1, 1, 1, 3, 1, 0, 2,
2384  3, 1, 1, 0, 2, 1, 1, 1, 2, 1,
2385  3, 1, 1, 0, 2, 1, 1, 1, 1, 4,
2386  1, 2, 3, 1, 1, 0, 2, 1, 1, 1,
2387  1, 1, 1, 1, 2, 3, 1, 1, 0, 2,
2388  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2389  1, 1, 0, 2, 1, 1, 1, 1, 1, 2,
2390  3, 1, 1, 0, 2, 1, 1, 1, 3, 3,
2391  1, 1, 1, 1, 1, 3, 1, 1, 1, 3,
2392  1, 1, 0, 2, 1, 1, 1, 3, 3, 1,
2393  1, 1, 1, 1, 3, 1, 1, 1, 0, 2,
2394  1, 1, 1, 1, 6, 0, 3, 1, 1, 1,
2395  1, 1, 3, 1, 0, 2, 3, 1, 1, 0,
2396  2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2397  1, 1, 1, 2, 0, 3, 1, 1, 1, 1,
2398  1, 3, 1, 0, 2, 3, 1, 1, 0, 2,
2399  1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
2400  0, 3, 1, 1, 1, 1, 1, 3, 1, 0,
2401  2, 3, 1, 1, 0, 2, 1, 1, 1, 1,
2402  1, 1, 1, 1, 1, 1, 2, 0, 2, 1,
2403  1, 1, 1, 2, 3, 3, 4, 1, 5, 1,
2404  2, 0, 4, 0, 3, 1, 3, 3, 0, 3,
2405  0, 2, 1, 1, 4, 4, 1, 3, 1, 2,
2406  1, 2, 0, 4, 4, 1, 2, 0, 3, 0,
2407  2, 1, 1, 4, 4, 1, 3, 1, 2, 1,
2408  2, 0, 4, 4, 1, 2, 0, 3, 0, 2,
2409  1, 1, 4, 1, 3, 1, 2, 1, 2, 0,
2410  4, 4, 1, 2, 0, 4, 1, 2, 0, 2,
2411  1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
2412  4, 4, 4, 4, 4, 3, 4, 4, 4, 4,
2413  4, 4, 4, 4, 4, 4, 4, 3, 3, 2,
2414  0, 2, 1, 1, 1, 1, 1, 1, 0, 2,
2415  3, 1, 1, 0, 2, 1, 1, 3, 3, 1,
2416  1, 2, 1, 3, 1, 1, 0, 2, 3, 1,
2417  0, 1, 3, 3, 1, 1, 2, 1, 3, 3,
2418  1, 1, 0, 2, 1, 1, 1, 1, 1, 1,
2419  1, 1, 1, 1, 1, 3, 2, 0, 3, 1,
2420  1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
2421  1, 1, 2, 1, 0, 2, 1, 1, 1, 1,
2422  1, 1, 1, 1, 4, 1, 1, 0, 2, 1,
2423  1, 3, 0, 2, 2, 1, 1, 1, 1, 3,
2424  1, 2, 1, 1, 1, 1, 3, 1, 2, 1,
2425  1, 1, 1, 3, 1, 4, 1, 1, 0, 2,
2426  1, 1, 3, 0, 2, 2, 1, 1, 1, 1,
2427  3, 1, 4, 1, 1, 0, 2, 1, 1, 3,
2428  0, 2, 0, 2, 1, 1, 1, 1, 3, 1,
2429  0, 2, 3, 1, 1, 0, 2, 1, 1, 1,
2430  1, 1, 3, 0, 2, 3, 1, 0, 1, 3,
2431  4, 1, 1, 0, 2, 1, 1, 3, 0, 2,
2432  0, 2, 1, 1, 1, 1, 3, 0, 2, 2,
2433  1, 1, 1, 1, 3, 4, 1, 1, 0, 2,
2434  1, 1, 3, 0, 2, 2, 1, 1, 1, 1,
2435  3, 1, 4, 1, 1, 0, 2, 1, 1, 3,
2436  0, 2, 0, 2, 1, 1, 1, 1, 3, 0,
2437  2, 3, 1, 0, 2, 1, 1, 1, 3, 5,
2438  1, 0, 1, 1, 3, 1, 1, 5, 1, 3,
2439  1, 1, 1, 1, 1, 3, 1, 3, 1, 1,
2440  1, 1, 1, 3, 1, 0, 2, 3, 1, 1,
2441  0, 2, 1, 1, 1, 1, 1, 1, 1, 3,
2442  2, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2443  4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2444  4, 4, 4, 1, 1, 1, 3, 1, 1, 1,
2445  3, 1, 1, 1, 3, 1, 1, 1, 3, 1,
2446  1, 1, 3, 1, 1, 1, 3, 1, 1, 1,
2447  3, 1, 1, 1, 3, 1, 1, 1, 3, 0,
2448  4, 1, 5, 0, 2, 5, 1, 1, 0, 2,
2449  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2450  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2451  1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2452  3, 1, 2, 0, 3, 1, 2, 0, 5, 0,
2453  5, 0, 5, 0, 4, 0, 5, 0, 5, 0,
2454  4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
2455  4, 3, 1, 1, 0, 4, 0, 6, 0, 4,
2456  0, 4, 0, 4, 3, 1, 1, 2, 0, 2,
2457  1, 1, 1, 0, 4, 0, 4, 1, 2, 0,
2458  4, 0, 2, 1, 1, 4, 4, 0, 4, 0,
2459  2, 0, 4, 0, 2, 0, 4, 0, 2, 0,
2460  4, 0, 2, 0, 4, 0, 2, 1, 1, 1,
2461  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2462  1, 1, 1, 1, 1, 1, 3, 1, 1, 2,
2463  4, 3, 1, 1, 2, 4, 3, 1, 1, 2,
2464  4, 3, 1, 1, 2, 4, 2, 1, 2, 2,
2465  1, 3, 2, 1, 2, 2, 1, 2, 4, 1,
2466  0, 1, 2, 4, 1, 0, 1, 2, 3, 2,
2467  1, 1, 2, 2, 1, 3, 2, 1, 2, 2,
2468  1, 3, 2, 1, 3, 0, 4, 0, 2, 2,
2469  1, 3, 2, 1, 6, 2, 1, 2, 0, 3,
2470  1, 1, 4, 1, 1, 1, 3, 0, 2, 5,
2471  1, 1, 0, 2, 1, 1
2472 };
2473 
2474 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2475  STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2476  means the default is an error. */
2477 static const yytype_uint16 yydefact[] =
2478 {
2479  8, 10, 0, 729, 0, 1, 731, 28, 0, 0,
2480  12, 30, 38, 0, 0, 733, 0, 0, 40, 188,
2481  0, 0, 0, 31, 0, 0, 0, 9, 15, 13,
2482  18, 190, 277, 0, 0, 0, 41, 0, 34, 36,
2483  29, 32, 33, 0, 730, 736, 734, 738, 0, 0,
2484  279, 0, 0, 193, 195, 189, 191, 192, 0, 44,
2485  46, 39, 42, 43, 0, 0, 0, 0, 737, 11,
2486  16, 0, 0, 0, 0, 0, 14, 19, 20, 21,
2487  22, 23, 4, 3, 7, 282, 354, 278, 280, 281,
2488  197, 224, 0, 0, 0, 365, 35, 430, 37, 432,
2489  732, 0, 707, 0, 0, 740, 741, 705, 706, 739,
2490  17, 0, 0, 0, 390, 6, 2, 5, 283, 287,
2491  0, 0, 0, 0, 226, 250, 0, 0, 0, 198,
2492  366, 45, 58, 68, 78, 101, 113, 126, 140, 151,
2493  170, 47, 48, 60, 49, 70, 50, 80, 51, 103,
2494  52, 115, 53, 128, 54, 142, 55, 153, 56, 172,
2495  0, 431, 787, 779, 781, 785, 789, 791, 837, 853,
2496  799, 783, 806, 793, 795, 797, 825, 802, 804, 845,
2497  841, 849, 769, 773, 777, 815, 808, 810, 812, 0,
2498  763, 764, 744, 745, 747, 748, 749, 750, 752, 753,
2499  754, 756, 755, 757, 759, 0, 760, 758, 766, 767,
2500  768, 742, 818, 743, 746, 765, 761, 762, 751, 0,
2501  0, 0, 0, 0, 0, 0, 284, 0, 291, 285,
2502  358, 252, 948, 0, 0, 0, 227, 0, 201, 204,
2503  196, 199, 200, 0, 59, 0, 69, 0, 79, 0,
2504  102, 0, 114, 0, 127, 0, 141, 0, 152, 0,
2505  171, 444, 447, 429, 442, 443, 699, 0, 715, 0,
2506  711, 0, 0, 0, 433, 436, 435, 437, 697, 698,
2507  434, 709, 710, 438, 713, 714, 0, 0, 0, 0,
2508  0, 0, 839, 855, 0, 0, 0, 0, 0, 0,
2509  831, 0, 847, 843, 851, 0, 0, 0, 0, 0,
2510  0, 735, 0, 0, 708, 0, 24, 25, 27, 26,
2511  390, 390, 392, 393, 394, 395, 391, 0, 291, 289,
2512  0, 0, 950, 0, 0, 0, 0, 253, 0, 230,
2513  233, 225, 228, 229, 0, 0, 65, 0, 57, 61,
2514  63, 62, 64, 75, 0, 67, 71, 73, 72, 74,
2515  85, 88, 77, 81, 83, 82, 84, 110, 0, 100,
2516  0, 104, 107, 106, 105, 108, 123, 0, 112, 0,
2517  0, 0, 116, 121, 120, 122, 118, 117, 119, 137,
2518  0, 125, 0, 0, 129, 134, 133, 135, 136, 131,
2519  130, 132, 148, 0, 139, 0, 143, 147, 145, 144,
2520  146, 0, 150, 154, 156, 155, 157, 0, 169, 173,
2521  175, 174, 176, 449, 0, 464, 451, 0, 0, 0,
2522  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2523  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2524  0, 771, 0, 770, 775, 0, 774, 0, 882, 887,
2525  892, 897, 900, 909, 914, 920, 924, 927, 930, 933,
2526  935, 940, 943, 946, 877, 903, 906, 0, 857, 0,
2527  858, 0, 859, 0, 860, 0, 861, 0, 862, 0,
2528  875, 0, 863, 0, 864, 910, 865, 915, 866, 0,
2529  867, 0, 868, 0, 869, 0, 870, 0, 871, 872,
2530  0, 873, 0, 874, 0, 0, 0, 803, 801, 816,
2531  0, 719, 0, 0, 820, 821, 717, 718, 814, 819,
2532  822, 687, 387, 388, 0, 286, 290, 293, 356, 0,
2533  0, 0, 355, 359, 360, 361, 194, 0, 0, 951,
2534  0, 256, 259, 251, 254, 255, 0, 0, 367, 203,
2535  207, 202, 205, 209, 66, 76, 0, 87, 111, 0,
2536  124, 390, 0, 0, 138, 0, 0, 149, 0, 160,
2537  0, 0, 179, 0, 0, 445, 446, 0, 450, 700,
2538  716, 712, 0, 0, 0, 0, 0, 0, 790, 792,
2539  838, 840, 854, 856, 800, 784, 0, 794, 796, 798,
2540  827, 0, 0, 0, 826, 832, 833, 834, 805, 846,
2541  848, 842, 844, 850, 852, 772, 776, 0, 937, 809,
2542  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2543  896, 0, 899, 0, 902, 0, 905, 0, 0, 911,
2544  0, 916, 921, 0, 919, 0, 923, 0, 926, 0,
2545  929, 0, 932, 0, 939, 0, 942, 0, 945, 811,
2546  813, 817, 0, 823, 0, 0, 0, 357, 390, 390,
2547  0, 955, 957, 949, 953, 954, 0, 0, 368, 232,
2548  236, 231, 234, 238, 0, 208, 99, 86, 91, 89,
2549  93, 0, 0, 0, 0, 0, 0, 375, 168, 158,
2550  0, 0, 161, 187, 177, 0, 180, 635, 475, 506,
2551  523, 561, 603, 586, 630, 465, 466, 477, 467, 508,
2552  468, 525, 469, 563, 470, 588, 471, 605, 472, 631,
2553  473, 0, 463, 0, 448, 695, 0, 0, 0, 0,
2554  0, 0, 0, 0, 0, 452, 453, 456, 457, 458,
2555  459, 461, 454, 455, 460, 693, 694, 672, 674, 788,
2556  780, 782, 786, 0, 828, 829, 0, 390, 778, 0,
2557  0, 0, 878, 0, 876, 0, 883, 0, 881, 0,
2558  888, 0, 886, 0, 893, 0, 891, 898, 0, 904,
2559  907, 0, 0, 0, 922, 0, 928, 0, 0, 0,
2560  0, 947, 720, 0, 288, 0, 295, 298, 292, 0,
2561  0, 0, 0, 369, 258, 262, 257, 260, 264, 0,
2562  237, 222, 0, 206, 0, 0, 0, 0, 0, 0,
2563  727, 0, 0, 210, 215, 217, 213, 214, 216, 218,
2564  212, 211, 221, 219, 220, 725, 726, 0, 92, 109,
2565  370, 371, 372, 373, 374, 0, 164, 398, 159, 162,
2566  163, 183, 398, 178, 181, 182, 0, 476, 0, 507,
2567  0, 524, 0, 562, 0, 587, 0, 604, 0, 632,
2568  0, 0, 636, 462, 390, 0, 0, 0, 0, 0,
2569  0, 0, 390, 807, 0, 0, 0, 936, 938, 0,
2570  0, 879, 0, 884, 0, 889, 0, 894, 901, 918,
2571  0, 908, 0, 913, 925, 931, 934, 941, 0, 824,
2572  294, 300, 0, 317, 363, 364, 952, 956, 960, 958,
2573  962, 0, 263, 248, 0, 235, 0, 0, 0, 239,
2574  245, 242, 243, 244, 241, 240, 247, 246, 223, 0,
2575  0, 0, 0, 0, 0, 0, 0, 97, 0, 90,
2576  94, 96, 95, 0, 0, 0, 166, 396, 397, 0,
2577  185, 0, 703, 0, 0, 478, 479, 480, 701, 702,
2578  0, 509, 510, 511, 0, 526, 527, 528, 0, 564,
2579  565, 566, 0, 589, 590, 591, 0, 606, 607, 608,
2580  0, 0, 0, 634, 696, 0, 0, 0, 0, 0,
2581  0, 0, 0, 0, 830, 836, 835, 376, 880, 885,
2582  890, 895, 912, 917, 0, 0, 296, 319, 336, 0,
2583  961, 275, 0, 261, 0, 265, 270, 272, 268, 269,
2584  271, 273, 267, 266, 274, 249, 0, 0, 0, 0,
2585  0, 0, 0, 0, 0, 728, 0, 98, 673, 0,
2586  0, 167, 165, 401, 399, 403, 186, 184, 485, 474,
2587  482, 0, 0, 0, 513, 505, 530, 522, 568, 560,
2588  593, 585, 610, 602, 0, 0, 640, 0, 0, 389,
2589  678, 691, 692, 679, 680, 681, 682, 690, 0, 308,
2590  312, 0, 0, 301, 302, 303, 299, 306, 0, 338,
2591  297, 0, 964, 965, 963, 276, 0, 0, 0, 0,
2592  377, 384, 378, 385, 380, 381, 689, 0, 412, 0,
2593  408, 409, 410, 0, 402, 492, 0, 0, 0, 488,
2594  398, 484, 486, 487, 704, 0, 0, 0, 532, 0,
2595  570, 0, 0, 0, 612, 0, 633, 629, 671, 648,
2596  655, 0, 0, 641, 944, 309, 312, 310, 0, 0,
2597  0, 327, 331, 0, 0, 320, 321, 322, 318, 325,
2598  0, 0, 0, 382, 386, 379, 0, 0, 411, 0,
2599  400, 0, 404, 406, 405, 481, 499, 483, 0, 495,
2600  398, 491, 493, 494, 490, 0, 675, 516, 514, 0,
2601  512, 534, 531, 0, 529, 572, 569, 0, 567, 596,
2602  594, 0, 592, 614, 611, 0, 609, 0, 0, 649,
2603  644, 398, 639, 642, 643, 307, 311, 0, 0, 0,
2604  328, 331, 329, 0, 0, 0, 345, 349, 0, 0,
2605  339, 340, 337, 343, 341, 959, 383, 677, 413, 0,
2606  0, 502, 416, 498, 500, 501, 497, 0, 489, 519,
2607  398, 515, 517, 518, 537, 540, 533, 535, 536, 575,
2608  577, 571, 573, 574, 599, 398, 595, 597, 598, 617,
2609  619, 613, 615, 616, 638, 658, 637, 656, 660, 652,
2610  398, 647, 650, 651, 646, 0, 0, 0, 305, 304,
2611  326, 330, 0, 0, 0, 346, 349, 347, 0, 0,
2612  0, 407, 0, 0, 504, 414, 415, 0, 496, 521,
2613  0, 0, 539, 0, 601, 0, 0, 0, 659, 654,
2614  0, 645, 0, 315, 0, 313, 0, 0, 324, 323,
2615  344, 348, 0, 0, 0, 688, 0, 419, 417, 420,
2616  503, 520, 538, 543, 541, 545, 580, 576, 578, 0,
2617  600, 622, 618, 620, 623, 668, 447, 657, 666, 667,
2618  390, 390, 661, 662, 663, 664, 665, 653, 0, 316,
2619  0, 334, 0, 332, 0, 0, 362, 342, 427, 0,
2620  423, 424, 425, 0, 421, 0, 544, 583, 0, 579,
2621  581, 582, 0, 464, 0, 0, 0, 314, 0, 335,
2622  0, 352, 0, 350, 0, 426, 390, 418, 551, 553,
2623  542, 549, 550, 0, 0, 546, 547, 548, 0, 0,
2624  723, 0, 624, 621, 627, 626, 625, 721, 722, 670,
2625  669, 390, 390, 333, 0, 353, 428, 0, 0, 0,
2626  390, 584, 0, 0, 683, 684, 351, 422, 552, 556,
2627  554, 557, 0, 0, 628, 724, 0, 0, 558, 676,
2628  686, 390, 0, 555, 0, 0, 685, 559
2629 };
2630 
2631 /* YYDEFGOTO[NTERM-NUM]. */
2632 static const yytype_int16 yydefgoto[] =
2633 {
2634  -1, 2, 84, 116, 117, 3, 4, 10, 17, 29,
2635  30, 76, 49, 77, 78, 79, 80, 81, 12, 13,
2636  22, 40, 41, 42, 65, 19, 20, 35, 61, 62,
2637  63, 94, 141, 142, 143, 243, 244, 349, 348, 144,
2638  145, 245, 246, 356, 355, 146, 147, 247, 248, 363,
2639  362, 566, 567, 699, 700, 857, 858, 970, 969, 697,
2640  148, 149, 249, 250, 371, 372, 369, 150, 151, 251,
2641  252, 382, 378, 152, 153, 253, 254, 394, 391, 154,
2642  155, 255, 256, 406, 404, 156, 157, 257, 258, 413,
2643  412, 580, 581, 711, 868, 869, 870, 975, 1072, 709,
2644  158, 159, 259, 260, 419, 418, 583, 584, 715, 873,
2645  874, 875, 979, 1077, 714, 32, 33, 55, 56, 57,
2646  91, 92, 128, 240, 241, 242, 561, 345, 562, 563,
2647  694, 695, 843, 833, 125, 126, 235, 341, 342, 343,
2648  691, 557, 692, 693, 829, 830, 949, 945, 232, 233,
2649  336, 553, 554, 555, 826, 687, 827, 828, 941, 942,
2650  1045, 1043, 51, 52, 87, 88, 89, 120, 121, 228,
2651  328, 329, 330, 676, 818, 932, 933, 1035, 1113, 1114,
2652  1115, 1116, 1117, 1176, 1177, 1178, 1317, 1355, 1038, 1118,
2653  1185, 1186, 1187, 1188, 1189, 1251, 1252, 1253, 1357, 1403,
2654  1120, 1190, 1260, 1261, 1262, 1263, 1326, 1327, 1328, 1405,
2655  1433, 122, 123, 542, 331, 543, 1264, 544, 545, 23,
2656  36, 129, 236, 337, 383, 384, 385, 397, 398, 407,
2657  632, 844, 845, 950, 846, 847, 952, 1049, 848, 849,
2658  953, 224, 1014, 225, 326, 976, 977, 1074, 1075, 1143,
2659  1144, 1202, 1200, 978, 1140, 1141, 1142, 1334, 1335, 1368,
2660  1369, 1413, 1437, 1336, 1410, 1411, 1412, 98, 99, 160,
2661  161, 274, 263, 264, 265, 424, 425, 426, 587, 588,
2662  755, 744, 586, 725, 726, 727, 876, 877, 985, 1079,
2663  1146, 1080, 1081, 1151, 1152, 1153, 1215, 1147, 1148, 1211,
2664  1212, 1213, 1277, 1207, 1208, 1273, 1274, 1275, 1337, 728,
2665  729, 878, 879, 991, 1085, 1157, 1218, 1219, 1281, 1282,
2666  1283, 1340, 730, 731, 880, 881, 995, 1087, 1159, 1222,
2667  1223, 1286, 1287, 1288, 1341, 1342, 1374, 1375, 1415, 1416,
2668  1445, 1440, 1441, 1442, 1468, 1480, 1481, 1487, 1493, 732,
2669  733, 882, 883, 999, 1089, 1161, 1226, 1227, 1291, 1292,
2670  1293, 1343, 1378, 1379, 1419, 1420, 1421, 734, 735, 884,
2671  885, 1003, 1091, 1163, 1230, 1231, 1296, 1297, 1298, 1345,
2672  736, 737, 886, 887, 1007, 1093, 1165, 1234, 1235, 1301,
2673  1302, 1303, 1346, 1383, 1384, 1422, 1452, 1453, 738, 739,
2674  888, 1167, 740, 741, 891, 1013, 1306, 1097, 1098, 1172,
2675  1242, 1243, 1244, 1315, 1170, 1171, 1238, 1311, 1312, 1313,
2676  1350, 1237, 1307, 1308, 1347, 1348, 1392, 1387, 1388, 1389,
2677  1424, 892, 275, 712, 276, 986, 1446, 1070, 756, 757,
2678  758, 759, 760, 1393, 1394, 1488, 1447, 105, 1203, 852,
2679  761, 762, 763, 764, 765, 766, 277, 278, 279, 987,
2680  988, 989, 106, 107, 108, 280, 281, 282, 283, 284,
2681  285, 525, 526, 527, 1456, 1457, 1458, 854, 855, 856,
2682  7, 8, 15, 25, 46, 47, 67, 68, 109, 189,
2683  190, 305, 453, 191, 306, 456, 192, 307, 193, 287,
2684  194, 288, 195, 295, 196, 289, 197, 286, 198, 290,
2685  199, 291, 200, 297, 201, 298, 202, 299, 203, 294,
2686  204, 205, 518, 206, 301, 207, 296, 208, 308, 209,
2687  309, 210, 310, 211, 212, 528, 313, 529, 530, 813,
2688  213, 300, 614, 904, 446, 615, 616, 617, 214, 292,
2689  438, 215, 303, 449, 216, 302, 448, 217, 304, 450,
2690  218, 293, 439, 477, 478, 479, 784, 480, 481, 788,
2691  634, 482, 483, 792, 636, 484, 485, 796, 638, 486,
2692  487, 640, 488, 489, 642, 490, 491, 644, 492, 493,
2693  646, 494, 495, 648, 921, 496, 497, 650, 923, 649,
2694  498, 499, 654, 500, 501, 656, 502, 503, 658, 504,
2695  505, 660, 506, 507, 662, 508, 628, 779, 509, 510,
2696  664, 511, 512, 666, 513, 514, 668, 333, 334, 548,
2697  549, 683, 684, 685, 822, 939, 940, 1039, 1040, 1124
2698 };
2699 
2700 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2701  STATE-NUM. */
2702 #define YYPACT_NINF -1315
2703 static const yytype_int16 yypact[] =
2704 {
2705  14, -1315, 97, -189, 104, -1315, -1315, -78, -166, 119,
2706  -1315, -1315, 96, -24, 138, -1315, 143, 60, -1315, -89,
2707  142, 155, 126, -1315, 161, -177, 162, -1315, -1315, -1315,
2708  -1315, -1315, 99, 195, 172, 202, -1315, 177, -1315, -1315,
2709  -1315, -1315, -1315, 199, -1315, -1315, -1315, -1315, 167, 41,
2710  -1315, 182, 221, -1315, -58, -1315, -1315, -1315, 197, -1315,
2711  -1315, -1315, -1315, -1315, 212, 48, 224, 230, -50, -1315,
2712  -1315, 213, 258, 262, 268, 270, -1315, -1315, -1315, -1315,
2713  -1315, -1315, -1315, -1315, 223, -1315, 220, -1315, -1315, -1315,
2714  -1315, 33, 101, 282, 301, -1315, -1315, -1315, -1315, -1315,
2715  -1315, 590, -1315, 330, 338, -1315, -1315, -1315, -1315, -1315,
2716  -1315, 344, 348, 373, -1315, -1315, -1315, -1315, -1315, -1315,
2717  290, 353, 300, 305, -1315, 132, 209, 414, 293, -1315,
2718  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2719  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2720  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2721  316, -26, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2722  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2723  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 94,
2724  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2725  -1315, -1315, -1315, -1315, -1315, 590, -1315, -1315, -1315, -1315,
2726  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 419,
2727  452, 453, 467, 490, 495, 37, -1315, 497, -1315, -1315,
2728  -1315, -1315, 139, 328, 501, 319, -1315, 507, -1315, -1315,
2729  -1315, -1315, -1315, 321, -16, 329, -16, 331, -16, 334,
2730  50, 361, 259, 363, 254, 365, 22, 500, -16, 504,
2731  -16, -1315, 311, -1315, -1315, -1315, -1315, 535, -1315, 537,
2732  -1315, 539, 536, 538, -1315, -1315, -1315, -1315, -1315, -1315,
2733  -1315, -1315, -1315, -1315, -1315, -1315, 590, 590, 590, 590,
2734  590, 590, -1315, -1315, 590, 590, 590, 590, 590, 590,
2735  -1315, 590, -1315, -1315, -1315, 371, 382, 590, 135, 135,
2736  135, -1315, 204, 35, -1315, 544, -1315, -1315, -1315, -1315,
2737  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 548, 477, -1315,
2738  492, 90, -1315, 320, 249, 552, 384, -1315, 558, -1315,
2739  -1315, -1315, -1315, -1315, 562, 152, -1315, 517, -1315, -1315,
2740  -1315, -1315, -1315, -1315, 523, -1315, -1315, -1315, -1315, -1315,
2741  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 524, -1315,
2742  570, -1315, -1315, -1315, -1315, -1315, -1315, 525, -1315, 572,
2743  573, 575, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2744  526, -1315, 576, 578, -1315, -1315, -1315, -1315, -1315, -1315,
2745  -1315, -1315, -1315, 527, -1315, 584, -1315, -1315, -1315, -1315,
2746  -1315, 518, -1315, -1315, -1315, -1315, -1315, 515, -1315, -1315,
2747  -1315, -1315, -1315, -1315, 387, -1315, -1315, 585, 587, 588,
2748  592, 593, 590, 590, 590, 590, 277, 274, 299, 206,
2749  271, 272, 590, 264, 269, 265, 43, 256, 318, 411,
2750  450, -1315, 252, -1315, -1315, 253, -1315, 590, -1315, -1315,
2751  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2752  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 246, -1315, 19,
2753  -1315, 418, -1315, 420, -1315, 422, -1315, 135, -1315, 135,
2754  -1315, 590, -1315, 135, -1315, 217, -1315, 217, -1315, 388,
2755  -1315, 135, -1315, 135, -1315, 135, -1315, 135, -1315, -1315,
2756  590, -1315, 590, -1315, 135, 257, 261, -1315, -1315, -1315,
2757  263, -1315, 628, 667, -1315, -1315, -1315, -1315, -1315, -1315,
2758  -1315, -1315, -159, -159, 664, -1315, -1315, 542, -1315, 595,
2759  668, 672, -1315, -1315, -1315, -1315, -1315, 674, 392, -1315,
2760  678, -1315, -1315, -1315, -1315, -1315, 679, 156, -1315, -1315,
2761  -1315, -1315, -1315, -1315, -1315, -1315, 633, 618, -1315, 683,
2762  -1315, -1315, 684, 685, -1315, 686, 687, -1315, 688, -1315,
2763  631, 577, -1315, 630, 577, -1315, 89, 397, 136, -1315,
2764  -1315, -1315, 689, 690, 385, 386, 380, 381, -1315, -1315,
2765  -1315, -1315, -1315, -1315, -1315, -1315, 590, -1315, -1315, -1315,
2766  -1315, 505, 694, 697, -1315, -1315, -1315, -1315, -1315, -1315,
2767  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 350, -1315, -1315,
2768  700, 703, 399, 704, 401, 705, 403, 706, 405, 345,
2769  -1315, 135, -1315, 322, -1315, 317, -1315, 713, 707, -1315,
2770  708, -1315, -1315, 343, -1315, 135, -1315, 340, -1315, 135,
2771  -1315, 135, -1315, 135, -1315, 590, -1315, 333, -1315, -1315,
2772  -1315, -1315, 717, -1315, 718, 730, 408, -1315, -1315, -1315,
2773  729, -1315, -1315, -1315, -1315, -1315, 731, 171, -1315, -1315,
2774  -1315, -1315, -1315, -1315, 423, 42, -1315, -1315, -1315, -1315,
2775  -1315, 733, 735, 737, 739, 741, 743, -1315, -1315, -1315,
2776  745, 425, -1315, -1315, -1315, 427, -1315, -1315, -1315, -1315,
2777  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2778  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 303,
2779  -1315, 594, -1315, 532, -1315, -1315, 752, 749, 753, 772,
2780  774, 776, 778, 780, 782, -1315, -1315, -1315, -1315, -1315,
2781  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2782  -1315, -1315, -1315, 456, -1315, -1315, 788, -1315, -1315, -114,
2783  790, 792, -1315, 404, -1315, 796, -1315, 560, -1315, 802,
2784  -1315, 564, -1315, 804, -1315, 565, -1315, -1315, 449, -1315,
2785  -1315, 808, 135, 135, -1315, 432, -1315, 439, 441, 435,
2786  590, -1315, -1315, 821, -1315, 823, -1315, 568, -1315, 827,
2787  829, 831, -178, -1315, -1315, -1315, -1315, -1315, -1315, 438,
2788  87, -1315, 597, -1315, 833, 837, 839, 843, 845, 847,
2789  -1315, 854, 851, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2790  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 440, -54, -1315,
2791  -1315, -1315, -1315, -1315, -1315, 855, -1315, 747, -1315, -1315,
2792  -1315, -1315, 747, -1315, -1315, -1315, 852, -40, 860, -40,
2793  862, -40, 863, -40, 864, -40, 865, -40, 866, -1315,
2794  857, 867, -1315, -1315, -1315, 873, 874, 875, 876, 877,
2795  878, 879, -1315, -1315, 543, 880, 881, -1315, -1315, 882,
2796  883, -1315, 884, -1315, 885, -1315, 886, -1315, -1315, -1315,
2797  512, -1315, 519, -1315, -1315, -1315, -1315, -1315, 590, -1315,
2798  -1315, -1315, 815, 640, -1315, -1315, -1315, -1315, -1315, -1315,
2799  -1315, 442, 170, -1315, 648, -1315, 891, 892, 893, -1315,
2800  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 896,
2801  898, 900, 902, 904, 906, 908, 912, -1315, 849, -1315,
2802  -1315, -1315, -1315, 914, 716, 853, -1315, 816, -1315, 859,
2803  -1315, 699, -1315, 929, 928, -1315, -1315, -1315, -1315, -1315,
2804  699, -1315, -1315, -1315, 699, -1315, -1315, -1315, 699, -1315,
2805  -1315, -1315, 699, -1315, -1315, -1315, 699, -1315, -1315, -1315,
2806  135, 932, 748, -1315, -1315, 23, 934, 936, 938, 940,
2807  942, 944, 946, 948, -1315, -1315, -1315, -1315, -1315, -1315,
2808  -1315, -1315, -1315, -1315, 135, 39, -1315, -1315, 701, 947,
2809  -50, -1315, 709, -1315, 952, -1315, -1315, -1315, -1315, -1315,
2810  -1315, -1315, -1315, -1315, -1315, -1315, 955, 958, 959, 960,
2811  961, 962, 963, 964, 965, -1315, 966, -1315, -1315, 967,
2812  444, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2813  734, 446, 968, 971, 734, -1315, 734, -1315, 734, -1315,
2814  734, -1315, 734, -1315, 726, 970, -1315, 727, 577, -1315,
2815  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 589, -1315,
2816  714, 974, 975, -1315, -1315, -1315, -1315, -1315, 51, -1315,
2817  -1315, 135, -1315, -1315, -1315, -1315, 973, 976, 977, 978,
2818  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 981, -1315, 44,
2819  -1315, -1315, -1315, 979, 267, -1315, 770, 754, 455, -1315,
2820  747, -1315, -1315, -1315, -1315, 983, 757, 773, 759, 775,
2821  760, 777, 761, 771, 763, 779, -1315, -1315, -1315, -1315,
2822  -1315, 577, 457, -1315, -1315, -1315, 736, -1315, 740, 994,
2823  998, -1315, 750, 999, 1001, -1315, -1315, -1315, -1315, -1315,
2824  53, 695, 1002, -1315, -1315, -1315, 1003, 894, -1315, 1006,
2825  -1315, 1005, -1315, -1315, -1315, -1315, -1315, -1315, 459, -1315,
2826  747, -1315, -1315, -1315, -1315, 784, -1315, -1315, -1315, 461,
2827  -1315, -1315, -1315, 463, -1315, -1315, -1315, 468, -1315, -1315,
2828  -1315, 470, -1315, -1315, -1315, 472, -1315, 276, 476, -1315,
2829  -1315, 747, -1315, -1315, -1315, -1315, -1315, 819, 1009, 1010,
2830  -1315, 762, -1315, 764, 1015, 1016, -1315, 765, 1017, 1018,
2831  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 910,
2832  1022, -1315, 909, -1315, -1315, -1315, -1315, 797, -1315, -1315,
2833  747, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2834  -1315, -1315, -1315, -1315, -1315, 747, -1315, -1315, -1315, -1315,
2835  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2836  747, -1315, -1315, -1315, -1315, 812, 1024, 478, -1315, -1315,
2837  -1315, -1315, 835, 1025, 1026, -1315, 781, -1315, 783, 1029,
2838  1030, -1315, 1031, 716, -1315, 925, -1315, 805, -1315, -1315,
2839  809, 810, 935, -75, -1315, 813, -57, 480, -35, -1315,
2840  826, -1315, 1038, -1315, 786, -1315, 1040, 482, -1315, -1315,
2841  -1315, -1315, 856, 1044, 1045, -1315, 484, -1315, -1315, 858,
2842  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 486,
2843  -1315, -1315, -1315, -1315, -1315, -1315, 311, -1315, -1315, -1315,
2844  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 1046, -1315,
2845  1050, -1315, 801, -1315, 1051, 491, -1315, -1315, -1315, 66,
2846  -1315, -1315, -1315, 1047, -1315, 566, -105, -1315, 590, -1315,
2847  -1315, -1315, 28, -1315, 850, 1055, 1056, -1315, 1057, -1315,
2848  1058, -1315, 803, -1315, 945, -1315, -1315, -1315, -1315, -1315,
2849  -1315, -1315, -1315, 1059, 1060, -1315, -1315, -1315, 956, 1064,
2850  -1315, 1070, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 89,
2851  -1315, -1315, -1315, -1315, 1066, -1315, -1315, 969, -38, 1069,
2852  -1315, -1315, 972, 1068, -1315, -1315, -1315, -1315, -1315, -1315,
2853  -1315, 887, 1071, 1072, -1315, -1315, 1073, 1067, -1315, -1315,
2854  -1315, -1315, 1077, -1315, 1076, 861, -1315, -1315
2855 };
2856 
2857 /* YYPGOTO[NTERM-NUM]. */
2858 static const yytype_int16 yypgoto[] =
2859 {
2860  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2861  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2862  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2863  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2864  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2865  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2866  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2867  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2868  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2869  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2870  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2871  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2872  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2873  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2874  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2875  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2876  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2877  -1315, 766, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2878  -1315, -1315, -1315, -1315, -99, -1315, -1315, -1315, -1315, -1315,
2879  -1315, -1315, -1315, -1315, -1315, -1315, -164, -1315, -1315, -1315,
2880  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -238, -1315, -1315,
2881  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2882  -1315, -1315, -1315, -1315, 836, 838, -1315, -1315, -1315, -1315,
2883  -1315, 147, 149, -1315, -783, -1315, -1315, -1315, 151, 153,
2884  -1315, -567, -1314, -319, -1315, -863, -1315, -1315, -1315, -1315,
2885  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2886  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2887  -1315, -1315, -1315, -1315, -1315, -1315, -290, -1315, -1315, -1315,
2888  -1315, -1315, -326, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2889  -1315, -734, -1315, -1315, -1315, -1315, -1315, -926, -1315, -1315,
2890  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2891  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2892  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2893  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2894  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2895  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2896  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2897  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2898  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2899  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2900  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2901  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2902  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2903  -1315, -1315, -236, -579, -233, -570, -1315, -235, -1315, -1315,
2904  -1315, -1315, -1315, -1315, -1315, -1315, -1315, 61, -322, -801,
2905  -1315, -1315, -1315, -1315, -1315, -1315, -218, -1315, -1315, -517,
2906  -1315, -1315, -706, -1315, -1315, -246, -1315, -1315, -310, -1315,
2907  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2908  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -205,
2909  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2910  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2911  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2912  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2913  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2914  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2915  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2916  -1315, -1315, -1315, -303, -1315, -1315, -1315, -1315, -1315, -1315,
2917  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2918  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2919  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, 606,
2920  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2921  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2922  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315,
2923  -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315, -1315
2924 };
2925 
2926 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2927  positive, shift that token. If negative, reduce the rule which
2928  number is the opposite. If zero, do what YYDEFACT says.
2929  If YYTABLE_NINF, syntax error. */
2930 #define YYTABLE_NINF -1
2931 static const yytype_uint16 yytable[] =
2932 {
2933  312, 532, 533, 524, 702, 716, 515, 516, 350, 980,
2934  357, 351, 364, 358, 373, 365, 386, 374, 399, 387,
2935  408, 400, 414, 409, 420, 415, 352, 421, 359, 956,
2936  366, 1099, 375, 889, 388, 405, 401, 1376, 410, 1449,
2937  416, 630, 422, 320, 321, 519, 520, 951, 1197, 1109,
2938  1110, 70, 71, 610, 611, 1381, 1, 971, 72, 73,
2939  1111, 1181, 1182, 1256, 1257, 834, 835, 836, 837, 838,
2940  1434, 839, 1183, 1443, 1258, 1478, 1425, 1426, 370, 268,
2941  269, 432, 433, 434, 435, 436, 437, 102, 103, 440,
2942  441, 442, 443, 444, 445, 1444, 447, 5, 268, 269,
2943  538, 539, 457, 27, 28, 266, 267, 268, 269, 540,
2944  541, 819, 820, 6, 838, 266, 267, 946, 9, 947,
2945  948, 982, 983, 11, 270, 271, 44, 16, 45, 984,
2946  937, 458, 938, 270, 271, 459, 38, 39, 14, 460,
2947  272, 273, 18, 842, 21, 104, 24, 1474, 1475, 26,
2948  272, 273, 31, 266, 267, 1390, 1391, 34, 1156, 1048,
2949  1158, 1377, 1160, 37, 1162, 1198, 1164, 43, 268, 269,
2950  48, 1450, 1451, 266, 267, 50, 521, 522, 69, 1382,
2951  58, 266, 267, 64, 639, 90, 641, 1435, 272, 273,
2952  645, 840, 841, 834, 835, 836, 837, 838, 655, 1479,
2953  657, 1044, 659, 93, 661, 53, 54, 66, 272, 273,
2954  906, 667, 59, 60, 631, 1112, 272, 273, 266, 267,
2955  95, 1184, 82, 83, 1201, 842, 1259, 594, 595, 596,
2956  597, 85, 86, 601, 603, 100, 74, 606, 612, 842,
2957  75, 101, 613, 620, 622, 624, 322, 323, 324, 325,
2958  96, 97, 627, 272, 273, 461, 1084, 462, 110, 463,
2959  1086, 464, 115, 465, 1088, 466, 111, 467, 1090, 468,
2960  112, 469, 1092, 470, 907, 471, 113, 472, 114, 473,
2961  124, 474, 127, 475, 842, 476, 643, 1214, 379, 380,
2962  130, 392, 393, 379, 380, 381, 717, 118, 119, 745,
2963  746, 266, 267, 238, 239, 663, 718, 665, 719, 992,
2964  720, 996, 721, 1000, 722, 1004, 723, 1008, 747, 748,
2965  749, 750, 751, 752, 753, 754, 261, 262, 724, 339,
2966  340, 346, 347, 219, 1123, 1023, 272, 273, 798, 353,
2967  354, 360, 361, 1204, 367, 368, 220, 1276, 131, 132,
2968  221, 133, 805, 134, 222, 135, 807, 136, 808, 137,
2969  809, 138, 993, 139, 997, 140, 1001, 226, 1005, 227,
2970  1009, 376, 377, 389, 390, 402, 403, 229, 1314, 223,
2971  458, 451, 452, 231, 459, 266, 267, 230, 460, 234,
2972  266, 267, 454, 455, 551, 552, 559, 560, 652, 653,
2973  311, 773, 681, 682, 689, 690, 775, 742, 743, 782,
2974  783, 786, 787, 790, 791, 794, 795, 1339, 816, 817,
2975  272, 273, 237, 824, 825, 272, 273, 314, 322, 323,
2976  324, 325, 1344, 831, 832, 866, 867, 871, 872, 523,
2977  102, 103, 322, 323, 324, 325, 332, 1349, 943, 944,
2978  967, 968, 1041, 1042, 1138, 1139, 1149, 1150, 315, 850,
2979  810, 316, 851, 1201, 842, 1209, 1210, 1240, 1241, 1271,
2980  1272, 1279, 1280, 1284, 1285, 317, 908, 853, 1289, 1290,
2981  1294, 1295, 1299, 1300, 1304, 1305, 1309, 1310, 1353, 1354,
2982  1385, 1386, 1401, 1402, 1408, 1409, 1417, 1418, 318, 920,
2983  922, 1431, 1432, 319, 461, 327, 462, 335, 463, 338,
2984  464, 411, 465, 344, 466, 417, 467, 423, 468, 1173,
2985  469, 162, 470, 163, 471, 164, 472, 165, 473, 166,
2986  474, 167, 475, 168, 476, 169, 602, 170, 427, 171,
2987  428, 172, 429, 173, 430, 174, 431, 175, 972, 176,
2988  517, 177, 531, 178, 534, 179, 535, 180, 547, 181,
2989  550, 182, 546, 183, 556, 184, 564, 185, 1414, 186,
2990  558, 187, 537, 188, 565, 1015, 1438, 1439, 569, 568,
2991  571, 572, 570, 573, 575, 574, 576, 578, 577, 582,
2992  579, 585, 1239, 589, 954, 590, 591, 955, 592, 593,
2993  599, 598, 607, 604, 618, 928, 605, 609, 625, 608,
2994  629, 626, 957, 633, 162, 635, 163, 637, 164, 647,
2995  165, 1455, 166, 669, 167, 671, 168, 600, 169, 670,
2996  170, 672, 171, 162, 172, 163, 173, 164, 174, 165,
2997  175, 166, 176, 167, 177, 168, 178, 169, 179, 170,
2998  180, 171, 181, 172, 182, 173, 183, 174, 184, 175,
2999  185, 176, 186, 177, 187, 178, 188, 179, 619, 180,
3000  673, 181, 674, 182, 675, 183, 678, 184, 677, 185,
3001  679, 186, 680, 187, 686, 188, 696, 688, 698, 701,
3002  703, 704, 705, 706, 708, 713, 707, 767, 768, 710,
3003  771, 769, 776, 772, 770, 777, 1052, 1094, 780, 1053,
3004  778, 781, 785, 789, 793, 797, 801, 800, 802, 803,
3005  799, 804, 806, 1034, 1054, 812, 162, 811, 163, 814,
3006  164, 1108, 165, 815, 166, 821, 167, 893, 168, 823,
3007  169, 859, 170, 860, 171, 861, 172, 862, 173, 863,
3008  174, 864, 175, 865, 176, 894, 177, 895, 178, 890,
3009  179, 896, 180, 621, 181, 162, 182, 163, 183, 164,
3010  184, 165, 185, 166, 186, 167, 187, 168, 188, 169,
3011  897, 170, 898, 171, 899, 172, 900, 173, 901, 174,
3012  902, 175, 903, 176, 905, 177, 909, 178, 910, 179,
3013  911, 180, 912, 181, 623, 182, 913, 183, 914, 184,
3014  916, 185, 924, 186, 915, 187, 919, 188, 1191, 917,
3015  162, 918, 163, 925, 164, 927, 165, 926, 166, 929,
3016  167, 930, 168, 931, 169, 934, 170, 935, 171, 936,
3017  172, 959, 173, 958, 174, 960, 175, 961, 176, 774,
3018  177, 962, 178, 963, 179, 964, 180, 965, 181, 966,
3019  182, 973, 183, 981, 184, 1011, 185, 974, 186, 1467,
3020  187, 990, 188, 994, 998, 1002, 1006, 1010, 1012, 1016,
3021  1017, 1018, 1019, 1020, 1021, 1022, 1032, 1024, 1025, 1026,
3022  1027, 1028, 1029, 1030, 1031, 1033, 1036, 1037, 1055, 1056,
3023  1057, 1058, 1059, 1483, 1060, 162, 1061, 163, 1062, 164,
3024  1063, 165, 1064, 166, 1069, 167, 1065, 168, 1066, 169,
3025  1067, 170, 1068, 171, 1494, 172, 1071, 173, 1073, 174,
3026  1078, 175, 1082, 176, 1076, 177, 1083, 178, 1095, 179,
3027  1169, 180, 1100, 181, 1101, 182, 1102, 183, 1103, 184,
3028  1104, 185, 1105, 186, 1106, 187, 1107, 188, 1121, 1096,
3029  1126, 1127, 1119, 1125, 1128, 1129, 1166, 1145, 1130, 1131,
3030  1132, 1133, 1134, 1135, 1136, 1137, 1154, 1155, 1168, 1192,
3031  1175, 1174, 1179, 1180, 1193, 1194, 1195, 1196, 1205, 1206,
3032  1199, 1216, 1217, 1220, 1221, 1225, 1229, 1224, 1233, 1232,
3033  1248, 1228, 1245, 1247, 1249, 1236, 1265, 1254, 1250, 1255,
3034  1266, 1267, 1269, 1270, 1316, 1268, 1278, 1318, 1319, 1322,
3035  1320, 1323, 1324, 1331, 1351, 1329, 1330, 1325, 1332, 1333,
3036  1356, 1338, 1352, 1358, 1359, 1363, 1364, 1367, 1396, 1365,
3037  1397, 1370, 1362, 1360, 1398, 1371, 1372, 1373, 1400, 1380,
3038  1399, 1404, 1406, 1407, 1427, 842, 1428, 1429, 1436, 1430,
3039  1460, 1461, 1462, 1465, 1464, 1463, 1466, 1469, 1470, 1471,
3040  1472, 1015, 1015, 1473, 1476, 1482, 1485, 1246, 1492, 1489,
3041  1490, 1491, 1477, 1495, 1496, 1484, 1486, 1321, 1361, 1046,
3042  395, 1047, 396, 1050, 536, 1051, 1423, 1459, 1366, 1497,
3043  1454, 1122, 1395, 651, 0, 0, 0, 0, 0, 0,
3044  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3045  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3046  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3047  0, 0, 1015, 1015, 0, 0, 0, 0, 0, 0,
3048  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3049  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3050  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3051  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3052  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3053  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3054  0, 0, 0, 1448
3055 };
3056 
3057 static const yytype_int16 yycheck[] =
3058 {
3059  205, 320, 321, 313, 571, 584, 309, 310, 244, 872,
3060  246, 244, 248, 246, 250, 248, 252, 250, 254, 252,
3061  256, 254, 258, 256, 260, 258, 244, 260, 246, 830,
3062  248, 8, 250, 739, 252, 13, 254, 112, 256, 11,
3063  258, 22, 260, 6, 7, 10, 11, 830, 4, 10,
3064  11, 10, 11, 10, 11, 112, 42, 858, 17, 18,
3065  21, 10, 11, 10, 11, 23, 24, 25, 26, 27,
3066  4, 29, 21, 178, 21, 113, 1390, 1391, 28, 133,
3067  134, 286, 287, 288, 289, 290, 291, 137, 138, 294,
3068  295, 296, 297, 298, 299, 200, 301, 0, 133, 134,
3069  10, 11, 307, 43, 44, 131, 132, 133, 134, 19,
3070  20, 678, 679, 302, 27, 131, 132, 30, 14, 32,
3071  33, 161, 162, 201, 159, 160, 303, 8, 305, 169,
3072  308, 245, 310, 159, 160, 249, 10, 11, 304, 253,
3073  166, 167, 46, 197, 168, 195, 8, 1461, 1462, 6,
3074  166, 167, 241, 131, 132, 190, 191, 15, 1084, 942,
3075  1086, 236, 1088, 8, 1090, 121, 1092, 6, 133, 134,
3076  8, 143, 144, 131, 132, 76, 141, 142, 11, 236,
3077  8, 131, 132, 6, 487, 243, 489, 121, 166, 167,
3078  493, 149, 150, 23, 24, 25, 26, 27, 501, 237,
3079  503, 31, 505, 6, 507, 10, 11, 8, 166, 167,
3080  777, 514, 10, 11, 195, 176, 166, 167, 131, 132,
3081  8, 170, 40, 41, 196, 197, 173, 432, 433, 434,
3082  435, 10, 11, 438, 439, 11, 195, 442, 195, 197,
3083  199, 11, 199, 448, 449, 450, 405, 406, 407, 408,
3084  202, 203, 457, 166, 167, 369, 990, 371, 45, 373,
3085  994, 375, 39, 377, 998, 379, 8, 381, 1002, 383,
3086  8, 385, 1006, 387, 388, 389, 8, 391, 8, 393,
3087  247, 395, 181, 397, 197, 399, 491, 1150, 34, 35,
3088  8, 37, 38, 34, 35, 36, 207, 77, 78, 163,
3089  164, 131, 132, 10, 11, 510, 217, 512, 219, 879,
3090  221, 881, 223, 883, 225, 885, 227, 887, 182, 183,
3091  184, 185, 186, 187, 188, 189, 10, 11, 239, 10,
3092  11, 10, 11, 3, 1040, 902, 166, 167, 641, 10,
3093  11, 10, 11, 1144, 10, 11, 8, 1210, 47, 48,
3094  6, 50, 655, 52, 6, 54, 659, 56, 661, 58,
3095  663, 60, 879, 62, 881, 64, 883, 77, 885, 16,
3096  887, 10, 11, 10, 11, 10, 11, 77, 1241, 6,
3097  245, 10, 11, 251, 249, 131, 132, 82, 253, 180,
3098  131, 132, 10, 11, 10, 11, 244, 245, 10, 11,
3099  306, 606, 10, 11, 248, 249, 611, 10, 11, 10,
3100  11, 10, 11, 10, 11, 10, 11, 1280, 10, 11,
3101  166, 167, 8, 252, 253, 166, 167, 8, 405, 406,
3102  407, 408, 1295, 10, 11, 10, 11, 10, 11, 404,
3103  137, 138, 405, 406, 407, 408, 307, 1310, 10, 11,
3104  10, 11, 10, 11, 10, 11, 10, 11, 6, 695,
3105  665, 8, 695, 196, 197, 10, 11, 10, 11, 10,
3106  11, 10, 11, 10, 11, 8, 779, 695, 10, 11,
3107  10, 11, 10, 11, 208, 209, 10, 11, 10, 11,
3108  10, 11, 10, 11, 10, 11, 10, 11, 8, 802,
3109  803, 10, 11, 8, 369, 8, 371, 179, 373, 8,
3110  375, 11, 377, 6, 379, 11, 381, 206, 383, 1098,
3111  385, 315, 387, 317, 389, 319, 391, 321, 393, 323,
3112  395, 325, 397, 327, 399, 329, 330, 331, 3, 333,
3113  3, 335, 3, 337, 8, 339, 8, 341, 858, 343,
3114  346, 345, 8, 347, 6, 349, 79, 351, 309, 353,
3115  8, 355, 242, 357, 6, 359, 49, 361, 1369, 363,
3116  8, 365, 80, 367, 51, 894, 10, 11, 8, 55,
3117  8, 8, 57, 8, 8, 59, 8, 3, 61, 74,
3118  72, 204, 1171, 8, 830, 8, 8, 830, 6, 6,
3119  326, 324, 338, 332, 348, 810, 334, 342, 356, 340,
3120  364, 358, 830, 195, 315, 195, 317, 195, 319, 402,
3121  321, 1422, 323, 366, 325, 362, 327, 328, 329, 368,
3122  331, 3, 333, 315, 335, 317, 337, 319, 339, 321,
3123  341, 323, 343, 325, 345, 327, 347, 329, 349, 331,
3124  351, 333, 353, 335, 355, 337, 357, 339, 359, 341,
3125  361, 343, 363, 345, 365, 347, 367, 349, 350, 351,
3126  3, 353, 8, 355, 132, 357, 8, 359, 83, 361,
3127  8, 363, 8, 365, 6, 367, 53, 8, 70, 6,
3128  6, 6, 6, 6, 63, 65, 8, 8, 8, 122,
3129  320, 316, 8, 322, 318, 8, 942, 1010, 8, 942,
3130  360, 8, 8, 8, 8, 370, 3, 400, 11, 11,
3131  398, 378, 382, 928, 942, 8, 315, 394, 317, 11,
3132  319, 1034, 321, 3, 323, 6, 325, 205, 327, 8,
3133  329, 8, 331, 8, 333, 8, 335, 8, 337, 8,
3134  339, 8, 341, 8, 343, 3, 345, 8, 347, 165,
3135  349, 8, 351, 352, 353, 315, 355, 317, 357, 319,
3136  359, 321, 361, 323, 363, 325, 365, 327, 367, 329,
3137  8, 331, 8, 333, 8, 335, 8, 337, 8, 339,
3138  8, 341, 336, 343, 6, 345, 6, 347, 6, 349,
3139  396, 351, 6, 353, 354, 355, 246, 357, 6, 359,
3140  6, 361, 380, 363, 250, 365, 8, 367, 1121, 254,
3141  315, 372, 317, 384, 319, 390, 321, 386, 323, 8,
3142  325, 8, 327, 265, 329, 8, 331, 8, 333, 8,
3143  335, 8, 337, 246, 339, 8, 341, 8, 343, 344,
3144  345, 8, 347, 8, 349, 8, 351, 3, 353, 8,
3145  355, 6, 357, 11, 359, 8, 361, 120, 363, 1436,
3146  365, 11, 367, 11, 11, 11, 11, 11, 11, 6,
3147  6, 6, 6, 6, 6, 6, 374, 344, 8, 8,
3148  8, 8, 8, 8, 8, 376, 81, 257, 250, 8,
3149  8, 8, 6, 1470, 6, 315, 6, 317, 6, 319,
3150  6, 321, 6, 323, 198, 325, 8, 327, 6, 329,
3151  71, 331, 8, 333, 1491, 335, 73, 337, 112, 339,
3152  231, 341, 3, 343, 75, 345, 8, 347, 6, 349,
3153  213, 351, 8, 353, 8, 355, 8, 357, 8, 359,
3154  8, 361, 8, 363, 8, 365, 8, 367, 11, 211,
3155  8, 6, 261, 254, 6, 6, 240, 233, 8, 8,
3156  8, 8, 8, 8, 8, 8, 8, 6, 8, 6,
3157  266, 392, 8, 8, 8, 8, 8, 6, 218, 235,
3158  11, 8, 235, 220, 235, 235, 235, 222, 235, 228,
3159  6, 224, 266, 263, 6, 226, 311, 8, 258, 8,
3160  8, 8, 6, 8, 195, 121, 232, 8, 8, 255,
3161  258, 6, 6, 113, 212, 8, 8, 262, 6, 120,
3162  195, 234, 8, 8, 8, 6, 6, 112, 1348, 8,
3163  214, 236, 259, 262, 6, 236, 236, 112, 8, 236,
3164  264, 195, 8, 8, 8, 197, 6, 256, 11, 8,
3165  210, 6, 6, 260, 6, 8, 121, 8, 8, 113,
3166  6, 1390, 1391, 3, 8, 6, 8, 1176, 11, 8,
3167  8, 8, 113, 6, 8, 113, 199, 1251, 1326, 942,
3168  254, 942, 254, 942, 328, 942, 1386, 1423, 1333, 238,
3169  1422, 1040, 1348, 497, -1, -1, -1, -1, -1, -1,
3170  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3171  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3172  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3173  -1, -1, 1461, 1462, -1, -1, -1, -1, -1, -1,
3174  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3175  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3176  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3177  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3178  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3179  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3180  -1, -1, -1, 1418
3181 };
3182 
3183 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3184  symbol of state STATE-NUM. */
3185 static const yytype_uint16 yystos[] =
3186 {
3187  0, 42, 410, 414, 415, 0, 302, 889, 890, 14,
3188  416, 201, 427, 428, 304, 891, 8, 417, 46, 434,
3189  435, 168, 429, 628, 8, 892, 6, 43, 44, 418,
3190  419, 241, 524, 525, 15, 436, 629, 8, 10, 11,
3191  430, 431, 432, 6, 303, 305, 893, 894, 8, 421,
3192  76, 571, 572, 10, 11, 526, 527, 528, 8, 10,
3193  11, 437, 438, 439, 6, 433, 8, 895, 896, 11,
3194  10, 11, 17, 18, 195, 199, 420, 422, 423, 424,
3195  425, 426, 40, 41, 411, 10, 11, 573, 574, 575,
3196  243, 529, 530, 6, 440, 8, 202, 203, 676, 677,
3197  11, 11, 137, 138, 195, 856, 871, 872, 873, 897,
3198  45, 8, 8, 8, 8, 39, 412, 413, 77, 78,
3199  576, 577, 620, 621, 247, 543, 544, 181, 531, 630,
3200  8, 47, 48, 50, 52, 54, 56, 58, 60, 62,
3201  64, 441, 442, 443, 448, 449, 454, 455, 469, 470,
3202  476, 477, 482, 483, 488, 489, 494, 495, 509, 510,
3203  678, 679, 315, 317, 319, 321, 323, 325, 327, 329,
3204  331, 333, 335, 337, 339, 341, 343, 345, 347, 349,
3205  351, 353, 355, 357, 359, 361, 363, 365, 367, 898,
3206  899, 902, 905, 907, 909, 911, 913, 915, 917, 919,
3207  921, 923, 925, 927, 929, 930, 932, 934, 936, 938,
3208  940, 942, 943, 949, 957, 960, 963, 966, 969, 3,
3209  8, 6, 6, 6, 650, 652, 77, 16, 578, 77,
3210  82, 251, 557, 558, 180, 545, 631, 8, 10, 11,
3211  532, 533, 534, 444, 445, 450, 451, 456, 457, 471,
3212  472, 478, 479, 484, 485, 490, 491, 496, 497, 511,
3213  512, 10, 11, 681, 682, 683, 131, 132, 133, 134,
3214  159, 160, 166, 167, 680, 841, 843, 865, 866, 867,
3215  874, 875, 876, 877, 878, 879, 916, 908, 910, 914,
3216  918, 920, 958, 970, 928, 912, 935, 922, 924, 926,
3217  950, 933, 964, 961, 967, 900, 903, 906, 937, 939,
3218  941, 306, 898, 945, 8, 6, 8, 8, 8, 8,
3219  6, 7, 405, 406, 407, 408, 653, 8, 579, 580,
3220  581, 623, 307, 1036, 1037, 179, 559, 632, 8, 10,
3221  11, 546, 547, 548, 6, 536, 10, 11, 447, 446,
3222  841, 843, 865, 10, 11, 453, 452, 841, 843, 865,
3223  10, 11, 459, 458, 841, 843, 865, 10, 11, 475,
3224  28, 473, 474, 841, 843, 865, 10, 11, 481, 34,
3225  35, 36, 480, 633, 634, 635, 841, 843, 865, 10,
3226  11, 487, 37, 38, 486, 633, 634, 636, 637, 841,
3227  843, 865, 10, 11, 493, 13, 492, 638, 841, 843,
3228  865, 11, 499, 498, 841, 843, 865, 11, 514, 513,
3229  841, 843, 865, 206, 684, 685, 686, 3, 3, 3,
3230  8, 8, 898, 898, 898, 898, 898, 898, 959, 971,
3231  898, 898, 898, 898, 898, 898, 953, 898, 965, 962,
3232  968, 10, 11, 901, 10, 11, 904, 898, 245, 249,
3233  253, 369, 371, 373, 375, 377, 379, 381, 383, 385,
3234  387, 389, 391, 393, 395, 397, 399, 972, 973, 974,
3235  976, 977, 980, 981, 984, 985, 988, 989, 991, 992,
3236  994, 995, 997, 998, 1000, 1001, 1004, 1005, 1009, 1010,
3237  1012, 1013, 1015, 1016, 1018, 1019, 1021, 1022, 1024, 1027,
3238  1028, 1030, 1031, 1033, 1034, 972, 972, 346, 931, 10,
3239  11, 141, 142, 404, 877, 880, 881, 882, 944, 946,
3240  947, 8, 652, 652, 6, 79, 580, 80, 10, 11,
3241  19, 20, 622, 624, 626, 627, 242, 309, 1038, 1039,
3242  8, 10, 11, 560, 561, 562, 6, 550, 8, 244,
3243  245, 535, 537, 538, 49, 51, 460, 461, 55, 8,
3244  57, 8, 8, 8, 59, 8, 8, 61, 3, 72,
3245  500, 501, 74, 515, 516, 204, 691, 687, 688, 8,
3246  8, 8, 6, 6, 898, 898, 898, 898, 324, 326,
3247  328, 898, 330, 898, 332, 334, 898, 338, 340, 342,
3248  10, 11, 195, 199, 951, 954, 955, 956, 348, 350,
3249  898, 352, 898, 354, 898, 356, 358, 898, 1025, 364,
3250  22, 195, 639, 195, 979, 195, 983, 195, 987, 972,
3251  990, 972, 993, 898, 996, 972, 999, 402, 1002, 1008,
3252  1006, 1008, 10, 11, 1011, 972, 1014, 972, 1017, 972,
3253  1020, 972, 1023, 898, 1029, 898, 1032, 972, 1035, 366,
3254  368, 362, 3, 3, 8, 132, 582, 83, 8, 8,
3255  8, 10, 11, 1040, 1041, 1042, 6, 564, 8, 248,
3256  249, 549, 551, 552, 539, 540, 53, 468, 70, 462,
3257  463, 6, 650, 6, 6, 6, 6, 8, 63, 508,
3258  122, 502, 842, 65, 523, 517, 842, 207, 217, 219,
3259  221, 223, 225, 227, 239, 692, 693, 694, 718, 719,
3260  731, 732, 758, 759, 776, 777, 789, 790, 807, 808,
3261  811, 812, 10, 11, 690, 163, 164, 182, 183, 184,
3262  185, 186, 187, 188, 189, 689, 847, 848, 849, 850,
3263  851, 859, 860, 861, 862, 863, 864, 8, 8, 316,
3264  318, 320, 322, 898, 344, 898, 8, 8, 360, 1026,
3265  8, 8, 10, 11, 975, 8, 10, 11, 978, 8,
3266  10, 11, 982, 8, 10, 11, 986, 370, 972, 398,
3267  400, 3, 11, 11, 378, 972, 382, 972, 972, 972,
3268  898, 394, 8, 948, 11, 3, 10, 11, 583, 650,
3269  650, 6, 1043, 8, 252, 253, 563, 565, 566, 553,
3270  554, 10, 11, 542, 23, 24, 25, 26, 27, 29,
3271  149, 150, 197, 541, 640, 641, 643, 644, 647, 648,
3272  841, 843, 858, 865, 886, 887, 888, 464, 465, 8,
3273  8, 8, 8, 8, 8, 8, 10, 11, 503, 504,
3274  505, 10, 11, 518, 519, 520, 695, 696, 720, 721,
3275  733, 734, 760, 761, 778, 779, 791, 792, 809, 871,
3276  165, 813, 840, 205, 3, 8, 8, 8, 8, 8,
3277  8, 8, 8, 336, 952, 6, 650, 388, 972, 6,
3278  6, 396, 6, 246, 6, 250, 6, 254, 372, 8,
3279  972, 1003, 972, 1007, 380, 384, 386, 390, 898, 8,
3280  8, 265, 584, 585, 8, 8, 8, 308, 310, 1044,
3281  1045, 567, 568, 10, 11, 556, 30, 32, 33, 555,
3282  642, 643, 645, 649, 841, 843, 858, 865, 246, 8,
3283  8, 8, 8, 8, 8, 3, 8, 10, 11, 467,
3284  466, 858, 877, 6, 120, 506, 654, 655, 662, 521,
3285  654, 11, 161, 162, 169, 697, 844, 868, 869, 870,
3286  11, 722, 844, 868, 11, 735, 844, 868, 11, 762,
3287  844, 868, 11, 780, 844, 868, 11, 793, 844, 868,
3288  11, 8, 11, 814, 651, 652, 6, 6, 6, 6,
3289  6, 6, 6, 650, 344, 8, 8, 8, 8, 8,
3290  8, 8, 374, 376, 898, 586, 81, 257, 597, 1046,
3291  1047, 10, 11, 570, 31, 569, 640, 641, 643, 646,
3292  647, 648, 841, 843, 865, 250, 8, 8, 8, 6,
3293  6, 6, 6, 6, 6, 8, 6, 71, 8, 198,
3294  846, 73, 507, 112, 656, 657, 75, 522, 231, 698,
3295  700, 701, 3, 8, 700, 723, 700, 736, 700, 763,
3296  700, 781, 700, 794, 972, 6, 211, 816, 817, 8,
3297  8, 8, 8, 8, 8, 8, 8, 8, 972, 10,
3298  11, 21, 176, 587, 588, 589, 590, 591, 598, 261,
3299  609, 11, 856, 871, 1048, 254, 8, 6, 6, 6,
3300  8, 8, 8, 8, 8, 8, 8, 8, 10, 11,
3301  663, 664, 665, 658, 659, 233, 699, 706, 707, 10,
3302  11, 702, 703, 704, 8, 6, 706, 724, 706, 737,
3303  706, 764, 706, 782, 706, 795, 240, 810, 8, 213,
3304  823, 824, 818, 842, 392, 266, 592, 593, 594, 8,
3305  8, 10, 11, 21, 170, 599, 600, 601, 602, 603,
3306  610, 972, 6, 8, 8, 8, 6, 4, 121, 11,
3307  661, 196, 660, 857, 858, 218, 235, 712, 713, 10,
3308  11, 708, 709, 710, 654, 705, 8, 235, 725, 726,
3309  220, 235, 738, 739, 222, 235, 765, 766, 224, 235,
3310  783, 784, 228, 235, 796, 797, 226, 830, 825, 842,
3311  10, 11, 819, 820, 821, 266, 593, 263, 6, 6,
3312  258, 604, 605, 606, 8, 8, 10, 11, 21, 173,
3313  611, 612, 613, 614, 625, 311, 8, 8, 121, 6,
3314  8, 10, 11, 714, 715, 716, 654, 711, 232, 10,
3315  11, 727, 728, 729, 10, 11, 740, 741, 742, 10,
3316  11, 767, 768, 769, 10, 11, 785, 786, 787, 10,
3317  11, 798, 799, 800, 208, 209, 815, 831, 832, 10,
3318  11, 826, 827, 828, 654, 822, 195, 595, 8, 8,
3319  258, 605, 255, 6, 6, 262, 615, 616, 617, 8,
3320  8, 113, 6, 120, 666, 667, 672, 717, 234, 654,
3321  730, 743, 744, 770, 654, 788, 801, 833, 834, 654,
3322  829, 212, 8, 10, 11, 596, 195, 607, 8, 8,
3323  262, 616, 259, 6, 6, 8, 846, 112, 668, 669,
3324  236, 236, 236, 112, 745, 746, 112, 236, 771, 772,
3325  236, 112, 236, 802, 803, 10, 11, 836, 837, 838,
3326  190, 191, 835, 852, 853, 874, 877, 214, 6, 264,
3327  8, 10, 11, 608, 195, 618, 8, 8, 10, 11,
3328  673, 674, 675, 670, 858, 747, 748, 10, 11, 773,
3329  774, 775, 804, 685, 839, 651, 651, 8, 6, 256,
3330  8, 10, 11, 619, 4, 121, 11, 671, 10, 11,
3331  750, 751, 752, 178, 200, 749, 845, 855, 898, 11,
3332  143, 144, 805, 806, 857, 858, 883, 884, 885, 691,
3333  210, 6, 6, 8, 6, 260, 121, 650, 753, 8,
3334  8, 113, 6, 3, 651, 651, 8, 113, 113, 237,
3335  754, 755, 6, 650, 113, 8, 199, 756, 854, 8,
3336  8, 8, 11, 757, 650, 6, 8, 238
3337 };
3338 
3339 #define yyerrok (yyerrstatus = 0)
3340 #define yyclearin (yychar = YYEMPTY)
3341 #define YYEMPTY (-2)
3342 #define YYEOF 0
3343 
3344 #define YYACCEPT goto yyacceptlab
3345 #define YYABORT goto yyabortlab
3346 #define YYERROR goto yyerrorlab
3347 
3348 
3349 /* Like YYERROR except do call yyerror. This remains here temporarily
3350  to ease the transition to the new meaning of YYERROR, for GCC.
3351  Once GCC version 2 has supplanted version 1, this can go. */
3352 
3353 #define YYFAIL goto yyerrlab
3354 
3355 #define YYRECOVERING() (!!yyerrstatus)
3356 
3357 #define YYBACKUP(Token, Value) \
3358 do \
3359  if (yychar == YYEMPTY && yylen == 1) \
3360  { \
3361  yychar = (Token); \
3362  yylval = (Value); \
3363  yytoken = YYTRANSLATE (yychar); \
3364  YYPOPSTACK (1); \
3365  goto yybackup; \
3366  } \
3367  else \
3368  { \
3369  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("syntax error: cannot back up")); \
3370  YYERROR; \
3371  } \
3372 while (YYID (0))
3373 
3374 
3375 #define YYTERROR 1
3376 #define YYERRCODE 256
3377 
3378 
3379 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3380  If N is 0, then set CURRENT to the empty location which ends
3381  the previous symbol: RHS[0] (always defined). */
3382 
3383 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3384 #ifndef YYLLOC_DEFAULT
3385 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3386  do \
3387  if (YYID (N)) \
3388  { \
3389  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3390  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3391  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3392  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3393  } \
3394  else \
3395  { \
3396  (Current).first_line = (Current).last_line = \
3397  YYRHSLOC (Rhs, 0).last_line; \
3398  (Current).first_column = (Current).last_column = \
3399  YYRHSLOC (Rhs, 0).last_column; \
3400  } \
3401  while (YYID (0))
3402 #endif
3403 
3404 
3405 /* YY_LOCATION_PRINT -- Print the location on the stream.
3406  This macro was not mandated originally: define only if we know
3407  we won't break user code: when these are the locations we know. */
3408 
3409 #ifndef YY_LOCATION_PRINT
3410 # if YYLTYPE_IS_TRIVIAL
3411 # define YY_LOCATION_PRINT(File, Loc) \
3412  fprintf (File, "%d.%d-%d.%d", \
3413  (Loc).first_line, (Loc).first_column, \
3414  (Loc).last_line, (Loc).last_column)
3415 # else
3416 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3417 # endif
3418 #endif
3419 
3420 
3421 /* YYLEX -- calling `yylex' with the right arguments. */
3422 
3423 #ifdef YYLEX_PARAM
3424 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
3425 #else
3426 # define YYLEX yylex (&yylval, &yylloc, scanner)
3427 #endif
3428 
3429 /* Enable debugging if requested. */
3430 #if YYDEBUG
3431 
3432 # ifndef YYFPRINTF
3433 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3434 # define YYFPRINTF fprintf
3435 # endif
3436 
3437 # define YYDPRINTF(Args) \
3438 do { \
3439  if (yydebug) \
3440  YYFPRINTF Args; \
3441 } while (YYID (0))
3442 
3443 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3444 do { \
3445  if (yydebug) \
3446  { \
3447  YYFPRINTF (stderr, "%s ", Title); \
3448  yy_symbol_print (stderr, \
3449  Type, Value, Location, osinstance, parserData, osglData, osnlData); \
3450  YYFPRINTF (stderr, "\n"); \
3451  } \
3452 } while (YYID (0))
3453 
3454 
3455 /*--------------------------------.
3456 | Print this symbol on YYOUTPUT. |
3457 `--------------------------------*/
3458 
3459 /*ARGSUSED*/
3460 #if (defined __STDC__ || defined __C99__FUNC__ \
3461  || defined __cplusplus || defined _MSC_VER)
3462 static void
3463 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
3464 #else
3465 static void
3466 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, osinstance, parserData, osglData, osnlData)
3467  FILE *yyoutput;
3468  int yytype;
3469  YYSTYPE const * const yyvaluep;
3470  YYLTYPE const * const yylocationp;
3471  OSInstance *osinstance;
3472  OSiLParserData *parserData;
3473  OSgLParserData *osglData;
3474  OSnLParserData *osnlData;
3475 #endif
3476 {
3477  if (!yyvaluep)
3478  return;
3479  YYUSE (yylocationp);
3480  YYUSE (osinstance);
3481  YYUSE (parserData);
3482  YYUSE (osglData);
3483  YYUSE (osnlData);
3484 # ifdef YYPRINT
3485  if (yytype < YYNTOKENS)
3486  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3487 # else
3488  YYUSE (yyoutput);
3489 # endif
3490  switch (yytype)
3491  {
3492  default:
3493  break;
3494  }
3495 }
3496 
3497 
3498 /*--------------------------------.
3499 | Print this symbol on YYOUTPUT. |
3500 `--------------------------------*/
3501 
3502 #if (defined __STDC__ || defined __C99__FUNC__ \
3503  || defined __cplusplus || defined _MSC_VER)
3504 static void
3505 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
3506 #else
3507 static void
3508 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, osinstance, parserData, osglData, osnlData)
3509  FILE *yyoutput;
3510  int yytype;
3511  YYSTYPE const * const yyvaluep;
3512  YYLTYPE const * const yylocationp;
3513  OSInstance *osinstance;
3514  OSiLParserData *parserData;
3515  OSgLParserData *osglData;
3516  OSnLParserData *osnlData;
3517 #endif
3518 {
3519  if (yytype < YYNTOKENS)
3520  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3521  else
3522  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3523 
3524  YY_LOCATION_PRINT (yyoutput, *yylocationp);
3525  YYFPRINTF (yyoutput, ": ");
3526  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, osinstance, parserData, osglData, osnlData);
3527  YYFPRINTF (yyoutput, ")");
3528 }
3529 
3530 /*------------------------------------------------------------------.
3531 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3532 | TOP (included). |
3533 `------------------------------------------------------------------*/
3534 
3535 #if (defined __STDC__ || defined __C99__FUNC__ \
3536  || defined __cplusplus || defined _MSC_VER)
3537 static void
3538 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
3539 #else
3540 static void
3541 yy_stack_print (yybottom, yytop)
3542  yytype_int16 *yybottom;
3543  yytype_int16 *yytop;
3544 #endif
3545 {
3546  YYFPRINTF (stderr, "Stack now");
3547  for (; yybottom <= yytop; yybottom++)
3548  {
3549  int yybot = *yybottom;
3550  YYFPRINTF (stderr, " %d", yybot);
3551  }
3552  YYFPRINTF (stderr, "\n");
3553 }
3554 
3555 # define YY_STACK_PRINT(Bottom, Top) \
3556 do { \
3557  if (yydebug) \
3558  yy_stack_print ((Bottom), (Top)); \
3559 } while (YYID (0))
3560 
3561 
3562 /*------------------------------------------------.
3563 | Report that the YYRULE is going to be reduced. |
3564 `------------------------------------------------*/
3565 
3566 #if (defined __STDC__ || defined __C99__FUNC__ \
3567  || defined __cplusplus || defined _MSC_VER)
3568 static void
3569 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
3570 #else
3571 static void
3572 yy_reduce_print (yyvsp, yylsp, yyrule, osinstance, parserData, osglData, osnlData)
3573  YYSTYPE *yyvsp;
3574  YYLTYPE *yylsp;
3575  int yyrule;
3576  OSInstance *osinstance;
3577  OSiLParserData *parserData;
3578  OSgLParserData *osglData;
3579  OSnLParserData *osnlData;
3580 #endif
3581 {
3582  int yynrhs = yyr2[yyrule];
3583  int yyi;
3584  unsigned long int yylno = yyrline[yyrule];
3585  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3586  yyrule - 1, yylno);
3587  /* The symbols being reduced. */
3588  for (yyi = 0; yyi < yynrhs; yyi++)
3589  {
3590  YYFPRINTF (stderr, " $%d = ", yyi + 1);
3591  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3592  &(yyvsp[(yyi + 1) - (yynrhs)])
3593  , &(yylsp[(yyi + 1) - (yynrhs)]) , osinstance, parserData, osglData, osnlData);
3594  YYFPRINTF (stderr, "\n");
3595  }
3596 }
3597 
3598 # define YY_REDUCE_PRINT(Rule) \
3599 do { \
3600  if (yydebug) \
3601  yy_reduce_print (yyvsp, yylsp, Rule, osinstance, parserData, osglData, osnlData); \
3602 } while (YYID (0))
3603 
3604 /* Nonzero means print parse trace. It is left uninitialized so that
3605  multiple parsers can coexist. */
3606 int yydebug;
3607 #else /* !YYDEBUG */
3608 # define YYDPRINTF(Args)
3609 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3610 # define YY_STACK_PRINT(Bottom, Top)
3611 # define YY_REDUCE_PRINT(Rule)
3612 #endif /* !YYDEBUG */
3613 
3614 
3615 /* YYINITDEPTH -- initial size of the parser's stacks. */
3616 #ifndef YYINITDEPTH
3617 # define YYINITDEPTH 200
3618 #endif
3619 
3620 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3621  if the built-in stack extension method is used).
3622 
3623  Do not make this value too large; the results are undefined if
3624  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3625  evaluated with infinite-precision integer arithmetic. */
3626 
3627 #ifndef YYMAXDEPTH
3628 # define YYMAXDEPTH 10000
3629 #endif
3630 
3631 
3632 
3633 #if YYERROR_VERBOSE
3634 
3635 # ifndef yystrlen
3636 # if defined __GLIBC__ && defined _STRING_H
3637 # define yystrlen strlen
3638 # else
3639 /* Return the length of YYSTR. */
3640 #if (defined __STDC__ || defined __C99__FUNC__ \
3641  || defined __cplusplus || defined _MSC_VER)
3642 static YYSIZE_T
3643 yystrlen (const char *yystr)
3644 #else
3645 static YYSIZE_T
3646 yystrlen (yystr)
3647  const char *yystr;
3648 #endif
3650  YYSIZE_T yylen;
3651  for (yylen = 0; yystr[yylen]; yylen++)
3652  continue;
3653  return yylen;
3654 }
3655 # endif
3656 # endif
3657 
3658 # ifndef yystpcpy
3659 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3660 # define yystpcpy stpcpy
3661 # else
3662 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3663  YYDEST. */
3664 #if (defined __STDC__ || defined __C99__FUNC__ \
3665  || defined __cplusplus || defined _MSC_VER)
3666 static char *
3667 yystpcpy (char *yydest, const char *yysrc)
3668 #else
3669 static char *
3670 yystpcpy (yydest, yysrc)
3671  char *yydest;
3672  const char *yysrc;
3673 #endif
3674 {
3675  char *yyd = yydest;
3676  const char *yys = yysrc;
3677 
3678  while ((*yyd++ = *yys++) != '\0')
3679  continue;
3680 
3681  return yyd - 1;
3682 }
3683 # endif
3684 # endif
3685 
3686 # ifndef yytnamerr
3687 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
3688  quotes and backslashes, so that it's suitable for yyerror. The
3689  heuristic is that double-quoting is unnecessary unless the string
3690  contains an apostrophe, a comma, or backslash (other than
3691  backslash-backslash). YYSTR is taken from yytname. If YYRES is
3692  null, do not copy; instead, return the length of what the result
3693  would have been. */
3694 static YYSIZE_T
3695 yytnamerr (char *yyres, const char *yystr)
3696 {
3697  if (*yystr == '"')
3698  {
3699  YYSIZE_T yyn = 0;
3700  char const *yyp = yystr;
3701 
3702  for (;;)
3703  switch (*++yyp)
3704  {
3705  case '\'':
3706  case ',':
3707  goto do_not_strip_quotes;
3708 
3709  case '\\':
3710  if (*++yyp != '\\')
3711  goto do_not_strip_quotes;
3712  /* Fall through. */
3713  default:
3714  if (yyres)
3715  yyres[yyn] = *yyp;
3716  yyn++;
3717  break;
3718 
3719  case '"':
3720  if (yyres)
3721  yyres[yyn] = '\0';
3722  return yyn;
3723  }
3724  do_not_strip_quotes: ;
3725  }
3726 
3727  if (! yyres)
3728  return yystrlen (yystr);
3729 
3730  return yystpcpy (yyres, yystr) - yyres;
3731 }
3732 # endif
3733 
3734 /* Copy into YYRESULT an error message about the unexpected token
3735  YYCHAR while in state YYSTATE. Return the number of bytes copied,
3736  including the terminating null byte. If YYRESULT is null, do not
3737  copy anything; just return the number of bytes that would be
3738  copied. As a special case, return 0 if an ordinary "syntax error"
3739  message will do. Return YYSIZE_MAXIMUM if overflow occurs during
3740  size calculation. */
3741 static YYSIZE_T
3743 {
3744  int yyn = yypact[yystate];
3745 
3746  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
3747  return 0;
3748  else
3749  {
3750  int yytype = YYTRANSLATE (yychar);
3751  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3752  YYSIZE_T yysize = yysize0;
3753  YYSIZE_T yysize1;
3754  int yysize_overflow = 0;
3755  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
3756  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3757  int yyx;
3758 
3759 # if 0
3760  /* This is so xgettext sees the translatable formats that are
3761  constructed on the fly. */
3762  YY_("syntax error, unexpected %s");
3763  YY_("syntax error, unexpected %s, expecting %s");
3764  YY_("syntax error, unexpected %s, expecting %s or %s");
3765  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3766  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3767 # endif
3768  char *yyfmt;
3769  char const *yyf;
3770  static char const yyunexpected[] = "syntax error, unexpected %s";
3771  static char const yyexpecting[] = ", expecting %s";
3772  static char const yyor[] = " or %s";
3773  char yyformat[sizeof yyunexpected
3774  + sizeof yyexpecting - 1
3775  + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3776  * (sizeof yyor - 1))];
3777  char const *yyprefix = yyexpecting;
3778 
3779  /* Start YYX at -YYN if negative to avoid negative indexes in
3780  YYCHECK. */
3781  int yyxbegin = yyn < 0 ? -yyn : 0;
3782 
3783  /* Stay within bounds of both yycheck and yytname. */
3784  int yychecklim = YYLAST - yyn + 1;
3785  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3786  int yycount = 1;
3787 
3788  yyarg[0] = yytname[yytype];
3789  yyfmt = yystpcpy (yyformat, yyunexpected);
3790 
3791  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3792  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3793  {
3794  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3795  {
3796  yycount = 1;
3797  yysize = yysize0;
3798  yyformat[sizeof yyunexpected - 1] = '\0';
3799  break;
3800  }
3801  yyarg[yycount++] = yytname[yyx];
3802  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3803  yysize_overflow |= (yysize1 < yysize);
3804  yysize = yysize1;
3805  yyfmt = yystpcpy (yyfmt, yyprefix);
3806  yyprefix = yyor;
3807  }
3808 
3809  yyf = YY_(yyformat);
3810  yysize1 = yysize + yystrlen (yyf);
3811  yysize_overflow |= (yysize1 < yysize);
3812  yysize = yysize1;
3813 
3814  if (yysize_overflow)
3815  return YYSIZE_MAXIMUM;
3816 
3817  if (yyresult)
3818  {
3819  /* Avoid sprintf, as that infringes on the user's name space.
3820  Don't have undefined behavior even if the translation
3821  produced a string with the wrong number of "%s"s. */
3822  char *yyp = yyresult;
3823  int yyi = 0;
3824  while ((*yyp = *yyf) != '\0')
3825  {
3826  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3827  {
3828  yyp += yytnamerr (yyp, yyarg[yyi++]);
3829  yyf += 2;
3830  }
3831  else
3832  {
3833  yyp++;
3834  yyf++;
3835  }
3836  }
3837  }
3838  return yysize;
3839  }
3840 }
3841 #endif /* YYERROR_VERBOSE */
3842 
3843 
3844 /*-----------------------------------------------.
3845 | Release the memory associated to this symbol. |
3846 `-----------------------------------------------*/
3847 
3848 /*ARGSUSED*/
3849 #if (defined __STDC__ || defined __C99__FUNC__ \
3850  || defined __cplusplus || defined _MSC_VER)
3851 static void
3852 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
3853 #else
3854 static void
3855 yydestruct (yymsg, yytype, yyvaluep, yylocationp, osinstance, parserData, osglData, osnlData)
3856  const char *yymsg;
3857  int yytype;
3858  YYSTYPE *yyvaluep;
3859  YYLTYPE *yylocationp;
3860  OSInstance *osinstance;
3861  OSiLParserData *parserData;
3862  OSgLParserData *osglData;
3863  OSnLParserData *osnlData;
3864 #endif
3865 {
3866  YYUSE (yyvaluep);
3867  YYUSE (yylocationp);
3868  YYUSE (osinstance);
3869  YYUSE (parserData);
3870  YYUSE (osglData);
3871  YYUSE (osnlData);
3872 
3873  if (!yymsg)
3874  yymsg = "Deleting";
3875  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
3876 
3877  switch (yytype)
3878  {
3879 
3880  default:
3881  break;
3882  }
3883 }
3884 
3885 /* Prevent warnings from -Wmissing-prototypes. */
3886 #ifdef YYPARSE_PARAM
3887 #if defined __STDC__ || defined __cplusplus
3888 int yyparse (void *YYPARSE_PARAM);
3889 #else
3890 int yyparse ();
3891 #endif
3892 #else /* ! YYPARSE_PARAM */
3893 #if defined __STDC__ || defined __cplusplus
3894 int yyparse (OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData);
3895 #else
3896 int yyparse ();
3897 #endif
3898 #endif /* ! YYPARSE_PARAM */
3899 
3900 
3901 
3902 
3903 
3904 /*-------------------------.
3905 | yyparse or yypush_parse. |
3906 `-------------------------*/
3907 
3908 #ifdef YYPARSE_PARAM
3909 #if (defined __STDC__ || defined __C99__FUNC__ \
3910  || defined __cplusplus || defined _MSC_VER)
3911 int
3912 yyparse (void *YYPARSE_PARAM)
3913 #else
3914 int
3915 yyparse (YYPARSE_PARAM)
3916  void *YYPARSE_PARAM;
3917 #endif
3918 #else /* ! YYPARSE_PARAM */
3919 #if (defined __STDC__ || defined __C99__FUNC__ \
3920  || defined __cplusplus || defined _MSC_VER)
3921 int
3922 yyparse (OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
3923 #else
3924 int
3925 yyparse (osinstance, parserData, osglData, osnlData)
3926  OSInstance *osinstance;
3927  OSiLParserData *parserData;
3928  OSgLParserData *osglData;
3929  OSnLParserData *osnlData;
3930 #endif
3931 #endif
3933 /* The lookahead symbol. */
3934 int yychar;
3935 
3936 /* The semantic value of the lookahead symbol. */
3937 YYSTYPE yylval;
3938 
3939 /* Location data for the lookahead symbol. */
3941 
3942  /* Number of syntax errors so far. */
3943  int yynerrs;
3944 
3945  int yystate;
3946  /* Number of tokens to shift before error messages enabled. */
3948 
3949  /* The stacks and their tools:
3950  `yyss': related to states.
3951  `yyvs': related to semantic values.
3952  `yyls': related to locations.
3953 
3954  Refer to the stacks thru separate pointers, to allow yyoverflow
3955  to reallocate them elsewhere. */
3956 
3957  /* The state stack. */
3958  yytype_int16 yyssa[YYINITDEPTH];
3959  yytype_int16 *yyss;
3960  yytype_int16 *yyssp;
3961 
3962  /* The semantic value stack. */
3966 
3967  /* The location stack. */
3971 
3972  /* The locations where the error started and ended. */
3974 
3976 
3977  int yyn;
3979  /* Lookahead token as an internal (translated) token number. */
3980  int yytoken;
3981  /* The variables used to return semantic value and location from the
3982  action routines. */
3985 
3986 #if YYERROR_VERBOSE
3987  /* Buffer for error messages, and its allocated size. */
3988  char yymsgbuf[128];
3989  char *yymsg = yymsgbuf;
3991 #endif
3992 
3993 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
3994 
3995  /* The number of symbols on the RHS of the reduced rule.
3996  Keep to zero when no symbol should be popped. */
3997  int yylen = 0;
3998 
3999  yytoken = 0;
4000  yyss = yyssa;
4001  yyvs = yyvsa;
4002  yyls = yylsa;
4003  yystacksize = YYINITDEPTH;
4004 
4005  YYDPRINTF ((stderr, "Starting parse\n"));
4006 
4007  yystate = 0;
4008  yyerrstatus = 0;
4009  yynerrs = 0;
4010  yychar = YYEMPTY; /* Cause a token to be read. */
4011 
4012  /* Initialize stack pointers.
4013  Waste one element of value and location stack
4014  so that they stay on the same level as the state stack.
4015  The wasted elements are never initialized. */
4016  yyssp = yyss;
4017  yyvsp = yyvs;
4018  yylsp = yyls;
4019 
4020 #if YYLTYPE_IS_TRIVIAL
4021  /* Initialize the default location before parsing starts. */
4022  yylloc.first_line = yylloc.last_line = 1;
4023  yylloc.first_column = yylloc.last_column = 1;
4024 #endif
4025 
4027 
4028 /*------------------------------------------------------------.
4029 | yynewstate -- Push a new state, which is found in yystate. |
4030 `------------------------------------------------------------*/
4031  yynewstate:
4032  /* In all cases, when you get here, the value and location stacks
4033  have just been pushed. So pushing a state here evens the stacks. */
4034  yyssp++;
4035 
4036  yysetstate:
4037  *yyssp = yystate;
4038 
4039  if (yyss + yystacksize - 1 <= yyssp)
4040  {
4041  /* Get the current used size of the three stacks, in elements. */
4042  YYSIZE_T yysize = yyssp - yyss + 1;
4043 
4044 #ifdef yyoverflow
4045  {
4046  /* Give user a chance to reallocate the stack. Use copies of
4047  these so that the &'s don't force the real ones into
4048  memory. */
4049  YYSTYPE *yyvs1 = yyvs;
4050  yytype_int16 *yyss1 = yyss;
4051  YYLTYPE *yyls1 = yyls;
4052 
4053  /* Each stack pointer address is followed by the size of the
4054  data in use in that stack, in bytes. This used to be a
4055  conditional around just the two extra args, but that might
4056  be undefined if yyoverflow is a macro. */
4057  yyoverflow (YY_("memory exhausted"),
4058  &yyss1, yysize * sizeof (*yyssp),
4059  &yyvs1, yysize * sizeof (*yyvsp),
4060  &yyls1, yysize * sizeof (*yylsp),
4061  &yystacksize);
4062 
4063  yyls = yyls1;
4064  yyss = yyss1;
4065  yyvs = yyvs1;
4066  }
4067 #else /* no yyoverflow */
4068 # ifndef YYSTACK_RELOCATE
4069  goto yyexhaustedlab;
4070 # else
4071  /* Extend the stack our own way. */
4072  if (YYMAXDEPTH <= yystacksize)
4073  goto yyexhaustedlab;
4074  yystacksize *= 2;
4075  if (YYMAXDEPTH < yystacksize)
4076  yystacksize = YYMAXDEPTH;
4077 
4078  {
4079  yytype_int16 *yyss1 = yyss;
4080  union yyalloc *yyptr =
4081  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4082  if (! yyptr)
4083  goto yyexhaustedlab;
4084  YYSTACK_RELOCATE (yyss_alloc, yyss);
4085  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4086  YYSTACK_RELOCATE (yyls_alloc, yyls);
4087 # undef YYSTACK_RELOCATE
4088  if (yyss1 != yyssa)
4089  YYSTACK_FREE (yyss1);
4090  }
4091 # endif
4092 #endif /* no yyoverflow */
4093 
4094  yyssp = yyss + yysize - 1;
4095  yyvsp = yyvs + yysize - 1;
4096  yylsp = yyls + yysize - 1;
4097 
4098  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4099  (unsigned long int) yystacksize));
4100 
4101  if (yyss + yystacksize - 1 <= yyssp)
4102  YYABORT;
4103  }
4104 
4105  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4106 
4107  if (yystate == YYFINAL)
4109 
4110  goto yybackup;
4111 
4112 /*-----------.
4113 | yybackup. |
4114 `-----------*/
4115 yybackup:
4116 
4117  /* Do appropriate processing given the current state. Read a
4118  lookahead token if we need one and don't already have one. */
4119 
4120  /* First try to decide what to do without reference to lookahead token. */
4121  yyn = yypact[yystate];
4122  if (yyn == YYPACT_NINF)
4124 
4125  /* Not known => get a lookahead token if don't already have one. */
4126 
4127  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4128  if (yychar == YYEMPTY)
4129  {
4130  YYDPRINTF ((stderr, "Reading a token: "));
4131  yychar = YYLEX;
4132  }
4133 
4134  if (yychar <= YYEOF)
4135  {
4136  yychar = yytoken = YYEOF;
4137  YYDPRINTF ((stderr, "Now at end of input.\n"));
4138  }
4139  else
4140  {
4141  yytoken = YYTRANSLATE (yychar);
4142  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4143  }
4144 
4145  /* If the proper action on seeing token YYTOKEN is to reduce or to
4146  detect an error, take that action. */
4147  yyn += yytoken;
4148  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4149  goto yydefault;
4150  yyn = yytable[yyn];
4151  if (yyn <= 0)
4152  {
4153  if (yyn == 0 || yyn == YYTABLE_NINF)
4154  goto yyerrlab;
4155  yyn = -yyn;
4156  goto yyreduce;
4157  }
4158 
4159  /* Count tokens shifted since error; after three, turn off error
4160  status. */
4161  if (yyerrstatus)
4162  yyerrstatus--;
4163 
4164  /* Shift the lookahead token. */
4165  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4166 
4167  /* Discard the shifted token. */
4168  yychar = YYEMPTY;
4169 
4170  yystate = yyn;
4171  *++yyvsp = yylval;
4172  *++yylsp = yylloc;
4174 
4175 
4176 /*-----------------------------------------------------------.
4177 | yydefault -- do the default action for the current state. |
4178 `-----------------------------------------------------------*/
4179 yydefault:
4180  yyn = yydefact[yystate];
4181  if (yyn == 0)
4182  goto yyerrlab;
4183  goto yyreduce;
4184 
4185 
4186 /*-----------------------------.
4187 | yyreduce -- Do a reduction. |
4188 `-----------------------------*/
4189 yyreduce:
4190  /* yyn is the number of a rule to reduce with. */
4191  yylen = yyr2[yyn];
4192 
4193  /* If YYLEN is nonzero, implement the default value of the action:
4194  `$$ = $1'.
4195 
4196  Otherwise, the following line sets YYVAL to garbage.
4197  This behavior is undocumented and Bison
4198  users should not rely upon it. Assigning to YYVAL
4199  unconditionally makes the parser a bit smaller, and it avoids a
4200  GCC warning that YYVAL may be used uninitialized. */
4201  yyval = yyvsp[1-yylen];
4202 
4203  /* Default location. */
4204  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
4205  YY_REDUCE_PRINT (yyn);
4206  switch (yyn)
4207  {
4208  case 5:
4209 
4210  {
4211  if (parserData->parser_errors != "")
4212  {
4213  parserData->parser_errors += ("\n\nOSiL input is either invalid or not well-formed.\n");
4214  osilerror( NULL, osinstance, parserData, osglData, osnlData, parserData->parser_errors);
4215  }
4216  }
4217  break;
4218 
4219  case 7:
4220 
4221  { parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "unexpected end of file, expecting </osil>");}
4222  break;
4223 
4224  case 9:
4225 
4226  {if(osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms > parserData->qtermcount )
4227  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of qterms less than numberOfQuadraticTerms");}
4228  break;
4229 
4230  case 10:
4231 
4232  {
4233  osinstance->instanceData->quadraticCoefficients = new QuadraticCoefficients();
4234 }
4235  break;
4236 
4237  case 11:
4238 
4239  {
4240 if ( *(yyvsp[(2) - (5)].sval) != *(yyvsp[(4) - (5)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4241 osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms = (yyvsp[(3) - (5)].ival);
4242 if(osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms > 0 )
4243 osinstance->instanceData->quadraticCoefficients->qTerm = new QuadraticTerm*[ (yyvsp[(3) - (5)].ival) ];
4244 for(int i = 0; i < (yyvsp[(3) - (5)].ival); i++) osinstance->instanceData->quadraticCoefficients->qTerm[i] = new QuadraticTerm();
4245 parserData->qtermcount = 0;
4246 }
4247  break;
4248 
4249  case 14:
4250 
4251  {
4252  parserData->qtermcount++;
4253  if(!parserData->qtermidxattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idx is required");
4254  if(!parserData->qtermidxOneattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idxOne is required");
4255  if(!parserData->qtermidxTwoattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "the qTerm attribute idxTwo is required");
4256  parserData->qtermidattON = false;
4257  parserData->qtermidxattON = false;
4258  parserData->qtermidxOneattON = false;
4259  parserData->qtermidxTwoattON = false;
4260  parserData->qtermcoefattON = false;
4261 }
4262  break;
4263 
4264  case 15:
4265 
4266  {
4267  if(osinstance->instanceData->quadraticCoefficients->numberOfQuadraticTerms <= parserData->qtermcount )
4268  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many QuadraticTerms");
4269 }
4270  break;
4271 
4272  case 20:
4273 
4274  { if(parserData->qtermidxOneattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idxOne attributes");
4275  parserData->qtermidxOneattON = true; }
4276  break;
4277 
4278  case 21:
4279 
4280  { if(parserData->qtermidxTwoattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idxTwo attributes");
4281  parserData->qtermidxTwoattON = true; }
4282  break;
4283 
4284  case 22:
4285 
4286  { if(parserData->qtermcoefattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm coef attributes");
4287  parserData->qtermcoefattON = true; }
4288  break;
4289 
4290  case 23:
4291 
4292  { if(parserData->qtermidxattON) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many qTerm idx attributes");
4293  parserData->qtermidxattON = true; }
4294  break;
4295 
4296  case 24:
4297 
4298  { if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4299 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idxOne = (yyvsp[(3) - (4)].ival);
4300  if( (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->variables->numberOfVariables){
4301  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index exceeds number of variables");
4302  }
4303 }
4304  break;
4305 
4306  case 25:
4307 
4308  { if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4309 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idxTwo = (yyvsp[(3) - (4)].ival);
4310  if( (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->variables->numberOfVariables){
4311  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index exceeds number of variables");
4312  }
4313 }
4314  break;
4315 
4316  case 26:
4317 
4318  {if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4319 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->coef = parserData->tempVal;}
4320  break;
4321 
4322  case 27:
4323 
4324  { if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
4325 osinstance->instanceData->quadraticCoefficients->qTerm[parserData->qtermcount]->idx = (yyvsp[(3) - (4)].ival);}
4326  break;
4327 
4328  case 29:
4329 
4330  {
4331  if (osglData->matrixCounter < osglData->numberOfMatrices) parserData->parser_errors +=
4332  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer matrices than specified");
4333  osinstance->instanceData->matrices->numberOfMatrices = osglData->numberOfMatrices;
4334  osinstance->instanceData->matrices->matrix = osglData->matrix;
4335 }
4336  break;
4337 
4338  case 30:
4339 
4340  {
4341  osinstance->instanceData->matrices = new Matrices();
4342  osglData->numberOfMatricesPresent = false;
4343 }
4344  break;
4345 
4346  case 31:
4347 
4348  {
4349  if (osglData->numberOfMatrices < 0) parserData->parser_errors +=
4350  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfMatrices cannot be negative");
4351  else
4352  {
4353  osglData->matrix = new OSMatrix*[osglData->numberOfMatrices];
4354  for (int i=0; i < osglData->numberOfMatrices; i++)
4355  osglData->matrix[i] = NULL;
4356  }
4357 }
4358  break;
4359 
4360  case 39:
4361 
4362  {
4363  if (parserData->coneCounter < parserData->numberOfCones) parserData->parser_errors +=
4364  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer cones than specified");
4365 }
4366  break;
4367 
4368  case 40:
4369 
4370  {
4371  osinstance->instanceData->cones = new Cones();
4372  parserData->coneCounter = 0;
4373 }
4374  break;
4375 
4376  case 41:
4377 
4378  {
4379  if (parserData->numberOfCones < 0) parserData->parser_errors +=
4380  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfCones cannot be negative");
4381  else
4382  {
4383  osinstance->instanceData->cones->cone = new Cone*[parserData->numberOfCones];
4384  for (int i=0; i < parserData->numberOfCones; i++)
4385  osinstance->instanceData->cones->cone[i] = NULL;
4386  }
4387 }
4388  break;
4389 
4390  case 45:
4391 
4392  {
4393 }
4394  break;
4395 
4396  case 47:
4397 
4398  {
4399  parserData->coneCounter++;
4400  if (parserData->coneCounter > parserData->numberOfCones) parserData->parser_errors +=
4401  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "encountered more cones than specified");
4402  osinstance->instanceData->cones->numberOfCones = parserData->coneCounter;
4403 }
4404  break;
4405 
4406  case 58:
4407 
4408  {
4409  osglData->numberOfRowsPresent = false;
4410  osglData->numberOfColumnsPresent = false;
4411  osglData->namePresent = false;
4412  osinstance->instanceData->cones->cone[parserData->coneCounter] = new NonnegativeCone();
4413  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_nonnegative;
4414 }
4415  break;
4416 
4417  case 62:
4418 
4419  {
4420  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4421  = osglData->numberOfRows;
4422  }
4423  break;
4424 
4425  case 63:
4426 
4427  {
4428  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4429  = osglData->numberOfColumns;
4430  }
4431  break;
4432 
4433  case 64:
4434 
4435  {
4436  ((NonnegativeCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4437  }
4438  break;
4439 
4440  case 68:
4441 
4442  {
4443  osglData->numberOfRowsPresent = false;
4444  osglData->numberOfColumnsPresent = false;
4445  osglData->namePresent = false;
4446  osinstance->instanceData->cones->cone[parserData->coneCounter] = new NonpositiveCone();
4447  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_nonpositive;
4448 }
4449  break;
4450 
4451  case 72:
4452 
4453  {
4454  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4455  = osglData->numberOfRows;
4456  }
4457  break;
4458 
4459  case 73:
4460 
4461  {
4462  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4463  = osglData->numberOfColumns;
4464  }
4465  break;
4466 
4467  case 74:
4468 
4469  {
4470  ((NonpositiveCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4471  }
4472  break;
4473 
4474  case 78:
4475 
4476  {
4477  osglData->numberOfRowsPresent = false;
4478  osglData->numberOfColumnsPresent = false;
4479  osglData->namePresent = false;
4480  osinstance->instanceData->cones->cone[parserData->coneCounter] = new OrthantCone();
4481  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_orthant;
4482 }
4483  break;
4484 
4485  case 79:
4486 
4487  {
4488  osglData->numberOfEl = (osglData->numberOfRows)*(osglData->numberOfColumns);
4489  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->ub
4490  = new double[osglData->numberOfEl];
4491  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->lb
4492  = new double[osglData->numberOfEl];
4493  osglData->osglCounter = 0;
4494 }
4495  break;
4496 
4497  case 82:
4498 
4499  {
4500  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4501  = osglData->numberOfRows;
4502  }
4503  break;
4504 
4505  case 83:
4506 
4507  {
4508  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4509  = osglData->numberOfColumns;
4510  }
4511  break;
4512 
4513  case 84:
4514 
4515  {
4516  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4517  }
4518  break;
4519 
4520  case 86:
4521 
4522  {
4523  if (osglData->osglCounter != osglData->numberOfEl)
4524  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of directions does not match");
4525 }
4526  break;
4527 
4528  case 91:
4529 
4530  {
4531  osglData->typePresent = false;
4532  osglData->multPresent = false;
4533  osglData->mult = 1;
4534 }
4535  break;
4536 
4537  case 92:
4538 
4539  {
4540  double ubt;
4541  double lbt;
4542  if (osglData->type == "nonnegative")
4543  {
4544  ubt = OSDBL_MAX;
4545  lbt = 0.0;
4546  }
4547  else if (osglData->type == "nonpositive")
4548  {
4549  ubt = 0.0;
4550  lbt = -OSDBL_MAX;
4551  }
4552  else if (osglData->type == "free")
4553  {
4554  ubt = OSDBL_MAX;
4555  lbt = -OSDBL_MAX;
4556  }
4557  else if (osglData->type == "zero")
4558  {
4559  ubt = 0.0;
4560  lbt = 0.0;
4561  }
4562  else
4563  {
4564  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "unrecognized direction type");
4565  }
4566  if (osglData->osglCounter + osglData->mult > osglData->numberOfEl)
4567  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "Too many directions given");
4568  for (int i=0; i < osglData->mult; i++)
4569  {
4570  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->ub[osglData->osglCounter+i] = ubt;
4571  ((OrthantCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->lb[osglData->osglCounter+i] = lbt;
4572  }
4573  osglData->osglCounter += osglData->mult;
4574 }
4575  break;
4576 
4577  case 101:
4578 
4579  {
4580  osglData->numberOfRowsPresent = false;
4581  osglData->numberOfColumnsPresent = false;
4582  osglData->namePresent = false;
4583  osinstance->instanceData->cones->cone[parserData->coneCounter] = new PolyhedralCone();
4584  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_polyhedral;
4585 }
4586  break;
4587 
4588  case 105:
4589 
4590  {
4591  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4592  = osglData->numberOfRows;
4593  }
4594  break;
4595 
4596  case 106:
4597 
4598  {
4599  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4600  = osglData->numberOfColumns;
4601  }
4602  break;
4603 
4604  case 107:
4605 
4606  {
4607  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->referenceMatrixIdx
4608  = parserData->referenceMatrixIdx;
4609  }
4610  break;
4611 
4612  case 108:
4613 
4614  {
4615  ((PolyhedralCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4616  }
4617  break;
4618 
4619  case 109:
4620 
4621  {
4622  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
4623  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
4624  if (parserData->referenceMatrixIdxPresent)
4625  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "polyhedral cone referenceMatrixIdx attribute previously set");
4626  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "polyhedral cone reference matrix index cannot be negative");
4627  parserData->referenceMatrixIdxPresent = true;
4628  parserData->referenceMatrixIdx = (yyvsp[(3) - (4)].ival);
4629 }
4630  break;
4631 
4632  case 113:
4633 
4634  {
4635  osglData->numberOfRowsPresent = false;
4636  osglData->numberOfColumnsPresent = false;
4637  osglData->namePresent = false;
4638  parserData->normScaleFactorPresent = false;
4639  parserData->distortionMatrixPresent = false;
4640  parserData->axisDirectionPresent = false;
4641  osinstance->instanceData->cones->cone[parserData->coneCounter] = new QuadraticCone();
4642  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_quadratic;
4643 }
4644  break;
4645 
4646  case 117:
4647 
4648  {
4649  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4650  = osglData->numberOfRows;
4651  }
4652  break;
4653 
4654  case 118:
4655 
4656  {
4657  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4658  = osglData->numberOfColumns;
4659  }
4660  break;
4661 
4662  case 119:
4663 
4664  {
4665  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4666  }
4667  break;
4668 
4669  case 120:
4670 
4671  {
4672  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->distortionMatrixIdx
4673  = parserData->distortionMatrix;
4674  }
4675  break;
4676 
4677  case 121:
4678 
4679  {
4680  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->normScaleFactor
4681  = parserData->normScaleFactor;
4682  }
4683  break;
4684 
4685  case 122:
4686 
4687  {
4688  ((QuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->axisDirection
4689  = parserData->axisDirection;
4690  }
4691  break;
4692 
4693  case 126:
4694 
4695  {
4696  osglData->numberOfRowsPresent = false;
4697  osglData->numberOfColumnsPresent = false;
4698  osglData->namePresent = false;
4699  parserData->normScaleFactorPresent = false;
4700  parserData->distortionMatrixPresent = false;
4701  parserData->firstAxisDirectionPresent = false;
4702  parserData->secondAxisDirectionPresent = false;
4703  osinstance->instanceData->cones->cone[parserData->coneCounter] = new RotatedQuadraticCone();
4704  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_rotatedQuadratic;
4705 }
4706  break;
4707 
4708  case 130:
4709 
4710  {
4711  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4712  = osglData->numberOfRows;
4713  }
4714  break;
4715 
4716  case 131:
4717 
4718  {
4719  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4720  = osglData->numberOfColumns;
4721  }
4722  break;
4723 
4724  case 132:
4725 
4726  {
4727  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name
4728  = osglData->name;
4729  }
4730  break;
4731 
4732  case 133:
4733 
4734  {
4735  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->distortionMatrixIdx
4736  = parserData->distortionMatrix;
4737  }
4738  break;
4739 
4740  case 134:
4741 
4742  {
4743  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->normScaleFactor
4744  = parserData->normScaleFactor;
4745  }
4746  break;
4747 
4748  case 135:
4749 
4750  {
4751  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->firstAxisDirection
4752  = parserData->firstAxisDirection;
4753  }
4754  break;
4755 
4756  case 136:
4757 
4758  {
4759  ((RotatedQuadraticCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->secondAxisDirection
4760  = parserData->secondAxisDirection;
4761  }
4762  break;
4763 
4764  case 140:
4765 
4766  {
4767  osglData->numberOfRowsPresent = false;
4768  osglData->numberOfColumnsPresent = false;
4769  osglData->namePresent = false;
4770  parserData->semidefinitenessPresent = false;
4771  osinstance->instanceData->cones->cone[parserData->coneCounter] = new SemidefiniteCone();
4772  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_semidefinite;
4773 }
4774  break;
4775 
4776  case 144:
4777 
4778  {
4779  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4780  = osglData->numberOfRows;
4781  }
4782  break;
4783 
4784  case 145:
4785 
4786  {
4787  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4788  = osglData->numberOfColumns;
4789  }
4790  break;
4791 
4792  case 146:
4793 
4794  {
4795  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4796  }
4797  break;
4798 
4799  case 147:
4800 
4801  {
4802  ((SemidefiniteCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->semidefiniteness
4803  = parserData->semidefiniteness;
4804  }
4805  break;
4806 
4807  case 151:
4808 
4809  {
4810  osglData->numberOfRowsPresent = false;
4811  osglData->numberOfColumnsPresent = false;
4812  osglData->namePresent = false;
4813  osinstance->instanceData->cones->cone[parserData->coneCounter] = new ProductCone();
4814  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_product;
4815 }
4816  break;
4817 
4818  case 155:
4819 
4820  {
4821  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4822  = osglData->numberOfRows;
4823  }
4824  break;
4825 
4826  case 156:
4827 
4828  {
4829  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4830  = osglData->numberOfColumns;
4831  }
4832  break;
4833 
4834  case 157:
4835 
4836  {
4837  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4838  }
4839  break;
4840 
4841  case 160:
4842 
4843  {
4844  osglData->numberOfEl = 0;
4845  osglData->numberOfElPresent = false;
4846 }
4847  break;
4848 
4849  case 161:
4850 
4851  {
4852  osglData->osglCounter = 0;
4853  osglData->osglIntArray = new int[osglData->numberOfEl];
4854 }
4855  break;
4856 
4857  case 167:
4858 
4859  {
4860  if (osglData->osglCounter != osglData->numberOfEl)
4861  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of factors does not match numberOfEl");
4862  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors = new IntVector();
4863  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors->numberOfEl
4864  = osglData->numberOfEl;
4865  ((ProductCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->factors ->el
4866  = osglData->osglIntArray;
4867  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
4868  parserData->suppressFurtherErrorMessages = false;
4869  parserData->ignoreDataAfterErrors = false;
4870 }
4871  break;
4872 
4873  case 170:
4874 
4875  {
4876  osglData->numberOfRowsPresent = false;
4877  osglData->numberOfColumnsPresent = false;
4878  osglData->namePresent = false;
4879  osinstance->instanceData->cones->cone[parserData->coneCounter] = new IntersectionCone();
4880  osinstance->instanceData->cones->cone[parserData->coneCounter]->coneType = ENUM_CONE_TYPE_intersection;
4881 }
4882  break;
4883 
4884  case 174:
4885 
4886  {
4887  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfRows
4888  = osglData->numberOfRows;
4889  }
4890  break;
4891 
4892  case 175:
4893 
4894  {
4895  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->numberOfColumns
4896  = osglData->numberOfColumns;
4897  }
4898  break;
4899 
4900  case 176:
4901 
4902  {
4903  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->name = osglData->name;
4904  }
4905  break;
4906 
4907  case 179:
4908 
4909  {
4910  osglData->numberOfEl = 0;
4911  osglData->numberOfElPresent = false;
4912 }
4913  break;
4914 
4915  case 180:
4916 
4917  {
4918  osglData->osglCounter = 0;
4919  osglData->osglIntArray = new int[osglData->numberOfEl];
4920 }
4921  break;
4922 
4923  case 186:
4924 
4925  {
4926  if (osglData->osglCounter != osglData->numberOfEl)
4927  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of components does not match numberOfEl");
4928  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components = new IntVector();
4929  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components->numberOfEl
4930  = osglData->numberOfEl;
4931  ((IntersectionCone*)osinstance->instanceData->cones->cone[parserData->coneCounter])->components ->el
4932  = osglData->osglIntArray;
4933  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
4934  parserData->suppressFurtherErrorMessages = false;
4935  parserData->ignoreDataAfterErrors = false;
4936 }
4937  break;
4938 
4939  case 190:
4940 
4941  {
4942  osinstance->instanceData->matrixProgramming = new MatrixProgramming();
4943 }
4944  break;
4945 
4946  case 196:
4947 
4948  {
4949  if (parserData->kounter < parserData->numberOfMatrixVar)
4950  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixVar less than number attribute");
4951  }
4952  break;
4953 
4954  case 197:
4955 
4956  {
4957  osinstance->instanceData->matrixProgramming->matrixVariables = new MatrixVariables();
4958 }
4959  break;
4960 
4961  case 198:
4962 
4963  {
4964  osinstance->instanceData->matrixProgramming->matrixVariables->numberOfMatrixVar = parserData->numberOfMatrixVar;
4965  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar
4966  = new MatrixVar*[parserData->numberOfMatrixVar];
4967  for (int i=0; i < parserData->numberOfMatrixVar; i++)
4968  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[i] = new MatrixVar();
4969  parserData->kounter = 0;
4970 }
4971  break;
4972 
4973  case 206:
4974 
4975  {
4976  parserData->kounter += osglData->mult;
4977 }
4978  break;
4979 
4980  case 207:
4981 
4982  {
4983  osglData->numberOfRowsPresent = false;
4984  osglData->numberOfColumnsPresent = false;
4985  osglData->namePresent = false;
4986  osglData->multPresent = false;
4987  osglData->mult = 1;
4988  osglData->varTypePresent = false;
4989  parserData->templateMatrixIdxPresent = false;
4990  parserData->varReferenceMatrixIdxPresent = false;
4991  parserData->lbMatrixIdxPresent = false;
4992  parserData->lbConeIdxPresent = false;
4993  parserData->ubMatrixIdxPresent = false;
4994  parserData->ubConeIdxPresent = false;
4995 }
4996  break;
4997 
4998  case 208:
4999 
5000  {
5001  if (osglData->numberOfRowsPresent == false)
5002  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
5003  if (osglData->numberOfColumnsPresent == false)
5004  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
5005  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixVar)
5006  parserData->parser_errors +=
5007  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixVar greater than number attribute");
5008  for (int i=0; i<osglData->mult; i++)
5009  {
5010  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->numberOfRows
5011  = osglData->numberOfRows;
5012  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->numberOfColumns
5013  = osglData->numberOfColumns;
5014  if (osglData->namePresent)
5015  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->name
5016  = osglData->name;
5017  if (parserData->templateMatrixIdxPresent)
5018  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->templateMatrixIdx
5019  = parserData->templateMatrixIdx;
5020  if (parserData->varReferenceMatrixIdxPresent)
5021  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->varReferenceMatrixIdx
5022  = parserData->varReferenceMatrixIdx;
5023  if (parserData->lbMatrixIdxPresent)
5024  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->lbMatrixIdx
5025  = parserData->lbMatrixIdx;
5026  if (parserData->lbConeIdxPresent)
5027  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->lbConeIdx
5028  = parserData->lbConeIdx;
5029  if (parserData->ubMatrixIdxPresent)
5030  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->ubMatrixIdx
5031  = parserData->ubMatrixIdx;
5032  if (parserData->ubConeIdxPresent)
5033  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->ubConeIdx
5034  = parserData->ubConeIdx;
5035  if (osglData->varTypePresent)
5036  {
5037  if (returnVarType(osglData->varType[0]) > 0)
5038  osinstance->instanceData->matrixProgramming->matrixVariables->matrixVar[parserData->kounter+i]->varType
5039  = osglData->varType[0];
5040  else
5041  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
5042  "varType must be one of C, B, I, S, D, J");
5043  }
5044  }
5045 }
5046  break;
5047 
5048  case 225:
5049 
5050  {
5051  if (parserData->kounter < parserData->numberOfMatrixObj)
5052  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixObj less than number attribute");
5053  }
5054  break;
5055 
5056  case 226:
5057 
5058  {
5059  osinstance->instanceData->matrixProgramming->matrixObjectives = new MatrixObjectives();
5060 }
5061  break;
5062 
5063  case 227:
5064 
5065  {
5066  osinstance->instanceData->matrixProgramming->matrixObjectives->numberOfMatrixObj = parserData->numberOfMatrixObj;
5067  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj
5068  = new MatrixObj*[parserData->numberOfMatrixObj];
5069  for (int i=0; i < parserData->numberOfMatrixObj; i++)
5070  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[i] = new MatrixObj();
5071  parserData->kounter = 0;
5072 }
5073  break;
5074 
5075  case 235:
5076 
5077  {
5078  parserData->kounter += osglData->mult;
5079 }
5080  break;
5081 
5082  case 236:
5083 
5084  {
5085  osglData->numberOfRowsPresent = false;
5086  osglData->numberOfColumnsPresent = false;
5087  osglData->namePresent = false;
5088  osglData->multPresent = false;
5089  osglData->mult = 1;
5090  parserData->templateMatrixIdxPresent = false;
5091  parserData->objReferenceMatrixIdxPresent = false;
5092  parserData->orderConeIdxPresent = false;
5093  parserData->constantMatrixIdxPresent = false;
5094 }
5095  break;
5096 
5097  case 237:
5098 
5099  {
5100  if (osglData->numberOfRowsPresent == false)
5101  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
5102  if (osglData->numberOfColumnsPresent == false)
5103  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
5104  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixObj)
5105  parserData->parser_errors +=
5106  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixObj greater than number attribute");
5107  for (int i=0; i<osglData->mult; i++)
5108  {
5109  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->numberOfRows
5110  = osglData->numberOfRows;
5111  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->numberOfColumns
5112  = osglData->numberOfColumns;
5113  if (osglData->namePresent)
5114  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->name
5115  = osglData->name;
5116  if (parserData->templateMatrixIdxPresent)
5117  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->templateMatrixIdx
5118  = parserData->templateMatrixIdx;
5119  if (parserData->objReferenceMatrixIdxPresent)
5120  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->objReferenceMatrixIdx
5121  = parserData->objReferenceMatrixIdx;
5122  if (parserData->orderConeIdxPresent)
5123  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->orderConeIdx
5124  = parserData->orderConeIdx;
5125  if (parserData->constantMatrixIdxPresent)
5126  osinstance->instanceData->matrixProgramming->matrixObjectives->matrixObj[parserData->kounter+i]->constantMatrixIdx
5127  = parserData->constantMatrixIdx;
5128  }
5129 }
5130  break;
5131 
5132  case 251:
5133 
5134  {
5135  if (parserData->kounter < parserData->numberOfMatrixCon)
5136  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixCon less than number attribute");
5137  }
5138  break;
5139 
5140  case 252:
5141 
5142  {
5143  osinstance->instanceData->matrixProgramming->matrixConstraints = new MatrixConstraints();
5144 }
5145  break;
5146 
5147  case 253:
5148 
5149  {
5150  osinstance->instanceData->matrixProgramming->matrixConstraints->numberOfMatrixCon = parserData->numberOfMatrixCon;
5151  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon
5152  = new MatrixCon*[parserData->numberOfMatrixCon];
5153  for (int i=0; i < parserData->numberOfMatrixCon; i++)
5154  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[i] = new MatrixCon();
5155  parserData->kounter = 0;
5156 }
5157  break;
5158 
5159  case 261:
5160 
5161  {
5162  parserData->kounter += osglData->mult;
5163 }
5164  break;
5165 
5166  case 262:
5167 
5168  {
5169  osglData->numberOfRowsPresent = false;
5170  osglData->numberOfColumnsPresent = false;
5171  osglData->namePresent = false;
5172  osglData->multPresent = false;
5173  osglData->mult = 1;
5174  parserData->templateMatrixIdxPresent = false;
5175  parserData->conReferenceMatrixIdxPresent = false;
5176  parserData->lbMatrixIdxPresent = false;
5177  parserData->lbConeIdxPresent = false;
5178  parserData->ubMatrixIdxPresent = false;
5179  parserData->ubConeIdxPresent = false;
5180 }
5181  break;
5182 
5183  case 263:
5184 
5185  {
5186  if (osglData->numberOfRowsPresent == false)
5187  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfRows\" missing");
5188  if (osglData->numberOfColumnsPresent == false)
5189  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute \"numberOfColumns\" missing");
5190  if (parserData->kounter + osglData->mult > parserData->numberOfMatrixCon)
5191  parserData->parser_errors +=
5192  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrixCon greater than number attribute");
5193  for (int i=0; i<osglData->mult; i++)
5194  {
5195  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->numberOfRows
5196  = osglData->numberOfRows;
5197  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->numberOfColumns
5198  = osglData->numberOfColumns;
5199  if (osglData->namePresent)
5200  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->name
5201  = osglData->name;
5202  if (parserData->templateMatrixIdxPresent)
5203  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->templateMatrixIdx
5204  = parserData->templateMatrixIdx;
5205  if (parserData->conReferenceMatrixIdxPresent)
5206  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->conReferenceMatrixIdx
5207  = parserData->conReferenceMatrixIdx;
5208  if (parserData->lbMatrixIdxPresent)
5209  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->lbMatrixIdx
5210  = parserData->lbMatrixIdx;
5211  if (parserData->lbConeIdxPresent)
5212  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->lbConeIdx
5213  = parserData->lbConeIdx;
5214  if (parserData->ubMatrixIdxPresent)
5215  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->ubMatrixIdx
5216  = parserData->ubMatrixIdx;
5217  if (parserData->ubConeIdxPresent)
5218  osinstance->instanceData->matrixProgramming->matrixConstraints->matrixCon[parserData->kounter+i]->ubConeIdx
5219  = parserData->ubConeIdx;
5220  }
5221 }
5222  break;
5223 
5224  case 279:
5225 
5226  {osinstance->instanceData->timeDomain = new TimeDomain();}
5227  break;
5228 
5229  case 286:
5230 
5231  {
5232  if( osinstance->instanceData->timeDomain->stages->numberOfStages > parserData->stagecount )
5233  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of stages less than numberOfStages");
5234  /* After stages have been processed, make sure that all variables and constraints have been assigned
5235  * to a stage (uniquely) and all objectives have been assigned as well (possibly more than once).
5236  * For future reference also record the stage to which each variable and constraint belongs.
5237  */
5238  parserData->m_miVarStageInfo = new int [ osinstance->instanceData->variables->numberOfVariables ];
5239  parserData->m_miObjStageInfo = new int [ osinstance->instanceData->objectives->numberOfObjectives ];
5240  parserData->m_miConStageInfo = new int [ osinstance->instanceData->constraints->numberOfConstraints ];
5241  parserData->nvarcovered = 0;
5242  for (int i = 0; i < osinstance->instanceData->variables->numberOfVariables; i++)
5243  parserData->m_miVarStageInfo[i] = -1;
5244  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5245  parserData->m_miObjStageInfo[i] = -1;
5246  for (int i = 0; i < osinstance->instanceData->constraints->numberOfConstraints; i++)
5247  parserData->m_miConStageInfo[i] = -1;
5248  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5249  {for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->variables->numberOfVariables; i++)
5250  {
5251  if (parserData->m_miVarStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->variables->var[i]->idx ] != -1)
5252  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable belongs to two stages");
5253  parserData->m_miVarStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->variables->var[i]->idx ] = k;
5254  };
5255  parserData->nvarcovered += osinstance->instanceData->timeDomain->stages->stage[k]->variables->numberOfVariables;
5256  };
5257  if (parserData->nvarcovered != osinstance->instanceData->variables->numberOfVariables)
5258  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some variables not assigned to any stage");
5259  parserData->nconcovered = 0;
5260  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5261  {for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->constraints->numberOfConstraints; i++)
5262  {if (parserData->m_miConStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->constraints->con[i]->idx ] != -1)
5263  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint belongs to two stages");
5264  parserData->m_miConStageInfo[ osinstance->instanceData->timeDomain->stages->stage[k]->constraints->con[i]->idx ] = k;
5265  };
5266  parserData->nconcovered += osinstance->instanceData->timeDomain->stages->stage[k]->constraints->numberOfConstraints;
5267  };
5268  if (parserData->nconcovered != osinstance->instanceData->constraints->numberOfConstraints)
5269  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some constraints not assigned to any stage");
5270  for (int k = 0; k < osinstance->instanceData->timeDomain->stages->numberOfStages; k++)
5271  { for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[k]->objectives->numberOfObjectives; i++)
5272  { if (parserData->m_miObjStageInfo[ -osinstance->instanceData->timeDomain->stages->stage[k]->objectives->obj[i]->idx-1 ] == -1)
5273  parserData->m_miObjStageInfo[ -osinstance->instanceData->timeDomain->stages->stage[k]->objectives->obj[i]->idx-1 ] = k;
5274  };
5275  };
5276  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5277  if (parserData->m_miObjStageInfo[i] == -1)
5278  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "some objectives not assigned to any stage");
5279 }
5280  break;
5281 
5282  case 287:
5283 
5284  {osinstance->instanceData->timeDomain->stages = new TimeDomainStages();}
5285  break;
5286 
5287  case 288:
5288 
5289  {
5290  if ( *(yyvsp[(2) - (5)].sval) != *(yyvsp[(4) - (5)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5291  if ((yyvsp[(3) - (5)].ival) < 1) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of stages must be positive");
5292  osinstance->instanceData->timeDomain->stages->numberOfStages = (yyvsp[(3) - (5)].ival);
5293  if (osinstance->instanceData->timeDomain->stages->numberOfStages > 0 )
5294  osinstance->instanceData->timeDomain->stages->stage = new TimeDomainStage*[ (yyvsp[(3) - (5)].ival) ];
5295  for(int i = 0; i < (yyvsp[(3) - (5)].ival); i++)
5296  { osinstance->instanceData->timeDomain->stages->stage[i] = new TimeDomainStage();
5297  osinstance->instanceData->timeDomain->stages->stage[i]->variables = new TimeDomainStageVariables();
5298  osinstance->instanceData->timeDomain->stages->stage[i]->constraints = new TimeDomainStageConstraints();
5299  osinstance->instanceData->timeDomain->stages->stage[i]->objectives = new TimeDomainStageObjectives();
5300  }
5301 }
5302  break;
5303 
5304  case 291:
5305 
5306  {
5307  if( osinstance->instanceData->timeDomain->stages->numberOfStages <= parserData->stagecount)
5308  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many stages");
5309  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables = 0;
5310  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints = 0;
5311  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives = 0;
5312 }
5313  break;
5314 
5315  case 292:
5316 
5317  { /* set defaults for next stage */
5318  parserData->stagenameON = false;
5319  parserData->stageVariablesON = false;
5320  parserData->stageObjectivesON = false;
5321  parserData->stageConstraintsON = false;
5322  parserData->stageVariablesOrdered = false;
5323  parserData->stageObjectivesOrdered = false;
5324  parserData->stageConstraintsOrdered = false;
5325  parserData->stageVariableStartIdx = 0;
5326  parserData->stageObjectiveStartIdx = 0;
5327  parserData->stageConstraintStartIdx = 0;
5328  parserData->stagevarcount = 0;
5329  parserData->stageconcount = 0;
5330  parserData->stageobjcount = 0;
5331  parserData->stagecount++;
5332 }
5333  break;
5334 
5335  case 294:
5336 
5337  {
5338  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->name = (yyvsp[(2) - (3)].sval); free((yyvsp[(2) - (3)].sval));}
5339  break;
5340 
5341  case 299:
5342 
5343  {
5344  parserData->stageVariablesON = true;
5345  }
5346  break;
5347 
5348  case 304:
5349 
5350  {
5351  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5352  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5353  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of variables cannot be negative");
5354  if ((yyvsp[(3) - (4)].ival) > osinstance->instanceData->variables->numberOfVariables)
5355  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variables in this stage");
5356  if ((yyvsp[(3) - (4)].ival) > 0) {
5357  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables > 0)
5358  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfVariables");
5359  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables = (yyvsp[(3) - (4)].ival);
5360  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var = new TimeDomainStageVar*[ (yyvsp[(3) - (4)].ival) ];
5361  for (int i = 0; i < (yyvsp[(3) - (4)].ival); i++)
5362  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i] = new TimeDomainStageVar;
5363  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i]->idx = 0;
5364  }
5365  };
5366 }
5367  break;
5368 
5369  case 305:
5370 
5371  {
5372  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5373  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5374  if (parserData->stageVariablesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5375  if ((yyvsp[(3) - (4)].ival) < 0 && (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->variables->numberOfVariables)
5376  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index out of range");
5377  parserData->stageVariablesOrdered = true;
5378  parserData->stageVariableStartIdx = (yyvsp[(3) - (4)].ival);
5379 }
5380  break;
5381 
5382  case 306:
5383 
5384  {
5385  if ((parserData->stageVariablesOrdered != true) &&
5386  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables > 0) )
5387  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "varlist missing");
5388  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables; i++)
5389  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[i]->idx = parserData->stageVariableStartIdx + i;
5390  }
5391  break;
5392 
5393  case 307:
5394 
5395  {
5396  if (parserData->stagevarcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables)
5397  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few variables supplied");
5398  }
5399  break;
5400 
5401  case 312:
5402 
5403  {if (parserData->stageVariablesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no varlist expected");}
5404  break;
5405 
5406  case 314:
5407 
5408  {
5409  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5410  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5411  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->variables->numberOfVariables)
5412  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "variable index out of range");
5413  if (parserData->stagevarcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->numberOfVariables)
5414  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variables in this stage");
5415  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->variables->var[parserData->stagevarcount]->idx = (yyvsp[(3) - (4)].ival);
5416  parserData->stagevarcount++;
5417 }
5418  break;
5419 
5420  case 318:
5421 
5422  {
5423  parserData->stageConstraintsON = true;
5424  }
5425  break;
5426 
5427  case 323:
5428 
5429  {
5430  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5431  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5432  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of constraints cannot be negative");
5433  if ((yyvsp[(3) - (4)].ival) > osinstance->instanceData->constraints->numberOfConstraints)
5434  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many constraints in this stage");
5435  if ((yyvsp[(3) - (4)].ival) > 0) {
5436  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints > 0)
5437  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfConstraints");
5438  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints = (yyvsp[(3) - (4)].ival);
5439  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con = new TimeDomainStageCon*[ (yyvsp[(3) - (4)].ival) ];
5440  for (int i = 0; i < (yyvsp[(3) - (4)].ival); i++)
5441  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i] = new TimeDomainStageCon;
5442  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i]->idx = 0;
5443  }
5444  };
5445 }
5446  break;
5447 
5448  case 324:
5449 
5450  {
5451  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5452  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5453  if (parserData->stageConstraintsOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5454  if ((yyvsp[(3) - (4)].ival) < 0 && (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->constraints->numberOfConstraints)
5455  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint index out of range");
5456  parserData->stageConstraintsOrdered = true;
5457  parserData->stageConstraintStartIdx = (yyvsp[(3) - (4)].ival);
5458 }
5459  break;
5460 
5461  case 325:
5462 
5463  {
5464  if ((parserData->stageConstraintsOrdered != true) &&
5465  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints > 0) )
5466  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "conlist missing");
5467  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints; i++)
5468  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[i]->idx = parserData->stageConstraintStartIdx + i;
5469  }
5470  break;
5471 
5472  case 326:
5473 
5474  {
5475  if (parserData->stageconcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints)
5476  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few constraints supplied");
5477  }
5478  break;
5479 
5480  case 331:
5481 
5482  {if (parserData->stageConstraintsOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no conlist expected");}
5483  break;
5484 
5485  case 333:
5486 
5487  {
5488  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5489  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5490  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->constraints->numberOfConstraints)
5491  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "constraint index out of range");
5492  if (parserData->stageconcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->numberOfConstraints)
5493  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many constraints in this stage");
5494  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->constraints->con[parserData->stageconcount]->idx = (yyvsp[(3) - (4)].ival);
5495  parserData->stageconcount++;
5496 }
5497  break;
5498 
5499  case 336:
5500 
5501  { /* By default, an objective belongs to every stage */
5502  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives =
5503  osinstance->instanceData->objectives->numberOfObjectives;
5504  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj =
5505  new TimeDomainStageObj*[ osinstance->instanceData->objectives->numberOfObjectives ];
5506  for (int i = 0; i < osinstance->instanceData->objectives->numberOfObjectives; i++)
5507  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i] = new TimeDomainStageObj;
5508  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = -(i+1);
5509  }
5510  }
5511  break;
5512 
5513  case 337:
5514 
5515  {
5516  parserData->stageObjectivesON = true;
5517  }
5518  break;
5519 
5520  case 342:
5521 
5522  {
5523  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5524  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5525  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of objectives cannot be negative");
5526  if ((yyvsp[(3) - (4)].ival) > osinstance->instanceData->objectives->numberOfObjectives)
5527  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many objectives in this stage");
5528  if ((yyvsp[(3) - (4)].ival) > 0) {
5529  if (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives > 0)
5530  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute numberOfObjectives");
5531  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives = (yyvsp[(3) - (4)].ival);
5532  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj = new TimeDomainStageObj*[ (yyvsp[(3) - (4)].ival) ];
5533  for (int i = 0; i < (yyvsp[(3) - (4)].ival); i++)
5534  { osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i] = new TimeDomainStageObj;
5535  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = 0;
5536  }
5537  };
5538 }
5539  break;
5540 
5541  case 343:
5542 
5543  {
5544  if ((parserData->stageObjectivesOrdered != true) &&
5545  (osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives > 0) )
5546  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objlist missing");
5547  for (int i = 0; i < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives; i++)
5548  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[i]->idx = parserData->stageObjectiveStartIdx - i;
5549  }
5550  break;
5551 
5552  case 344:
5553 
5554  {
5555  if (parserData->stageobjcount < osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives)
5556  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few objectives supplied");
5557  }
5558  break;
5559 
5560  case 349:
5561 
5562  {if (parserData->stageObjectivesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "no objlist expected");}
5563  break;
5564 
5565  case 351:
5566 
5567  {
5568  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5569  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5570  if ((yyvsp[(3) - (4)].ival) >= 0 || (yyvsp[(3) - (4)].ival) >= -osinstance->instanceData->objectives->numberOfObjectives - 1)
5571  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objective index out of range");
5572  if (parserData->stageobjcount >= osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->numberOfObjectives)
5573  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many objectives in this stage");
5574  osinstance->instanceData->timeDomain->stages->stage[parserData->stagecount]->objectives->obj[parserData->stageobjcount]->idx = (yyvsp[(3) - (4)].ival);
5575  parserData->stageobjcount++;
5576 }
5577  break;
5578 
5579  case 354:
5580 
5581  {osinstance->instanceData->timeDomain->interval = new TimeDomainInterval();
5582  }
5583  break;
5584 
5585  case 355:
5586 
5587  {
5588  parserData->intervalhorizonON = false;
5589  parserData->intervalstartON = false;
5590  printf("Interval not yet supported.\n\n");
5591 }
5592  break;
5593 
5594  case 360:
5595 
5596  { if(parserData->intervalhorizonON)
5597  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many interval horizon attributes");
5598  parserData->intervalhorizonON = true; }
5599  break;
5600 
5601  case 361:
5602 
5603  { if(parserData->intervalstartON)
5604  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many interval start attributes");
5605  parserData->intervalstartON = true; }
5606  break;
5607 
5608  case 362:
5609 
5610  {
5611  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5612  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5613  if (parserData->stageObjectivesOrdered == true) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "duplicate attribute");
5614  if ((yyvsp[(3) - (4)].ival) >= 0 && (yyvsp[(3) - (4)].ival) <= -osinstance->instanceData->objectives->numberOfObjectives - 1)
5615  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "objective index out of range");
5616  parserData->stageObjectivesOrdered = true;
5617  parserData->stageObjectiveStartIdx = (yyvsp[(3) - (4)].ival);
5618 }
5619  break;
5620 
5621  case 363:
5622 
5623  {
5624  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5625  parserData->intervalhorizon = parserData->tempVal;}
5626  break;
5627 
5628  case 364:
5629 
5630  {
5631  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5632  parserData->intervalstart = parserData->tempVal;}
5633  break;
5634 
5635  case 365:
5636 
5637  {
5638  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5639  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5640  if (osglData->numberOfMatricesPresent)
5641  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfMatrices attribute previously set");
5642  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <matrix> elements cannot be negative");
5643  osglData->numberOfMatricesPresent = true;
5644  osglData->numberOfMatrices = (yyvsp[(3) - (4)].ival);
5645 }
5646  break;
5647 
5648  case 366:
5649 
5650  {
5651  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5652  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5653  if (parserData->numberOfConesPresent)
5654  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfCones attribute previously set");
5655  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <cone> elements cannot be negative");
5656  parserData->numberOfConesPresent = true;
5657  parserData->numberOfCones = (yyvsp[(3) - (4)].ival);
5658 }
5659  break;
5660 
5661  case 367:
5662 
5663  {
5664  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5665  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5666  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix variables cannot be negative");
5667  parserData->numberOfMatrixVar = (yyvsp[(3) - (4)].ival);
5668 }
5669  break;
5670 
5671  case 368:
5672 
5673  {
5674  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5675  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5676  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix objectives cannot be negative");
5677  parserData->numberOfMatrixObj = (yyvsp[(3) - (4)].ival);
5678 }
5679  break;
5680 
5681  case 369:
5682 
5683  {
5684  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5685  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5686  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of matrix constraints cannot be negative");
5687  parserData->numberOfMatrixCon = (yyvsp[(3) - (4)].ival);
5688 }
5689  break;
5690 
5691  case 370:
5692 
5693  {
5694  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5695  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5696  if (parserData->normScaleFactorPresent)
5697  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "normScaleFactor attribute previously set");
5698  if (parserData->tempVal <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "scale factor must be positive");
5699  parserData->normScaleFactorPresent = true;
5700  parserData->normScaleFactor = parserData->tempVal;
5701 }
5702  break;
5703 
5704  case 371:
5705 
5706  {
5707  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5708  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5709  if (parserData->distortionMatrixPresent)
5710  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "distortionMatrixIdx attribute previously set");
5711  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "distortion matrix index cannot be negative");
5712  parserData->distortionMatrixPresent = true;
5713  parserData->distortionMatrix = (yyvsp[(3) - (4)].ival);
5714 }
5715  break;
5716 
5717  case 372:
5718 
5719  {
5720  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5721  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5722  if (parserData->axisDirectionPresent)
5723  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axisDirection attribute previously set");
5724  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5725  parserData->axisDirectionPresent = true;
5726  parserData->axisDirection = (yyvsp[(3) - (4)].ival);
5727 }
5728  break;
5729 
5730  case 373:
5731 
5732  {
5733  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5734  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5735  if (parserData->firstAxisDirectionPresent)
5736  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "firstAxisDirection attribute previously set");
5737  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5738  parserData->firstAxisDirectionPresent = true;
5739  parserData->firstAxisDirection = (yyvsp[(3) - (4)].ival);
5740 }
5741  break;
5742 
5743  case 374:
5744 
5745  {
5746  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5747  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5748  if (parserData->secondAxisDirectionPresent)
5749  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "secondAxisDirection attribute previously set");
5750  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "axis direction index cannot be negative");
5751  parserData->secondAxisDirectionPresent = true;
5752  parserData->secondAxisDirection = (yyvsp[(3) - (4)].ival);
5753 }
5754  break;
5755 
5756  case 375:
5757 
5758  {
5759  if (parserData->semidefinitenessPresent)
5760  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "name attribute previously set");
5761  parserData->semidefinitenessPresent = true;
5762  if ((yyvsp[(2) - (3)].sval) != "positive" && (yyvsp[(2) - (3)].sval) != "negative")
5763  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "semidefiniteness must be either \"positive\" or \"negative\"");
5764  else
5765  parserData->semidefiniteness = (yyvsp[(2) - (3)].sval);
5766  free((yyvsp[(2) - (3)].sval));
5767 }
5768  break;
5769 
5770  case 376:
5771 
5772  {
5773  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5774  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5775  if (parserData->matrixIdxPresent)
5776  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrixIdx attribute previously set");
5777  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrix index cannot be negative");
5778  parserData->matrixIdxPresent = true;
5779  parserData->matrixIdx = (yyvsp[(3) - (4)].ival);
5780 }
5781  break;
5782 
5783  case 377:
5784 
5785  {
5786  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5787  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5788  if (parserData->lbMatrixIdxPresent)
5789  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one lbMatrix attribute allowed");
5790  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5791  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for lbMatrix attribute");
5792  parserData->lbMatrixIdxPresent = true;
5793  parserData->lbMatrixIdx = (yyvsp[(3) - (4)].ival);
5794 }
5795  break;
5796 
5797  case 378:
5798 
5799  {
5800  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5801  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5802  if (parserData->ubMatrixIdxPresent)
5803  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one ubMatrix attribute allowed");
5804  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5805  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for ubMatrix attribute");
5806  parserData->ubMatrixIdxPresent = true;
5807  parserData->ubMatrixIdx = (yyvsp[(3) - (4)].ival);
5808 }
5809  break;
5810 
5811  case 379:
5812 
5813  {
5814  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5815  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5816  if (parserData->constantMatrixIdxPresent)
5817  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one constant matrix attribute allowed");
5818  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5819  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for constant matrix attribute");
5820  parserData->constantMatrixIdxPresent = true;
5821  parserData->constantMatrixIdx = (yyvsp[(3) - (4)].ival);
5822 }
5823  break;
5824 
5825  case 380:
5826 
5827  {
5828  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
5829  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
5830  if (parserData->templateMatrixIdxPresent)
5831  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "templateMatrixIdx attribute previously set");
5832  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5833  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "template matrix index cannot be negative");
5834  parserData->templateMatrixIdxPresent = true;
5835  parserData->templateMatrixIdx = (yyvsp[(3) - (4)].ival);
5836 }
5837  break;
5838 
5839  case 381:
5840 
5841  {
5842  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5843  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5844  if (parserData->varReferenceMatrixIdxPresent)
5845  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one varReference matrix attribute allowed");
5846  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5847  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for varReference matrix attribute");
5848  parserData->varReferenceMatrixIdxPresent = true;
5849  parserData->varReferenceMatrixIdx = (yyvsp[(3) - (4)].ival);
5850 }
5851  break;
5852 
5853  case 382:
5854 
5855  {
5856  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5857  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5858  if (parserData->objReferenceMatrixIdxPresent)
5859  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one objReference matrix attribute allowed");
5860  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5861  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for objReference matrix attribute");
5862  parserData->objReferenceMatrixIdxPresent = true;
5863  parserData->objReferenceMatrixIdx = (yyvsp[(3) - (4)].ival);
5864 }
5865  break;
5866 
5867  case 383:
5868 
5869  {
5870  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5871  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5872  if (parserData->conReferenceMatrixIdxPresent)
5873  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one conReference matrix attribute allowed");
5874  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->matrices->numberOfMatrices)
5875  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for conReference matrix attribute");
5876  parserData->conReferenceMatrixIdxPresent = true;
5877  parserData->conReferenceMatrixIdx = (yyvsp[(3) - (4)].ival);
5878 }
5879  break;
5880 
5881  case 384:
5882 
5883  {
5884  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5885  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5886  if (parserData->lbConeIdxPresent)
5887  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one lbCone attribute allowed");
5888  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->cones->numberOfCones)
5889  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for lbCone attribute");
5890  parserData->lbConeIdxPresent = true;
5891  parserData->lbConeIdx = (yyvsp[(3) - (4)].ival);
5892 }
5893  break;
5894 
5895  case 385:
5896 
5897  {
5898  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5899  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5900  if (parserData->ubConeIdxPresent)
5901  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one ubCone attribute allowed");
5902  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->cones->numberOfCones)
5903  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for ubCone attribute");
5904  parserData->ubConeIdxPresent = true;
5905  parserData->ubConeIdx = (yyvsp[(3) - (4)].ival);
5906 }
5907  break;
5908 
5909  case 386:
5910 
5911  {
5912  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
5913  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
5914  if (parserData->orderConeIdxPresent)
5915  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one orderCone attribute allowed");
5916  if ((yyvsp[(3) - (4)].ival) < 0 || (yyvsp[(3) - (4)].ival) >= osinstance->instanceData->cones->numberOfCones)
5917  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "illegal value for orderCone attribute");
5918  parserData->orderConeIdxPresent = true;
5919  parserData->orderConeIdx = (yyvsp[(3) - (4)].ival);
5920 }
5921  break;
5922 
5923  case 387:
5924 
5925  {parserData->tempVal = (yyvsp[(2) - (3)].ival);}
5926  break;
5927 
5928  case 388:
5929 
5930  {parserData->tempVal = (yyvsp[(2) - (3)].dval);}
5931  break;
5932 
5933  case 396:
5934 
5935  {
5936  if (osglData->osglCounter < osglData->numberOfEl)
5937  {
5938  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer data elements than specified");
5939  parserData->ignoreDataAfterErrors = true;
5940  }
5941  }
5942  break;
5943 
5944  case 401:
5945 
5946  {
5947  osglData->multPresent = false;
5948  osglData->incrPresent = false;
5949  osglData->mult = 1;
5950  osglData->incr = 0;
5951 }
5952  break;
5953 
5954  case 407:
5955 
5956  {
5957  if (osglData->osglCounter + osglData->mult > osglData->numberOfEl)
5958  {
5959  if (!parserData->suppressFurtherErrorMessages)
5960  {
5961  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
5962  parserData->suppressFurtherErrorMessages = true;
5963  parserData->ignoreDataAfterErrors = true;
5964  }
5965  }
5966  else
5967  for (int i=0; i<osglData->mult; i++)
5968  osglData->osglIntArray[osglData->osglCounter++] = (yyvsp[(2) - (3)].ival) + i*osglData->incr;
5969 }
5970  break;
5971 
5972  case 413:
5973 
5974  {
5975  char* b64string = (yyvsp[(2) - (3)].sval);
5976  if( b64string == NULL)
5977  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data expected");
5978  if (osglData->base64Size != sizeof(int))
5979  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 encoded with a size of int different than on this machine");
5980 
5981  std::string base64decodeddata = Base64::decodeb64( b64string );
5982  int base64decodeddatalength = base64decodeddata.length();
5983  int *intvec = NULL;
5984  if ( osglData->numberOfEl != (base64decodeddatalength/osglData->base64Size) )
5985  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data length does not match numberOfEl");
5986  else
5987  {
5988  intvec = (int*)&base64decodeddata[0];
5989  for(int i = 0; i < (base64decodeddatalength/osglData->base64Size); i++)
5990  {
5991  osglData->osglIntArray[i] = *(intvec++);
5992  }
5993  }
5994  //delete[] b64string;
5995  free((yyvsp[(2) - (3)].sval));
5996 }
5997  break;
5998 
5999  case 414:
6000 
6001  {
6002  if (osglData->osglCounter < osglData->numberOfEl)
6003  {
6004  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "fewer data elements than specified");
6005  parserData->ignoreDataAfterErrors = true;
6006  }
6007  }
6008  break;
6009 
6010  case 419:
6011 
6012  {
6013  osglData->multPresent = false;
6014  osglData->incrPresent = false;
6015  osglData->mult = 1;
6016 }
6017  break;
6018 
6019  case 422:
6020 
6021  {
6022  if (osglData->osglCounter + osglData->mult > osglData->numberOfEl)
6023  {
6024  if (!parserData->suppressFurtherErrorMessages)
6025  {
6026  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
6027  parserData->suppressFurtherErrorMessages = true;
6028  parserData->ignoreDataAfterErrors = true;
6029  }
6030  }
6031  else
6032  for (int i=0; i<osglData->mult; i++)
6033  osglData->osglDblArray[osglData->osglCounter++] = parserData->tempVal;
6034 }
6035  break;
6036 
6037  case 428:
6038 
6039  {
6040  char* b64string = (yyvsp[(2) - (3)].sval);
6041  if( b64string == NULL)
6042  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data expected");
6043  if (osglData->base64Size != sizeof(int))
6044  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 encoded with a size of int different than on this machine");
6045 
6046  std::string base64decodeddata = Base64::decodeb64( b64string );
6047  int base64decodeddatalength = base64decodeddata.length();
6048  double *dblvec = NULL;
6049  if ( osglData->numberOfEl != (base64decodeddatalength/osglData->base64Size) )
6050  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base 64 data length does not match numberOfEl");
6051  else
6052  {
6053  dblvec = (double*)&base64decodeddata[0];
6054  for(int i = 0; i < (base64decodeddatalength/osglData->base64Size); i++)
6055  {
6056  osglData->osglDblArray[i] = *(dblvec++);
6057  }
6058  }
6059  //delete[] b64string;
6060  free((yyvsp[(2) - (3)].sval));
6061 }
6062  break;
6063 
6064  case 429:
6065 
6066  {
6067 // IMPORTANT -- HERE IS WHERE WE CREATE THE CONSTRUCTOR LISTS
6068  osglData->matrix[osglData->matrixCounter] =
6070  osglData->matrix[osglData->matrixCounter]->idx = osglData->matrixCounter;
6071  osglData->matrixCounter++;
6072 }
6073  break;
6074 
6075  case 430:
6076 
6077  {
6078  if (osglData->matrixCounter >= osglData->numberOfMatrices)
6079  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
6080  osglData->symmetryPresent = false;
6081  osglData->typePresent = false;
6082  osglData->numberOfRowsPresent = false;
6083  osglData->numberOfColumnsPresent = false;
6084  osglData->namePresent = false;
6085  osglData->mtxConstructorVec.clear();
6086  osglData->mtxBlocksVec.clear();
6087  osglData->mtxBlkVec.clear();
6088  osglData->nBlocksVec.clear();
6089 
6094  osglData->tempC = new OSMatrix();
6095  osglData->mtxConstructorVec.push_back((OSMatrix*)osglData->tempC);
6096  osglData->mtxBlkVec.push_back((OSMatrix*)osglData->tempC);
6097 }
6098  break;
6099 
6100  case 431:
6101 
6102  {
6103  if (osglData->numberOfRowsPresent == false)
6104  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute numberOfRows is missing");
6105  else
6106  ((OSMatrix*)osglData->tempC)->numberOfRows = osglData->numberOfRows;
6107  if (osglData->numberOfColumnsPresent == false)
6108  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute numberOfColumns is missing");
6109  else
6110  ((OSMatrix*)osglData->tempC)->numberOfColumns = osglData->numberOfColumns;
6111  if (osglData->symmetryPresent == true)
6112  ((OSMatrix*)osglData->tempC)->symmetry = (ENUM_MATRIX_SYMMETRY)returnMatrixSymmetry(osglData->symmetry);
6113  if (osglData->namePresent == true)
6114  ((OSMatrix*)osglData->tempC)->name = osglData->name;
6115  if (osglData->typePresent == true)
6116  ((OSMatrix*)osglData->tempC)->matrixType = (ENUM_MATRIX_TYPE)returnMatrixType(osglData->type);
6117 }
6118  break;
6119 
6120  case 439:
6121 
6122  {
6123  if (osglData->matrixCounter >= osglData->numberOfMatrixVar)
6124  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
6125  osglData->symmetryPresent = false;
6126  osglData->typePresent = false;
6127  osglData->numberOfRowsPresent = false;
6128  osglData->numberOfColumnsPresent = false;
6129  osglData->namePresent = false;
6130  osglData->matrixVarIdxPresent = false;
6131 
6132  osglData->mtxConstructorVec.clear();
6133  osglData->mtxBlocksVec.clear();
6134  osglData->mtxBlkVec.clear();
6135  osglData->nBlocksVec.clear();
6136 
6141  osglData->tempC = new OSMatrixWithMatrixVarIdx();
6142  osglData->mtxConstructorVec.push_back((OSMatrixWithMatrixVarIdx*)osglData->tempC);
6143  osglData->mtxBlkVec.push_back((OSMatrixWithMatrixVarIdx*)osglData->tempC);
6144 }
6145  break;
6146 
6147  case 440:
6148 
6149  {
6150  if (osglData->matrixCounter >= osglData->numberOfMatrixObj)
6151  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
6152  osglData->symmetryPresent = false;
6153  osglData->typePresent = false;
6154  osglData->numberOfRowsPresent = false;
6155  osglData->numberOfColumnsPresent = false;
6156  osglData->namePresent = false;
6157  osglData->matrixObjIdxPresent = false;
6158 
6159  osglData->mtxConstructorVec.clear();
6160  osglData->mtxBlocksVec.clear();
6161  osglData->mtxBlkVec.clear();
6162  osglData->nBlocksVec.clear();
6163 
6168  osglData->tempC = new OSMatrixWithMatrixObjIdx();
6169  osglData->mtxConstructorVec.push_back((OSMatrixWithMatrixObjIdx*)osglData->tempC);
6170  osglData->mtxBlkVec.push_back((OSMatrixWithMatrixObjIdx*)osglData->tempC);
6171 }
6172  break;
6173 
6174  case 441:
6175 
6176  {
6177  if (osglData->matrixCounter >= osglData->numberOfMatrixCon)
6178  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more matrices than specified");
6179  osglData->symmetryPresent = false;
6180  osglData->typePresent = false;
6181  osglData->numberOfRowsPresent = false;
6182  osglData->numberOfColumnsPresent = false;
6183  osglData->namePresent = false;
6184  osglData->matrixConIdxPresent = false;
6185 
6186  osglData->mtxConstructorVec.clear();
6187  osglData->mtxBlocksVec.clear();
6188  osglData->mtxBlkVec.clear();
6189  osglData->nBlocksVec.clear();
6190 
6195  osglData->tempC = new OSMatrixWithMatrixConIdx();
6196  osglData->mtxConstructorVec.push_back((OSMatrixWithMatrixConIdx*)osglData->tempC);
6197  osglData->mtxBlkVec.push_back((OSMatrixWithMatrixConIdx*)osglData->tempC);
6198 }
6199  break;
6200 
6201  case 445:
6202 
6203  {
6204  osglData->mtxBlkVec.back()->m_mChildren =
6205  new MatrixNode*[osglData->mtxBlkVec.back()->inumberOfChildren];
6206  osglData->mtxBlkVec.pop_back();
6207 }
6208  break;
6209 
6210  case 448:
6211 
6212  {
6213  osglData->mtxBlkVec.back()->inumberOfChildren++;
6214 }
6215  break;
6216 
6217  case 449:
6218 
6219  {
6220  osglData->tempC = new BaseMatrix();
6221  osglData->mtxConstructorVec.push_back((BaseMatrix*)osglData->tempC);
6222 
6223  osglData->baseMatrixIdxPresent = false;
6224  osglData->targetMatrixFirstRowPresent = false;
6225  osglData->targetMatrixFirstColPresent = false;
6226  osglData->baseMatrixStartRowPresent = false;
6227  osglData->baseMatrixStartColPresent = false;
6228  osglData->baseMatrixEndRowPresent = false;
6229  osglData->baseMatrixEndColPresent = false;
6230  osglData->baseTransposePresent = false;
6231  osglData->scalarMultiplierPresent = false;
6232  osglData->baseMatrixEndRow = -1;
6233  osglData->baseMatrixEndCol = -1;
6234 }
6235  break;
6236 
6237  case 450:
6238 
6239  {
6240  if (osglData->baseMatrixIdxPresent == false)
6241  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute baseMatrixIdx is missing");
6242  else
6243  {
6244  ((BaseMatrix*)osglData->tempC)->baseMatrixIdx = osglData->baseMatrixIdx;
6245  ((BaseMatrix*)osglData->tempC)->baseMatrix = (OSMatrix*)osglData->matrix[osglData->baseMatrixIdx];
6246  }
6247  if (osglData->targetMatrixFirstRowPresent == true)
6248  ((BaseMatrix*)osglData->tempC)->targetMatrixFirstRow = osglData->targetMatrixFirstRow;
6249  if (osglData->targetMatrixFirstColPresent == true)
6250  ((BaseMatrix*)osglData->tempC)->targetMatrixFirstCol = osglData->targetMatrixFirstCol;
6251  if (osglData->baseMatrixStartRowPresent == true)
6252  ((BaseMatrix*)osglData->tempC)->baseMatrixStartRow = osglData->baseMatrixStartRow;
6253  if (osglData->baseMatrixStartColPresent == true)
6254  ((BaseMatrix*)osglData->tempC)->baseMatrixStartCol = osglData->baseMatrixStartCol;
6255  if (osglData->baseMatrixEndRowPresent == true)
6256  ((BaseMatrix*)osglData->tempC)->baseMatrixEndRow = osglData->baseMatrixEndRow;
6257  if (osglData->baseMatrixEndColPresent == true)
6258  ((BaseMatrix*)osglData->tempC)->baseMatrixEndCol = osglData->baseMatrixEndCol;
6259  if (osglData->baseTransposePresent == true)
6260  ((BaseMatrix*)osglData->tempC)->baseTranspose = osglData->baseTranspose;
6261  if (osglData->scalarMultiplierPresent == true)
6262  ((BaseMatrix*)osglData->tempC)->scalarMultiplier = osglData->scalarMultiplier;
6263 }
6264  break;
6265 
6266  case 465:
6267 
6268  {
6269  osglData->mtxBlkVec.back()->inumberOfChildren++;
6270 }
6271  break;
6272 
6273  case 475:
6274 
6275  {
6276  osglData->tempC = new ConstantMatrixElements();
6277  osglData->mtxConstructorVec.push_back(osglData->tempC);
6278  osglData->numberOfValuesPresent = false;
6279  osglData->rowMajorPresent = false;
6280  osglData->rowMajor = false;
6281 }
6282  break;
6283 
6284  case 476:
6285 
6286  {
6287  if (osglData->numberOfValuesPresent == false)
6288  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<constantElements>: numberOfValues attribute missing");
6289 }
6290  break;
6291 
6292  case 479:
6293 
6294  {
6295  ((ConstantMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6296  if (osglData->numberOfValues > 0)
6297  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_constant;
6298  }
6299  break;
6300 
6301  case 480:
6302 
6303  {
6304  ((ConstantMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6305  }
6306  break;
6307 
6308  case 484:
6309 
6310  {
6311  ((MatrixElements*)osglData->tempC)->start = new IntVector();
6312  ((MatrixElements*)osglData->tempC)->start->numberOfEl = osglData->numberOfEl;
6313  ((MatrixElements*)osglData->tempC)->start->el = osglData->osglIntArray;
6314  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6315  parserData->suppressFurtherErrorMessages = false;
6316  parserData->ignoreDataAfterErrors = false;
6317 }
6318  break;
6319 
6320  case 485:
6321 
6322  {
6323  if (osglData->rowMajor == false)
6324  osglData->numberOfEl = ((MatrixType*)osglData->mtxBlkVec.back())->numberOfColumns + 1;
6325  else
6326  osglData->numberOfEl = ((MatrixType*)osglData->mtxBlkVec.back())->numberOfRows + 1;
6327  osglData->osglIntArray = new int[osglData->numberOfEl];
6328  osglData->osglCounter = 0;
6329 }
6330  break;
6331 
6332  case 491:
6333 
6334  {
6335  ((MatrixElements*)osglData->tempC)->index = new IntVector();
6336  ((MatrixElements*)osglData->tempC)->index->numberOfEl
6337  = ((MatrixElements*)osglData->tempC)->numberOfValues;
6338  ((MatrixElements*)osglData->tempC)->index->el = osglData->osglIntArray;
6339  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6340  parserData->suppressFurtherErrorMessages = false;
6341  parserData->ignoreDataAfterErrors = false;
6342 }
6343  break;
6344 
6345  case 492:
6346 
6347  {
6348  osglData->numberOfEl = ((MatrixElements*)osglData->tempC)->numberOfValues;
6349  osglData->osglIntArray = new int[osglData->numberOfEl];
6350  osglData->osglCounter = 0;
6351 }
6352  break;
6353 
6354  case 498:
6355 
6356  {
6357  ((ConstantMatrixElements*)osglData->tempC)->value = new ConstantMatrixValues();
6358  ((ConstantMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6359  ((ConstantMatrixElements*)osglData->tempC)->value->el = osglData->osglDblArray;
6360  osglData->osglDblArray = NULL; // to facilitate garbage collection without a segfault
6361  parserData->suppressFurtherErrorMessages = false;
6362  parserData->ignoreDataAfterErrors = false;
6363 }
6364  break;
6365 
6366  case 499:
6367 
6368  {
6369  osglData->numberOfEl = ((ConstantMatrixElements*)osglData->tempC)->numberOfValues;
6370  osglData->osglDblArray = new double[osglData->numberOfEl];
6371  osglData->osglCounter = 0;
6372 }
6373  break;
6374 
6375  case 506:
6376 
6377  {
6378  osglData->tempC = new VarReferenceMatrixElements();
6379  osglData->mtxConstructorVec.push_back(osglData->tempC);
6380  osglData->numberOfValuesPresent = false;
6381  osglData->rowMajorPresent = false;
6382  osglData->rowMajor = false;
6383 }
6384  break;
6385 
6386  case 507:
6387 
6388  {
6389  if (osglData->numberOfValuesPresent == false)
6390  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<varReferenceElements>: numberOfValues attribute missing");
6391 }
6392  break;
6393 
6394  case 510:
6395 
6396  {
6397  ((VarReferenceMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6398  if (osglData->numberOfValues > 0)
6399  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_varReference;
6400  }
6401  break;
6402 
6403  case 511:
6404 
6405  {
6406  ((VarReferenceMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6407  }
6408  break;
6409 
6410  case 515:
6411 
6412  {
6413  ((VarReferenceMatrixElements*)osglData->tempC)->value = new VarReferenceMatrixValues();
6414  ((VarReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6415  ((VarReferenceMatrixElements*)osglData->tempC)->value->el = osglData->osglIntArray;
6416  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6417  parserData->suppressFurtherErrorMessages = false;
6418  parserData->ignoreDataAfterErrors = false;
6419 }
6420  break;
6421 
6422  case 516:
6423 
6424  {
6425  osglData->numberOfEl = ((VarReferenceMatrixElements*)osglData->tempC)->numberOfValues;
6426  osglData->osglIntArray = new int[osglData->numberOfEl];
6427  osglData->osglCounter = 0;
6428 }
6429  break;
6430 
6431  case 523:
6432 
6433  {
6434  osglData->tempC = new LinearMatrixElements();
6435  osglData->mtxConstructorVec.push_back(osglData->tempC);
6436  osglData->numberOfValuesPresent = false;
6437  osglData->rowMajorPresent = false;
6438  osglData->rowMajor = false;
6439 }
6440  break;
6441 
6442  case 524:
6443 
6444  {
6445  if (osglData->numberOfValuesPresent == false)
6446  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<linearElements>: numberOfValues attribute missing");
6447 }
6448  break;
6449 
6450  case 527:
6451 
6452  {
6453  ((LinearMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6454  if (osglData->numberOfValues > 0)
6455  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_linear;
6456  }
6457  break;
6458 
6459  case 528:
6460 
6461  {
6462  ((LinearMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6463  }
6464  break;
6465 
6466  case 532:
6467 
6468  {
6469  if (osglData->numberOfValues > 0)
6470  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "expected <value> element");
6471  }
6472  break;
6473 
6474  case 533:
6475 
6476  {
6477  if (osglData->numberOfValues > osglData->nonzeroCounter)
6478  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few <el> elements");
6479  else if (osglData->numberOfValues < osglData->nonzeroCounter)
6480  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many <el> elements");
6481  ((LinearMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6482  parserData->suppressFurtherErrorMessages = false;
6483  parserData->ignoreDataAfterErrors = false;
6484  }
6485  break;
6486 
6487  case 534:
6488 
6489  {
6490  osglData->numberOfValues = ((LinearMatrixElements*)osglData->tempC)->numberOfValues;
6491  osglData->nonzeroCounter = 0;
6492  ((LinearMatrixElements*)osglData->tempC)->value = new LinearMatrixValues();
6493  ((LinearMatrixElements*)osglData->tempC)->value->numberOfEl
6494  = ((LinearMatrixElements*)osglData->tempC)->numberOfValues;
6495  ((LinearMatrixElements*)osglData->tempC)->value->el
6496  = new LinearMatrixElement*[((LinearMatrixElements*)osglData->tempC)->numberOfValues];
6497  for (int i=0; i < ((LinearMatrixElements*)osglData->tempC)->numberOfValues; i++)
6498  ((LinearMatrixElements*)osglData->tempC)->value->el[i] = new LinearMatrixElement();
6499  osglData->osglCounter = 0;
6500  osglData->numberOfVarIdxPresent = false;
6501 }
6502  break;
6503 
6504  case 542:
6505 
6506  {
6507  osglData->nonzeroCounter++;
6508  if (osglData->nonzeroCounter > osglData->numberOfValues)
6509  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: too many nonzeros");
6510 }
6511  break;
6512 
6513  case 543:
6514 
6515  {
6516  osglData->numberOfVarIdxPresent = false;
6517  osglData->constantPresent = false;
6518  osglData->constant = 0.0;
6519 }
6520  break;
6521 
6522  case 544:
6523 
6524  {
6525  if (!osglData->numberOfVarIdxPresent)
6526  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfVarIdx attribute missing");
6527  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->numberOfVarIdx
6528  = osglData->numberOfVarIdx;
6529  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx
6530  = new LinearMatrixElementTerm*[osglData->numberOfVarIdx];
6531  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->constant
6532  = osglData->constant;
6533  osglData->osglCounter = 0;
6534 }
6535  break;
6536 
6537  case 556:
6538 
6539  {
6540  osglData->coefPresent = false;
6541  osglData->coef = 1.0;
6542  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx[osglData->osglCounter]
6543  = new LinearMatrixElementTerm();
6544 }
6545  break;
6546 
6547  case 558:
6548 
6549  {
6550  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx[osglData->osglCounter]->coef = osglData->coef;
6551 }
6552  break;
6553 
6554  case 559:
6555 
6556  {
6557  ((LinearMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->varIdx[osglData->osglCounter]->idx = (yyvsp[(2) - (3)].ival);
6558  osglData->osglCounter++;
6559 }
6560  break;
6561 
6562  case 561:
6563 
6564  {
6565  osglData->tempC = new GeneralMatrixElements();
6566  osglData->mtxConstructorVec.push_back(osglData->tempC);
6567  osglData->numberOfValuesPresent = false;
6568  osglData->rowMajorPresent = false;
6569  osglData->rowMajor = false;
6570 }
6571  break;
6572 
6573  case 562:
6574 
6575  {
6576  if (osglData->numberOfValuesPresent == false)
6577  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<generalElements>: numberOfValues attribute missing");
6578 }
6579  break;
6580 
6581  case 565:
6582 
6583  {
6584  ((GeneralMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6585  if (osglData->numberOfValues > 0)
6586  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_general;
6587  }
6588  break;
6589 
6590  case 566:
6591 
6592  {
6593  ((GeneralMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6594  }
6595  break;
6596 
6597  case 572:
6598 
6599  {
6600  osglData->nonzeroCounter = 0;
6601  osglData->numberOfValues = ((GeneralMatrixElements*)osglData->tempC)->numberOfValues;
6602 
6603  ((GeneralMatrixElements*)osglData->tempC)->value = new GeneralMatrixValues();
6604  ((GeneralMatrixElements*)osglData->tempC)->value->numberOfEl
6605  = osglData->numberOfValues;
6606  ((GeneralMatrixElements*)osglData->tempC)->value->el
6607  = new ScalarExpressionTree*[osglData->numberOfValues];
6608 
6609  for (int i=0; i<osglData->numberOfValues; i++)
6610  ((GeneralMatrixElements*)osglData->tempC)->value->el[i] = new ScalarExpressionTree();
6611 }
6612  break;
6613 
6614  case 580:
6615 
6616  {
6617  if (osglData->nonzeroCounter >= osglData->numberOfValues)
6618  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> terms greater than expected");
6619  // clear the vectors of pointers
6620  osnlData->nlNodeVec.clear();
6621  osnlData->sumVec.clear();
6622  osnlData->allDiffVec.clear();
6623  osnlData->maxVec.clear();
6624  osnlData->minVec.clear();
6625  osnlData->productVec.clear();
6626  osnlData->matrixSumVec.clear();
6627  osnlData->matrixProductVec.clear();
6628  }
6629  break;
6630 
6631  case 584:
6632 
6633  {
6634  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
6635 
6636  ((GeneralMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter]->m_treeRoot =
6637  ((OSnLNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
6638  osglData->nonzeroCounter++;
6639  }
6640  break;
6641 
6642  case 586:
6643 
6644  {
6645  osglData->tempC = new ObjReferenceMatrixElements();
6646  osglData->mtxConstructorVec.push_back(osglData->tempC);
6647  osglData->numberOfValuesPresent = false;
6648  osglData->rowMajorPresent = false;
6649  osglData->rowMajor = false;
6650 }
6651  break;
6652 
6653  case 587:
6654 
6655  {
6656  if (osglData->numberOfValuesPresent == false)
6657  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<objReferenceElements>: numberOfValues attribute missing");
6658 }
6659  break;
6660 
6661  case 590:
6662 
6663  {
6664  ((ObjReferenceMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6665  if (osglData->numberOfValues > 0)
6666  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_objReference;
6667  }
6668  break;
6669 
6670  case 591:
6671 
6672  {
6673  ((ObjReferenceMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6674  }
6675  break;
6676 
6677  case 595:
6678 
6679  {
6680  ((ObjReferenceMatrixElements*)osglData->tempC)->value = new ObjReferenceMatrixValues();
6681  ((ObjReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6682  ((ObjReferenceMatrixElements*)osglData->tempC)->value->el = osglData->osglIntArray;
6683  osglData->osglIntArray = NULL; // to facilitate garbage collection without a segfault
6684  parserData->suppressFurtherErrorMessages = false;
6685  parserData->ignoreDataAfterErrors = false;
6686 }
6687  break;
6688 
6689  case 596:
6690 
6691  {
6692  osglData->numberOfEl = ((ObjReferenceMatrixElements*)osglData->tempC)->numberOfValues;
6693  osglData->osglIntArray = new int[osglData->numberOfEl];
6694  osglData->osglCounter = 0;
6695 }
6696  break;
6697 
6698  case 603:
6699 
6700  {
6701  osglData->tempC = new ConReferenceMatrixElements();
6702  osglData->mtxConstructorVec.push_back(osglData->tempC);
6703  osglData->numberOfValuesPresent = false;
6704  osglData->rowMajorPresent = false;
6705  osglData->rowMajor = false;
6706 }
6707  break;
6708 
6709  case 604:
6710 
6711  {
6712  if (osglData->numberOfValuesPresent == false)
6713  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "<conReferenceElements>: numberOfValues attribute missing");
6714 }
6715  break;
6716 
6717  case 607:
6718 
6719  {
6720  ((ConReferenceMatrixElements*)osglData->tempC)->numberOfValues = osglData->numberOfValues;
6721  if (osglData->numberOfValues > 0)
6722  ((MatrixType*)osglData->mtxBlkVec.back())->matrixType = ENUM_MATRIX_TYPE_conReference;
6723  }
6724  break;
6725 
6726  case 608:
6727 
6728  {
6729  ((ConReferenceMatrixElements*)osglData->tempC)->rowMajor = osglData->rowMajor;
6730  }
6731  break;
6732 
6733  case 612:
6734 
6735  {
6736  if (osglData->numberOfValues > 0)
6737  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "expected <value> element");
6738  }
6739  break;
6740 
6741  case 613:
6742 
6743  {
6744  if (osglData->numberOfValues > osglData->nonzeroCounter)
6745  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too few <el> elements");
6746  else if (osglData->numberOfValues < osglData->nonzeroCounter)
6747  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many <el> elements");
6748  ((ConReferenceMatrixElements*)osglData->tempC)->value->numberOfEl = osglData->numberOfEl;
6749  parserData->suppressFurtherErrorMessages = false;
6750  parserData->ignoreDataAfterErrors = false;
6751  }
6752  break;
6753 
6754  case 614:
6755 
6756  {
6757  osglData->numberOfValues = ((ConReferenceMatrixElements*)osglData->tempC)->numberOfValues;
6758  osglData->nonzeroCounter = 0;
6759 
6760  ((ConReferenceMatrixElements*)osglData->tempC)->value = new ConReferenceMatrixValues();
6761  ((ConReferenceMatrixElements*)osglData->tempC)->value->numberOfEl
6762  = osglData->numberOfValues;
6763  ((ConReferenceMatrixElements*)osglData->tempC)->value->el
6764  = new ConReferenceMatrixElement*[osglData->numberOfValues];
6765 
6766  for (int i=0; i<osglData->numberOfValues; i++)
6767  ((ConReferenceMatrixElements*)osglData->tempC)->value->el[i] = new ConReferenceMatrixElement();
6768 }
6769  break;
6770 
6771  case 621:
6772 
6773  {
6774 // osglData->nonzeroCounter++;
6775 // if (osglData->nonzeroCounter > osglData->osglNumberOfNonzeros)
6776 // parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "conReference matrix elements: too many nonzeros");
6777 }
6778  break;
6779 
6780  case 622:
6781 
6782  {
6783  if (osglData->nonzeroCounter >= osglData->numberOfValues)
6784  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> terms greater than expected");
6785  osglData->valueTypePresent = false;
6786  osglData->multPresent = false;
6787  osglData->incrPresent = false;
6788  osglData->mult = 1;
6789  osglData->incr = 0;
6790  osglData->valueType = ""; //ENUM_CONREFERENCE_VALUETYPE_value;
6791  }
6792  break;
6793 
6794  case 628:
6795 
6796  {
6797  if (osglData->nonzeroCounter + osglData->mult > osglData->numberOfEl)
6798  {
6799  if (!parserData->suppressFurtherErrorMessages)
6800  {
6801  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more data elements than specified");
6802  parserData->suppressFurtherErrorMessages = true;
6803  parserData->ignoreDataAfterErrors = true;
6804  }
6805  }
6806  else
6807  {
6808  if (osglData->valueType == "")
6809  osglData->valueType = "value";
6810  if (returnConReferenceValueType(osglData->valueType) <= 0)
6811  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6812  "valueType must be one of \"value\", \"status\", \"surplus\", \"shortage\"");
6813  else
6814  {
6815  for (int i=0; i<osglData->mult; i++)
6816  {
6817  ((ConReferenceMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter + i]->conReference
6818  = (yyvsp[(2) - (3)].ival) + i*osglData->incr;
6819  ((ConReferenceMatrixElements*)osglData->tempC)->value->el[osglData->nonzeroCounter + i]->valueType
6821  }
6822  }
6823  osglData->nonzeroCounter += osglData->mult;
6824  }
6825 }
6826  break;
6827 
6828  case 630:
6829 
6830  {
6831  osglData->tempC = new MatrixTransformation();
6832  osglData->mtxConstructorVec.push_back((MatrixTransformation*)osglData->tempC);
6833 
6834  // clear the vectors of pointers
6835  osnlData->nlNodeVec.clear();
6836  osnlData->sumVec.clear();
6837  osnlData->allDiffVec.clear();
6838  osnlData->maxVec.clear();
6839  osnlData->minVec.clear();
6840  osnlData->productVec.clear();
6841  osnlData->matrixSumVec.clear();
6842  osnlData->matrixProductVec.clear();
6843 
6844  osglData->shapePresent = false;
6845 }
6846  break;
6847 
6848  case 632:
6849 
6850  {
6851  if (returnNlExprShape(osglData->shape) > 0)
6852  ((MatrixTransformation*)osglData->tempC)->shape
6854  else
6855  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6856  "unknown shape specified in matrix transformation");
6857 }
6858  break;
6859 
6860  case 633:
6861 
6862  {
6863  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
6864  ((MatrixTransformation*)osglData->tempC)->transformation =
6865  ((OSnLMNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
6866 }
6867  break;
6868 
6869  case 634:
6870 
6871  {
6872  // clean up temporary arrays without deleting the information
6873  osglData->rowOffsets.back() = NULL;
6874  osglData->colOffsets.back() = NULL;
6875  osglData->osglIntArray = NULL;
6876  osglData->rowOffsets.pop_back();
6877  osglData->colOffsets.pop_back();
6878 }
6879  break;
6880 
6881  case 635:
6882 
6883  {
6884  osglData->tempC = new MatrixBlocks();
6885  osglData->mtxConstructorVec.push_back((MatrixBlocks*)osglData->tempC);
6886  osglData->mtxBlocksVec.push_back((MatrixBlocks*)osglData->tempC);
6887  osglData->numberOfBlocksPresent = false;
6888 }
6889  break;
6890 
6891  case 636:
6892 
6893  {
6894  osglData->nBlocksVec.push_back(osglData->numberOfBlocks);
6895  ((MatrixBlocks*)osglData->tempC)->inumberOfChildren = 0;
6896 }
6897  break;
6898 
6899  case 638:
6900 
6901  {
6902  if ( ((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren !=
6903  osglData->nBlocksVec.back())
6904  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
6905  "Number of blocks does not agree with attribute value numberOfBlocks");
6906 
6907  ((MatrixBlocks*)osglData->mtxBlocksVec.back())->m_mChildren
6908  = new MatrixNode*[((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren];
6909  osglData->mtxBlocksVec.pop_back();
6910  osglData->nBlocksVec.pop_back();
6911 }
6912  break;
6913 
6914  case 639:
6915 
6916  {
6917  if (osglData->osglCounter != osglData->numberOfEl)
6918  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of colOffsets does not match numberOfEl");
6919  ((MatrixBlocks*)osglData->tempC)->colOffset = new IntVector();
6920  ((MatrixBlocks*)osglData->tempC)->colOffset->numberOfEl = osglData->numberOfEl;
6921  ((MatrixBlocks*)osglData->tempC)->colOffset->el = osglData->osglIntArray;
6922  osglData->colOffsets.push_back(osglData->osglIntArray);
6923  parserData->suppressFurtherErrorMessages = false;
6924  parserData->ignoreDataAfterErrors = false;
6925 }
6926  break;
6927 
6928  case 640:
6929 
6930  {
6931  osglData->numberOfEl = 0;
6932  osglData->numberOfElPresent = false;
6933 }
6934  break;
6935 
6936  case 641:
6937 
6938  {
6939  osglData->osglCounter = 0;
6940  osglData->osglIntArray = new int[osglData->numberOfEl];
6941 }
6942  break;
6943 
6944  case 647:
6945 
6946  {
6947  ((MatrixBlocks*)osglData->tempC)->rowOffset = new IntVector();
6948  ((MatrixBlocks*)osglData->tempC)->rowOffset->numberOfEl = osglData->numberOfEl;
6949  ((MatrixBlocks*)osglData->tempC)->rowOffset->el = osglData->osglIntArray;
6950  osglData->rowOffsets.push_back(osglData->osglIntArray);
6951  parserData->suppressFurtherErrorMessages = false;
6952  parserData->ignoreDataAfterErrors = false;
6953 }
6954  break;
6955 
6956  case 648:
6957 
6958  {
6959  osglData->numberOfEl = 0;
6960  osglData->numberOfElPresent = false;
6961 }
6962  break;
6963 
6964  case 649:
6965 
6966  {
6967  osglData->osglCounter = 0;
6968  osglData->osglIntArray = new int[osglData->numberOfEl];
6969 }
6970  break;
6971 
6972  case 656:
6973 
6974  {
6975  ((MatrixBlocks*)osglData->mtxBlocksVec.back())->inumberOfChildren++;
6976 }
6977  break;
6978 
6979  case 657:
6980 
6981  {
6982  osglData->mtxBlkVec.pop_back();
6983 }
6984  break;
6985 
6986  case 658:
6987 
6988  {
6989  osglData->tempC = new MatrixBlock();
6990  osglData->mtxConstructorVec.push_back((MatrixBlock*)osglData->tempC);
6991  osglData->mtxBlkVec.push_back(osglData->tempC);
6992 
6993  osglData->symmetryPresent = false;
6994  osglData->typePresent = false;
6995  osglData->blockRowIdxPresent = false;
6996  osglData->blockColIdxPresent = false;
6997 }
6998  break;
6999 
7000  case 664:
7001 
7002  {
7003  if (verifyMatrixSymmetry(osglData->symmetry) == false)
7004  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "symmetry type not recognized");
7005  parserData->errorText = NULL;
7006  ((MatrixBlock*)osglData->tempC)->symmetry
7008  }
7009  break;
7010 
7011  case 665:
7012 
7013  {
7014  ((MatrixBlock*)osglData->tempC)->type
7015  = (ENUM_MATRIX_TYPE)returnMatrixType(osglData->type);
7016  }
7017  break;
7018 
7019  case 669:
7020 
7021  {
7022  osglData->mtxBlkVec.back()->m_mChildren =
7023  new MatrixNode*[osglData->mtxBlkVec.back()->inumberOfChildren];
7024 }
7025  break;
7026 
7027  case 671:
7028 
7029  {
7030  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7031  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7032  if (osglData->numberOfBlocksPresent)
7033  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfBlocks attribute previously set");
7034  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <blocks> cannot be negative");
7035  osglData->numberOfBlocksPresent = true;
7036  osglData->numberOfBlocks = (yyvsp[(3) - (4)].ival);
7037 }
7038  break;
7039 
7040  case 672:
7041 
7042  {
7043  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7044  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7045  if (osglData->numberOfColumnsPresent)
7046  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfColumns attribute previously set");
7047  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <blocks> cannot be negative");
7048  osglData->numberOfColumnsPresent = true;
7049  osglData->numberOfColumns = (yyvsp[(3) - (4)].ival);
7050 }
7051  break;
7052 
7053  case 673:
7054 
7055  {
7056  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7057  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7058  if (osglData->numberOfElPresent)
7059  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfEl attribute previously set");
7060  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <el> cannot be negative");
7061  osglData->numberOfElPresent = true;
7062  osglData->numberOfEl = (yyvsp[(3) - (4)].ival);
7063 }
7064  break;
7065 
7066  case 674:
7067 
7068  {
7069  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7070  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7071  if (osglData->numberOfRowsPresent)
7072  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfRows attribute previously set");
7073  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <rows> cannot be negative");
7074  osglData->numberOfRowsPresent = true;
7075  osglData->numberOfRows = (yyvsp[(3) - (4)].ival);
7076 }
7077  break;
7078 
7079  case 675:
7080 
7081  {
7082  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7083  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7084  if (osglData->numberOfValuesPresent)
7085  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfValues attribute previously set");
7086  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <values> cannot be negative");
7087  osglData->numberOfValuesPresent = true;
7088  osglData->numberOfValues = (yyvsp[(3) - (4)].ival);
7089 }
7090  break;
7091 
7092  case 676:
7093 
7094  {
7095  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7096  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7097  if (osglData->numberOfVarIdxPresent)
7098  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "numberOfVarIdx attribute previously set");
7099  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of <varIdx> cannot be negative");
7100  osglData->numberOfVarIdxPresent = true;
7101  osglData->numberOfVarIdx = (yyvsp[(3) - (4)].ival);
7102 }
7103  break;
7104 
7105  case 677:
7106 
7107  {
7108  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7109  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7110  if (osglData->base64SizePresent)
7111  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base64Size attribute previously set");
7112  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "base64Size cannot be negative");
7113  osglData->base64SizePresent = true;
7114  osglData->base64Size = (yyvsp[(3) - (4)].ival);
7115 }
7116  break;
7117 
7118  case 678:
7119 
7120  {
7121  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7122  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7123  if (osglData->baseMatrixIdxPresent == true)
7124  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixIdx attribute in <baseMatrix> element");
7125  if ((yyvsp[(3) - (4)].ival) < 0)
7126  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix idx cannot be negative");
7127  if ((yyvsp[(3) - (4)].ival) > osglData->matrixCounter)
7128  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix idx exceeds number of matrices so far");
7129  osglData->baseMatrixIdxPresent = true;
7130  osglData->baseMatrixIdx = (yyvsp[(3) - (4)].ival);
7131 }
7132  break;
7133 
7134  case 679:
7135 
7136  {
7137  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7138  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7139  "start and end quotes are not the same");
7140  if (osglData->baseMatrixStartRowPresent == true)
7141  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7142  "more than one baseMatrixStartRow attribute in <baseMatrix> element");
7143  if ((yyvsp[(3) - (4)].ival) < 0)
7144  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7145  "baseMatrix first row cannot be negative");
7146  osglData->baseMatrixStartRowPresent = true;
7147  osglData->baseMatrixStartRow = (yyvsp[(3) - (4)].ival);
7148 }
7149  break;
7150 
7151  case 680:
7152 
7153  {
7154  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7155  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7156  "start and end quotes are not the same");
7157  if (osglData->baseMatrixStartColPresent == true)
7158  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7159  "more than one baseMatrixStartCol attribute in <baseMatrix> element");
7160  if ((yyvsp[(3) - (4)].ival) < 0)
7161  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7162  "baseMatrix first column cannot be negative");
7163  osglData->baseMatrixStartColPresent = true;
7164  osglData->baseMatrixStartCol = (yyvsp[(3) - (4)].ival);
7165 }
7166  break;
7167 
7168  case 681:
7169 
7170  {
7171  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7172  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7173  if (osglData->baseMatrixEndRowPresent == true)
7174  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixEndRow attribute in <baseMatrix> element");
7175  if ((yyvsp[(3) - (4)].ival) < 0)
7176  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix end row cannot be negative");
7177  osglData->baseMatrixEndRowPresent = true;
7178  osglData->baseMatrixEndRow = (yyvsp[(3) - (4)].ival);
7179 }
7180  break;
7181 
7182  case 682:
7183 
7184  {
7185  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7186  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7187  if (osglData->baseMatrixEndColPresent == true)
7188  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one baseMatrixEndCol attribute in <baseMatrix> element");
7189  if ((yyvsp[(3) - (4)].ival) < 0)
7190  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "baseMatrix end col cannot be negative");
7191  osglData->baseMatrixEndColPresent = true;
7192  osglData->baseMatrixEndCol = (yyvsp[(3) - (4)].ival);
7193 }
7194  break;
7195 
7196  case 683:
7197 
7198  {
7199  if (osglData->blockRowIdxPresent)
7200  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockRowIdx attribute previously set");
7201  else
7202  {
7203  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockRowIdx cannot be negative");
7204  osglData->blockRowIdxPresent = true;
7205  osglData->blockRowIdx = (yyvsp[(3) - (4)].ival);
7206  ((MatrixBlock*)osglData->tempC)->blockRowIdx = (yyvsp[(3) - (4)].ival);
7207  }
7208 
7209  // compute the size of the block
7210  ((MatrixBlock*)osglData->tempC)->numberOfRows
7211  = osglData->rowOffsets.back()[osglData->blockRowIdx+1]
7212  - osglData->rowOffsets.back()[osglData->blockRowIdx];
7213 }
7214  break;
7215 
7216  case 684:
7217 
7218  {
7219  if (osglData->blockColIdxPresent)
7220  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockColIdx attribute previously set");
7221  else
7222  {
7223  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "blockColIdx cannot be negative");
7224  osglData->blockColIdxPresent = true;
7225  osglData->blockColIdx = (yyvsp[(3) - (4)].ival);
7226  ((MatrixBlock*)osglData->tempC)->blockColIdx = (yyvsp[(3) - (4)].ival);
7227  }
7228 
7229  // compute the size of the block
7230  ((MatrixBlock*)osglData->tempC)->numberOfColumns
7231  = osglData->colOffsets.back()[osglData->blockColIdx+1]
7232  - osglData->colOffsets.back()[osglData->blockColIdx];
7233 }
7234  break;
7235 
7236  case 685:
7237 
7238  {
7239  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7240  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7241  if (osglData->coefPresent == true)
7242  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: duplicate coef");
7243  else
7244  {
7245  osglData->coef = parserData->tempVal;
7246  osglData->coefPresent = true;
7247  }
7248 }
7249  break;
7250 
7251  case 686:
7252 
7253  {
7254  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7255  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7256  if (osglData->constantPresent == true)
7257  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "linear matrix elements: duplicate constant");
7258  else
7259  {
7260  osglData->constant = parserData->tempVal;
7261  osglData->constantPresent = true;
7262  }
7263 }
7264  break;
7265 
7266  case 687:
7267 
7268  {
7269  if (osglData->idxPresent == true)
7270  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one idx attribute");
7271  osglData->idxPresent = true;
7272  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7273  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7274  osglData->idx = (yyvsp[(3) - (4)].ival);
7275  }
7276  break;
7277 
7278  case 688:
7279 
7280  {
7281  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7282  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7283  if (osglData->incrPresent)
7284  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one incr attribute allowed");
7285  osglData->incrPresent = true;
7286  osglData->incr = (yyvsp[(3) - (4)].ival);
7287 }
7288  break;
7289 
7290  case 689:
7291 
7292  {
7293  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7294  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7295  if (osglData->multPresent)
7296  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "only one mult attribute allowed");
7297  if ((yyvsp[(3) - (4)].ival) <= 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mult must be positive");
7298  osglData->multPresent = true;
7299  osglData->mult = (yyvsp[(3) - (4)].ival);
7300 }
7301  break;
7302 
7303  case 690:
7304 
7305  {
7306  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7307  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7308  if (osglData->scalarMultiplierPresent == true)
7309  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one scalar multiplier attribute in <baseMatrix> element");
7310  osglData->scalarMultiplierPresent = true;
7311  osglData->scalarMultiplier = parserData->tempVal;
7312 }
7313  break;
7314 
7315  case 691:
7316 
7317  {
7318  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7319  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7320  if (osglData->targetMatrixFirstRowPresent == true)
7321  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one targetMatrixFirstRow attribute in <baseMatrix> element");
7322  if ((yyvsp[(3) - (4)].ival) < 0)
7323  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "targetMatrix first row cannot be negative");
7324  osglData->targetMatrixFirstRowPresent = true;
7325  osglData->targetMatrixFirstRow = (yyvsp[(3) - (4)].ival);
7326 }
7327  break;
7328 
7329  case 692:
7330 
7331  {
7332  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
7333  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7334  if (osglData->targetMatrixFirstColPresent == true)
7335  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one targetMatrixFirstCol attribute in <baseMatrix> element");
7336  if ((yyvsp[(3) - (4)].ival) < 0)
7337  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "targetMatrix first col cannot be negative");
7338  osglData->targetMatrixFirstColPresent = true;
7339  osglData->targetMatrixFirstCol = (yyvsp[(3) - (4)].ival);
7340 }
7341  break;
7342 
7343  case 695:
7344 
7345  {
7346  if (osglData->baseTransposePresent == true)
7347  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7348  "more than one baseTranspose attribute in <baseMatrix> element");
7349  else
7350  osglData->baseTranspose = true;
7351  osglData->baseTransposePresent = true;
7352 }
7353  break;
7354 
7355  case 696:
7356 
7357  {
7358  if (osglData->baseTransposePresent == true)
7359  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7360  "more than one baseTranspose attribute in <baseMatrix> element");
7361  else
7362  {
7363  if (strcmp((yyvsp[(2) - (3)].sval),"false") == 0) osglData->baseTranspose = false;
7364  else if (strcmp((yyvsp[(2) - (3)].sval),"true" ) == 0) osglData->baseTranspose = true;
7365  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7366  "baseTranspose attribute in <baseMatrix> element must be \"true\" or \"false\"");
7367  }
7368  osglData->baseTransposePresent = true;
7369  free((yyvsp[(2) - (3)].sval));
7370 }
7371  break;
7372 
7373  case 699:
7374 
7375  {
7376  if (osglData->namePresent == true)
7377  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one name attribute");
7378  osglData->namePresent = true;
7379 }
7380  break;
7381 
7382  case 700:
7383 
7384  {
7385  if (osglData->namePresent == true)
7386  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one name attribute");
7387  osglData->namePresent = true;
7388  osglData->name = (yyvsp[(2) - (3)].sval);
7389  free((yyvsp[(2) - (3)].sval));
7390 }
7391  break;
7392 
7393  case 703:
7394 
7395  {
7396  if (osglData->rowMajorPresent)
7397  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute encountered more than once");
7398  else
7399  osglData->rowMajor = true;
7400  osglData->rowMajorPresent = true;
7401 }
7402  break;
7403 
7404  case 704:
7405 
7406  {
7407  if (osglData->rowMajorPresent)
7408  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute encountered more than once");
7409  else
7410  {
7411  if (strcmp((yyvsp[(2) - (3)].sval),"false") == 0) osglData->rowMajor = false;
7412  else if (strcmp((yyvsp[(2) - (3)].sval),"true" ) == 0) osglData->rowMajor = true;
7413  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "rowMajor attribute must be \"true\" or \"false\"");
7414  }
7415  osglData->rowMajorPresent = true;
7416  free((yyvsp[(2) - (3)].sval));
7417 }
7418  break;
7419 
7420  case 707:
7421 
7422  {
7423  if (osglData->shapePresent == true)
7424  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one shape attribute");
7425  osglData->shapePresent = true;
7426 }
7427  break;
7428 
7429  case 708:
7430 
7431  {
7432  if (osglData->shapePresent == true)
7433  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one shape attribute");
7434  osglData->shapePresent = true;
7435  osglData->shape = (yyvsp[(2) - (3)].sval);
7436  free((yyvsp[(2) - (3)].sval));
7437 }
7438  break;
7439 
7440  case 711:
7441 
7442  {
7443  if (osglData->symmetryPresent == true)
7444  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one symmetry attribute in <matrix> element");
7445  osglData->symmetryPresent = true;
7446 }
7447  break;
7448 
7449  case 712:
7450 
7451  {
7452  if (osglData->symmetryPresent == true)
7453  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one symmetry attribute in <matrix> element");
7454  osglData->symmetryPresent = true;
7455  osglData->symmetry = (yyvsp[(2) - (3)].sval);
7456  free((yyvsp[(2) - (3)].sval));
7457 }
7458  break;
7459 
7460  case 715:
7461 
7462  {
7463  if (osglData->typePresent == true)
7464  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one type attribute");
7465  osglData->typePresent = true;
7466 }
7467  break;
7468 
7469  case 716:
7470 
7471  {
7472  if (osglData->typePresent == true)
7473  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one type attribute");
7474  osglData->typePresent = true;
7475  osglData->type = (yyvsp[(2) - (3)].sval);
7476  free((yyvsp[(2) - (3)].sval));
7477 }
7478  break;
7479 
7480  case 719:
7481 
7482  {
7483  if (osglData->valuePresent == true)
7484  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one value attribute");
7485  osglData->valuePresent = true;
7486  osglData->value = "";
7487 }
7488  break;
7489 
7490  case 720:
7491 
7492  {
7493  if (osglData->valuePresent == true)
7494  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one value attribute");
7495  osglData->valuePresent = true;
7496  osglData->value = (yyvsp[(2) - (3)].sval);
7497  free((yyvsp[(2) - (3)].sval));
7498 }
7499  break;
7500 
7501  case 723:
7502 
7503  {
7504  if (osglData->valueTypePresent == true)
7505  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one valueType attribute");
7506  osglData->valueTypePresent = true;
7507 }
7508  break;
7509 
7510  case 724:
7511 
7512  {
7513  if (osglData->valueTypePresent == true)
7514  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one valueType attribute");
7515  osglData->valueTypePresent = true;
7516  osglData->valueType = (yyvsp[(2) - (3)].sval);
7517  free((yyvsp[(2) - (3)].sval));
7518 }
7519  break;
7520 
7521  case 727:
7522 
7523  {
7524  if (osglData->varTypePresent == true)
7525  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one varType attribute");
7526  osglData->varTypePresent = true;
7527 }
7528  break;
7529 
7530  case 728:
7531 
7532  {
7533  if (osglData->varTypePresent == true)
7534  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "more than one varType attribute");
7535  osglData->varTypePresent = true;
7536  osglData->varType = (yyvsp[(2) - (3)].sval);
7537  free((yyvsp[(2) - (3)].sval));
7538 }
7539  break;
7540 
7541  case 730:
7542 
7543  {
7544  if (osnlData->tmpnlcount < osnlData->nlnodenumber)
7545  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of nl terms less than number attribute");
7546  }
7547  break;
7548 
7549  case 731:
7550 
7551  {
7552  osinstance->instanceData->nonlinearExpressions = new NonlinearExpressions();
7553  osnlData->tmpnlcount = 0;
7554  }
7555  break;
7556 
7557  case 732:
7558 
7559  {
7560  if ( *(yyvsp[(2) - (5)].sval) != *(yyvsp[(4) - (5)].sval) )
7561  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7562  if ((yyvsp[(3) - (5)].ival) < 0) parserData->parser_errors +=
7563  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "number of expressions cannot be negative");
7564  osnlData->nlnodenumber = (yyvsp[(3) - (5)].ival);
7565  osinstance->instanceData->nonlinearExpressions->numberOfNonlinearExpressions = (yyvsp[(3) - (5)].ival);
7566  if (osinstance->instanceData->nonlinearExpressions->numberOfNonlinearExpressions > 0 )
7567  osinstance->instanceData->nonlinearExpressions->nl = new Nl*[ (yyvsp[(3) - (5)].ival) ];
7568  for (int i = 0; i < osinstance->instanceData->nonlinearExpressions->numberOfNonlinearExpressions; i++)
7569  {
7570  osinstance->instanceData->nonlinearExpressions->nl[i] = new Nl();
7571  }
7572  }
7573  break;
7574 
7575  case 735:
7576 
7577  {
7578  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
7579  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->m_treeRoot =
7580  ((OSnLNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
7581  osnlData->tmpnlcount++;
7582  }
7583  break;
7584 
7585  case 736:
7586 
7587  {
7588  if (osnlData->tmpnlcount >= osnlData->nlnodenumber)
7589  parserData->parser_errors +=
7590  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of nl terms greater than number attribute");
7591  osglData->idxPresent = false;
7592  osglData->shapePresent = false;
7593 
7594  // clear the vectors of pointers
7595  osnlData->nlNodeVec.clear();
7596  osnlData->sumVec.clear();
7597  osnlData->allDiffVec.clear();
7598  osnlData->maxVec.clear();
7599  osnlData->minVec.clear();
7600  osnlData->productVec.clear();
7601  osnlData->matrixSumVec.clear();
7602  osnlData->matrixProductVec.clear();
7603  }
7604  break;
7605 
7606  case 737:
7607 
7608  {
7609  if (osglData->idxPresent == false)
7610  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute idx is missing");
7611 }
7612  break;
7613 
7614  case 740:
7615 
7616  {
7617  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->idx = osglData->idx;
7618  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree
7619  = new ScalarExpressionTree();
7620  }
7621  break;
7622 
7623  case 741:
7624 
7625  {
7626  if (returnNlExprShape(osglData->shape) > 0)
7627  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->shape
7629  else
7630  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
7631  "unknown shape specified in matrix transformation");
7632  }
7633  break;
7634 
7635  case 769:
7636 
7637  { osnlData->nlNodePoint = new OSnLNodeE();
7638  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);}
7639  break;
7640 
7641  case 773:
7642 
7643  { osnlData->nlNodePoint = new OSnLNodePI();
7644  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);}
7645  break;
7646 
7647  case 777:
7648 
7649  {
7650  osnlData->nlNodePoint = new OSnLNodeTimes();
7651  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7652 }
7653  break;
7654 
7655  case 779:
7656 
7657  {
7658  osnlData->nlNodePoint = new OSnLNodePlus();
7659  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7660 }
7661  break;
7662 
7663  case 781:
7664 
7665  {
7666  osnlData->nlNodePoint = new OSnLNodeMinus();
7667  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7668 }
7669  break;
7670 
7671  case 783:
7672 
7673  {
7674  osnlData->nlNodePoint = new OSnLNodeNegate();
7675  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7676 }
7677  break;
7678 
7679  case 785:
7680 
7681  {
7682  osnlData->nlNodePoint = new OSnLNodeDivide();
7683  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7684 }
7685  break;
7686 
7687  case 787:
7688 
7689  {
7690  osnlData->nlNodePoint = new OSnLNodePower();
7691  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7692 }
7693  break;
7694 
7695  case 789:
7696 
7697  {
7698  osnlData->nlNodePoint = new OSnLNodeLn();
7699  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7700 }
7701  break;
7702 
7703  case 791:
7704 
7705  {
7706  osnlData->nlNodePoint = new OSnLNodeSqrt();
7707  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7708 }
7709  break;
7710 
7711  case 793:
7712 
7713  {
7714  osnlData->nlNodePoint = new OSnLNodeSquare();
7715  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7716 }
7717  break;
7718 
7719  case 795:
7720 
7721  {
7722  osnlData->nlNodePoint = new OSnLNodeCos();
7723  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7724 }
7725  break;
7726 
7727  case 797:
7728 
7729  {
7730  osnlData->nlNodePoint = new OSnLNodeSin();
7731  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7732 }
7733  break;
7734 
7735  case 799:
7736 
7737  {
7738  osnlData->nlNodePoint = new OSnLNodeExp();
7739  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7740 }
7741  break;
7742 
7743  case 802:
7744 
7745  {
7746  osnlData->nlNodePoint = new OSnLNodeAbs();
7747  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7748 }
7749  break;
7750 
7751  case 803:
7752 
7753  {
7754 #ifdef OSINSTANCE_AVAILABLE
7755  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->bADMustReTape = true;
7756 #endif
7757 }
7758  break;
7759 
7760  case 804:
7761 
7762  {
7763  osnlData->nlNodePoint = new OSnLNodeErf();
7764  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7765 }
7766  break;
7767 
7768  case 805:
7769 
7770  {
7771 }
7772  break;
7773 
7774  case 806:
7775 
7776  {
7777  osnlData->nlNodePoint = new OSnLNodeIf();
7778  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7779 }
7780  break;
7781 
7782  case 807:
7783 
7784  {
7785 #ifdef OSINSTANCE_AVAILABLE
7786  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->bADMustReTape = true;
7787 #endif
7788 }
7789  break;
7790 
7791  case 808:
7792 
7793  {
7794  osnlData->nlNodePoint = new OSnLNodeMatrixDeterminant();
7795  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7796 }
7797  break;
7798 
7799  case 810:
7800 
7801  {
7802  osnlData->nlNodePoint = new OSnLNodeMatrixTrace();
7803  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7804 }
7805  break;
7806 
7807  case 812:
7808 
7809  {
7810  osnlData->nlNodePoint = new OSnLNodeMatrixToScalar();
7811  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7812 }
7813  break;
7814 
7815  case 814:
7816 
7817  {
7818  osglData->valuePresent = false;
7819  osglData->typePresent = false;
7820  osnlData->numberidattON = false;
7821 }
7822  break;
7823 
7824  case 815:
7825 
7826  {
7827  osnlData->nlNodeNumberPoint = new OSnLNodeNumber();
7828  osnlData->nlNodeVec.push_back( osnlData->nlNodeNumberPoint);
7829 }
7830  break;
7831 
7832  case 820:
7833 
7834  {
7835  osnlData->nlNodeNumberPoint->type = osglData->type;
7836  }
7837  break;
7838 
7839  case 821:
7840 
7841  {
7842  osnlData->nlNodeNumberPoint->value = atof(osglData->value.c_str());
7843  }
7844  break;
7845 
7846  case 823:
7847 
7848  {
7849  if (osnlData->numberidattON) parserData->parser_errors +=
7850  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,"too many number id attributes");
7851  osnlData->numberidattON = true;
7852  osnlData->nlNodeNumberPoint->id = (yyvsp[(2) - (2)].sval);
7853  free((yyvsp[(2) - (2)].sval));
7854 }
7855  break;
7856 
7857  case 825:
7858 
7859  {
7860  osnlData->nlNodeVariablePoint = new OSnLNodeVariable();
7861  osnlData->nlNodeVec.push_back( osnlData->nlNodeVariablePoint);
7862 }
7863  break;
7864 
7865  case 826:
7866 
7867  {osnlData->variablecoefattON = false; osnlData->variableidxattON = false;}
7868  break;
7869 
7870  case 829:
7871 
7872  {
7873  osnlData->nlNodeVariablePoint->inumberOfChildren = 1;
7874  osnlData->nlNodeVariablePoint->m_mChildren = new OSnLNode*[ 1];
7875  }
7876  break;
7877 
7878  case 833:
7879 
7880  {
7881  if (osnlData->variablecoefattON) parserData->parser_errors +=
7882  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variable coef attributes");
7883  osnlData->variablecoefattON = true;
7884  }
7885  break;
7886 
7887  case 834:
7888 
7889  {
7890  if (osnlData->variableidxattON) parserData->parser_errors +=
7891  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "too many variable idx attributes");
7892  osnlData->variableidxattON = true;
7893  }
7894  break;
7895 
7896  case 835:
7897 
7898  {
7899  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors +=
7900  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7901  osnlData->nlNodeVariablePoint->coef = parserData->tempVal;
7902 }
7903  break;
7904 
7905  case 836:
7906 
7907  {
7908  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) ) parserData->parser_errors +=
7909  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
7910  osnlData->nlNodeVariablePoint->idx = (yyvsp[(3) - (4)].ival);
7911 }
7912  break;
7913 
7914  case 837:
7915 
7916  {
7917  osnlData->nlNodePoint = new OSnLNodeSum();
7918  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7919  osnlData->sumVec.push_back( osnlData->nlNodePoint);
7920 }
7921  break;
7922 
7923  case 838:
7924 
7925  {
7926  ((OSnLNode*)osnlData->sumVec.back())->m_mChildren
7927  = new OSnLNode*[ ((OSnLNode*)osnlData->sumVec.back())->inumberOfChildren];
7928  osnlData->sumVec.pop_back();
7929 }
7930  break;
7931 
7932  case 840:
7933 
7934  { ((OSnLNode*)osnlData->sumVec.back())->inumberOfChildren++; }
7935  break;
7936 
7937  case 841:
7938 
7939  {
7940  osnlData->nlNodePoint = new OSnLNodeAllDiff ();
7941  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7942  osnlData->allDiffVec.push_back( osnlData->nlNodePoint);
7943 }
7944  break;
7945 
7946  case 842:
7947 
7948  {
7949  ((OSnLNode*)osnlData->allDiffVec.back())->m_mChildren
7950  = new OSnLNode*[ ((OSnLNode*)osnlData->allDiffVec.back())->inumberOfChildren];
7951  osnlData->allDiffVec.pop_back();
7952 #ifdef OSINSTANCE_AVAILABLE
7953  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->bADMustReTape = true;
7954 #endif
7955 }
7956  break;
7957 
7958  case 844:
7959 
7960  { ((OSnLNode*)osnlData->allDiffVec.back())->inumberOfChildren++; }
7961  break;
7962 
7963  case 845:
7964 
7965  {
7966  osnlData->nlNodePoint = new OSnLNodeMax();
7967  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7968  osnlData->maxVec.push_back( osnlData->nlNodePoint);
7969 }
7970  break;
7971 
7972  case 846:
7973 
7974  {
7975  osnlData->maxVec.back()->m_mChildren = new OSnLNode*[ osnlData->maxVec.back()->inumberOfChildren];
7976  osnlData->maxVec.pop_back();
7977 #ifdef OSINSTANCE_AVAILABLE
7978  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->bADMustReTape = true;
7979 #endif
7980 }
7981  break;
7982 
7983  case 848:
7984 
7985  { osnlData->maxVec.back()->inumberOfChildren++; }
7986  break;
7987 
7988  case 849:
7989 
7990  {
7991  osnlData->nlNodePoint = new OSnLNodeMin();
7992  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
7993  osnlData->minVec.push_back( osnlData->nlNodePoint);
7994 }
7995  break;
7996 
7997  case 850:
7998 
7999  {
8000  osnlData->minVec.back()->m_mChildren = new OSnLNode*[ osnlData->minVec.back()->inumberOfChildren];
8001  osnlData->minVec.pop_back();
8002 #ifdef OSINSTANCE_AVAILABLE
8003  osinstance->instanceData->nonlinearExpressions->nl[ osnlData->tmpnlcount]->osExpressionTree->bADMustReTape = true;
8004 #endif
8005 }
8006  break;
8007 
8008  case 852:
8009 
8010  { osnlData->minVec.back()->inumberOfChildren++; }
8011  break;
8012 
8013  case 853:
8014 
8015  {
8016  osnlData->nlNodePoint = new OSnLNodeProduct();
8017  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8018  osnlData->productVec.push_back( osnlData->nlNodePoint);
8019 }
8020  break;
8021 
8022  case 854:
8023 
8024  {
8025  osnlData->productVec.back()->m_mChildren = new OSnLNode*[ osnlData->productVec.back()->inumberOfChildren];
8026  osnlData->productVec.pop_back();
8027 }
8028  break;
8029 
8030  case 856:
8031 
8032  { osnlData->productVec.back()->inumberOfChildren++; }
8033  break;
8034 
8035  case 876:
8036 
8037  {
8038  osnlData->matrixidxattON = false;
8039 }
8040  break;
8041 
8042  case 877:
8043 
8044  {
8045  osnlData->nlMNodeMatrixRef = new OSnLMNodeMatrixReference();
8046  osnlData->nlNodeVec.push_back(osnlData->nlMNodeMatrixRef);
8047 }
8048  break;
8049 
8050  case 880:
8051 
8052  {
8053  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
8054  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
8055  osnlData->nlMNodeMatrixRef->idx = (yyvsp[(3) - (4)].ival);
8056 }
8057  break;
8058 
8059  case 881:
8060 
8061  {
8062  osnlData->matrixidxattON = false;
8063 }
8064  break;
8065 
8066  case 882:
8067 
8068  {
8069  osnlData->nlMNodeMatrixVar = new OSnLMNodeMatrixVar();
8070  osnlData->nlNodeVec.push_back(osnlData->nlMNodeMatrixVar);
8071 }
8072  break;
8073 
8074  case 885:
8075 
8076  {
8077  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
8078  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
8079  osnlData->nlMNodeMatrixVar->idx = (yyvsp[(3) - (4)].ival);
8080 }
8081  break;
8082 
8083  case 886:
8084 
8085  {
8086  osnlData->matrixidxattON = false;
8087 }
8088  break;
8089 
8090  case 887:
8091 
8092  {
8093  osnlData->nlMNodeMatrixObj = new OSnLMNodeMatrixObj();
8094  osnlData->nlNodeVec.push_back(osnlData->nlMNodeMatrixObj);
8095 }
8096  break;
8097 
8098  case 890:
8099 
8100  {
8101  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
8102  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
8103  osnlData->nlMNodeMatrixObj->idx = (yyvsp[(3) - (4)].ival);
8104 }
8105  break;
8106 
8107  case 891:
8108 
8109  {
8110  osnlData->matrixidxattON = false;
8111 }
8112  break;
8113 
8114  case 892:
8115 
8116  {
8117  osnlData->nlMNodeMatrixCon = new OSnLMNodeMatrixCon();
8118  osnlData->nlNodeVec.push_back(osnlData->nlMNodeMatrixCon);
8119 }
8120  break;
8121 
8122  case 895:
8123 
8124  {
8125  if ( *(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval) )
8126  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "start and end quotes are not the same");
8127  osnlData->nlMNodeMatrixCon->idx = (yyvsp[(3) - (4)].ival);
8128 }
8129  break;
8130 
8131  case 897:
8132 
8133  {
8134  osnlData->nlNodePoint = new OSnLMNodeMatrixDiagonal();
8135  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8136 }
8137  break;
8138 
8139  case 900:
8140 
8141  {
8142  osnlData->nlNodePoint = new OSnLMNodeMatrixDotTimes();
8143  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8144 }
8145  break;
8146 
8147  case 903:
8148 
8149  {
8150  osnlData->nlNodePoint = new OSnLMNodeIdentityMatrix();
8151  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8152 }
8153  break;
8154 
8155  case 906:
8156 
8157  {
8158  osnlData->nlNodePoint = new OSnLMNodeMatrixInverse();
8159  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8160 }
8161  break;
8162 
8163  case 909:
8164 
8165  {
8166  osnlData->nlNodePoint = new OSnLMNodeMatrixLowerTriangle();
8167  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8168 }
8169  break;
8170 
8171  case 911:
8172 
8173  {
8174  ((OSnLMNodeMatrixLowerTriangle*)osnlData->nlNodeVec.back())->includeDiagonal = osnlData->includeDiagonalAttribute;
8175 }
8176  break;
8177 
8178  case 914:
8179 
8180  {
8181  osnlData->nlNodePoint = new OSnLMNodeMatrixUpperTriangle();
8182  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8183 }
8184  break;
8185 
8186  case 916:
8187 
8188  {
8189  ((OSnLMNodeMatrixUpperTriangle*)osnlData->nlNodeVec.back())->includeDiagonal = osnlData->includeDiagonalAttribute;
8190 }
8191  break;
8192 
8193  case 918:
8194 
8195  {
8196  if (strcmp((yyvsp[(2) - (3)].sval),"false") == 0) osnlData->includeDiagonalAttribute = false;
8197  else if (strcmp((yyvsp[(2) - (3)].sval),"true" ) == 0) osnlData->includeDiagonalAttribute = true;
8198  else parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "osnlData->includeDiagonal attribute must be \"true\" or \"false\"");
8199  free((yyvsp[(2) - (3)].sval));
8200 }
8201  break;
8202 
8203  case 920:
8204 
8205  {
8206  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "matrix merge not yet implemented");
8207 }
8208  break;
8209 
8210  case 924:
8211 
8212  {
8213  osnlData->nlNodePoint = new OSnLMNodeMatrixMinus();
8214  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8215 }
8216  break;
8217 
8218  case 927:
8219 
8220  {
8221  osnlData->nlNodePoint = new OSnLMNodeMatrixNegate();
8222  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8223 }
8224  break;
8225 
8226  case 930:
8227 
8228  {
8229  osnlData->nlNodePoint = new OSnLMNodeMatrixPlus();
8230  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8231 }
8232  break;
8233 
8234  case 933:
8235 
8236  {
8237  osnlData->nlNodePoint = new OSnLMNodeMatrixTimes();
8238  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8239 }
8240  break;
8241 
8242  case 935:
8243 
8244  {
8245  osnlData->nlNodePoint = new OSnLMNodeMatrixProduct();
8246  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8247  osnlData->matrixProductVec.push_back( osnlData->nlNodePoint);
8248 }
8249  break;
8250 
8251  case 936:
8252 
8253  {
8254  osnlData->matrixProductVec.back()->m_mMatrixChildren = new OSnLMNode*[ osnlData->matrixProductVec.back()->inumberOfMatrixChildren];
8255  osnlData->matrixProductVec.pop_back();
8256 }
8257  break;
8258 
8259  case 938:
8260 
8261  {
8262  osnlData->matrixProductVec.back()->inumberOfMatrixChildren++;
8263 }
8264  break;
8265 
8266  case 940:
8267 
8268  {
8269  osnlData->nlNodePoint = new OSnLMNodeMatrixScalarTimes();
8270  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8271 }
8272  break;
8273 
8274  case 943:
8275 
8276  {
8277  osnlData->nlNodePoint = new OSnLMNodeMatrixSubmatrixAt();
8278  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8279 }
8280  break;
8281 
8282  case 946:
8283 
8284  {
8285  osnlData->nlNodePoint = new OSnLMNodeMatrixTranspose();
8286  osnlData->nlNodeVec.push_back( osnlData->nlNodePoint);
8287 }
8288  break;
8289 
8290  case 949:
8291 
8292  {
8293  if (osnlData->tmpnlcount < osnlData->nlnodenumber)
8294  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrix expressions less than number attribute");
8295  }
8296  break;
8297 
8298  case 950:
8299 
8300  {
8301  #ifdef OSINSTANCE_AVAILABLE
8302  osinstance->instanceData->matrixProgramming->matrixExpressions = new MatrixExpressions();
8303  osnlData->tmpnlcount = 0;
8304  #endif
8305  }
8306  break;
8307 
8308  case 952:
8309 
8310  {
8311  #ifdef OSINSTANCE_AVAILABLE
8312  if (*(yyvsp[(2) - (4)].sval) != *(yyvsp[(4) - (4)].sval))
8313  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mismatched quotes");
8314  if ((yyvsp[(3) - (4)].ival) < 0) parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
8315  "number of expressions cannot be negative");
8316  osnlData->nlnodenumber = (yyvsp[(3) - (4)].ival);
8317  osinstance->instanceData->matrixProgramming->matrixExpressions->numberOfExpr = (yyvsp[(3) - (4)].ival);
8318  if (osinstance->instanceData->matrixProgramming->matrixExpressions->numberOfExpr > 0 )
8319  osinstance->instanceData->matrixProgramming->matrixExpressions->expr
8320  = new MatrixExpression*[ (yyvsp[(3) - (4)].ival) ];
8321  for (int i = 0;
8322  i < osinstance->instanceData->matrixProgramming->matrixExpressions->numberOfExpr;
8323  i++)
8324  osinstance->instanceData->matrixProgramming->matrixExpressions->expr[i]
8325  = new MatrixExpression();
8326  #endif
8327  }
8328  break;
8329 
8330  case 959:
8331 
8332  {
8333  // IMPORTANT -- HERE IS WHERE WE CREATE THE EXPRESSION TREE
8334  #ifdef OSINSTANCE_AVAILABLE
8335  osinstance->instanceData->matrixProgramming->matrixExpressions->expr[ osnlData->tmpnlcount]->matrixExpressionTree->m_treeRoot =
8336  ((OSnLMNode*)osnlData->nlNodeVec[ 0])->createExpressionTreeFromPrefix( osnlData->nlNodeVec);
8337  #endif
8338  osnlData->tmpnlcount++;
8339  }
8340  break;
8341 
8342  case 960:
8343 
8344  {
8345  if (osnlData->tmpnlcount >= osnlData->nlnodenumber)
8346  parserData->parser_errors +=
8347  addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "actual number of matrix expressions greater than number attribute");
8348  osglData->idxPresent = false;
8349  osglData->shapePresent = false;
8350 
8351  // clear the vectors of pointers
8352  osnlData->nlNodeVec.clear();
8353  osnlData->sumVec.clear();
8354  osnlData->allDiffVec.clear();
8355  osnlData->maxVec.clear();
8356  osnlData->minVec.clear();
8357  osnlData->productVec.clear();
8358  osnlData->matrixSumVec.clear();
8359  osnlData->matrixProductVec.clear();
8360  }
8361  break;
8362 
8363  case 961:
8364 
8365  {
8366  if (osglData->idxPresent == false)
8367  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData, "mandatory attribute idx is missing");
8368 }
8369  break;
8370 
8371  case 964:
8372 
8373  {
8374  #ifdef OSINSTANCE_AVAILABLE
8375  osinstance->instanceData->matrixProgramming->matrixExpressions->expr[ osnlData->tmpnlcount]->idx = osglData->idx;
8376  osinstance->instanceData->matrixProgramming->matrixExpressions->expr[ osnlData->tmpnlcount]->matrixExpressionTree
8377  = new MatrixExpressionTree();
8378  #endif
8379  }
8380  break;
8381 
8382  case 965:
8383 
8384  {
8385  #ifdef OSINSTANCE_AVAILABLE
8386  if (returnNlExprShape(osglData->shape) > 0)
8387  osinstance->instanceData->matrixProgramming->matrixExpressions
8388  ->expr[ osnlData->tmpnlcount]->shape
8390  else
8391  parserData->parser_errors += addErrorMsg( NULL, osinstance, parserData, osglData, osnlData,
8392  "unknown shape specified in matrix transformation");
8393  #endif
8394  }
8395  break;
8396 
8397 
8398 
8399  default: break;
8400  }
8401  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
8402 
8403  YYPOPSTACK (yylen);
8404  yylen = 0;
8405  YY_STACK_PRINT (yyss, yyssp);
8406 
8407  *++yyvsp = yyval;
8408  *++yylsp = yyloc;
8409 
8410  /* Now `shift' the result of the reduction. Determine what state
8411  that goes to, based on the state we popped back to and the rule
8412  number reduced by. */
8413 
8414  yyn = yyr1[yyn];
8415 
8416  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
8417  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
8418  yystate = yytable[yystate];
8419  else
8420  yystate = yydefgoto[yyn - YYNTOKENS];
8421 
8422  goto yynewstate;
8423 
8424 
8425 /*------------------------------------.
8426 | yyerrlab -- here on detecting error |
8427 `------------------------------------*/
8428 yyerrlab:
8429  /* If not already recovering from an error, report this error. */
8430  if (!yyerrstatus)
8431  {
8433 #if ! YYERROR_VERBOSE
8434  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("syntax error"));
8435 #else
8436  {
8437  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
8438  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
8439  {
8440  YYSIZE_T yyalloc = 2 * yysize;
8441  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
8442  yyalloc = YYSTACK_ALLOC_MAXIMUM;
8443  if (yymsg != yymsgbuf)
8444  YYSTACK_FREE (yymsg);
8445  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
8446  if (yymsg)
8447  yymsg_alloc = yyalloc;
8448  else
8449  {
8450  yymsg = yymsgbuf;
8451  yymsg_alloc = sizeof yymsgbuf;
8452  }
8453  }
8454 
8455  if (0 < yysize && yysize <= yymsg_alloc)
8456  {
8457  (void) yysyntax_error (yymsg, yystate, yychar);
8458  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, yymsg);
8459  }
8460  else
8461  {
8462  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("syntax error"));
8463  if (yysize != 0)
8465  }
8466  }
8467 #endif
8468  }
8469 
8470  yyerror_range[0] = yylloc;
8471 
8472  if (yyerrstatus == 3)
8473  {
8474  /* If just tried and failed to reuse lookahead token after an
8475  error, discard it. */
8476 
8477  if (yychar <= YYEOF)
8478  {
8479  /* Return failure if at end of input. */
8480  if (yychar == YYEOF)
8481  YYABORT;
8482  }
8483  else
8484  {
8485  yydestruct ("Error: discarding",
8486  yytoken, &yylval, &yylloc, osinstance, parserData, osglData, osnlData);
8487  yychar = YYEMPTY;
8488  }
8489  }
8490 
8491  /* Else will try to reuse lookahead token after shifting the error
8492  token. */
8494 
8495 
8496 /*---------------------------------------------------.
8497 | yyerrorlab -- error raised explicitly by YYERROR. |
8498 `---------------------------------------------------*/
8499 yyerrorlab:
8500 
8501  /* Pacify compilers like GCC when the user code never invokes
8502  YYERROR and the label yyerrorlab therefore never appears in user
8503  code. */
8504  if (/*CONSTCOND*/ 0)
8505  goto yyerrorlab;
8506 
8507  yyerror_range[0] = yylsp[1-yylen];
8508  /* Do not reclaim the symbols of the rule which action triggered
8509  this YYERROR. */
8510  YYPOPSTACK (yylen);
8511  yylen = 0;
8512  YY_STACK_PRINT (yyss, yyssp);
8513  yystate = *yyssp;
8514  goto yyerrlab1;
8515 
8516 
8517 /*-------------------------------------------------------------.
8518 | yyerrlab1 -- common code for both syntax error and YYERROR. |
8519 `-------------------------------------------------------------*/
8520 yyerrlab1:
8521  yyerrstatus = 3; /* Each real token shifted decrements this. */
8522 
8523  for (;;)
8524  {
8525  yyn = yypact[yystate];
8526  if (yyn != YYPACT_NINF)
8527  {
8528  yyn += YYTERROR;
8529  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
8530  {
8531  yyn = yytable[yyn];
8532  if (0 < yyn)
8533  break;
8534  }
8535  }
8536 
8537  /* Pop the current state because it cannot handle the error token. */
8538  if (yyssp == yyss)
8539  YYABORT;
8540 
8541  yyerror_range[0] = *yylsp;
8542  yydestruct ("Error: popping",
8543  yystos[yystate], yyvsp, yylsp, osinstance, parserData, osglData, osnlData);
8544  YYPOPSTACK (1);
8545  yystate = *yyssp;
8546  YY_STACK_PRINT (yyss, yyssp);
8547  }
8548 
8549  *++yyvsp = yylval;
8550 
8551  yyerror_range[1] = yylloc;
8552  /* Using YYLLOC is tempting, but would change the location of
8553  the lookahead. YYLOC is available though. */
8554  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
8555  *++yylsp = yyloc;
8556 
8557  /* Shift the error token. */
8558  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8559 
8560  yystate = yyn;
8561  goto yynewstate;
8562 
8563 
8564 /*-------------------------------------.
8565 | yyacceptlab -- YYACCEPT comes here. |
8566 `-------------------------------------*/
8567 yyacceptlab:
8568  yyresult = 0;
8569  goto yyreturn;
8570 
8571 /*-----------------------------------.
8572 | yyabortlab -- YYABORT comes here. |
8573 `-----------------------------------*/
8574 yyabortlab:
8575  yyresult = 1;
8576  goto yyreturn;
8577 
8578 #if !defined(yyoverflow) || YYERROR_VERBOSE
8579 /*-------------------------------------------------.
8580 | yyexhaustedlab -- memory exhaustion comes here. |
8581 `-------------------------------------------------*/
8583  yyerror (&yylloc, osinstance, parserData, osglData, osnlData, YY_("memory exhausted"));
8584  yyresult = 2;
8585  /* Fall through. */
8586 #endif
8587 
8588 yyreturn:
8589  if (yychar != YYEMPTY)
8590  yydestruct ("Cleanup: discarding lookahead",
8591  yytoken, &yylval, &yylloc, osinstance, parserData, osglData, osnlData);
8592  /* Do not reclaim the symbols of the rule which action triggered
8593  this YYABORT or YYACCEPT. */
8594  YYPOPSTACK (yylen);
8595  YY_STACK_PRINT (yyss, yyssp);
8596  while (yyssp != yyss)
8597  {
8598  yydestruct ("Cleanup: popping",
8599  yystos[*yyssp], yyvsp, yylsp, osinstance, parserData, osglData, osnlData);
8600  YYPOPSTACK (1);
8601  }
8602 #ifndef yyoverflow
8603  if (yyss != yyssa)
8604  YYSTACK_FREE (yyss);
8605 #endif
8606 #if YYERROR_VERBOSE
8607  if (yymsg != yymsgbuf)
8608  YYSTACK_FREE (yymsg);
8609 #endif
8610  /* Make sure YYID is used. */
8611  return YYID (yyresult);
8612 }
8613 
8614 
8615 
8616 
8617 
8618 
8619 // user defined functions
8620 
8621 void osilerror(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData* parserData, OSgLParserData* osglData, OSnLParserData* osnlData, std::string errormsg )
8622 {
8623  osil_empty_vectors( parserData);
8624  osgl_empty_vectors( osglData);
8625  osnl_empty_vectors( osnlData);
8626  throw ErrorClass( errormsg);
8627 } //end osilerror
8628 
8629 
8630 std::string addErrorMsg(YYLTYPE* mytype, OSInstance *osinstance, OSiLParserData* parserData, OSgLParserData* osglData, OSnLParserData* osnlData, std::string errormsg )
8631 {
8632  std::ostringstream outStr;
8633  outStr << "At line number " << osilget_lineno( scanner) << ": ";
8634  outStr << osilget_text ( scanner ) << std::endl;
8635  outStr << errormsg << std::endl;
8636 
8637  return outStr.str();
8638 } //end addErrorMsg
8639 
8640 
8641 void yygetOSInstance( const char *osil, OSInstance* osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData) throw (ErrorClass) {
8642  try {
8643  parseInstanceHeader( &osil, osinstance, &parserData->osillineno);
8644  parseInstanceData( &osil, osinstance, &parserData->osillineno);
8650  osil_scan_string( osil, scanner );
8651  osilset_lineno (parserData->osillineno , scanner );
8652  //
8653  // call the Bison parser
8654  //
8655  if( osilparse( osinstance, parserData, osglData, osnlData) != 0) {
8656  throw ErrorClass( "Error parsing the OSiL");
8657  }
8658  }
8659  catch(const ErrorClass& eclass){
8660  throw ErrorClass( eclass.errormsg);
8661  }
8662 }//end yygetOSInstance
8663 
8664 bool isnewline(char c, int* osillineno){
8665  if(c != '\n') return false;
8666  (*osillineno)++;
8667  return true;
8668 }//end isnewline()
8669 
8670 bool parseInstanceHeader( const char **p, OSInstance *osinstance, int* osillineno){
8671  //
8672  *osillineno = 1;
8673  const char *pchar = *p;
8674 
8675 
8676  //first check of osil start
8677  const char *startOSiL = "<osil";
8678  const char *pOSiLStart = strstr(pchar, startOSiL);
8679  if(pOSiLStart == NULL){
8680  osilerror_wrapper( pchar,osillineno,"<osil> element missing");
8681  return false;
8682  }else{
8683  //look for osil end
8684  const char *pOSiLEnd = strstr(pOSiLStart, ">");
8685  if(pOSiLEnd == NULL) { osilerror_wrapper( pchar,osillineno,"end of <osil> element missing"); return false;
8686  } else {
8687  pchar = pOSiLEnd;
8688  pchar++;
8689  }
8690  }
8691 
8692 
8693  // create a char array that holds the instance header information
8694  const char *startInstanceHeader = "<instanceHeader";
8695  const char *endInstanceHeader = "instanceHeader"; // "</instanceHeader";
8696  const char *startName = "ame"; // "<name";
8697  const char *startSource = "ource"; // "<source";
8698  const char *startDescription = "escription"; // "<description";
8699  const char *startFileCreator = "ileCreator"; // "<fileCreator";
8700  const char *startLicence = "icence"; // "<licence";
8701  const char *endName = "</name";
8702  const char *endSource = "</source";
8703  const char *endDescription = "</description";
8704  const char *endFileCreator = "</fileCreator";
8705  const char *endLicence = "</licence";
8706  const char *pinstanceHeadStart = strstr(pchar, startInstanceHeader);
8707  char *pelementText = NULL;
8708  const char *ptemp = NULL;
8709  int elementSize;
8710 
8711  bool namePresent = false;
8712  bool sourcePresent = false;
8713  bool descriptionPresent = false;
8714  bool fileCreatorPresent = false;
8715  bool licencePresent = false;
8716 
8717  if(pinstanceHeadStart == NULL ) {
8718  const char *startInstanceData = "<instanceData";
8719  *p = strstr(pchar, startInstanceData);
8720  return true;
8721  }
8722  // increment the line number counter if there are any newlines between the start of
8723  // the osil string and pinstanceHeadStart
8724  int kount = pinstanceHeadStart - pchar;
8725  while( kount-- > 0) if(*(pchar++) == '\n') (*osillineno)++;
8726  // important! pchar now points to the '<' in <instanceHeader
8727  // that is, both pinstanceHeadStart and pchar point to the same thing
8728  //
8729  // move to the end of <instanceHeader
8730  pchar+=15;
8731  // burn any whitespace
8732  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8733  // pchar better be pointing to the '>' in the <instanceHeader> element
8734  // or to /> if we have <instanceHeader />
8735  if( *pchar == '/'){
8736  pchar++;
8737  // better point to a '>'
8738  if(*pchar != '>') { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceHeader> element"); return false;}
8739  // there is no instanceHeader data
8740  pchar++;
8741  *p = pchar;
8742  return true;
8743  }
8744  else{
8745  // pchar better be '>' or there is an error
8746  if(*pchar != '>') { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceHeader> element"); return false;}
8747  }
8748  pchar++;
8749  // we are pointing to the character after <instanceHeader>
8750  //
8751  // The next element could be </instanceHeader or one of the content elements (in arbitrary order):
8752  // <name
8753  // <source
8754  // <description
8755  // <fileCreator
8756  // <licence
8757 
8758  for (;;)
8759  {
8760  // first burn any whitespace
8761  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8762  // remember where we are
8763  *p = pchar;
8764  // The next character should be '<'
8765  if (*pchar != '<') {osilerror_wrapper( pchar,osillineno,"improperly formed <name> element"); return false;}
8766  pchar++;
8767  switch (*pchar)
8768  {
8769  case 'n': // <name
8770  if (namePresent)
8771  {
8772  osilerror_wrapper( pchar,osillineno,"duplicate <name> element");
8773  return false;
8774  }
8775  else
8776  namePresent = true;
8777  pchar++;
8778  while(*startName++ == *pchar) pchar++;
8779  if( (pchar - *p) != 5)
8780  {
8781  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8782  return false;
8783  }
8784  else
8785  {
8786  // we have a name element, process the text
8787  // burn the whitespace
8788  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8789  if( *pchar == '/')
8790  {
8791  pchar++;
8792  // better point to a '>'
8793  if(*pchar != '>')
8794  {
8795  osilerror_wrapper( pchar,osillineno,"improperly formed <name> element");
8796  return false;
8797  }
8798  pchar++;
8799  }
8800  else
8801  {
8802  // pchar better be '>' or there is an error
8803  if(*pchar != '>')
8804  {
8805  osilerror_wrapper( pchar,osillineno,"improperly formed <name> element");
8806  return false;
8807  }
8808  pchar++;
8809  // process <name> element text
8810  // there better be a </name
8811  ptemp = strstr( pchar, endName);
8812  if( ptemp == NULL)
8813  {
8814  osilerror_wrapper( pchar,osillineno,"improperly formed </name> element");
8815  return false;
8816  }
8817  elementSize = ptemp - pchar;
8818  pelementText = new char[ elementSize + 1];
8819  strncpy(pelementText, pchar, elementSize);
8820  pelementText[ elementSize] = '\0';
8821  osinstance->instanceHeader->name = pelementText;
8822  //garbage collection
8823  delete [] pelementText;
8824  // move pchar up to the end of </name
8825  while(elementSize-- > 0)
8826  {
8827  if(*pchar++ == '\n') (*osillineno)++;
8828  }
8829  // pchar should now be pointing to the start of </name
8830  // move to first char after </name
8831  pchar += 6;
8832  // get rid of the whitespace
8833  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8834  // we better have the '>' for the end of name
8835  if(*pchar++ != '>')
8836  {
8837  osilerror_wrapper( pchar,osillineno,"improperly formed </name> element");
8838  return false;
8839  }
8840  }
8841  }
8842  break;
8843 
8844  case 's': // <source
8845  if (sourcePresent)
8846  {
8847  osilerror_wrapper( pchar,osillineno,"duplicate <source> element");
8848  return false;
8849  }
8850  else
8851  sourcePresent = true;
8852  pchar++;
8853  while(*startSource++ == *pchar) pchar++;
8854  if( (pchar - *p) != 7)
8855  {
8856  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8857  return false;
8858  }
8859  else
8860  {
8861  // we have a source element, process the text
8862  // burn the whitespace
8863  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8864  if( *pchar == '/')
8865  {
8866  pchar++;
8867  // better point to a '>'
8868  if(*pchar != '>')
8869  {
8870  osilerror_wrapper( pchar,osillineno,"improperly formed <source> element");
8871  return false;
8872  }
8873  pchar++;
8874  }
8875  else
8876  {
8877  // pchar better be '>' or there is an error
8878  if(*pchar != '>')
8879  {
8880  osilerror_wrapper( pchar,osillineno,"improperly formed <source> element");
8881  return false;
8882  }
8883  pchar++;
8884  // process <source> element text
8885  // there better be a </source
8886  ptemp = strstr( pchar, endSource);
8887  if( ptemp == NULL)
8888  {
8889  osilerror_wrapper( pchar,osillineno,"improperly formed </source> element");
8890  return false;
8891  }
8892  elementSize = ptemp - pchar;
8893  pelementText = new char[ elementSize + 1];
8894  strncpy(pelementText, pchar, elementSize);
8895  pelementText[ elementSize] = '\0';
8896  osinstance->instanceHeader->source = pelementText;
8897  //garbage collection
8898  delete [] pelementText;
8899  // move pchar up to the end of </source
8900  while(elementSize-- > 0)
8901  {
8902  if(*pchar++ == '\n') (*osillineno)++;
8903  }
8904  // pchar should now be pointing to the start of </source
8905  // move to first char after </source
8906  pchar += 8;
8907  // get rid of the whitespace
8908  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8909  // we better have the '>' for the end of source
8910  if(*pchar++ != '>')
8911  {
8912  osilerror_wrapper( pchar,osillineno,"improperly formed </source> element");
8913  return false;
8914  }
8915  }
8916  }
8917  break;
8918 
8919  case 'd': // <description
8920  if (descriptionPresent)
8921  {
8922  osilerror_wrapper( pchar,osillineno,"duplicate <description> element");
8923  return false;
8924  }
8925  else
8926  descriptionPresent = true;
8927  pchar++;
8928  while(*startDescription++ == *pchar) pchar++;
8929  if( (pchar - *p) != 12)
8930  {
8931  osilerror_wrapper( pchar,osillineno,"tag not recognized");
8932  return false;
8933  }
8934  else
8935  {
8936  // we have a description element, process the text
8937  // burn the whitespace
8938  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8939  if( *pchar == '/')
8940  {
8941  pchar++;
8942  // better point to a '>'
8943  if(*pchar != '>')
8944  {
8945  osilerror_wrapper( pchar,osillineno,"improperly formed <description> element");
8946  return false;
8947  }
8948  pchar++;
8949  }
8950  else
8951  {
8952  // pchar better be '>' or there is an error
8953  if(*pchar != '>')
8954  {
8955  osilerror_wrapper( pchar,osillineno,"improperly formed <description> element");
8956  return false;
8957  }
8958  pchar++;
8959  // process <description> element text
8960  // there better be a </description
8961  ptemp = strstr( pchar, endDescription);
8962  if( ptemp == NULL)
8963  {
8964  osilerror_wrapper( pchar,osillineno,"improperly formed </description> element");
8965  return false;
8966  }
8967  elementSize = ptemp - pchar;
8968  pelementText = new char[ elementSize + 1];
8969  strncpy(pelementText, pchar, elementSize);
8970  pelementText[ elementSize] = '\0';
8971  osinstance->instanceHeader->description = pelementText;
8972  //garbage collection
8973  delete [] pelementText;
8974  // move pchar up to the end of </description
8975  while(elementSize-- > 0)
8976  {
8977  if(*pchar++ == '\n') (*osillineno)++;
8978  }
8979  // pchar should now be pointing to the start of </description
8980  // move to first char after </description
8981  pchar += 13;
8982  // get rid of the whitespace
8983  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
8984  // we better have the '>' for the end of description
8985  if(*pchar++ != '>')
8986  {
8987  osilerror_wrapper( pchar,osillineno,"improperly formed </description> element");
8988  return false;
8989  }
8990  }
8991  }
8992  break;
8993 
8994  case 'f': // <fileCreator
8995  if (fileCreatorPresent)
8996  {
8997  osilerror_wrapper( pchar,osillineno,"duplicate <fileCreator> element");
8998  return false;
8999  }
9000  else
9001  fileCreatorPresent = true;
9002  pchar++;
9003  while(*startFileCreator++ == *pchar) pchar++;
9004  if( (pchar - *p) != 12)
9005  {
9006  osilerror_wrapper( pchar,osillineno,"tag not recognized");
9007  return false;
9008  }
9009  else
9010  {
9011  // we have a fileCreator element, process the text
9012  // burn the whitespace
9013  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9014  if( *pchar == '/')
9015  {
9016  pchar++;
9017  // better point to a '>'
9018  if(*pchar != '>')
9019  {
9020  osilerror_wrapper( pchar,osillineno,"improperly formed <fileCreator> element");
9021  return false;
9022  }
9023  pchar++;
9024  }
9025  else
9026  {
9027  // pchar better be '>' or there is an error
9028  if(*pchar != '>')
9029  {
9030  osilerror_wrapper( pchar,osillineno,"improperly formed <fileCreator> element");
9031  return false;
9032  }
9033  pchar++;
9034  // process <fileCreator> element text
9035  // there better be a </fileCreator
9036  ptemp = strstr( pchar, endFileCreator);
9037  if( ptemp == NULL)
9038  {
9039  osilerror_wrapper( pchar,osillineno,"improperly formed </fileCreator> element");
9040  return false;
9041  }
9042  elementSize = ptemp - pchar;
9043  pelementText = new char[ elementSize + 1];
9044  strncpy(pelementText, pchar, elementSize);
9045  pelementText[ elementSize] = '\0';
9046  osinstance->instanceHeader->fileCreator = pelementText;
9047  //garbage collection
9048  delete [] pelementText;
9049  // move pchar up to the end of </fileCreator
9050  while(elementSize-- > 0)
9051  {
9052  if(*pchar++ == '\n') (*osillineno)++;
9053  }
9054  // pchar should now be pointing to the start of </fileCreator
9055  // move to first char after </fileCreator
9056  pchar += 13;
9057  // get rid of the whitespace
9058  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9059  // we better have the '>' for the end of fileCreator
9060  if(*pchar++ != '>')
9061  {
9062  osilerror_wrapper( pchar,osillineno,"improperly formed </fileCreator> element");
9063  return false;
9064  }
9065  }
9066  }
9067  break;
9068 
9069  case 'l': // <licence
9070  if (licencePresent)
9071  {
9072  osilerror_wrapper( pchar,osillineno,"duplicate <licence> element");
9073  return false;
9074  }
9075  else
9076  licencePresent = true;
9077  pchar++;
9078  while(*startLicence++ == *pchar) pchar++;
9079  if( (pchar - *p) != 8)
9080  {
9081  osilerror_wrapper( pchar,osillineno,"tag not recognized");
9082  return false;
9083  }
9084  else
9085  {
9086  // we have a licence element, process the text
9087  // burn the whitespace
9088  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9089  if( *pchar == '/')
9090  {
9091  pchar++;
9092  // better point to a '>'
9093  if(*pchar != '>')
9094  {
9095  osilerror_wrapper( pchar,osillineno,"improperly formed <licence> element");
9096  return false;
9097  }
9098  pchar++;
9099  }
9100  else
9101  {
9102  // pchar better be '>' or there is an error
9103  if(*pchar != '>')
9104  {
9105  osilerror_wrapper( pchar,osillineno,"improperly formed <licence> element");
9106  return false;
9107  }
9108  pchar++;
9109  // process <licence> element text
9110  // there better be a </licence
9111  ptemp = strstr( pchar, endLicence);
9112  if( ptemp == NULL)
9113  {
9114  osilerror_wrapper( pchar,osillineno,"improperly formed </licence> element");
9115  return false;
9116  }
9117  elementSize = ptemp - pchar;
9118  pelementText = new char[ elementSize + 1];
9119  strncpy(pelementText, pchar, elementSize);
9120  pelementText[ elementSize] = '\0';
9121  osinstance->instanceHeader->licence = pelementText;
9122  //garbage collection
9123  delete [] pelementText;
9124  // move pchar up to the end of </licence
9125  while(elementSize-- > 0)
9126  {
9127  if(*pchar++ == '\n') (*osillineno)++;
9128  }
9129  // pchar should now be pointing to the start of </licence
9130  // move to first char after </licence
9131  pchar += 9;
9132  // get rid of the whitespace
9133  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9134  // we better have the '>' for the end of licence
9135  if(*pchar++ != '>')
9136  {
9137  osilerror_wrapper( pchar,osillineno,"improperly formed </licence> element");
9138  return false;
9139  }
9140  }
9141  }
9142  break;
9143 
9144  case '/': // </instanceHeader
9145  pchar++;
9146  while(*endInstanceHeader++ == *pchar) pchar++;
9147  if( (pchar - *p) != 16)
9148  {
9149  osilerror_wrapper( pchar,osillineno,"improperly formed </instanceHeader> element");
9150  return false;
9151  }
9152  // pchar now points to the first character after </instanceHeader
9153  // get rid of white space
9154  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9155  // pchar must point to '>' or there is an error
9156  if(*pchar != '>')
9157  {
9158  osilerror_wrapper( pchar,osillineno,"improperly formed </instanceHeader> element");
9159  return false;
9160  }
9161  pchar++;
9162  *p = pchar;
9163  return true;
9164 
9165  default:
9166  {osilerror_wrapper( pchar,osillineno,"tag not recognized"); return false;}
9167  }
9168  }
9169  return false;
9170 }//end parseInstanceHeader
9171 
9172 
9173 bool parseInstanceData( const char **p, OSInstance *osinstance, int* osillineno){
9174  //
9175  const char *pchar = *p;
9176  const char *startInstanceData = "<instanceData";
9177  // at this point *pchar should be pointing to the first char after the > in </instanceHeader>
9178  // burn the white space
9179  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9180  // pchar should be point to a '<', if not there is an error
9181  if(*pchar != '<'){ osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData element"); return false;}
9182  // make sure the element is <instanceData
9183  *p = pchar;
9184  while(*startInstanceData++ == *pchar) pchar++;
9185  if( (pchar - *p) != 13) { osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData> element"); return false;}
9186  // now burn whitespace
9187  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9188  // pchar must point to '>' or there is an error
9189  if(*pchar == '>'){
9190  pchar++;
9191  // we are now pointing to the first char after <instanceData>
9192  // burn any whitespace
9193  for( ; ISWHITESPACE( *pchar) || isnewline( *pchar, osillineno); pchar++ ) ;
9194  // we should be pointing to the '<' char in <variables>
9195  *p = pchar;
9196  if( parseVariables ( p, osinstance, osillineno) != true) throw ErrorClass("error in parseVariables");
9197  if( parseObjectives ( p, osinstance, osillineno) != true) throw ErrorClass("error in parseObjectives");
9198  if( parseConstraints( p, osinstance, osillineno) != true) throw ErrorClass("error in parseConstraints");
9199  if( parseLinearConstraintCoefficients( p, osinstance, osillineno) != true) throw ErrorClass("error in parseLinearConstraintCoefficients");
9200  }else{
9201  //osilerror_wrapper( pchar,osillineno,"improperly formed <instanceData> element");
9202  return true;
9203  }
9204  // we should be pointing to the '<' char in <variables>
9205  return true;
9206 }// end parseInstanceData
9207 
9208 
9209 bool parseVariables( const char **p, OSInstance *osinstance, int* osillineno){
9210  clock_t start, finish;
9211  #ifdef CHECK_PARSE_TIME
9212  double duration;
9213  #endif
9214  int ki, numChar;
9215  char *attTextEnd;
9216  const char *ch = *p;
9217  start = clock();
9218  const char *c_numberOfVariables = "numberOfVariables";
9219  const char *startVariables = "<variables";
9220  const char *endVariables = "</variables";
9221  const char *startVar = "<var";
9222  const char *endVar = "</var";
9223  // the attributes
9224  char *attText = NULL;
9225  const char *name = "name";
9226  //const char *initString = "initString";
9227  const char *type = "type";
9228  const char *mult = "mult";
9229  // others
9230  int i;
9231  int varcount = 0;
9232  int vt;
9233  int numberOfVariables = 0;
9234 // variable attribute boolean variables
9235  bool varlbattON = false;
9236  bool varubattON = false ;
9237  bool vartypeattON = false;
9238  bool varnameattON = false ;
9239  //bool varinitattON = false ;
9240  //bool varinitStringattON = false ;
9241  bool varmultattON = false;
9242  bool foundVar = false;
9243  int varmult;
9244  //
9245  // start parsing -- okay not to have variables
9246  // burn white space
9247  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9248  *p = ch;
9249  while(*startVariables++ == *ch) ch++;
9250  //if( (ch - *p) != 10) { osilerror_wrapper( ch,osillineno,"incorrect <variables tag>"); return false;}
9251  if( (ch - *p) != 10) { return true;}
9252 
9253  osinstance->instanceData->variables = new Variables();
9254 
9255  // find numberOfVariables attribute
9256  // eat the white space
9257  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9258  *p = ch;
9259  while(*c_numberOfVariables++ == *ch) ch++;
9260  if( (ch - *p) != 17) { osilerror_wrapper( ch,osillineno,"incorrect numberOfVariables attribute in <variables tag>"); return false;}
9261  // buf_index should be pointing to the first character after numberOfVariables
9263  ch++;
9264  numberOfVariables = atoimod1( osillineno, attText, attTextEnd);
9265  delete [] attText;
9266  if(numberOfVariables < 0) {
9267  osilerror_wrapper( ch,osillineno,"there must be a nonnegative number of variables"); return false;
9268  }
9269  osinstance->instanceData->variables->numberOfVariables = numberOfVariables;
9270  if(numberOfVariables > 0){
9271  osinstance->instanceData->variables->var = new Variable*[ numberOfVariables];
9272  for(i = 0; i < numberOfVariables; i++){
9273  osinstance->instanceData->variables->var[ i] = new Variable();
9274  }
9275  }
9276  // get rid of white space after the numberOfVariables element
9277  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9278  // since there must be at least one variable, this element must end with >
9279  if(numberOfVariables > 0){
9280  // better have an > sign or not valid
9281  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"variables element does not have a proper closing >"); return false;}
9282  ch++;
9283  // get rid of white space
9284  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9285  // now loop over the var element when the numberOfVariables is strictly positive
9286  *p = ch;
9287  while(*startVar++ == *ch) ch++;
9288  if( (ch - *p) == 4) foundVar = true;
9289  else { osilerror_wrapper( ch,osillineno,"there must be at least one <var> element"); return false;}
9290  startVar -= 5;
9291  while(foundVar){
9292  varlbattON = false;
9293  varubattON = false;
9294  vartypeattON = false;
9295  varnameattON = false;
9296  varmultattON = false;
9297  varmult = 1;
9298  foundVar = false;
9299  vt = 0;
9300  // assume we are pointing to the first character after the r in <var
9301  // it should be whitespace
9302  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9303  while(*ch != '/' && *ch != '>'){
9304  switch (*ch) {
9305  case 'n':
9306  *p = ch;
9307  while(*name++ == *ch) ch++;
9308  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"error in variables name attribute"); return false;}
9309  name -= 5;
9310  if(varnameattON == true) { osilerror_wrapper( ch,osillineno,"too many variable name attributes"); return false;}
9311  varnameattON = true;
9313  osinstance->instanceData->variables->var[varcount]->name=attText;
9314  delete [] attText;
9315  break;
9316  case 't':
9317  *p = ch;
9318  while(*type++ == *ch) ch++;
9319  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in variables type attribute"); return false;}
9320  type -= 5;
9321  if(vartypeattON == true) { osilerror_wrapper( ch,osillineno,"too many variable type attributes"); return false;}
9322  vartypeattON = true;
9324  vt = returnVarType(attText[0]);
9325  if( vt == 0 ) { osilerror_wrapper( ch,osillineno,"variable type not recognized"); return false;}
9326  osinstance->instanceData->variables->var[varcount]->type = attText[0];
9327  delete [] attText;
9328  break;
9329  case 'l':
9330  ch++;
9331  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in variables lower bound attribute"); return false;}
9332  if(varlbattON == true) { osilerror_wrapper( ch,osillineno,"too many variable lb attributes"); return false;}
9333  varlbattON = true;
9335  osinstance->instanceData->variables->var[varcount]->lb = atofmod1( osillineno,attText, attTextEnd);
9336  delete [] attText;
9337  break;
9338  case 'u':
9339  ch++;
9340  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in variables upper bound attribute"); return false;}
9341  if(varubattON == true) { osilerror_wrapper( ch,osillineno,"too many variable ub attributes"); return false;}
9342  varubattON = true;
9344  osinstance->instanceData->variables->var[varcount]->ub = atofmod1( osillineno,attText, attTextEnd);
9345  delete [] attText;
9346  break;
9347  case 'm':
9348  *p = ch;
9349  while(*mult++ == *ch) ch++;
9350  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in variables mult attribute"); return false;}
9351  mult -= 5;
9352  if(varmultattON == true) { osilerror_wrapper( ch,osillineno,"too many variable mult attributes"); return false;}
9353  varmultattON = true;
9355  varmult = atoimod1( osillineno,attText, attTextEnd);
9356  delete [] attText;
9357  break;
9358  case ' ':
9359  break;
9360  case '\n':
9361  (*osillineno)++;
9362  break;
9363  case '\t':
9364  break;
9365  case '\r':
9366  break;
9367  default:
9368  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9369  return false;
9370  break;
9371  }
9372  // reset default upper bound for binary variables
9373  if (vt == ENUM_VARTYPE_binary)
9374  {
9375  if (varubattON == false)
9376  osinstance->instanceData->variables->var[varcount]->ub = 1.0;
9377  }
9378  ch++;
9379  }
9380  //
9381  // assume all the attributes have been processed
9382  // must have either /> or > and then whitespace and </var whitespace>
9383  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <var> element"); return false;}
9384  if(*ch == '/'){
9385  ch++;
9386  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <var> element"); return false;}
9387  // get rid of whitespace
9388  ch++;
9389  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9390  // either have another <var> element or foundVar = false;
9391  *p = ch;
9392  while(*startVar++ == *ch) ch++;
9393  if( (ch - *p) == 4) {
9394  foundVar = true;
9395  startVar -= 5;
9396  }
9397  else {
9398  foundVar = false;
9399  ch = *p;
9400  }
9401  }
9402  else{
9403  // the buf_index is the > at the end of the var element
9404  // double check to make sure it really is a >
9405  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <var> element"); return false;}
9406  // look for </var
9407  // fist get rid of white space
9408  ch++;
9409  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9410  // we should be at </var or there is an error
9411  *p = ch;
9412  while(*endVar++ == *ch) ch++;
9413  endVar -= 6;
9414  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"</var> element missing"); return false;}
9415  // burn off the whitespace
9416  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9417  // better have an > to end </var
9418  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"</var> element missing >"); return false;}
9419  // look for a new <var> element
9420  // get rid of whitespace
9421  ch++;
9422  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9423  // either have another <var> element or foundVar = false;
9424  *p = ch;
9425  while(*startVar++ == *ch) ch++;
9426  if( (ch - *p) == 4) {
9427  foundVar = true;
9428  startVar -= 5;
9429  }
9430  else {
9431  foundVar = false;
9432  ch = *p;
9433  }
9434  }
9435  if( ((varcount+varmult) == numberOfVariables) && (foundVar == true) ) { osilerror_wrapper( ch,osillineno,"attribute numberOfVariables is less than actual number found"); return false;}
9436  for (int k=1; k < varmult; k++)
9437  {
9438  osinstance->instanceData->variables->var[varcount+k]->name
9439  = osinstance->instanceData->variables->var[varcount]->name;
9440  osinstance->instanceData->variables->var[varcount+k]->type
9441  = osinstance->instanceData->variables->var[varcount]->type;
9442  osinstance->instanceData->variables->var[varcount+k]->lb
9443  = osinstance->instanceData->variables->var[varcount]->lb;
9444  osinstance->instanceData->variables->var[varcount+k]->ub
9445  = osinstance->instanceData->variables->var[varcount]->ub;
9446  }
9447  varcount += varmult;
9448  }// end while(foundVar)
9449  if(varcount < numberOfVariables) { osilerror_wrapper( ch,osillineno,"attribute numberOfVariables is greater than actual number found"); return false;}
9450  // get the </variables> tag
9451  *p = ch;
9452  while(*endVariables++ == *ch) ch++;
9453  if( (ch - *p) != 11) { osilerror_wrapper( ch,osillineno,"cannot find </variables> tag"); return false;}
9454  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9455  // better have >
9456  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </variables> tag"); return false;}
9457  ch++;
9458  }else {//end if(numberOfVariables > 0)
9459  // error if the number is negative
9460  if(numberOfVariables < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of variables"); return false;}
9461  // if we are here we have numberOfVariables = 0
9462  // must close with /> or </variables>
9463  // get rid of white space
9464  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9465  if( *ch == '/'){
9466  // better have a >
9467  ch++;
9468  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed variables tag"); return false;}
9469  ch++;
9470  }
9471  else{
9472  // if we are here we must have an '>' and then </constraints> tag
9473  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed variables tag"); return false;}
9474  ch++;
9475  // burn white space
9476  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9477  *p = ch;
9478  while( *endVariables++ == *ch) ch++;
9479  if( (ch - *p) != 11) { osilerror_wrapper( ch,osillineno, "cannot find </variables> tag"); return false; }
9480  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9481  // better have >
9482  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </variables> tag"); return false;}
9483  ch++;
9484  }
9485  }
9486  finish = clock();
9487  #ifdef CHECK_PARSE_TIME
9488  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9489  printf("TIME TO PARSE VARIABLES = %f\n", duration);
9490  #endif
9491  *p = ch;
9492  return true;
9493 }//end parseVariables
9494 
9495 
9496 bool parseObjectives( const char **p, OSInstance *osinstance, int* osillineno){
9497  clock_t start, finish;
9498  #ifdef CHECK_PARSE_TIME
9499  double duration;
9500  #endif
9501  int ki, numChar;
9502  char *attTextEnd;
9503  const char *ch = *p;
9504  start = clock();
9505  const char *c_numberOfObjectives = "numberOfObjectives";
9506  const char *startObjectives = "<objectives";
9507  const char *endObjectives = "</objectives";
9508  const char *startObj = "<obj";
9509  const char *endObj = "</obj";
9510  // attributes
9511  char *attText = NULL;
9512  const char *constant = "constant";
9513  const char *maxOrMin = "maxOrMin";
9514  const char *numberOfObjCoef = "numberOfObjCoef";
9515  const char *weight = "weight";
9516  const char *name = "name";
9517  const char *mult = "mult";
9518  // others
9519  int i;
9520  // objective function attribute boolean variables
9521  bool objmaxOrMinattON = false;
9522  bool objnameattON = false;
9523  bool objconstantattON = false;
9524  bool objweightattON = false;
9525  bool objmultattON = false;
9526  bool objnumberOfObjCoefattON = false;
9527  int objcount = 0;
9528  int numberOfObjectives;
9529  bool foundObj;
9530  int objmult;
9531  // start parsing
9532  // burn white space
9533  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9534  // if, present we should be pointing to <objectives element if there -- it is not required
9535  *p = ch;
9536  while( *startObjectives++ == *ch) ch++;
9537  if( (ch - *p) != 11) {
9538  // note if we are here even though ch > *p we want to return *p
9539  return true;
9540  }
9541 
9542  osinstance->instanceData->objectives = new Objectives();
9543 
9544  // find numberOfObjectives attribute -- it is valid for this attribute to be missing.
9545  // However if the number attribute is missing assume it is 1
9546  // eat the white space
9547  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9548  // we just ate the white space. If numberOfObjectives is missing we assume it is 1
9549  // we therefore must have > char
9550  if(*ch == '>'){
9551  numberOfObjectives = 1;
9552  //ch++;
9553  }
9554  else{
9555  *p = ch;
9556  while( *c_numberOfObjectives++ == *ch) ch++;
9557  if( (ch - *p) != 18) { osilerror_wrapper( ch,osillineno,"incorrect numberOfObjectives attribute in <objectives> tag"); return false;}
9559  numberOfObjectives = atoimod1( osillineno, attText, attTextEnd);
9560  delete [] attText;
9561  ch++;
9562  }
9563  if(numberOfObjectives > 0){
9564  // get rid of white space after the numberOfObjectives attribute
9565  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9566  // we must have an >
9567  /*if(*ch == '/'){
9568  ch++;
9569  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the objectives element does not have a proper closing"); return false; }
9570  else{
9571  if(numberOfObjectives > 0){ osilerror_wrapper( ch,osillineno,"numberOfObjectives positive but there are no objectives"); return false;}
9572  return false;
9573  }
9574  }*/
9575  // we better have an >
9576  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the objectives element does not have a proper closing"); return false;}
9577  osinstance->instanceData->objectives->numberOfObjectives = numberOfObjectives;
9578  osinstance->instanceData->objectives->obj = new Objective*[ numberOfObjectives];
9579  for(i = 0; i < numberOfObjectives; i++){
9580  osinstance->instanceData->objectives->obj[ i] = new Objective();
9581  }
9582  // get rid of white space after the <objectives> element
9583  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9584  // now loop over the obj elements, there must be at least one obj element
9585  *p = ch;
9586  while( *startObj++ == *ch) ch++;
9587  if( (ch - *p) == 4) foundObj = true;
9588  else { osilerror_wrapper( ch,osillineno,"there must be at least one <obj> element"); return false;}
9589  startObj -= 5;
9590  start = clock();
9591  while(foundObj){
9592  objmaxOrMinattON = false;
9593  objnameattON = false;
9594  objconstantattON = false;
9595  objweightattON = false;
9596  objmultattON = false;
9597  objnumberOfObjCoefattON = false;
9598  objmult = 1;
9599  // assume we are pointing to the first character after the r in <obj
9600  // it should be a space so let's increment ch
9601  ch++;
9602  while(*ch != '/' && *ch != '>'){
9603  switch (*ch) {
9604  case 'n':
9605  if( *(ch+1) == 'u'){
9606  *p = ch;
9607  while( *numberOfObjCoef++ == *ch) ch++;
9608  numberOfObjCoef -= 16;
9609  if( ( (ch - *p) != 15) ) { osilerror_wrapper( ch,osillineno,"error in objective numberOfObjCoef attribute"); return false;}
9610  else{
9611  if(objnumberOfObjCoefattON == true) { osilerror_wrapper( ch,osillineno,"too many obj numberOfObjCoef attributes"); return false;}
9612  objnumberOfObjCoefattON = true;
9614  osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef=atoimod1( osillineno,attText, attTextEnd);
9615  if(osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef > 0 && osinstance->instanceData->variables->numberOfVariables == 0){ osilerror_wrapper( ch,osillineno,"we have zero variables, but have objective function coefficients"); return false;}
9616  osinstance->instanceData->objectives->obj[objcount]->coef = new ObjCoef*[osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef];
9617  for(int i = 0; i < osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef; i++)osinstance->instanceData->objectives->obj[objcount]->coef[i] = new ObjCoef();
9618  delete [] attText;
9619  }
9620  }
9621  else{
9622  *p = ch;
9623  while( *name++ == *ch) ch++;
9624  name -= 5;
9625  if( ( (ch - *p) != 4) ) { osilerror_wrapper( ch,osillineno,"error in objective name attribute"); return false;}
9626  else{
9627  if(objnameattON == true) { osilerror_wrapper( ch,osillineno,"too many obj name attributes"); return false;}
9628  objnameattON = true;
9630  osinstance->instanceData->objectives->obj[objcount]->name=attText;
9631  delete [] attText;
9632  }
9633  }
9634  break;
9635  case 'c':
9636  *p = ch;
9637  while( *constant++ == *ch) ch++;
9638  constant -= 9;
9639  if( ( (ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in objective constant attribute"); return false;}
9640  else{
9641  if(objconstantattON == true) { osilerror_wrapper( ch,osillineno,"too many obj constant attributes"); return false;}
9642  objconstantattON = true;
9644  osinstance->instanceData->objectives->obj[objcount]->constant=atofmod1( osillineno,attText, attTextEnd);
9645  delete [] attText;
9646  }
9647  break;
9648  case 'w':
9649  *p = ch;
9650  while( *weight++ == *ch) ch++;
9651  weight -= 7;
9652  if( ( (ch - *p) != 6) ) { osilerror_wrapper( ch,osillineno,"error in objective weight attribute"); return false;}
9653  else{
9654  if(objweightattON == true) { osilerror_wrapper( ch,osillineno,"too many obj weight attributes"); return false;}
9655  objweightattON = true;
9657  osinstance->instanceData->objectives->obj[objcount]->weight=atofmod1( osillineno,attText, attTextEnd);
9658  delete [] attText;
9659  }
9660  break;
9661  case 'm':
9662  if(*(ch+1) == 'a'){
9663  *p = ch;
9664  while( *maxOrMin++ == *ch) ch++;
9665  maxOrMin -= 9;
9666  if( ( ( ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in objective maxOrMin attribute"); return false;}
9667  else{
9668  if(objmaxOrMinattON == true) { osilerror_wrapper( ch,osillineno,"too many obj maxOrMin attributes"); return false;}
9669  objmaxOrMinattON = true;
9671  if( (strcmp("max", attText) != 0 ) && (strcmp("min", attText) != 0 ) ){osilerror_wrapper( ch,osillineno,"maxOrMin attribute in objective must be a max or min"); return false;}
9672  osinstance->instanceData->objectives->obj[objcount]->maxOrMin = attText;
9673  delete [] attText;
9674  }
9675  }
9676  else{
9677  *p = ch;
9678  while( *mult++ == *ch) ch++;
9679  mult -= 5;
9680  if( ( (ch - *p) != 4) ) { osilerror_wrapper( ch,osillineno,"error in objective mult attribute"); return false;}
9681  else{
9682  if(objmultattON == true) { osilerror_wrapper( ch,osillineno,"too many obj mult attributes"); return false;}
9683  objmultattON = true;
9685  objmult = atoimod1( osillineno,attText, attTextEnd);
9686  delete [] attText;
9687  }
9688  }
9689  break;
9690  // come back and do multiplicity
9691  case ' ':
9692  break;
9693  case '\n':
9694  (*osillineno)++;
9695  break;
9696  case '\t':
9697  break;
9698  case '\r':
9699  break;
9700  default:
9701 
9702  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9703  return false;
9704  break;
9705  }
9706  ch++;
9707  }
9708  //
9709  // assume all the attributes have been processed
9710  // must have either /> or > and then whitespace and </obj whitespace>
9711  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <obj> element"); return false;}
9712  if(*ch == '/'){
9713  ch++;
9714  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <obj> element"); return false;}
9715  // get rid of whitespace
9716  ch++;
9717  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9718  // either have another <obj> element or foundObj = false;
9719  for(i = 0; startObj[i] == *ch; i++, ch++);
9720  if(i == 4) foundObj = true;
9721  else foundObj = false;
9722  }
9723  else{
9724  // the ch is the > at the end of the obj element
9725  // double check to make sure it really is a >
9726  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <obj> element"); return false;}
9727  // look for </obj
9728  // fist get rid of white space
9729  ch++;
9730  // first get the <coef> elements
9731  parseObjCoef(&ch, objcount, osinstance, osillineno);
9732  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9733  // we should be at </obj or there is an error
9734  for(i = 0; endObj[i] == *ch; i++, ch++);
9735  if(i != 5) { osilerror_wrapper( ch,osillineno,"</obj> element missing"); return false;}
9736  // burn off the whitespace
9737  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9738  // better have an > to end </obj
9739  if(*ch++ != '>'){ osilerror_wrapper( ch,osillineno,"</obj> element missing"); return false;}
9740  // look for a new <obj> element
9741  // get rid of whitespace
9742  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9743  // either have another <obj> element or foundObj = false;
9744  for(i = 0; startObj[i] == *ch; i++, ch++);
9745  if(i == 4) foundObj = true;
9746  else foundObj = false;
9747  }
9748  if( ((objcount+objmult) == numberOfObjectives) && (foundObj == true)) { osilerror_wrapper( ch,osillineno,"attribute numberOfObjectives is less than actual number found"); return false;}
9749  for (int k=1; k < objmult; k++)
9750  {
9751  osinstance->instanceData->objectives->obj[objcount+k]->name
9752  = osinstance->instanceData->objectives->obj[objcount]->name;
9753  osinstance->instanceData->objectives->obj[objcount+k]->maxOrMin
9754  = osinstance->instanceData->objectives->obj[objcount]->maxOrMin;
9755  osinstance->instanceData->objectives->obj[objcount+k]->constant
9756  = osinstance->instanceData->objectives->obj[objcount]->constant;
9757  osinstance->instanceData->objectives->obj[objcount+k]->weight
9758  = osinstance->instanceData->objectives->obj[objcount]->weight;
9759  osinstance->instanceData->objectives->obj[objcount+k]->numberOfObjCoef
9760  = osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef;
9761  if (osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef > 0)
9762  {
9763  osinstance->instanceData->objectives->obj[objcount+k]->coef = new ObjCoef*[osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef];
9764  for(int i = 0; i < osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef; i++)
9765  {
9766  osinstance->instanceData->objectives->obj[objcount+k]->coef[i] = new ObjCoef();
9767  osinstance->instanceData->objectives->obj[objcount+k]->coef[i]->idx =
9768  osinstance->instanceData->objectives->obj[objcount]->coef[i]->idx;
9769  osinstance->instanceData->objectives->obj[objcount+k]->coef[i]->value =
9770  osinstance->instanceData->objectives->obj[objcount]->coef[i]->value;
9771  }
9772  }
9773  }
9774  objcount += objmult;
9775  }
9776  if(objcount < numberOfObjectives) { osilerror_wrapper( ch,osillineno,"attribute numberOfObjectives is greater than actual number found"); return false;}
9777  ch -= i;
9778  // get the </objectives> tag
9779  for(i = 0; endObjectives[i] == *ch; i++, ch++);
9780  if(i != 12) { osilerror_wrapper( ch,osillineno, "cannot find </objectives> tag"); return false; }
9781  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9782  // better have >
9783  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </objectives> tag"); return false;}
9784  ch++;
9785  } // finish the (if numberOfObjectives > 0)
9786  else{
9787  // error if the number is negative
9788  if(numberOfObjectives < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of objectives"); return false;}
9789  // if we are here we have exactly 0 objectives
9790  // must close with /> or </objectives>
9791  // get rid of white space
9792  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9793  if( *ch == '/'){
9794  // better have a >
9795  ch++;
9796  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed objectives tag"); return false;}
9797  ch++;
9798  }
9799  else{
9800  // if we are here we must have an '>' and then </objectives> tag
9801  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed objectives tag"); return false;}
9802  ch++;
9803  // burn white space
9804  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9805  for(i = 0; endObjectives[i] == *ch; i++, ch++);
9806  if(i != 12) { osilerror_wrapper( ch,osillineno, "cannot find </objectives> tag"); return false; }
9807  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9808  // better have >
9809  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </objectives> tag"); return false;}
9810  ch++;
9811  }
9812  }
9813  finish = clock();
9814  #ifdef CHECK_PARSE_TIME
9815  duration = (double) (finish - start) / CLOCKS_PER_SEC;
9816  printf("TIME TO PARSE OBJECTIVES = %f\n", duration);
9817  #endif
9818  *p = ch;
9819  return true;
9820 }//end parseObjectives
9821 
9822 bool parseConstraints( const char **p, OSInstance *osinstance, int* osillineno){
9823  clock_t start, finish;
9824  #ifdef CHECK_PARSE_TIME
9825  double duration;
9826  #endif
9827  int ki, numChar;
9828  char *attTextEnd;
9829  const char *ch = *p;
9830  start = clock();
9831  const char *c_numberOfConstraints = "numberOfConstraints";
9832  const char *startConstraints = "<constraints";
9833  const char *endConstraints = "</constraints";
9834  const char *startCon = "<con";
9835  const char *endCon = "</con";
9836  // attributes
9837  char *attText = NULL;
9838  const char *name = "name";
9839  const char *constant = "constant";
9840  const char *mult = "mult";
9841  // others
9842  int i;
9843  int concount = 0;
9844  int numberOfConstraints = 0;
9845  // constraint attribute boolean variables
9846  bool conlbattON = false ;
9847  bool conubattON = false;
9848  bool connameattON = false;
9849  bool conconstantattON = false;
9850  bool conmultattON = false;
9851  bool foundCon = false;
9852  int conmult;
9853  //
9854  // start parsing -- ok not to have constraints
9855  // burn white space
9856  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9857  // if, present we should be pointing to <constraints element if there -- it is not required
9858  *p = ch;
9859  for(i = 0; startConstraints[i] == *ch; i++, ch++);
9860  while( *startConstraints++ == *ch) ch++;
9861  if( (ch - *p) != 12) {
9862  // *p is the correct value for the pointer
9863  return true;
9864  }
9865 
9866  osinstance->instanceData->constraints = new Constraints();
9867 
9868  // find numberOfConstraints attribute
9869  // eat the white space
9870  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9871  *p = ch;
9872  while( *c_numberOfConstraints++ == *ch) ch++;
9873  if( (ch - *p) != 19) { osilerror_wrapper( ch,osillineno,"incorrect numberOfConstraints attribute in <constraints> tag"); return false;}
9874  // ch should be pointing to the first character after numberOfConstraints
9876  ch++;
9877  numberOfConstraints = atoimod1( osillineno, attText, attTextEnd);
9878  delete [] attText;
9879  // key if
9880  //
9881  if(numberOfConstraints > 0){
9882  osinstance->instanceData->constraints->numberOfConstraints = numberOfConstraints;
9883  osinstance->instanceData->constraints->con = new Constraint*[ numberOfConstraints];
9884  for(i = 0; i < numberOfConstraints; i++){
9885  osinstance->instanceData->constraints->con[ i] = new Constraint();
9886  }
9887  // get rid of white space after the numberOfConstraints element
9888  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9889  // we better have an >
9890  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the constraints element does not have a proper closing"); return false;}
9891  // get rid of white space after the <constraints> element
9892  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
9893  // now loop over the con elements, there must be at least one con element
9894  *p = ch;
9895  while( *startCon++ == *ch) ch++;
9896  if( (ch - *p) == 4) foundCon = true;
9897  else { osilerror_wrapper( ch,osillineno,"there must be at least one <con> element"); return false;}
9898  startCon -= 5;
9899  while(foundCon){
9900  conlbattON = false ;
9901  conubattON = false;
9902  connameattON = false;
9903  conconstantattON = false;
9904  conmultattON = false;
9905  conmult = 1;
9906 
9907  // assume we are pointing to the first character after the n in <con
9908  // it should be a space so let's increment ch
9909  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9910  while(*ch != '/' && *ch != '>'){
9911  switch (*ch) {
9912  case 'n':
9913  *p = ch;
9914  while( *name++ == *ch) ch++;
9915  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in constraints name attribute"); return false;}
9916  if(connameattON == true) { osilerror_wrapper( ch,osillineno,"too many con name attributes"); return false;}
9917  name -= 5;
9918  connameattON = true;
9920  osinstance->instanceData->constraints->con[concount]->name=attText;
9921  delete [] attText;
9922  break;
9923  case 'c':
9924  *p = ch;
9925  while( *constant++ == *ch) ch++;
9926  if( ((ch - *p) != 8) ) { osilerror_wrapper( ch,osillineno,"error in constraint constant attribute"); return false;}
9927  if(conconstantattON == true) { osilerror_wrapper( ch,osillineno,"too many con constant attributes"); return false;}
9928  constant -= 9;
9929  conconstantattON = true;
9931  osinstance->instanceData->constraints->con[concount]->constant=atofmod1( osillineno,attText, attTextEnd);
9932  delete [] attText;
9933  break;
9934  case 'l':
9935  ch++;
9936  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in constraint lb attribute"); return false;}
9937  if(conlbattON == true) { osilerror_wrapper( ch,osillineno,"too many con lb attributes"); return false;}
9938  conlbattON = true;
9940  osinstance->instanceData->constraints->con[concount]->lb = atofmod1( osillineno,attText, attTextEnd);
9941  delete [] attText;
9942  break;
9943  case 'u':
9944  ch++;
9945  if(*ch++ != 'b') { osilerror_wrapper( ch,osillineno,"error in constraint ub attribute"); return false;}
9946  if(conubattON == true) { osilerror_wrapper( ch,osillineno,"too many con ub attributes"); return false;}
9947  conubattON = true;
9949  osinstance->instanceData->constraints->con[concount]->ub = atofmod1( osillineno,attText, attTextEnd);
9950  delete [] attText;
9951  break;
9952  case 'm':
9953  *p = ch;
9954  while( *mult++ == *ch) ch++;
9955  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in constraints mult attribute"); return false;}
9956  if(conmultattON == true) { osilerror_wrapper( ch,osillineno,"too many con mult attributes"); return false;}
9957  mult -= 5;
9958  conmultattON = true;
9960  conmult = atoimod1( osillineno,attText, attTextEnd);
9961  delete [] attText;
9962  break;
9963  case ' ':
9964  break;
9965  case '\n':
9966  (*osillineno)++;
9967  break;
9968  case '\t':
9969  break;
9970  case '\r':
9971  break;
9972  default:
9973  osilerror_wrapper( ch,osillineno,"invalid attribute character");
9974  return false;
9975  break;
9976  }
9977  ch++;
9978  }
9979  //
9980  // assume all the attributes have been processed
9981  // must have either /> or > and then whitespace and </con whitespace>
9982  if( *ch != '/' && *ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <con> element"); return false;}
9983  if(*ch == '/'){
9984  ch++;
9985  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"incorrect end of <con> element"); return false;}
9986  // get rid of whitespace
9987  ch++;
9988  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
9989  // either have another <con> element or foundCon = false;
9990  *p = ch;
9991  while( *startCon++ == *ch) ch++;
9992  if( (ch - *p) == 4){
9993  foundCon = true;
9994  startCon -= 5;
9995  }
9996  else{
9997  foundCon = false;
9998  ch = *p;
9999  }
10000  }
10001  else{
10002  // the ch is the > at the end of the con element
10003  // double check to make sure it really is a >
10004  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improper ending to a <con> element"); return false;}
10005  // look for </con
10006  // fist get rid of white space
10007  ch++;
10008  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10009  // we should be at </con or there is an error
10010  *p = ch;
10011  while( *endCon++ == *ch) ch++;
10012  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"</con> element missing"); return false;}
10013  endCon -= 6;
10014  // burn off the whitespace
10015  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10016  // better have an > to end </con
10017  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"</con> element missing >"); return false;}
10018  // look for a new <con> element
10019  // get rid of whitespace
10020  ch++;
10021  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10022  // either have another <con> element or foundVar = false;
10023  *p = ch;
10024  while( *startCon++ == *ch) ch++;
10025  if( (ch - *p) == 4){
10026  foundCon = true;
10027  startCon -= 5;
10028  }
10029  else{
10030  foundCon = false;
10031  ch = *p;
10032  }
10033  }
10034  if( ((concount+conmult) == numberOfConstraints) && (foundCon == true) ) { osilerror_wrapper( ch,osillineno,"attribute numberOfConstraints is less than actual number found"); return false;}
10035  for (int k=1; k < conmult; k++)
10036  {
10037  osinstance->instanceData->constraints->con[concount+k]->name
10038  = osinstance->instanceData->constraints->con[concount]->name ;
10039  osinstance->instanceData->constraints->con[concount+k]->constant
10040  = osinstance->instanceData->constraints->con[concount]->constant ;
10041  osinstance->instanceData->constraints->con[concount+k]->lb
10042  = osinstance->instanceData->constraints->con[concount]->lb ;
10043  osinstance->instanceData->constraints->con[concount+k]->ub
10044  = osinstance->instanceData->constraints->con[concount]->ub ;
10045  }
10046  concount += conmult;
10047  }
10048  if(concount < numberOfConstraints) { osilerror_wrapper( ch,osillineno,"attribute numberOfConstraints is greater than actual number found"); return false;}
10049  // get the </constraints> tag
10050  *p = ch;
10051  while( *endConstraints++ == *ch) ch++;
10052  if( (ch - *p) != 13) { osilerror_wrapper( ch,osillineno, "cannot find </constraints> tag"); return false;}
10053  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10054  // better have >
10055  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </constraints> tag"); return false;}
10056  ch++;
10057  }// end if(numberOfConstraints > 0)
10058  else{
10059  // error if the number is negative
10060  if(numberOfConstraints < 0) { osilerror_wrapper( ch,osillineno,"cannot have a negative number of constraints"); return false;}
10061  // if we are here we have numberOfConstraints = 0
10062  // must close with /> or </constraints>
10063  // get rid of white space
10064  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10065  if( *ch == '/'){
10066  // better have a >
10067  ch++;
10068  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed constraints tag"); return false;}
10069  ch++;
10070  }
10071  else{
10072  // if we are here we must have an '>' and then </constraints> tag
10073  if( *ch != '>') { osilerror_wrapper( ch,osillineno,"improperly closed constraints tag"); return false;}
10074  ch++;
10075  // burn white space
10076  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10077  *p = ch;
10078  while( *endConstraints++ == *ch) ch++;
10079  if( (ch - *p) != 13) { osilerror_wrapper( ch,osillineno, "cannot find </constraints> tag"); return false; }
10080  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10081  // better have >
10082  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </constraints> tag"); return false;}
10083  ch++;
10084  }
10085  }
10086  finish = clock();
10087  #ifdef CHECK_PARSE_TIME
10088  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10089  printf("TIME TO PARSE CONSTRAINTS = %f\n", duration);
10090  #endif
10091  *p = ch;
10092  return true;
10093 }//end parseConstraints
10094 
10095 bool parseLinearConstraintCoefficients( const char **p, OSInstance *osinstance, int* osillineno){;
10096  int ki, numChar;
10097  char *attTextEnd;
10098  const char *ch = *p;
10099  const char *c_numberOfValues = "numberOfValues";
10100  const char *startlinearConstraintCoefficients = "<linearConstraintCoefficients";
10101  const char *endlinearConstraintCoefficients = "</linearConstraintCoefficients";
10102  // attributes
10103  char *attText = NULL;
10104  // others
10105  int numberOfValues;
10106  // start parsing
10107  // burn white space
10108  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10109  // if, present we should be pointing to <linearConstraintCoefficients element if there -- it is not required
10110  *p = ch;
10111  while( *startlinearConstraintCoefficients++ == *ch) ch++;
10112  if( (ch - *p) != 29) {
10113  //reset ch
10114  ch = *p;
10115  return true;
10116  }
10117 
10119 
10120  // find numberOfValues attribute
10121  // eat the white space
10122  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10123  *p = ch;
10124  while( *c_numberOfValues++ == *ch) ch++;
10125  if( (ch - *p) != 14) { osilerror_wrapper( ch,osillineno,"incorrect numberOfValues attribute in <linearConstraintCoefficients> tag"); return false;}
10126  // ch should be pointing to the first character after numberOfValues
10128  ch++;
10129  numberOfValues = atoimod1( osillineno, attText, attTextEnd);
10130  if(numberOfValues > 0 && osinstance->instanceData->variables->numberOfVariables == 0){ osilerror_wrapper( ch,osillineno,"we have zero variables, but A matrix coefficients"); return false;}
10131  delete [] attText;
10132  if(numberOfValues <= 0) { osilerror_wrapper( ch,osillineno,"the number of nonlinear nonzeros must be positive"); return false;}
10133  osinstance->instanceData->linearConstraintCoefficients->numberOfValues = numberOfValues;
10134  // get rid of white space after the numberOfConstraints element
10135  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10136  // we should have either an /> OR an >
10137  if(*ch == '/'){
10138  ch++;
10139  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the linearConstraintCoefficients element does not have a proper closing"); return false;}
10140  else{
10141  if(numberOfValues > 0) { osilerror_wrapper( ch,osillineno,"numberOfValues positive, but there are no values"); return false;}
10142  return false;
10143  }
10144  }
10145  // we better have an >
10146  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"the <linearConstraintCoefficients> element does not have a proper closing"); return false;}
10147  // get rid of white space after the <linearConstraintCoefficients> element
10148  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10149  if( parseStart( &ch, osinstance, osillineno) != true) {osilerror_wrapper( ch,osillineno,"error processing <start> element"); return false;}
10150 // if( (parseColIdx( &ch, osinstance, osillineno) != true) && (parseRowIdx( &ch, osinstance, osillineno) != true)) return false;
10151 // if( (parseColIdx( &ch, osinstance, osillineno) == true) && (parseRowIdx( &ch, osinstance, osillineno) == true)) {osilerror_wrapper( ch,osillineno,"cannot store by both row and column"); return false;}
10152 
10153  if( parseColIdx( &ch, osinstance, osillineno) == true) // <colIdx> is found as first element
10154  {
10155  if( parseRowIdx( &ch, osinstance, osillineno) == true) //also have <rowIdx> --- can't happen
10156  {
10157  osilerror_wrapper( ch,osillineno,"cannot store by both row and column");
10158  return false;
10159  }
10160  }
10161  else //<colIdx> is not the first element
10162  {
10163  if( parseRowIdx( &ch, osinstance, osillineno) != true) // neither <rowIdx> nor <colIdx> is present
10164  {
10165  osilerror_wrapper( ch,osillineno,"must have either RowIdx or ColIdx");
10166  return false;
10167  }
10168  else //<rowIdx> is found as first element
10169  {
10170  if ( parseColIdx( &ch, osinstance, osillineno) == true ) //also have <colIdx> --- can't happen
10171  {
10172  osilerror_wrapper( ch,osillineno,"cannot store by both row and column");
10173  return false;
10174  }
10175  }
10176  }
10177 
10178  if( parseValue( &ch, osinstance, osillineno) != true) {osilerror_wrapper( ch,osillineno, "could not parse <value> element"); return false;}
10179  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10180  // get the </linearConstraintCoefficients> tag
10181  *p = ch;
10182  while( *endlinearConstraintCoefficients++ == *ch) ch++;
10183  if( (ch - *p) != 30) { osilerror_wrapper( ch,osillineno, "cannot find </linearConstraintCoefficients> tag"); return false;}
10184  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10185  // better have >
10186  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </linearConstraintCoefficients> tag"); return false;}
10187  ch++;
10188  *p = ch;
10189  return true;
10190 }//end parseLinearConstraintCoefficients
10191 
10192 bool parseStart(const char **p, OSInstance *osinstance, int* osillineno){
10193  clock_t start, finish;
10194  #ifdef CHECK_PARSE_TIME
10195  double duration;
10196  #endif
10197  int ki, numChar;
10198  char *attTextEnd;
10199  const char *ch = *p;
10200  start = clock();
10201  const char* startStart = "<start";
10202  const char* endStart = "</start";
10203  const char* startEl = "<el";
10204  const char* endEl = "</el";
10205  // attributes
10206  char *attText = NULL;
10207  const char *incr = "incr";
10208  const char *mult = "mult";
10209  int kount = 0;
10210  int i;
10211  // element attribute boolean variables
10212  bool elmultattON = false ;
10213  bool elincrattON = false;
10214  bool foundEl = false;
10215  int elmult;
10216  int elincr;
10217  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10218  // if, present we should be pointing to <start element
10219  *p = ch;
10220  while( *startStart++ == *ch) ch++;
10221  if( (ch - *p) != 6) {
10222  //reset ch
10223  ch = *p;
10224  return false;
10225  }
10226  // get rid of white space after <start
10227  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10228  // we should have either an >
10229  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <start> element"); return false;}
10230  ch++;
10231  // get rid of white space
10232  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10233  // look for an <el> -- if none present must have b64 data
10234  *p = ch;
10235  while( *startEl++ == *ch) ch++;
10236  startEl -= 4;
10237  if( (ch - *p) != 3) {
10238  //reset ch
10239  ch = *p;
10240  // call base64 parse here
10241  int dataSize = 0;
10242  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10243  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<start> must have children or base64 data"); return false;}
10244  std::string base64decodeddata = Base64::decodeb64( b64string );
10245  int base64decodeddatalength = base64decodeddata.length();
10246  int *intvec = NULL;
10247  osinstance->instanceData->linearConstraintCoefficients->start->el = new int[(base64decodeddatalength/dataSize) ];
10248  intvec = (int*)&base64decodeddata[0];
10249  for (i = 0; i < (base64decodeddatalength/dataSize); i++){
10250  osinstance->instanceData->linearConstraintCoefficients->start->el[ i] = *(intvec++);
10251  }
10252  delete [] b64string;
10253  }
10254  else{
10255  foundEl = true;
10257  new int[ std::max( osinstance->instanceData->constraints->numberOfConstraints,
10258  osinstance->instanceData->variables->numberOfVariables) + 1];
10259  while(foundEl){
10260 
10261  elmultattON = false ;
10262  elincrattON = false;
10263  elmult = 1;
10264  elincr = 0;
10265 
10266  // assume we are pointing to the first character after the l in <el
10267  // it should be a space so let's increment ch
10268  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10269  while(*ch != '/' && *ch != '>'){
10270  switch (*ch) {
10271  case 'i':
10272  *p = ch;
10273  while( *incr++ == *ch) ch++;
10274  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in starts incr attribute"); return false;}
10275  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10276  incr -= 5;
10277  elincrattON = true;
10279  elincr = atoimod1( osillineno,attText, attTextEnd);
10280  delete [] attText;
10281  break;
10282  case 'm':
10283  *p = ch;
10284  while( *mult++ == *ch) ch++;
10285  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in starts mult attribute"); return false;}
10286  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10287  mult -= 5;
10288  elmultattON = true;
10290  elmult = atoimod1( osillineno,attText, attTextEnd);
10291  delete [] attText;
10292  break;
10293  case ' ':
10294  break;
10295  case '\n':
10296  (*osillineno)++;
10297  break;
10298  case '\t':
10299  break;
10300  case '\r':
10301  break;
10302  default:
10303  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10304  return false;
10305  break;
10306  }
10307  ch++;
10308  }
10309 
10310  // start eating white space until an '>' is found,
10311  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10312  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10313  // eat white space again,
10314  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10315  // okay we better have a number, we will check later
10316  *p = ch;
10317  // find the end of the number, it better be an </el>
10318  // find </el
10319  while( *ch != '<' && *ch != EOF){
10320  ch++;
10321  }
10322  // we better have a <, or not valid
10323  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10324 
10325  // we better not exceed allocation
10326  if(kount +elmult > std::max(osinstance->instanceData->constraints->numberOfConstraints,
10327  osinstance->instanceData->variables->numberOfVariables) + 1 )
10328  {
10329  osilerror_wrapper( ch, osillineno,"number of start elements exceeds the maximum number of rows or columns plus 1");
10330  }
10331  osinstance->instanceData->linearConstraintCoefficients->start->el[kount] = atoimod1( osillineno, *p, ch);
10332  for (int k=1; k < elmult; k++)
10333  {
10334  osinstance->instanceData->linearConstraintCoefficients->start->el[ kount+k]
10335  = osinstance->instanceData->linearConstraintCoefficients->start->el[ kount] + k*elincr;
10336  }
10337  kount += elmult;
10338  // we are pointing to <, make sure there is /el
10339  *p = ch;
10340  while( *endEl++ == *ch) ch++;
10341  endEl -= 5;
10342  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10343  // start eating white space until an '>' is found for </el>,
10344  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10345  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10346  // eat white space again,
10347  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10348  // either have another <el> element or foundEl = false;
10349  *p = ch;
10350  while( *startEl++ == *ch) ch++;
10351  if( (ch - *p) == 3){
10352  foundEl = true;
10353  startEl -= 4;
10354  }
10355  else{
10356  foundEl = false;
10357  ch = *p;
10358  }
10359  }
10360 
10361  if(osinstance->instanceData->linearConstraintCoefficients->start->el[ kount - 1 ] !=
10363  osilerror_wrapper( ch, osillineno,"the value of the last start element is not equal to numberOfValues");
10364  }
10365  // get the </start> tag
10366  *p = ch;
10367  while( *endStart++ == *ch) ch++;
10368  if( (ch - *p) != 7) { osilerror_wrapper( ch,osillineno, "cannot find </start> tag"); return false;}
10369  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10370  // better have >
10371  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </start> tag"); return false;}
10372  ch++;
10373  // get the end element
10374  finish = clock();
10375  #ifdef CHECK_PARSE_TIME
10376  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10377  printf("TIME TO PARSE STARTS = %f\n", duration);
10378  #endif
10379  *p = ch;
10381 
10382  return true;
10383 }//end parseStart
10384 
10385 bool parseRowIdx( const char **p, OSInstance *osinstance, int* osillineno){
10386  clock_t start, finish;
10387  #ifdef CHECK_PARSE_TIME
10388  double duration;
10389  #endif
10390  int ki, numChar;
10391  char *attTextEnd;
10392  const char *ch = *p;
10393  start = clock();
10394  const char* startRowIdx = "<rowIdx";
10395  const char* endRowIdx = "</rowIdx";
10396  const char* startEl = "<el";
10397  const char* endEl = "</el";
10398  // attributes
10399  char *attText = NULL;
10400  const char *incr = "incr";
10401  const char *mult = "mult";
10402  int kount = 0;
10403  int i;
10404  // element attribute boolean variables
10405  bool elmultattON = false ;
10406  bool elincrattON = false;
10407  bool foundEl = false;
10408  int elmult;
10409  int elincr;
10410  int numberOfEl;
10411 
10412  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10413  // if, present we should be pointing to <rowIdx element
10414  *p = ch;
10415  while( *startRowIdx++ == *ch) ch++;
10416  if( (ch - *p) != 7) {
10417  //reset ch
10418  ch = *p;
10419  return false;
10420  }
10421  // get rid of white space after <rowIdx
10422  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10423  // we should have either an >
10424  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <rowIdx> element"); return false;}
10425  ch++;
10426  // get rid of white space
10427  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10428  // look for an <el> -- if none present must have b64 data
10429  *p = ch;
10430  while( *startEl++ == *ch) ch++;
10431  startEl -= 4;
10432  if( (ch - *p) != 3) {
10433  //reset ch
10434  ch = *p;
10435  // call base64 parse here
10436  int dataSize = 0;
10437  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10438  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<rowIdx> must have children or base64 data"); return false;}
10439  std::string base64decodeddata = Base64::decodeb64( b64string );
10440  int base64decodeddatalength = base64decodeddata.length();
10441  int *intvec = NULL;
10442  numberOfEl = (base64decodeddatalength/dataSize);
10443  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = new int[numberOfEl ];
10444  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = NULL;
10445  osinstance->instanceData->linearConstraintCoefficients->rowIdx->numberOfEl = numberOfEl;
10448  intvec = (int*)&base64decodeddata[0];
10449  for(i = 0; i < numberOfEl; i++){
10450  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ i] = *(intvec++);
10451  kount++;
10452  }
10453  delete [] b64string;
10454  }
10455  else{
10456  foundEl = true;
10457  // if we are here we are storing the problem by column
10458  // this means the number of start elements must equal the number of columns + 1
10460  osilerror_wrapper( ch, osillineno,"we are storing in column major format, but number of start elements not equal number of variables + 1");
10462  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = NULL;
10466  while(foundEl){
10467 
10468  elmultattON = false ;
10469  elincrattON = false;
10470  elmult = 1;
10471  elincr = 0;
10472 
10473  // assume we are pointing to the first character after the l in <el
10474  // it should be a space so let's increment ch
10475  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10476  while(*ch != '/' && *ch != '>'){
10477  switch (*ch) {
10478  case 'i':
10479  *p = ch;
10480  while( *incr++ == *ch) ch++;
10481  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in rowIdx incr attribute"); return false;}
10482  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10483  incr -= 5;
10484  elincrattON = true;
10486  elincr = atoimod1( osillineno,attText, attTextEnd);
10487  delete [] attText;
10488  break;
10489  case 'm':
10490  *p = ch;
10491  while( *mult++ == *ch) ch++;
10492  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in rowIdx mult attribute"); return false;}
10493  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10494  mult -= 5;
10495  elmultattON = true;
10497  elmult = atoimod1( osillineno,attText, attTextEnd);
10498  delete [] attText;
10499  break;
10500  case ' ':
10501  break;
10502  case '\n':
10503  (*osillineno)++;
10504  break;
10505  case '\t':
10506  break;
10507  case '\r':
10508  break;
10509  default:
10510  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10511  return false;
10512  break;
10513  }
10514  ch++;
10515  }
10516 
10517  // start munging white space until an '>' is found,
10518  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10519  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10520  // mung white space again,
10521  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10522  // okay we better have a number, we will check later
10523  *p = ch;
10524  // find the end of the number, it better be an </el>
10525  // find </el
10526  while( *ch != '<' && *ch != EOF){
10527  ch++;
10528  }
10529  // we better have a <, or not valid
10530  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10531 
10532  // we better not exceed allocation
10533  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10534  {
10535  osilerror_wrapper( ch, osillineno,"number of rowIdx elements exceeds the number declared");
10536  }
10537  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount] = atoimod1( osillineno, *p, ch);
10538  for (int k=1; k < elmult; k++)
10539  {
10540  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount+k]
10541  = osinstance->instanceData->linearConstraintCoefficients->rowIdx->el[ kount] + k*elincr;
10542  }
10543  kount += elmult;
10544  // we are pointing to <, make sure there is /el
10545  *p = ch;
10546  while( *endEl++ == *ch) ch++;
10547  endEl -= 5;
10548  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10549  // start munging white space until an '>' is found for </el>,
10550  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10551  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10552  // eat white space again,
10553  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10554  // either have another <el> element or foundEl = false;
10555  *p = ch;
10556  while( *startEl++ == *ch) ch++;
10557  if( (ch - *p) == 3){
10558  foundEl = true;
10559  startEl -= 4;
10560  }
10561  else{
10562  foundEl = false;
10563  ch = *p;
10564  }
10565  }
10566  }
10567  // get the </rowIdx> tag
10568  *p = ch;
10569  while( *endRowIdx++ == *ch) ch++;
10570  if( (ch - *p) != 8) { osilerror_wrapper( ch,osillineno, "cannot find </rowIdx> tag"); return false;}
10571  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10572  // better have >
10573  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </rowIdx> tag");}
10574  ch++;
10575  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute less than number of row indices found"); return false;}
10576  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute greater than number of row indices found"); return false;}
10577  finish = clock();
10578  #ifdef CHECK_PARSE_TIME
10579  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10580  printf("TIME TO PARSE ROW INDEXES = %f\n", duration);
10581  #endif
10582  *p = ch;
10583  return true;
10584 }//end parseRowIdx
10585 
10586 
10587 bool parseColIdx( const char **p, OSInstance *osinstance, int* osillineno){
10588  clock_t start, finish;
10589  #ifdef CHECK_PARSE_TIME
10590  double duration;
10591  #endif
10592  int ki, numChar;
10593  char *attTextEnd;
10594  const char *ch = *p;
10595  start = clock();
10596  const char* startColIdx = "<colIdx";
10597  const char* endColIdx = "</colIdx";
10598  const char* startEl = "<el";
10599  const char* endEl = "</el";
10600  // attributes
10601  char *attText = NULL;
10602  const char *incr = "incr";
10603  const char *mult = "mult";
10604  int kount = 0;
10605  int i;
10606  // element attribute boolean variables
10607  bool elmultattON = false ;
10608  bool elincrattON = false;
10609  bool foundEl = false;
10610  int elmult;
10611  int elincr;
10612  int numberOfEl;
10613 
10614  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10615  // if, present we should be pointing to <colIdx element
10616  *p = ch;
10617  while( *startColIdx++ == *ch) ch++;
10618  if( (ch - *p) != 7) {
10619  //reset ch
10620  ch = *p;
10621  return false;
10622  }
10623  // get rid of white space after <colIdx
10624  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10625  // we should have either an >
10626  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <colIdx> element"); return false;}
10627  ch++;
10628  // get rid of white space
10629  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10630  // look for an <el> -- if none present must have b64 data
10631  *p = ch;
10632  while( *startEl++ == *ch) ch++;
10633  startEl -= 4;
10634  if( (ch - *p) != 3) {
10635  //reset ch
10636  ch = *p;
10637  // call base64 parse here
10638  int dataSize = 0;
10639  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10640  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<colIdx> must have children or base64 data"); return false;}
10641  std::string base64decodeddata = Base64::decodeb64( b64string );
10642  int base64decodeddatalength = base64decodeddata.length();
10643  int *intvec = NULL;
10644  numberOfEl = (base64decodeddatalength/dataSize);
10645  osinstance->instanceData->linearConstraintCoefficients->colIdx->el = new int[numberOfEl ];
10646  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = NULL;
10647  osinstance->instanceData->linearConstraintCoefficients->colIdx->numberOfEl = numberOfEl;
10650  intvec = (int*)&base64decodeddata[0];
10651  for(i = 0; i < numberOfEl; i++){
10652  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ i] = *(intvec++);
10653  kount++;
10654  }
10655  delete [] b64string;
10656  }
10657  else{
10658  foundEl = true;
10659  // if we are here we are storing the problem by row
10660  // this means the number of start elements must equal the number of rows
10662  osilerror_wrapper( ch, osillineno,"we are storing in row major format, but number of start elements not equal number of rows + 1");
10664  osinstance->instanceData->linearConstraintCoefficients->rowIdx->el = NULL;
10668  while(foundEl){
10669 
10670  elmultattON = false ;
10671  elincrattON = false;
10672  elmult = 1;
10673  elincr = 0;
10674 
10675  // assume we are pointing to the first character after the l in <el
10676  // it should be a space so let's increment ch
10677  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10678  while(*ch != '/' && *ch != '>'){
10679  switch (*ch) {
10680  case 'i':
10681  *p = ch;
10682  while( *incr++ == *ch) ch++;
10683  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in colIdx incr attribute"); return false;}
10684  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10685  incr -= 5;
10686  elincrattON = true;
10688  elincr = atoimod1( osillineno,attText, attTextEnd);
10689  delete [] attText;
10690  break;
10691  case 'm':
10692  *p = ch;
10693  while( *mult++ == *ch) ch++;
10694  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in colIdx mult attribute"); return false;}
10695  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10696  mult -= 5;
10697  elmultattON = true;
10699  elmult = atoimod1( osillineno,attText, attTextEnd);
10700  delete [] attText;
10701  break;
10702  case ' ':
10703  break;
10704  case '\n':
10705  (*osillineno)++;
10706  break;
10707  case '\t':
10708  break;
10709  case '\r':
10710  break;
10711  default:
10712  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10713  return false;
10714  break;
10715  }
10716  ch++;
10717  }
10718 
10719  // start eating white space until an '>' is found,
10720  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10721  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10722  // eat white space again,
10723  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
10724  // okay we better have a number, we will check later
10725  *p = ch;
10726  // find the end of the number, it better be an </el>
10727  // find </el
10728  while( *ch != '<' && *ch != EOF){
10729  ch++;
10730  }
10731  // we better have a <, or not valid
10732  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10733  // we better not exceed allocation
10734  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10735  {
10736  osilerror_wrapper( ch, osillineno,"number of colIdx elements exceeds the number declared");
10737  }
10738  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount] = atoimod1( osillineno, *p, ch);
10739  for (int k=1; k < elmult; k++)
10740  {
10741  osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount+k]
10742  = osinstance->instanceData->linearConstraintCoefficients->colIdx->el[ kount] + k*elincr;
10743  }
10744  kount += elmult;
10745  // we are pointing to <, make sure there is /el
10746  *p = ch;
10747  while( *endEl++ == *ch) ch++;
10748  endEl -= 5;
10749  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10750  // start eating white space until an '>' is found for </el>,
10751  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10752  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10753  // eat white space again,
10754  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10755  // either have another <el> element or foundEl = false;
10756  *p = ch;
10757  while( *startEl++ == *ch) ch++;
10758  if( (ch - *p) == 3){
10759  foundEl = true;
10760  startEl -= 4;
10761  }
10762  else{
10763  foundEl = false;
10764  ch = *p;
10765  }
10766  }
10767  }
10768  // get the </colIdx> tag
10769  *p = ch;
10770  while( *endColIdx++ == *ch) ch++;
10771  if( (ch - *p) != 8) { osilerror_wrapper( ch,osillineno, "cannot find </colIdx> tag"); return false;}
10772  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10773  // better have >
10774  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </colIdx> tag"); return false;}
10775  ch++;
10776  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute less than number of column indices found"); return false;}
10777  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues) { osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients attribute greater than number of column indices found"); return false;}
10778  finish = clock();
10779  #ifdef CHECK_PARSE_TIME
10780  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10781  printf("TIME TO PARSE COLUMN INDEXES = %f\n", duration);
10782  #endif
10783  *p = ch;
10784  return true;
10785 }//end parseColIdx
10786 
10787 
10788 bool parseValue( const char **p, OSInstance *osinstance, int* osillineno){
10789  clock_t start, finish;
10790  #ifdef CHECK_PARSE_TIME
10791  double duration;
10792  #endif
10793  int ki, numChar;
10794  char *attTextEnd;
10795  const char *ch = *p;
10796  start = clock();
10797  const char* startValue = "<value";
10798  const char* endValue = "</value";
10799  const char* startEl = "<el";
10800  const char* endEl = "</el";
10801  // attributes
10802  char *attText = NULL;
10803  const char *incr = "incr";
10804  const char *mult = "mult";
10805  int kount = 0;
10806  int i;
10807  // element attribute boolean variables
10808  bool elmultattON = false ;
10809  bool elincrattON = false;
10810  bool foundEl = false;
10811  int elmult;
10812  double elincr;
10813  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10814  // if present we should be pointing to <value element
10815  *p = ch;
10816  while( *startValue++ == *ch) ch++;
10817  if( (ch - *p) != 6) {
10818  //reset ch
10819  ch = *p;
10820  return false;
10821  }
10822  // get rid of white space after <value
10823  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10824  // we should have either an >
10825  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <value> element"); return false;}
10826  ch++;
10827  // get rid of white space
10828  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10829  // look for an <el> -- if none present must have b64 data
10830  *p = ch;
10831  while( *startEl++ == *ch) ch++;
10832  startEl -= 4;
10833  if( (ch - *p) != 3) {
10834  //reset ch
10835  ch = *p;
10836  // call base64 parse here
10837  int dataSize = 0;
10838  char* b64string = parseBase64(&ch, &dataSize, osillineno );
10839  if( b64string == NULL) { osilerror_wrapper( ch,osillineno,"<start> must have children or base64 data"); return false;};
10840  std::string base64decodeddata = Base64::decodeb64( b64string );
10841  int base64decodeddatalength = base64decodeddata.length();
10842  osinstance->instanceData->linearConstraintCoefficients->value->el = new double[(base64decodeddatalength/dataSize) ];
10843  int kountChar = 0;
10844  int kj;
10845  /* Take care of Lou's memory alignment problem */
10846  /* dataSize had better equal sizeof( double) or we need to abandon ship */
10847  if( sizeof( double) != dataSize ) {
10848  osilerror_wrapper( ch, osillineno,
10849  "base 64 encoded with a size of double different than on this machine");
10850  return false;
10851  }
10852  union doubleBuffer{
10853  char memAlign[sizeof(double)];
10854  double dble;
10855  };
10856  doubleBuffer dbuf;
10857  for(i = 0; i < (base64decodeddatalength/dataSize); i++){
10858  for(kj = 0; kj < dataSize; kj++){
10859  dbuf.memAlign[ kj] = base64decodeddata[kountChar];
10860  kountChar++;
10861  }
10862  osinstance->instanceData->linearConstraintCoefficients->value->el[ i] = dbuf.dble;
10863  //std::cout << dbuf.dble << std::endl;
10864  kount++;
10865  }
10866  delete [] b64string;
10867  }
10868  else{
10869  foundEl = true;
10871  new double[ osinstance->instanceData->linearConstraintCoefficients->numberOfValues];
10872  while( foundEl){
10873 
10874  elmultattON = false ;
10875  elincrattON = false;
10876  elmult = 1;
10877  elincr = 0;
10878 
10879  // assume we are pointing to the first character after the l in <el
10880  // it should be a space so let's increment ch
10881  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ );
10882  while(*ch != '/' && *ch != '>'){
10883  switch (*ch) {
10884  case 'i':
10885  *p = ch;
10886  while( *incr++ == *ch) ch++;
10887  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in values incr attribute"); return false;}
10888  if(elincrattON == true) { osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
10889  incr -= 5;
10890  elincrattON = true;
10892  elincr = atofmod1( osillineno,attText, attTextEnd);
10893  delete [] attText;
10894  break;
10895  case 'm':
10896  *p = ch;
10897  while( *mult++ == *ch) ch++;
10898  if( (ch - *p) != 4) { osilerror_wrapper( ch,osillineno,"error in values mult attribute"); return false;}
10899  if(elmultattON == true) { osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
10900  mult -= 5;
10901  elmultattON = true;
10903  elmult = atoimod1( osillineno,attText, attTextEnd);
10904  delete [] attText;
10905  break;
10906  case ' ':
10907  break;
10908  case '\n':
10909  (*osillineno)++;
10910  break;
10911  case '\t':
10912  break;
10913  case '\r':
10914  break;
10915  default:
10916  osilerror_wrapper( ch,osillineno,"invalid attribute character");
10917  return false;
10918  break;
10919  }
10920  ch++;
10921  }
10922 
10923  // start eat white space until an '>' is found,
10924  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10925  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed <el> tag"); return false;}
10926  // eat white space again,
10927  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ ) ;
10928  *p = ch;
10929  // find the end of the number, it better be an </el>
10930  // find the < which begins the </el
10931  while( *ch != '<' && *ch != EOF){
10932  ch++;
10933  }
10934  // we better have a <, or not valid
10935  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10936  // we better not exceed allocation
10937  if(kount + elmult > osinstance->instanceData->linearConstraintCoefficients->numberOfValues)
10938  {
10939  osilerror_wrapper( ch, osillineno,"number of nonzero elements exceeds the number declared");
10940  }
10941  osinstance->instanceData->linearConstraintCoefficients->value->el[ kount] = atofmod1( osillineno, *p, ch);
10942  for (int k=1; k < elmult; k++)
10943  {
10944  osinstance->instanceData->linearConstraintCoefficients->value->el[ kount+k]
10945  = osinstance->instanceData->linearConstraintCoefficients->value->el[ kount] + k*elincr;
10946  }
10947  kount += elmult;
10948  // we are pointing to <, make sure there is /el
10949  *p = ch;
10950  while( *endEl++ == *ch) ch++;
10951  endEl -= 5;
10952  if( (ch - *p) != 4 ) { osilerror_wrapper( ch,osillineno,"cannot find an </el>"); return false;}
10953  // start eating white space until an '>' is found for </el>,
10954  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10955  if( *ch++ != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </el> tag"); return false;}
10956  // eat white space again,
10957  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10958  // either have another <el> element or foundEl = false;
10959  *p = ch;
10960  while( *startEl++ == *ch) ch++;
10961  if( (ch - *p) == 3){
10962  foundEl = true;
10963  startEl -= 4;
10964  }
10965  else{
10966  foundEl = false;
10967  ch = *p;
10968  }
10969  }
10970  }
10972 
10973  // get the </value> tag
10974  *p = ch;
10975  while( *endValue++ == *ch) ch++;
10976  if( (ch - *p) != 7) { osilerror_wrapper( ch,osillineno, "cannot find </value> tag"); return false;}
10977  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno) ; ch++ );
10978  // better have >
10979  if(*ch != '>') { osilerror_wrapper( ch,osillineno,"improperly formed </value> tag"); return false;}
10980  ch++;
10981  if(kount < osinstance->instanceData->linearConstraintCoefficients->numberOfValues){ osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients greater than number of values found"); return false;}
10982  if(kount > osinstance->instanceData->linearConstraintCoefficients->numberOfValues){ osilerror_wrapper( ch,osillineno,"numberOfLinearCoefficients less than the number of values found"); return false;}
10983  finish = clock();
10984  #ifdef CHECK_PARSE_TIME
10985  duration = (double) (finish - start) / CLOCKS_PER_SEC;
10986  printf("TIME TO PARSE VALUES = %f\n", duration);
10987  #endif
10988  *p = ch;
10989  return true;
10990 }//end parseValue
10991 
10992 bool parseObjCoef( const char **p, int objcount, OSInstance *osinstance, int* osillineno){
10993  int ki, numChar;
10994  char *attTextEnd;
10995  const char *ch = *p;
10996  const char* startCoef = "<coef";
10997  const char* endCoef = "</coef";
10998  const char* c_idx = "idx";
10999  char *attText = NULL;
11000  int k;
11001  int numberOfObjCoef = 0;
11002  if( osinstance->instanceData->objectives->numberOfObjectives <= 0) { osilerror_wrapper( ch,osillineno,"we can't have objective function coefficients without an objective function"); return false;}
11003  numberOfObjCoef = osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef;
11004  if(numberOfObjCoef > 0) {
11005  for(k = 0; k < numberOfObjCoef; k++){
11006  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11007  // if, present we should be pointing to <coef element
11008  *p = ch;
11009  while( *startCoef++ == *ch) ch++;
11010  if( (ch - *p) != 5) { osilerror_wrapper( ch,osillineno,"improper <coef> element"); return false;}
11011  startCoef -= 6;
11012  // get the idx attribute
11013  // eat the white space after <coef
11014  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11015  *p = ch;
11016  while( *c_idx++ == *ch) ch++;
11017  if( (ch - *p) != 3) { osilerror_wrapper( ch,osillineno,"incorrect idx attribute in objective function <idx> tag"); return false;}
11018  c_idx -= 4;
11019  // ch should be pointing to the first character after idx attribute
11021  osinstance->instanceData->objectives->obj[objcount]->coef[ k]->idx = atoimod1( osillineno, attText, attTextEnd);
11022  delete [] attText;
11023  ch++;
11024  // eat white space
11025  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11026  // if we don't have a > there is an error
11027  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"incorrect <coef> element") ; return false;}
11028  // we should be pointing to first character after <coef>
11029  *p = ch;
11030  // eat characters until we find <
11031  for(; *ch != '<' && *ch != EOF; ch++);
11032  // put back here
11033 
11034  // we should be pointing to a < in the </coef> tag
11035  if(*ch != '<') { osilerror_wrapper( ch,osillineno,"improper </coef> tag"); return false;}
11036  osinstance->instanceData->objectives->obj[objcount]->coef[ k]->value = atofmod1( osillineno, *p, ch);
11037  *p = ch;
11038  while( *endCoef++ == *ch) ch++;
11039  if( (ch - *p) != 6) { osilerror_wrapper( ch,osillineno,"improper </coef> element"); return false;}
11040  endCoef -= 7;
11041  // get rid of white space after </coef
11042  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11043  // if we don't have a > there is an error
11044  if(*ch++ != '>') { osilerror_wrapper( ch,osillineno,"incorrect </coef> element") ; return false;}
11045  }
11046  }// end if(numberOfObjCoef > 0)
11047  *p = ch;
11048  return true;
11049 }//end parseObjCoef
11050 
11051 char *parseBase64(const char **p, int *dataSize, int* osillineno ){
11052  int ki, numChar;
11053  char *attTextEnd;
11054  const char *ch = *p;
11055  const char *sizeOf = "sizeOf";
11056  //char *numericType = "numericType";
11057  const char *startBase64BinaryData = "<base64BinaryData";
11058  const char *endBase64BinaryData = "</base64BinaryData";
11059  char *attText = NULL;
11060  char *b64string = NULL;
11061  int i;
11062  // start parsing
11063  for(i = 0; startBase64BinaryData[i] == *ch; i++, ch++);
11064  if(i != 17) {
11065  ch -= i;
11066  *p = ch;
11067  return b64string;
11068  }
11069  // find sizeOf attribute
11070  // eat the white space
11071  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11072  for(i = 0; sizeOf[i] == *ch; i++, ch++);
11073  if(i != 6) { osilerror_wrapper( ch,osillineno,"incorrect sizeOf attribute in <base64BinaryData> element"); return NULL;}
11074  // ch should be pointing to the first character after sizeOf
11075  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
11076  if( *ch != '=') { osilerror_wrapper( ch, osillineno, "found an attribute not defined"); return NULL;} \
11077  ch++; \
11078  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
11079  if(*ch == '\"'){ \
11080  ch++; \
11081  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
11082  *p = ch; \
11083  for( ; *ch != '\"'; ch++); \
11084  }\
11085  else{\
11086  if(*ch == '\'') { \
11087  ch++; \
11088  for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
11089  *p = ch; \
11090  for( ; *ch != '\''; ch++); \
11091  } \
11092  else { osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return NULL;} \
11093  }\
11094  numChar = ch - *p; \
11095  attText = new char[numChar + 1]; \
11096  for(ki = 0; ki < numChar; ki++) attText[ki] = *((*p)++); \
11097  attText[ki] = '\0'; \
11098  attTextEnd = &attText[ki];
11099  ch++;
11100  *dataSize = atoimod1( osillineno, attText, attTextEnd);
11101  delete [] attText;
11102  // since the element must contain b64 data, this element must end with >
11103  // eat the white space
11104  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11105  // better have an > sign or not valid
11106  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"<base64BinaryData> element does not have a proper closing >"); return NULL;}
11107  ch++;
11108  // we are now pointing start of the data
11109  const char *b64textstart = ch;
11110  // eat characters until we get to the </base64BinaryData element
11111  for(; *ch != '<' && *ch != EOF; ch++);
11112  const char *b64textend = ch;
11113  // we should be pointing to </base64BinaryData>
11114  for(i = 0; endBase64BinaryData[i] == *ch; i++, ch++);
11115  if(i != 18) { osilerror_wrapper( ch,osillineno," problem with <base64BinaryData> element"); return NULL;}
11116  int b64len = b64textend - b64textstart;
11117  b64string = new char[ b64len + 1];
11118  for(ki = 0; ki < b64len; ki++) b64string[ki] = b64textstart[ ki];
11119  b64string[ki] = '\0';
11120  // burn the white space
11121  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11122  // better have an > sign or not valid
11123  if(*ch != '>' ) { osilerror_wrapper( ch,osillineno,"</base64BinaryData> element does not have a proper closing >"); return NULL;}
11124  ch++;
11125  for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
11126  *p = ch;
11127  return b64string;
11128 }
11129 
11130 
11131 double atofmod1(int* osillineno, const char *number, const char *numberend){
11132  double val;
11133  char *pEnd;
11134  val = os_strtod_wrap(number, &pEnd);
11135  // pEnd should now point to the first character after the number;
11136  // burn off any white space
11137  for( ; ISWHITESPACE( *pEnd) || isnewline( *pEnd, osillineno); pEnd++ ) ;
11138  // pEnd should now point to numberend, if not we have an error
11139  if(pEnd != numberend) osilerror_wrapper( pEnd, osillineno, "error in parsing an XSD:double");
11140  return val;
11141 }//end atofmod
11142 
11143 
11144 
11145 int atoimod1(int* osillineno, const char *number, const char *numberend){
11146  // modified atoi from Kernighan and Ritchie
11147  int ival;
11148  int i, sign;
11149  int endWhiteSpace;
11150  for(i = 0; ISWHITESPACE( number[ i]) || isnewline( number[ i], osillineno) ; i++);
11151  endWhiteSpace = i;
11152  sign = (number[ i] == '-') ? -1 : 1;
11153  if (number[ i] == '+' || number[ i] == '-') i++;
11154  for(ival = 0; ISDIGIT( number[ i]); i++){
11155  ival = 10*ival + (number[ i] - '0') ;
11156  }
11157  if(i == endWhiteSpace) { osilerror_wrapper( number,osillineno, "error in parsing an XSD:int" ); }
11158  // if we are here we should having nothing but white space until the end of the number
11159  for( ; ISWHITESPACE( number[ i]) || isnewline( number[ i], osillineno) ; i++);
11160  if(number[i] == *numberend){
11161  return sign*ival;
11162  }
11163  else { osilerror_wrapper( number,osillineno, "error in parsing an XSD:int"); return OSINT_MAX; }
11164 }//end atoimod1
11165 
11166 void osilerror_wrapper( const char* ch, int* osillineno, const char* errormsg){
11167  const int numErrorChar = 20;
11168  char errorArray[100] = "";
11169  strncpy(errorArray, ch, numErrorChar);
11170  std::ostringstream outStr;
11171  std::string error = errormsg;
11172  error = "PARSER ERROR: Input is either not valid or well formed: " + error;
11173  outStr << error << endl;
11174  outStr << "Here are " ;
11175  outStr << numErrorChar ;
11176  outStr << " characters currently being pointed to in the input string: ";
11177  outStr << errorArray;
11178  outStr << endl;
11179  outStr << "See line number: " << *osillineno << endl;
11180  error = outStr.str();
11181  //osillex_destroy(scanner);
11182  throw ErrorClass( error);
11183 }//end osilerror_wrapper
11184 
11186 /*
11187  int k;
11188  int numOtherVarVec = parserData->otherVarVec.size();
11189 
11190  for( k = 0; k < numOtherVarVec; k++){
11191  if( (parserData->otherVarVec[ k] != NULL) && (parserData->otherVarVec[ k]->otherVarText != NULL) )
11192  delete[] parserData->otherVarVec[ k]->otherVarText;
11193  if( (parserData->otherVarVec[ k] != NULL) && (parserData->otherVarVec[ k]->otherVarIndex != NULL) )
11194  delete[] parserData->otherVarVec[ k]->otherVarIndex;
11195 
11196  if( parserData->otherVarVec[ k] != NULL) delete parserData->otherVarVec[ k];
11197  }
11198 
11199  parserData->otherVarVec.clear();
11200 
11201  int numDualVals = parserData->dualVals.size();
11202  for(k = 0; k < numDualVals; k++){
11203  if( parserData->dualVals[ k] != NULL )
11204  delete parserData->dualVals[ k];
11205  }
11206  parserData->dualVals.clear();
11207 
11208 
11209  int numObjVals = parserData->objVals.size();
11210  for(k = 0; k < numObjVals; k++){
11211  if( parserData->objVals[ k] != NULL )
11212  delete parserData->objVals[ k];
11213  }
11214  parserData->objVals.clear();
11215 
11216 
11217  int numPrimalVals = parserData->primalVals.size();
11218  for(k = 0; k < numPrimalVals; k++){
11219  if( parserData->primalVals[ k] != NULL )
11220  delete parserData->primalVals[ k];
11221  }
11222  parserData->primalVals.clear();
11223 */
11224 }//end osil_empty_vectors
11225 
11226 
#define BASEMATRIXSTARTCOLATT
#define EMPTYMATRIXTYPEATT
The OSnLNodeErf Class.
Definition: OSnLNode.h:1162
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
The OSnLNodeTimes Class.
Definition: OSnLNode.h:617
bool targetMatrixFirstColPresent
int yyerrstatus
bool targetMatrixFirstRowPresent
bool stageVariablesOrdered
...we need to track whether the variables, constraints, objectives are given in temporal order...
#define YYSIZE_T
#define MATRICESEND
#define GENERALEND
#define ELEMENTSSTART
bool isnewline(char c, int *osillineno)
#define SYSTEMEND
#define ENUMTYPEATT
int idx
The index of the matrix.
Definition: OSnLNode.h:2466
#define ABSSTART
#define SEMIDEFINITECONESTART
goto yysetstate
double normScaleFactor
double coef
coef is an option coefficient on the variable, the default value is 1.0
Definition: OSnLNode.h:1485
bool intervalstartON
intervalstartON is true if we have found a start time for the time interval
#define YYID(n)
#define POLYHEDRALCONESTART
std::string name
name corresponds to the optional attribute that holds the variable name, the default value is empty ...
Definition: OSInstance.h:71
Constraints * constraints
constraints is a pointer to a Constraints object
Definition: OSInstance.h:2191
#define YYSTACK_BYTES(N)
bool parseStart(const char **pchar, OSInstance *osinstance, int *osillineno)
#define yylval
#define INSTANCENAMEEND
The OSnLNodeSin Class.
Definition: OSnLNode.h:1012
char yymsgbuf[128]
void yygetOSInstance(const char *osil, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
#define FILEDESCRIPTIONSTART
bool referenceMatrixIdxPresent
#define FILECREATOREMPTY
std::string name
the name of the objective function
Definition: OSInstance.h:152
#define INSTANCENAMESTART
This file defines the OSnLNode class along with its derived classes.
The in-memory representation of a polyhedral cone.
Definition: OSInstance.h:786
The in-memory representation of a rotated quadratic cone.
Definition: OSInstance.h:951
#define MATRIXOBJECTIVESSTART
std::string name
#define YYLEX
a data structure to represent row reference elements in a MatrixType object Each nonzero element is o...
Definition: OSMatrix.h:1177
int tmpnlcount
tmpnlcount counts the number of nl nodes actually found.
The in-memory representation of the &lt;matrices&gt; element.
Definition: OSInstance.h:482
goto yyexhaustedlab
YYSTYPE * yyvsp
#define CONSTRAINTSEND
#define EMPTYCATEGORYATT
bool parseInstanceData(const char **pchar, OSInstance *osinstance, int *osillineno)
#define EMPTYSOLVERATT
#define FILELICENCESTARTANDEND
#define SYMMETRYATT
The in-memory representation of the &lt;obj&gt; element.
Definition: OSInstance.h:2019
#define STARTIDXATT
int idx
idx gives the index of this variable
Definition: OSInstance.h:1944
#define YYINITDEPTH
std::vector< MatrixNode * > mtxBlocksVec
#define EMPTYROWMAJORATT
const char * yys
The in-memory representation of the &lt;matrixObj&gt; element.
Definition: OSInstance.h:1661
IntVector * rowIdx
a pointer of row indices if the problem is stored by column
Definition: OSInstance.h:309
#define MATRIXNEGATEEND
#define SQUAREEND
#define MATRIXSUBMATRIXATSTART
unsigned short int yytype_uint16
#define ELEND
std::string type
bool stagenameON
stagenameON is true if the current stage was given a name
yytype_int16 * yyss
int matrixCounter
We also need to keep track locally of the number of matrices.
The OSnLNodeMatrixTrace Class.
Definition: OSnLNode.h:1662
OSnLMNode * createExpressionTreeFromPrefix(std::vector< ExprNode * > nlNodeVec)
Take a vector of ExprNodes (OSnLNodes and OSnLMNodes) in prefix format and create a matrix-valued OSE...
Definition: OSnLNode.cpp:2478
#define YYEOF
#define COMPONENTSEND
#define MATRIXMINUSSTART
int * osglIntArray
data structure to process an IntVector and hold the data temporarily
#define ELSTART
#define MATRIXTOSCALARSTART
The OSnLNodeSqrt Class.
Definition: OSnLNode.h:864
bool distortionMatrixPresent
#define DESCRIPTIONATT
#define HORIZONATT
#define EMPTYVALUEATT
a data structure to represent the nonzeros in a generalMatrix element
Definition: OSMatrix.h:639
#define IDENTITYMATRIXEND
#define COEFATT
#define NONZEROSSTART
bool parseLinearConstraintCoefficients(const char **pchar, OSInstance *osinstance, int *osillineno)
#define CONREFERENCEELEMENTSEND
a data structure to represent the constant elements in a MatrixType object
Definition: OSMatrix.h:749
#define MATRIXCONSTRAINTSSTART
unsigned char yytype_uint8
#define VARIDXSTART
The OSnLNodeIf Class.
Definition: OSnLNode.h:1212
#define MATRIXCONSTRAINTSEND
#define BLOCKSEND
#define YYTRANSLATE(YYX)
#define EMPTYMATRIXVARTYPEATT
int idx
idx gives the index of this variable
Definition: OSInstance.h:2030
#define NUMBEREND
std::vector< ExprNode * > minVec
the OSnLNodeMin node can have any number of children, including other children with an indeterminate ...
#define JOBEND
#define FILELICENCEEND
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
Definition: OSParameters.h:599
int numberOfEl
Definition: OSGeneral.h:483
#define UNKNOWNSTART
#define STARTATT
static const yytype_uint16 yytable[]
#define DIVIDESTART
#define scanner
The OSnLNodeMin Class.
Definition: OSnLNode.h:463
#define LINEARELEMENTSEND
#define MATRIXOBJIDXATT
static const yytype_int16 yypgoto[]
std::vector< ExprNode * > allDiffVec
the OSnLNodeallDiff node can have any number of children, including other children with an indetermin...
unsigned int inumberOfChildren
inumberOfChildren is the number of OSnLNode child elements If this number is not fixed, e.g., for a sum node, it is temporarily set to 0
Definition: OSnLNode.h:74
int idx
idx is the index of the variable
Definition: OSnLNode.h:1488
#define BASEMATRIXSTART
std::string errormsg
errormsg is the error that is causing the exception to be thrown
Definition: OSErrorClass.h:42
The OSnLNodeLn Class.
Definition: OSnLNode.h:815
#define NUMBEROFOBJIDXATT
#define NUMBEROFVALUESATT
#define VARIABLEEND
bool parseValue(const char **pchar, OSInstance *osinstance, int *osillineno)
#define BLOCKCOLIDXATT
The in-memory representation of the &lt;matrixProgramming&gt; element.
Definition: OSInstance.h:1882
#define MATRIXDIAGONALSTART
std::string description
further information about the file or the problem contained within it
Definition: OSGeneral.h:50
#define YYEMPTY
#define UNKNOWNEND
YYLTYPE yyloc
int atoimod1(int *osillineno, const char *ch1, const char *ch2)
to represent the nonzeros in a constantMatrix element
Definition: OSMatrix.h:501
#define ROWOFFSETEND
IntVector * colIdx
a pointer of column indices if the problem is stored by row
Definition: OSInstance.h:312
std::string maxOrMin
declare the objective function to be a max or a min
Definition: OSInstance.h:157
bool parseRowIdx(const char **pchar, OSInstance *osinstance, int *osillineno)
#define NUMBEROFROWSATT
#define MATRIXVARIDXATT
a data structure to represent an entry in a conReferenceMatrix element, which consists of a constrain...
Definition: OSMatrix.h:453
#define ENUMERATIONSTART
#define MATRIXREFERENCEEND
#define OSILEND
a data structure to represent the linear expressions in a LinearMatrixElement object ...
Definition: OSMatrix.h:602
#define INTERVALEND
The in-memory representation of the &lt;linearConstraintCoefficients&gt; element.
Definition: OSInstance.h:288
#define NUMBEROFCONATT
#define NUMBEROFMATRIXOBJATT
bool parseInstanceHeader(const char **pchar, OSInstance *osinstance, int *osillineno)
#define HEADERSTART
#define FILENAMEEND
ObjCoef ** coef
coef is pointer to an array of ObjCoef object pointers
Definition: OSInstance.h:176
a data structure to represent the nonzeroes of a matrix by transformation from other (previously defi...
Definition: OSMatrix.h:1358
#define MATRIXTERMSTART
#define BASEMATRIXSTARTROWATT
#define MATRIXPLUSEND
#define MATRIXMINUSEND
#define NUMBEROFELATT
#define PRODUCTCONESTART
#define YYFINAL
bool suppressFurtherErrorMessages
bool varReferenceMatrixIdxPresent
#define PISTART
The in-memory representation of the objective function &lt;coef&gt; element.
Definition: OSInstance.h:110
union YYSTYPE YYSTYPE
YYSTYPE * yyvs
#define MATRIXVARSTART
std::string fileCreator
name(s) of author(s) who created this file
Definition: OSGeneral.h:55
#define NUMBEROFCONESATT
#define QUADRATICCOEFFICIENTSSTART
#define YY_LOCATION_PRINT(File, Loc)
#define MINEND
#define MATRIXEXPRESSIONSEND
goto yyerrlab
Constraint ** con
con is pointer to an array of Constraint object pointers
Definition: OSInstance.h:268
bool conReferenceMatrixIdxPresent
std::vector< int > nBlocksVec
#define ITEMTEXT
int idx
The index of the matrixCon.
Definition: OSnLNode.h:2679
if(!yyg->yy_init)
#define MATRIXDETERMINANTSTART
#define VARIABLESTART
#define ROWMAJORATT
bool stageVariablesON
for each stage we need to track whether the &lt;variables&gt;, &lt;constraints&gt;, &lt;objectives&gt; elements are pre...
#define LNSTART
int returnNlExprShape(std::string shape)
Definition: OSParameters.h:839
#define SECONDAXISDIRECTIONATT
#define NUMBEROFMATRIXTERMSATT
#define OTHEREND
#define EXPEND
#define MATRIXMERGEEND
#define QTERMEND
The OSnLNodeCos Class.
Definition: OSnLNode.h:962
#define ISDIGIT(_c)
std::vector< ExprNode * > maxVec
the OSnLNodeMax node can have any number of children, including other children with an indeterminate ...
#define ISFREESTART
a data structure to represent the nonzeroes of a matrix in a blockwise fashion. Each block can be giv...
Definition: OSMatrix.h:1449
std::string name
used to give a name to the file or the problem contained within it
Definition: OSGeneral.h:39
#define TIMEDOMAINSTART
int idx
The index of the matrixObj.
Definition: OSnLNode.h:2608
#define NEGATEEND
bool ignoreDataAfterErrors
if the parser finds invalid text it is held here and we delete if the file was not valid ...
The in-memory representation of a generic cone Specific cone types are derived from this generic clas...
Definition: OSInstance.h:530
#define ESTART
#define EXPSTART
#define QUOTE
#define TIMEDOMAINEND
a data structure to represent a MatrixBlock object (derived from MatrixType)
Definition: OSMatrix.h:2500
OSnLMNodeMatrixCon * nlMNodeMatrixCon
a pointer to an OSnLMNode object that is a matrixCon reference
goto yyreturn
#define POWEREND
#define TARGETMATRIXFIRSTCOLATT
#define DIVIDEEND
int idx
The index of the matrixVar.
Definition: OSnLNode.h:2537
#define LINEARELEMENTSSTART
int returnVarType(char vt)
Definition: OSParameters.h:569
The OSnLMNode Class for nonlinear expressions involving matrices.
Definition: OSnLNode.h:1760
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
Definition: OSMatrix.h:50
The in-memory representation of the element.
Definition: OSInstance.h:1933
#define MATRIXSTART
#define EMPTYMATRIXCONTYPEATT
#define INSTANCEDATASTARTEND
char type
type corresponds to the attribute that holds the variable type: C (Continuous), B (binary)...
Definition: OSInstance.h:66
#define MATRIXOBJECTIVESEND
double atofmod1(int *osillineno, const char *ch1, const char *ch2)
#define EMPTYNAMEATT
#define SYSTEMSTART
#define FILEDESCRIPTIONSTARTANDEND
OSnLMNodeMatrixObj * nlMNodeMatrixObj
a pointer to an OSnLMNode object that is a matrixObj reference
bool numberOfMatricesPresent
#define MATRIXTIMESSTART
int numberOfVariables
numberOfVariables is the number of variables in the instance
Definition: OSInstance.h:94
#define IDXONEATT
void osilerror(YYLTYPE *mytype, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData, std::string errormsg)
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL ...
Definition: OSMatrix.h:2336
#define VALUESTART
#define YYPACT_NINF
#define MATRIXINVERSEEND
#define YY_(msgid)
#define INTERSECTIONCONESTART
#define SEMIDEFINITECONEEND
#define UBMATRIXIDXATT
#define COLOFFSETEND
void osgl_empty_vectors(OSgLParserData *osglData)
#define EMPTYSHAPEATT
#define VARIABLESEND
OSMatrix ** matrix
We need to hold an array of &lt;matrix&gt; elements temporarily.
#define BLOCKSTART
int yyn
#define NAMEATT
#define QUADRATICCOEFFICIENTSEND
#define MATRIXDOTTIMESSTART
std::vector< ExprNode * > matrixSumVec
the OSnLMNodeMatrixSum node can have any number of children, including other children with an indeter...
#define MATRIXREFERENCESTART
OSnLParserData * osnlData
bool numberOfVarIdxPresent
#define EMPTYTYPEATT
The in-memory representation of the &lt;constraints&gt; child of the &lt;stage&gt; element.
Definition: OSInstance.h:1994
#define PRODUCTCONEEND
std::string semidefiniteness
bool stageObjectivesOrdered
bool scalarMultiplierPresent
bool variablecoefattON
variablecoefattON is set to true if the coeff attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one coeff attribute
#define SINSTART
#define TARGETMATRIXFIRSTROWATT
goto yybackup
#define OBJTYPEATT
#define YYACCEPT
#define SQUARESTART
OSgLParserData * osglData
#define EMPTYVALUETYPEATT
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock) ...
Definition: OSMatrix.h:1889
double lb
lb is the lower bound on the constraint
Definition: OSInstance.h:235
std::string addErrorMsg(YYLTYPE *mytype, OSInstance *osinstance, OSiLParserData *parserData, OSgLParserData *osglData, OSnLParserData *osnlData, std::string errormsg)
The in-memory representation of the &lt;constraints&gt; element.
Definition: OSInstance.h:251
int numberOfObjectives
numberOfObjectives is the number of objective functions in the instance
Definition: OSInstance.h:201
#define yynerrs
#define HEADEREND
#define YYPOPSTACK(N)
#define NONPOSITIVECONEEND
#define STAGESEND
#define POWERSTART
bool baseMatrixStartRowPresent
ENUM_MATRIX_SYMMETRY
Definition: OSParameters.h:735
OSiLParserData * parserData
goto yydefault
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define AXISDIRECTIONATT
std::string id
later, e.g.
Definition: OSnLNode.h:1274
#define YYUSE(e)
double os_strtod_wrap(const char *str, char **strEnd)
Definition: OSMathUtil.cpp:125
#define BLOCKROWIDXATT
bool verifyMatrixSymmetry(std::string symmetry)
Definition: OSParameters.h:770
#define DUMMY
#define YYDPRINTF(Args)
OSnLNodeNumber * nlNodeNumberPoint
a pointer to an OSnLNode object that is a number
#define GENERALELEMENTSEND
#define VALUESEND
int numberOfEl
Definition: OSGeneral.h:620
struct yy_buffer_state * YY_BUFFER_STATE
void osilset_lineno(int line_number, yyscan_t yyscanner)
Set the current line number.
IntVector * start
a pointer to the start of each row or column stored in sparse format
Definition: OSInstance.h:306
#define CONSTART
const char * yysrc
#define OPTIMIZATIONEND
double ub
ub is the upper bound on the constraint
Definition: OSInstance.h:238
bool numberOfBlocksPresent
Data elements for parsing number-valued attributes and elements.
#define GREATERTHAN
#define SINEND
char * parseBase64(const char **p, int *dataSize, int *osillineno)
#define YYSTACK_ALLOC
#define NLEND
#define MAXEND
The in-memory representation of an intersection cone.
Definition: OSInstance.h:1324
#define yychar
#define MATRIXPRODUCTSTART
#define yyparse
std::vector< int * > rowOffsets
Vectors to hold rowOffset and colOffset arrays in a place where they are easily accessible while the ...
#define FILEDESCRIPTIONEND
The in-memory representation of the &lt;nonlinearExpressions&gt; element.
Definition: OSInstance.h:452
std::vector< int * > colOffsets
#define MATRIXTRANSPOSEEND
The OSnLNodeNumber Class.
Definition: OSnLNode.h:1262
#define OBJEND
#define CONSTRAINTSSTART
YYLTYPE * yyls
MatrixNode * tempC
This matrix constructor is needed in order to properly push the constructor vector.
Used to hold part of the instance in memory.
#define MATRIXVARTYPEATT
#define MATRIXEND
this class extends OSMatrix for use, e.g., in the matrixCon section of OSoL and OSrL ...
Definition: OSMatrix.h:2445
std::vector< MatrixNode * > mtxConstructorVec
Several vectors to process the matrix nodes into the right order.
OSnLNodeVariable * nlNodeVariablePoint
a pointer to an OSnLNode object that is a variable
#define FILENAMESTARTANDEND
#define OBJREFERENCEELEMENTSEND
The next few nodes evaluate to a scalar even though one or more of its arguments are matrices...
Definition: OSnLNode.h:1612
#define NONPOSITIVECONESTART
a data structure to represent a term in a linearMatrix element A term has the form c*x_{k}...
Definition: OSMatrix.h:373
A concrete class that is used to store a specific type of matrix values, references to variable index...
Definition: OSMatrix.h:563
#define MATRIXSCALARTIMESEND
#define BASEMATRIXENDROWATT
char * osilget_text(yyscan_t yyscanner)
Get the current token.
#define FACTORSEND
#define MATRIXCONSTART
bool semidefinitenessPresent
#define NONLINEAREXPRESSIONSSTART
to represent the nonzeros in an objReferenceMatrix element
Definition: OSMatrix.h:675
std::string parser_errors
used to accumulate error message so the parser does not die on the first error encountered ...
#define NUMBEROFVARIABLESATT
#define INDEXSTART
The OSnLNodeNegate Class.
Definition: OSnLNode.h:566
#define ATLOWERSTART
#define INTERSECTIONCONEEND
#define CONTYPEATT
#define VAREND
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
Definition: OSMatrix.h:1091
int osillex_init(void **ptr_yy_globals)
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
Definition: OSMatrix.h:1536
The in-memory representation of the &lt;matrixCon&gt; element.
Definition: OSInstance.h:1736
static YYSIZE_T yysyntax_error(char *yyresult, int yystate, int yychar)
#define SERVICEURISTART
#define NUMBEROFENUMERATIONSATT
#define UBCONEIDXATT
bool numberOfColumnsPresent
bool objReferenceMatrixIdxPresent
double weight
weight is the weight applied to the given objective function, 1.0 by default
Definition: OSInstance.h:167
#define MINUSEND
#define MATRIXPRODUCTEND
#define POLARCONESTART
int qtermcount
These variables are used for processing the &lt;quadraticCoefficients&gt; element.
#define FILECREATORSTART
#define CATEGORYATT
#define SERVICENAMEEND
The in-memory representation of the &lt;obj&gt; element.
Definition: OSInstance.h:141
#define CONEND
#define FILENAMESTART
OSnLMNodeMatrixVar * nlMNodeMatrixVar
a pointer to an OSnLMNode object that is a matrixVar reference
#define ITEMEMPTY
int osillex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
#define VARSTART
#define ITEMSTARTANDEND
#define IDXATT
void osilerror_wrapper(const char *ch, int *osillineno, const char *errormsg)
The OSnLNodeSquare Class.
Definition: OSnLNode.h:912
#define YY_REDUCE_PRINT(Rule)
std::string value
static void const char * yymsg
#define OBJREFERENCEELEMENTSSTART
DoubleVector * value
a pointer to the array of nonzero values being stored
Definition: OSInstance.h:315
yytype_int16 yyss_alloc
#define MATRIXUPPERTRIANGLESTART
#define NORMSCALEFACTORATT
#define CONREFERENCEMATRIXIDXATT
#define MATRIXOBJSTART
#define JOBIDEND
#define EXPRSTART
bool qtermidxattON
qtermidxattON is true if we have found the row index of the of a quadratic term
#define FILESOURCESTART
The in-memory representation of the &lt;objectives&gt; element.
Definition: OSInstance.h:188
#define YYSIZE_MAXIMUM
static const yytype_uint16 yytranslate[]
#define MATRIXCONIDXATT
#define POLYHEDRALCONEEND
#define MATRIXCONTYPEATT
The OSnLNodePlus Class.
Definition: OSnLNode.h:315
double lb
lb corresponds to the optional attribute that holds the variable lower bound.
Definition: OSInstance.h:56
YYSIZE_T yystacksize
double constant
constant is the constant term added to the objective function, 0 by default
Definition: OSInstance.h:162
#define MATRIXPROGRAMMINGSTART
#define GETATTRIBUTETEXT
#define PLUSSTART
#define NUMBEROFMATRIXVARATT
#define INDEXEND
#define BASEMATRIXEND
#define CONESEND
#define MATRIXTRACESTART
#define MATRIXLOWERTRIANGLESTART
int nvarcovered
these two integers track how many variables and constraints have been assigned to a stage; this is us...
bool constantMatrixIdxPresent
bool qtermcoefattON
qtermcoefattON is true if we have found the coefficient of the quadratic term
bool stageConstraintsOrdered
void osilset_extra(OSiLParserData *parserData, void *yyscanner)
Variable ** var
Here we define a pointer to an array of var pointers.
Definition: OSInstance.h:97
short int yytype_int8
#define VARTYPEATT
#define MATRIXIDXATT
#define MATRIXVARIABLESSTART
The in-memory representation of the &lt;matrixVariables&gt; element.
Definition: OSInstance.h:1635
a data structure to represent the nonzeros in a conReferenceMatrix element
Definition: OSMatrix.h:711
#define BLOCKEND
#define ROTATEDQUADRATICCONEEND
void osil_empty_vectors(OSiLParserData *parserData)
#define FILESOURCEEMPTY
int osillineno
if there is a parser error, osillineno holds the line number in the OSiL file where the error occured...
bool baseTransposePresent
Data elements for parsing string-valued attributes and text elements.
#define SERVICEEND
#define VALUEEND
std::vector< MatrixNode * > mtxBlkVec
#define OBJECTIVESSTART
The in-memory representation of a quadratic cone.
Definition: OSInstance.h:860
YYSTYPE yyvs_alloc
The OSnLNodeVariable Class.
Definition: OSnLNode.h:1478
#define NONNEGATIVECONEEND
ExprNode * nlNodePoint
These entities are used for parsing &lt;nonlinearExpressions&gt;
#define ITEMEND
#define ISFREEEND
The OSnLNodeAllDiff Class.
Definition: OSnLNode.h:1560
#define EMPTYOBJTYPEATT
#define MATRIXINVERSESTART
#define FILESOURCEEND
double value
value is the value of the objective function coefficient corresponding to the variable with index idx...
Definition: OSInstance.h:128
a data structure to represent the nonzero values in a generalMatrix element
Definition: OSMatrix.h:1005
The in-memory representation of the &lt;quadraticCoefficients&gt; element.
Definition: OSInstance.h:380
The in-memory representation of the &lt;stages&gt; element.
Definition: OSInstance.h:2091
#define EMPTYVARTYPEATT
#define POLARCONEEND
return yylen
#define ERFSTART
#define FILECREATORSTARTANDEND
#define MATRIXMERGESTART
#define OPTIMIZATIONSTART
#define ABSEND
#define CONESSTART
#define OBJSTART
OSnLMNodeMatrixReference * nlMNodeMatrixRef
a pointer to an OSnLMNode object that is a simple matrix reference
#define SOLVERATT
void fint fint * k
YYLTYPE yyerror_range[2]
int numberOfValues
numberOfValues is the number of nonzero elements stored in the &lt;linearConstraintCoefficients&gt; element...
Definition: OSInstance.h:301
#define ATLOWEREND
#define MATRICESSTART
const double OSDBL_MAX
Definition: OSParameters.h:93
#define REFERENCEMATRIXIDXATT
short int yytype_int16
#define NUMBEROFBLOCKSATT
#define QUADRATICCONESTART
#define MATRIXTERMEND
The OSnLNodeMax Class.
Definition: OSnLNode.h:414
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
bool normScaleFactorPresent
#define SERVICEURIEND
#define ISWHITESPACE(char_)
double value
value is the value of the number
Definition: OSnLNode.h:1266
double ub
ub corresponds to the optional attribute that holds the variable upper bound.
Definition: OSInstance.h:61
#define VARIABLESSTART
bool parseObjectives(const char **pchar, OSInstance *osinstance, int *osillineno)
void osnl_empty_vectors(OSnLParserData *osnlData)
int idx
idx gives the index of this constraint
Definition: OSInstance.h:1987
The OSnLNodeDivide Class.
Definition: OSnLNode.h:668
int returnMatrixType(std::string type)
Definition: OSParameters.h:618
#define MINSTART
bool parseColIdx(const char **pchar, OSInstance *osinstance, int *osillineno)
Variables * variables
variables is a pointer to a Variables object
Definition: OSInstance.h:2185
int yytoken
#define YYSTACK_FREE
static const yytype_int16 yydefgoto[]
#define NUMBEROFEXPR
#define OTHERSTART
#define SERVICESTART
#define NUMBEROFMATRIXCONATT
OSnLNode ** m_mChildren
m_mChildren holds all the operands, that is, nodes that the current node operates on...
Definition: OSnLNode.h:84
The in-memory representation of the &lt;timeDomain&gt; element.
Definition: OSInstance.h:2139
#define NEGATESTART
int returnMatrixSymmetry(std::string symmetry)
Definition: OSParameters.h:758
The in-memory representation of the &lt;con&gt; element.
Definition: OSInstance.h:1976
#define NUMBEROFNONLINEAREXPRESSIONS
#define VALUEATT
#define FILESOURCESTARTANDEND
static const yytype_uint16 yystos[]
const int OSINT_MAX
Definition: OSParameters.h:94
#define MATRIXDIAGONALEND
#define MATRIXTYPEATT
double scalarMultiplier
static int
Definition: OSdtoa.cpp:2173
#define DUALCONESTART
goto yynewstate
GeneralFileHeader * instanceHeader
the instanceHeader is implemented as a general file header object to allow sharing of classes between...
Definition: OSInstance.h:2275
#define EMPTYSYMMETRYATT
#define EXPREND
MatrixExpressionTree * matrixExpressionTree
matrixExpressionTree contains the root of the MatrixExpressionTree
Definition: OSInstance.h:1829
The in-memory representation of the &lt;matrixObjectives&gt; element.
Definition: OSInstance.h:1708
#define OBJECTIVESEND
YYLTYPE yylsa[YYINITDEPTH]
#define MATRIXTOSCALAREND
int numberOfConstraints
numberOfConstraints is the number of constraints in the instance
Definition: OSInstance.h:264
#define PRODUCTSTART
#define IDATT
#define FILEDESCRIPTIONEMPTY
#define INTEGER
#define BLOCKSSTART
#define ELEMENTTEXT
#define NLSTART
int idx
Definition: OSMatrix.h:2188
#define IDENTITYMATRIXSTART
#define SUPERBASICSTART
int osilget_lineno(yyscan_t yyscanner)
Get the current line number.
int * m_miVarStageInfo
m_miVarStageInfo is an array that for each variable gives the stage to which it belongs.
The OSnLNodeSum Class.
Definition: OSnLNode.h:365
int yytype
#define MATRIXNEGATESTART
InstanceData * instanceData
A pointer to an InstanceData object.
Definition: OSInstance.h:2278
#define MATRIXCONEND
#define EMPTYSEMIDEFINITENESSATT
#define YY_STACK_PRINT(Bottom, Top)
bool templateMatrixIdxPresent
#define SCALARMULTIPLIERATT
std::vector< ExprNode * > productVec
the OSnLNodeProduct node can have any number of children, including other children with an indetermin...
int returnConReferenceValueType(std::string valueType)
Definition: OSParameters.h:720
int yyresult
#define EMPTYENUMTYPEATT
#define IFSTART
The OSnLNodePower Class.
Definition: OSnLNode.h:717
#define LNEND
#define TRANSFORMATIONEND
OSnLMNode * m_treeRoot
m_treeRoot holds the root node (of OSnLMNode type) of the expression tree.
The in-memory representation of the &lt;nl&gt; element.
Definition: OSInstance.h:410
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition: OSMatrix.h:248
#define FACTORSSTART
#define STAGEEND
return yyd
#define INCLUDEDIAGONALATT
#define NUMBERSTART
#define SUMSTART
an integer Vector data structure
Definition: OSGeneral.h:469
#define STAGESTART
#define STAGESSTART
#define ORDERCONEIDXATT
#define ENDOFELEMENT
bool qtermidattON
qtermidattON is true if we have found the id of the quadratic term
static Bigint * mult(Bigint *a, Bigint *b)
Definition: OSdtoa.cpp:857
#define DISTORTIONMATRIXIDXATT
#define ORTHANTCONESTART
#define INSTANCEDATAEND
#define GENERALELEMENTSSTART
#define SEMIDEFINITENESSATT
#define BASE64START
The OrthantCone Class.
Definition: OSInstance.h:726
#define MATRIXSUBMATRIXATEND
bool matrixidxattON
matrixidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one idx attribute
Objective ** obj
coef is pointer to an array of ObjCoef object pointers
Definition: OSInstance.h:205
std::string source
used when the file or problem appeared in the literature (could be in BiBTeX format or similar) ...
Definition: OSGeneral.h:45
double intervalstart
intervalstart holds the value for the start of the planning horizon
bool intervalhorizonON
intervalhorizonON is true if we have found a horizon for the time interval
static const yytype_int16 yypact[]
#define COMPONENTSSTART
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
Definition: OSMatrix.h:835
#define yylloc
#define OBJREFERENCEMATRIXIDXATT
bool parseVariables(const char **pchar, OSInstance *osinstance, int *osillineno)
#define MATRIXOBJEND
#define MATRIXTIMESEND
#define INDEXESEND
double * osglDblArray
bool baseMatrixEndColPresent
#define FILELICENCESTART
#define MATRIXEXPRESSIONSSTART
#define MATRIXDOTTIMESEND
#define STRINGVALUEDELEMENTSEND
#define FILELICENCEEMPTY
static const yytype_uint8 yyr2[]
#define YYABORT
#define NUMBEROFOBJECTIVESATT
#define NUMBEROFVARATT
std::vector< ExprNode * > sumVec
the OSnLNodeSum node can have any number of children, including other children with an indeterminate ...
#define ORTHANTCONEEND
ENUM_NL_EXPR_SHAPE
Definition: OSParameters.h:830
The in-memory representation of the &lt;variables&gt; child of the &lt;stage&gt; element.
Definition: OSInstance.h:1951
bool qtermidxOneattON
qtermidxOneattON is true if we have found the first index of the quadratic term
bool baseMatrixEndRowPresent
#define BASE64END
#define VARREFERENCEELEMENTSSTART
The in-memory representation of a cone of semidefinite matrices.
Definition: OSInstance.h:1046
Objectives * objectives
objectives is a pointer to a Objectives object
Definition: OSInstance.h:2188
#define EMPTYMATRIXOBJTYPEATT
goto yyerrlab1
The in-memory representation of the &lt;stage&gt; element.
Definition: OSInstance.h:2062
bool qtermidxTwoattON
qtermidxTwoattON is true if we have found the second index of the quadratic term
static const char *const yytname[]
#define CONSTANTELEMENTSSTART
The in-memory representation of the &lt;matrixVar&gt; element.
Definition: OSInstance.h:1579
int nonzeroCounter
Linear matrices need a counter to count the number of terms within each element.
#define YYSTACK_ALLOC_MAXIMUM
#define DOUBLE
The OSnLNodeMatrixTrace Class.
Definition: OSnLNode.h:1712
#define COLOFFSETSTART
#define MATRIXPLUSSTART
The in-memory representation of the &lt;cones&gt; element.
Definition: OSInstance.h:1532
yytype_int16 yyssa[YYINITDEPTH]
YYLTYPE * yylocationp
int * m_miConStageInfo
m_miConStageInfo is an array that for each constraint gives the stage to which it belongs...
yytokentype
goto yyreduce
#define MATRIXSCALARTIMESSTART
#define TRANSFORMATIONSTART
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
Definition: OSMatrix.cpp:2987
#define GENERALSTART
YYLTYPE yyls_alloc
static const yytype_uint16 yyr1[]
int nlnodenumber
nlnodenumber is the number of nl nodes in the instance
#define NUMBEROFCOLUMNSATT
#define JOBIDSTART
#define ELEMENTSEND
YYLTYPE * yylsp
#define EMPTYIDATT
#define VARREFERENCEELEMENTSEND
#define ROTATEDQUADRATICCONESTART
#define MATRIXLOWERTRIANGLEEND
static void
Definition: OSdtoa.cpp:1741
#define MATRIXVARIABLESEND
The in-memory representation of the &lt;matrixConstraints&gt; element.
Definition: OSInstance.h:1787
#define STARTVECTOREND
#define CONSTANTELEMENTSEND
std::string valueType
The OSnLNodeProduct Class.
Definition: OSnLNode.h:766
#define TWOQUOTES
double * el
Definition: OSGeneral.h:621
bool baseMatrixStartColPresent
#define TIMESEND
The in-memory representation of the &lt;objectives&gt; child of the &lt;stage&gt; element.
Definition: OSInstance.h:2037
int yystate
#define VALUESSTART
#define YYTABLE_NINF
#define CONREFERENCEELEMENTSSTART
int numberOfObjCoef
numberOfObjCoef is the number of variables with a nonzero objective function coefficient ...
Definition: OSInstance.h:172
#define MAXSTART
#define MATRIXPROGRAMMINGEND
#define DUALCONEEND
#define LBMATRIXIDXATT
#define INCRATT
The OSnLNodeAbs Class.
Definition: OSnLNode.h:1112
#define MATRIXOBJTYPEATT
#define ENUMERATIONEND
a data structure to represent the nonzero values in a linearMatrix element
Definition: OSMatrix.h:917
#define NUMBEROFCONSTRAINTSATT
std::string symmetry
bool firstAxisDirectionPresent
#define SQRTEND
#define PLUSEND
static const yytype_int16 yycheck[]
#define CONSTANTATT
#define ATUPPEREND
YY_BUFFER_STATE osil_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Setup the input buffer state to scan a string.
for(int i=0;i< nnz;i++)
double intervalhorizon
intervalhorizon holds the value of the end of the planning horizon
YYSTYPE yyval
YYSIZE_T yymsg_alloc
bool variableidxattON
variableidxattON is set to true if the idx attribute has been parsed for an OSnLNodeVariable, an exception is thrown if there is more than one idx attribute
int stageVariableStartIdx
...we need to track the first variable, constraint, objective...
std::string type
in the C++ type is real
Definition: OSnLNode.h:1269
ENUM_CONREFERENCE_VALUETYPE
An enum to track the type of value contained in a reference to a constraint.
Definition: OSParameters.h:703
#define MATRIXDETERMINANTEND
#define SERVICENAMESTART
#define NONLINEAREXPRESSIONSEND
static const yytype_uint16 yydefact[]
static char *char * yydest
#define NONNEGATIVECONESTART
bool includeDiagonalAttribute
bool parseConstraints(const char **pchar, OSInstance *osinstance, int *osillineno)
#define PRODUCTEND
int stagevarcount
...and we need to track the number of variables we have seen
The in-memory representation of an OSiL instance..
Definition: OSInstance.h:2262
#define MATRIXVAREND
The in-memory representation of the variables element.
Definition: OSInstance.h:83
#define EEND
#define UNITATT
#define BASICEND
OSInstance * osinstance
The OSnLNode Class for nonlinear expressions.
Definition: OSnLNode.h:179
static std::string decodeb64(char *b64bytes)
decode the data in base 64
Definition: OSBase64.cpp:87
The OSnLMNodeMatrixProduct Class.
Definition: OSnLNode.h:2755
bool secondAxisDirectionPresent
#define ROWOFFSETSTART
#define BASEMATRIXIDXATT
#define NUMBEROFVARIDXATT
int idx
idx is the index of the variable corresponding to the coefficient
Definition: OSInstance.h:123
#define SQRTSTART
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL ...
Definition: OSMatrix.h:2391
#define TIMESSTART
bool numberOfValuesPresent
#define INDEXESSTART
#define YYMAXDEPTH
#define YYLLOC_DEFAULT(Current, Rhs, N)
struct YYLTYPE YYLTYPE
#define NUMBEROFCONIDXATT
#define FILENAMEEMPTY
#define BASETRANSPOSEATT
#define SUPERBASICEND
#define EMPTYUNITATT
#define ATTRIBUTETEXT
int stagecount
store the number of stages
The OSgLParserData Class.
The OSnLNodeExp Class.
Definition: OSnLNode.h:1062
The OSiLParserData Class, used to store parser data.
#define YYTERROR
The in-memory representation of a product cone.
Definition: OSInstance.h:1248
#define BASICSTART
#define VARIDXEND
#define COSSTART
#define TEMPLATEMATRIXIDXATT
#define ALLDIFFEND
#define PIEND
#define EMPTYINCLUDEDIAGONALATT
#define EMPTYCONTYPEATT
yytype_int16 * yyssp
#define NUMBEROFQTERMSATT
#define SUMEND
#define NONZEROSEND
#define DIRECTIONSTART
#define ATUPPERSTART
used for throwing exceptions.
Definition: OSErrorClass.h:31
#define SHAPEATT
std::string varType
#define NUMBEROFSTAGESATT
#define JOBSTART
#define ATEQUALITYEND
Used to hold the instance in memory.
LinearConstraintCoefficients * linearConstraintCoefficients
linearConstraintCoefficients is a pointer to a LinearConstraintCoefficients object ...
Definition: OSInstance.h:2196
The OSnLParserData Class.
#define DIRECTIONEND
#define ALLDIFFSTART
#define FILECREATOREND
#define INTERVALSTART
int * m_miObjStageInfo
m_miObjStageInfo is an array that for each objective gives the stage to which it belongs.
The OSnLNodeMinus Class.
Definition: OSnLNode.h:515
#define LBCONEIDXATT
#define ERFEND
bool numberidattON
numberidattON is set to true if the id attribute has been parsed for an OSnLNodeNumber object...
#define NUMBEROFITEMSATT
#define MINUSSTART
real c
#define MULTATT
std::string shape
#define ATEQUALITYSTART
#define YYNTOKENS
The in-memory representation of the &lt;qTerm&gt; element.
Definition: OSInstance.h:340
#define NUMBEROFMATRICESATT
The in-memory representation of the &lt;expr&gt; element, which is like a nonlinear expression, but since it involves matrices, the expression could be linear, so a &quot;shape&quot; attribute is added to distinguish linear and nonlinear expressions.
Definition: OSInstance.h:1816
a data structure to represent a matrix object (derived from MatrixType)
Definition: OSMatrix.h:2185
The OSnLNodePI Class.
Definition: OSnLNode.h:1412
#define EMPTYBASETRANSPOSEATT
#define MATRIXUPPERTRIANGLEEND
int osillex_destroy(void *scanner)
#define yydebug
double constant
constant is a value that is added to the constraint
Definition: OSInstance.h:232
#define YYLAST
#define MATRIXTRACEEND
int * el
Definition: OSGeneral.h:484
#define CONSTANTMATRIXIDXATT
#define QUADRATICCONEEND
#define VARREFERENCEMATRIXIDXATT
#define yyerror
The in-memory representation of the variable element.
Definition: OSInstance.h:44
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
Definition: OSMatrix.h:411
#define TYPEATT
#define NUMBEROFOBJATT
#define FIRSTAXISDIRECTIONATT
YYSTYPE * yyvaluep
The NonnegativeCone Class.
Definition: OSInstance.h:609
int iNumberOfStartElements
iNumberOfStartElements counts the number of elements in the &lt;start&gt; section of &lt;linearConstraintCoeff...
Definition: OSInstance.h:322
static YYSIZE_T const char * yystr
#define STRINGVALUEDELEMENTSSTART
bool parseObjCoef(const char **pchar, int objcount, OSInstance *osinstance, int *osillineno)
YYSTYPE yyvsa[YYINITDEPTH]
#define SIZEOFATT
std::vector< ExprNode * > matrixProductVec
the OSnLMNodeProduct node can have any number of children, including other children with an indetermi...
The in-memory representation of the &lt;con&gt; element.
Definition: OSInstance.h:218
std::string name
name is the name of the constraint
Definition: OSInstance.h:229
std::vector< ExprNode * > nlNodeVec
nlNodeVec holds a vector of pointers to OSnLNodes and OSnLMNodes In order to build the expression tre...
The OSnLNodeE Class.
Definition: OSnLNode.h:1346
#define EMPTYDESCRIPTIONATT
#define VALUETYPEATT
#define IFEND
#define BASEMATRIXENDCOLATT
#define ITEMSTART
The in-memory representation of the &lt;matrixExpressions&gt; element.
Definition: OSInstance.h:1855
The NonpositiveCone Class.
Definition: OSInstance.h:667
#define QTERMSTART
#define STARTVECTORSTART
#define IDXTWOATT
#define MATRIXTRANSPOSESTART
std::string licence
licensing information if applicable
Definition: OSGeneral.h:60
#define COSEND